Commit 13c42779 authored by Jingning Han's avatar Jingning Han
Browse files

Simplify logics in select_tx_type_yrd

Remove unnecessary inter / intra condition check.

Change-Id: I51b776a3df6ce45b31fe3d2f43fbf6ca7b1d14fb
parent 6f14969a
......@@ -4256,29 +4256,10 @@ static int64_t select_tx_size_fix_type(const AV1_COMP *cpi, MACROBLOCK *x,
!xd->lossless[xd->mi[0]->mbmi.segment_id]) {
const int ext_tx_set = get_ext_tx_set(mbmi->min_tx_size, bsize, is_inter,
cm->reduced_tx_set_used);
if (is_inter) {
if (ext_tx_set > 0)
rd_stats->rate +=
x->inter_tx_type_costs[ext_tx_set]
[txsize_sqr_map[mbmi->min_tx_size]]
[mbmi->tx_type];
} else {
if (ext_tx_set > 0 && ALLOW_INTRA_EXT_TX) {
#if CONFIG_FILTER_INTRA
PREDICTION_MODE intra_dir;
if (mbmi->filter_intra_mode_info.use_filter_intra_mode[0])
intra_dir = fimode_to_intradir[mbmi->filter_intra_mode_info
.filter_intra_mode[0]];
else
intra_dir = mbmi->mode;
rd_stats->rate += x->intra_tx_type_costs[ext_tx_set][mbmi->min_tx_size]
[intra_dir][mbmi->tx_type];
#else
rd_stats->rate += x->intra_tx_type_costs[ext_tx_set][mbmi->min_tx_size]
[mbmi->mode][mbmi->tx_type];
#endif
}
}
if (ext_tx_set > 0)
rd_stats->rate +=
x->inter_tx_type_costs[ext_tx_set][txsize_sqr_map[mbmi->min_tx_size]]
[mbmi->tx_type];
}
#endif // CONFIG_TXK_SEL
......
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