Commit 4cfb8309 authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge changes I619b365d,I579a9328 into nextgenv2

* changes:
  lossless_test: mark tests as Large
  cpu_speed_test: mark speed 0 as Large
parents a017c372 239bb16f
......@@ -65,13 +65,19 @@ class CpuSpeedTest
min_psnr_ = pkt->data.psnr.psnr[0];
}
void TestQ0();
void TestScreencastQ0();
void TestTuneScreen();
void TestEncodeHighBitrate();
void TestLowBitrate();
::libvpx_test::TestMode encoding_mode_;
int set_cpu_used_;
double min_psnr_;
int tune_content_;
};
TEST_P(CpuSpeedTest, TestQ0) {
void CpuSpeedTest::TestQ0() {
// Validate that this non multiple of 64 wide clip encodes and decodes
// without a mismatch when passing in a very low max q. This pushes
// the encoder to producing lots of big partitions which will likely
......@@ -91,7 +97,7 @@ TEST_P(CpuSpeedTest, TestQ0) {
EXPECT_GE(min_psnr_, kMaxPSNR);
}
TEST_P(CpuSpeedTest, TestScreencastQ0) {
void CpuSpeedTest::TestScreencastQ0() {
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 10);
cfg_.g_timebase = video.timebase();
cfg_.rc_2pass_vbr_minsection_pct = 5;
......@@ -106,7 +112,7 @@ TEST_P(CpuSpeedTest, TestScreencastQ0) {
EXPECT_GE(min_psnr_, kMaxPSNR);
}
TEST_P(CpuSpeedTest, TestTuneScreen) {
void CpuSpeedTest::TestTuneScreen() {
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 10);
cfg_.g_timebase = video.timebase();
cfg_.rc_2pass_vbr_minsection_pct = 5;
......@@ -121,7 +127,7 @@ TEST_P(CpuSpeedTest, TestTuneScreen) {
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
TEST_P(CpuSpeedTest, TestEncodeHighBitrate) {
void CpuSpeedTest::TestEncodeHighBitrate() {
// Validate that this non multiple of 64 wide clip encodes and decodes
// without a mismatch when passing in a very low max q. This pushes
// the encoder to producing lots of big partitions which will likely
......@@ -138,7 +144,7 @@ TEST_P(CpuSpeedTest, TestEncodeHighBitrate) {
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
TEST_P(CpuSpeedTest, TestLowBitrate) {
void CpuSpeedTest::TestLowBitrate() {
// Validate that this clip encodes and decodes without a mismatch
// when passing in a very high min q. This pushes the encoder to producing
// lots of small partitions which might will test the other condition.
......@@ -153,8 +159,26 @@ TEST_P(CpuSpeedTest, TestLowBitrate) {
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
TEST_P(CpuSpeedTest, TestQ0) { TestQ0(); }
TEST_P(CpuSpeedTest, TestScreencastQ0) { TestScreencastQ0(); }
TEST_P(CpuSpeedTest, TestTuneScreen) { TestTuneScreen(); }
TEST_P(CpuSpeedTest, TestEncodeHighBitrate) { TestEncodeHighBitrate(); }
TEST_P(CpuSpeedTest, TestLowBitrate) { TestLowBitrate(); }
class CpuSpeedTestLarge : public CpuSpeedTest {};
TEST_P(CpuSpeedTestLarge, TestQ0) { TestQ0(); }
TEST_P(CpuSpeedTestLarge, TestScreencastQ0) { TestScreencastQ0(); }
TEST_P(CpuSpeedTestLarge, TestTuneScreen) { TestTuneScreen(); }
TEST_P(CpuSpeedTestLarge, TestEncodeHighBitrate) { TestEncodeHighBitrate(); }
TEST_P(CpuSpeedTestLarge, TestLowBitrate) { TestLowBitrate(); }
VP10_INSTANTIATE_TEST_CASE(
CpuSpeedTest,
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
::testing::Range(0, 3));
::testing::Range(1, 3));
VP10_INSTANTIATE_TEST_CASE(
CpuSpeedTestLarge,
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
::testing::Range(0, 1));
} // namespace
......@@ -21,17 +21,17 @@ namespace {
const int kMaxPsnr = 100;
class LosslessTest : public ::libvpx_test::EncoderTest,
class LosslessTestLarge : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
protected:
LosslessTest()
LosslessTestLarge()
: EncoderTest(GET_PARAM(0)),
psnr_(kMaxPsnr),
nframes_(0),
encoding_mode_(GET_PARAM(1)) {
}
virtual ~LosslessTest() {}
virtual ~LosslessTestLarge() {}
virtual void SetUp() {
InitializeConfig();
......@@ -69,7 +69,7 @@ class LosslessTest : public ::libvpx_test::EncoderTest,
libvpx_test::TestMode encoding_mode_;
};
TEST_P(LosslessTest, TestLossLessEncoding) {
TEST_P(LosslessTestLarge, TestLossLessEncoding) {
const vpx_rational timebase = { 33333333, 1000000000 };
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = 2000;
......@@ -87,7 +87,7 @@ TEST_P(LosslessTest, TestLossLessEncoding) {
EXPECT_GE(psnr_lossless, kMaxPsnr);
}
TEST_P(LosslessTest, TestLossLessEncoding444) {
TEST_P(LosslessTestLarge, TestLossLessEncoding444) {
libvpx_test::Y4mVideoSource video("rush_hour_444.y4m", 0, 5);
cfg_.g_profile = 1;
......@@ -104,7 +104,7 @@ TEST_P(LosslessTest, TestLossLessEncoding444) {
EXPECT_GE(psnr_lossless, kMaxPsnr);
}
TEST_P(LosslessTest, TestLossLessEncodingCtrl) {
TEST_P(LosslessTestLarge, TestLossLessEncodingCtrl) {
const vpx_rational timebase = { 33333333, 1000000000 };
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = 2000;
......@@ -124,7 +124,7 @@ TEST_P(LosslessTest, TestLossLessEncodingCtrl) {
}
VP10_INSTANTIATE_TEST_CASE(LosslessTest,
VP10_INSTANTIATE_TEST_CASE(LosslessTestLarge,
::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