Reduce memory allocated to frame MODE_INFO

Instead of always adding 1 SB, this patch modified calc_mi_size(),
and adaptively assigned mi_size based on frame size. This reduced
the frame MODE_INFO memory.

Change-Id: If2fe8f89ad158341dc8b595148a772118147ff99
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index ace07dd..9748198 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -842,8 +842,8 @@
 }
 
 static INLINE int calc_mi_size(int len) {
-  // len is in mi units.
-  return len + MAX_MIB_SIZE;
+  // len is in mi units. Align to a multiple of SBs.
+  return ALIGN_POWER_OF_TWO(len, MAX_MIB_SIZE_LOG2);
 }
 
 static INLINE void set_plane_n4(MACROBLOCKD *const xd, int bw, int bh,