ref: 09ed15d255d96e87ef388ddda7c276dd14042c37
parent: 314641e29816f7ec8079135291baa6ab3b2d7e83
author: Marco Paniconi <marpan@google.com>
date: Mon Nov 26 08:58:28 EST 2018
vp9-svc: Fix to skip enhancement layer setting 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
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4692,8 +4692,13 @@
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;