diff options
author | Jim Bankoski <jimbankoski@google.com> | 2012-10-01 14:17:43 -0700 |
---|---|---|
committer | Jim Bankoski <jimbankoski@google.com> | 2012-10-01 14:17:43 -0700 |
commit | 6f35b1958e0a767240ee20f8e2cece59b1dc1e12 (patch) | |
tree | 8f09a4d5caa2153f8cf41fbec6885e31d0bd0980 /test/keyframe_test.cc | |
parent | 9704cdec9fb777833599312fc84e3f1311d25eed (diff) | |
download | libvpx-6f35b1958e0a767240ee20f8e2cece59b1dc1e12.tar libvpx-6f35b1958e0a767240ee20f8e2cece59b1dc1e12.tar.gz libvpx-6f35b1958e0a767240ee20f8e2cece59b1dc1e12.tar.bz2 libvpx-6f35b1958e0a767240ee20f8e2cece59b1dc1e12.zip |
Disable keyframe in real time that's placed one frame after a cut.
The codec as it stood placed a keyframe one frame after a
real cut scene - and ignored datarate and other considerations.
TODO: Its possible that we should detect a keyframe and recode
the frame ( in certain circumstances) to improve quality.
Change-Id: Ia1fd6d90103f4da4d21ca5ab62897d22e0b888a8
Diffstat (limited to 'test/keyframe_test.cc')
-rw-r--r-- | test/keyframe_test.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/keyframe_test.cc b/test/keyframe_test.cc index 19c715238..9925daea7 100644 --- a/test/keyframe_test.cc +++ b/test/keyframe_test.cc @@ -62,7 +62,10 @@ TEST_P(KeyframeTest, TestRandomVideoSource) { ::libvpx_test::RandomVideoSource video; ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); - EXPECT_GT(kf_count_, 1); + // In realtime mode - auto placed keyframes are exceedingly rare, don't + // bother with this check if(GetParam() > 0) + if(GetParam() > 0) + EXPECT_GT(kf_count_, 1); } TEST_P(KeyframeTest, TestDisableKeyframes) { @@ -121,7 +124,10 @@ TEST_P(KeyframeTest, TestAutoKeyframe) { ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); - EXPECT_EQ(2u, kf_pts_list_.size()) << " Not the right number of keyframes "; + // In realtime mode - auto placed keyframes are exceedingly rare, don't + // bother with this check + if(GetParam() > 0) + EXPECT_EQ(2u, kf_pts_list_.size()) << " Not the right number of keyframes "; // Verify that keyframes match the file keyframes in the file. for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin(); |