]> granicus.if.org Git - libvpx/commitdiff
Fix to source scaling for dynamic_resize.
authorMarco <marpan@chromium.org>
Tue, 14 Jul 2015 17:01:45 +0000 (10:01 -0700)
committerMarco <marpan@chromium.org>
Wed, 15 Jul 2015 15:28:59 +0000 (08:28 -0700)
The fast scaling for 1 pass mode was being used only on the
first frame after resizing event (because resize_scale_num/den
is set to 1 and only changed for first frame following resize event).

Change-Id: I723b63e21823eb858f25f5662d2bbe4f1842e61f

vp9/encoder/vp9_encoder.c

index 43d459eebf49c4287e9a28ffc57f5064138b17b2..d5ac3e34a22452f6790f92b275b449c7b570db2f 100644 (file)
@@ -3147,8 +3147,8 @@ static void encode_without_recode_loop(VP9_COMP *cpi) {
   if (cpi->oxcf.pass == 0 &&
       cpi->oxcf.rc_mode == VPX_CBR &&
       cpi->oxcf.resize_mode == RESIZE_DYNAMIC &&
-      cpi->resize_scale_num == 1 &&
-      cpi->resize_scale_den == 2) {
+      cpi->un_scaled_source->y_width == (cm->width << 1) &&
+      cpi->un_scaled_source->y_height == (cm->height << 1)) {
     cpi->Source = vp9_scale_if_required_fast(cm,
                                              cpi->un_scaled_source,
                                              &cpi->scaled_source);