From: Marco Paniconi Date: Fri, 20 Sep 2019 15:45:04 +0000 (-0700) Subject: vp9-svc: Fix to forced key frame for spatial layers X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fheads%2Fm78-3904;p=libvpx vp9-svc: Fix to forced key frame for spatial layers Condition to disallow key frames on spatial enhancement layers should be based on the first_spatial_layer_to_encode, which need not be layer 0. Change-Id: If6bc67568151c38c9c98290e5838a23b3ab18e8a (cherry picked from commit b8d86733e9d9c58e17028720751f96dad2df7a09) BUG=1007513 Change-Id: I6ac6e41ac821ce32abbff5e4e9638929209876bc --- diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 8fa4d5a88..c724846a3 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -7361,10 +7361,11 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags, if (source != NULL) { cm->show_frame = 1; cm->intra_only = 0; - // if the flags indicate intra frame, but if the current picture is for - // non-zero spatial layer, it should not be an intra picture. + // If the flags indicate intra frame, but if the current picture is for + // spatial layer above first_spatial_layer_to_encode, it should not be an + // intra picture. if ((source->flags & VPX_EFLAG_FORCE_KF) && cpi->use_svc && - cpi->svc.spatial_layer_id > 0) { + cpi->svc.spatial_layer_id > cpi->svc.first_spatial_layer_to_encode) { source->flags &= ~(unsigned int)(VPX_EFLAG_FORCE_KF); }