shithub: libvpx

Download patch

ref: 3f18b08397674e4fe5b327c735f4945cb1892c41
parent: d9a69a1e2967920afbeee2a76ce978d3e210298c
author: Marco Paniconi <marpan@google.com>
date: Tue Jun 23 15:20:01 EDT 2020

vp9-svc: Allow scale_references for single layer svc

This is needed to allow for newmv search in nonrd_pickmode
for resize/scaled frame, and for int_pro_motion_estimation
on resized/scaled frame.

Change-Id: I5e2fdbc4706a10813c1b00f6194e2442f648905a

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4040,8 +4040,11 @@
   // For 1 pass CBR SVC, only ZEROMV is allowed for spatial reference frame
   // when svc->force_zero_mode_spatial_ref = 1. Under those conditions we can
   // avoid this frame-level upsampling (for non intra_only frames).
+  // For SVC single_layer mode, dynamic resize is allowed and we need to
+  // scale references for this case.
   if (frame_is_intra_only(cm) == 0 &&
-      !(is_one_pass_cbr_svc(cpi) && svc->force_zero_mode_spatial_ref)) {
+      ((svc->single_layer_svc && cpi->oxcf.resize_mode == RESIZE_DYNAMIC) ||
+       !(is_one_pass_cbr_svc(cpi) && svc->force_zero_mode_spatial_ref))) {
     vp9_scale_references(cpi);
   }