ref: 994a552c095b2198a71df0aacc3bab16c3572005
parent: 2a6c7a1a9b66035a96f13b3df473bf029bf71a46
parent: f9d69bd0fd08c2c2cd02db9cbc0948093a76160f
author: Frank Galligan <[email protected]>
date: Thu Dec 12 03:26:43 EST 2013
Merge "Add pre decode frame hook to decoder test class."
--- a/test/decode_test_driver.cc
+++ b/test/decode_test_driver.cc
@@ -30,6 +30,7 @@
// Decode frames.
for (video->Begin(); video->cxdata(); video->Next()) {
+ PreDecodeFrameHook(*video, decoder);
vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(),
video->frame_size());
ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
--- a/test/decode_test_driver.h
+++ b/test/decode_test_driver.h
@@ -101,6 +101,10 @@
// Main decoding loop
virtual void RunLoop(CompressedVideoSource *video);
+ // Hook to be called before decompressing every frame.
+ virtual void PreDecodeFrameHook(const CompressedVideoSource& video,
+ Decoder *decoder) {}
+
// Hook to be called on every decompressed frame.
virtual void DecompressedFrameHook(const vpx_image_t& img,
const unsigned int frame_number) {}