From: Marco Paniconi Date: Fri, 11 May 2018 22:49:34 +0000 (-0700) Subject: vp9-svc: Fix pattern update for skip enhancement layers. X-Git-Tag: v1.8.0~690 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36b998f2eb5ba0870ea36d3929be1f5f5f729d15;p=libvpx vp9-svc: Fix pattern update for skip enhancement layers. Use the same logic as for dropped frames to be consistent. Change-Id: I16fd317e70514fe8516d9eb350c275d1813e943e --- diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 13f01a3ab..0b72b2489 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -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; }