Commit 55ce9e0f authored by clang-format's avatar clang-format Committed by James Zern

apply clang-format

Change-Id: Ib1b5dde5d4c6479c968cd7d7a4a1d01abae1fcf6
parent c107183d
......@@ -611,33 +611,33 @@ 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 },
{ 0, 0, 0, 1, 0 },
{ 1, 1, 1, 1, 1 }, // unused
{ 0, 1, 1, 0, 0 },
{ 0, 0, 0, 1, 0 },
#else
{ 1, 1, 1, 1 }, // unused
{ 1, 1, 0, 0 },
{ 0, 0, 1, 0 },
{ 1, 1, 1, 1 }, // unused
{ 1, 1, 0, 0 },
{ 0, 0, 1, 0 },
#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 },
{ 0, 0, 0, 1, 0 },
{ 0, 0, 0, 0, 1 },
{ 1, 1, 1, 1, 1 }, // unused
{ 0, 1, 1, 0, 0 },
{ 0, 0, 0, 1, 0 },
{ 0, 0, 0, 0, 1 },
#else
{ 1, 1, 1, 1 }, // unused
{ 1, 1, 0, 0 },
{ 0, 0, 1, 0 },
{ 0, 0, 0, 1 },
{ 1, 1, 1, 1 }, // unused
{ 1, 1, 0, 0 },
{ 0, 0, 1, 0 },
{ 0, 0, 0, 1 },
#endif // CONFIG_CB4X4
};
};
// Transform types used in each intra set
static const int ext_tx_used_intra[EXT_TX_SETS_INTRA][TX_TYPES] = {
......
......@@ -4674,9 +4674,9 @@ 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)) +
(1 << (CDF_PROB_BITS - 9));
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,20 +528,17 @@ 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 },
{ 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 },
{ 255 }, { 255 }, { 255 },
#endif // CONFIG_EXT_PARTITION
};
};
#endif // CONFIG_COMPOUND_SEGMENT
static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
......@@ -572,20 +569,17 @@ 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 },
{ 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 },
{ 252 }, { 252 }, { 252 },
#endif // CONFIG_EXT_PARTITION
};
};
#elif !CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
......@@ -593,20 +587,17 @@ 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 },
{ 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 },
{ 252 }, { 252 }, { 252 },
#endif // CONFIG_EXT_PARTITION
};
};
#elif CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
......@@ -823,19 +814,16 @@ 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 },
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 },
{ 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
#endif // CONFIG_EXT_PARTITION
};
};
const aom_prob av1_default_palette_uv_mode_prob[PALETTE_UV_MODE_CONTEXTS] = {
253, 229
......@@ -1191,20 +1179,16 @@ 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 },
{ 34, 16, 128 }, { 149, 160, 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
static const aom_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS - 1] = {
......@@ -1524,14 +1508,11 @@ 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,
-INTRA_FILTER_8TAP_SMOOTH,
......@@ -1544,26 +1525,22 @@ 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
};
};
#endif // CONFIG_SUPERTX
// FIXME(someone) need real defaults here
......
......@@ -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,10 +448,10 @@ 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] =
plane ? av1_default_palette_uv_color_index_prob
: av1_default_palette_y_color_index_prob;
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;
av1_get_block_dimensions(mbmi->sb_type, plane, xd, &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,12 +2988,11 @@ 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]
[COEFF_CONTEXTS]) {
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;
const TX_MODE tx_mode = cpi->common.tx_mode;
......@@ -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,11 +3992,10 @@ 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],
0);
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,11 +4074,10 @@ 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],
0);
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,9 +5816,9 @@ 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]]
[mbmi->tx_type];
++td->counts
->intra_ext_tx[tx_size][intra_mode_to_tx_type_context[mbmi->mode]]
[mbmi->tx_type];
}
}
#endif // CONFIG_EXT_TX
......
......@@ -1153,11 +1153,11 @@ 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)] >>
4);
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,10 +1594,11 @@ 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)
? twopass->kf_group_bits
: total_group_bits;
total_group_bits = (total_group_bits < 0)
? 0
: (total_group_bits > twopass->kf_group_bits)
? twopass->kf_group_bits
: total_group_bits;
// Clip based on user supplied data rate variability limit.
if (total_group_bits > (int64_t)max_bits * rc->baseline_gf_interval)
......
......@@ -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,
const int num_candidates[MAX_PATTERN_SCALES],
const MV candidates[MAX_PATTERN_SCALES]
[MAX_PATTERN_CANDIDATES]) {
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 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)];