Support multiple codecs in test infrastructure
This commit starts to convert the tests to a system where the codec to be used is provided by a factory object. Currently no tests are instantiated for VP9 since they all fail for various reasons, but it was verified that they're called and the correct codec is instantiated. Change-Id: Ia7506df2ca3a7651218ba3ca560634f08c9fbdeb
This commit is contained in:
		@@ -8,19 +8,20 @@
 | 
				
			|||||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
					 *  be found in the AUTHORS file in the root of the source tree.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/encode_test_driver.h"
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
#include "test/i420_video_source.h"
 | 
					#include "test/i420_video_source.h"
 | 
				
			||||||
 | 
					#include "test/util.h"
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// lookahead range: [kLookAheadMin, kLookAheadMax).
 | 
					// lookahead range: [kLookAheadMin, kLookAheadMax).
 | 
				
			||||||
const int kLookAheadMin = 5;
 | 
					const int kLookAheadMin = 5;
 | 
				
			||||||
const int kLookAheadMax = 26;
 | 
					const int kLookAheadMax = 26;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class AltRefTest : public libvpx_test::EncoderTest,
 | 
					class AltRefTest : public ::libvpx_test::EncoderTest,
 | 
				
			||||||
    public ::testing::TestWithParam<int> {
 | 
					    public ::libvpx_test::CodecTestWithParam<int> {
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  AltRefTest() : altref_count_(0) {}
 | 
					  AltRefTest() : EncoderTest(GET_PARAM(0)), altref_count_(0) {}
 | 
				
			||||||
  virtual ~AltRefTest() {}
 | 
					  virtual ~AltRefTest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void SetUp() {
 | 
					  virtual void SetUp() {
 | 
				
			||||||
@@ -58,7 +59,7 @@ TEST_P(AltRefTest, MonotonicTimestamps) {
 | 
				
			|||||||
  const vpx_rational timebase = { 33333333, 1000000000 };
 | 
					  const vpx_rational timebase = { 33333333, 1000000000 };
 | 
				
			||||||
  cfg_.g_timebase = timebase;
 | 
					  cfg_.g_timebase = timebase;
 | 
				
			||||||
  cfg_.rc_target_bitrate = 1000;
 | 
					  cfg_.rc_target_bitrate = 1000;
 | 
				
			||||||
  cfg_.g_lag_in_frames = GetParam();
 | 
					  cfg_.g_lag_in_frames = GET_PARAM(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
 | 
					  libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
 | 
				
			||||||
                                     timebase.den, timebase.num, 0, 30);
 | 
					                                     timebase.den, timebase.num, 0, 30);
 | 
				
			||||||
@@ -66,6 +67,7 @@ TEST_P(AltRefTest, MonotonicTimestamps) {
 | 
				
			|||||||
  EXPECT_GE(altref_count(), 1);
 | 
					  EXPECT_GE(altref_count(), 1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTANTIATE_TEST_CASE_P(NonZeroLag, AltRefTest,
 | 
					
 | 
				
			||||||
 | 
					VP8_INSTANTIATE_TEST_CASE(AltRefTest,
 | 
				
			||||||
                          ::testing::Range(kLookAheadMin, kLookAheadMax));
 | 
					                          ::testing::Range(kLookAheadMin, kLookAheadMax));
 | 
				
			||||||
}  // namespace
 | 
					}  // namespace
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										232
									
								
								test/codec_factory.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										232
									
								
								test/codec_factory.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,232 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 *  Copyright (c) 2013 The WebM project authors. All Rights Reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  Use of this source code is governed by a BSD-style license
 | 
				
			||||||
 | 
					 *  that can be found in the LICENSE file in the root of the source
 | 
				
			||||||
 | 
					 *  tree. An additional intellectual property rights grant can be found
 | 
				
			||||||
 | 
					 *  in the file PATENTS.  All contributing project authors may
 | 
				
			||||||
 | 
					 *  be found in the AUTHORS file in the root of the source tree.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#ifndef TEST_CODEC_FACTORY_H_
 | 
				
			||||||
 | 
					#define TEST_CODEC_FACTORY_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern "C" {
 | 
				
			||||||
 | 
					#include "./vpx_config.h"
 | 
				
			||||||
 | 
					#include "vpx/vpx_decoder.h"
 | 
				
			||||||
 | 
					#include "vpx/vpx_encoder.h"
 | 
				
			||||||
 | 
					#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
 | 
				
			||||||
 | 
					#include "vpx/vp8cx.h"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
 | 
				
			||||||
 | 
					#include "vpx/vp8dx.h"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "test/decode_test_driver.h"
 | 
				
			||||||
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
 | 
					namespace libvpx_test {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class CodecFactory {
 | 
				
			||||||
 | 
					 public:
 | 
				
			||||||
 | 
					  CodecFactory() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual ~CodecFactory() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
 | 
				
			||||||
 | 
					                                 unsigned long deadline) const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
 | 
				
			||||||
 | 
					                                 unsigned long deadline,
 | 
				
			||||||
 | 
					                                 const unsigned long init_flags,
 | 
				
			||||||
 | 
					                                 TwopassStatsStore *stats) const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
 | 
				
			||||||
 | 
					                                               int usage) const = 0;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Provide CodecTestWith<n>Params classes for a variable number of parameters
 | 
				
			||||||
 | 
					 * to avoid having to include a pointer to the CodecFactory in every test
 | 
				
			||||||
 | 
					 * definition.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					template<class T1>
 | 
				
			||||||
 | 
					class CodecTestWithParam : public ::testing::TestWithParam<
 | 
				
			||||||
 | 
					    std::tr1::tuple< const libvpx_test::CodecFactory*, T1 > > {
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					template<class T1, class T2>
 | 
				
			||||||
 | 
					class CodecTestWith2Params : public ::testing::TestWithParam<
 | 
				
			||||||
 | 
					    std::tr1::tuple< const libvpx_test::CodecFactory*, T1, T2 > > {
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					template<class T1, class T2, class T3>
 | 
				
			||||||
 | 
					class CodecTestWith3Params : public ::testing::TestWithParam<
 | 
				
			||||||
 | 
					    std::tr1::tuple< const libvpx_test::CodecFactory*, T1, T2, T3 > > {
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * VP8 Codec Definitions
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#if CONFIG_VP8
 | 
				
			||||||
 | 
					class VP8Decoder : public Decoder {
 | 
				
			||||||
 | 
					 public:
 | 
				
			||||||
 | 
					  VP8Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
 | 
				
			||||||
 | 
					      : Decoder(cfg, deadline) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 protected:
 | 
				
			||||||
 | 
					  virtual const vpx_codec_iface_t* CodecInterface() const {
 | 
				
			||||||
 | 
					#if CONFIG_VP8_DECODER
 | 
				
			||||||
 | 
					    return &vpx_codec_vp8_dx_algo;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class VP8Encoder : public Encoder {
 | 
				
			||||||
 | 
					 public:
 | 
				
			||||||
 | 
					  VP8Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
 | 
				
			||||||
 | 
					             const unsigned long init_flags, TwopassStatsStore *stats)
 | 
				
			||||||
 | 
					      : Encoder(cfg, deadline, init_flags, stats) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 protected:
 | 
				
			||||||
 | 
					  virtual const vpx_codec_iface_t* CodecInterface() const {
 | 
				
			||||||
 | 
					#if CONFIG_VP8_ENCODER
 | 
				
			||||||
 | 
					    return &vpx_codec_vp8_cx_algo;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class VP8CodecFactory : public CodecFactory {
 | 
				
			||||||
 | 
					 public:
 | 
				
			||||||
 | 
					  VP8CodecFactory() : CodecFactory() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
 | 
				
			||||||
 | 
					                                 unsigned long deadline) const {
 | 
				
			||||||
 | 
					#if CONFIG_VP8_DECODER
 | 
				
			||||||
 | 
					    return new VP8Decoder(cfg, deadline);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
 | 
				
			||||||
 | 
					                                 unsigned long deadline,
 | 
				
			||||||
 | 
					                                 const unsigned long init_flags,
 | 
				
			||||||
 | 
					                                 TwopassStatsStore *stats) const {
 | 
				
			||||||
 | 
					#if CONFIG_VP8_ENCODER
 | 
				
			||||||
 | 
					    return new VP8Encoder(cfg, deadline, init_flags, stats);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
 | 
				
			||||||
 | 
					                                               int usage) const {
 | 
				
			||||||
 | 
					#if CONFIG_VP8_ENCODER
 | 
				
			||||||
 | 
					    return vpx_codec_enc_config_default(&vpx_codec_vp8_cx_algo, cfg, usage);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return VPX_CODEC_INCAPABLE;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const libvpx_test::VP8CodecFactory kVP8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define VP8_INSTANTIATE_TEST_CASE(test, params)\
 | 
				
			||||||
 | 
					  INSTANTIATE_TEST_CASE_P(VP8, test, \
 | 
				
			||||||
 | 
					      ::testing::Combine( \
 | 
				
			||||||
 | 
					          ::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
 | 
				
			||||||
 | 
					              &libvpx_test::kVP8)), \
 | 
				
			||||||
 | 
					          params))
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					#define VP8_INSTANTIATE_TEST_CASE(test, params)
 | 
				
			||||||
 | 
					#endif  // CONFIG_VP8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * VP9 Codec Definitions
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#if CONFIG_VP9
 | 
				
			||||||
 | 
					class VP9Decoder : public Decoder {
 | 
				
			||||||
 | 
					 public:
 | 
				
			||||||
 | 
					  VP9Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
 | 
				
			||||||
 | 
					      : Decoder(cfg, deadline) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 protected:
 | 
				
			||||||
 | 
					  virtual const vpx_codec_iface_t* CodecInterface() const {
 | 
				
			||||||
 | 
					#if CONFIG_VP9_DECODER
 | 
				
			||||||
 | 
					    return &vpx_codec_vp9_dx_algo;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class VP9Encoder : public Encoder {
 | 
				
			||||||
 | 
					 public:
 | 
				
			||||||
 | 
					  VP9Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
 | 
				
			||||||
 | 
					             const unsigned long init_flags, TwopassStatsStore *stats)
 | 
				
			||||||
 | 
					      : Encoder(cfg, deadline, init_flags, stats) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 protected:
 | 
				
			||||||
 | 
					  virtual const vpx_codec_iface_t* CodecInterface() const {
 | 
				
			||||||
 | 
					#if CONFIG_VP9_ENCODER
 | 
				
			||||||
 | 
					    return &vpx_codec_vp9_cx_algo;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class VP9CodecFactory : public CodecFactory {
 | 
				
			||||||
 | 
					 public:
 | 
				
			||||||
 | 
					  VP9CodecFactory() : CodecFactory() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
 | 
				
			||||||
 | 
					                                 unsigned long deadline) const {
 | 
				
			||||||
 | 
					#if CONFIG_VP9_DECODER
 | 
				
			||||||
 | 
					    return new VP9Decoder(cfg, deadline);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
 | 
				
			||||||
 | 
					                                 unsigned long deadline,
 | 
				
			||||||
 | 
					                                 const unsigned long init_flags,
 | 
				
			||||||
 | 
					                                 TwopassStatsStore *stats) const {
 | 
				
			||||||
 | 
					#if CONFIG_VP9_ENCODER
 | 
				
			||||||
 | 
					    return new VP9Encoder(cfg, deadline, init_flags, stats);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
 | 
				
			||||||
 | 
					                                               int usage) const {
 | 
				
			||||||
 | 
					#if CONFIG_VP9_ENCODER
 | 
				
			||||||
 | 
					    return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    return VPX_CODEC_INCAPABLE;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const libvpx_test::VP9CodecFactory kVP9;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define VP9_INSTANTIATE_TEST_CASE(test, params)\
 | 
				
			||||||
 | 
					  INSTANTIATE_TEST_CASE_P(VP9, test, \
 | 
				
			||||||
 | 
					      ::testing::Combine( \
 | 
				
			||||||
 | 
					          ::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
 | 
				
			||||||
 | 
					               &libvpx_test::kVP9)), \
 | 
				
			||||||
 | 
					          params))
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					#define VP9_INSTANTIATE_TEST_CASE(test, params)
 | 
				
			||||||
 | 
					#endif  // CONFIG_VP9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}  // namespace libvpx_test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif  // TEST_CODEC_FACTORY_H_
 | 
				
			||||||
@@ -8,20 +8,22 @@
 | 
				
			|||||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
					 *  be found in the AUTHORS file in the root of the source tree.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/encode_test_driver.h"
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
 | 
					#include "test/util.h"
 | 
				
			||||||
#include "test/video_source.h"
 | 
					#include "test/video_source.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ConfigTest : public ::libvpx_test::EncoderTest,
 | 
					class ConfigTest : public ::libvpx_test::EncoderTest,
 | 
				
			||||||
    public ::testing::TestWithParam<enum libvpx_test::TestMode> {
 | 
					    public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
 | 
				
			||||||
 public:
 | 
					 | 
				
			||||||
  ConfigTest() : frame_count_in_(0), frame_count_out_(0), frame_count_max_(0) {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
 | 
					  ConfigTest() : EncoderTest(GET_PARAM(0)),
 | 
				
			||||||
 | 
					                 frame_count_in_(0), frame_count_out_(0), frame_count_max_(0) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void SetUp() {
 | 
					  virtual void SetUp() {
 | 
				
			||||||
    InitializeConfig();
 | 
					    InitializeConfig();
 | 
				
			||||||
    SetMode(GetParam());
 | 
					    SetMode(GET_PARAM(1));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void BeginPassHook(unsigned int /*pass*/) {
 | 
					  virtual void BeginPassHook(unsigned int /*pass*/) {
 | 
				
			||||||
@@ -57,5 +59,5 @@ TEST_P(ConfigTest, LagIsDisabled) {
 | 
				
			|||||||
  EXPECT_EQ(frame_count_in_, frame_count_out_);
 | 
					  EXPECT_EQ(frame_count_in_, frame_count_out_);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTANTIATE_TEST_CASE_P(OnePassModes, ConfigTest, ONE_PASS_TEST_MODES);
 | 
					VP8_INSTANTIATE_TEST_CASE(ConfigTest, ONE_PASS_TEST_MODES);
 | 
				
			||||||
}  // namespace
 | 
					}  // namespace
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,8 +9,12 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#include <cmath>
 | 
					#include <cmath>
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/encode_test_driver.h"
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
#include "test/i420_video_source.h"
 | 
					#include "test/i420_video_source.h"
 | 
				
			||||||
 | 
					#include "test/util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// CQ level range: [kCQLevelMin, kCQLevelMax).
 | 
					// CQ level range: [kCQLevelMin, kCQLevelMax).
 | 
				
			||||||
const int kCQLevelMin = 4;
 | 
					const int kCQLevelMin = 4;
 | 
				
			||||||
@@ -18,12 +22,13 @@ const int kCQLevelMax = 63;
 | 
				
			|||||||
const int kCQLevelStep = 8;
 | 
					const int kCQLevelStep = 8;
 | 
				
			||||||
const int kCQTargetBitrate = 2000;
 | 
					const int kCQTargetBitrate = 2000;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace {
 | 
					class CQTest : public ::libvpx_test::EncoderTest,
 | 
				
			||||||
 | 
					    public ::libvpx_test::CodecTestWithParam<int> {
 | 
				
			||||||
class CQTest : public libvpx_test::EncoderTest,
 | 
					 | 
				
			||||||
    public ::testing::TestWithParam<int> {
 | 
					 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  CQTest() : cq_level_(GetParam()) { init_flags_ = VPX_CODEC_USE_PSNR; }
 | 
					  CQTest() : EncoderTest(GET_PARAM(0)), cq_level_(GET_PARAM(1)) {
 | 
				
			||||||
 | 
					    init_flags_ = VPX_CODEC_USE_PSNR;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual ~CQTest() {}
 | 
					  virtual ~CQTest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void SetUp() {
 | 
					  virtual void SetUp() {
 | 
				
			||||||
@@ -100,7 +105,7 @@ TEST_P(CQTest, LinearPSNRIsHigherForCQLevel) {
 | 
				
			|||||||
  EXPECT_GE(cq_psnr_lin, vbr_psnr_lin);
 | 
					  EXPECT_GE(cq_psnr_lin, vbr_psnr_lin);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTANTIATE_TEST_CASE_P(CQLevelRange, CQTest,
 | 
					VP8_INSTANTIATE_TEST_CASE(CQTest,
 | 
				
			||||||
                          ::testing::Range(kCQLevelMin, kCQLevelMax,
 | 
					                          ::testing::Range(kCQLevelMin, kCQLevelMax,
 | 
				
			||||||
                                           kCQLevelStep));
 | 
					                                           kCQLevelStep));
 | 
				
			||||||
}  // namespace
 | 
					}  // namespace
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,17 +7,23 @@
 | 
				
			|||||||
 *  in the file PATENTS.  All contributing project authors may
 | 
					 *  in the file PATENTS.  All contributing project authors may
 | 
				
			||||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
					 *  be found in the AUTHORS file in the root of the source tree.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/encode_test_driver.h"
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
#include "test/i420_video_source.h"
 | 
					#include "test/i420_video_source.h"
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "test/util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class DatarateTest : public ::libvpx_test::EncoderTest,
 | 
					class DatarateTest : public ::libvpx_test::EncoderTest,
 | 
				
			||||||
    public ::testing::TestWithParam<enum libvpx_test::TestMode> {
 | 
					    public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
 | 
				
			||||||
 | 
					 public:
 | 
				
			||||||
 | 
					  DatarateTest() : EncoderTest(GET_PARAM(0)) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  virtual void SetUp() {
 | 
					  virtual void SetUp() {
 | 
				
			||||||
    InitializeConfig();
 | 
					    InitializeConfig();
 | 
				
			||||||
    SetMode(GetParam());
 | 
					    SetMode(GET_PARAM(1));
 | 
				
			||||||
    ResetModel();
 | 
					    ResetModel();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -174,5 +180,6 @@ TEST_P(DatarateTest, ChangingDropFrameThresh) {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTANTIATE_TEST_CASE_P(AllModes, DatarateTest, ALL_TEST_MODES);
 | 
					VP8_INSTANTIATE_TEST_CASE(DatarateTest, ALL_TEST_MODES);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}  // namespace
 | 
					}  // namespace
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,17 +7,17 @@
 | 
				
			|||||||
 *  in the file PATENTS.  All contributing project authors may
 | 
					 *  in the file PATENTS.  All contributing project authors may
 | 
				
			||||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
					 *  be found in the AUTHORS file in the root of the source tree.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/decode_test_driver.h"
 | 
					#include "test/decode_test_driver.h"
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
#include "test/register_state_check.h"
 | 
					#include "test/register_state_check.h"
 | 
				
			||||||
#include "test/video_source.h"
 | 
					#include "test/video_source.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace libvpx_test {
 | 
					namespace libvpx_test {
 | 
				
			||||||
#if CONFIG_VP8_DECODER
 | 
					 | 
				
			||||||
void Decoder::DecodeFrame(const uint8_t *cxdata, int size) {
 | 
					void Decoder::DecodeFrame(const uint8_t *cxdata, int size) {
 | 
				
			||||||
  if (!decoder_.priv) {
 | 
					  if (!decoder_.priv) {
 | 
				
			||||||
    const vpx_codec_err_t res_init = vpx_codec_dec_init(&decoder_,
 | 
					    const vpx_codec_err_t res_init = vpx_codec_dec_init(&decoder_,
 | 
				
			||||||
                                                        &vpx_codec_vp8_dx_algo,
 | 
					                                                        CodecInterface(),
 | 
				
			||||||
                                                        &cfg_, 0);
 | 
					                                                        &cfg_, 0);
 | 
				
			||||||
    ASSERT_EQ(VPX_CODEC_OK, res_init) << DecodeError();
 | 
					    ASSERT_EQ(VPX_CODEC_OK, res_init) << DecodeError();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -30,19 +30,21 @@ void Decoder::DecodeFrame(const uint8_t *cxdata, int size) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void DecoderTest::RunLoop(CompressedVideoSource *video) {
 | 
					void DecoderTest::RunLoop(CompressedVideoSource *video) {
 | 
				
			||||||
  vpx_codec_dec_cfg_t dec_cfg = {0};
 | 
					  vpx_codec_dec_cfg_t dec_cfg = {0};
 | 
				
			||||||
  Decoder decoder(dec_cfg, 0);
 | 
					  Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0);
 | 
				
			||||||
 | 
					  ASSERT_TRUE(decoder != NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Decode frames.
 | 
					  // Decode frames.
 | 
				
			||||||
  for (video->Begin(); video->cxdata(); video->Next()) {
 | 
					  for (video->Begin(); video->cxdata(); video->Next()) {
 | 
				
			||||||
    decoder.DecodeFrame(video->cxdata(), video->frame_size());
 | 
					    decoder->DecodeFrame(video->cxdata(), video->frame_size());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    DxDataIterator dec_iter = decoder.GetDxData();
 | 
					    DxDataIterator dec_iter = decoder->GetDxData();
 | 
				
			||||||
    const vpx_image_t *img = NULL;
 | 
					    const vpx_image_t *img = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Get decompressed data
 | 
					    // Get decompressed data
 | 
				
			||||||
    while ((img = dec_iter.Next()))
 | 
					    while ((img = dec_iter.Next()))
 | 
				
			||||||
      DecompressedFrameHook(*img, video->frame_number());
 | 
					      DecompressedFrameHook(*img, video->frame_number());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  delete decoder;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
}  // namespace libvpx_test
 | 
					}  // namespace libvpx_test
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,10 +14,10 @@
 | 
				
			|||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
#include "vpx_config.h"
 | 
					#include "vpx_config.h"
 | 
				
			||||||
#include "vpx/vpx_decoder.h"
 | 
					#include "vpx/vpx_decoder.h"
 | 
				
			||||||
#include "vpx/vp8dx.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace libvpx_test {
 | 
					namespace libvpx_test {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class CodecFactory;
 | 
				
			||||||
class CompressedVideoSource;
 | 
					class CompressedVideoSource;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Provides an object to handle decoding output
 | 
					// Provides an object to handle decoding output
 | 
				
			||||||
@@ -46,7 +46,7 @@ class Decoder {
 | 
				
			|||||||
    memset(&decoder_, 0, sizeof(decoder_));
 | 
					    memset(&decoder_, 0, sizeof(decoder_));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ~Decoder() {
 | 
					  virtual ~Decoder() {
 | 
				
			||||||
    vpx_codec_destroy(&decoder_);
 | 
					    vpx_codec_destroy(&decoder_);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -66,7 +66,9 @@ class Decoder {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  const char *DecodeError() {
 | 
					  virtual const vpx_codec_iface_t* CodecInterface() const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const char* DecodeError() {
 | 
				
			||||||
    const char *detail = vpx_codec_error_detail(&decoder_);
 | 
					    const char *detail = vpx_codec_error_detail(&decoder_);
 | 
				
			||||||
    return detail ? detail : vpx_codec_error(&decoder_);
 | 
					    return detail ? detail : vpx_codec_error(&decoder_);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -87,9 +89,11 @@ class DecoderTest {
 | 
				
			|||||||
                                     const unsigned int frame_number) {}
 | 
					                                     const unsigned int frame_number) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  DecoderTest() {}
 | 
					  explicit DecoderTest(const CodecFactory *codec) : codec_(codec) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual ~DecoderTest() {}
 | 
					  virtual ~DecoderTest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const CodecFactory *codec_;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}  // namespace libvpx_test
 | 
					}  // namespace libvpx_test
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,10 +8,9 @@
 | 
				
			|||||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
					 *  be found in the AUTHORS file in the root of the source tree.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "vpx_config.h"
 | 
					#include "vpx_config.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/encode_test_driver.h"
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
#if CONFIG_VP8_DECODER
 | 
					 | 
				
			||||||
#include "test/decode_test_driver.h"
 | 
					#include "test/decode_test_driver.h"
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#include "test/register_state_check.h"
 | 
					#include "test/register_state_check.h"
 | 
				
			||||||
#include "test/video_source.h"
 | 
					#include "test/video_source.h"
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
@@ -45,7 +44,7 @@ void Encoder::EncodeFrameInternal(const VideoSource &video,
 | 
				
			|||||||
    cfg_.g_h = img->d_h;
 | 
					    cfg_.g_h = img->d_h;
 | 
				
			||||||
    cfg_.g_timebase = video.timebase();
 | 
					    cfg_.g_timebase = video.timebase();
 | 
				
			||||||
    cfg_.rc_twopass_stats_in = stats_->buf();
 | 
					    cfg_.rc_twopass_stats_in = stats_->buf();
 | 
				
			||||||
    res = vpx_codec_enc_init(&encoder_, &vpx_codec_vp8_cx_algo, &cfg_,
 | 
					    res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_,
 | 
				
			||||||
                             init_flags_);
 | 
					                             init_flags_);
 | 
				
			||||||
    ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
					    ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -72,6 +71,11 @@ void Encoder::Flush() {
 | 
				
			|||||||
  ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
					  ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void EncoderTest::InitializeConfig() {
 | 
				
			||||||
 | 
					  const vpx_codec_err_t res = codec_->DefaultEncoderConfig(&cfg_, 0);
 | 
				
			||||||
 | 
					  ASSERT_EQ(VPX_CODEC_OK, res);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void EncoderTest::SetMode(TestMode mode) {
 | 
					void EncoderTest::SetMode(TestMode mode) {
 | 
				
			||||||
  switch (mode) {
 | 
					  switch (mode) {
 | 
				
			||||||
    case kRealTime:
 | 
					    case kRealTime:
 | 
				
			||||||
@@ -126,9 +130,7 @@ static bool compare_img(const vpx_image_t *img1,
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void EncoderTest::RunLoop(VideoSource *video) {
 | 
					void EncoderTest::RunLoop(VideoSource *video) {
 | 
				
			||||||
#if CONFIG_VP8_DECODER
 | 
					 | 
				
			||||||
  vpx_codec_dec_cfg_t dec_cfg = {0};
 | 
					  vpx_codec_dec_cfg_t dec_cfg = {0};
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  stats_.Reset();
 | 
					  stats_.Reset();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -143,31 +145,30 @@ void EncoderTest::RunLoop(VideoSource *video) {
 | 
				
			|||||||
      cfg_.g_pass = VPX_RC_LAST_PASS;
 | 
					      cfg_.g_pass = VPX_RC_LAST_PASS;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    BeginPassHook(pass);
 | 
					    BeginPassHook(pass);
 | 
				
			||||||
    Encoder encoder(cfg_, deadline_, init_flags_, &stats_);
 | 
					    Encoder* const encoder = codec_->CreateEncoder(cfg_, deadline_, init_flags_,
 | 
				
			||||||
#if CONFIG_VP8_DECODER
 | 
					                                                   &stats_);
 | 
				
			||||||
    Decoder decoder(dec_cfg, 0);
 | 
					    ASSERT_TRUE(encoder != NULL);
 | 
				
			||||||
 | 
					    Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0);
 | 
				
			||||||
    bool has_cxdata = false;
 | 
					    bool has_cxdata = false;
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
    bool again;
 | 
					    bool again;
 | 
				
			||||||
    for (again = true, video->Begin(); again; video->Next()) {
 | 
					    for (again = true, video->Begin(); again; video->Next()) {
 | 
				
			||||||
      again = video->img() != NULL;
 | 
					      again = video->img() != NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      PreEncodeFrameHook(video);
 | 
					      PreEncodeFrameHook(video);
 | 
				
			||||||
      PreEncodeFrameHook(video, &encoder);
 | 
					      PreEncodeFrameHook(video, encoder);
 | 
				
			||||||
      encoder.EncodeFrame(video, frame_flags_);
 | 
					      encoder->EncodeFrame(video, frame_flags_);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      CxDataIterator iter = encoder.GetCxData();
 | 
					      CxDataIterator iter = encoder->GetCxData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      while (const vpx_codec_cx_pkt_t *pkt = iter.Next()) {
 | 
					      while (const vpx_codec_cx_pkt_t *pkt = iter.Next()) {
 | 
				
			||||||
        again = true;
 | 
					        again = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        switch (pkt->kind) {
 | 
					        switch (pkt->kind) {
 | 
				
			||||||
          case VPX_CODEC_CX_FRAME_PKT:
 | 
					          case VPX_CODEC_CX_FRAME_PKT:
 | 
				
			||||||
#if CONFIG_VP8_DECODER
 | 
					 | 
				
			||||||
            has_cxdata = true;
 | 
					            has_cxdata = true;
 | 
				
			||||||
            decoder.DecodeFrame((const uint8_t*)pkt->data.frame.buf,
 | 
					            if (decoder)
 | 
				
			||||||
 | 
					              decoder->DecodeFrame((const uint8_t*)pkt->data.frame.buf,
 | 
				
			||||||
                                   pkt->data.frame.sz);
 | 
					                                   pkt->data.frame.sz);
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
            ASSERT_GE(pkt->data.frame.pts, last_pts_);
 | 
					            ASSERT_GE(pkt->data.frame.pts, last_pts_);
 | 
				
			||||||
            last_pts_ = pkt->data.frame.pts;
 | 
					            last_pts_ = pkt->data.frame.pts;
 | 
				
			||||||
            FramePktHook(pkt);
 | 
					            FramePktHook(pkt);
 | 
				
			||||||
@@ -182,23 +183,26 @@ void EncoderTest::RunLoop(VideoSource *video) {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_VP8_DECODER
 | 
					      if (decoder && has_cxdata) {
 | 
				
			||||||
      if (has_cxdata) {
 | 
					        const vpx_image_t *img_enc = encoder->GetPreviewFrame();
 | 
				
			||||||
        const vpx_image_t *img_enc = encoder.GetPreviewFrame();
 | 
					        DxDataIterator dec_iter = decoder->GetDxData();
 | 
				
			||||||
        DxDataIterator dec_iter = decoder.GetDxData();
 | 
					 | 
				
			||||||
        const vpx_image_t *img_dec = dec_iter.Next();
 | 
					        const vpx_image_t *img_dec = dec_iter.Next();
 | 
				
			||||||
        if(img_enc && img_dec) {
 | 
					        if(img_enc && img_dec) {
 | 
				
			||||||
          const bool res = compare_img(img_enc, img_dec);
 | 
					          const bool res = compare_img(img_enc, img_dec);
 | 
				
			||||||
          ASSERT_TRUE(res)<< "Encoder/Decoder mismatch found.";
 | 
					          ASSERT_TRUE(res)<< "Encoder/Decoder mismatch found.";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
#endif
 | 
					
 | 
				
			||||||
      if (!Continue())
 | 
					      if (!Continue())
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EndPassHook();
 | 
					    EndPassHook();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (decoder)
 | 
				
			||||||
 | 
					      delete decoder;
 | 
				
			||||||
 | 
					    delete encoder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!Continue())
 | 
					    if (!Continue())
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,10 +13,10 @@
 | 
				
			|||||||
#include <vector>
 | 
					#include <vector>
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
#include "vpx/vpx_encoder.h"
 | 
					#include "vpx/vpx_encoder.h"
 | 
				
			||||||
#include "vpx/vp8cx.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace libvpx_test {
 | 
					namespace libvpx_test {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class CodecFactory;
 | 
				
			||||||
class VideoSource;
 | 
					class VideoSource;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum TestMode {
 | 
					enum TestMode {
 | 
				
			||||||
@@ -36,6 +36,9 @@ enum TestMode {
 | 
				
			|||||||
                                              ::libvpx_test::kOnePassGood, \
 | 
					                                              ::libvpx_test::kOnePassGood, \
 | 
				
			||||||
                                              ::libvpx_test::kOnePassBest)
 | 
					                                              ::libvpx_test::kOnePassBest)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define TWO_PASS_TEST_MODES ::testing::Values(::libvpx_test::kTwoPassGood, \
 | 
				
			||||||
 | 
					                                              ::libvpx_test::kTwoPassBest)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Provides an object to handle the libvpx get_cx_data() iteration pattern
 | 
					// Provides an object to handle the libvpx get_cx_data() iteration pattern
 | 
				
			||||||
class CxDataIterator {
 | 
					class CxDataIterator {
 | 
				
			||||||
@@ -117,6 +120,8 @@ class Encoder {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
 | 
					  virtual const vpx_codec_iface_t* CodecInterface() const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const char *EncoderError() {
 | 
					  const char *EncoderError() {
 | 
				
			||||||
    const char *detail = vpx_codec_error_detail(&encoder_);
 | 
					    const char *detail = vpx_codec_error_detail(&encoder_);
 | 
				
			||||||
    return detail ? detail : vpx_codec_error(&encoder_);
 | 
					    return detail ? detail : vpx_codec_error(&encoder_);
 | 
				
			||||||
@@ -145,17 +150,14 @@ class Encoder {
 | 
				
			|||||||
// classes directly, so that tests can be parameterized differently.
 | 
					// classes directly, so that tests can be parameterized differently.
 | 
				
			||||||
class EncoderTest {
 | 
					class EncoderTest {
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  EncoderTest() : abort_(false), init_flags_(0), frame_flags_(0),
 | 
					  explicit EncoderTest(const CodecFactory *codec)
 | 
				
			||||||
 | 
					      : codec_(codec), abort_(false), init_flags_(0), frame_flags_(0),
 | 
				
			||||||
        last_pts_(0) {}
 | 
					        last_pts_(0) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual ~EncoderTest() {}
 | 
					  virtual ~EncoderTest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Initialize the cfg_ member with the default configuration.
 | 
					  // Initialize the cfg_ member with the default configuration.
 | 
				
			||||||
  void InitializeConfig() {
 | 
					  void InitializeConfig();
 | 
				
			||||||
    const vpx_codec_err_t res = vpx_codec_enc_config_default(
 | 
					 | 
				
			||||||
                                    &vpx_codec_vp8_cx_algo, &cfg_, 0);
 | 
					 | 
				
			||||||
    ASSERT_EQ(VPX_CODEC_OK, res);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Map the TestMode enum to the deadline_ and passes_ variables.
 | 
					  // Map the TestMode enum to the deadline_ and passes_ variables.
 | 
				
			||||||
  void SetMode(TestMode mode);
 | 
					  void SetMode(TestMode mode);
 | 
				
			||||||
@@ -182,6 +184,7 @@ class EncoderTest {
 | 
				
			|||||||
  // Hook to determine whether the encode loop should continue.
 | 
					  // Hook to determine whether the encode loop should continue.
 | 
				
			||||||
  virtual bool Continue() const { return !abort_; }
 | 
					  virtual bool Continue() const { return !abort_; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const CodecFactory   *codec_;
 | 
				
			||||||
  bool                 abort_;
 | 
					  bool                 abort_;
 | 
				
			||||||
  vpx_codec_enc_cfg_t  cfg_;
 | 
					  vpx_codec_enc_cfg_t  cfg_;
 | 
				
			||||||
  unsigned int         passes_;
 | 
					  unsigned int         passes_;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,19 +8,19 @@
 | 
				
			|||||||
  be found in the AUTHORS file in the root of the source tree.
 | 
					  be found in the AUTHORS file in the root of the source tree.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/encode_test_driver.h"
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
#include "test/i420_video_source.h"
 | 
					#include "test/i420_video_source.h"
 | 
				
			||||||
 | 
					#include "test/util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ErrorResilienceTest : public libvpx_test::EncoderTest,
 | 
					class ErrorResilienceTest : public ::libvpx_test::EncoderTest,
 | 
				
			||||||
    public ::testing::TestWithParam<int> {
 | 
					    public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  ErrorResilienceTest() {
 | 
					  ErrorResilienceTest() : EncoderTest(GET_PARAM(0)), psnr_(0.0), nframes_(0),
 | 
				
			||||||
    psnr_ = 0.0;
 | 
					      encoding_mode_(GET_PARAM(1)) {}
 | 
				
			||||||
    nframes_ = 0;
 | 
					
 | 
				
			||||||
    encoding_mode_ = static_cast<libvpx_test::TestMode>(GetParam());
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  virtual ~ErrorResilienceTest() {}
 | 
					  virtual ~ErrorResilienceTest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void SetUp() {
 | 
					  virtual void SetUp() {
 | 
				
			||||||
@@ -85,6 +85,5 @@ TEST_P(ErrorResilienceTest, OnVersusOff) {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTANTIATE_TEST_CASE_P(OnOffTest, ErrorResilienceTest,
 | 
					VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTest, ONE_PASS_TEST_MODES);
 | 
				
			||||||
                        ONE_PASS_TEST_MODES);
 | 
					 | 
				
			||||||
}  // namespace
 | 
					}  // namespace
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,18 +9,22 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#include <climits>
 | 
					#include <climits>
 | 
				
			||||||
#include <vector>
 | 
					#include <vector>
 | 
				
			||||||
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/encode_test_driver.h"
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
#include "test/i420_video_source.h"
 | 
					#include "test/i420_video_source.h"
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "test/util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class KeyframeTest : public ::libvpx_test::EncoderTest,
 | 
					class KeyframeTest : public ::libvpx_test::EncoderTest,
 | 
				
			||||||
    public ::testing::TestWithParam<enum libvpx_test::TestMode> {
 | 
					    public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
 | 
					  KeyframeTest() : EncoderTest(GET_PARAM(0)) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void SetUp() {
 | 
					  virtual void SetUp() {
 | 
				
			||||||
    InitializeConfig();
 | 
					    InitializeConfig();
 | 
				
			||||||
    SetMode(GetParam());
 | 
					    SetMode(GET_PARAM(1));
 | 
				
			||||||
    kf_count_ = 0;
 | 
					    kf_count_ = 0;
 | 
				
			||||||
    kf_count_max_ = INT_MAX;
 | 
					    kf_count_max_ = INT_MAX;
 | 
				
			||||||
    kf_do_force_kf_ = false;
 | 
					    kf_do_force_kf_ = false;
 | 
				
			||||||
@@ -64,7 +68,7 @@ TEST_P(KeyframeTest, TestRandomVideoSource) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  // In realtime mode - auto placed keyframes are exceedingly rare,  don't
 | 
					  // In realtime mode - auto placed keyframes are exceedingly rare,  don't
 | 
				
			||||||
  // bother with this check   if(GetParam() > 0)
 | 
					  // bother with this check   if(GetParam() > 0)
 | 
				
			||||||
  if(GetParam() > 0)
 | 
					  if (GET_PARAM(1) > 0)
 | 
				
			||||||
    EXPECT_GT(kf_count_, 1);
 | 
					    EXPECT_GT(kf_count_, 1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -126,7 +130,7 @@ TEST_P(KeyframeTest, TestAutoKeyframe) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  // In realtime mode - auto placed keyframes are exceedingly rare,  don't
 | 
					  // In realtime mode - auto placed keyframes are exceedingly rare,  don't
 | 
				
			||||||
  // bother with this check
 | 
					  // bother with this check
 | 
				
			||||||
  if(GetParam() > 0)
 | 
					  if (GET_PARAM(1) > 0)
 | 
				
			||||||
    EXPECT_EQ(2u, kf_pts_list_.size()) << " Not the right number of keyframes ";
 | 
					    EXPECT_EQ(2u, kf_pts_list_.size()) << " Not the right number of keyframes ";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Verify that keyframes match the file keyframes in the file.
 | 
					  // Verify that keyframes match the file keyframes in the file.
 | 
				
			||||||
@@ -141,5 +145,5 @@ TEST_P(KeyframeTest, TestAutoKeyframe) {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTANTIATE_TEST_CASE_P(AllModes, KeyframeTest, ALL_TEST_MODES);
 | 
					VP8_INSTANTIATE_TEST_CASE(KeyframeTest, ALL_TEST_MODES);
 | 
				
			||||||
}  // namespace
 | 
					}  // namespace
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,9 +9,11 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#include <climits>
 | 
					#include <climits>
 | 
				
			||||||
#include <vector>
 | 
					#include <vector>
 | 
				
			||||||
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/encode_test_driver.h"
 | 
					#include "test/encode_test_driver.h"
 | 
				
			||||||
#include "test/video_source.h"
 | 
					#include "test/video_source.h"
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "test/util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -49,8 +51,10 @@ class ResizingVideoSource : public ::libvpx_test::DummyVideoSource {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ResizeTest : public ::libvpx_test::EncoderTest,
 | 
					class ResizeTest : public ::libvpx_test::EncoderTest,
 | 
				
			||||||
  public ::testing::TestWithParam<enum libvpx_test::TestMode> {
 | 
					  public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
 | 
					  ResizeTest() : EncoderTest(GET_PARAM(0)) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  struct FrameInfo {
 | 
					  struct FrameInfo {
 | 
				
			||||||
    FrameInfo(vpx_codec_pts_t _pts, unsigned int _w, unsigned int _h)
 | 
					    FrameInfo(vpx_codec_pts_t _pts, unsigned int _w, unsigned int _h)
 | 
				
			||||||
        : pts(_pts), w(_w), h(_h) {}
 | 
					        : pts(_pts), w(_w), h(_h) {}
 | 
				
			||||||
@@ -62,7 +66,7 @@ class ResizeTest : public ::libvpx_test::EncoderTest,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  virtual void SetUp() {
 | 
					  virtual void SetUp() {
 | 
				
			||||||
    InitializeConfig();
 | 
					    InitializeConfig();
 | 
				
			||||||
    SetMode(GetParam());
 | 
					    SetMode(GET_PARAM(1));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual bool Continue() const {
 | 
					  virtual bool Continue() const {
 | 
				
			||||||
@@ -100,5 +104,5 @@ TEST_P(ResizeTest, TestExternalResizeWorks) {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTANTIATE_TEST_CASE_P(OnePass, ResizeTest, ONE_PASS_TEST_MODES);
 | 
					VP8_INSTANTIATE_TEST_CASE(ResizeTest, ONE_PASS_TEST_MODES);
 | 
				
			||||||
}  // namespace
 | 
					}  // namespace
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								test/test.mk
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								test/test.mk
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
				
			|||||||
LIBVPX_TEST_SRCS-yes += register_state_check.h
 | 
					LIBVPX_TEST_SRCS-yes += register_state_check.h
 | 
				
			||||||
LIBVPX_TEST_SRCS-yes += test.mk
 | 
					LIBVPX_TEST_SRCS-yes += test.mk
 | 
				
			||||||
LIBVPX_TEST_SRCS-yes += acm_random.h
 | 
					LIBVPX_TEST_SRCS-yes += acm_random.h
 | 
				
			||||||
 | 
					LIBVPX_TEST_SRCS-yes += codec_factory.h
 | 
				
			||||||
LIBVPX_TEST_SRCS-yes += test_libvpx.cc
 | 
					LIBVPX_TEST_SRCS-yes += test_libvpx.cc
 | 
				
			||||||
LIBVPX_TEST_SRCS-yes += util.h
 | 
					LIBVPX_TEST_SRCS-yes += util.h
 | 
				
			||||||
LIBVPX_TEST_SRCS-yes += video_source.h
 | 
					LIBVPX_TEST_SRCS-yes += video_source.h
 | 
				
			||||||
@@ -15,17 +15,17 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += altref_test.cc
 | 
				
			|||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += config_test.cc
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += config_test.cc
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += cq_test.cc
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += cq_test.cc
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += datarate_test.cc
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += datarate_test.cc
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += encode_test_driver.cc
 | 
					LIBVPX_TEST_SRCS-yes                   += encode_test_driver.cc
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += encode_test_driver.h
 | 
					LIBVPX_TEST_SRCS-yes                   += encode_test_driver.h
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += error_resilience_test.cc
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += error_resilience_test.cc
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += i420_video_source.h
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS)    += i420_video_source.h
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += keyframe_test.cc
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += keyframe_test.cc
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += resize_test.cc
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += resize_test.cc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += ../md5_utils.h ../md5_utils.c
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)    += ../md5_utils.h ../md5_utils.c
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += decode_test_driver.cc
 | 
					LIBVPX_TEST_SRCS-yes                   += decode_test_driver.cc
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += decode_test_driver.h
 | 
					LIBVPX_TEST_SRCS-yes                   += decode_test_driver.h
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += ivf_video_source.h
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)    += ivf_video_source.h
 | 
				
			||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += test_vector_test.cc
 | 
					LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += test_vector_test.cc
 | 
				
			||||||
##
 | 
					##
 | 
				
			||||||
## WHITE BOX TESTS
 | 
					## WHITE BOX TESTS
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,8 +12,10 @@
 | 
				
			|||||||
#include <cstdlib>
 | 
					#include <cstdlib>
 | 
				
			||||||
#include <string>
 | 
					#include <string>
 | 
				
			||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
					#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
				
			||||||
 | 
					#include "test/codec_factory.h"
 | 
				
			||||||
#include "test/decode_test_driver.h"
 | 
					#include "test/decode_test_driver.h"
 | 
				
			||||||
#include "test/ivf_video_source.h"
 | 
					#include "test/ivf_video_source.h"
 | 
				
			||||||
 | 
					#include "test/util.h"
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
#include "./md5_utils.h"
 | 
					#include "./md5_utils.h"
 | 
				
			||||||
#include "vpx_mem/vpx_mem.h"
 | 
					#include "vpx_mem/vpx_mem.h"
 | 
				
			||||||
@@ -59,10 +61,10 @@ const char *kTestVectors[] = {
 | 
				
			|||||||
  "vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf"
 | 
					  "vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf"
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TestVectorTest : public libvpx_test::DecoderTest,
 | 
					class TestVectorTest : public ::libvpx_test::DecoderTest,
 | 
				
			||||||
    public ::testing::TestWithParam<const char*> {
 | 
					    public ::libvpx_test::CodecTestWithParam<const char*> {
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  TestVectorTest() : md5_file_(NULL) {}
 | 
					  TestVectorTest() : DecoderTest(GET_PARAM(0)), md5_file_(NULL) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual ~TestVectorTest() {
 | 
					  virtual ~TestVectorTest() {
 | 
				
			||||||
    if (md5_file_)
 | 
					    if (md5_file_)
 | 
				
			||||||
@@ -124,7 +126,7 @@ class TestVectorTest : public libvpx_test::DecoderTest,
 | 
				
			|||||||
// checksums match the correct md5 data, then the test is passed. Otherwise,
 | 
					// checksums match the correct md5 data, then the test is passed. Otherwise,
 | 
				
			||||||
// the test failed.
 | 
					// the test failed.
 | 
				
			||||||
TEST_P(TestVectorTest, MD5Match) {
 | 
					TEST_P(TestVectorTest, MD5Match) {
 | 
				
			||||||
  const std::string filename = GetParam();
 | 
					  const std::string filename = GET_PARAM(1);
 | 
				
			||||||
  // Open compressed video file.
 | 
					  // Open compressed video file.
 | 
				
			||||||
  libvpx_test::IVFVideoSource video(filename);
 | 
					  libvpx_test::IVFVideoSource video(filename);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -138,7 +140,7 @@ TEST_P(TestVectorTest, MD5Match) {
 | 
				
			|||||||
  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
					  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTANTIATE_TEST_CASE_P(TestVectorSequence, TestVectorTest,
 | 
					VP8_INSTANTIATE_TEST_CASE(TestVectorTest,
 | 
				
			||||||
                          ::testing::ValuesIn(kTestVectors));
 | 
					                          ::testing::ValuesIn(kTestVectors));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}  // namespace
 | 
					}  // namespace
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user