ref: 41be09afee1cf24494776f9bc44ae71aeb8707e9
parent: 71412d82a377ca023a8c0ab77419e11342dc9c8a
author: Jingning Han <[email protected]>
date: Wed Aug 19 10:13:18 EDT 2015
Turn on codec behavior unit tests for vp10 This commit adds codec behavior unit tests for vp10. Change-Id: Ieb49cb66f0b29679ff2a3e2c0804d1ebbf48f986
--- a/test/borders_test.cc
+++ b/test/borders_test.cc
@@ -80,4 +80,7 @@
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
::libvpx_test::kTwoPassGood));
+
+VP10_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
+ ::libvpx_test::kTwoPassGood));
} // namespace
--- a/test/cpu_speed_test.cc
+++ b/test/cpu_speed_test.cc
@@ -140,4 +140,9 @@
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
::libvpx_test::kRealTime),
::testing::Range(0, 9));
+
+VP10_INSTANTIATE_TEST_CASE(
+ CpuSpeedTest,
+ ::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
+ ::testing::Range(0, 3));
} // namespace
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -43,6 +43,15 @@
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
} else
#endif
+#if CONFIG_VP10_ENCODER
+ if (CodecInterface() == &vpx_codec_vp10_cx_algo) {
+ // Default to 1 tile column for VP10.
+ const int log2_tile_columns = 0;
+ res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
+ log2_tile_columns);
+ ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ } else
+#endif
{
#if CONFIG_VP8_ENCODER
ASSERT_EQ(&vpx_codec_vp8_cx_algo, CodecInterface())
--- a/test/error_resilience_test.cc
+++ b/test/error_resilience_test.cc
@@ -583,4 +583,5 @@
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLargeCodecControls,
ONE_PASS_TEST_MODES);
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
+VP10_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
} // namespace
--- a/test/superframe_test.cc
+++ b/test/superframe_test.cc
@@ -94,4 +94,7 @@
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
::libvpx_test::kTwoPassGood));
+
+VP10_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
+ ::libvpx_test::kTwoPassGood));
} // namespace
--- a/test/tile_independence_test.cc
+++ b/test/tile_independence_test.cc
@@ -104,4 +104,5 @@
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
+VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
} // namespace
--- a/test/vp9_arf_freq_test.cc
+++ b/test/vp9_arf_freq_test.cc
@@ -229,4 +229,10 @@
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors));
+
+VP10_INSTANTIATE_TEST_CASE(
+ ArfFreqTest,
+ ::testing::ValuesIn(kTestVectors),
+ ::testing::ValuesIn(kEncodeVectors),
+ ::testing::ValuesIn(kMinArfVectors));
} // namespace
--- a/test/vp9_encoder_parms_get_to_decoder.cc
+++ b/test/vp9_encoder_parms_get_to_decoder.cc
@@ -86,17 +86,17 @@
return !strcmp(dot, ".y4m");
}
-class Vp9EncoderParmsGetToDecoder
+class VpxEncoderParmsGetToDecoder
: public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWith2Params<EncodeParameters, \
EncodePerfTestVideo> {
protected:
- Vp9EncoderParmsGetToDecoder()
+ VpxEncoderParmsGetToDecoder()
: EncoderTest(GET_PARAM(0)),
encode_parms(GET_PARAM(1)) {
}
- virtual ~Vp9EncoderParmsGetToDecoder() {}
+ virtual ~VpxEncoderParmsGetToDecoder() {}
virtual void SetUp() {
InitializeConfig();
@@ -166,7 +166,7 @@
// TODO(hkuang): This test conflicts with frame parallel decode. So disable it
// for now until fix.
-TEST_P(Vp9EncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
+TEST_P(VpxEncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
init_flags_ = VPX_CODEC_USE_PSNR;
libvpx_test::VideoSource *video;
@@ -187,8 +187,12 @@
}
VP9_INSTANTIATE_TEST_CASE(
- Vp9EncoderParmsGetToDecoder,
+ VpxEncoderParmsGetToDecoder,
::testing::ValuesIn(kVP9EncodeParameterSet),
::testing::ValuesIn(kVP9EncodePerfTestVectors));
+VP10_INSTANTIATE_TEST_CASE(
+ VpxEncoderParmsGetToDecoder,
+ ::testing::ValuesIn(kVP9EncodeParameterSet),
+ ::testing::ValuesIn(kVP9EncodePerfTestVectors));
} // namespace
--- a/test/vp9_end_to_end_test.cc
+++ b/test/vp9_end_to_end_test.cc
@@ -187,4 +187,9 @@
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kCpuUsedVectors));
+VP10_INSTANTIATE_TEST_CASE(
+ EndToEndTestLarge,
+ ::testing::ValuesIn(kEncodingModeVectors),
+ ::testing::ValuesIn(kTestVectors),
+ ::testing::ValuesIn(kCpuUsedVectors));
} // namespace
--- a/test/vp9_ethread_test.cc
+++ b/test/vp9_ethread_test.cc
@@ -18,11 +18,11 @@
#include "test/y4m_video_source.h"
namespace {
-class VP9EncoderThreadTest
+class VPxEncoderThreadTest
: public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
protected:
- VP9EncoderThreadTest()
+ VPxEncoderThreadTest()
: EncoderTest(GET_PARAM(0)),
encoder_initialized_(false),
tiles_(2),
@@ -36,7 +36,7 @@
md5_.clear();
}
- virtual ~VP9EncoderThreadTest() {
+ virtual ~VPxEncoderThreadTest() {
delete decoder_;
}
@@ -105,7 +105,7 @@
std::vector<std::string> md5_;
};
-TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
+TEST_P(VPxEncoderThreadTest, EncoderResultTest) {
std::vector<std::string> single_thr_md5, multi_thr_md5;
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 15, 20);
@@ -130,8 +130,13 @@
}
VP9_INSTANTIATE_TEST_CASE(
- VP9EncoderThreadTest,
+ VPxEncoderThreadTest,
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
::libvpx_test::kRealTime),
::testing::Range(1, 9));
+
+VP10_INSTANTIATE_TEST_CASE(
+ VPxEncoderThreadTest,
+ ::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
+ ::testing::Range(1, 3));
} // namespace
--- a/test/vp9_lossless_test.cc
+++ b/test/vp9_lossless_test.cc
@@ -127,4 +127,8 @@
::testing::Values(::libvpx_test::kRealTime,
::libvpx_test::kOnePassGood,
::libvpx_test::kTwoPassGood));
+
+VP10_INSTANTIATE_TEST_CASE(LosslessTest,
+ ::testing::Values(::libvpx_test::kOnePassGood,
+ ::libvpx_test::kTwoPassGood));
} // namespace