Simplify the mode_info size logic
Replace the arithmetic calculation with direct table access.
Change-Id: I054a4c398f2321a39330aaf00607dc180a335b2d
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 89ec602..15613d3 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -1362,8 +1362,8 @@
#endif // CONFIG_EXT_PARTITION_TYPES
BLOCK_SIZE bsize, int bwl, int bhl) {
AV1_COMMON *const cm = &pbi->common;
- const int bw = 1 << (bwl - 1);
- const int bh = 1 << (bhl - 1);
+ const int bw = mi_size_wide[bsize];
+ const int bh = mi_size_high[bsize];
const int x_mis = AOMMIN(bw, cm->mi_cols - mi_col);
const int y_mis = AOMMIN(bh, cm->mi_rows - mi_row);
MB_MODE_INFO *mbmi;
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index c01a4ce..2c71430 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -770,8 +770,8 @@
const BLOCK_SIZE bsize = mbmi->sb_type;
int i;
const int mi_offset = mi_row * cm->mi_cols + mi_col;
- const int bw = xd->plane[0].n4_w >> 1;
- const int bh = xd->plane[0].n4_h >> 1;
+ const int bw = mi_size_wide[bsize];
+ const int bh = mi_size_high[bsize];
// TODO(slavarnway): move x_mis, y_mis into xd ?????
const int x_mis = AOMMIN(cm->mi_cols - mi_col, bw);