diff options
author | Jerome Jiang <jianj@google.com> | 2017-08-14 11:55:42 -0700 |
---|---|---|
committer | Jerome Jiang <jianj@google.com> | 2017-08-14 12:00:00 -0700 |
commit | 2caff16151bc0450142aaab5bc44dcf7ef603e11 (patch) | |
tree | 959e79bd2e87eb895ba6bb46e11be78918e2ba77 | |
parent | 1ab60466ec03a30795b485328b50c330cef33f4c (diff) | |
download | libvpx-2caff16151bc0450142aaab5bc44dcf7ef603e11.tar libvpx-2caff16151bc0450142aaab5bc44dcf7ef603e11.tar.gz libvpx-2caff16151bc0450142aaab5bc44dcf7ef603e11.tar.bz2 libvpx-2caff16151bc0450142aaab5bc44dcf7ef603e11.zip |
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
-rw-r--r-- | examples/vp9_spatial_svc_encoder.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |