From 2caff16151bc0450142aaab5bc44dcf7ef603e11 Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Mon, 14 Aug 2017 11:55:42 -0700 Subject: [PATCH] vp9 svc: Fix the stats output when sl = 1. Actual frame size and bitrate is all 0 when using SVC sample encoder with sl = 1 because the stats are set in parse_superframe_index which will not caculate properly when sl = 1 since there is no superframe. Use pkt->data.frame.sz instead when sl = 1. Change-Id: I93f5e98a4c779e32b007e1564ba5396af9e34ad6 --- examples/vp9_spatial_svc_encoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/vp9_spatial_svc_encoder.c b/examples/vp9_spatial_svc_encoder.c index d5d22b75b..93b9bcaca 100644 --- a/examples/vp9_spatial_svc_encoder.c +++ b/examples/vp9_spatial_svc_encoder.c @@ -780,6 +780,8 @@ int main(int argc, const char **argv) { vpx_codec_control(&codec, VP9E_GET_SVC_LAYER_ID, &layer_id); parse_superframe_index(cx_pkt->data.frame.buf, cx_pkt->data.frame.sz, sizes, &count); + if (enc_cfg.ss_number_layers == 1) + sizes[0] = cx_pkt->data.frame.sz; // Note computing input_layer_frames here won't account for frame // drops in rate control stats. // TODO(marpan): Fix this for non-bypass mode so we can get stats