shithub: libvpx

Download patch

ref: f93d5dd0e60c5e1b54daad3e3b6446454a6ac5f6
parent: 8256c8b297c8b7c7ee4de24edff82ed67d6ef207
author: Marco Paniconi <marpan@google.com>
date: Thu Mar 7 07:24:11 EST 2019

vp9-svc: Fix to sample encoder for 1 layer

Fix to vp9_spatial_svc_encoder to run case of
1 spatial, 1 temporal layer.

Change-Id: I93675c3c4bd2c55cb1c971679588525a8e5b889d

--- a/examples/vp9_spatial_svc_encoder.c
+++ b/examples/vp9_spatial_svc_encoder.c
@@ -1182,7 +1182,8 @@
       vpx_codec_control(&encoder, VP9E_GET_SVC_LAYER_ID, &layer_id);
       // Don't look for mismatch on top spatial and top temporal layers as they
       // are non reference frames.
-      if (!(layer_id.temporal_layer_id > 0 &&
+      if ((enc_cfg.ss_number_layers > 1 || enc_cfg.ts_number_layers > 1) &&
+          !(layer_id.temporal_layer_id > 0 &&
             layer_id.temporal_layer_id == (int)enc_cfg.ts_number_layers - 1 &&
             cx_pkt->data.frame
                 .spatial_layer_encoded[enc_cfg.ss_number_layers - 1])) {