Reduce memory usage of inter_tx_size[] in MB_MODE_INFO
Reduce the length of inter_tx_size[] from 1024 to 16.
On a cif test sequence,
encoder memory consumption decreases by 18% (380MB -> 312MB);
decoder memory consumption decreases by 56% (21.4MB -> 9.4MB).
Change-Id: I42928eb9312748f96f4393c8d8040791f38f98b6
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 212d953..aaeebb0 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -176,11 +176,10 @@
(void)mi_row;
(void)mi_col;
const struct macroblockd_plane *const pd = &xd->plane[plane];
- const int tx_row = blk_row >> (1 - pd->subsampling_y);
- const int tx_col = blk_col >> (1 - pd->subsampling_x);
const TX_SIZE plane_tx_size =
plane ? av1_get_uv_tx_size(mbmi, pd->subsampling_x, pd->subsampling_y)
- : mbmi->inter_tx_size[tx_row][tx_col];
+ : mbmi->inter_tx_size[av1_get_txb_size_index(plane_bsize, blk_row,
+ blk_col)];
// Scale to match transform block unit.
const int max_blocks_high = max_block_high(xd, plane_bsize, plane);
const int max_blocks_wide = max_block_wide(xd, plane_bsize, plane);