OLD | NEW |
---|---|
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 FakeNetworkPipe::Config pipe; | 71 FakeNetworkPipe::Config pipe; |
72 bool logs; | 72 bool logs; |
73 struct { // Spatial scalability. | 73 struct { // Spatial scalability. |
74 std::vector<VideoStream> streams; // If empty, one stream is assumed. | 74 std::vector<VideoStream> streams; // If empty, one stream is assumed. |
75 size_t selected_stream; | 75 size_t selected_stream; |
76 int num_spatial_layers; | 76 int num_spatial_layers; |
77 int selected_sl; | 77 int selected_sl; |
78 // If empty, bitrates are generated in VP9Impl automatically. | 78 // If empty, bitrates are generated in VP9Impl automatically. |
79 std::vector<SpatialLayer> spatial_layers; | 79 std::vector<SpatialLayer> spatial_layers; |
80 } ss; | 80 } ss; |
81 int num_thumbnails; | |
81 }; | 82 }; |
82 // (*) Set to -1.1 if generating graph data for simulcast or SVC and the | |
kjellander_webrtc
2017/03/06 12:02:44
Why remove this? Is it not correct?
ilnik
2017/03/06 12:04:18
Not relevant anymore since now upscaling is implem
| |
83 // selected stream/layer doesn't have the same resolution as the largest | |
84 // stream/layer (to ignore the PSNR and SSIM calculation errors). | |
85 | 83 |
86 VideoQualityTest(); | 84 VideoQualityTest(); |
87 void RunWithAnalyzer(const Params& params); | 85 void RunWithAnalyzer(const Params& params); |
88 void RunWithRenderers(const Params& params); | 86 void RunWithRenderers(const Params& params); |
89 | 87 |
90 static void FillScalabilitySettings( | 88 static void FillScalabilitySettings( |
91 Params* params, | 89 Params* params, |
92 const std::vector<std::string>& stream_descriptors, | 90 const std::vector<std::string>& stream_descriptors, |
93 size_t selected_stream, | 91 size_t selected_stream, |
94 int num_spatial_layers, | 92 int num_spatial_layers, |
95 int selected_sl, | 93 int selected_sl, |
96 const std::vector<std::string>& sl_descriptors); | 94 const std::vector<std::string>& sl_descriptors); |
97 | 95 |
98 protected: | 96 protected: |
99 // No-op implementation to be able to instantiate this class from non-TEST_F | 97 // No-op implementation to be able to instantiate this class from non-TEST_F |
100 // locations. | 98 // locations. |
101 void TestBody() override; | 99 void TestBody() override; |
102 | 100 |
103 // Helper methods accessing only params_. | 101 // Helper methods accessing only params_. |
104 std::string GenerateGraphTitle() const; | 102 std::string GenerateGraphTitle() const; |
105 void CheckParams(); | 103 void CheckParams(); |
106 | 104 |
107 // Helper static methods. | 105 // Helper static methods. |
108 static VideoStream DefaultVideoStream(const Params& params); | 106 static VideoStream DefaultVideoStream(const Params& params); |
107 static VideoStream DefaultThumbnailStream(); | |
109 static std::vector<int> ParseCSV(const std::string& str); | 108 static std::vector<int> ParseCSV(const std::string& str); |
110 | 109 |
111 // Helper methods for setting up the call. | 110 // Helper methods for setting up the call. |
112 void CreateCapturer(); | 111 void CreateCapturer(); |
112 void SetupThumbnailCapturers(size_t num_thumbnail_streams); | |
113 void SetupVideo(Transport* send_transport, Transport* recv_transport); | 113 void SetupVideo(Transport* send_transport, Transport* recv_transport); |
114 void SetupThumbnails(Transport* send_transport, Transport* recv_transport); | |
114 void SetupScreenshareOrSVC(); | 115 void SetupScreenshareOrSVC(); |
115 void SetupAudio(int send_channel_id, | 116 void SetupAudio(int send_channel_id, |
116 int receive_channel_id, | 117 int receive_channel_id, |
117 Call* call, | 118 Call* call, |
118 Transport* transport, | 119 Transport* transport, |
119 AudioReceiveStream** audio_receive_stream); | 120 AudioReceiveStream** audio_receive_stream); |
120 | 121 |
121 void StartEncodedFrameLogs(VideoSendStream* stream); | 122 void StartEncodedFrameLogs(VideoSendStream* stream); |
122 void StartEncodedFrameLogs(VideoReceiveStream* stream); | 123 void StartEncodedFrameLogs(VideoReceiveStream* stream); |
123 | 124 |
124 // We need a more general capturer than the FrameGeneratorCapturer. | 125 // We need a more general capturer than the FrameGeneratorCapturer. |
125 std::unique_ptr<test::VideoCapturer> video_capturer_; | 126 std::unique_ptr<test::VideoCapturer> video_capturer_; |
127 std::vector<std::unique_ptr<test::VideoCapturer> > thumbnail_capturers_; | |
sprang_webrtc
2017/03/06 12:27:23
nit: Don't actually need the space in >> anymore
ilnik
2017/03/06 12:35:10
Done.
| |
126 std::unique_ptr<test::TraceToStderr> trace_to_stderr_; | 128 std::unique_ptr<test::TraceToStderr> trace_to_stderr_; |
127 std::unique_ptr<test::FrameGenerator> frame_generator_; | 129 std::unique_ptr<test::FrameGenerator> frame_generator_; |
128 std::unique_ptr<VideoEncoder> video_encoder_; | 130 std::unique_ptr<VideoEncoder> video_encoder_; |
131 std::vector<std::unique_ptr<VideoEncoder> > thumbnail_encoders_; | |
132 std::vector<VideoSendStream::Config> thumbnail_send_configs_; | |
133 std::vector<VideoEncoderConfig> thumbnail_encoder_configs_; | |
134 std::vector<VideoSendStream*> thumbnail_send_streams_; | |
sprang_webrtc
2017/03/06 12:27:23
The vectors need to match, right? Can we use a sin
ilnik
2017/03/06 12:35:10
They match by how they are created. I don't think
| |
135 | |
129 Clock* const clock_; | 136 Clock* const clock_; |
130 | 137 |
131 int receive_logs_; | 138 int receive_logs_; |
132 int send_logs_; | 139 int send_logs_; |
133 | 140 |
134 VideoSendStream::DegradationPreference degradation_preference_ = | 141 VideoSendStream::DegradationPreference degradation_preference_ = |
135 VideoSendStream::DegradationPreference::kBalanced; | 142 VideoSendStream::DegradationPreference::kBalanced; |
136 Params params_; | 143 Params params_; |
137 }; | 144 }; |
138 | 145 |
139 } // namespace webrtc | 146 } // namespace webrtc |
140 | 147 |
141 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ | 148 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ |
OLD | NEW |