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) { ...@@ -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); return (tx_size == TX_16X16 ? 2 : 1);
} }
static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA] static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA][EXT_TX_SIZES] =
[EXT_TX_SIZES] = { {
#if CONFIG_CB4X4 #if CONFIG_CB4X4
{ 1, 1, 1, 1, 1 }, // unused { 1, 1, 1, 1, 1 }, // unused
{ 0, 1, 1, 0, 0 }, { 0, 1, 1, 0, 0 },
{ 0, 0, 0, 1, 0 }, { 0, 0, 0, 1, 0 },
#else #else
{ 1, 1, 1, 1 }, // unused { 1, 1, 1, 1 }, // unused
{ 1, 1, 0, 0 }, { 1, 1, 0, 0 },
{ 0, 0, 1, 0 }, { 0, 0, 1, 0 },
#endif // CONFIG_CB4X4 #endif // CONFIG_CB4X4
}; };
static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER] static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER][EXT_TX_SIZES] =
[EXT_TX_SIZES] = { {
#if CONFIG_CB4X4 #if CONFIG_CB4X4
{ 1, 1, 1, 1, 1 }, // unused { 1, 1, 1, 1, 1 }, // unused
{ 0, 1, 1, 0, 0 }, { 0, 1, 1, 0, 0 },
{ 0, 0, 0, 1, 0 }, { 0, 0, 0, 1, 0 },
{ 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 1 },
#else #else
{ 1, 1, 1, 1 }, // unused { 1, 1, 1, 1 }, // unused
{ 1, 1, 0, 0 }, { 1, 1, 0, 0 },
{ 0, 0, 1, 0 }, { 0, 0, 1, 0 },
{ 0, 0, 0, 1 }, { 0, 0, 0, 1 },
#endif // CONFIG_CB4X4 #endif // CONFIG_CB4X4
}; };
// Transform types used in each intra set // Transform types used in each intra set
static const int ext_tx_used_intra[EXT_TX_SETS_INTRA][TX_TYPES] = { 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, ...@@ -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 3=ONE_TOKEN_NEOB, 4=TWO_TOKEN_PLUS_EOB, 5=TWO_TOKEN_PLUS_NEOB
*/ */
// Block zero probability // Block zero probability
phead[0] = phead[0] = blockz_model == NULL ? 0
blockz_model == NULL ? 0 : ((*blockz_model) << (CDF_PROB_BITS - 8)) + : ((*blockz_model) << (CDF_PROB_BITS - 8)) +
(1 << (CDF_PROB_BITS - 9)); (1 << (CDF_PROB_BITS - 9));
phead[0] = AOMMIN(CDF_PROB_TOP - 6, AOMMAX(1, phead[0])); phead[0] = AOMMIN(CDF_PROB_TOP - 6, AOMMAX(1, phead[0]));
cdf_head[0] = phead[0]; cdf_head[0] = phead[0];
...@@ -4814,8 +4814,8 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size, ...@@ -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 *const counts =
(const av1_coeff_count_model *)cm->counts.coef[tx_size]; (const av1_coeff_count_model *)cm->counts.coef[tx_size];
const unsigned int(*eob_counts)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] = const unsigned int(*eob_counts)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] =
(const unsigned int(*)[REF_TYPES][COEF_BANDS] (const unsigned int(*)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS])
[COEFF_CONTEXTS])cm->counts.eob_branch[tx_size]; cm->counts.eob_branch[tx_size];
#if CONFIG_NEW_TOKENSET #if CONFIG_NEW_TOKENSET
const av1_blockz_probs_model *const pre_blockz_probs = const av1_blockz_probs_model *const pre_blockz_probs =
pre_fc->blockzero_probs[tx_size]; pre_fc->blockzero_probs[tx_size];
......
...@@ -528,20 +528,17 @@ static const aom_prob ...@@ -528,20 +528,17 @@ static const aom_prob
#endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION
}; };
#else // !CONFIG_COMPOUND_SEGMENT #else // !CONFIG_COMPOUND_SEGMENT
static const aom_prob default_compound_type_probs[BLOCK_SIZES] static const aom_prob
[COMPOUND_TYPES - 1] = { default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
#if CONFIG_CB4X4 #if CONFIG_CB4X4
{ 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 },
#endif #endif
{ 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 216 },
{ 208 }, { 208 }, { 208 }, { 216 }, { 216 }, { 224 }, { 224 }, { 240 }, { 240 },
{ 216 }, { 216 }, { 216 },
{ 224 }, { 224 }, { 240 },
{ 240 },
#if CONFIG_EXT_PARTITION #if CONFIG_EXT_PARTITION
{ 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 255 },
#endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION
}; };
#endif // CONFIG_COMPOUND_SEGMENT #endif // CONFIG_COMPOUND_SEGMENT
static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = { static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
...@@ -572,20 +569,17 @@ static const aom_prob default_wedge_interintra_prob[BLOCK_SIZES] = { ...@@ -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)] = { const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
-SIMPLE_TRANSLATION, -OBMC_CAUSAL -SIMPLE_TRANSLATION, -OBMC_CAUSAL
}; };
static const aom_prob default_motion_mode_prob[BLOCK_SIZES] static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
[MOTION_MODES - 1] = { {
#if CONFIG_CB4X4 #if CONFIG_CB4X4
{ 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 255 },
#endif #endif
{ 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
{ 151 }, { 153 }, { 144 }, { 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
{ 178 }, { 165 }, { 160 },
{ 207 }, { 195 }, { 168 },
{ 244 },
#if CONFIG_EXT_PARTITION #if CONFIG_EXT_PARTITION
{ 252 }, { 252 }, { 252 }, { 252 }, { 252 }, { 252 },
#endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION
}; };
#elif !CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION #elif !CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
...@@ -593,20 +587,17 @@ const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = { ...@@ -593,20 +587,17 @@ const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
-SIMPLE_TRANSLATION, -WARPED_CAUSAL -SIMPLE_TRANSLATION, -WARPED_CAUSAL
}; };
static const aom_prob default_motion_mode_prob[BLOCK_SIZES] static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
[MOTION_MODES - 1] = { {
#if CONFIG_CB4X4 #if CONFIG_CB4X4
{ 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 255 },
#endif #endif
{ 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
{ 151 }, { 153 }, { 144 }, { 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
{ 178 }, { 165 }, { 160 },
{ 207 }, { 195 }, { 168 },
{ 244 },
#if CONFIG_EXT_PARTITION #if CONFIG_EXT_PARTITION
{ 252 }, { 252 }, { 252 }, { 252 }, { 252 }, { 252 },
#endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION
}; };
#elif CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION #elif CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
...@@ -823,19 +814,16 @@ const aom_prob ...@@ -823,19 +814,16 @@ const aom_prob
// When palette mode is enabled, following probability tables indicate the // When palette mode is enabled, following probability tables indicate the
// probabilities to code the "is_palette" bit (i.e. the bit that indicates // probabilities to code the "is_palette" bit (i.e. the bit that indicates
// if this block uses palette mode or DC_PRED mode). // if this block uses palette mode or DC_PRED mode).
const aom_prob const aom_prob av1_default_palette_y_mode_prob
av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES] [PALETTE_BLOCK_SIZES][PALETTE_Y_MODE_CONTEXTS] = {
[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 }, { 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 #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 #endif // CONFIG_EXT_PARTITION
}; };
const aom_prob av1_default_palette_uv_mode_prob[PALETTE_UV_MODE_CONTEXTS] = { const aom_prob av1_default_palette_uv_mode_prob[PALETTE_UV_MODE_CONTEXTS] = {
253, 229 253, 229
...@@ -1191,20 +1179,16 @@ static const aom_prob default_txfm_partition_probs[TXFM_PARTITION_CONTEXTS] = { ...@@ -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 }; static const aom_prob default_skip_probs[SKIP_CONTEXTS] = { 192, 128, 64 };
#if CONFIG_DUAL_FILTER #if CONFIG_DUAL_FILTER
static const aom_prob static const aom_prob default_switchable_interp_prob
default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS] [SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - 1] = {
[SWITCHABLE_FILTERS - 1] = { { 235, 192, 128 }, { 36, 243, 48 }, { 34, 16, 128 },
{ 235, 192, 128 }, { 36, 243, 48 }, { 34, 16, 128 }, { 149, 160, 128 }, { 235, 192, 128 },
{ 34, 16, 128 }, { 34, 16, 128 }, { 36, 243, 48 }, { 34, 16, 128 }, { 34, 16, 128 },
{ 149, 160, 128 }, { 235, 192, 128 }, { 149, 160, 128 }, { 235, 192, 128 }, { 36, 243, 48 },
{ 36, 243, 48 }, { 34, 16, 128 }, { 34, 16, 128 }, { 34, 16, 128 }, { 149, 160, 128 },
{ 34, 16, 128 }, { 149, 160, 128 }, { 235, 192, 128 }, { 36, 243, 48 }, { 34, 16, 128 },
{ 235, 192, 128 }, { 36, 243, 48 }, { 34, 16, 128 }, { 149, 160, 128 },
{ 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 #else // CONFIG_DUAL_FILTER
static const aom_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS] static const aom_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS - 1] = { [SWITCHABLE_FILTERS - 1] = {
...@@ -1524,14 +1508,11 @@ static const aom_prob default_inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 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_EXT_INTRA
#if CONFIG_INTRA_INTERP #if CONFIG_INTRA_INTERP
static const aom_prob default_intra_filter_probs[INTRA_FILTERS + 1] static const aom_prob
[INTRA_FILTERS - 1] = { default_intra_filter_probs[INTRA_FILTERS + 1][INTRA_FILTERS - 1] = {
{ 98, 63, 60 }, { 98, 63, 60 }, { 98, 82, 80 }, { 94, 65, 103 },
{ 98, 82, 80 }, { 49, 25, 24 }, { 72, 38, 50 },
{ 94, 65, 103 }, };
{ 49, 25, 24 },
{ 72, 38, 50 },
};
const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)] = { 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_LINEAR, 2, -INTRA_FILTER_8TAP, 4, -INTRA_FILTER_8TAP_SHARP,
-INTRA_FILTER_8TAP_SMOOTH, -INTRA_FILTER_8TAP_SMOOTH,
...@@ -1544,26 +1525,22 @@ static const aom_prob default_filter_intra_probs[2] = { 230, 230 }; ...@@ -1544,26 +1525,22 @@ static const aom_prob default_filter_intra_probs[2] = { 230, 230 };
#endif // CONFIG_FILTER_INTRA #endif // CONFIG_FILTER_INTRA
#if CONFIG_SUPERTX #if CONFIG_SUPERTX
static const aom_prob default_supertx_prob[PARTITION_SUPERTX_CONTEXTS] static const aom_prob
[TX_SIZES] = { default_supertx_prob[PARTITION_SUPERTX_CONTEXTS][TX_SIZES] = {
#if CONFIG_CB4X4 #if CONFIG_CB4X4
#if CONFIG_TX64X64 #if CONFIG_TX64X64
{ 1, 1, 160, 160, 170, 180 }, { 1, 1, 160, 160, 170, 180 }, { 1, 1, 200, 200, 210, 220 },
{ 1, 1, 200, 200, 210, 220 },
#else #else
{ 1, 1, 160, 160, 170 }, { 1, 1, 160, 160, 170 }, { 1, 1, 200, 200, 210 },
{ 1, 1, 200, 200, 210 },
#endif // CONFIG_TX64X64 #endif // CONFIG_TX64X64
#else #else
#if CONFIG_TX64X64 #if CONFIG_TX64X64
{ 1, 160, 160, 170, 180 }, { 1, 160, 160, 170, 180 }, { 1, 200, 200, 210, 220 },
{ 1, 200, 200, 210, 220 },
#else #else
{ 1, 160, 160, 170 }, { 1, 160, 160, 170 }, { 1, 200, 200, 210 },
{ 1, 200, 200, 210 },
#endif // CONFIG_CB4X4 #endif // CONFIG_CB4X4
#endif // CONFIG_TX64X64 #endif // CONFIG_TX64X64
}; };
#endif // CONFIG_SUPERTX #endif // CONFIG_SUPERTX
// FIXME(someone) need real defaults here // FIXME(someone) need real defaults here
......
...@@ -383,14 +383,10 @@ extern const aom_prob av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES] ...@@ -383,14 +383,10 @@ extern const aom_prob av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES]
[PALETTE_SIZES - 1]; [PALETTE_SIZES - 1];
extern const aom_prob av1_default_palette_uv_size_prob[PALETTE_BLOCK_SIZES] extern const aom_prob av1_default_palette_uv_size_prob[PALETTE_BLOCK_SIZES]
[PALETTE_SIZES - 1]; [PALETTE_SIZES - 1];
extern const aom_prob extern const aom_prob av1_default_palette_y_color_index_prob
av1_default_palette_y_color_index_prob[PALETTE_MAX_SIZE - 1] [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1];
[PALETTE_COLOR_INDEX_CONTEXTS] extern const aom_prob av1_default_palette_uv_color_index_prob
[PALETTE_COLORS - 1]; [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 #endif // CONFIG_PALETTE
extern const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)]; extern const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
......
...@@ -143,9 +143,9 @@ DECLARE_ALIGNED(16, static const int16_t, ...@@ -143,9 +143,9 @@ DECLARE_ALIGNED(16, static const int16_t,
#endif #endif
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
#if USE_TEMPORALFILTER_12TAP #if USE_TEMPORALFILTER_12TAP
DECLARE_ALIGNED(16, static const int16_t, DECLARE_ALIGNED(
sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6] 16, static const int16_t,
[8]) = { sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6][8]) = {
{ {
{ 0, 1, 0, 1, 0, 1, 0, 1 }, { 0, 1, 0, 1, 0, 1, 0, 1 },
{ -1, 3, -1, 3, -1, 3, -1, 3 }, { -1, 3, -1, 3, -1, 3, -1, 3 },
......
...@@ -650,8 +650,8 @@ static void read_filter_intra_mode_info(AV1_COMMON *const cm, ...@@ -650,8 +650,8 @@ static void read_filter_intra_mode_info(AV1_COMMON *const cm,
read_uniform(r, FILTER_INTRA_MODES); read_uniform(r, FILTER_INTRA_MODES);
} }
if (counts) { if (counts) {
++counts->filter_intra[0] ++counts
[filter_intra_mode_info->use_filter_intra_mode[0]]; ->filter_intra[0][filter_intra_mode_info->use_filter_intra_mode[0]];
} }
} }
if (mbmi->uv_mode == DC_PRED if (mbmi->uv_mode == DC_PRED
...@@ -666,8 +666,8 @@ static void read_filter_intra_mode_info(AV1_COMMON *const cm, ...@@ -666,8 +666,8 @@ static void read_filter_intra_mode_info(AV1_COMMON *const cm,
read_uniform(r, FILTER_INTRA_MODES); read_uniform(r, FILTER_INTRA_MODES);
} }
if (counts) { if (counts) {
++counts->filter_intra[1] ++counts
[filter_intra_mode_info->use_filter_intra_mode[1]]; ->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, ...@@ -1970,8 +1970,8 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
mbmi->interinter_compound_data.type = COMPOUND_AVERAGE; mbmi->interinter_compound_data.type = COMPOUND_AVERAGE;
} }
if (xd->counts) if (xd->counts)
xd->counts->compound_interinter[bsize] xd->counts
[mbmi->interinter_compound_data.type]++; ->compound_interinter[bsize][mbmi->interinter_compound_data.type]++;
} }
#endif // CONFIG_EXT_INTER #endif // CONFIG_EXT_INTER
......
...@@ -448,10 +448,10 @@ void av1_decode_palette_tokens(MACROBLOCKD *const xd, int plane, ...@@ -448,10 +448,10 @@ void av1_decode_palette_tokens(MACROBLOCKD *const xd, int plane,
const int n = mbmi->palette_mode_info.palette_size[plane]; const int n = mbmi->palette_mode_info.palette_size[plane];
int i, j; int i, j;
uint8_t *const color_map = xd->plane[plane].color_index_map; uint8_t *const color_map = xd->plane[plane].color_index_map;
const aom_prob(*const prob)[PALETTE_COLOR_INDEX_CONTEXTS] const aom_prob(
[PALETTE_COLORS - 1] = *const prob)[PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] =
plane ? av1_default_palette_uv_color_index_prob plane ? av1_default_palette_uv_color_index_prob
: av1_default_palette_y_color_index_prob; : av1_default_palette_y_color_index_prob;
int plane_block_width, plane_block_height, rows, cols; int plane_block_width, plane_block_height, rows, cols;
av1_get_block_dimensions(mbmi->sb_type, plane, xd, &plane_block_width, av1_get_block_dimensions(mbmi->sb_type, plane, xd, &plane_block_width,
&plane_block_height, &rows, &cols); &plane_block_height, &rows, &cols);
......
...@@ -43,10 +43,12 @@ typedef void (*AV1_QUANT_FACADE)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, ...@@ -43,10 +43,12 @@ typedef void (*AV1_QUANT_FACADE)(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
typedef struct { typedef struct {
#if CONFIG_NEW_QUANT #if CONFIG_NEW_QUANT
DECLARE_ALIGNED(16, tran_low_t, y_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE] DECLARE_ALIGNED(
[COEF_BANDS][NUQ_KNOTS]); 16, tran_low_t,
DECLARE_ALIGNED(16, tran_low_t, uv_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE] y_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE][COEF_BANDS][NUQ_KNOTS]);
[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 #endif // CONFIG_NEW_QUANT
// 0: dc 1: ac 2-8: ac repeated to SIMD width // 0: dc 1: ac 2-8: ac repeated to SIMD width
DECLARE_ALIGNED(16, int16_t, y_quant[QINDEX_RANGE][8]); 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, ...@@ -1232,8 +1232,9 @@ static void write_palette_mode_info(const AV1_COMMON *cm, const MACROBLOCKD *xd,
if (left_mi) if (left_mi)
palette_y_mode_ctx += palette_y_mode_ctx +=
(left_mi->mbmi.palette_mode_info.palette_size[0] > 0); (left_mi->mbmi.palette_mode_info.palette_size[0] > 0);
aom_write(w, n > 0, av1_default_palette_y_mode_prob[bsize - BLOCK_8X8] aom_write(
[palette_y_mode_ctx]); w, n > 0,
av1_default_palette_y_mode_prob[bsize - BLOCK_8X8][palette_y_mode_ctx]);
if (n > 0) { if (n > 0) {
av1_write_token(w, av1_palette_size_tree, av1_write_token(w, av1_palette_size_tree,
av1_default_palette_y_size_prob[bsize - BLOCK_8X8], 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, ...@@ -2987,12 +2988,11 @@ static void update_coef_probs_common(aom_writer *const bc, AV1_COMP *cpi,
#endif #endif
#if CONFIG_ENTROPY #if CONFIG_ENTROPY
// Calculate the token counts between subsequent subframe updates. // Calculate the token counts between subsequent subframe updates.
static void get_coef_counts_diff(AV1_COMP *cpi, int index, static void get_coef_counts_diff(
av1_coeff_count coef_counts[TX_SIZES] AV1_COMP *cpi, int index,
[PLANE_TYPES], av1_coeff_count coef_counts[TX_SIZES][PLANE_TYPES],
unsigned int eob_counts[TX_SIZES][PLANE_TYPES] unsigned int eob_counts[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS]
[REF_TYPES][COEF_BANDS] [COEFF_CONTEXTS]) {
[COEFF_CONTEXTS]) {
int i, j, k, l, m, tx_size, val; int i, j, k, l, m, tx_size, val;
const int max_idx = cpi->common.coef_probs_update_idx; const int max_idx = cpi->common.coef_probs_update_idx;
const TX_MODE tx_mode = cpi->common.tx_mode; const TX_MODE tx_mode = cpi->common.tx_mode;
...@@ -3011,8 +3011,8 @@ static void get_coef_counts_diff(AV1_COMP *cpi, int index, ...@@ -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] - cpi->common.counts.eob_branch[tx_size][i][j][k][l] -
subframe_stats->eob_counts_buf[max_idx][tx_size][i][j][k][l]; subframe_stats->eob_counts_buf[max_idx][tx_size][i][j][k][l];
} else { } else {
val = subframe_stats->eob_counts_buf[index + 1][tx_size][i][j][k] val = subframe_stats
[l] - ->eob_counts_buf[index + 1][tx_size][i][j][k][l] -
subframe_stats->eob_counts_buf[index][tx_size][i][j][k][l]; subframe_stats->eob_counts_buf[index][tx_size][i][j][k][l];
} }
assert(val >= 0); assert(val >= 0);
...@@ -3021,13 +3021,13 @@ static void get_coef_counts_diff(AV1_COMP *cpi, int index, ...@@ -3021,13 +3021,13 @@ static void get_coef_counts_diff(AV1_COMP *cpi, int index,
for (m = 0; m < ENTROPY_TOKENS; ++m) { for (m = 0; m < ENTROPY_TOKENS; ++m) {
if (index == max_idx) { if (index == max_idx) {
val = cpi->td.rd_counts.coef_counts[tx_size][i][j][k][l][m] - 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] subframe_stats
[l][m]; ->coef_counts_buf[max_idx][tx_size][i][j][k][l][m];
} else { } else {
val = subframe_stats->coef_counts_buf[index + 1][tx_size][i][j] val = subframe_stats
[k][l][m] - ->coef_counts_buf[index + 1][tx_size][i][j][k][l][m] -
subframe_stats->coef_counts_buf[index][tx_size][i][j][k] subframe_stats
[l][m]; ->coef_counts_buf[index][tx_size][i][j][k][l][m];
} }
assert(val >= 0); assert(val >= 0);
coef_counts[tx_size][i][j][k][l][m] = val; 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, ...@@ -2083,8 +2083,8 @@ static void update_stats(const AV1_COMMON *const cm, ThreadData *td, int mi_row,
[ref0 != BWDREF_FRAME]++; [ref0 != BWDREF_FRAME]++;
} else { } else {
const int bit1 = !(ref0 == LAST2_FRAME || ref0 == LAST_FRAME); const int bit1 = !(ref0 == LAST2_FRAME || ref0 == LAST_FRAME);
counts->single_ref[av1_get_pred_context_single_ref_p3(xd)][2] counts
[bit1]++; ->single_ref[av1_get_pred_context_single_ref_p3(xd)][2][bit1]++;
if (!bit1) { if (!bit1) {
counts->single_ref[av1_get_pred_context_single_ref_p4(xd)][3] counts->single_ref[av1_get_pred_context_single_ref_p4(xd)][3]
[ref0 != LAST_FRAME]++; [ref0 != LAST_FRAME]++;
...@@ -2491,8 +2491,8 @@ static void encode_sb(const AV1_COMP *const cpi, ThreadData *td, ...@@ -2491,8 +2491,8 @@ static void encode_sb(const AV1_COMP *const cpi, ThreadData *td,
!xd->mi[0]->mbmi.skip) { !xd->mi[0]->mbmi.skip) {
int eset = get_ext_tx_set(supertx_size, bsize, 1); int eset = get_ext_tx_set(supertx_size, bsize, 1);
if (eset > 0) { if (eset > 0) {
++td->counts->inter_ext_tx[eset][supertx_size] ++td->counts
[xd->mi[0]->mbmi.tx_type]; ->inter_ext_tx[eset][supertx_size][xd->mi[0]->mbmi.tx_type];
} }
} }
#else #else
...@@ -3992,11 +3992,10 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td, ...@@ -3992,11 +3992,10 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
pc_tree->partitioning = PARTITION_SPLIT; pc_tree->partitioning = PARTITION_SPLIT;
sum_rdc.rate += sum_rdc.rate += av1_cost_bit(
av1_cost_bit(cm->fc->supertx_prob cm->fc->supertx_prob[partition_supertx_context_lookup
[partition_supertx_context_lookup[PARTITION_SPLIT]] [PARTITION_SPLIT]][supertx_size],
[supertx_size], 0);
0);
sum_rdc.rdcost = sum_rdc.rdcost =
RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist); 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, ...@@ -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, &tmp_rdc.dist, &best_tx, pc_tree);
tmp_rdc.rate += av1_cost_bit( tmp_rdc.rate += av1_cost_bit(
cm->fc->supertx_prob cm->fc->supertx_prob[partition_supertx_context_lookup
[partition_supertx_context_lookup[PARTITION_SPLIT]] [PARTITION_SPLIT]][supertx_size],
[supertx_size],
1); 1);
tmp_rdc.rdcost = tmp_rdc.rdcost =
RDCOST(x->rdmult, x->rddiv, tmp_rdc.rate, tmp_rdc.dist); 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, ...@@ -4076,11 +4074,10 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
pc_tree->partitioning = PARTITION_SPLIT; pc_tree->partitioning = PARTITION_SPLIT;
sum_rdc.rate += sum_rdc.rate += av1_cost_bit(
av1_cost_bit(cm->fc->supertx_prob cm->fc->supertx_prob[partition_supertx_context_lookup
[partition_supertx_context_lookup[PARTITION_SPLIT]] [PARTITION_SPLIT]][supertx_size],
[supertx_size], 0);
0);
sum_rdc.rdcost = sum_rdc.rdcost =
RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist); 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, ...@@ -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, &tmp_rdc.dist, &best_tx, pc_tree);
tmp_rdc.rate += av1_cost_bit( tmp_rdc.rate += av1_cost_bit(
cm->fc->supertx_prob cm->fc->supertx_prob[partition_supertx_context_lookup
[partition_supertx_context_lookup[PARTITION_SPLIT]] [PARTITION_SPLIT]][supertx_size],
[supertx_size],
1); 1);
tmp_rdc.rdcost = tmp_rdc.rdcost =
RDCOST(x->rdmult, x->rddiv, tmp_rdc.rate, tmp_rdc.dist); 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, ...@@ -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); int eset = get_ext_tx_set(tx_size, bsize, is_inter);
if (eset > 0) { if (eset > 0) {
if (is_inter) { if (is_inter) {
++td->counts->inter_ext_tx[eset][txsize_sqr_map[tx_size]] ++td->counts
[mbmi->tx_type]; ->inter_ext_tx[eset][txsize_sqr_map[tx_size]][mbmi->tx_type];
} else { } else {
++td->counts->intra_ext_tx[eset][txsize_sqr_map[tx_size]][mbmi->mode] ++td->counts->intra_ext_tx[eset][txsize_sqr_map[tx_size]][mbmi->mode]
[mbmi->tx_type]; [mbmi->tx_type];
...@@ -5820,9 +5816,9 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td, ...@@ -5820,9 +5816,9 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td,
if (is_inter) { if (is_inter) {
++td->counts->inter_ext_tx[tx_size][mbmi->tx_type]; ++td->counts->inter_ext_tx[tx_size][mbmi->tx_type];
} else { } else {
++td->counts->intra_ext_tx[tx_size] ++td->counts
[intra_mode_to_tx_type_context[mbmi->mode]] ->intra_ext_tx[tx_size][intra_mode_to_tx_type_context[mbmi->mode]]
[mbmi->tx_type]; [mbmi->tx_type];
} }
} }
#endif // CONFIG_EXT_TX #endif // CONFIG_EXT_TX
......
...@@ -1153,11 +1153,11 @@ PVQ_SKIP_TYPE av1_pvq_encode_helper( ...@@ -1153,11 +1153,11 @@ PVQ_SKIP_TYPE av1_pvq_encode_helper(
assert(OD_COEFF_SHIFT >= 3); assert(OD_COEFF_SHIFT >= 3);
// DC quantizer for PVQ // DC quantizer for PVQ
if (use_activity_masking) if (use_activity_masking)
pvq_dc_quant = OD_MAXI( pvq_dc_quant =
1, (quant[0] << (OD_COEFF_SHIFT - 3)) * OD_MAXI(1, (quant[0] << (OD_COEFF_SHIFT - 3)) *
daala_enc->state.pvq_qm_q4[plane] daala_enc->state
[od_qm_get_index(tx_size, 0)] >> .pvq_qm_q4[plane][od_qm_get_index(tx_size, 0)] >>
4); 4);
else else
pvq_dc_quant = OD_MAXI(1, quant[0] << (OD_COEFF_SHIFT