Commit f29166de authored by Yaowu Xu's avatar Yaowu Xu Committed by Gerrit Code Review

Merge "Use intra_ext_tx_cdf when coding tx_type." into nextgenv2

parents c53f8ca6 72762a28
......@@ -718,9 +718,15 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
!segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
FRAME_COUNTS *counts = xd->counts;
TX_TYPE tx_type_nom = intra_mode_to_tx_type_context[mbmi->mode];
#if CONFIG_DAALA_EC
mbmi->tx_type = av1_ext_tx_inv[aom_read_symbol(
r, cm->fc->intra_ext_tx_cdf[mbmi->tx_size][tx_type_nom], TX_TYPES,
ACCT_STR)];
#else
mbmi->tx_type = aom_read_tree(
r, av1_ext_tx_tree,
cm->fc->intra_ext_tx_prob[mbmi->tx_size][tx_type_nom], ACCT_STR);
#endif
if (counts)
++counts->intra_ext_tx[mbmi->tx_size][tx_type_nom][mbmi->tx_type];
} else {
......
......@@ -1666,11 +1666,19 @@ static void write_mb_modes_kf(const AV1_COMMON *cm, const MACROBLOCKD *xd,
#else
if (mbmi->tx_size < TX_32X32 && cm->base_qindex > 0 && !mbmi->skip &&
!segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
#if CONFIG_DAALA_EC
aom_write_symbol(
w, av1_ext_tx_ind[mbmi->tx_type],
cm->fc->intra_ext_tx_cdf[mbmi->tx_size]
[intra_mode_to_tx_type_context[mbmi->mode]],
TX_TYPES);
#else
av1_write_token(
w, av1_ext_tx_tree,
cm->fc->intra_ext_tx_prob[mbmi->tx_size]
[intra_mode_to_tx_type_context[mbmi->mode]],
&ext_tx_encodings[mbmi->tx_type]);
#endif
}
#endif // CONFIG_EXT_TX
}
......
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