Commit dc9ad312 authored by Jingning Han's avatar Jingning Han

Separate intra and inter tx_size counting

Skip counting the inter transform block size distribution for
the intra transform block size coding.

Change-Id: Ifad9d843f57d069d0619a54d66ca18101e1b69f1
parent dc3c3a33
......@@ -1736,12 +1736,11 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi,
const int width = num_4x4_blocks_wide_lookup[bsize];
const int height = num_4x4_blocks_high_lookup[bsize];
int idx, idy;
int tx_size_cat = inter_tx_size_cat_lookup[bsize];
#if CONFIG_EXT_TX && CONFIG_RECT_TX
int is_rect_tx_allowed = inter_block && is_rect_tx_allowed_bsize(bsize) &&
!xd->lossless[mbmi->segment_id];
int use_rect_tx = 0;
int tx_size_cat = inter_tx_size_cat_lookup[bsize];
if (is_rect_tx_allowed) {
use_rect_tx = aom_read(r, cm->fc->rect_tx_prob[tx_size_cat], ACCT_STR);
if (xd->counts) {
......@@ -1761,11 +1760,6 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi,
#if CONFIG_EXT_TX && CONFIG_RECT_TX
}
#endif
if (xd->counts) {
const int ctx = get_tx_size_context(xd);
++xd->counts->tx_size[tx_size_cat][ctx]
[txsize_sqr_up_map[mbmi->tx_size]];
}
} else {
if (inter_block)
mbmi->tx_size = read_tx_size_inter(cm, xd, !mbmi->skip, r);
......
......@@ -5261,11 +5261,15 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td,
#endif // CONFIG_EXT_TX && CONFIG_RECT_TX
if (is_inter)
tx_partition_count_update(cm, xd, bsize, mi_row, mi_col, td->counts);
else
++td->counts->tx_size[tx_size_cat][tx_size_ctx][coded_tx_size];
#if CONFIG_EXT_TX && CONFIG_RECT_TX
}
#endif
#endif
#if !CONFIG_VAR_TX
++td->counts->tx_size[tx_size_cat][tx_size_ctx][coded_tx_size];
#endif
} else {
int i, j;
TX_SIZE tx_size;
......
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