Commit 1e4e29f7 authored by Alex Converse's avatar Alex Converse

Fix rans ec_multisymbol merge issues.

The rans experiment is dead. The ans experiment with the ec_multisymbol
experiment also turned on takes its place.

Change-Id: Ie9f30ec7cf73aae6b2ea580a7b1f208485a8a7a7
parent e38d63c8
......@@ -211,7 +211,7 @@ static INLINE int aom_read_tree_(aom_reader *r, const aom_tree_index *tree,
static INLINE int aom_read_symbol_(aom_reader *r, aom_cdf_prob *cdf,
int nsymbs ACCT_STR_PARAM) {
int ret;
#if CONFIG_RANS
#if CONFIG_ANS
(void)nsymbs;
ret = rans_read(r, cdf);
#elif CONFIG_DAALA_EC
......
......@@ -173,7 +173,7 @@ static INLINE void aom_write_tree_record(aom_writer *w,
#if CONFIG_EC_MULTISYMBOL
static INLINE void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf,
int nsymbs) {
#if CONFIG_RANS
#if CONFIG_ANS
struct rans_sym s;
(void)nsymbs;
assert(cdf);
......
......@@ -2807,7 +2807,7 @@ void av1_model_to_full_probs(const aom_prob *model, aom_prob *full) {
extend_to_full_distribution(&full[UNCONSTRAINED_NODES], model[PIVOT_NODE]);
}
#if CONFIG_RANS || CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
static void build_token_cdfs(const aom_prob *pdf_model,
aom_cdf_prob cdf[ENTROPY_TOKENS]) {
int i, sum = 0;
......@@ -2828,7 +2828,7 @@ void av1_coef_pareto_cdfs(FRAME_CONTEXT *fc) {
build_token_cdfs(fc->coef_probs[t][i][j][k][l],
fc->coef_cdfs[t][i][j][k][l]);
}
#endif // CONFIG_RANS
#endif // CONFIG_EC_MULTISYMBOL
void av1_default_coef_probs(AV1_COMMON *cm) {
#if CONFIG_ENTROPY
......@@ -2844,9 +2844,9 @@ void av1_default_coef_probs(AV1_COMMON *cm) {
av1_copy(cm->fc->coef_probs[TX_16X16], default_coef_probs_16x16);
av1_copy(cm->fc->coef_probs[TX_32X32], default_coef_probs_32x32);
#endif // CONFIG_ENTROPY
#if CONFIG_RANS || CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
av1_coef_pareto_cdfs(cm->fc);
#endif // CONFIG_RANS
#endif // CONFIG_EC_MULTISYMBOL
}
#if CONFIG_ADAPT_SCAN
......
......@@ -263,11 +263,6 @@ static INLINE int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a,
return combine_entropy_contexts(above_ec, left_ec);
}
#if CONFIG_RANS
struct frame_contexts;
void av1_coef_pareto_cdfs(struct frame_contexts *fc);
#endif // CONFIG_RANS
#if CONFIG_ENTROPY
#define COEF_COUNT_SAT_BITS 5
#define COEF_MAX_UPDATE_FACTOR_BITS 7
......
......@@ -1789,11 +1789,9 @@ static void write_modes_b(AV1_COMP *cpi, const TileInfo *const tile,
MODE_INFO *m;
int plane;
int bh, bw;
#if CONFIG_RANS
(void)tok;
(void)tok_end;
(void)plane;
#endif // !CONFIG_RANS
#if CONFIG_RD_DEBUG
int64_t txb_coeff_cost[MAX_MB_PLANE] = { 0 };
#endif
#if CONFIG_PVQ
MB_MODE_INFO *mbmi;
BLOCK_SIZE bsize;
......@@ -2738,9 +2736,9 @@ static void update_coef_probs(AV1_COMP *cpi, aom_writer *w) {
const TX_MODE tx_mode = cpi->common.tx_mode;
const TX_SIZE max_tx_size = tx_mode_to_biggest_tx_size[tx_mode];
TX_SIZE tx_size;
#if CONFIG_RANS
#if CONFIG_EC_MULTISYMBOL
int update = 0;
#endif // CONFIG_RANS
#endif // CONFIG_EC_MULTISYMBOL
#if CONFIG_ENTROPY
AV1_COMMON *cm = &cpi->common;
SUBFRAME_STATS *subframe_stats = &cpi->subframe_stats;
......@@ -2788,18 +2786,18 @@ static void update_coef_probs(AV1_COMP *cpi, aom_writer *w) {
update_coef_probs_subframe(w, cpi, tx_size, cpi->branch_ct_buf,
frame_coef_probs);
#if CONFIG_RANS
#if CONFIG_EC_MULTISYMBOL
update = 1;
#endif // CONFIG_RANS
#endif // CONFIG_EC_MULTISYMBOL
} else {
#endif // CONFIG_ENTROPY
build_tree_distribution(cpi, tx_size, frame_branch_ct,
frame_coef_probs);
update_coef_probs_common(w, cpi, tx_size, frame_branch_ct,
frame_coef_probs);
#if CONFIG_RANS
#if CONFIG_EC_MULTISYMBOL
update = 1;
#endif // CONFIG_RANS
#endif // CONFIG_EC_MULTISYMBOL
#if CONFIG_ENTROPY
}
#endif // CONFIG_ENTROPY
......@@ -2826,9 +2824,9 @@ static void update_coef_probs(AV1_COMP *cpi, aom_writer *w) {
av1_copy(cm->counts.eob_branch, eob_counts_copy);
}
#endif // CONFIG_ENTROPY
#if CONFIG_RANS
#if CONFIG_EC_MULTISYMBOL
if (update) av1_coef_pareto_cdfs(cpi->common.fc);
#endif // CONFIG_RANS
#endif // CONFIG_EC_MULTISYMBOL
}
#endif
......
......@@ -306,12 +306,12 @@ const av1_extra_bit av1_extra_bits_high12[ENTROPY_TOKENS] = {
};
#endif
#if !CONFIG_RANS
#if !CONFIG_EC_MULTISYMBOL
const struct av1_token av1_coef_encodings[ENTROPY_TOKENS] = {
{ 2, 2 }, { 6, 3 }, { 28, 5 }, { 58, 6 }, { 59, 6 }, { 60, 6 },
{ 61, 6 }, { 124, 7 }, { 125, 7 }, { 126, 7 }, { 127, 7 }, { 0, 1 }
};
#endif // !CONFIG_RANS
#endif // !CONFIG_EC_MULTISYMBOL
struct tokenize_b_args {
const AV1_COMP *cpi;
......
......@@ -46,9 +46,9 @@ typedef struct {
extern const aom_tree_index av1_coef_tree[];
extern const aom_tree_index av1_coef_con_tree[];
#if !CONFIG_RANS
#if !CONFIG_EC_MULTISYMBOL
extern const struct av1_token av1_coef_encodings[];
#endif // !CONFIG_RANS
#endif // !CONFIG_EC_MULTISYMBOL
int av1_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
int av1_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
......
......@@ -271,7 +271,6 @@ EXPERIMENT_LIST="
new_quant
supertx
ans
rans
ec_multisymbol
loop_restoration
ext_partition
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment