Commit 749c21a1 authored by Frederic Barbier's avatar Frederic Barbier Committed by Frédéric BARBIER

Remove experimental flag of NEW_MULTISYMBOL

This experiment has been adopted, we can simplify the code
by dropping the associated preprocessor conditionals.

Change-Id: I6ac62c2825eabcba8f854cfa25c84638d9a73872
parent f36d3df9
...@@ -38,7 +38,6 @@ const aom_tree_index av1_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = { ...@@ -38,7 +38,6 @@ const aom_tree_index av1_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = {
}; };
/* clang-format on */ /* clang-format on */
#if CONFIG_NEW_MULTISYMBOL
/* Extra bits coded from LSB to MSB */ /* Extra bits coded from LSB to MSB */
const aom_cdf_prob av1_cat1_cdf0[CDF_SIZE(2)] = { AOM_CDF2(20352) }; const aom_cdf_prob av1_cat1_cdf0[CDF_SIZE(2)] = { AOM_CDF2(20352) };
const aom_cdf_prob *av1_cat1_cdf[] = { av1_cat1_cdf0 }; const aom_cdf_prob *av1_cat1_cdf[] = { av1_cat1_cdf0 };
...@@ -78,7 +77,6 @@ const aom_cdf_prob av1_cat6_cdf4[CDF_SIZE(4)] = { AOM_CDF4(32513, 32641, ...@@ -78,7 +77,6 @@ const aom_cdf_prob av1_cat6_cdf4[CDF_SIZE(4)] = { AOM_CDF4(32513, 32641,
const aom_cdf_prob *av1_cat6_cdf[] = { const aom_cdf_prob *av1_cat6_cdf[] = {
av1_cat6_cdf0, av1_cat6_cdf1, av1_cat6_cdf2, av1_cat6_cdf3, av1_cat6_cdf4 av1_cat6_cdf0, av1_cat6_cdf1, av1_cat6_cdf2, av1_cat6_cdf3, av1_cat6_cdf4
}; };
#endif
/* Extra bits coded from MSB to LSB */ /* Extra bits coded from MSB to LSB */
const aom_prob av1_cat1_prob[] = { 159 }; const aom_prob av1_cat1_prob[] = { 159 };
const aom_prob av1_cat2_prob[] = { 165, 145 }; const aom_prob av1_cat2_prob[] = { 165, 145 };
...@@ -1658,13 +1656,11 @@ void av1_average_tile_mv_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], ...@@ -1658,13 +1656,11 @@ void av1_average_tile_mv_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
AVERAGE_TILE_CDFS(nmvc[j].comps[k].classes_cdf) AVERAGE_TILE_CDFS(nmvc[j].comps[k].classes_cdf)
AVERAGE_TILE_CDFS(nmvc[j].comps[k].class0_fp_cdf) AVERAGE_TILE_CDFS(nmvc[j].comps[k].class0_fp_cdf)
AVERAGE_TILE_CDFS(nmvc[j].comps[k].fp_cdf) AVERAGE_TILE_CDFS(nmvc[j].comps[k].fp_cdf)
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(nmvc[j].comps[k].sign_cdf) AVERAGE_TILE_CDFS(nmvc[j].comps[k].sign_cdf)
AVERAGE_TILE_CDFS(nmvc[j].comps[k].hp_cdf) AVERAGE_TILE_CDFS(nmvc[j].comps[k].hp_cdf)
AVERAGE_TILE_CDFS(nmvc[j].comps[k].class0_hp_cdf) AVERAGE_TILE_CDFS(nmvc[j].comps[k].class0_hp_cdf)
AVERAGE_TILE_CDFS(nmvc[j].comps[k].class0_cdf) AVERAGE_TILE_CDFS(nmvc[j].comps[k].class0_cdf)
AVERAGE_TILE_CDFS(nmvc[j].comps[k].bits_cdf) AVERAGE_TILE_CDFS(nmvc[j].comps[k].bits_cdf)
#endif
} }
} }
} }
...@@ -1689,10 +1685,8 @@ void av1_average_tile_loopfilter_cdfs(FRAME_CONTEXT *fc, ...@@ -1689,10 +1685,8 @@ void av1_average_tile_loopfilter_cdfs(FRAME_CONTEXT *fc,
#if CONFIG_LOOP_RESTORATION #if CONFIG_LOOP_RESTORATION
AVERAGE_TILE_CDFS(switchable_restore_cdf) AVERAGE_TILE_CDFS(switchable_restore_cdf)
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(wiener_restore_cdf) AVERAGE_TILE_CDFS(wiener_restore_cdf)
AVERAGE_TILE_CDFS(sgrproj_restore_cdf) AVERAGE_TILE_CDFS(sgrproj_restore_cdf)
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_LOOP_RESTORATION #endif // CONFIG_LOOP_RESTORATION
} }
...@@ -1711,9 +1705,7 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], ...@@ -1711,9 +1705,7 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
AVERAGE_TILE_CDFS(inter_ext_tx_cdf) AVERAGE_TILE_CDFS(inter_ext_tx_cdf)
AVERAGE_TILE_CDFS(seg.tree_cdf) AVERAGE_TILE_CDFS(seg.tree_cdf)
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(seg.pred_cdf) AVERAGE_TILE_CDFS(seg.pred_cdf)
#endif
AVERAGE_TILE_CDFS(uv_mode_cdf) AVERAGE_TILE_CDFS(uv_mode_cdf)
#if CONFIG_CFL #if CONFIG_CFL
...@@ -1731,10 +1723,8 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], ...@@ -1731,10 +1723,8 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
#endif #endif
#endif #endif
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(skip_cdfs) AVERAGE_TILE_CDFS(skip_cdfs)
AVERAGE_TILE_CDFS(txfm_partition_cdf) AVERAGE_TILE_CDFS(txfm_partition_cdf)
#endif // CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(palette_y_size_cdf) AVERAGE_TILE_CDFS(palette_y_size_cdf)
AVERAGE_TILE_CDFS(palette_uv_size_cdf) AVERAGE_TILE_CDFS(palette_uv_size_cdf)
AVERAGE_TILE_CDFS(palette_y_color_index_cdf) AVERAGE_TILE_CDFS(palette_y_color_index_cdf)
...@@ -1746,10 +1736,8 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], ...@@ -1746,10 +1736,8 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
#if CONFIG_MRC_TX #if CONFIG_MRC_TX
AVERAGE_TILE_CDFS(mrc_mask_intra_cdf) AVERAGE_TILE_CDFS(mrc_mask_intra_cdf)
#endif // CONFIG_MRC_TX #endif // CONFIG_MRC_TX
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(palette_y_mode_cdf) AVERAGE_TILE_CDFS(palette_y_mode_cdf)
AVERAGE_TILE_CDFS(palette_uv_mode_cdf) AVERAGE_TILE_CDFS(palette_uv_mode_cdf)
#endif
#if CONFIG_LPF_SB #if CONFIG_LPF_SB
AVERAGE_TILE_CDFS(lpf_reuse_cdf); AVERAGE_TILE_CDFS(lpf_reuse_cdf);
AVERAGE_TILE_CDFS(lpf_delta_cdf); AVERAGE_TILE_CDFS(lpf_delta_cdf);
...@@ -1771,13 +1759,10 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc, ...@@ -1771,13 +1759,10 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
#endif #endif
aom_cdf_prob *fc_cdf_ptr; aom_cdf_prob *fc_cdf_ptr;
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(comp_inter_cdf) AVERAGE_TILE_CDFS(comp_inter_cdf)
AVERAGE_TILE_CDFS(comp_ref_cdf) AVERAGE_TILE_CDFS(comp_ref_cdf)
AVERAGE_TILE_CDFS(comp_bwdref_cdf) AVERAGE_TILE_CDFS(comp_bwdref_cdf)
#endif
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(single_ref_cdf) AVERAGE_TILE_CDFS(single_ref_cdf)
AVERAGE_TILE_CDFS(newmv_cdf) AVERAGE_TILE_CDFS(newmv_cdf)
...@@ -1787,7 +1772,6 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc, ...@@ -1787,7 +1772,6 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
#if CONFIG_EXT_COMP_REFS #if CONFIG_EXT_COMP_REFS
AVERAGE_TILE_CDFS(uni_comp_ref_cdf) AVERAGE_TILE_CDFS(uni_comp_ref_cdf)
AVERAGE_TILE_CDFS(comp_ref_type_cdf) AVERAGE_TILE_CDFS(comp_ref_type_cdf)
#endif
#endif #endif
// FIXME: cdfs not defined for super_tx // FIXME: cdfs not defined for super_tx
...@@ -1796,10 +1780,8 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc, ...@@ -1796,10 +1780,8 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
AVERAGE_TILE_CDFS(compound_type_cdf) AVERAGE_TILE_CDFS(compound_type_cdf)
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(interintra_cdf) AVERAGE_TILE_CDFS(interintra_cdf)
AVERAGE_TILE_CDFS(wedge_interintra_cdf) AVERAGE_TILE_CDFS(wedge_interintra_cdf)
#endif
AVERAGE_TILE_CDFS(interintra_mode_cdf) AVERAGE_TILE_CDFS(interintra_mode_cdf)
/* NB: kf_y_cdf is discarded after use, so no need /* NB: kf_y_cdf is discarded after use, so no need
...@@ -1809,11 +1791,9 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc, ...@@ -1809,11 +1791,9 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
if (cm->interp_filter == SWITCHABLE) { if (cm->interp_filter == SWITCHABLE) {
AVERAGE_TILE_CDFS(switchable_interp_cdf) AVERAGE_TILE_CDFS(switchable_interp_cdf)
} }
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(intra_inter_cdf) AVERAGE_TILE_CDFS(intra_inter_cdf)
AVERAGE_TILE_CDFS(motion_mode_cdf) AVERAGE_TILE_CDFS(motion_mode_cdf)
AVERAGE_TILE_CDFS(obmc_cdf) AVERAGE_TILE_CDFS(obmc_cdf)
#endif
#if CONFIG_MRC_TX #if CONFIG_MRC_TX
AVERAGE_TILE_CDFS(mrc_mask_inter_cdf) AVERAGE_TILE_CDFS(mrc_mask_inter_cdf)
#endif // CONFIG_MRC_TX #endif // CONFIG_MRC_TX
...@@ -1827,8 +1807,6 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc, ...@@ -1827,8 +1807,6 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
for (j = 0; j < Q_SEGMENT_CDF_COUNT; j++) AVERAGE_TILE_CDFS(seg.q_seg_cdf[j]); for (j = 0; j < Q_SEGMENT_CDF_COUNT; j++) AVERAGE_TILE_CDFS(seg.q_seg_cdf[j]);
#endif #endif
#if CONFIG_JNT_COMP #if CONFIG_JNT_COMP
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(compound_index_cdf); AVERAGE_TILE_CDFS(compound_index_cdf);
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_JNT_COMP #endif // CONFIG_JNT_COMP
} }
...@@ -143,23 +143,17 @@ DECLARE_ALIGNED(16, extern const uint8_t, av1_cat3_prob[3]); ...@@ -143,23 +143,17 @@ DECLARE_ALIGNED(16, extern const uint8_t, av1_cat3_prob[3]);
DECLARE_ALIGNED(16, extern const uint8_t, av1_cat4_prob[4]); DECLARE_ALIGNED(16, extern const uint8_t, av1_cat4_prob[4]);
DECLARE_ALIGNED(16, extern const uint8_t, av1_cat5_prob[5]); DECLARE_ALIGNED(16, extern const uint8_t, av1_cat5_prob[5]);
DECLARE_ALIGNED(16, extern const uint8_t, av1_cat6_prob[18]); DECLARE_ALIGNED(16, extern const uint8_t, av1_cat6_prob[18]);
#if CONFIG_NEW_MULTISYMBOL
extern const aom_cdf_prob *av1_cat1_cdf[]; extern const aom_cdf_prob *av1_cat1_cdf[];
extern const aom_cdf_prob *av1_cat2_cdf[]; extern const aom_cdf_prob *av1_cat2_cdf[];
extern const aom_cdf_prob *av1_cat3_cdf[]; extern const aom_cdf_prob *av1_cat3_cdf[];
extern const aom_cdf_prob *av1_cat4_cdf[]; extern const aom_cdf_prob *av1_cat4_cdf[];
extern const aom_cdf_prob *av1_cat5_cdf[]; extern const aom_cdf_prob *av1_cat5_cdf[];
extern const aom_cdf_prob *av1_cat6_cdf[]; extern const aom_cdf_prob *av1_cat6_cdf[];
#endif
#define EOB_MODEL_TOKEN 3 #define EOB_MODEL_TOKEN 3
typedef struct { typedef struct {
#if CONFIG_NEW_MULTISYMBOL
const aom_cdf_prob **cdf; const aom_cdf_prob **cdf;
#else
const aom_prob *prob;
#endif
int len; int len;
int base_val; int base_val;
const int16_t *cost; const int16_t *cost;
...@@ -177,10 +171,8 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size, ...@@ -177,10 +171,8 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size,
#endif #endif
int tx_offset = (int)(tx_size - TX_4X4); int tx_offset = (int)(tx_size - TX_4X4);
int bits = (int)bit_depth + 3 + tx_offset; int bits = (int)bit_depth + 3 + tx_offset;
#if CONFIG_NEW_MULTISYMBOL
// Round up // Round up
bits = AOMMIN((int)sizeof(av1_cat6_prob), ((bits + 3) & ~3)); bits = AOMMIN((int)sizeof(av1_cat6_prob), ((bits + 3) & ~3));
#endif
assert(bits <= (int)sizeof(av1_cat6_prob)); assert(bits <= (int)sizeof(av1_cat6_prob));
return bits; return bits;
} }
......
This diff is collapsed.
...@@ -181,12 +181,10 @@ typedef struct frame_contexts { ...@@ -181,12 +181,10 @@ typedef struct frame_contexts {
aom_prob zeromv_prob[GLOBALMV_MODE_CONTEXTS]; aom_prob zeromv_prob[GLOBALMV_MODE_CONTEXTS];
aom_prob refmv_prob[REFMV_MODE_CONTEXTS]; aom_prob refmv_prob[REFMV_MODE_CONTEXTS];
aom_prob drl_prob[DRL_MODE_CONTEXTS]; aom_prob drl_prob[DRL_MODE_CONTEXTS];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob newmv_cdf[NEWMV_MODE_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob newmv_cdf[NEWMV_MODE_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob zeromv_cdf[GLOBALMV_MODE_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob zeromv_cdf[GLOBALMV_MODE_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob refmv_cdf[REFMV_MODE_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob refmv_cdf[REFMV_MODE_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob drl_cdf[DRL_MODE_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob drl_cdf[DRL_MODE_CONTEXTS][CDF_SIZE(2)];
#endif
aom_prob inter_compound_mode_probs[INTER_MODE_CONTEXTS] aom_prob inter_compound_mode_probs[INTER_MODE_CONTEXTS]
[INTER_COMPOUND_MODES - 1]; [INTER_COMPOUND_MODES - 1];
...@@ -197,18 +195,14 @@ typedef struct frame_contexts { ...@@ -197,18 +195,14 @@ typedef struct frame_contexts {
aom_prob interintra_prob[BLOCK_SIZE_GROUPS]; aom_prob interintra_prob[BLOCK_SIZE_GROUPS];
aom_prob wedge_interintra_prob[BLOCK_SIZES_ALL]; aom_prob wedge_interintra_prob[BLOCK_SIZES_ALL];
aom_prob interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1]; aom_prob interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob interintra_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(2)]; aom_cdf_prob interintra_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(2)];
aom_cdf_prob wedge_interintra_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)]; aom_cdf_prob wedge_interintra_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)];
#endif
aom_cdf_prob interintra_mode_cdf[BLOCK_SIZE_GROUPS] aom_cdf_prob interintra_mode_cdf[BLOCK_SIZE_GROUPS]
[CDF_SIZE(INTERINTRA_MODES)]; [CDF_SIZE(INTERINTRA_MODES)];
aom_prob motion_mode_prob[BLOCK_SIZES_ALL][MOTION_MODES - 1]; aom_prob motion_mode_prob[BLOCK_SIZES_ALL][MOTION_MODES - 1];
aom_cdf_prob motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)]; aom_cdf_prob motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)];
aom_prob obmc_prob[BLOCK_SIZES_ALL]; aom_prob obmc_prob[BLOCK_SIZES_ALL];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)]; aom_cdf_prob obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL
aom_prob intra_inter_prob[INTRA_INTER_CONTEXTS]; aom_prob intra_inter_prob[INTRA_INTER_CONTEXTS];
aom_prob comp_inter_prob[COMP_INTER_CONTEXTS]; aom_prob comp_inter_prob[COMP_INTER_CONTEXTS];
aom_cdf_prob palette_y_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)]; aom_cdf_prob palette_y_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)];
...@@ -226,51 +220,34 @@ typedef struct frame_contexts { ...@@ -226,51 +220,34 @@ typedef struct frame_contexts {
aom_cdf_prob mrc_mask_intra_cdf[PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS] aom_cdf_prob mrc_mask_intra_cdf[PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS]
[CDF_SIZE(PALETTE_COLORS)]; [CDF_SIZE(PALETTE_COLORS)];
#endif // CONFIG_MRC_TX #endif // CONFIG_MRC_TX
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob palette_y_mode_cdf[PALETTE_BLOCK_SIZES][PALETTE_Y_MODE_CONTEXTS] aom_cdf_prob palette_y_mode_cdf[PALETTE_BLOCK_SIZES][PALETTE_Y_MODE_CONTEXTS]
[CDF_SIZE(2)]; [CDF_SIZE(2)];
aom_cdf_prob palette_uv_mode_cdf[PALETTE_UV_MODE_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob palette_uv_mode_cdf[PALETTE_UV_MODE_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob comp_inter_cdf[COMP_INTER_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob comp_inter_cdf[COMP_INTER_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob single_ref_cdf[REF_CONTEXTS][SINGLE_REFS - 1][CDF_SIZE(2)]; aom_cdf_prob single_ref_cdf[REF_CONTEXTS][SINGLE_REFS - 1][CDF_SIZE(2)];
#endif
#if CONFIG_EXT_COMP_REFS #if CONFIG_EXT_COMP_REFS
aom_prob comp_ref_type_prob[COMP_REF_TYPE_CONTEXTS]; aom_prob comp_ref_type_prob[COMP_REF_TYPE_CONTEXTS];
aom_prob uni_comp_ref_prob[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1]; aom_prob uni_comp_ref_prob[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob comp_ref_type_cdf[COMP_REF_TYPE_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob comp_ref_type_cdf[COMP_REF_TYPE_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob uni_comp_ref_cdf[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1] aom_cdf_prob uni_comp_ref_cdf[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1]
[CDF_SIZE(2)]; [CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_EXT_COMP_REFS #endif // CONFIG_EXT_COMP_REFS
aom_prob single_ref_prob[REF_CONTEXTS][SINGLE_REFS - 1]; aom_prob single_ref_prob[REF_CONTEXTS][SINGLE_REFS - 1];
aom_prob comp_ref_prob[REF_CONTEXTS][FWD_REFS - 1]; aom_prob comp_ref_prob[REF_CONTEXTS][FWD_REFS - 1];
aom_prob comp_bwdref_prob[REF_CONTEXTS][BWD_REFS - 1]; aom_prob comp_bwdref_prob[REF_CONTEXTS][BWD_REFS - 1];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob comp_ref_cdf[REF_CONTEXTS][FWD_REFS - 1][CDF_SIZE(2)]; aom_cdf_prob comp_ref_cdf[REF_CONTEXTS][FWD_REFS - 1][CDF_SIZE(2)];
aom_cdf_prob comp_bwdref_cdf[REF_CONTEXTS][BWD_REFS - 1][CDF_SIZE(2)]; aom_cdf_prob comp_bwdref_cdf[REF_CONTEXTS][BWD_REFS - 1][CDF_SIZE(2)];
#endif
aom_prob txfm_partition_prob[TXFM_PARTITION_CONTEXTS]; aom_prob txfm_partition_prob[TXFM_PARTITION_CONTEXTS];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob txfm_partition_cdf[TXFM_PARTITION_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob txfm_partition_cdf[TXFM_PARTITION_CONTEXTS][CDF_SIZE(2)];
#endif
#if CONFIG_JNT_COMP #if CONFIG_JNT_COMP
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob compound_index_cdf[COMP_INDEX_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob compound_index_cdf[COMP_INDEX_CONTEXTS][CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL
aom_prob compound_index_probs[COMP_INDEX_CONTEXTS]; aom_prob compound_index_probs[COMP_INDEX_CONTEXTS];
#endif // CONFIG_JNT_COMP #endif // CONFIG_JNT_COMP
#if CONFIG_NEW_MULTISYMBOL
#if CONFIG_EXT_SKIP #if CONFIG_EXT_SKIP
aom_cdf_prob skip_mode_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob skip_mode_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)];
#endif // CONFIG_EXT_SKIP #endif // CONFIG_EXT_SKIP
aom_cdf_prob skip_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob skip_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob intra_inter_cdf[INTRA_INTER_CONTEXTS][CDF_SIZE(2)]; aom_cdf_prob intra_inter_cdf[INTRA_INTER_CONTEXTS][CDF_SIZE(2)];
#else // !CONFIG_NEW_MULTISYMBOL
#if CONFIG_EXT_SKIP
aom_prob skip_mode_probs[SKIP_CONTEXTS];
#endif // CONFIG_EXT_SKIP
aom_prob skip_probs[SKIP_CONTEXTS];
#endif // CONFIG_NEW_MULTISYMBOL
nmv_context nmvc[NMV_CONTEXTS]; nmv_context nmvc[NMV_CONTEXTS];
#if CONFIG_INTRABC #if CONFIG_INTRABC
nmv_context ndvc; nmv_context ndvc;
...@@ -284,10 +261,8 @@ typedef struct frame_contexts { ...@@ -284,10 +261,8 @@ typedef struct frame_contexts {
#endif // CONFIG_FILTER_INTRA #endif // CONFIG_FILTER_INTRA
#if CONFIG_LOOP_RESTORATION #if CONFIG_LOOP_RESTORATION
aom_cdf_prob switchable_restore_cdf[CDF_SIZE(RESTORE_SWITCHABLE_TYPES)]; aom_cdf_prob switchable_restore_cdf[CDF_SIZE(RESTORE_SWITCHABLE_TYPES)];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob wiener_restore_cdf[CDF_SIZE(2)]; aom_cdf_prob wiener_restore_cdf[CDF_SIZE(2)];
aom_cdf_prob sgrproj_restore_cdf[CDF_SIZE(2)]; aom_cdf_prob sgrproj_restore_cdf[CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_LOOP_RESTORATION #endif // CONFIG_LOOP_RESTORATION
aom_cdf_prob y_mode_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(INTRA_MODES)]; aom_cdf_prob y_mode_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(INTRA_MODES)];
aom_cdf_prob uv_mode_cdf[INTRA_MODES][CDF_SIZE(UV_INTRA_MODES)]; aom_cdf_prob uv_mode_cdf[INTRA_MODES][CDF_SIZE(UV_INTRA_MODES)];
......
...@@ -59,7 +59,6 @@ static const nmv_context default_nmv_context = { ...@@ -59,7 +59,6 @@ static const nmv_context default_nmv_context = {
{ AOM_CDF4(8192, 17408, 21248) }, // fp_cdf { AOM_CDF4(8192, 17408, 21248) }, // fp_cdf
160, // class0_hp bit 160, // class0_hp bit
128, // hp 128, // hp
#if CONFIG_NEW_MULTISYMBOL
{ AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) },
{ AOM_CDF2(160 * 128) }, { AOM_CDF2(160 * 128) },
{ AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) },
...@@ -74,7 +73,6 @@ static const nmv_context default_nmv_context = { ...@@ -74,7 +73,6 @@ static const nmv_context default_nmv_context = {
{ AOM_CDF2(128 * 234) }, { AOM_CDF2(128 * 234) },
{ AOM_CDF2(128 * 234) }, { AOM_CDF2(128 * 234) },
{ AOM_CDF2(128 * 240) } }, // bits_cdf { AOM_CDF2(128 * 240) } }, // bits_cdf
#endif
}, },
{ {
// Horizontal component // Horizontal component
...@@ -91,7 +89,6 @@ static const nmv_context default_nmv_context = { ...@@ -91,7 +89,6 @@ static const nmv_context default_nmv_context = {
{ AOM_CDF4(8192, 17408, 21248) }, // fp_cdf { AOM_CDF4(8192, 17408, 21248) }, // fp_cdf
160, // class0_hp bit 160, // class0_hp bit
128, // hp 128, // hp
#if CONFIG_NEW_MULTISYMBOL
{ AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) },
{ AOM_CDF2(160 * 128) }, { AOM_CDF2(160 * 128) },
{ AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) },
...@@ -106,7 +103,6 @@ static const nmv_context default_nmv_context = { ...@@ -106,7 +103,6 @@ static const nmv_context default_nmv_context = {
{ AOM_CDF2(128 * 234) }, { AOM_CDF2(128 * 234) },
{ AOM_CDF2(128 * 234) }, { AOM_CDF2(128 * 234) },
{ AOM_CDF2(128 * 240) } }, // bits_cdf { AOM_CDF2(128 * 240) } }, // bits_cdf
#endif
} }, } },
}; };
......
...@@ -66,9 +66,7 @@ typedef enum { ...@@ -66,9 +66,7 @@ typedef enum {
#define CLASS0_BITS 1 /* bits at integer precision for class 0 */ #define CLASS0_BITS 1 /* bits at integer precision for class 0 */
#define CLASS0_SIZE (1 << CLASS0_BITS) #define CLASS0_SIZE (1 << CLASS0_BITS)
#define MV_OFFSET_BITS (MV_CLASSES + CLASS0_BITS - 2) #define MV_OFFSET_BITS (MV_CLASSES + CLASS0_BITS - 2)
#if CONFIG_NEW_MULTISYMBOL
#define MV_BITS_CONTEXTS 6 #define MV_BITS_CONTEXTS 6
#endif
#define MV_FP_SIZE 4 #define MV_FP_SIZE 4
#define MV_MAX_BITS (MV_CLASSES + CLASS0_BITS + 2) #define MV_MAX_BITS (MV_CLASSES + CLASS0_BITS + 2)
...@@ -96,13 +94,11 @@ typedef struct { ...@@ -96,13 +94,11 @@ typedef struct {
aom_cdf_prob fp_cdf[CDF_SIZE(MV_FP_SIZE)]; aom_cdf_prob fp_cdf[CDF_SIZE(MV_FP_SIZE)];
aom_prob class0_hp; aom_prob class0_hp;
aom_prob hp; aom_prob hp;
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob sign_cdf[CDF_SIZE(2)]; aom_cdf_prob sign_cdf[CDF_SIZE(2)];
aom_cdf_prob class0_hp_cdf[CDF_SIZE(2)]; aom_cdf_prob class0_hp_cdf[CDF_SIZE(2)];
aom_cdf_prob hp_cdf[CDF_SIZE(2)]; aom_cdf_prob hp_cdf[CDF_SIZE(2)];
aom_cdf_prob class0_cdf[CDF_SIZE(CLASS0_SIZE)]; aom_cdf_prob class0_cdf[CDF_SIZE(CLASS0_SIZE)];
aom_cdf_prob bits_cdf[MV_OFFSET_BITS][CDF_SIZE(2)]; aom_cdf_prob bits_cdf[MV_OFFSET_BITS][CDF_SIZE(2)];
#endif
} nmv_component; } nmv_component;
typedef struct { typedef struct {
......
...@@ -1383,11 +1383,7 @@ static INLINE int all_lossless(const AV1_COMMON *cm, const MACROBLOCKD *xd) { ...@@ -1383,11 +1383,7 @@ static INLINE int all_lossless(const AV1_COMMON *cm, const MACROBLOCKD *xd) {
static INLINE int use_compressed_header(const AV1_COMMON *cm) { static INLINE int use_compressed_header(const AV1_COMMON *cm) {
(void)cm; (void)cm;
#if CONFIG_NEW_MULTISYMBOL
return 0; return 0;
#else
return 1;
#endif // CONFIG_NEW_MULTISYMBOL
} }
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -129,12 +129,10 @@ static INLINE int get_comp_index_context(const AV1_COMMON *cm, ...@@ -129,12 +129,10 @@ static INLINE int get_comp_index_context(const AV1_COMMON *cm,
} }
#endif // CONFIG_JNT_COMP #endif // CONFIG_JNT_COMP
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_seg_id( static INLINE aom_cdf_prob *av1_get_pred_cdf_seg_id(
struct segmentation_probs *segp, const MACROBLOCKD *xd) { struct segmentation_probs *segp, const MACROBLOCKD *xd) {
return segp->pred_cdf[av1_get_pred_context_seg_id(xd)]; return segp->pred_cdf[av1_get_pred_context_seg_id(xd)];
} }
#endif
#if CONFIG_EXT_SKIP #if CONFIG_EXT_SKIP
static INLINE int av1_get_skip_mode_context(const MACROBLOCKD *xd) { static INLINE int av1_get_skip_mode_context(const MACROBLOCKD *xd) {
...@@ -177,12 +175,10 @@ static INLINE aom_prob av1_get_reference_mode_prob(const AV1_COMMON *cm, ...@@ -177,12 +175,10 @@ static INLINE aom_prob av1_get_reference_mode_prob(const AV1_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
return cm->fc->comp_inter_prob[av1_get_reference_mode_context(cm, xd)]; return cm->fc->comp_inter_prob[av1_get_reference_mode_context(cm, xd)];
} }
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_reference_mode_cdf(const AV1_COMMON *cm, static INLINE aom_cdf_prob *av1_get_reference_mode_cdf(const AV1_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
return xd->tile_ctx->comp_inter_cdf[av1_get_reference_mode_context(cm, xd)]; return xd->tile_ctx->comp_inter_cdf[av1_get_reference_mode_context(cm, xd)];
} }
#endif
#if CONFIG_EXT_COMP_REFS #if CONFIG_EXT_COMP_REFS
int av1_get_comp_reference_type_context(const MACROBLOCKD *xd); int av1_get_comp_reference_type_context(const MACROBLOCKD *xd);
...@@ -216,7 +212,6 @@ av1_get_pred_prob_uni_comp_ref_p2(const AV1_COMMON *cm, const MACROBLOCKD *xd) { ...@@ -216,7 +212,6 @@ av1_get_pred_prob_uni_comp_ref_p2(const AV1_COMMON *cm, const MACROBLOCKD *xd) {
return cm->fc->uni_comp_ref_prob[pred_context][2]; return cm->fc->uni_comp_ref_prob[pred_context][2];
} }
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_comp_reference_type_cdf( static INLINE aom_cdf_prob *av1_get_comp_reference_type_cdf(
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
const int pred_context = av1_get_comp_reference_type_context(xd); const int pred_context = av1_get_comp_reference_type_context(xd);
...@@ -240,19 +235,16 @@ static INLINE aom_cdf_prob *av1_get_pred_cdf_uni_comp_ref_p2( ...@@ -240,19 +235,16 @@ static INLINE aom_cdf_prob *av1_get_pred_cdf_uni_comp_ref_p2(
const int pred_context = av1_get_pred_context_uni_comp_ref_p2(xd); const int pred_context = av1_get_pred_context_uni_comp_ref_p2(xd);
return xd->tile_ctx->uni_comp_ref_cdf[pred_context][2]; return xd->tile_ctx->uni_comp_ref_cdf[pred_context][2];
} }
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_EXT_COMP_REFS #endif // CONFIG_EXT_COMP_REFS
int av1_get_pred_context_comp_ref_p(const AV1_COMMON *cm, int av1_get_pred_context_comp_ref_p(const AV1_COMMON *cm,
const MACROBLOCKD *xd); const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p(const AV1_COMMON *cm, static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p(const AV1_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_ref_p(cm, xd); const int pred_context = av1_get_pred_context_comp_ref_p(cm, xd);
return xd->tile_ctx->comp_ref_cdf[pred_context][0]; return xd->tile_ctx->comp_ref_cdf[pred_context][0];
} }
#endif
static INLINE aom_prob av1_get_pred_prob_comp_ref_p(const AV1_COMMON *cm, static INLINE aom_prob av1_get_pred_prob_comp_ref_p(const AV1_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
...@@ -263,13 +255,11 @@ static INLINE aom_prob av1_get_pred_prob_comp_ref_p(const AV1_COMMON *cm, ...@@ -263,13 +255,11 @@ static INLINE aom_prob av1_get_pred_prob_comp_ref_p(const AV1_COMMON *cm,
int av1_get_pred_context_comp_ref_p1(const AV1_COMMON *cm, int av1_get_pred_context_comp_ref_p1(const AV1_COMMON *cm,
const MACROBLOCKD *xd); const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p1( static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p1(
const AV1_COMMON *cm, const MACROBLOCKD *xd) { const AV1_COMMON *cm, const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_ref_p1(cm, xd); const int pred_context = av1_get_pred_context_comp_ref_p1(cm, xd);
return xd->tile_ctx->comp_ref_cdf[pred_context][1]; return xd->tile_ctx->comp_ref_cdf[pred_context][1];
} }
#endif // CONFIG_NEW_MULTISYMBOL
static INLINE aom_prob av1_get_pred_prob_comp_ref_p1(const AV1_COMMON *cm, static INLINE aom_prob av1_get_pred_prob_comp_ref_p1(const AV1_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
...@@ -280,13 +270,11 @@ static INLINE aom_prob av1_get_pred_prob_comp_ref_p1(const AV1_COMMON *cm, ...@@ -280,13 +270,11 @@ static INLINE aom_prob av1_get_pred_prob_comp_ref_p1(const AV1_COMMON *cm,
int av1_get_pred_context_comp_ref_p2(const AV1_COMMON *cm, int av1_get_pred_context_comp_ref_p2(const AV1_COMMON *cm,
const MACROBLOCKD *xd); const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p2( static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p2(
const AV1_COMMON *cm, const MACROBLOCKD *xd) { const AV1_COMMON *cm, const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_ref_p2(cm, xd); const int pred_context = av1_get_pred_context_comp_ref_p2(cm, xd);
return xd->tile_ctx->comp_ref_cdf[pred_context][2]; return xd->tile_ctx->comp_ref_cdf[pred_context][2];
} }
#endif // CONFIG_NEW_MULTISYMBOL
static INLINE aom_prob av1_get_pred_prob_comp_ref_p2(const AV1_COMMON *cm, static INLINE aom_prob av1_get_pred_prob_comp_ref_p2(const AV1_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
...@@ -297,13 +285,11 @@ static INLINE aom_prob av1_get_pred_prob_comp_ref_p2(const AV1_COMMON *cm, ...@@ -297,13 +285,11 @@ static INLINE aom_prob av1_get_pred_prob_comp_ref_p2(const AV1_COMMON *cm,
int av1_get_pred_context_comp_bwdref_p(const AV1_COMMON *cm, int av1_get_pred_context_comp_bwdref_p(const AV1_COMMON *cm,
const MACROBLOCKD *xd); const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_bwdref_p( static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_bwdref_p(
const AV1_COMMON *cm, const MACROBLOCKD *xd) { const AV1_COMMON *cm, const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_bwdref_p(cm, xd); const int pred_context = av1_get_pred_context_comp_bwdref_p(cm, xd);
return xd->tile_ctx->comp_bwdref_cdf[pred_context][0]; return xd->tile_ctx->comp_bwdref_cdf[pred_context][0];
} }
#endif // CONFIG_NEW_MULTISYMBOL
static INLINE aom_prob av1_get_pred_prob_comp_bwdref_p(const AV1_COMMON *cm, static INLINE aom_prob av1_get_pred_prob_comp_bwdref_p(const AV1_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
...@@ -314,13 +300,11 @@ static INLINE aom_prob av1_get_pred_prob_comp_bwdref_p(const AV1_COMMON *cm, ...@@ -314,13 +300,11 @@ static INLINE aom_prob av1_get_pred_prob_comp_bwdref_p(const AV1_COMMON *cm,
int av1_get_pred_context_comp_bwdref_p1(const AV1_COMMON *cm, int av1_get_pred_context_comp_bwdref_p1(const AV1_COMMON *cm,
const MACROBLOCKD *xd); const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_bwdref_p1( static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_bwdref_p1(
const AV1_COMMON *cm, const MACROBLOCKD *xd) { const AV1_COMMON *cm, const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_bwdref_p1(cm, xd); const int pred_context = av1_get_pred_context_comp_bwdref_p1(cm, xd);
return xd->tile_ctx->comp_bwdref_cdf[pred_context][1]; return xd->tile_ctx->comp_bwdref_cdf[pred_context][1];