ref: 11bf7ea354cb69755e1f0e1a71351b166ae30677
parent: 268ec8dcfbbd23339eea06805aff68a28510a3cd
author: Marco <[email protected]>
date: Tue Mar 8 11:29:54 EST 2016
vp9-svc: Fix to frame dropping in svc mode. Don't advance the svc frame counters on dropped frame, since this can break the referencing scheme and lead to a crash/assert. Updated svc-datarate unittest to add a lower bitrate test. Change only affects 1 pass cbr svc, with frame dropper enabled. Change-Id: Ibb7530b7a587a9344d46898d9286fd9e2ef0779c
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -905,8 +905,8 @@
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 200);
// TODO(wonkap/marpan): Check that effective_datarate for each layer hits the
- // layer target_bitrate. Also check if test can pass at lower bitrate (~200k).
- for (int i = 400; i <= 800; i += 200) {
+ // layer target_bitrate.
+ for (int i = 200; i <= 800; i += 200) {
cfg_.rc_target_bitrate = i;
ResetModel();
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -3999,8 +3999,12 @@
++cm->current_video_frame;
cpi->ext_refresh_frame_flags_pending = 0;
cpi->svc.rc_drop_superframe = 1;
- if (cpi->use_svc)
- vp9_inc_frame_in_layer(cpi);
+ // TODO(marpan): Advancing the svc counters on dropped frames can break
+ // the referencing scheme for the fixed svc patterns defined in
+ // vp9_one_pass_cbr_svc_start_layer(). Look into fixing this issue, but
+ // for now, don't advance the svc frame counters on dropped frame.
+ // if (cpi->use_svc)
+ // vp9_inc_frame_in_layer(cpi);
return;
}
}