]> granicus.if.org Git - libvpx/commitdiff
vp9-rtc: Fix to resetting drop_spatial_layer
authorMarco Paniconi <marpan@google.com>
Thu, 18 Jun 2020 18:24:28 +0000 (11:24 -0700)
committerJerome Jiang <jianj@google.com>
Thu, 30 Jul 2020 17:45:53 +0000 (10:45 -0700)
The reset happens on the base spatial layer, before
encoding. But it should be reset on the
first_spatial_layer_to_encode, which may not be 0.

Change-Id: I38ef686b4459ca7433062adbfe32ef2134e1ad60
(cherry picked from commit 769129fb29fc66720be2b01276a472c334757d2d)

vp9/encoder/vp9_svc_layercontext.c

index 6f23d0b4d28d62beb0c6399cb7668ae9aa456254..27dc8ec50ff228830eead903bc7c89990618faaf 100644 (file)
@@ -864,8 +864,9 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
     }
   }
 
-  // Reset the drop flags for all spatial layers, on the base layer.
-  if (svc->spatial_layer_id == 0) {
+  // Reset the drop flags for all spatial layers, on the
+  // first_spatial_layer_to_encode.
+  if (svc->spatial_layer_id == svc->first_spatial_layer_to_encode) {
     vp9_zero(svc->drop_spatial_layer);
     // TODO(jianj/marpan): Investigate why setting svc->lst/gld/alt_fb_idx
     // causes an issue with frame dropping and temporal layers, when the frame