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
This commit is contained in:
Jerome Jiang 2017-08-14 11:55:42 -07:00
parent 1ab60466ec
commit 2caff16151

View File

@ -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