summaryrefslogtreecommitdiff
path: root/test/encode_test_driver.h
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2012-07-10 15:43:44 -0700
committerJohn Koleszar <jkoleszar@google.com>2012-07-10 15:46:53 -0700
commit606ac45b2f16094540ad0616a1b79ae3c8f7ec79 (patch)
tree269054bf411abfc996b75ed20ad99477d38d27cf /test/encode_test_driver.h
parentb25ebf7dde596eacebe807e305044a74ccb55d57 (diff)
downloadlibvpx-606ac45b2f16094540ad0616a1b79ae3c8f7ec79.tar
libvpx-606ac45b2f16094540ad0616a1b79ae3c8f7ec79.tar.gz
libvpx-606ac45b2f16094540ad0616a1b79ae3c8f7ec79.tar.bz2
libvpx-606ac45b2f16094540ad0616a1b79ae3c8f7ec79.zip
keyframe_test: use a fixed speed step for realtime
The lower complexity modes may not generate a keyframe automatically. This behavior was found when running under Valgrind, as the slow performance caused the speed selection to pick lower complexities than when running natively. Instead, use a fixed complexity for the realtime auto keyframe test. Affected tests: AllModes/KeyframeTest.TestAutoKeyframe/0 Change-Id: I44e3f44e125ad587c293ab5ece29511d7023be9b
Diffstat (limited to 'test/encode_test_driver.h')
-rw-r--r--test/encode_test_driver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h
index 2fb627cce..de4783044 100644
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -101,6 +101,11 @@ class Encoder {
EncodeFrame(video, 0);
}
+ void Control(int ctrl_id, int arg) {
+ const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
+ ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ }
+
void set_deadline(unsigned long deadline) {
deadline_ = deadline;
}
@@ -158,6 +163,7 @@ class EncoderTest {
// Hook to be called before encoding a frame.
virtual void PreEncodeFrameHook(VideoSource *video) {}
+ virtual void PreEncodeFrameHook(VideoSource *video, Encoder *encoder) {}
// Hook to be called on every compressed data packet.
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {}