Commit 1807fdc9 authored by Jingning Han's avatar Jingning Han

Sync transform block size mapping in pack_txb_tokens

Use the unified sub_tx_size table to fetch the transform block
size for next recursion.

Change-Id: I73af3192b529cc9f3fc45873a037542112046cb3
parent 4542d22c
......@@ -855,7 +855,8 @@ static void pack_txb_tokens(aom_writer *w, const TOKENEXTRA **tp,
token_stats->cost += tmp_token_stats.cost;
#endif
} else {
const int bsl = block_size_wide[bsize] >> (tx_size_wide_log2[0] + 1);
const TX_SIZE sub_txs = sub_tx_size_map[tx_size];
const int bsl = tx_size_wide_unit[sub_txs];
int i;
assert(bsl > 0);
......@@ -863,7 +864,6 @@ static void pack_txb_tokens(aom_writer *w, const TOKENEXTRA **tp,
for (i = 0; i < 4; ++i) {
const int offsetr = blk_row + (i >> 1) * bsl;
const int offsetc = blk_col + (i & 0x01) * bsl;
const TX_SIZE sub_txs = tx_size - 1;
const int step = tx_size_wide_unit[sub_txs] * tx_size_high_unit[sub_txs];
if (offsetr >= max_blocks_high || offsetc >= max_blocks_wide) continue;
......
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