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)] = {
};
/* clang-format on */
#if CONFIG_NEW_MULTISYMBOL
/* 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_cdf[] = { av1_cat1_cdf0 };
......@@ -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[] = {
av1_cat6_cdf0, av1_cat6_cdf1, av1_cat6_cdf2, av1_cat6_cdf3, av1_cat6_cdf4
};
#endif
/* Extra bits coded from MSB to LSB */
const aom_prob av1_cat1_prob[] = { 159 };
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[],
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].fp_cdf)
#if CONFIG_NEW_MULTISYMBOL
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].class0_hp_cdf)
AVERAGE_TILE_CDFS(nmvc[j].comps[k].class0_cdf)
AVERAGE_TILE_CDFS(nmvc[j].comps[k].bits_cdf)
#endif
}
}
}
......@@ -1689,10 +1685,8 @@ void av1_average_tile_loopfilter_cdfs(FRAME_CONTEXT *fc,
#if CONFIG_LOOP_RESTORATION
AVERAGE_TILE_CDFS(switchable_restore_cdf)
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(wiener_restore_cdf)
AVERAGE_TILE_CDFS(sgrproj_restore_cdf)
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_LOOP_RESTORATION
}
......@@ -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(seg.tree_cdf)
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(seg.pred_cdf)
#endif
AVERAGE_TILE_CDFS(uv_mode_cdf)
#if CONFIG_CFL
......@@ -1731,10 +1723,8 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
#endif
#endif
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(skip_cdfs)
AVERAGE_TILE_CDFS(txfm_partition_cdf)
#endif // CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(palette_y_size_cdf)
AVERAGE_TILE_CDFS(palette_uv_size_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[],
#if CONFIG_MRC_TX
AVERAGE_TILE_CDFS(mrc_mask_intra_cdf)
#endif // CONFIG_MRC_TX
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(palette_y_mode_cdf)
AVERAGE_TILE_CDFS(palette_uv_mode_cdf)
#endif
#if CONFIG_LPF_SB
AVERAGE_TILE_CDFS(lpf_reuse_cdf);
AVERAGE_TILE_CDFS(lpf_delta_cdf);
......@@ -1771,13 +1759,10 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
#endif
aom_cdf_prob *fc_cdf_ptr;
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(comp_inter_cdf)
AVERAGE_TILE_CDFS(comp_ref_cdf)
AVERAGE_TILE_CDFS(comp_bwdref_cdf)
#endif
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(single_ref_cdf)
AVERAGE_TILE_CDFS(newmv_cdf)
......@@ -1787,7 +1772,6 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
#if CONFIG_EXT_COMP_REFS
AVERAGE_TILE_CDFS(uni_comp_ref_cdf)
AVERAGE_TILE_CDFS(comp_ref_type_cdf)
#endif
#endif
// FIXME: cdfs not defined for super_tx
......@@ -1796,10 +1780,8 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
AVERAGE_TILE_CDFS(compound_type_cdf)
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(interintra_cdf)
AVERAGE_TILE_CDFS(wedge_interintra_cdf)
#endif
AVERAGE_TILE_CDFS(interintra_mode_cdf)
/* 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,
if (cm->interp_filter == SWITCHABLE) {
AVERAGE_TILE_CDFS(switchable_interp_cdf)
}
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(intra_inter_cdf)
AVERAGE_TILE_CDFS(motion_mode_cdf)
AVERAGE_TILE_CDFS(obmc_cdf)
#endif
#if CONFIG_MRC_TX
AVERAGE_TILE_CDFS(mrc_mask_inter_cdf)
#endif // CONFIG_MRC_TX
......@@ -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]);
#endif
#if CONFIG_JNT_COMP
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(compound_index_cdf);
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_JNT_COMP
}
......@@ -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_cat5_prob[5]);
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_cat2_cdf[];
extern const aom_cdf_prob *av1_cat3_cdf[];
extern const aom_cdf_prob *av1_cat4_cdf[];
extern const aom_cdf_prob *av1_cat5_cdf[];
extern const aom_cdf_prob *av1_cat6_cdf[];
#endif
#define EOB_MODEL_TOKEN 3
typedef struct {
#if CONFIG_NEW_MULTISYMBOL
const aom_cdf_prob **cdf;
#else
const aom_prob *prob;
#endif
int len;
int base_val;
const int16_t *cost;
......@@ -177,10 +171,8 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size,
#endif
int tx_offset = (int)(tx_size - TX_4X4);
int bits = (int)bit_depth + 3 + tx_offset;
#if CONFIG_NEW_MULTISYMBOL
// Round up
bits = AOMMIN((int)sizeof(av1_cat6_prob), ((bits + 3) & ~3));
#endif
assert(bits <= (int)sizeof(av1_cat6_prob));
return bits;
}
......
This diff is collapsed.
......@@ -181,12 +181,10 @@ typedef struct frame_contexts {
aom_prob zeromv_prob[GLOBALMV_MODE_CONTEXTS];
aom_prob refmv_prob[REFMV_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 zeromv_cdf[GLOBALMV_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)];
#endif
aom_prob inter_compound_mode_probs[INTER_MODE_CONTEXTS]
[INTER_COMPOUND_MODES - 1];
......@@ -197,18 +195,14 @@ typedef struct frame_contexts {
aom_prob interintra_prob[BLOCK_SIZE_GROUPS];
aom_prob wedge_interintra_prob[BLOCK_SIZES_ALL];
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 wedge_interintra_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)];
#endif
aom_cdf_prob interintra_mode_cdf[BLOCK_SIZE_GROUPS]
[CDF_SIZE(INTERINTRA_MODES)];
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_prob obmc_prob[BLOCK_SIZES_ALL];
#if CONFIG_NEW_MULTISYMBOL
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 comp_inter_prob[COMP_INTER_CONTEXTS];
aom_cdf_prob palette_y_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)];
......@@ -226,51 +220,34 @@ typedef struct frame_contexts {
aom_cdf_prob mrc_mask_intra_cdf[PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS]
[CDF_SIZE(PALETTE_COLORS)];
#endif // CONFIG_MRC_TX
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob palette_y_mode_cdf[PALETTE_BLOCK_SIZES][PALETTE_Y_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 single_ref_cdf[REF_CONTEXTS][SINGLE_REFS - 1][CDF_SIZE(2)];
#endif
#if CONFIG_EXT_COMP_REFS
aom_prob comp_ref_type_prob[COMP_REF_TYPE_CONTEXTS];
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 uni_comp_ref_cdf[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1]
[CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_EXT_COMP_REFS
aom_prob single_ref_prob[REF_CONTEXTS][SINGLE_REFS - 1];
aom_prob comp_ref_prob[REF_CONTEXTS][FWD_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_bwdref_cdf[REF_CONTEXTS][BWD_REFS - 1][CDF_SIZE(2)];
#endif
aom_prob txfm_partition_prob[TXFM_PARTITION_CONTEXTS];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob txfm_partition_cdf[TXFM_PARTITION_CONTEXTS][CDF_SIZE(2)];
#endif
#if CONFIG_JNT_COMP
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob compound_index_cdf[COMP_INDEX_CONTEXTS][CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL
aom_prob compound_index_probs[COMP_INDEX_CONTEXTS];
#endif // CONFIG_JNT_COMP
#if CONFIG_NEW_MULTISYMBOL
#if CONFIG_EXT_SKIP
aom_cdf_prob skip_mode_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)];
#endif // CONFIG_EXT_SKIP
aom_cdf_prob skip_cdfs[SKIP_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];
#if CONFIG_INTRABC
nmv_context ndvc;
......@@ -284,10 +261,8 @@ typedef struct frame_contexts {
#endif // CONFIG_FILTER_INTRA
#if CONFIG_LOOP_RESTORATION
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 sgrproj_restore_cdf[CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_LOOP_RESTORATION
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)];
......
......@@ -59,7 +59,6 @@ static const nmv_context default_nmv_context = {
{ AOM_CDF4(8192, 17408, 21248) }, // fp_cdf
160, // class0_hp bit
128, // hp
#if CONFIG_NEW_MULTISYMBOL
{ AOM_CDF2(128 * 128) },
{ AOM_CDF2(160 * 128) },
{ AOM_CDF2(128 * 128) },
......@@ -74,7 +73,6 @@ static const nmv_context default_nmv_context = {
{ AOM_CDF2(128 * 234) },
{ AOM_CDF2(128 * 234) },
{ AOM_CDF2(128 * 240) } }, // bits_cdf
#endif
},
{
// Horizontal component
......@@ -91,7 +89,6 @@ static const nmv_context default_nmv_context = {
{ AOM_CDF4(8192, 17408, 21248) }, // fp_cdf
160, // class0_hp bit
128, // hp
#if CONFIG_NEW_MULTISYMBOL
{ AOM_CDF2(128 * 128) },
{ AOM_CDF2(160 * 128) },
{ AOM_CDF2(128 * 128) },
......@@ -106,7 +103,6 @@ static const nmv_context default_nmv_context = {
{ AOM_CDF2(128 * 234) },
{ AOM_CDF2(128 * 234) },
{ AOM_CDF2(128 * 240) } }, // bits_cdf
#endif
} },
};
......
......@@ -66,9 +66,7 @@ typedef enum {
#define CLASS0_BITS 1 /* bits at integer precision for class 0 */
#define CLASS0_SIZE (1 << CLASS0_BITS)
#define MV_OFFSET_BITS (MV_CLASSES + CLASS0_BITS - 2)
#if CONFIG_NEW_MULTISYMBOL
#define MV_BITS_CONTEXTS 6
#endif
#define MV_FP_SIZE 4
#define MV_MAX_BITS (MV_CLASSES + CLASS0_BITS + 2)
......@@ -96,13 +94,11 @@ typedef struct {
aom_cdf_prob fp_cdf[CDF_SIZE(MV_FP_SIZE)];
aom_prob class0_hp;
aom_prob hp;
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob sign_cdf[CDF_SIZE(2)];
aom_cdf_prob class0_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 bits_cdf[MV_OFFSET_BITS][CDF_SIZE(2)];
#endif
} nmv_component;
typedef struct {
......
......@@ -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) {
(void)cm;
#if CONFIG_NEW_MULTISYMBOL
return 0;
#else
return 1;
#endif // CONFIG_NEW_MULTISYMBOL
}
#ifdef __cplusplus
......
......@@ -129,12 +129,10 @@ static INLINE int get_comp_index_context(const AV1_COMMON *cm,
}
#endif // CONFIG_JNT_COMP
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_seg_id(
struct segmentation_probs *segp, const MACROBLOCKD *xd) {
return segp->pred_cdf[av1_get_pred_context_seg_id(xd)];
}
#endif
#if CONFIG_EXT_SKIP
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,
const MACROBLOCKD *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,
const MACROBLOCKD *xd) {
return xd->tile_ctx->comp_inter_cdf[av1_get_reference_mode_context(cm, xd)];
}
#endif
#if CONFIG_EXT_COMP_REFS
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) {
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(
const MACROBLOCKD *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(
const int pred_context = av1_get_pred_context_uni_comp_ref_p2(xd);
return xd->tile_ctx->uni_comp_ref_cdf[pred_context][2];
}
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_EXT_COMP_REFS
int av1_get_pred_context_comp_ref_p(const AV1_COMMON *cm,
const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p(const AV1_COMMON *cm,
const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_ref_p(cm, xd);
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,
const MACROBLOCKD *xd) {
......@@ -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,
const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p1(
const AV1_COMMON *cm, const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_ref_p1(cm, xd);
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,
const MACROBLOCKD *xd) {
......@@ -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,
const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_ref_p2(
const AV1_COMMON *cm, const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_ref_p2(cm, xd);
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,
const MACROBLOCKD *xd) {
......@@ -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,
const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_bwdref_p(
const AV1_COMMON *cm, const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_bwdref_p(cm, xd);
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,
const MACROBLOCKD *xd) {
......@@ -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,
const MACROBLOCKD *xd);
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_comp_bwdref_p1(
const AV1_COMMON *cm, const MACROBLOCKD *xd) {
const int pred_context = av1_get_pred_context_comp_bwdref_p1(cm, xd);
return xd->tile_ctx->comp_bwdref_cdf[pred_context][1];
}
#endif // CONFIG_NEW_MULTISYMBOL
static INLINE aom_prob av1_get_pred_prob_comp_bwdref_p1(const AV1_COMMON *cm,
const MACROBLOCKD *xd) {
......@@ -370,7 +354,6 @@ static INLINE aom_prob av1_get_pred_prob_single_ref_p6(const AV1_COMMON *cm,
return cm->fc->single_ref_prob[av1_get_pred_context_single_ref_p6(xd)][5];
}
#if CONFIG_NEW_MULTISYMBOL
static INLINE aom_cdf_prob *av1_get_pred_cdf_single_ref_p1(
const AV1_COMMON *cm, const MACROBLOCKD *xd) {
(void)cm;
......@@ -407,7 +390,6 @@ static INLINE aom_cdf_prob *av1_get_pred_cdf_single_ref_p6(
return xd->tile_ctx
->single_ref_cdf[av1_get_pred_context_single_ref_p6(xd)][5];
}
#endif // CONFIG_NEW_MULTISYMBOL
// Returns a context number for the given MB prediction signal
// The mode info data structure has a one element border above and to the
......
......@@ -76,16 +76,10 @@ struct segmentation_probs {
aom_prob tree_probs[SEG_TREE_PROBS];
aom_cdf_prob tree_cdf[CDF_SIZE(MAX_SEGMENTS)];
aom_prob pred_probs[PREDICTION_PROBS];
#if CONFIG_NEW_MULTISYMBOL
aom_cdf_prob pred_cdf[PREDICTION_PROBS][CDF_SIZE(2)];
#if CONFIG_Q_SEGMENTATION
aom_cdf_prob q_seg_cdf[Q_SEGMENT_CDF_COUNT][CDF_SIZE(MAX_SEGMENTS)];
#endif
#else
#if CONFIG_Q_SEGMENTATION
aom_prob q_seg_cdf[Q_SEGMENT_CDF_COUNT][CDF_SIZE(MAX_SEGMENTS)];
#endif
#endif
};
static INLINE int segfeature_active(const struct segmentation *seg,
......
......@@ -147,20 +147,6 @@ static TX_MODE read_tx_mode(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
}
#endif // CONFIG_SIMPLIFY_TX_MODE
#if !CONFIG_NEW_MULTISYMBOL
static void read_inter_mode_probs(FRAME_CONTEXT *fc, aom_reader *r) {
int i;
for (i = 0; i < NEWMV_MODE_CONTEXTS; ++i)
av1_diff_update_prob(r, &fc->newmv_prob[i], ACCT_STR);
for (i = 0; i < GLOBALMV_MODE_CONTEXTS; ++i)
av1_diff_update_prob(r, &fc->zeromv_prob[i], ACCT_STR);
for (i = 0; i < REFMV_MODE_CONTEXTS; ++i)
av1_diff_update_prob(r, &fc->refmv_prob[i], ACCT_STR);
for (i = 0; i < DRL_MODE_CONTEXTS; ++i)
av1_diff_update_prob(r, &fc->drl_prob[i], ACCT_STR);
}
#endif
static REFERENCE_MODE read_frame_reference_mode(
const AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
if (is_compound_reference_allowed(cm)) {
......@@ -176,63 +162,6 @@ static REFERENCE_MODE read_frame_reference_mode(
}
}
#if !CONFIG_NEW_MULTISYMBOL
static void read_frame_reference_mode_probs(AV1_COMMON *cm, aom_reader *r) {
FRAME_CONTEXT *const fc = cm->fc;
int i;
if (cm->reference_mode == REFERENCE_MODE_SELECT)
for (i = 0; i < COMP_INTER_CONTEXTS; ++i)
av1_diff_update_prob(r, &fc->comp_inter_prob[i], ACCT_STR);
if (cm->reference_mode != COMPOUND_REFERENCE) {
for (i = 0; i < REF_CONTEXTS; ++i) {
int j;
for (j = 0; j < (SINGLE_REFS - 1); ++j) {
av1_diff_update_prob(r, &fc->single_ref_prob[i][j], ACCT_STR);
}
}
}
if (cm->reference_mode != SINGLE_REFERENCE) {
#if CONFIG_EXT_COMP_REFS
for (i = 0; i < COMP_REF_TYPE_CONTEXTS; ++i)
av1_diff_update_prob(r, &fc->comp_ref_type_prob[i], ACCT_STR);
for (i = 0; i < UNI_COMP_REF_CONTEXTS; ++i) {
int j;
for (j = 0; j < (UNIDIR_COMP_REFS - 1); ++j)
av1_diff_update_prob(r, &fc->uni_comp_ref_prob[i][j], ACCT_STR);
}
#endif // CONFIG_EXT_COMP_REFS
for (i = 0; i < REF_CONTEXTS; ++i) {
int j;
for (j = 0; j < (FWD_REFS - 1); ++j)
av1_diff_update_prob(r, &fc->comp_ref_prob[i][j], ACCT_STR);
for (j = 0; j < (BWD_REFS - 1); ++j)
av1_diff_update_prob(r, &fc->comp_bwdref_prob[i][j], ACCT_STR);
}
}
}
static void update_mv_probs(aom_prob *p, int n, aom_reader *r) {
int i;
for (i = 0; i < n; ++i) av1_diff_update_prob(r, &p[i], ACCT_STR);
}
static void read_mv_probs(nmv_context *ctx, int allow_hp, aom_reader *r) {
int i;
if (allow_hp) {
for (i = 0; i < 2; ++i) {
nmv_component *const comp_ctx = &ctx->comps[i];
update_mv_probs(&comp_ctx->class0_hp, 1, r);
update_mv_probs(&comp_ctx->hp, 1, r);
}
}
}
#endif
static void inverse_transform_block(MACROBLOCKD *xd, int plane,
const TX_TYPE tx_type,
const TX_SIZE tx_size, uint8_t *dst,
......@@ -1257,22 +1186,14 @@ static void loop_restoration_read_sb_coeffs(const AV1_COMMON *const cm,
default: assert(rui->restoration_type == RESTORE_NONE); break;
}
} else if (rsi->frame_restoration_type == RESTORE_WIENER) {
#if CONFIG_NEW_MULTISYMBOL
if (aom_read_symbol(r, xd->tile_ctx->wiener_restore_cdf, 2, ACCT_STR)) {
#else
if (aom_read(r, RESTORE_NONE_WIENER_PROB, ACCT_STR)) {
#endif // CONFIG_NEW_MULTISYMBOL
rui->restoration_type = RESTORE_WIENER;
read_wiener_filter(wiener_win, &rui->wiener_info, wiener_info, r);
} else {
rui->restoration_type = RESTORE_NONE;
}
} else if (rsi->frame_restoration_type == RESTORE_SGRPROJ) {
#if CONFIG_NEW_MULTISYMBOL
if (aom_read_symbol(r, xd->tile_ctx->sgrproj_restore_cdf, 2, ACCT_STR)) {
#else
if (aom_read(r, RESTORE_NONE_SGRPROJ_PROB, ACCT_STR)) {
#endif // CONFIG_NEW_MULTISYMBOL
rui->restoration_type = RESTORE_SGRPROJ;
read_sgrproj_filter(&rui->sgrproj_info, sgrproj_info, r);
} else {
......@@ -3333,74 +3254,10 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
size_t partition_size) {
#if CONFIG_NEW_MULTISYMBOL
(void)pbi;
(void)data;
(void)partition_size;
return 0;
#else
AV1_COMMON *const cm = &pbi->common;
aom_reader r;
FRAME_CONTEXT *const fc = cm->fc;
#if CONFIG_ANS && ANS_MAX_SYMBOLS
r.window_size = 1 << cm->ans_window_size_log2;
#endif
if (aom_reader_init(&r, data, partition_size, pbi->decrypt_cb,
pbi->decrypt_state))
aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate bool decoder 0");
if (cm->tx_mode == TX_MODE_SELECT)
for (int i = 0; i < TXFM_PARTITION_CONTEXTS; ++i)
av1_diff_update_prob(&r, &fc->txfm_partition_prob[i], ACCT_STR);
for (int i = 0; i < SKIP_CONTEXTS; ++i)
av1_diff_update_prob(&r, &fc->skip_probs[i], ACCT_STR);
#if CONFIG_JNT_COMP
for (int i = 0; i < COMP_INDEX_CONTEXTS; ++i)
av1_diff_update_prob(&r, &fc->compound_index_probs[i], ACCT_STR);
#endif // CONFIG_JNT_COMP
if (!frame_is_intra_only(cm)) {
read_inter_mode_probs(fc, &r);
if (cm->reference_mode != COMPOUND_REFERENCE &&
cm->allow_interintra_compound) {
for (int i = 0; i < BLOCK_SIZE_GROUPS; i++) {
if (is_interintra_allowed_bsize_group(i)) {
av1_diff_update_prob(&r, &fc->interintra_prob[i], ACCT_STR);
}
}
#if CONFIG_EXT_PARTITION_TYPES
int block_sizes_to_update = BLOCK_SIZES_ALL;
#else
int block_sizes_to_update = BLOCK_SIZES;
#endif
for (int i = 0; i < block_sizes_to_update; i++) {
if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i)) {
av1_diff_update_prob(&r, &fc->wedge_interintra_prob[i], ACCT_STR);
}
}
}
for (int i = 0; i < INTRA_INTER_CONTEXTS; i++)
av1_diff_update_prob(&r, &fc->intra_inter_prob[i], ACCT_STR);
read_frame_reference_mode_probs(cm, &r);
#if CONFIG_AMVR
if (cm->cur_frame_force_integer_mv == 0) {
#endif
for (int i = 0; i < NMV_CONTEXTS; ++i)
read_mv_probs(&fc->nmvc[i], cm->allow_high_precision_mv, &r);
#if CONFIG_AMVR
}
#endif
}
return aom_reader_has_error(&r);
#endif // CONFIG_NEW_MULTISYMBOL
}
#ifdef NDEBUG
......@@ -3815,9 +3672,6 @@ void av1_decode_tg_tiles_and_wrapup(AV1Decoder *pbi, const uint8_t *data,