Commit 98b0b3e9 authored by Hui Su's avatar Hui Su

Remove probablity model for tx type

It's not being used anymore, replaced by the CDF model.
The counters are moved under the entropy-stats experiment, so that they
can be used to tune the default CDF values.

Change-Id: I50cb170c4c8699cf7317fd77853b3fedf2342d3e
parent ddbcde28
......@@ -1408,10 +1408,6 @@ static const aom_cdf_prob default_delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)] = {
};
#endif
#endif
#if CONFIG_EXT_TX
int av1_ext_tx_ind[EXT_TX_SET_TYPES][TX_TYPES];
int av1_ext_tx_inv[EXT_TX_SET_TYPES][TX_TYPES];
#endif
#if CONFIG_SMOOTH_HV
const int av1_intra_mode_ind[INTRA_MODES] = { 0, 2, 3, 6, 4, 5, 8,
......@@ -2538,376 +2534,9 @@ const aom_tree_index av1_ext_tx_tree[EXT_TX_SET_TYPES][TREE_SIZE(TX_TYPES)] = {
},
};
/* clang-format on */
static const aom_prob
default_inter_ext_tx_prob[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES - 1] = {
{
// ToDo(yaowu): remove unused entry 0.
#if CONFIG_CHROMA_2X2
{ 0 },
#endif
{ 0 },
{ 0 },
{ 0 },
{ 0 },
},
{
#if CONFIG_CHROMA_2X2
{ 0 },
#endif
{ 10, 24, 30, 128, 128, 128, 128, 112, 160, 128, 128, 128, 128, 128,
128 },
{ 10, 24, 30, 128, 128, 128, 128, 112, 160, 128, 128, 128, 128, 128,
128 },
{ 10, 24, 30, 128, 128, 128, 128, 112, 160, 128, 128, 128, 128, 128,
128 },
{ 10, 24, 30, 128, 128, 128, 128, 112, 160, 128, 128, 128, 128, 128,
128 },
},
{
#if CONFIG_CHROMA_2X2
{ 0 },
#endif
{ 10, 30, 128, 112, 160, 128, 128, 128, 128, 128, 128 },
{ 10, 30, 128, 112, 160, 128, 128, 128, 128, 128, 128 },
{ 10, 30, 128, 112, 160, 128, 128, 128, 128, 128, 128 },
{ 10, 30, 128, 112, 160, 128, 128, 128, 128, 128, 128 },
},
{
#if CONFIG_CHROMA_2X2
{ 0 },
#endif
{ 12 },
{ 12 },
{ 12 },
{ 12 },
},
#if CONFIG_MRC_TX
{
#if CONFIG_CHROMA_2X2
{ 0 },
#endif
{ 12, 128 },
{ 12, 128 },
{ 12, 128 },
{ 12, 128 },
}
#endif // CONFIG_MRC_TX
};
// TODO(urvang): 3rd context should be tx_type instead of intra mode just like
// the baseline.
static const aom_prob
default_intra_ext_tx_prob[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
[TX_TYPES - 1] = {
{
// ToDo(yaowu): remove unused entry 0.
#if CONFIG_CHROMA_2X2
{
{ 0 },
},
#endif
{
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
#if CONFIG_SMOOTH_HV
{ 0 },
{ 0 },
#endif // CONFIG_SMOOTH_HV
{ 0 },
},
{
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
#if CONFIG_SMOOTH_HV
{ 0 },
{ 0 },
#endif // CONFIG_SMOOTH_HV
{ 0 },
},
{
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
#if CONFIG_SMOOTH_HV
{ 0 },
{ 0 },
#endif // CONFIG_SMOOTH_HV
{ 0 },
},
{
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
#if CONFIG_SMOOTH_HV
{ 0 },
{ 0 },
#endif // CONFIG_SMOOTH_HV
{ 0 },
},
},
{
#if CONFIG_CHROMA_2X2
{
{ 0 },
},
#endif
{
{ 8, 224, 32, 128, 64, 128 },
{ 10, 32, 32, 128, 16, 192 },
{ 10, 32, 32, 128, 16, 64 },
{ 9, 200, 32, 128, 64, 128 },
{ 8, 8, 32, 128, 224, 128 },
{ 10, 32, 32, 128, 16, 192 },
{ 10, 32, 32, 128, 16, 64 },
{ 10, 23, 32, 128, 80, 176 },
{ 10, 23, 32, 128, 80, 176 },
{ 10, 32, 32, 128, 16, 64 },
#if CONFIG_SMOOTH_HV
{ 10, 32, 32, 128, 16, 64 },
{ 10, 32, 32, 128, 16, 64 },
#endif // CONFIG_SMOOTH_HV
{ 10, 32, 32, 128, 16, 64 },
},
{
{ 8, 224, 32, 128, 64, 128 },
{ 10, 32, 32, 128, 16, 192 },
{ 10, 32, 32, 128, 16, 64 },
{ 9, 200, 32, 128, 64, 128 },
{ 8, 8, 32, 128, 224, 128 },
{ 10, 32, 32, 128, 16, 192 },
{ 10, 32, 32, 128, 16, 64 },
{ 10, 23, 32, 128, 80, 176 },
{ 10, 23, 32, 128, 80, 176 },
{ 10, 32, 32, 128, 16, 64 },
#if CONFIG_SMOOTH_HV
{ 10, 32, 32, 128, 16, 64 },
{ 10, 32, 32, 128, 16, 64 },
#endif // CONFIG_SMOOTH_HV
{ 10, 32, 32, 128, 16, 64 },
},
{
{ 8, 224, 32, 128, 64, 128 },
{ 10, 32, 32, 128, 16, 192 },
{ 10, 32, 32, 128, 16, 64 },
{ 9, 200, 32, 128, 64, 128 },
{ 8, 8, 32, 128, 224, 128 },
{ 10, 32, 32, 128, 16, 192 },
{ 10, 32, 32, 128, 16, 64 },
{ 10, 23, 32, 128, 80, 176 },
{ 10, 23, 32, 128, 80, 176 },
{ 10, 32, 32, 128, 16, 64 },
#if CONFIG_SMOOTH_HV
{ 10, 32, 32, 128, 16, 64 },
{ 10, 32, 32, 128, 16, 64 },
#endif // CONFIG_SMOOTH_HV
{ 10, 32, 32, 128, 16, 64 },
},
{
{ 8, 224, 32, 128, 64, 128 },
{ 10, 32, 32, 128, 16, 192 },
{ 10, 32, 32, 128, 16, 64 },
{ 9, 200, 32, 128, 64, 128 },
{ 8, 8, 32, 128, 224, 128 },
{ 10, 32, 32, 128, 16, 192 },
{ 10, 32, 32, 128, 16, 64 },
{ 10, 23, 32, 128, 80, 176 },
{ 10, 23, 32, 128, 80, 176 },
{ 10, 32, 32, 128, 16, 64 },
#if CONFIG_SMOOTH_HV
{ 10, 32, 32, 128, 16, 64 },
{ 10, 32, 32, 128, 16, 64 },
#endif // CONFIG_SMOOTH_HV
{ 10, 32, 32, 128, 16, 64 },
},
},
{
#if CONFIG_CHROMA_2X2
{
{ 0 },
},
#endif
{
{ 8, 224, 64, 128 },
{ 10, 32, 16, 192 },
{ 10, 32, 16, 64 },
{ 9, 200, 64, 128 },
{ 8, 8, 224, 128 },
{ 10, 32, 16, 192 },
{ 10, 32, 16, 64 },
{ 10, 23, 80, 176 },
{ 10, 23, 80, 176 },
{ 10, 32, 16, 64 },
#if CONFIG_SMOOTH_HV
{ 10, 32, 16, 64 },
{ 10, 32, 16, 64 },
#endif // CONFIG_SMOOTH_HV
{ 10, 32, 16, 64 },
},
{
{ 8, 224, 64, 128 },
{ 10, 32, 16, 192 },
{ 10, 32, 16, 64 },
{ 9, 200, 64, 128 },
{ 8, 8, 224, 128 },
{ 10, 32, 16, 192 },
{ 10, 32, 16, 64 },
{ 10, 23, 80, 176 },
{ 10, 23, 80, 176 },
{ 10, 32, 16, 64 },
#if CONFIG_SMOOTH_HV
{ 10, 32, 16, 64 },
{ 10, 32, 16, 64 },
#endif // CONFIG_SMOOTH_HV
{ 10, 32, 16, 64 },
},
{
{ 8, 224, 64, 128 },
{ 10, 32, 16, 192 },
{ 10, 32, 16, 64 },
{ 9, 200, 64, 128 },
{ 8, 8, 224, 128 },
{ 10, 32, 16, 192 },
{ 10, 32, 16, 64 },
{ 10, 23, 80, 176 },
{ 10, 23, 80, 176 },
{ 10, 32, 16, 64 },
#if CONFIG_SMOOTH_HV
{ 10, 32, 16, 64 },
{ 10, 32, 16, 64 },
#endif // CONFIG_SMOOTH_HV
{ 10, 32, 16, 64 },
},
{
{ 8, 224, 64, 128 },
{ 10, 32, 16, 192 },
{ 10, 32, 16, 64 },
{ 9, 200, 64, 128 },
{ 8, 8, 224, 128 },
{ 10, 32, 16, 192 },
{ 10, 32, 16, 64 },
{ 10, 23, 80, 176 },
{ 10, 23, 80, 176 },
{ 10, 32, 16, 64 },
#if CONFIG_SMOOTH_HV
{ 10, 32, 16, 64 },
{ 10, 32, 16, 64 },
#endif // CONFIG_SMOOTH_HV
{ 10, 32, 16, 64 },
},
},
#if CONFIG_MRC_TX
{
// ToDo(yaowu): remove unused entry 0.
#if CONFIG_CHROMA_2X2
{
{ 0 },
},
#endif
{
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
#if CONFIG_SMOOTH_HV
{ 128 },
{ 128 },
#endif // CONFIG_SMOOTH_HV
{ 128 },
},
{
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
#if CONFIG_SMOOTH_HV
{ 128 },
{ 128 },
#endif // CONFIG_SMOOTH_HV
{ 128 },
},
{
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
#if CONFIG_SMOOTH_HV
{ 128 },
{ 128 },
#endif // CONFIG_SMOOTH_HV
{ 128 },
},
{
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
{ 128 },
#if CONFIG_SMOOTH_HV
{ 128 },
{ 128 },
#endif // CONFIG_SMOOTH_HV
{ 128 },
},
},
#endif // CONFIG_MRC_TX
};
#else // !CONFIG_EXT_TX
int av1_ext_tx_ind[EXT_TX_SET_TYPES][TX_TYPES];
int av1_ext_tx_inv[EXT_TX_SET_TYPES][TX_TYPES];
#else // !CONFIG_EXT_TX
/* clang-format off */
#if CONFIG_MRC_TX
const aom_tree_index av1_ext_tx_tree[TREE_SIZE(TX_TYPES)] = {
......@@ -2924,65 +2553,8 @@ const aom_tree_index av1_ext_tx_tree[TREE_SIZE(TX_TYPES)] = {
};
#endif // CONFIG_MRC_TX
/* clang-format on */
int av1_ext_tx_ind[TX_TYPES];
int av1_ext_tx_inv[TX_TYPES];
#if CONFIG_MRC_TX
static const aom_prob default_intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES]
[TX_TYPES - 1] = {
#if CONFIG_CHROMA_2X2
{ { 240, 1, 85, 128 },
{ 4, 1, 1, 248 },
{ 4, 1, 1, 8 },
{ 4, 1, 248, 128 },
{ 4, 1, 248, 128 } },
#endif
{ { 240, 1, 85, 128 },
{ 4, 1, 1, 248 },
{ 4, 1, 1, 8 },
{ 4, 1, 248, 128 },
{ 4, 1, 248, 128 } },
{ { 244, 1, 85, 128 },
{ 8, 1, 2, 248 },
{ 8, 1, 2, 8 },
{ 8, 1, 248, 128 },
{ 4, 1, 248, 128 } },
{ { 248, 128, 85, 128 },
{ 16, 128, 4, 248 },
{ 16, 128, 4, 8 },
{ 16, 128, 248, 128 },
{ 4, 1, 248, 128 } },
};
static const aom_prob default_inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1] = {
#if CONFIG_CHROMA_2X2
{ 160, 1, 85, 128 },
#endif
{ 160, 1, 85, 128 },
{ 176, 1, 85, 128 },
{ 192, 128, 85, 128 },
};
#else
static const aom_prob
default_intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1] = {
#if CONFIG_CHROMA_2X2
{ { 240, 85, 128 }, { 4, 1, 248 }, { 4, 1, 8 }, { 4, 248, 128 } },
#endif
{ { 240, 85, 128 }, { 4, 1, 248 }, { 4, 1, 8 }, { 4, 248, 128 } },
{ { 244, 85, 128 }, { 8, 2, 248 }, { 8, 2, 8 }, { 8, 248, 128 } },
{ { 248, 85, 128 }, { 16, 4, 248 }, { 16, 4, 8 }, { 16, 248, 128 } },
};
static const aom_prob default_inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1] = {
#if CONFIG_CHROMA_2X2
{ 160, 85, 128 },
#endif
{ 160, 85, 128 },
{ 176, 85, 128 },
{ 192, 85, 128 },
};
#endif // CONFIG_MRC_TX
#endif // CONFIG_EXT_TX
#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
......@@ -5270,8 +4842,6 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#if CONFIG_FILTER_INTRA
av1_copy(fc->filter_intra_probs, default_filter_intra_probs);
#endif // CONFIG_FILTER_INTRA
av1_copy(fc->inter_ext_tx_prob, default_inter_ext_tx_prob);
av1_copy(fc->intra_ext_tx_prob, default_intra_ext_tx_prob);
#if CONFIG_LOOP_RESTORATION
av1_copy(fc->switchable_restore_prob, default_switchable_restore_prob);
#endif // CONFIG_LOOP_RESTORATION
......@@ -5513,42 +5083,6 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) {
fc->skip_probs[i] =
av1_mode_mv_merge_probs(pre_fc->skip_probs[i], counts->skip[i]);
#if CONFIG_EXT_TX
for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
int s;
for (s = 1; s < EXT_TX_SETS_INTER; ++s) {
if (use_inter_ext_tx_for_txsize[s][i]) {
aom_tree_merge_probs(av1_ext_tx_tree[av1_ext_tx_set_type_inter[s]],
pre_fc->inter_ext_tx_prob[s][i],
counts->inter_ext_tx[s][i],
fc->inter_ext_tx_prob[s][i]);
}
}
for (s = 1; s < EXT_TX_SETS_INTRA; ++s) {
if (use_intra_ext_tx_for_txsize[s][i]) {
for (j = 0; j < INTRA_MODES; ++j) {
aom_tree_merge_probs(av1_ext_tx_tree[av1_ext_tx_set_type_intra[s]],
pre_fc->intra_ext_tx_prob[s][i][j],
counts->intra_ext_tx[s][i][j],
fc->intra_ext_tx_prob[s][i][j]);
}
}
}
}
#else
for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
for (j = 0; j < TX_TYPES; ++j) {
aom_tree_merge_probs(av1_ext_tx_tree, pre_fc->intra_ext_tx_prob[i][j],
counts->intra_ext_tx[i][j],
fc->intra_ext_tx_prob[i][j]);
}
}
for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
aom_tree_merge_probs(av1_ext_tx_tree, pre_fc->inter_ext_tx_prob[i],
counts->inter_ext_tx[i], fc->inter_ext_tx_prob[i]);
}
#endif // CONFIG_EXT_TX
if (cm->seg.temporal_update) {
for (i = 0; i < PREDICTION_PROBS; i++)
fc->seg.pred_probs[i] = av1_mode_mv_merge_probs(pre_fc->seg.pred_probs[i],
......
......@@ -322,14 +322,6 @@ typedef struct frame_contexts {
aom_cdf_prob intrabc_cdf[CDF_SIZE(2)];
#endif
int initialized;
#if CONFIG_EXT_TX
aom_prob inter_ext_tx_prob[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES - 1];
aom_prob intra_ext_tx_prob[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
[TX_TYPES - 1];
#else
aom_prob intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1];
aom_prob inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1];
#endif // CONFIG_EXT_TX
#if CONFIG_SUPERTX
aom_prob supertx_prob[PARTITION_SUPERTX_CONTEXTS][TX_SIZES];
#endif // CONFIG_SUPERTX
......@@ -513,10 +505,11 @@ typedef struct FRAME_COUNTS {
unsigned int delta_lf[DELTA_LF_PROBS][2];
#endif
#endif
#if CONFIG_EXT_TX
#if CONFIG_RECT_TX
#if CONFIG_EXT_TX && CONFIG_RECT_TX
unsigned int tx_size_implied[TX_SIZES][TX_SIZES];
#endif // CONFIG_RECT_TX
#endif // CONFIG_EXT_TX && CONFIG_RECT_TX
#if CONFIG_ENTROPY_STATS
#if CONFIG_EXT_TX
unsigned int inter_ext_tx[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES];
unsigned int intra_ext_tx[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
[TX_TYPES];
......@@ -524,6 +517,7 @@ typedef struct FRAME_COUNTS {
unsigned int intra_ext_tx[EXT_TX_SIZES][TX_TYPES][TX_TYPES];
unsigned int inter_ext_tx[EXT_TX_SIZES][TX_TYPES];
#endif // CONFIG_EXT_TX
#endif // CONFIG_ENTROPY_STATS
#if CONFIG_SUPERTX
unsigned int supertx[PARTITION_SUPERTX_CONTEXTS][TX_SIZES][2];
unsigned int supertx_size[TX_SIZES];
......
......@@ -2474,14 +2474,18 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
aom_read_symbol(r, ec_ctx->inter_ext_tx_cdf[eset][supertx_size],
av1_num_ext_tx_set[tx_set_type], ACCT_STR);
txfm = av1_ext_tx_inv[tx_set_type][packed_sym];
#if CONFIG_ENTROPY_STATS
if (xd->counts) ++xd->counts->inter_ext_tx[eset][supertx_size][txfm];
#endif // CONFIG_ENTROPY_STATS
}
}
#else
if (supertx_size < TX_32X32) {
txfm = aom_read_symbol(r, ec_ctx->inter_ext_tx_cdf[supertx_size],
TX_TYPES, ACCT_STR);
#if CONFIG_ENTROPY_STATS
if (xd->counts) ++xd->counts->inter_ext_tx[supertx_size][txfm];
#endif // CONFIG_ENTROPY_STATS
}
#endif // CONFIG_EXT_TX
}
......@@ -5240,10 +5244,12 @@ static void debug_check_frame_counts(const AV1_COMMON *const cm) {
!memcmp(&cm->counts.mv[0], &zero_counts.mv[0], sizeof(cm->counts.mv[0])));
assert(
!memcmp(&cm->counts.mv[1], &zero_counts.mv[1], sizeof(cm->counts.mv[0])));
#if CONFIG_ENTROPY_STATS
assert(!memcmp(cm->counts.inter_ext_tx, zero_counts.inter_ext_tx,
sizeof(cm->counts.inter_ext_tx)));
assert(!memcmp(cm->counts.intra_ext_tx, zero_counts.intra_ext_tx,
sizeof(cm->counts.intra_ext_tx)));
#endif // CONFIG_ENTROPY_STATS
}
#endif // NDEBUG
......
......@@ -992,19 +992,24 @@ void av1_read_tx_type(const AV1_COMMON *const cm, MACROBLOCKD *xd,
// eset == 0 should correspond to a set with only DCT_DCT and
// there is no need to read the tx_type
assert(eset != 0);
#if CONFIG_ENTROPY_STATS
FRAME_COUNTS *counts = xd->counts;
#endif // CONFIG_ENTROPY_STATS
if (inter_block) {
*tx_type = av1_ext_tx_inv[tx_set_type][aom_read_symbol(
r, ec_ctx->inter_ext_tx_cdf[eset][square_tx_size],
av1_num_ext_tx_set[tx_set_type], ACCT_STR)];
#if CONFIG_ENTROPY_STATS
if (counts) ++counts->inter_ext_tx[eset][square_tx_size][*tx_type];
#endif // CONFIG_ENTROPY_STATS
} else if (ALLOW_INTRA_EXT_TX) {
*tx_type = av1_ext_tx_inv[tx_set_type][aom_read_symbol(
r, ec_ctx->intra_ext_tx_cdf[eset][square_tx_size][mbmi->mode],
av1_num_ext_tx_set[tx_set_type], ACCT_STR)];
#if CONFIG_ENTROPY_STATS
if (counts)
++counts->intra_ext_tx[eset][square_tx_size][mbmi->mode][*tx_type];
#endif // CONFIG_ENTROPY_STATS
}
} else {
*tx_type = DCT_DCT;
......@@ -1019,18 +1024,23 @@ void av1_read_tx_type(const AV1_COMMON *const cm, MACROBLOCKD *xd,
!supertx_enabled &&
#endif // CONFIG_SUPERTX
!segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
#if CONFIG_ENTROPY_STATS
FRAME_COUNTS *counts = xd->counts;
#endif // CONFIG_ENTROPY_STATS
if (inter_block) {
*tx_type = av1_ext_tx_inv[aom_read_symbol(
r, ec_ctx->inter_ext_tx_cdf[tx_size], TX_TYPES, ACCT_STR)];
#if CONFIG_ENTROPY_STATS
if (counts) ++counts->inter_ext_tx[tx_size][*tx_type];
#endif // CONFIG_ENTROPY_STATS
} else {
const TX_TYPE tx_type_nom = intra_mode_to_tx_type_context[mbmi->mode];
*tx_type = av1_ext_tx_inv[aom_read_symbol(
r, ec_ctx->intra_ext_tx_cdf[tx_size][tx_type_nom], TX_TYPES,
ACCT_STR)];
#if CONFIG_ENTROPY_STATS
if (counts) ++counts->intra_ext_tx[tx_size][tx_type_nom][*tx_type];
#endif // CONFIG_ENTROPY_STATS
}
} else {
*tx_type = DCT_DCT;
......
......@@ -76,12 +76,6 @@ static INLINE void write_uniform(aom_writer *w, int n, int v) {
}
}
#if CONFIG_EXT_TX
static struct av1_token ext_tx_inter_encodings[EXT_TX_SETS_INTER][TX_TYPES];
static struct av1_token ext_tx_intra_encodings[EXT_TX_SETS_INTRA][TX_TYPES];
#else
static struct av1_token ext_tx_encodings[TX_TYPES];
#endif // CONFIG_EXT_TX
#if CONFIG_EXT_INTRA
#if CONFIG_INTRA_INTERP
static struct av1_token intra_filter_encodings[INTRA_FILTERS];
......@@ -120,21 +114,11 @@ static int remux_tiles(const AV1_COMMON *const cm, uint8_t *dst,
#endif
void av1_encode_token_init(void) {
#if CONFIG_EXT_TX
int s;
for (s = 1; s < EXT_TX_SETS_INTER; ++s) {
av1_tokens_from_tree(ext_tx_inter_encodings[s],
av1_ext_tx_tree[av1_ext_tx_set_type_inter[s]]);
}
for (s = 1; s < EXT_TX_SETS_INTRA; ++s) {
av1_tokens_from_tree(ext_tx_intra_encodings[s],
av1_ext_tx_tree[av1_ext_tx_set_type_intra[s]]);
}
for (s = 1; s < EXT_TX_SET_TYPES; ++s) {
for (int s = 1; s < EXT_TX_SET_TYPES; ++s) {
av1_indices_from_tree(av1_ext_tx_ind[s], av1_ext_tx_inv[s],
av1_ext_tx_tree[s]);
}
#else
av1_tokens_from_tree(ext_tx_encodings, av1_ext_tx_tree);
/* This hack is necessary because the four TX_TYPES are not consecutive,