From f93d5dd0e60c5e1b54daad3e3b6446454a6ac5f6 Mon Sep 17 00:00:00 2001 From: Marco Paniconi Date: Thu, 7 Mar 2019 12:24:11 -0800 Subject: [PATCH] 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 --- examples/vp9_spatial_svc_encoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/vp9_spatial_svc_encoder.c b/examples/vp9_spatial_svc_encoder.c index 05fd4d9..f15dae4 100644 --- a/examples/vp9_spatial_svc_encoder.c +++ b/examples/vp9_spatial_svc_encoder.c @@ -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])) { -- 2.7.4