]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix condition for setting downsampling filter.
authorMarco <marpan@google.com>
Tue, 28 Nov 2017 22:28:26 +0000 (14:28 -0800)
committerMarco <marpan@google.com>
Wed, 29 Nov 2017 00:28:29 +0000 (16:28 -0800)
Use (width * height) for setting downsampling filter type.

Change-Id: If4acfde7ff9339e0584155f8a4d15b2f134211f2

vp9/encoder/vp9_svc_layercontext.c

index b33434e62caa221a015a5f89883718141dc3345b..38895be689cbb96e2e97fde467a967ee5a3793c3 100644 (file)
@@ -656,9 +656,9 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
                        lc->scaling_factor_num, lc->scaling_factor_den, &width,
                        &height);
 
-  // For low resolutions: set phase of the filter = 8 (for symmetric averaging
-  // filter), use bilinear for now.
-  if (width <= 320 && height <= 240) {
+  // For resolutions <= QVGA: set phase of the filter = 8 (for symmetric
+  // averaging filter), use bilinear for now.
+  if (width * height <= 320 * 240) {
     cpi->svc.downsample_filter_type[cpi->svc.spatial_layer_id] = BILINEAR;
     cpi->svc.downsample_filter_phase[cpi->svc.spatial_layer_id] = 8;
   }