 Chromium Code Reviews
 Chromium Code Reviews Issue 2312613003:
  Separating video settings in VideoQualityTest.  (Closed)
    
  
    Issue 2312613003:
  Separating video settings in VideoQualityTest.  (Closed) 
  | Index: webrtc/video/full_stack.cc | 
| diff --git a/webrtc/video/full_stack.cc b/webrtc/video/full_stack.cc | 
| index 26aae3c1ff0d86a188f7f3503addca974dd4a871..8fe8943bdf8023e055fc570a3aebd9dd295f6b81 100644 | 
| --- a/webrtc/video/full_stack.cc | 
| +++ b/webrtc/video/full_stack.cc | 
| @@ -24,22 +24,22 @@ class FullStackTest : public VideoQualityTest { | 
| void ForemanCifWithoutPacketLoss(const std::string& video_codec) { | 
| // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 700000, 700000, 700000, false, video_codec, 1}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_net_delay_0_0_plr_0_" + video_codec, 0.0, 0.0, | 
| - kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 700000, | 
| 
stefan-webrtc
2016/09/07 13:33:32
Is this the formatting you get from git cl format?
 
minyue-webrtc
2016/09/08 09:38:40
Right, git cl format did it. I'd manually reformat
 | 
| + 700000, 700000, false, video_codec, 1, | 
| + 0, 0, false, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_" + video_codec, | 
| + 0.0, 0.0, kFullStackTestDurationSecs}; | 
| RunTest(foreman_cif); | 
| } | 
| void ForemanCifPlr5(const std::string& video_codec) { | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 30000, 500000, 2000000, false, video_codec, 1}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_delay_50_0_plr_5_" + video_codec, 0.0, 0.0, | 
| - kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 30000, | 
| + 500000, 2000000, false, video_codec, 1, | 
| + 0, 0, false, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_" + video_codec, 0.0, | 
| + 0.0, kFullStackTestDurationSecs}; | 
| foreman_cif.pipe.loss_percent = 5; | 
| foreman_cif.pipe.queue_delay_ms = 50; | 
| RunTest(foreman_cif); | 
| @@ -67,42 +67,41 @@ TEST_F(FullStackTest, ForemanCifPlr5Vp9) { | 
| #endif // !defined(RTC_DISABLE_VP9) | 
| TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) { | 
| - VideoQualityTest::Params paris_qcif = { | 
| - {176, 144, 30, 300000, 300000, 300000, false, "VP8", 1, 0, 0, true}, | 
| - {"paris_qcif"}, | 
| - {}, | 
| - {"net_delay_0_0_plr_0", 36.0, 0.96, kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params paris_qcif; | 
| + paris_qcif.video = {true, 176, 144, 30, 300000, 300000, 300000, | 
| + false, "VP8", 1, 0, 0, true, "paris_qcif"}; | 
| + paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96, | 
| + kFullStackTestDurationSecs}; | 
| RunTest(paris_qcif); | 
| } | 
| TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) { | 
| // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 700000, 700000, 700000, false, "VP8", 1, 0, 0, true}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0, | 
| - kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 700000, 700000, 700000, | 
| + false, "VP8", 1, 0, 0, true, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| RunTest(foreman_cif); | 
| } | 
| TEST_F(FullStackTest, ForemanCifPlr5) { | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1, 0, 0, true}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0, kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, | 
| + false, "VP8", 1, 0, 0, true, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| foreman_cif.pipe.loss_percent = 5; | 
| foreman_cif.pipe.queue_delay_ms = 50; | 
| RunTest(foreman_cif); | 
| } | 
| TEST_F(FullStackTest, ForemanCif500kbps) { | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1, 0, 0, true}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_500kbps", 0.0, 0.0, kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, | 
| + false, "VP8", 1, 0, 0, true, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| foreman_cif.pipe.queue_length_packets = 0; | 
| foreman_cif.pipe.queue_delay_ms = 0; | 
| foreman_cif.pipe.link_capacity_kbps = 500; | 
| @@ -110,12 +109,11 @@ TEST_F(FullStackTest, ForemanCif500kbps) { | 
| } | 
| TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) { | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1, 0, 0, true}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0, | 
| - kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, | 
| + false, "VP8", 1, 0, 0, true, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| foreman_cif.pipe.queue_length_packets = 32; | 
| foreman_cif.pipe.queue_delay_ms = 0; | 
| foreman_cif.pipe.link_capacity_kbps = 500; | 
| @@ -123,11 +121,11 @@ TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) { | 
| } | 
| TEST_F(FullStackTest, ForemanCif500kbps100ms) { | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1, 0, 0, true}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_500kbps_100ms", 0.0, 0.0, kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, | 
| + false, "VP8", 1, 0, 0, true, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| foreman_cif.pipe.queue_length_packets = 0; | 
| foreman_cif.pipe.queue_delay_ms = 100; | 
| foreman_cif.pipe.link_capacity_kbps = 500; | 
| @@ -135,12 +133,11 @@ TEST_F(FullStackTest, ForemanCif500kbps100ms) { | 
| } | 
| TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) { | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1, 0, 0, true}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0, | 
| - kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, | 
| + false, "VP8", 1, 0, 0, true, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| foreman_cif.pipe.queue_length_packets = 32; | 
| foreman_cif.pipe.queue_delay_ms = 100; | 
| foreman_cif.pipe.link_capacity_kbps = 500; | 
| @@ -148,12 +145,11 @@ TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) { | 
| } | 
| TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) { | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1, 0, 0, false}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0, | 
| - kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, | 
| + false, "VP8", 1, 0, 0, false, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| foreman_cif.pipe.queue_length_packets = 32; | 
| foreman_cif.pipe.queue_delay_ms = 100; | 
| foreman_cif.pipe.link_capacity_kbps = 500; | 
| @@ -161,12 +157,11 @@ TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) { | 
| } | 
| TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) { | 
| - VideoQualityTest::Params foreman_cif = { | 
| - {352, 288, 30, 30000, 2000000, 2000000, false, "VP8", 1, 0, 0, true}, | 
| - {"foreman_cif"}, | 
| - {}, | 
| - {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0, | 
| - kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params foreman_cif; | 
| + foreman_cif.video = {true, 352, 288, 30, 30000, 2000000, 2000000, | 
| + false, "VP8", 1, 0, 0, true, "foreman_cif"}; | 
| + foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| foreman_cif.pipe.queue_length_packets = 32; | 
| foreman_cif.pipe.queue_delay_ms = 100; | 
| foreman_cif.pipe.link_capacity_kbps = 1000; | 
| @@ -174,12 +169,12 @@ TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) { | 
| } | 
| TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) { | 
| - VideoQualityTest::Params conf_motion_hd = { | 
| - {1280, 720, 50, 30000, 3000000, 3000000, false, "VP8", 1, 0, 0, true}, | 
| - {"ConferenceMotion_1280_720_50"}, | 
| - {}, | 
| - {"conference_motion_hd_2000kbps_100ms_32pkts_queue", 0.0, 0.0, | 
| - kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params conf_motion_hd; | 
| + conf_motion_hd.video = { | 
| + true, 1280, 720, 50, 30000, 3000000, 3000000, | 
| + false, "VP8", 1, 0, 0, true, "ConferenceMotion_1280_720_50"}; | 
| + conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue", | 
| + 0.0, 0.0, kFullStackTestDurationSecs}; | 
| conf_motion_hd.pipe.queue_length_packets = 32; | 
| conf_motion_hd.pipe.queue_delay_ms = 100; | 
| conf_motion_hd.pipe.link_capacity_kbps = 2000; | 
| @@ -187,30 +182,32 @@ TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) { | 
| } | 
| TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL) { | 
| - VideoQualityTest::Params screenshare = { | 
| - {1850, 1110, 5, 50000, 200000, 2000000, false, "VP8", 2, 1, 400000, true}, | 
| - {}, | 
| - {true, 10}, | 
| - {"screenshare_slides", 0.0, 0.0, kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params screenshare; | 
| + screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, | 
| + false, "VP8", 2, 1, 400000, true, ""}; | 
| + screenshare.screenshare = {true, 10}; | 
| + screenshare.analyzer = {"screenshare_slides", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| RunTest(screenshare); | 
| } | 
| TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) { | 
| - VideoQualityTest::Params config = { | 
| - {1850, 1110 / 2, 5, 50000, 200000, 2000000, false, "VP8", 2, 1, 400000, | 
| - true}, | 
| - {}, | 
| - {true, 10, 2}, | 
| - {"screenshare_slides_scrolling", 0.0, 0.0, kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params config; | 
| + config.video = {true, 1850, 1110 / 2, 5, 50000, 200000, 2000000, | 
| + false, "VP8", 2, 1, 400000, true, ""}; | 
| + config.screenshare = {true, 10, 2}; | 
| + config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| RunTest(config); | 
| } | 
| TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) { | 
| - VideoQualityTest::Params screenshare = { | 
| - {1850, 1110, 5, 50000, 200000, 2000000, false, "VP8", 2, 1, 400000, true}, | 
| - {}, // Video-specific. | 
| - {true, 10}, // Screenshare-specific. | 
| - {"screenshare_slides_lossy_net", 0.0, 0.0, kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params screenshare; | 
| + screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, | 
| + false, "VP8", 2, 1, 400000, true, ""}; | 
| + screenshare.screenshare = {true, 10}; | 
| + screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| screenshare.pipe.loss_percent = 5; | 
| screenshare.pipe.queue_delay_ms = 200; | 
| screenshare.pipe.link_capacity_kbps = 500; | 
| @@ -218,11 +215,12 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) { | 
| } | 
| TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) { | 
| - VideoQualityTest::Params screenshare = { | 
| - {1850, 1110, 5, 50000, 200000, 2000000, false, "VP8", 2, 1, 400000, true}, | 
| - {}, // Video-specific. | 
| - {true, 10}, // Screenshare-specific. | 
| - {"screenshare_slides_very_lossy", 0.0, 0.0, kFullStackTestDurationSecs}}; | 
| + VideoQualityTest::Params screenshare; | 
| + screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, | 
| + false, "VP8", 2, 1, 400000, true, ""}; | 
| + screenshare.screenshare = {true, 10}; | 
| + screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| screenshare.pipe.loss_percent = 10; | 
| screenshare.pipe.queue_delay_ms = 200; | 
| screenshare.pipe.link_capacity_kbps = 500; | 
| @@ -231,14 +229,14 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) { | 
| #if !defined(RTC_DISABLE_VP9) | 
| TEST_F(FullStackTest, ScreenshareSlidesVP9_2SL) { | 
| - VideoQualityTest::Params screenshare = { | 
| - {1850, 1110, 5, 50000, 200000, 2000000, false, "VP9", 1, 0, 400000, true}, | 
| - {}, | 
| - {true, 10}, | 
| - {"screenshare_slides_vp9_2sl", 0.0, 0.0, kFullStackTestDurationSecs}, | 
| - {}, | 
| - false, | 
| - {std::vector<VideoStream>(), 0, 2, 1}}; | 
| + VideoQualityTest::Params screenshare; | 
| + screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, | 
| + false, "VP9", 1, 0, 400000, true, ""}; | 
| + screenshare.screenshare = {true, 10}; | 
| + screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0, | 
| + kFullStackTestDurationSecs}; | 
| + screenshare.logs = false; | 
| + screenshare.ss = {std::vector<VideoStream>(), 0, 2, 1}; | 
| RunTest(screenshare); | 
| } | 
| #endif // !defined(RTC_DISABLE_VP9) |