Add a CPU speed test with screen content. Encoding screen content exercises various fast skip paths that are missed by natural video content. Change-Id: Ie359884ef9be89cbe5dda6d82f1f79360604a090
diff --git a/test/cpu_speed_test.cc b/test/cpu_speed_test.cc index 5d2bfff..961a0b8 100644 --- a/test/cpu_speed_test.cc +++ b/test/cpu_speed_test.cc
@@ -14,6 +14,7 @@ #include "test/encode_test_driver.h" #include "test/i420_video_source.h" #include "test/util.h" +#include "test/y4m_video_source.h" namespace { @@ -94,6 +95,20 @@ EXPECT_GE(min_psnr_, kMaxPSNR); } +TEST_P(CpuSpeedTest, TestScreencastQ0) { + ::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 25); + cfg_.g_timebase = video.timebase(); + cfg_.rc_2pass_vbr_minsection_pct = 5; + cfg_.rc_2pass_vbr_minsection_pct = 2000; + cfg_.rc_target_bitrate = 400; + cfg_.rc_max_quantizer = 0; + cfg_.rc_min_quantizer = 0; + + init_flags_ = VPX_CODEC_USE_PSNR; + + ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); + EXPECT_GE(min_psnr_, kMaxPSNR); +} TEST_P(CpuSpeedTest, TestEncodeHighBitrate) { // Validate that this non multiple of 64 wide clip encodes and decodes