Commit 31296067 authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Use segment tree_cdf with CONFIG_EC_MULTISYMBOL.

Change-Id: I0005c896a243275c052a0163a5da0f9230071743
parent 136cfe46
......@@ -1767,6 +1767,8 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#endif
av1_tree_to_cdf_2D(av1_intra_mode_tree, av1_kf_y_mode_prob, av1_kf_y_mode_cdf,
INTRA_MODES, INTRA_MODES);
#endif
#if CONFIG_EC_MULTISYMBOL
av1_tree_to_cdf(av1_segment_tree, fc->seg.tree_probs, fc->seg.tree_cdf);
#endif
#if CONFIG_DELTA_Q
......@@ -1777,7 +1779,9 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#if CONFIG_DAALA_EC
int av1_switchable_interp_ind[SWITCHABLE_FILTERS];
int av1_switchable_interp_inv[SWITCHABLE_FILTERS];
#endif
#if CONFIG_EC_MULTISYMBOL
void av1_set_mode_cdfs(struct AV1Common *cm) {
FRAME_CONTEXT *fc = cm->fc;
int i, j;
......@@ -1785,7 +1789,7 @@ 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]);
......@@ -1820,6 +1824,7 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
av1_tree_to_cdf(av1_ext_tx_tree, fc->inter_ext_tx_prob[i],
fc->inter_ext_tx_cdf[i]);
#endif
#endif
}
#endif
......
......@@ -359,7 +359,8 @@ extern const aom_tree_index
#if CONFIG_DAALA_EC
extern int av1_switchable_interp_ind[SWITCHABLE_FILTERS];
extern int av1_switchable_interp_inv[SWITCHABLE_FILTERS];
#endif
#if CONFIG_EC_MULTISYMBOL
void av1_set_mode_cdfs(struct AV1Common *cm);
#endif
......
......@@ -48,7 +48,7 @@ struct segmentation {
struct segmentation_probs {
aom_prob tree_probs[SEG_TREE_PROBS];
#if CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
aom_cdf_prob tree_cdf[MAX_SEGMENTS];
#endif
aom_prob pred_probs[PREDICTION_PROBS];
......
......@@ -4303,7 +4303,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
#else
av1_set_mv_cdfs(&fc->nmvc);
#endif
#if CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
av1_set_mode_cdfs(cm);
#endif
#endif
......
......@@ -297,7 +297,7 @@ static PREDICTION_MODE read_inter_compound_mode(AV1_COMMON *cm, MACROBLOCKD *xd,
#endif // CONFIG_EXT_INTER
static int read_segment_id(aom_reader *r, struct segmentation_probs *segp) {
#if CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
return aom_read_symbol(r, segp->tree_cdf, MAX_SEGMENTS, ACCT_STR);
#else
return aom_read_tree(r, av1_segment_tree, segp->tree_probs, ACCT_STR);
......
......@@ -913,7 +913,7 @@ static void pack_txb_tokens(aom_writer *w, const TOKENEXTRA **tp,
static void write_segment_id(aom_writer *w, const struct segmentation *seg,
struct segmentation_probs *segp, int segment_id) {
if (seg->enabled && seg->update_map) {
#if CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
aom_write_symbol(w, segment_id, segp->tree_cdf, MAX_SEGMENTS);
#else
aom_write_tree(w, av1_segment_tree, segp->tree_probs, segment_id, 3, 0);
......@@ -4351,7 +4351,7 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
#else
av1_set_mv_cdfs(&fc->nmvc);
#endif
#if CONFIG_DAALA_EC
#if CONFIG_EC_MULTISYMBOL
av1_set_mode_cdfs(cm);
#endif
#endif
......
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