]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix to sample encoder for 1 layer
authorMarco Paniconi <marpan@google.com>
Thu, 7 Mar 2019 20:24:11 +0000 (12:24 -0800)
committerMarco Paniconi <marpan@google.com>
Thu, 7 Mar 2019 20:31:59 +0000 (12:31 -0800)
Fix to vp9_spatial_svc_encoder to run case of
1 spatial, 1 temporal layer.

Change-Id: I93675c3c4bd2c55cb1c971679588525a8e5b889d

examples/vp9_spatial_svc_encoder.c

index 05fd4d9d0cfdad918c2159acedec3bb752364e75..f15dae4b1d585cee0941a3b39c285beca70572ba 100644 (file)
@@ -1182,7 +1182,8 @@ int main(int argc, const char **argv) {
       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])) {