From: Marco Paniconi Date: Mon, 26 Nov 2018 21:58:28 +0000 (-0800) Subject: vp9-svc: Fix to skip enhancement layer setting X-Git-Tag: v1.8.0~130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09ed15d255d96e87ef388ddda7c276dd14042c37;p=libvpx 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 --- diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 7ced82186..cd3d7e713 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -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;