ref: 2caff16151bc0450142aaab5bc44dcf7ef603e11
parent: 1ab60466ec03a30795b485328b50c330cef33f4c
author: Jerome Jiang <[email protected]>
date: Mon Aug 14 07:55:42 EDT 2017
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
--- a/examples/vp9_spatial_svc_encoder.c
+++ b/examples/vp9_spatial_svc_encoder.c
@@ -780,6 +780,8 @@
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