shithub: libvpx

Download patch

ref: 48e1b2b97d88ca4e81f07999e0a9c8a1b225d0fa
parent: 69a6506a8ff81dc3d222df21d19812e3125779dd
author: Jerome Jiang <[email protected]>
date: Thu Jun 21 10:08:45 EDT 2018

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

--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -214,6 +214,7 @@
           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);
 
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -232,6 +232,9 @@
   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.