diff options
author | Marco Paniconi <marpan@google.com> | 2014-02-24 18:14:50 -0800 |
---|---|---|
committer | Marco Paniconi <marpan@google.com> | 2014-02-25 19:08:30 -0800 |
commit | f61b962c1a33edade1fe088562311195453de9fa (patch) | |
tree | 5f3c3953472c8fd4c2914c3a8a28e0ee50a7643b /test/error_resilience_test.cc | |
parent | c30cc9f2e4a61d0c8ffcd490bcaafd803267cc9f (diff) | |
download | libvpx-f61b962c1a33edade1fe088562311195453de9fa.tar libvpx-f61b962c1a33edade1fe088562311195453de9fa.tar.gz libvpx-f61b962c1a33edade1fe088562311195453de9fa.tar.bz2 libvpx-f61b962c1a33edade1fe088562311195453de9fa.zip |
Add consective frame loss to error_resilience test.
Modify existing test to also check the case of dropping
(i.e., skip decoding) a consecutive list of frames.
Change-Id: Ia8c1195559f952e86e6697996931d3a920c05ae3
Diffstat (limited to 'test/error_resilience_test.cc')
-rw-r--r-- | test/error_resilience_test.cc | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/test/error_resilience_test.cc b/test/error_resilience_test.cc index 30c20e91f..4cd9efb86 100644 --- a/test/error_resilience_test.cc +++ b/test/error_resilience_test.cc @@ -16,8 +16,8 @@ namespace { -const int kMaxErrorFrames = 8; -const int kMaxDroppableFrames = 8; +const int kMaxErrorFrames = 12; +const int kMaxDroppableFrames = 12; class ErrorResilienceTest : public ::libvpx_test::EncoderTest, public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> { @@ -175,6 +175,10 @@ TEST_P(ErrorResilienceTest, OnVersusOff) { } } +// Check for successful decoding and no encoder/decoder mismatch +// if we lose (i.e., drop before decoding) a set of droppable +// frames (i.e., frames that don't update any reference buffers). +// Check both isolated and consecutive loss. TEST_P(ErrorResilienceTest, DropFramesWithoutRecovery) { const vpx_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; @@ -186,14 +190,18 @@ TEST_P(ErrorResilienceTest, DropFramesWithoutRecovery) { init_flags_ = VPX_CODEC_USE_PSNR; libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288, - timebase.den, timebase.num, 0, 30); + timebase.den, timebase.num, 0, 40); // Error resilient mode ON. cfg_.g_error_resilient = 1; - - // Set an arbitrary set of error frames same as droppable frames - unsigned int num_droppable_frames = 2; - unsigned int droppable_frame_list[] = {5, 16}; + cfg_.kf_mode = VPX_KF_DISABLED; + + // Set an arbitrary set of error frames same as droppable frames. + // In addition to isolated loss/drop, add a long consecutive series + // (of size 9) of dropped frames. + unsigned int num_droppable_frames = 11; + unsigned int droppable_frame_list[] = {5, 16, 22, 23, 24, 25, 26, 27, 28, + 29, 30}; SetDroppableFrames(num_droppable_frames, droppable_frame_list); SetErrorFrames(num_droppable_frames, droppable_frame_list); ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); @@ -202,7 +210,7 @@ TEST_P(ErrorResilienceTest, DropFramesWithoutRecovery) { << GetMismatchFrames() << "\n"; EXPECT_EQ(GetMismatchFrames(), (unsigned int) 0); - // reset previously set error/droppable frames + // Reset previously set of error/droppable frames. Reset(); #if 0 |