Refactor tx_size step use cases in decoder
Use lookup table to replace the arithmetic computation for transform
block step.
Change-Id: Ie7cb33e75e3b90aa9e9b46f8d11fa1d03e1ebe85
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 594141c..ceb9bbf 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -507,7 +507,7 @@
: mbmi->tx_size;
const int num_4x4_w = pd->n4_w;
const int num_4x4_h = pd->n4_h;
- const int step = (1 << tx_size);
+ const int step = tx_size_1d_in_unit[tx_size];
int row, col;
const int max_blocks_wide =
num_4x4_w + (xd->mb_to_right_edge >= 0
@@ -542,7 +542,7 @@
: mbmi->tx_size;
const int num_4x4_w = pd->n4_w;
const int num_4x4_h = pd->n4_h;
- const int step = (1 << tx_size);
+ const int step = tx_size_1d_in_unit[tx_size];
int row, col;
const int max_blocks_wide =
num_4x4_w + (xd->mb_to_right_edge >= 0
diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c
index abf6199..1a43596 100644
--- a/av1/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -57,7 +57,7 @@
#endif
{
FRAME_COUNTS *counts = xd->counts;
- const int max_eob = 16 << (tx_size << 1);
+ const int max_eob = 1 << (tx_size_1d_log2[tx_size] * 2);
const FRAME_CONTEXT *const fc = xd->fc;
const int ref = is_inter_block(&xd->mi[0]->mbmi);
#if CONFIG_AOM_QM