Commit 85dc03f5 authored by Jingning Han's avatar Jingning Han

Simplify the mode_info size logic

Replace the arithmetic calculation with direct table access.

Change-Id: I054a4c398f2321a39330aaf00607dc180a335b2d
parent 3e882f29
...@@ -1362,8 +1362,8 @@ static void decode_block(AV1Decoder *const pbi, MACROBLOCKD *const xd, ...@@ -1362,8 +1362,8 @@ static void decode_block(AV1Decoder *const pbi, MACROBLOCKD *const xd,
#endif // CONFIG_EXT_PARTITION_TYPES #endif // CONFIG_EXT_PARTITION_TYPES
BLOCK_SIZE bsize, int bwl, int bhl) { BLOCK_SIZE bsize, int bwl, int bhl) {
AV1_COMMON *const cm = &pbi->common; AV1_COMMON *const cm = &pbi->common;
const int bw = 1 << (bwl - 1); const int bw = mi_size_wide[bsize];
const int bh = 1 << (bhl - 1); const int bh = mi_size_high[bsize];
const int x_mis = AOMMIN(bw, cm->mi_cols - mi_col); const int x_mis = AOMMIN(bw, cm->mi_cols - mi_col);
const int y_mis = AOMMIN(bh, cm->mi_rows - mi_row); const int y_mis = AOMMIN(bh, cm->mi_rows - mi_row);
MB_MODE_INFO *mbmi; MB_MODE_INFO *mbmi;
......
...@@ -770,8 +770,8 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm, ...@@ -770,8 +770,8 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
const BLOCK_SIZE bsize = mbmi->sb_type; const BLOCK_SIZE bsize = mbmi->sb_type;
int i; int i;
const int mi_offset = mi_row * cm->mi_cols + mi_col; const int mi_offset = mi_row * cm->mi_cols + mi_col;
const int bw = xd->plane[0].n4_w >> 1; const int bw = mi_size_wide[bsize];
const int bh = xd->plane[0].n4_h >> 1; const int bh = mi_size_high[bsize];
// TODO(slavarnway): move x_mis, y_mis into xd ????? // TODO(slavarnway): move x_mis, y_mis into xd ?????
const int x_mis = AOMMIN(cm->mi_cols - mi_col, bw); const int x_mis = AOMMIN(cm->mi_cols - mi_col, bw);
......
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