Commit 056732f6 authored by Fergus Simpson's avatar Fergus Simpson
Browse files

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

Change-Id: Icbf34252a62436bb9bb0f83fa5fd688f7c5ae256
parent 8c70d917
......@@ -869,8 +869,7 @@ YV12_BUFFER_CONFIG *av1_scale_if_required_fast(AV1_COMMON *cm,
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) {
resize_and_extend_frame(unscaled, scaled, (int)cm->bit_depth);
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