Commit 5024136f authored by Yunqing Wang's avatar Yunqing Wang

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
parent 19b9f72b
......@@ -842,8 +842,8 @@ static INLINE void set_skip_context(MACROBLOCKD *xd, int mi_row, int mi_col,
}
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,
......
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