Commit f541932b authored by David Barker's avatar David Barker Committed by Debargha Mukherjee

Fix compile with ext-tx

The switch to using daala_ec by default broke the compile
when used with ext-tx, as some code which should have been
inside #if !CONFIG_EXT_TX was not inside such a block.

Change-Id: I4cec9755bd4e6134a7d3036c4482f952a815cafc
parent 9739f365
......@@ -1502,10 +1502,12 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
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
av1_tree_to_cdf_2D(av1_ext_tx_tree, fc->intra_ext_tx_prob,
fc->intra_ext_tx_cdf, EXT_TX_SIZES, TX_TYPES);
av1_tree_to_cdf_1D(av1_ext_tx_tree, fc->inter_ext_tx_prob,
fc->inter_ext_tx_cdf, EXT_TX_SIZES);
#endif
av1_tree_to_cdf_2D(av1_intra_mode_tree, av1_kf_y_mode_prob, av1_kf_y_mode_cdf,
INTRA_MODES, INTRA_MODES);
av1_tree_to_cdf(av1_segment_tree, fc->seg.tree_probs, fc->seg.tree_cdf);
......@@ -1551,6 +1553,7 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
for (i = 0; i < BLOCK_SIZE_GROUPS; ++i)
av1_tree_to_cdf(av1_intra_mode_tree, fc->y_mode_prob[i], fc->y_mode_cdf[i]);
#if !CONFIG_EXT_TX
for (i = TX_4X4; i < EXT_TX_SIZES; ++i)
for (j = 0; j < TX_TYPES; ++j)
av1_tree_to_cdf(av1_ext_tx_tree, fc->intra_ext_tx_prob[i][j],
......@@ -1559,6 +1562,7 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
for (i = TX_4X4; i < EXT_TX_SIZES; ++i)
av1_tree_to_cdf(av1_ext_tx_tree, fc->inter_ext_tx_prob[i],
fc->inter_ext_tx_cdf[i]);
#endif
}
#endif
......
......@@ -171,9 +171,11 @@ typedef struct frame_contexts {
aom_cdf_prob switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS];
aom_cdf_prob inter_mode_cdf[INTER_MODE_CONTEXTS][INTER_MODES];
#if !CONFIG_EXT_TX
aom_cdf_prob intra_ext_tx_cdf[EXT_TX_SIZES][TX_TYPES][TX_TYPES];
aom_cdf_prob inter_ext_tx_cdf[EXT_TX_SIZES][TX_TYPES];
#endif
#endif
#if CONFIG_DELTA_Q
aom_prob delta_q_prob[DELTA_Q_CONTEXTS];
#endif
......@@ -357,7 +359,7 @@ void av1_setup_past_independence(struct AV1Common *cm);
void av1_adapt_intra_frame_probs(struct AV1Common *cm);
void av1_adapt_inter_frame_probs(struct AV1Common *cm);
#if CONFIG_DAALA_EC
#if CONFIG_DAALA_EC && !CONFIG_EXT_TX
extern int av1_ext_tx_ind[TX_TYPES];
extern int av1_ext_tx_inv[TX_TYPES];
#endif
......
......@@ -53,8 +53,10 @@ static void initialize_dec(void) {
#if CONFIG_DAALA_EC
av1_indices_from_tree(av1_switchable_interp_ind, av1_switchable_interp_inv,
SWITCHABLE_FILTERS, av1_switchable_interp_tree);
#if !CONFIG_EXT_TX
av1_indices_from_tree(av1_ext_tx_ind, av1_ext_tx_inv, TX_TYPES,
av1_ext_tx_tree);
#endif
av1_indices_from_tree(av1_intra_mode_ind, av1_intra_mode_inv, INTRA_MODES,
av1_intra_mode_tree);
av1_indices_from_tree(av1_inter_mode_ind, av1_inter_mode_inv, INTER_MODES,
......
......@@ -177,8 +177,10 @@ void av1_encode_token_init(void) {
/* This hack is necessary because the four TX_TYPES are not consecutive,
e.g., 0, 1, 2, 3, when doing an in-order traversal of the av1_ext_tx_tree
structure. */
#if !CONFIG_EXT_TX
av1_indices_from_tree(av1_ext_tx_ind, av1_ext_tx_inv, TX_TYPES,
av1_ext_tx_tree);
#endif
av1_indices_from_tree(av1_intra_mode_ind, av1_intra_mode_inv, INTRA_MODES,
av1_intra_mode_tree);
av1_indices_from_tree(av1_inter_mode_ind, av1_inter_mode_inv, INTER_MODES,
......
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