Refactor set_plane_n4()
Make the block size and mode_info size scalable to mode_info unit
size.
Change-Id: I38c49bad118e0565a104cb6edfc3e3266519f9ee
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 8d939c0..9c533b7 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -560,16 +560,14 @@
return len + MAX_MIB_SIZE;
}
-static INLINE void set_plane_n4(MACROBLOCKD *const xd, int bw, int bh, int bwl,
- int bhl) {
+static INLINE void set_plane_n4(MACROBLOCKD *const xd, int bw, int bh) {
int i;
for (i = 0; i < MAX_MB_PLANE; i++) {
xd->plane[i].n4_w = (bw << 1) >> xd->plane[i].subsampling_x;
xd->plane[i].n4_h = (bh << 1) >> xd->plane[i].subsampling_y;
- xd->plane[i].n4_wl = bwl - xd->plane[i].subsampling_x;
- xd->plane[i].n4_hl = bhl - xd->plane[i].subsampling_y;
- xd->plane[i].width = xd->plane[i].n4_w * 4;
- xd->plane[i].height = xd->plane[i].n4_h * 4;
+
+ xd->plane[i].width = (bw * MI_SIZE) >> xd->plane[i].subsampling_x;
+ xd->plane[i].height = (bh * MI_SIZE) >> xd->plane[i].subsampling_y;
}
}