History

vp9: Add datarate test for denoiser, for high noise case.

Also breakout the denoiser tests, as the denoiser only runs for real-time speed >=5.

Marco committed 9 years ago

Commit 3fcd5951 parent c1f51943 files · +43 −2Browse files

Showing the changes to test (3 of 3 files). Show all

Unified · Split

3 files
  1. test/datarate_test.cc +41 −2
  2. test/test-data.mk +1 −0
  3. test/test-data.sha1 +1 −0
test/datarate_test.cc+41−2
@@ -954,8 +954,13 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayersFrameDropping) { · 953 unmodified lines
954954 }
955955
956956 #if CONFIG_VP9_TEMPORAL_DENOISING
957+class DatarateTestVP9LargeDenoiser : public DatarateTestVP9Large {
958+ public:
959+ virtual ~DatarateTestVP9LargeDenoiser() {}
960+};
961+
957962 // Check basic datarate targeting, for a single bitrate, when denoiser is on.
958−TEST_P(DatarateTestVP9Large, DenoiserLevels) {
963+TEST_P(DatarateTestVP9LargeDenoiser, LowNoise) {
959964 cfg_.rc_buf_initial_sz = 500;
960965 cfg_.rc_buf_optimal_sz = 500;
961966 cfg_.rc_buf_sz = 1000;
@@ -982,9 +987,38 @@ TEST_P(DatarateTestVP9Large, DenoiserLevels) { · 20 unmodified lines
982987 << " The datarate for the file is greater than target by too much!";
983988 }
984989
990+// Check basic datarate targeting, for a single bitrate, when denoiser is on,
991+// for HD clip with high noise level.
992+TEST_P(DatarateTestVP9LargeDenoiser, HighNoise) {
993+ cfg_.rc_buf_initial_sz = 500;
994+ cfg_.rc_buf_optimal_sz = 500;
995+ cfg_.rc_buf_sz = 1000;
996+ cfg_.rc_dropframe_thresh = 1;
997+ cfg_.rc_min_quantizer = 2;
998+ cfg_.rc_max_quantizer = 56;
999+ cfg_.rc_end_usage = VPX_CBR;
1000+ cfg_.g_lag_in_frames = 0;
1001+
1002+ ::libvpx_test::I420VideoSource video("noisy_clip_640_360.y4m", 640, 360, 30,
1003+ 1, 0, 200);
1004+
1005+ // For the temporal denoiser (#if CONFIG_VP9_TEMPORAL_DENOISING),
1006+ // there is only one denoiser mode: denoiserYonly(which is 1),
1007+ // but may add more modes in the future.
1008+ cfg_.rc_target_bitrate = 1000;
1009+ ResetModel();
1010+ // Turn on the denoiser.
1011+ denoiser_on_ = 1;
1012+ ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
1013+ ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.85)
1014+ << " The datarate for the file is lower than target by too much!";
1015+ ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.15)
1016+ << " The datarate for the file is greater than target by too much!";
1017+}
1018+
9851019 // Check basic datarate targeting, for a single bitrate, when denoiser is off
9861020 // and on.
987−TEST_P(DatarateTestVP9Large, DenoiserOffOn) {
1021+TEST_P(DatarateTestVP9LargeDenoiser, DenoiserOffOn) {
9881022 cfg_.rc_buf_initial_sz = 500;
9891023 cfg_.rc_buf_optimal_sz = 500;
9901024 cfg_.rc_buf_sz = 1000;
@@ -1435,6 +1469,11 @@ VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large, · 444 unmodified lines
14351469 ::testing::Values(::libvpx_test::kOnePassGood,
14361470 ::libvpx_test::kRealTime),
14371471 ::testing::Range(2, 9));
1472+#if CONFIG_VP9_TEMPORAL_DENOISING
1473+VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9LargeDenoiser,
1474+ ::testing::Values(::libvpx_test::kRealTime),
1475+ ::testing::Range(5, 9));
1476+#endif
14381477 VP9_INSTANTIATE_TEST_CASE(DatarateOnePassCbrSvc,
14391478 ::testing::Values(::libvpx_test::kRealTime),
14401479 ::testing::Range(5, 9));
test/test-data.mk+1−0
@@ -20,6 +20,7 @@ LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_440.yuv · 19 unmodified lines
2020
2121 LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += desktop_credits.y4m
2222 LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_1280_720_30.y4m
23+LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += noisy_clip_640_360.y4m
2324 LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += rush_hour_444.y4m
2425 LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
2526
test/test-data.sha1+1−0
@@ -14,6 +14,7 @@ df1a1453feb3c00d7d89746c7003b4163523bff3 *invalid-vp90-03-v3.webm · 13 unmodified lines
1414 4935c62becc68c13642a03db1e6d3e2331c1c612 *invalid-vp90-03-v3.webm.res
1515 d637297561dd904eb2c97a9015deeb31c4a1e8d2 *invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm
1616 3a204bdbeaa3c6458b77bcebb8366d107267f55d *invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm.res
17+9aa21d8b2cb9d39abe8a7bb6032dc66955fb4342 *noisy_clip_640_360.y4m
1718 a432f96ff0a787268e2f94a8092ab161a18d1b06 *park_joy_90p_10_420.y4m
1819 0b194cc312c3a2e84d156a221b0a5eb615dfddc5 *park_joy_90p_10_422.y4m
1920 ff0e0a21dc2adc95b8c1b37902713700655ced17 *park_joy_90p_10_444.y4m

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t