Commit 11bf7ea3 authored by Marco's avatar Marco

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
parent 268ec8dc
......@@ -905,8 +905,8 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SpatialLayers) {
::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,
......
......@@ -3999,8 +3999,12 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
++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;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment