Commit bfcd1f1a authored by Jingning Han's avatar Jingning Han

Scale the mb_mode_info into 4x4 unit

Scale up the mb_mode_info resolution from 8x8 to 4x4 unit.

Change-Id: I60ee20f5fc353a3c16ced14b55422fc5e4ea1e06
parent 8b7270d8
......@@ -865,8 +865,13 @@ static INLINE PARTITION_TYPE get_partition(const AV1_COMMON *const cm,
static INLINE void set_sb_size(AV1_COMMON *const cm, const BLOCK_SIZE sb_size) {
cm->sb_size = sb_size;
#if CONFIG_CB4X4
cm->mib_size = num_4x4_blocks_wide_lookup[cm->sb_size];
cm->mib_size_log2 = b_width_log2_lookup[cm->sb_size];
#else
cm->mib_size = num_8x8_blocks_wide_lookup[cm->sb_size];
cm->mib_size_log2 = mi_width_log2_lookup[cm->sb_size];
#endif
}
#ifdef __cplusplus
......
......@@ -267,6 +267,11 @@ static int av1_has_right(BLOCK_SIZE bsize, int mi_row, int mi_col,
if (x + step < w) return 1;
#if CONFIG_CB4X4
// TODO(jingning): This condition is overly simplified. Need some fixes.
return 0;
#endif
mi_row = (mi_row & MAX_MIB_MASK) >> hl;
mi_col = (mi_col & MAX_MIB_MASK) >> wl;
......@@ -303,6 +308,11 @@ static int av1_has_bottom(BLOCK_SIZE bsize, int mi_row, int mi_col,
if (y + step < h) return 1;
#if CONFIG_CB4X4
// TODO(jingning): This condition is overly simplified. Need some fixes.
return 0;
#endif
mi_row = (mi_row & MAX_MIB_MASK) >> hl;
mi_col = (mi_col & MAX_MIB_MASK) >> wl;
......
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