]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix to forced key frame for spatial layers m78-3904
authorMarco Paniconi <marpan@google.com>
Fri, 20 Sep 2019 15:45:04 +0000 (08:45 -0700)
committerJerome Jiang <jianj@google.com>
Wed, 25 Sep 2019 21:52:06 +0000 (14:52 -0700)
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

vp9/encoder/vp9_encoder.c

index 8fa4d5a884940ebfb6063a6c4195a6157b4c7ea8..c724846a3b981a87a7b945b7aa128654661b2097 100644 (file)
@@ -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);
       }