From 48e1b2b97d88ca4e81f07999e0a9c8a1b225d0fa Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Thu, 21 Jun 2018 14:08:45 -0700 Subject: [PATCH] Add capibility to configure decoder in encode tests. This will allow us to test SVC features like Decode up to certain layers. Change-Id: Icfb6f9d107108054cd0917197552e09ae48cbc52 --- test/encode_test_driver.cc | 1 + test/encode_test_driver.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc index b2cbc3f05..005a4b9c3 100644 --- a/test/encode_test_driver.cc +++ b/test/encode_test_driver.cc @@ -214,6 +214,7 @@ void EncoderTest::RunLoop(VideoSource *video) { case VPX_CODEC_CX_FRAME_PKT: has_cxdata = true; if (decoder.get() != NULL && DoDecode()) { + PreDecodeFrameHook(video, decoder.get()); vpx_codec_err_t res_dec = decoder->DecodeFrame( (const uint8_t *)pkt->data.frame.buf, pkt->data.frame.sz); diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h index 69f4256be..d7e7c95f9 100644 --- a/test/encode_test_driver.h +++ b/test/encode_test_driver.h @@ -232,6 +232,9 @@ class EncoderTest { virtual void PreEncodeFrameHook(VideoSource * /*video*/, Encoder * /*encoder*/) {} + virtual void PreDecodeFrameHook(VideoSource * /*video*/, + Decoder * /*decoder*/) {} + virtual void PostEncodeFrameHook(Encoder * /*encoder*/) {} // Hook to be called on every compressed data packet. -- 2.40.0