Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Side by Side Diff: webrtc/video/video_quality_test.h

Issue 1397363002: Revert of Adding support for simulcast and spatial layers into VideoQualityTest (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/video_loopback.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #ifndef WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ 10 #ifndef WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_
(...skipping 15 matching lines...) Expand all
26 // which makes the implementation of VideoQualityTest a bit uglier. 26 // which makes the implementation of VideoQualityTest a bit uglier.
27 struct Params { 27 struct Params {
28 struct { 28 struct {
29 size_t width; 29 size_t width;
30 size_t height; 30 size_t height;
31 int32_t fps; 31 int32_t fps;
32 int min_bitrate_bps; 32 int min_bitrate_bps;
33 int target_bitrate_bps; 33 int target_bitrate_bps;
34 int max_bitrate_bps; 34 int max_bitrate_bps;
35 std::string codec; 35 std::string codec;
36 int num_temporal_layers; 36 size_t num_temporal_layers;
37 int selected_tl;
38 int min_transmit_bps; 37 int min_transmit_bps;
39 38
40 Call::Config::BitrateConfig call_bitrate_config; 39 Call::Config::BitrateConfig call_bitrate_config;
40 size_t tl_discard_threshold;
41 bool send_side_bwe; 41 bool send_side_bwe;
42 } common; 42 } common;
43 struct { // Video-specific settings. 43 struct { // Video-specific settings.
44 std::string clip_name; 44 std::string clip_name;
45 } video; 45 } video;
46 struct { // Screenshare-specific settings. 46 struct { // Screenshare-specific settings.
47 bool enabled; 47 bool enabled;
48 int32_t slide_change_interval; 48 int32_t slide_change_interval;
49 int32_t scroll_duration; 49 int32_t scroll_duration;
50 } screenshare; 50 } screenshare;
51 struct { // Analyzer settings. 51 struct { // Analyzer settings.
52 std::string test_label; 52 std::string test_label;
53 double avg_psnr_threshold; // (*) 53 double avg_psnr_threshold;
54 double avg_ssim_threshold; // (*) 54 double avg_ssim_threshold;
55 int test_durations_secs; 55 int test_durations_secs;
56 std::string graph_data_output_filename; 56 std::string graph_data_output_filename;
57 std::string graph_title;
58 } analyzer; 57 } analyzer;
59 FakeNetworkPipe::Config pipe; 58 FakeNetworkPipe::Config pipe;
60 bool logs; 59 bool logs;
61 struct { // Spatial scalability.
62 std::vector<VideoStream> streams; // If empty, one stream is assumed.
63 size_t selected_stream;
64 int num_spatial_layers;
65 int selected_sl;
66 // If empty, bitrates are generated in VP9Impl automatically.
67 std::vector<SpatialLayer> spatial_layers;
68 } ss;
69 }; 60 };
70 // (*) Set to -1.1 if generating graph data for simulcast or SVC and the
71 // selected stream/layer doesn't have the same resolution as the largest
72 // stream/layer (to ignore the PSNR and SSIM calculation errors).
73 61
74 VideoQualityTest(); 62 VideoQualityTest();
75 void RunWithAnalyzer(const Params& params); 63 void RunWithAnalyzer(const Params& params);
76 void RunWithVideoRenderer(const Params& params); 64 void RunWithVideoRenderer(const Params& params);
77 65
78 static void FillScalabilitySettings(
79 Params* params,
80 const std::vector<std::string>& stream_descriptors,
81 size_t selected_stream,
82 int num_spatial_layers,
83 int selected_sl,
84 const std::vector<std::string>& sl_descriptors);
85 protected: 66 protected:
86 // No-op implementation to be able to instantiate this class from non-TEST_F 67 // No-op implementation to be able to instantiate this class from non-TEST_F
87 // locations. 68 // locations.
88 void TestBody() override; 69 void TestBody() override;
89 70
90 // Helper methods accessing only params_. 71 void CreateCapturer(const Params& params, VideoCaptureInput* input);
91 std::string GenerateGraphTitle() const; 72 void ValidateParams(const Params& params);
92 void CheckParams(); 73 void SetupFullStack(const Params& params,
93 74 Transport* send_transport,
94 // Helper static methods. 75 Transport* recv_transport);
95 static VideoStream DefaultVideoStream(const Params& params); 76 void SetupScreenshare(const Params& params);
96 static std::vector<int> ParseCSV(const std::string& str);
97
98 // Helper methods for setting up the call.
99 void CreateCapturer(VideoCaptureInput* input);
100 void SetupCommon(Transport* send_transport, Transport* recv_transport);
101 void SetupScreenshare();
102 77
103 // We need a more general capturer than the FrameGeneratorCapturer. 78 // We need a more general capturer than the FrameGeneratorCapturer.
104 rtc::scoped_ptr<test::VideoCapturer> capturer_; 79 rtc::scoped_ptr<test::VideoCapturer> capturer_;
105 rtc::scoped_ptr<test::TraceToStderr> trace_to_stderr_; 80 rtc::scoped_ptr<test::TraceToStderr> trace_to_stderr_;
106 rtc::scoped_ptr<test::FrameGenerator> frame_generator_; 81 rtc::scoped_ptr<test::FrameGenerator> frame_generator_;
107 rtc::scoped_ptr<VideoEncoder> encoder_; 82 rtc::scoped_ptr<VideoEncoder> encoder_;
108 VideoCodecUnion codec_settings_; 83 VideoCodecUnion codec_settings_;
109 Clock* const clock_; 84 Clock* const clock_;
110
111 Params params_;
112 }; 85 };
113 86
114 } // namespace webrtc 87 } // namespace webrtc
115 88
116 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ 89 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_loopback.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698