Adds a test for the VP8E_SET_SCALEMODE control
Tests that the external interface to set the internal codec scaling
works as expected. Also updates the test to pull the height from
the decoded frame size rather than parsing the keyframe header,
in anticipation of allowing resolution changes on non-keyframes.
Change-Id: I3ed92117d8e5288fbbd1e7b618f2f233d0fe2c17
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h
index 0944dc2..35082a7 100644
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -117,6 +117,11 @@
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
}
+ void Control(int ctrl_id, struct vpx_scaling_mode *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;
}
@@ -194,6 +199,10 @@
virtual void MismatchHook(const vpx_image_t *img1,
const vpx_image_t *img2);
+ // Hook to be called on every decompressed frame.
+ virtual void DecompressedFrameHook(const vpx_image_t& img,
+ vpx_codec_pts_t pts) {}
+
bool abort_;
vpx_codec_enc_cfg_t cfg_;
unsigned int passes_;