resize-refactor: Check pixel dim instead of mb dim
Changes av1_scale_if_required to check if a resize is needed using the
width and height from cm directly rather than cm's mi_cols and mi_rows
times MI_SIZE.
This is simpler, and won't have issues with sizes that aren't divisible
by MI_SIZE.
Change-Id: Icbf34252a62436bb9bb0f83fa5fd688f7c5ae256
diff --git a/av1/common/resize.c b/av1/common/resize.c
index b148155..f6fdec7 100644
--- a/av1/common/resize.c
+++ b/av1/common/resize.c
@@ -869,8 +869,7 @@
YV12_BUFFER_CONFIG *av1_scale_if_required(AV1_COMMON *cm,
YV12_BUFFER_CONFIG *unscaled,
YV12_BUFFER_CONFIG *scaled) {
- if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
- cm->mi_rows * MI_SIZE != unscaled->y_height) {
+ if (cm->width != unscaled->y_width || cm->height != unscaled->y_height) {
#if CONFIG_HIGHBITDEPTH
resize_and_extend_frame(unscaled, scaled, (int)cm->bit_depth);
#else