Chromium Code Reviews| Index: webrtc/video/video_quality_test.cc |
| diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc |
| index 23487f49e8deb8e4affce33e7c353396785414ef..345aef6c70f60400d010a08753162238fdd2b6ef 100644 |
| --- a/webrtc/video/video_quality_test.cc |
| +++ b/webrtc/video/video_quality_test.cc |
| @@ -33,6 +33,7 @@ |
| #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" |
| #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" |
| #include "webrtc/system_wrappers/include/cpu_info.h" |
| +#include "webrtc/system_wrappers/include/field_trial.h" |
| #include "webrtc/test/gtest.h" |
| #include "webrtc/test/layer_filtering_transport.h" |
| #include "webrtc/test/run_loop.h" |
| @@ -52,6 +53,7 @@ constexpr size_t kMaxComparisons = 10; |
| constexpr char kSyncGroup[] = "av_sync"; |
| constexpr int kOpusMinBitrateBps = 6000; |
| constexpr int kOpusBitrateFbBps = 32000; |
| +constexpr int kFramesSentInQuickTest = 1; |
| struct VoiceEngineState { |
| VoiceEngineState() |
| @@ -683,9 +685,12 @@ class VideoAnalyzer : public PacketReceiver, |
| test_label_.c_str(), dropped_frames_before_first_encode_); |
| printf("RESULT dropped_frames_before_rendering: %s = %d frames\n", |
| test_label_.c_str(), dropped_frames_before_rendering_); |
| - |
| - EXPECT_GT(psnr_.Mean(), avg_psnr_threshold_); |
| - EXPECT_GT(ssim_.Mean(), avg_ssim_threshold_); |
| + // Disable quality check for quick test, as quality checks may fail |
| + // because too few samples were collected. |
| + if (field_trial::FindFullName("WebRTC-quick") != "Enabled") { |
|
sprang_webrtc
2017/02/14 13:36:12
Can we make the name a bit more descriptive?
Somet
ilnik
2017/02/14 13:49:49
Acknowledged.
|
| + EXPECT_GT(psnr_.Mean(), avg_psnr_threshold_); |
| + EXPECT_GT(ssim_.Mean(), avg_ssim_threshold_); |
| + } |
| } |
| void PerformFrameComparison(const FrameComparison& comparison) { |
| @@ -1339,17 +1344,18 @@ void VideoQualityTest::RunWithAnalyzer(const Params& params) { |
| "not implemented yet! Skipping PSNR and SSIM calculations!\n"); |
| } |
| + bool quick_tests = field_trial::FindFullName("WebRTC-quick") == "Enabled"; |
|
sprang_webrtc
2017/02/14 13:36:12
Maybe move this to the constants at the top, in th
ilnik
2017/02/14 13:49:49
Acknowledged.
|
| VideoAnalyzer analyzer( |
| &send_transport, params_.analyzer.test_label, |
| disable_quality_check ? -1.1 : params_.analyzer.avg_psnr_threshold, |
| disable_quality_check ? -1.1 : params_.analyzer.avg_ssim_threshold, |
| - params_.analyzer.test_durations_secs * params_.video.fps, |
| + quick_tests ? kFramesSentInQuickTest |
| + : params_.analyzer.test_durations_secs * params_.video.fps, |
| graph_data_output_file, graph_title, |
| kVideoSendSsrcs[params_.ss.selected_stream], |
| kSendRtxSsrcs[params_.ss.selected_stream], |
| static_cast<uint32_t>(selected_stream.width), |
| static_cast<uint32_t>(selected_stream.height)); |
| - |
| analyzer.SetReceiver(receiver_call_->Receiver()); |
| send_transport.SetReceiver(&analyzer); |
| recv_transport.SetReceiver(sender_call_->Receiver()); |