apply clang-format
Change-Id: Ib1b5dde5d4c6479c968cd7d7a4a1d01abae1fcf6
This commit is contained in:
Родитель
c107183d0a
Коммит
55ce9e0f35
|
@ -611,8 +611,8 @@ static INLINE int get_ext_tx_set(TX_SIZE tx_size, BLOCK_SIZE bs, int is_inter) {
|
|||
return (tx_size == TX_16X16 ? 2 : 1);
|
||||
}
|
||||
|
||||
static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA]
|
||||
[EXT_TX_SIZES] = {
|
||||
static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA][EXT_TX_SIZES] =
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
{ 1, 1, 1, 1, 1 }, // unused
|
||||
{ 0, 1, 1, 0, 0 },
|
||||
|
@ -624,8 +624,8 @@ static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA]
|
|||
#endif // CONFIG_CB4X4
|
||||
};
|
||||
|
||||
static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER]
|
||||
[EXT_TX_SIZES] = {
|
||||
static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER][EXT_TX_SIZES] =
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
{ 1, 1, 1, 1, 1 }, // unused
|
||||
{ 0, 1, 1, 0, 0 },
|
||||
|
|
|
@ -4674,8 +4674,8 @@ static void build_token_cdfs(const aom_prob *pdf_model,
|
|||
3=ONE_TOKEN_NEOB, 4=TWO_TOKEN_PLUS_EOB, 5=TWO_TOKEN_PLUS_NEOB
|
||||
*/
|
||||
// Block zero probability
|
||||
phead[0] =
|
||||
blockz_model == NULL ? 0 : ((*blockz_model) << (CDF_PROB_BITS - 8)) +
|
||||
phead[0] = blockz_model == NULL ? 0
|
||||
: ((*blockz_model) << (CDF_PROB_BITS - 8)) +
|
||||
(1 << (CDF_PROB_BITS - 9));
|
||||
phead[0] = AOMMIN(CDF_PROB_TOP - 6, AOMMAX(1, phead[0]));
|
||||
cdf_head[0] = phead[0];
|
||||
|
@ -4814,8 +4814,8 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size,
|
|||
const av1_coeff_count_model *const counts =
|
||||
(const av1_coeff_count_model *)cm->counts.coef[tx_size];
|
||||
const unsigned int(*eob_counts)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] =
|
||||
(const unsigned int(*)[REF_TYPES][COEF_BANDS]
|
||||
[COEFF_CONTEXTS])cm->counts.eob_branch[tx_size];
|
||||
(const unsigned int(*)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS])
|
||||
cm->counts.eob_branch[tx_size];
|
||||
#if CONFIG_NEW_TOKENSET
|
||||
const av1_blockz_probs_model *const pre_blockz_probs =
|
||||
pre_fc->blockzero_probs[tx_size];
|
||||
|
|
|
@ -528,16 +528,13 @@ static const aom_prob
|
|||
#endif // CONFIG_EXT_PARTITION
|
||||
};
|
||||
#else // !CONFIG_COMPOUND_SEGMENT
|
||||
static const aom_prob default_compound_type_probs[BLOCK_SIZES]
|
||||
[COMPOUND_TYPES - 1] = {
|
||||
static const aom_prob
|
||||
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
|
||||
#if CONFIG_CB4X4
|
||||
{ 208 }, { 208 }, { 208 },
|
||||
#endif
|
||||
{ 208 }, { 208 }, { 208 },
|
||||
{ 208 }, { 208 }, { 208 },
|
||||
{ 216 }, { 216 }, { 216 },
|
||||
{ 224 }, { 224 }, { 240 },
|
||||
{ 240 },
|
||||
{ 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 216 },
|
||||
{ 216 }, { 216 }, { 224 }, { 224 }, { 240 }, { 240 },
|
||||
#if CONFIG_EXT_PARTITION
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
|
@ -572,16 +569,13 @@ static const aom_prob default_wedge_interintra_prob[BLOCK_SIZES] = {
|
|||
const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
|
||||
-SIMPLE_TRANSLATION, -OBMC_CAUSAL
|
||||
};
|
||||
static const aom_prob default_motion_mode_prob[BLOCK_SIZES]
|
||||
[MOTION_MODES - 1] = {
|
||||
static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
#endif
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
{ 151 }, { 153 }, { 144 },
|
||||
{ 178 }, { 165 }, { 160 },
|
||||
{ 207 }, { 195 }, { 168 },
|
||||
{ 244 },
|
||||
{ 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
|
||||
{ 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
|
||||
#if CONFIG_EXT_PARTITION
|
||||
{ 252 }, { 252 }, { 252 },
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
|
@ -593,16 +587,13 @@ const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
|
|||
-SIMPLE_TRANSLATION, -WARPED_CAUSAL
|
||||
};
|
||||
|
||||
static const aom_prob default_motion_mode_prob[BLOCK_SIZES]
|
||||
[MOTION_MODES - 1] = {
|
||||
static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
#endif
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
{ 151 }, { 153 }, { 144 },
|
||||
{ 178 }, { 165 }, { 160 },
|
||||
{ 207 }, { 195 }, { 168 },
|
||||
{ 244 },
|
||||
{ 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
|
||||
{ 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
|
||||
#if CONFIG_EXT_PARTITION
|
||||
{ 252 }, { 252 }, { 252 },
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
|
@ -823,17 +814,14 @@ const aom_prob
|
|||
// When palette mode is enabled, following probability tables indicate the
|
||||
// probabilities to code the "is_palette" bit (i.e. the bit that indicates
|
||||
// if this block uses palette mode or DC_PRED mode).
|
||||
const aom_prob
|
||||
av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES]
|
||||
[PALETTE_Y_MODE_CONTEXTS] = {
|
||||
{ 240, 180, 100 }, { 240, 180, 100 },
|
||||
{ 240, 180, 100 }, { 240, 180, 100 },
|
||||
{ 240, 180, 100 }, { 240, 180, 100 },
|
||||
{ 240, 180, 100 }, { 240, 180, 100 },
|
||||
{ 240, 180, 100 }, { 240, 180, 100 },
|
||||
#if CONFIG_EXT_PARTITION
|
||||
{ 240, 180, 100 }, { 240, 180, 100 },
|
||||
const aom_prob av1_default_palette_y_mode_prob
|
||||
[PALETTE_BLOCK_SIZES][PALETTE_Y_MODE_CONTEXTS] = {
|
||||
{ 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
|
||||
{ 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
|
||||
{ 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
|
||||
{ 240, 180, 100 },
|
||||
#if CONFIG_EXT_PARTITION
|
||||
{ 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
};
|
||||
|
||||
|
@ -1191,18 +1179,14 @@ static const aom_prob default_txfm_partition_probs[TXFM_PARTITION_CONTEXTS] = {
|
|||
static const aom_prob default_skip_probs[SKIP_CONTEXTS] = { 192, 128, 64 };
|
||||
|
||||
#if CONFIG_DUAL_FILTER
|
||||
static const aom_prob
|
||||
default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
|
||||
[SWITCHABLE_FILTERS - 1] = {
|
||||
{ 235, 192, 128 }, { 36, 243, 48 },
|
||||
{ 34, 16, 128 }, { 34, 16, 128 },
|
||||
{ 149, 160, 128 }, { 235, 192, 128 },
|
||||
{ 36, 243, 48 }, { 34, 16, 128 },
|
||||
{ 34, 16, 128 }, { 149, 160, 128 },
|
||||
{ 235, 192, 128 }, { 36, 243, 48 },
|
||||
{ 34, 16, 128 }, { 34, 16, 128 },
|
||||
{ 149, 160, 128 }, { 235, 192, 128 },
|
||||
{ 36, 243, 48 }, { 34, 16, 128 },
|
||||
static const aom_prob default_switchable_interp_prob
|
||||
[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - 1] = {
|
||||
{ 235, 192, 128 }, { 36, 243, 48 }, { 34, 16, 128 },
|
||||
{ 34, 16, 128 }, { 149, 160, 128 }, { 235, 192, 128 },
|
||||
{ 36, 243, 48 }, { 34, 16, 128 }, { 34, 16, 128 },
|
||||
{ 149, 160, 128 }, { 235, 192, 128 }, { 36, 243, 48 },
|
||||
{ 34, 16, 128 }, { 34, 16, 128 }, { 149, 160, 128 },
|
||||
{ 235, 192, 128 }, { 36, 243, 48 }, { 34, 16, 128 },
|
||||
{ 34, 16, 128 }, { 149, 160, 128 },
|
||||
};
|
||||
#else // CONFIG_DUAL_FILTER
|
||||
|
@ -1524,13 +1508,10 @@ static const aom_prob default_inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1] = {
|
|||
|
||||
#if CONFIG_EXT_INTRA
|
||||
#if CONFIG_INTRA_INTERP
|
||||
static const aom_prob default_intra_filter_probs[INTRA_FILTERS + 1]
|
||||
[INTRA_FILTERS - 1] = {
|
||||
{ 98, 63, 60 },
|
||||
{ 98, 82, 80 },
|
||||
{ 94, 65, 103 },
|
||||
{ 49, 25, 24 },
|
||||
{ 72, 38, 50 },
|
||||
static const aom_prob
|
||||
default_intra_filter_probs[INTRA_FILTERS + 1][INTRA_FILTERS - 1] = {
|
||||
{ 98, 63, 60 }, { 98, 82, 80 }, { 94, 65, 103 },
|
||||
{ 49, 25, 24 }, { 72, 38, 50 },
|
||||
};
|
||||
const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)] = {
|
||||
-INTRA_FILTER_LINEAR, 2, -INTRA_FILTER_8TAP, 4, -INTRA_FILTER_8TAP_SHARP,
|
||||
|
@ -1544,23 +1525,19 @@ static const aom_prob default_filter_intra_probs[2] = { 230, 230 };
|
|||
#endif // CONFIG_FILTER_INTRA
|
||||
|
||||
#if CONFIG_SUPERTX
|
||||
static const aom_prob default_supertx_prob[PARTITION_SUPERTX_CONTEXTS]
|
||||
[TX_SIZES] = {
|
||||
static const aom_prob
|
||||
default_supertx_prob[PARTITION_SUPERTX_CONTEXTS][TX_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_TX64X64
|
||||
{ 1, 1, 160, 160, 170, 180 },
|
||||
{ 1, 1, 200, 200, 210, 220 },
|
||||
{ 1, 1, 160, 160, 170, 180 }, { 1, 1, 200, 200, 210, 220 },
|
||||
#else
|
||||
{ 1, 1, 160, 160, 170 },
|
||||
{ 1, 1, 200, 200, 210 },
|
||||
{ 1, 1, 160, 160, 170 }, { 1, 1, 200, 200, 210 },
|
||||
#endif // CONFIG_TX64X64
|
||||
#else
|
||||
#if CONFIG_TX64X64
|
||||
{ 1, 160, 160, 170, 180 },
|
||||
{ 1, 200, 200, 210, 220 },
|
||||
{ 1, 160, 160, 170, 180 }, { 1, 200, 200, 210, 220 },
|
||||
#else
|
||||
{ 1, 160, 160, 170 },
|
||||
{ 1, 200, 200, 210 },
|
||||
{ 1, 160, 160, 170 }, { 1, 200, 200, 210 },
|
||||
#endif // CONFIG_CB4X4
|
||||
#endif // CONFIG_TX64X64
|
||||
};
|
||||
|
|
|
@ -383,14 +383,10 @@ extern const aom_prob av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES]
|
|||
[PALETTE_SIZES - 1];
|
||||
extern const aom_prob av1_default_palette_uv_size_prob[PALETTE_BLOCK_SIZES]
|
||||
[PALETTE_SIZES - 1];
|
||||
extern const aom_prob
|
||||
av1_default_palette_y_color_index_prob[PALETTE_MAX_SIZE - 1]
|
||||
[PALETTE_COLOR_INDEX_CONTEXTS]
|
||||
[PALETTE_COLORS - 1];
|
||||
extern const aom_prob
|
||||
av1_default_palette_uv_color_index_prob[PALETTE_MAX_SIZE - 1]
|
||||
[PALETTE_COLOR_INDEX_CONTEXTS]
|
||||
[PALETTE_COLORS - 1];
|
||||
extern const aom_prob av1_default_palette_y_color_index_prob
|
||||
[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1];
|
||||
extern const aom_prob av1_default_palette_uv_color_index_prob
|
||||
[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1];
|
||||
#endif // CONFIG_PALETTE
|
||||
|
||||
extern const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
|
||||
|
|
|
@ -143,9 +143,9 @@ DECLARE_ALIGNED(16, static const int16_t,
|
|||
#endif
|
||||
#if CONFIG_AOM_HIGHBITDEPTH
|
||||
#if USE_TEMPORALFILTER_12TAP
|
||||
DECLARE_ALIGNED(16, static const int16_t,
|
||||
sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6]
|
||||
[8]) = {
|
||||
DECLARE_ALIGNED(
|
||||
16, static const int16_t,
|
||||
sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6][8]) = {
|
||||
{
|
||||
{ 0, 1, 0, 1, 0, 1, 0, 1 },
|
||||
{ -1, 3, -1, 3, -1, 3, -1, 3 },
|
||||
|
|
|
@ -650,8 +650,8 @@ static void read_filter_intra_mode_info(AV1_COMMON *const cm,
|
|||
read_uniform(r, FILTER_INTRA_MODES);
|
||||
}
|
||||
if (counts) {
|
||||
++counts->filter_intra[0]
|
||||
[filter_intra_mode_info->use_filter_intra_mode[0]];
|
||||
++counts
|
||||
->filter_intra[0][filter_intra_mode_info->use_filter_intra_mode[0]];
|
||||
}
|
||||
}
|
||||
if (mbmi->uv_mode == DC_PRED
|
||||
|
@ -666,8 +666,8 @@ static void read_filter_intra_mode_info(AV1_COMMON *const cm,
|
|||
read_uniform(r, FILTER_INTRA_MODES);
|
||||
}
|
||||
if (counts) {
|
||||
++counts->filter_intra[1]
|
||||
[filter_intra_mode_info->use_filter_intra_mode[1]];
|
||||
++counts
|
||||
->filter_intra[1][filter_intra_mode_info->use_filter_intra_mode[1]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1970,8 +1970,8 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
|
|||
mbmi->interinter_compound_data.type = COMPOUND_AVERAGE;
|
||||
}
|
||||
if (xd->counts)
|
||||
xd->counts->compound_interinter[bsize]
|
||||
[mbmi->interinter_compound_data.type]++;
|
||||
xd->counts
|
||||
->compound_interinter[bsize][mbmi->interinter_compound_data.type]++;
|
||||
}
|
||||
#endif // CONFIG_EXT_INTER
|
||||
|
||||
|
|
|
@ -448,8 +448,8 @@ void av1_decode_palette_tokens(MACROBLOCKD *const xd, int plane,
|
|||
const int n = mbmi->palette_mode_info.palette_size[plane];
|
||||
int i, j;
|
||||
uint8_t *const color_map = xd->plane[plane].color_index_map;
|
||||
const aom_prob(*const prob)[PALETTE_COLOR_INDEX_CONTEXTS]
|
||||
[PALETTE_COLORS - 1] =
|
||||
const aom_prob(
|
||||
*const prob)[PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] =
|
||||
plane ? av1_default_palette_uv_color_index_prob
|
||||
: av1_default_palette_y_color_index_prob;
|
||||
int plane_block_width, plane_block_height, rows, cols;
|
||||
|
|
|
@ -43,10 +43,12 @@ typedef void (*AV1_QUANT_FACADE)(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
|||
|
||||
typedef struct {
|
||||
#if CONFIG_NEW_QUANT
|
||||
DECLARE_ALIGNED(16, tran_low_t, y_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE]
|
||||
[COEF_BANDS][NUQ_KNOTS]);
|
||||
DECLARE_ALIGNED(16, tran_low_t, uv_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE]
|
||||
[COEF_BANDS][NUQ_KNOTS]);
|
||||
DECLARE_ALIGNED(
|
||||
16, tran_low_t,
|
||||
y_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE][COEF_BANDS][NUQ_KNOTS]);
|
||||
DECLARE_ALIGNED(
|
||||
16, tran_low_t,
|
||||
uv_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE][COEF_BANDS][NUQ_KNOTS]);
|
||||
#endif // CONFIG_NEW_QUANT
|
||||
// 0: dc 1: ac 2-8: ac repeated to SIMD width
|
||||
DECLARE_ALIGNED(16, int16_t, y_quant[QINDEX_RANGE][8]);
|
||||
|
|
|
@ -1232,8 +1232,9 @@ static void write_palette_mode_info(const AV1_COMMON *cm, const MACROBLOCKD *xd,
|
|||
if (left_mi)
|
||||
palette_y_mode_ctx +=
|
||||
(left_mi->mbmi.palette_mode_info.palette_size[0] > 0);
|
||||
aom_write(w, n > 0, av1_default_palette_y_mode_prob[bsize - BLOCK_8X8]
|
||||
[palette_y_mode_ctx]);
|
||||
aom_write(
|
||||
w, n > 0,
|
||||
av1_default_palette_y_mode_prob[bsize - BLOCK_8X8][palette_y_mode_ctx]);
|
||||
if (n > 0) {
|
||||
av1_write_token(w, av1_palette_size_tree,
|
||||
av1_default_palette_y_size_prob[bsize - BLOCK_8X8],
|
||||
|
@ -2987,11 +2988,10 @@ static void update_coef_probs_common(aom_writer *const bc, AV1_COMP *cpi,
|
|||
#endif
|
||||
#if CONFIG_ENTROPY
|
||||
// Calculate the token counts between subsequent subframe updates.
|
||||
static void get_coef_counts_diff(AV1_COMP *cpi, int index,
|
||||
av1_coeff_count coef_counts[TX_SIZES]
|
||||
[PLANE_TYPES],
|
||||
unsigned int eob_counts[TX_SIZES][PLANE_TYPES]
|
||||
[REF_TYPES][COEF_BANDS]
|
||||
static void get_coef_counts_diff(
|
||||
AV1_COMP *cpi, int index,
|
||||
av1_coeff_count coef_counts[TX_SIZES][PLANE_TYPES],
|
||||
unsigned int eob_counts[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS]
|
||||
[COEFF_CONTEXTS]) {
|
||||
int i, j, k, l, m, tx_size, val;
|
||||
const int max_idx = cpi->common.coef_probs_update_idx;
|
||||
|
@ -3011,8 +3011,8 @@ static void get_coef_counts_diff(AV1_COMP *cpi, int index,
|
|||
cpi->common.counts.eob_branch[tx_size][i][j][k][l] -
|
||||
subframe_stats->eob_counts_buf[max_idx][tx_size][i][j][k][l];
|
||||
} else {
|
||||
val = subframe_stats->eob_counts_buf[index + 1][tx_size][i][j][k]
|
||||
[l] -
|
||||
val = subframe_stats
|
||||
->eob_counts_buf[index + 1][tx_size][i][j][k][l] -
|
||||
subframe_stats->eob_counts_buf[index][tx_size][i][j][k][l];
|
||||
}
|
||||
assert(val >= 0);
|
||||
|
@ -3021,13 +3021,13 @@ static void get_coef_counts_diff(AV1_COMP *cpi, int index,
|
|||
for (m = 0; m < ENTROPY_TOKENS; ++m) {
|
||||
if (index == max_idx) {
|
||||
val = cpi->td.rd_counts.coef_counts[tx_size][i][j][k][l][m] -
|
||||
subframe_stats->coef_counts_buf[max_idx][tx_size][i][j][k]
|
||||
[l][m];
|
||||
subframe_stats
|
||||
->coef_counts_buf[max_idx][tx_size][i][j][k][l][m];
|
||||
} else {
|
||||
val = subframe_stats->coef_counts_buf[index + 1][tx_size][i][j]
|
||||
[k][l][m] -
|
||||
subframe_stats->coef_counts_buf[index][tx_size][i][j][k]
|
||||
[l][m];
|
||||
val = subframe_stats
|
||||
->coef_counts_buf[index + 1][tx_size][i][j][k][l][m] -
|
||||
subframe_stats
|
||||
->coef_counts_buf[index][tx_size][i][j][k][l][m];
|
||||
}
|
||||
assert(val >= 0);
|
||||
coef_counts[tx_size][i][j][k][l][m] = val;
|
||||
|
|
|
@ -2083,8 +2083,8 @@ static void update_stats(const AV1_COMMON *const cm, ThreadData *td, int mi_row,
|
|||
[ref0 != BWDREF_FRAME]++;
|
||||
} else {
|
||||
const int bit1 = !(ref0 == LAST2_FRAME || ref0 == LAST_FRAME);
|
||||
counts->single_ref[av1_get_pred_context_single_ref_p3(xd)][2]
|
||||
[bit1]++;
|
||||
counts
|
||||
->single_ref[av1_get_pred_context_single_ref_p3(xd)][2][bit1]++;
|
||||
if (!bit1) {
|
||||
counts->single_ref[av1_get_pred_context_single_ref_p4(xd)][3]
|
||||
[ref0 != LAST_FRAME]++;
|
||||
|
@ -2491,8 +2491,8 @@ static void encode_sb(const AV1_COMP *const cpi, ThreadData *td,
|
|||
!xd->mi[0]->mbmi.skip) {
|
||||
int eset = get_ext_tx_set(supertx_size, bsize, 1);
|
||||
if (eset > 0) {
|
||||
++td->counts->inter_ext_tx[eset][supertx_size]
|
||||
[xd->mi[0]->mbmi.tx_type];
|
||||
++td->counts
|
||||
->inter_ext_tx[eset][supertx_size][xd->mi[0]->mbmi.tx_type];
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -3992,10 +3992,9 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
|
|||
|
||||
pc_tree->partitioning = PARTITION_SPLIT;
|
||||
|
||||
sum_rdc.rate +=
|
||||
av1_cost_bit(cm->fc->supertx_prob
|
||||
[partition_supertx_context_lookup[PARTITION_SPLIT]]
|
||||
[supertx_size],
|
||||
sum_rdc.rate += av1_cost_bit(
|
||||
cm->fc->supertx_prob[partition_supertx_context_lookup
|
||||
[PARTITION_SPLIT]][supertx_size],
|
||||
0);
|
||||
sum_rdc.rdcost =
|
||||
RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist);
|
||||
|
@ -4010,9 +4009,8 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
|
|||
&tmp_rdc.rate, &tmp_rdc.dist, &best_tx, pc_tree);
|
||||
|
||||
tmp_rdc.rate += av1_cost_bit(
|
||||
cm->fc->supertx_prob
|
||||
[partition_supertx_context_lookup[PARTITION_SPLIT]]
|
||||
[supertx_size],
|
||||
cm->fc->supertx_prob[partition_supertx_context_lookup
|
||||
[PARTITION_SPLIT]][supertx_size],
|
||||
1);
|
||||
tmp_rdc.rdcost =
|
||||
RDCOST(x->rdmult, x->rddiv, tmp_rdc.rate, tmp_rdc.dist);
|
||||
|
@ -4076,10 +4074,9 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
|
|||
|
||||
pc_tree->partitioning = PARTITION_SPLIT;
|
||||
|
||||
sum_rdc.rate +=
|
||||
av1_cost_bit(cm->fc->supertx_prob
|
||||
[partition_supertx_context_lookup[PARTITION_SPLIT]]
|
||||
[supertx_size],
|
||||
sum_rdc.rate += av1_cost_bit(
|
||||
cm->fc->supertx_prob[partition_supertx_context_lookup
|
||||
[PARTITION_SPLIT]][supertx_size],
|
||||
0);
|
||||
sum_rdc.rdcost =
|
||||
RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist);
|
||||
|
@ -4094,9 +4091,8 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
|
|||
&tmp_rdc.rate, &tmp_rdc.dist, &best_tx, pc_tree);
|
||||
|
||||
tmp_rdc.rate += av1_cost_bit(
|
||||
cm->fc->supertx_prob
|
||||
[partition_supertx_context_lookup[PARTITION_SPLIT]]
|
||||
[supertx_size],
|
||||
cm->fc->supertx_prob[partition_supertx_context_lookup
|
||||
[PARTITION_SPLIT]][supertx_size],
|
||||
1);
|
||||
tmp_rdc.rdcost =
|
||||
RDCOST(x->rdmult, x->rddiv, tmp_rdc.rate, tmp_rdc.dist);
|
||||
|
@ -5806,8 +5802,8 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td,
|
|||
int eset = get_ext_tx_set(tx_size, bsize, is_inter);
|
||||
if (eset > 0) {
|
||||
if (is_inter) {
|
||||
++td->counts->inter_ext_tx[eset][txsize_sqr_map[tx_size]]
|
||||
[mbmi->tx_type];
|
||||
++td->counts
|
||||
->inter_ext_tx[eset][txsize_sqr_map[tx_size]][mbmi->tx_type];
|
||||
} else {
|
||||
++td->counts->intra_ext_tx[eset][txsize_sqr_map[tx_size]][mbmi->mode]
|
||||
[mbmi->tx_type];
|
||||
|
@ -5820,8 +5816,8 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td,
|
|||
if (is_inter) {
|
||||
++td->counts->inter_ext_tx[tx_size][mbmi->tx_type];
|
||||
} else {
|
||||
++td->counts->intra_ext_tx[tx_size]
|
||||
[intra_mode_to_tx_type_context[mbmi->mode]]
|
||||
++td->counts
|
||||
->intra_ext_tx[tx_size][intra_mode_to_tx_type_context[mbmi->mode]]
|
||||
[mbmi->tx_type];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1153,10 +1153,10 @@ PVQ_SKIP_TYPE av1_pvq_encode_helper(
|
|||
assert(OD_COEFF_SHIFT >= 3);
|
||||
// DC quantizer for PVQ
|
||||
if (use_activity_masking)
|
||||
pvq_dc_quant = OD_MAXI(
|
||||
1, (quant[0] << (OD_COEFF_SHIFT - 3)) *
|
||||
daala_enc->state.pvq_qm_q4[plane]
|
||||
[od_qm_get_index(tx_size, 0)] >>
|
||||
pvq_dc_quant =
|
||||
OD_MAXI(1, (quant[0] << (OD_COEFF_SHIFT - 3)) *
|
||||
daala_enc->state
|
||||
.pvq_qm_q4[plane][od_qm_get_index(tx_size, 0)] >>
|
||||
4);
|
||||
else
|
||||
pvq_dc_quant = OD_MAXI(1, quant[0] << (OD_COEFF_SHIFT - 3));
|
||||
|
|
|
@ -1594,8 +1594,9 @@ static int64_t calculate_total_gf_group_bits(AV1_COMP *cpi,
|
|||
}
|
||||
|
||||
// Clamp odd edge cases.
|
||||
total_group_bits =
|
||||
(total_group_bits < 0) ? 0 : (total_group_bits > twopass->kf_group_bits)
|
||||
total_group_bits = (total_group_bits < 0)
|
||||
? 0
|
||||
: (total_group_bits > twopass->kf_group_bits)
|
||||
? twopass->kf_group_bits
|
||||
: total_group_bits;
|
||||
|
||||
|
|
|
@ -944,13 +944,12 @@ static INLINE void calc_int_sad_list(const MACROBLOCK *x,
|
|||
// candidates as indicated in the num_candidates and candidates arrays
|
||||
// passed into this function
|
||||
//
|
||||
static int pattern_search(MACROBLOCK *x, MV *start_mv, int search_param,
|
||||
int sad_per_bit, int do_init_search, int *cost_list,
|
||||
const aom_variance_fn_ptr_t *vfp, int use_mvcost,
|
||||
const MV *center_mv,
|
||||
static int pattern_search(
|
||||
MACROBLOCK *x, MV *start_mv, int search_param, int sad_per_bit,
|
||||
int do_init_search, int *cost_list, const aom_variance_fn_ptr_t *vfp,
|
||||
int use_mvcost, const MV *center_mv,
|
||||
const int num_candidates[MAX_PATTERN_SCALES],
|
||||
const MV candidates[MAX_PATTERN_SCALES]
|
||||
[MAX_PATTERN_CANDIDATES]) {
|
||||
const MV candidates[MAX_PATTERN_SCALES][MAX_PATTERN_CANDIDATES]) {
|
||||
const MACROBLOCKD *const xd = &x->e_mbd;
|
||||
static const int search_param_to_steps[MAX_MVSEARCH_STEPS] = {
|
||||
10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,
|
||||
|
|
|
@ -4844,8 +4844,8 @@ static int cost_mv_ref(const AV1_COMP *const cpi, PREDICTION_MODE mode,
|
|||
|
||||
#if CONFIG_EXT_INTER
|
||||
if (is_compound) {
|
||||
return cpi->inter_compound_mode_cost[mode_context]
|
||||
[INTER_COMPOUND_OFFSET(mode)];
|
||||
return cpi
|
||||
->inter_compound_mode_cost[mode_context][INTER_COMPOUND_OFFSET(mode)];
|
||||
} else {
|
||||
if (mode == NEWMV || mode == NEWFROMNEARMV) {
|
||||
#else
|
||||
|
@ -4885,8 +4885,8 @@ static int cost_mv_ref(const AV1_COMP *const cpi, PREDICTION_MODE mode,
|
|||
assert(is_inter_mode(mode));
|
||||
#if CONFIG_EXT_INTER
|
||||
if (is_inter_compound_mode(mode)) {
|
||||
return cpi->inter_compound_mode_cost[mode_context]
|
||||
[INTER_COMPOUND_OFFSET(mode)];
|
||||
return cpi
|
||||
->inter_compound_mode_cost[mode_context][INTER_COMPOUND_OFFSET(mode)];
|
||||
} else {
|
||||
#endif // CONFIG_EXT_INTER
|
||||
return cpi->inter_mode_cost[mode_context][INTER_OFFSET(mode)];
|
||||
|
@ -4929,17 +4929,15 @@ static int GLOBAL_MOTION_RATE(const AV1_COMP *const cpi, int ref) {
|
|||
}
|
||||
#endif // CONFIG_GLOBAL_MOTION
|
||||
|
||||
static int set_and_cost_bmi_mvs(const AV1_COMP *const cpi, MACROBLOCK *x,
|
||||
MACROBLOCKD *xd, int i, PREDICTION_MODE mode,
|
||||
int_mv this_mv[2],
|
||||
int_mv frame_mv[MB_MODE_COUNT]
|
||||
[TOTAL_REFS_PER_FRAME],
|
||||
static int set_and_cost_bmi_mvs(
|
||||
const AV1_COMP *const cpi, MACROBLOCK *x, MACROBLOCKD *xd, int i,
|
||||
PREDICTION_MODE mode, int_mv this_mv[2],
|
||||
int_mv frame_mv[MB_MODE_COUNT][TOTAL_REFS_PER_FRAME],
|
||||
int_mv seg_mvs[TOTAL_REFS_PER_FRAME],
|
||||
#if CONFIG_EXT_INTER
|
||||
int_mv compound_seg_newmvs[2],
|
||||
#endif // CONFIG_EXT_INTER
|
||||
int_mv *best_ref_mv[2], const int *mvjcost,
|
||||
int *mvcost[2]) {
|
||||
int_mv *best_ref_mv[2], const int *mvjcost, int *mvcost[2]) {
|
||||
MODE_INFO *const mic = xd->mi[0];
|
||||
const MB_MODE_INFO *const mbmi = &mic->mbmi;
|
||||
const MB_MODE_INFO_EXT *const mbmi_ext = x->mbmi_ext;
|
||||
|
@ -6739,13 +6737,12 @@ static void store_coding_context(MACROBLOCK *x, PICK_MODE_CONTEXT *ctx,
|
|||
ctx->hybrid_pred_diff = (int)comp_pred_diff[REFERENCE_MODE_SELECT];
|
||||
}
|
||||
|
||||
static void setup_buffer_inter(const AV1_COMP *const cpi, MACROBLOCK *x,
|
||||
MV_REFERENCE_FRAME ref_frame,
|
||||
static void setup_buffer_inter(
|
||||
const AV1_COMP *const cpi, MACROBLOCK *x, MV_REFERENCE_FRAME ref_frame,
|
||||
BLOCK_SIZE block_size, int mi_row, int mi_col,
|
||||
int_mv frame_nearest_mv[TOTAL_REFS_PER_FRAME],
|
||||
int_mv frame_near_mv[TOTAL_REFS_PER_FRAME],
|
||||
struct buf_2d yv12_mb[TOTAL_REFS_PER_FRAME]
|
||||
[MAX_MB_PLANE]) {
|
||||
struct buf_2d yv12_mb[TOTAL_REFS_PER_FRAME][MAX_MB_PLANE]) {
|
||||
const AV1_COMMON *cm = &cpi->common;
|
||||
const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame);
|
||||
MACROBLOCKD *const xd = &x->e_mbd;
|
||||
|
@ -10282,8 +10279,9 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
|
|||
clamp_mv2(&cur_mv.as_mv, xd);
|
||||
|
||||
if (!mv_check_bounds(x, &cur_mv.as_mv)) {
|
||||
int dummy_single_skippable[MB_MODE_COUNT]
|
||||
[TOTAL_REFS_PER_FRAME] = { { 0 } };
|
||||
int dummy_single_skippable[MB_MODE_COUNT][TOTAL_REFS_PER_FRAME] = {
|
||||
{ 0 }
|
||||
};
|
||||
#if CONFIG_EXT_INTER
|
||||
int_mv dummy_single_newmvs[2][TOTAL_REFS_PER_FRAME] = { { { 0 } },
|
||||
{ { 0 } } };
|
||||
|
|
|
@ -182,10 +182,10 @@ static void set_good_speed_feature(AV1_COMP *cpi, AV1_COMMON *cm,
|
|||
sf->tx_size_search_method =
|
||||
frame_is_boosted(cpi) ? USE_FULL_RD : USE_LARGESTALL;
|
||||
sf->mode_search_skip_flags =
|
||||
(cm->frame_type == KEY_FRAME) ? 0 : FLAG_SKIP_INTRA_DIRMISMATCH |
|
||||
FLAG_SKIP_INTRA_BESTINTER |
|
||||
FLAG_SKIP_COMP_BESTINTRA |
|
||||
FLAG_SKIP_INTRA_LOWVAR;
|
||||
(cm->frame_type == KEY_FRAME)
|
||||
? 0
|
||||
: FLAG_SKIP_INTRA_DIRMISMATCH | FLAG_SKIP_INTRA_BESTINTER |
|
||||
FLAG_SKIP_COMP_BESTINTRA | FLAG_SKIP_INTRA_LOWVAR;
|
||||
sf->disable_filter_search_var_thresh = 100;
|
||||
sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
|
||||
sf->auto_min_max_partition_size = RELAXED_NEIGHBORING_MIN_MAX;
|
||||
|
@ -322,10 +322,10 @@ static void set_rt_speed_feature(AV1_COMP *cpi, SPEED_FEATURES *sf, int speed,
|
|||
|
||||
if (speed >= 2) {
|
||||
sf->mode_search_skip_flags =
|
||||
(cm->frame_type == KEY_FRAME) ? 0 : FLAG_SKIP_INTRA_DIRMISMATCH |
|
||||
FLAG_SKIP_INTRA_BESTINTER |
|
||||
FLAG_SKIP_COMP_BESTINTRA |
|
||||
FLAG_SKIP_INTRA_LOWVAR;
|
||||
(cm->frame_type == KEY_FRAME)
|
||||
? 0
|
||||
: FLAG_SKIP_INTRA_DIRMISMATCH | FLAG_SKIP_INTRA_BESTINTER |
|
||||
FLAG_SKIP_COMP_BESTINTRA | FLAG_SKIP_INTRA_LOWVAR;
|
||||
sf->adaptive_pred_interp_filter = 2;
|
||||
sf->disable_filter_search_var_thresh = 50;
|
||||
sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
|
||||
|
|
|
@ -216,10 +216,9 @@ int av1_prob_update_search_subframe(unsigned int ct[][2], aom_prob oldp,
|
|||
return bestsavings;
|
||||
}
|
||||
|
||||
int av1_prob_update_search_model_subframe(unsigned int ct[ENTROPY_NODES]
|
||||
[COEF_PROBS_BUFS][2],
|
||||
const aom_prob *oldp, aom_prob *bestp,
|
||||
aom_prob upd, int stepsize, int n) {
|
||||
int av1_prob_update_search_model_subframe(
|
||||
unsigned int ct[ENTROPY_NODES][COEF_PROBS_BUFS][2], const aom_prob *oldp,
|
||||
aom_prob *bestp, aom_prob upd, int stepsize, int n) {
|
||||
int i, old_b, new_b, update_b, savings, bestsavings;
|
||||
int newp;
|
||||
const int step_sign = *bestp > oldp[PIVOT_NODE] ? -1 : 1;
|
||||
|
|
|
@ -38,10 +38,9 @@ int av1_cond_prob_diff_update_savings(aom_prob *oldp, const unsigned int ct[2],
|
|||
#if CONFIG_ENTROPY
|
||||
int av1_prob_update_search_subframe(unsigned int ct[][2], aom_prob oldp,
|
||||
aom_prob *bestp, aom_prob upd, int n);
|
||||
int av1_prob_update_search_model_subframe(unsigned int ct[ENTROPY_NODES]
|
||||
[COEF_PROBS_BUFS][2],
|
||||
const aom_prob *oldp, aom_prob *bestp,
|
||||
aom_prob upd, int stepsize, int n);
|
||||
int av1_prob_update_search_model_subframe(
|
||||
unsigned int ct[ENTROPY_NODES][COEF_PROBS_BUFS][2], const aom_prob *oldp,
|
||||
aom_prob *bestp, aom_prob upd, int stepsize, int n);
|
||||
#endif // CONFIG_ENTROPY
|
||||
|
||||
//
|
||||
|
|
|
@ -412,10 +412,9 @@ void av1_tokenize_palette_sb(const AV1_COMP *cpi,
|
|||
int i, j;
|
||||
int this_rate = 0;
|
||||
uint8_t color_order[PALETTE_MAX_SIZE];
|
||||
const aom_prob(*const probs)[PALETTE_COLOR_INDEX_CONTEXTS]
|
||||
[PALETTE_COLORS - 1] =
|
||||
plane == 0
|
||||
? av1_default_palette_y_color_index_prob
|
||||
const aom_prob(
|
||||
*const probs)[PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] =
|
||||
plane == 0 ? av1_default_palette_y_color_index_prob
|
||||
: av1_default_palette_uv_color_index_prob;
|
||||
int plane_block_width, rows, cols;
|
||||
av1_get_block_dimensions(bsize, plane, xd, &plane_block_width, NULL, &rows,
|
||||
|
|
6
y4menc.c
6
y4menc.c
|
@ -20,9 +20,9 @@ int y4m_write_file_header(char *buf, size_t len, int width, int height,
|
|||
case 8:
|
||||
color = fmt == AOM_IMG_FMT_444A
|
||||
? "C444alpha\n"
|
||||
: fmt == AOM_IMG_FMT_I444 ? "C444\n" : fmt == AOM_IMG_FMT_I422
|
||||
? "C422\n"
|
||||
: "C420jpeg\n";
|
||||
: fmt == AOM_IMG_FMT_I444
|
||||
? "C444\n"
|
||||
: fmt == AOM_IMG_FMT_I422 ? "C422\n" : "C420jpeg\n";
|
||||
break;
|
||||
case 9:
|
||||
color = fmt == AOM_IMG_FMT_I44416
|
||||
|
|
Загрузка…
Ссылка в новой задаче