Refactor to use block_size_wide/high[] consistently
Replace the computation of block size in pixels with lookup table
directly.
Change-Id: I39589b2bc1d20372969ff5ad0f60639e64a19b41
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index e4d8db0..4915f78 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1871,10 +1871,10 @@
#if CONFIG_PALETTE
for (plane = 0; plane <= 1; ++plane) {
if (m->mbmi.palette_mode_info.palette_size[plane] > 0) {
- const int rows = (4 * num_4x4_blocks_high_lookup[m->mbmi.sb_type]) >>
- (xd->plane[plane].subsampling_y);
- const int cols = (4 * num_4x4_blocks_wide_lookup[m->mbmi.sb_type]) >>
- (xd->plane[plane].subsampling_x);
+ const int rows =
+ block_size_high[m->mbmi.sb_type] >> (xd->plane[plane].subsampling_y);
+ const int cols =
+ block_size_wide[m->mbmi.sb_type] >> (xd->plane[plane].subsampling_x);
assert(*tok < tok_end);
pack_palette_tokens(w, tok, m->mbmi.palette_mode_info.palette_size[plane],
rows * cols - 1);