Commit 9662fde9 authored by Jingning Han's avatar Jingning Han

Refactor tx_size step use cases in decoder

Use lookup table to replace the arithmetic computation for transform
block step.

Change-Id: Ie7cb33e75e3b90aa9e9b46f8d11fa1d03e1ebe85
parent c9f10736
......@@ -507,7 +507,7 @@ static void decode_block(AV1Decoder *const pbi, MACROBLOCKD *const xd,
: 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 @@ static void decode_block(AV1Decoder *const pbi, MACROBLOCKD *const xd,
: 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
......
......@@ -57,7 +57,7 @@ static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type,
#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
......
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