]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix pattern update for skip enhancement layers.
authorMarco Paniconi <marpan@google.com>
Fri, 11 May 2018 22:49:34 +0000 (15:49 -0700)
committerMarco Paniconi <marpan@google.com>
Fri, 11 May 2018 22:51:19 +0000 (15:51 -0700)
Use the same logic as for dropped frames to be consistent.

Change-Id: I16fd317e70514fe8516d9eb350c275d1813e943e

vp9/encoder/vp9_encoder.c

index 13f01a3ab35131cc1938d161b011a5163bb8762d..0b72b2489a58d630a47b2f53d2460a0b2920fd10 100644 (file)
@@ -4485,11 +4485,21 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, size_t *size,
       cpi->oxcf.target_bandwidth == 0) {
     cpi->svc.skip_enhancement_layer = 1;
     vp9_rc_postencode_update_drop_frame(cpi);
-    vp9_inc_frame_in_layer(cpi);
     cpi->ext_refresh_frame_flags_pending = 0;
     cpi->last_frame_dropped = 1;
     cpi->svc.last_layer_dropped[cpi->svc.spatial_layer_id] = 1;
     cpi->svc.drop_spatial_layer[cpi->svc.spatial_layer_id] = 1;
+    if (cpi->svc.framedrop_mode != CONSTRAINED_LAYER_DROP ||
+        cpi->svc.drop_spatial_layer[0] == 0) {
+      // For the case of CONSTRAINED_LAYER_DROP where the base is dropped
+      // (drop_spatial_layer[0] == 1), which means full superframe dropped,
+      // we don't increment the svc frame counters. In particular temporal
+      // layer counter (which is incremented in vp9_inc_frame_in_layer())
+      // won't be incremented, so on a dropped frame we try the same
+      // temporal_layer_id on next incoming frame. This is to avoid an
+      // issue with temporal alignement with full superframe dropping.
+      vp9_inc_frame_in_layer(cpi);
+    }
     return;
   }