Scale the mb_mode_info into 4x4 unit

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

Change-Id: I60ee20f5fc353a3c16ced14b55422fc5e4ea1e06
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 7e26a18..b194786 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -865,8 +865,13 @@
 
 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
diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c
index c213b77..97ce3b3 100644
--- a/av1/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -267,6 +267,11 @@
 
     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 @@
 
     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;