Commit 41be09af authored by Jingning Han's avatar Jingning Han

Turn on codec behavior unit tests for vp10

This commit adds codec behavior unit tests for vp10.

Change-Id: Ieb49cb66f0b29679ff2a3e2c0804d1ebbf48f986
parent 71412d82
......@@ -80,4 +80,7 @@ TEST_P(BordersTest, TestLowBitrate) {
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
::libvpx_test::kTwoPassGood));
VP10_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
::libvpx_test::kTwoPassGood));
} // namespace
......@@ -140,4 +140,9 @@ VP9_INSTANTIATE_TEST_CASE(
::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
......@@ -42,6 +42,15 @@ void Encoder::InitEncoder(VideoSource *video) {
log2_tile_columns);
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
......
......@@ -583,4 +583,5 @@ VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
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
......@@ -94,4 +94,7 @@ TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
::libvpx_test::kTwoPassGood));
VP10_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
::libvpx_test::kTwoPassGood));
} // namespace
......@@ -104,4 +104,5 @@ TEST_P(TileIndependenceTest, MD5Match) {
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
} // namespace
......@@ -229,4 +229,10 @@ VP9_INSTANTIATE_TEST_CASE(
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors));
VP10_INSTANTIATE_TEST_CASE(
ArfFreqTest,
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors));
} // namespace
......@@ -86,17 +86,17 @@ int is_extension_y4m(const char *filename) {
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 @@ class Vp9EncoderParmsGetToDecoder
// 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 @@ TEST_P(Vp9EncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
}
VP9_INSTANTIATE_TEST_CASE(
Vp9EncoderParmsGetToDecoder,
VpxEncoderParmsGetToDecoder,
::testing::ValuesIn(kVP9EncodeParameterSet),
::testing::ValuesIn(kVP9EncodePerfTestVectors));
VP10_INSTANTIATE_TEST_CASE(
VpxEncoderParmsGetToDecoder,
::testing::ValuesIn(kVP9EncodeParameterSet),
::testing::ValuesIn(kVP9EncodePerfTestVectors));
} // namespace
......@@ -187,4 +187,9 @@ VP9_INSTANTIATE_TEST_CASE(
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kCpuUsedVectors));
VP10_INSTANTIATE_TEST_CASE(
EndToEndTestLarge,
::testing::ValuesIn(kEncodingModeVectors),
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kCpuUsedVectors));
} // namespace
......@@ -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 @@ class VP9EncoderThreadTest
md5_.clear();
}
virtual ~VP9EncoderThreadTest() {
virtual ~VPxEncoderThreadTest() {
delete decoder_;
}
......@@ -105,7 +105,7 @@ class VP9EncoderThreadTest
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 @@ TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
}
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
......@@ -127,4 +127,8 @@ VP9_INSTANTIATE_TEST_CASE(LosslessTest,
::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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment