Commit 3d0135f1 authored by Jim Bankoski's avatar Jim Bankoski Committed by James Bankoski

EndToEndTest : split into tests that runs per commit and nightly.

Change-Id: I00af23ce8c62123a634aa34c46475edc0f4d428e
parent 57ec566c
......@@ -85,17 +85,17 @@ int is_extension_y4m(const char *filename) {
return !strcmp(dot, ".y4m");
}
class EndToEndTestLarge
class EndToEndTest
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWith3Params<libaom_test::TestMode,
TestVideoParam, int> {
protected:
EndToEndTestLarge()
EndToEndTest()
: EncoderTest(GET_PARAM(0)), test_video_param_(GET_PARAM(2)),
cpu_used_(GET_PARAM(3)), psnr_(0.0), nframes_(0),
encoding_mode_(GET_PARAM(1)) {}
virtual ~EndToEndTestLarge() {}
virtual ~EndToEndTest() {}
virtual void SetUp() {
InitializeConfig();
......@@ -162,6 +162,8 @@ class EndToEndTestLarge
libaom_test::TestMode encoding_mode_;
};
class EndToEndTestLarge : public EndToEndTest {};
TEST_P(EndToEndTestLarge, EndtoEndPSNRTest) {
cfg_.rc_target_bitrate = kBitrate;
cfg_.g_error_resilient = 0;
......@@ -187,8 +189,38 @@ TEST_P(EndToEndTestLarge, EndtoEndPSNRTest) {
EXPECT_GT(psnr, GetPsnrThreshold());
}
TEST_P(EndToEndTest, EndtoEndPSNRTest) {
cfg_.rc_target_bitrate = kBitrate;
cfg_.g_error_resilient = 0;
cfg_.g_profile = test_video_param_.profile;
cfg_.g_input_bit_depth = test_video_param_.input_bit_depth;
cfg_.g_bit_depth = test_video_param_.bit_depth;
init_flags_ = AOM_CODEC_USE_PSNR;
if (cfg_.g_bit_depth > 8) init_flags_ |= AOM_CODEC_USE_HIGHBITDEPTH;
testing::internal::scoped_ptr<libaom_test::VideoSource> video;
if (is_extension_y4m(test_video_param_.filename)) {
video.reset(new libaom_test::Y4mVideoSource(test_video_param_.filename, 0,
kFrames));
} else {
video.reset(new libaom_test::YUVVideoSource(
test_video_param_.filename, test_video_param_.fmt, kWidth, kHeight,
kFramerate, 1, 0, kFrames));
}
ASSERT_TRUE(video.get() != NULL);
ASSERT_NO_FATAL_FAILURE(RunLoop(video.get()));
const double psnr = GetAveragePsnr();
EXPECT_GT(psnr, GetPsnrThreshold());
}
AV1_INSTANTIATE_TEST_CASE(EndToEndTestLarge,
::testing::ValuesIn(kEncodingModeVectors),
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kCpuUsedVectors));
AV1_INSTANTIATE_TEST_CASE(EndToEndTest,
::testing::Values(kEncodingModeVectors[0]),
::testing::Values(kTestVectors[2]), // 444
::testing::Values(kCpuUsedVectors[2]));
} // 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