shithub: libvpx

Download patch

ref: b8d86733e9d9c58e17028720751f96dad2df7a09
parent: 616f02c1700e54d584e93b9071e56ef9ecc5b05a
author: Marco Paniconi <marpan@google.com>
date: Fri Sep 20 04:45:04 EDT 2019

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

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -7356,10 +7356,11 @@
     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);
       }