Fix a spatial svc bug related to scaling

Fixes bug introduced in
https://chromium-review.googlesource.com/#/c/299482/5

Change-Id: If542c1a917380465dd9bc4ce5e32b0adbb20e340
This commit is contained in:
Debargha Mukherjee 2015-12-01 10:40:10 -08:00
parent f78b7daec4
commit d3409bad9a

View File

@ -3682,12 +3682,16 @@ YV12_BUFFER_CONFIG *vp9_scale_if_required(VP9_COMMON *cm,
if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
cm->mi_rows * MI_SIZE != unscaled->y_height) {
#if CONFIG_VP9_HIGHBITDEPTH
if (use_normative_scaler)
if (use_normative_scaler &&
unscaled->y_width <= (scaled->y_width << 1) &&
unscaled->y_height <= (scaled->y_height << 1))
scale_and_extend_frame(unscaled, scaled, (int)cm->bit_depth);
else
scale_and_extend_frame_nonnormative(unscaled, scaled, (int)cm->bit_depth);
#else
if (use_normative_scaler)
if (use_normative_scaler &&
unscaled->y_width <= (scaled->y_width << 1) &&
unscaled->y_height <= (scaled->y_height << 1))
scale_and_extend_frame(unscaled, scaled);
else
scale_and_extend_frame_nonnormative(unscaled, scaled);