Cut MAX_TILE_ROWS & MAX_TILE_COLS from 1024 to 64.
The current spec defines MAX_TILE_ROWS and MAX_TILE_COLS as 64. This
change reduces the size of the tile_buffers array in the AV1Decoder
struct from 32 MB to 128 KB in 64-bit build, or from 16 MB to 64 KB
in 32-bit build.
BUG=aomedia:1870
Change-Id: I3114d0ba37a0b2da0f87d3d4f4a5838a650ad812
diff --git a/av1/common/enums.h b/av1/common/enums.h
index 65bca23..47259c2 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -46,8 +46,8 @@
#define MAX_MIB_MASK (MAX_MIB_SIZE - 1)
// Maximum number of tile rows and tile columns
-#define MAX_TILE_ROWS 1024
-#define MAX_TILE_COLS 1024
+#define MAX_TILE_ROWS 64
+#define MAX_TILE_COLS 64
#define MAX_VARTX_DEPTH 2
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 7aff65d..dbc44f3 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2310,7 +2310,7 @@
static INLINE int find_identical_tile(
const int tile_row, const int tile_col,
- TileBufferEnc (*const tile_buffers)[1024]) {
+ TileBufferEnc (*const tile_buffers)[MAX_TILE_COLS]) {
const MV32 candidate_offset[1] = { { 1, 0 } };
const uint8_t *const cur_tile_data =
tile_buffers[tile_row][tile_col].data + 4;