ref: d3409bad9a0422066ed621bac5a250759e3f145e
parent: f78b7daec44643b87861e48ea8b0f9a981b7a735
author: Debargha Mukherjee <[email protected]>
date: Tue Dec 1 05:40:10 EST 2015
Fix a spatial svc bug related to scaling Fixes bug introduced in https://chromium-review.googlesource.com/#/c/299482/5 Change-Id: If542c1a917380465dd9bc4ce5e32b0adbb20e340
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -3682,12 +3682,16 @@
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);