Commit 9d9eb6c6 authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Use partition_cdf with CONFIG_EC_MULTISYMBOL.

Change-Id: I62b662052a4b9b1de07575824410aa9b2ce2c924
parent 31296067
......@@ -1755,8 +1755,6 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
INTRA_MODES);
av1_tree_to_cdf_1D(av1_switchable_interp_tree, fc->switchable_interp_prob,
fc->switchable_interp_cdf, SWITCHABLE_FILTER_CONTEXTS);
av1_tree_to_cdf_1D(av1_partition_tree, fc->partition_prob, fc->partition_cdf,
PARTITION_CONTEXTS);
av1_tree_to_cdf_1D(av1_inter_mode_tree, fc->inter_mode_probs,
fc->inter_mode_cdf, INTER_MODE_CONTEXTS);
#if !CONFIG_EXT_TX
......@@ -1769,6 +1767,8 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
INTRA_MODES, INTRA_MODES);
#endif
#if CONFIG_EC_MULTISYMBOL
av1_tree_to_cdf_1D(av1_partition_tree, fc->partition_prob, fc->partition_cdf,
PARTITION_CONTEXTS);
av1_tree_to_cdf(av1_segment_tree, fc->seg.tree_probs, fc->seg.tree_cdf);
#endif
#if CONFIG_DELTA_Q
......@@ -1789,14 +1789,14 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
av1_tree_to_cdf(av1_segment_tree, cm->fc->seg.tree_probs,
cm->fc->seg.tree_cdf);
}
#if CONFIG_DAALA_EC
for (i = 0; i < INTRA_MODES; ++i)
av1_tree_to_cdf(av1_intra_mode_tree, fc->uv_mode_prob[i],
fc->uv_mode_cdf[i]);
for (i = 0; i < PARTITION_CONTEXTS; ++i)
av1_tree_to_cdf(av1_partition_tree, fc->partition_prob[i],
fc->partition_cdf[i]);
#if CONFIG_DAALA_EC
for (i = 0; i < INTRA_MODES; ++i)
av1_tree_to_cdf(av1_intra_mode_tree, fc->uv_mode_prob[i],
fc->uv_mode_cdf[i]);
for (i = 0; i < INTRA_MODES; ++i)
for (j = 0; j < INTRA_MODES; ++j)
......
......@@ -168,7 +168,6 @@ typedef struct frame_contexts {
#if CONFIG_DAALA_EC
aom_cdf_prob y_mode_cdf[BLOCK_SIZE_GROUPS][INTRA_MODES];
aom_cdf_prob uv_mode_cdf[INTRA_MODES][INTRA_MODES];
aom_cdf_prob partition_cdf[PARTITION_CONTEXTS][PARTITION_TYPES];
aom_cdf_prob switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS];
aom_cdf_prob inter_mode_cdf[INTER_MODE_CONTEXTS][INTER_MODES];
......@@ -177,6 +176,9 @@ typedef struct frame_contexts {
aom_cdf_prob inter_ext_tx_cdf[EXT_TX_SIZES][TX_TYPES];
#endif
#endif
#if CONFIG_EC_MULTISYMBOL
aom_cdf_prob partition_cdf[PARTITION_CONTEXTS][PARTITION_TYPES];
#endif
#if CONFIG_DELTA_Q
aom_prob delta_q_prob[DELTA_Q_CONTEXTS];
#endif
......
......@@ -1681,7 +1681,7 @@ static PARTITION_TYPE read_partition(AV1_COMMON *cm, MACROBLOCKD *xd,
p = (PARTITION_TYPE)aom_read_tree(r, av1_ext_partition_tree, probs,
ACCT_STR);
#else
#if CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
p = (PARTITION_TYPE)aom_read_symbol(r, cm->fc->partition_cdf[ctx],
PARTITION_TYPES, ACCT_STR);
#else
......
......@@ -2181,7 +2181,7 @@ static void write_partition(const AV1_COMMON *const cm,
av1_write_token(w, av1_ext_partition_tree, probs,
&ext_partition_encodings[p]);
#else
#if CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
aom_write_symbol(w, p, cm->fc->partition_cdf[ctx], PARTITION_TYPES);
#else
av1_write_token(w, av1_partition_tree, probs, &partition_encodings[p]);
......
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