]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix to skip enhancement layer setting
authorMarco Paniconi <marpan@google.com>
Mon, 26 Nov 2018 21:58:28 +0000 (13:58 -0800)
committerMarco Paniconi <marpan@google.com>
Mon, 26 Nov 2018 22:36:34 +0000 (14:36 -0800)
If in constrained layer drop mode, avoid setting
skip flag if base layer is dropped, as whole superframe
will be dropped in this case. This avoids an assert trigger
in the svc superframe packing.

Change-Id: I51c953c7fee979790c65c798bac9bd3d805dc66f

vp9/encoder/vp9_encoder.c

index 7ced82186b54a0d029dc5353c624d20ce5fc2c00..cd3d7e71344403cc3ad36701134eede68a0c5b3f 100644 (file)
@@ -4692,8 +4692,13 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, size_t *size,
   TX_SIZE t;
 
   // SVC: skip encoding of enhancement layer if the layer target bandwidth = 0.
+  // If in constrained layer drop mode (svc.framedrop_mode != LAYER_DROP) and
+  // base spatial layer was dropped, no need to set svc.skip_enhancement_layer,
+  // as whole superframe will be dropped.
   if (cpi->use_svc && cpi->svc.spatial_layer_id > 0 &&
-      cpi->oxcf.target_bandwidth == 0) {
+      cpi->oxcf.target_bandwidth == 0 &&
+      !(cpi->svc.framedrop_mode != LAYER_DROP &&
+        cpi->svc.drop_spatial_layer[0])) {
     cpi->svc.skip_enhancement_layer = 1;
     vp9_rc_postencode_update_drop_frame(cpi);
     cpi->ext_refresh_frame_flags_pending = 0;