#ifndef VPX_TEST_CODEC_FACTORY_H_
#define VPX_TEST_CODEC_FACTORY_H_
#include <tuple>
#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 {
const int kCodecFactoryParam = …;
class CodecFactory { … };
template <class T1>
class CodecTestWithParam
: public ::testing::TestWithParam<
std::tuple<const libvpx_test::CodecFactory *, T1> > { … };
template <class T1, class T2>
class CodecTestWith2Params
: public ::testing::TestWithParam<
std::tuple<const libvpx_test::CodecFactory *, T1, T2> > { … };
template <class T1, class T2, class T3>
class CodecTestWith3Params
: public ::testing::TestWithParam<
std::tuple<const libvpx_test::CodecFactory *, T1, T2, T3> > { … };
template <class T1, class T2, class T3, class T4>
class CodecTestWith4Params
: public ::testing::TestWithParam<
std::tuple<const libvpx_test::CodecFactory *, T1, T2, T3, T4> > { … };
#if CONFIG_VP8
class VP8Decoder : public Decoder { … };
class VP8Encoder : public Encoder { … };
class VP8CodecFactory : public CodecFactory { … };
const libvpx_test::VP8CodecFactory kVP8;
#define VP8_INSTANTIATE_TEST_SUITE(test, ...) …
#else
#define VP8_INSTANTIATE_TEST_SUITE …
#endif
#if CONFIG_VP9
class VP9Decoder : public Decoder { … };
class VP9Encoder : public Encoder { … };
class VP9CodecFactory : public CodecFactory { … };
const libvpx_test::VP9CodecFactory kVP9;
#define VP9_INSTANTIATE_TEST_SUITE(test, ...) …
#else
#define VP9_INSTANTIATE_TEST_SUITE …
#endif
}
#endif