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

Side by Side Diff: webrtc/video/full_stack.cc

Issue 2529293006: Rename full_stack.cc to full_stack_tests.cc. (Closed)
Patch Set: Created 4 years 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/BUILD.gn ('k') | webrtc/video/full_stack_plot.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10 #include <stdio.h>
11
12 #include "webrtc/test/gtest.h"
13 #include "webrtc/video/video_quality_test.h"
14
15 namespace webrtc {
16
17 static const int kFullStackTestDurationSecs = 45;
18
19 class FullStackTest : public VideoQualityTest {
20 public:
21 void RunTest(const VideoQualityTest::Params &params) {
22 RunWithAnalyzer(params);
23 }
24
25 void ForemanCifWithoutPacketLoss(const std::string& video_codec) {
26 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
27 VideoQualityTest::Params foreman_cif;
28 foreman_cif.video = {true, 352, 288, 30, 700000, 700000, 700000, false,
29 video_codec, 1, 0, 0, false, false, "", "foreman_cif"};
30 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_" + video_codec,
31 0.0, 0.0, kFullStackTestDurationSecs};
32 RunTest(foreman_cif);
33 }
34
35 void ForemanCifPlr5(const std::string& video_codec,
36 bool use_ulpfec,
37 bool use_flexfec) {
38 VideoQualityTest::Params foreman_cif;
39 foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
40 video_codec, 1, 0, 0, use_ulpfec, use_flexfec, "",
41 "foreman_cif"};
42 std::string fec_description;
43 if (use_ulpfec)
44 fec_description += "_ulpfec";
45 if (use_flexfec)
46 fec_description += "_flexfec";
47 foreman_cif.analyzer = {
48 "foreman_cif_delay_50_0_plr_5_" + video_codec + fec_description, 0.0,
49 0.0, kFullStackTestDurationSecs};
50 foreman_cif.pipe.loss_percent = 5;
51 foreman_cif.pipe.queue_delay_ms = 50;
52 RunTest(foreman_cif);
53 }
54 };
55
56 // VideoQualityTest::Params params = {
57 // { ... }, // Common.
58 // { ... }, // Video-specific settings.
59 // { ... }, // Screenshare-specific settings.
60 // { ... }, // Analyzer settings.
61 // pipe, // FakeNetworkPipe::Config
62 // { ... }, // Spatial scalability.
63 // logs // bool
64 // };
65
66 #if !defined(RTC_DISABLE_VP9)
67 TEST_F(FullStackTest, ForemanCifWithoutPacketLossVp9) {
68 ForemanCifWithoutPacketLoss("VP9");
69 }
70
71 TEST_F(FullStackTest, ForemanCifPlr5Vp9) {
72 const bool kUlpfec = false;
73 const bool kFlexfec = false;
74 ForemanCifPlr5("VP9", kUlpfec, kFlexfec);
75 }
76 #endif // !defined(RTC_DISABLE_VP9)
77
78 TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) {
79 VideoQualityTest::Params paris_qcif;
80 paris_qcif.call.send_side_bwe = true;
81 paris_qcif.video = {true, 176, 144, 30, 300000, 300000, 300000, false,
82 "VP8", 1, 0, 0, false, false, "", "paris_qcif"};
83 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
84 kFullStackTestDurationSecs};
85 RunTest(paris_qcif);
86 }
87
88 TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) {
89 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
90 VideoQualityTest::Params foreman_cif;
91 foreman_cif.call.send_side_bwe = true;
92 foreman_cif.video = {true, 352, 288, 30, 700000, 700000, 700000, false, "VP8",
93 1, 0, 0, false, false, "", "foreman_cif"};
94 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0,
95 kFullStackTestDurationSecs};
96 RunTest(foreman_cif);
97 }
98
99 TEST_F(FullStackTest, ForemanCifPlr5) {
100 VideoQualityTest::Params foreman_cif;
101 foreman_cif.call.send_side_bwe = true;
102 foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false, "VP8",
103 1, 0, 0, false, false, "", "foreman_cif"};
104 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
105 kFullStackTestDurationSecs};
106 foreman_cif.pipe.loss_percent = 5;
107 foreman_cif.pipe.queue_delay_ms = 50;
108 RunTest(foreman_cif);
109 }
110
111 #if defined(WEBRTC_USE_H264)
112 TEST_F(FullStackTest, ForemanCifWithoutPacketlossH264) {
113 ForemanCifWithoutPacketLoss("H264");
114 }
115
116 TEST_F(FullStackTest, ForemanCifPlr5H264) {
117 const bool kUlpfec = false;
118 const bool kFlexfec = false;
119 ForemanCifPlr5("H264", kUlpfec, kFlexfec);
120 }
121
122 // Verify that this is worth the bot time, before enabling.
123 TEST_F(FullStackTest, ForemanCifPlr5H264Flexfec) {
124 const bool kUlpfec = false;
125 const bool kFlexfec = true;
126 ForemanCifPlr5("H264", kUlpfec, kFlexfec);
127 }
128
129 // Ulpfec with H264 is an unsupported combination, so this test is only useful
130 // for debugging. It is therefore disabled by default.
131 TEST_F(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
132 const bool kUlpfec = true;
133 const bool kFlexfec = false;
134 ForemanCifPlr5("H264", kUlpfec, kFlexfec);
135 }
136 #endif // defined(WEBRTC_USE_H264)
137
138 TEST_F(FullStackTest, ForemanCif500kbps) {
139 VideoQualityTest::Params foreman_cif;
140 foreman_cif.call.send_side_bwe = true;
141 foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false, "VP8",
142 1, 0, 0, false, false, "", "foreman_cif"};
143 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
144 kFullStackTestDurationSecs};
145 foreman_cif.pipe.queue_length_packets = 0;
146 foreman_cif.pipe.queue_delay_ms = 0;
147 foreman_cif.pipe.link_capacity_kbps = 500;
148 RunTest(foreman_cif);
149 }
150
151 TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) {
152 VideoQualityTest::Params foreman_cif;
153 foreman_cif.call.send_side_bwe = true;
154 foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false, "VP8",
155 1, 0, 0, false, false, "", "foreman_cif"};
156 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
157 kFullStackTestDurationSecs};
158 foreman_cif.pipe.queue_length_packets = 32;
159 foreman_cif.pipe.queue_delay_ms = 0;
160 foreman_cif.pipe.link_capacity_kbps = 500;
161 RunTest(foreman_cif);
162 }
163
164 TEST_F(FullStackTest, ForemanCif500kbps100ms) {
165 VideoQualityTest::Params foreman_cif;
166 foreman_cif.call.send_side_bwe = true;
167 foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false, "VP8",
168 1, 0, 0, false, false, "", "foreman_cif"};
169 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
170 kFullStackTestDurationSecs};
171 foreman_cif.pipe.queue_length_packets = 0;
172 foreman_cif.pipe.queue_delay_ms = 100;
173 foreman_cif.pipe.link_capacity_kbps = 500;
174 RunTest(foreman_cif);
175 }
176
177 TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
178 VideoQualityTest::Params foreman_cif;
179 foreman_cif.call.send_side_bwe = true;
180 foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false, "VP8",
181 1, 0, 0, false, false, "", "foreman_cif"};
182 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
183 kFullStackTestDurationSecs};
184 foreman_cif.pipe.queue_length_packets = 32;
185 foreman_cif.pipe.queue_delay_ms = 100;
186 foreman_cif.pipe.link_capacity_kbps = 500;
187 RunTest(foreman_cif);
188 }
189
190 TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
191 VideoQualityTest::Params foreman_cif;
192 foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false, "VP8",
193 1, 0, 0, false, false, "", "foreman_cif"};
194 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
195 kFullStackTestDurationSecs};
196 foreman_cif.pipe.queue_length_packets = 32;
197 foreman_cif.pipe.queue_delay_ms = 100;
198 foreman_cif.pipe.link_capacity_kbps = 500;
199 RunTest(foreman_cif);
200 }
201
202 TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
203 VideoQualityTest::Params foreman_cif;
204 foreman_cif.call.send_side_bwe = true;
205 foreman_cif.video = {true, 352, 288, 30, 30000, 2000000, 2000000, false,
206 "VP8", 1, 0, 0, false, false, "", "foreman_cif"};
207 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
208 kFullStackTestDurationSecs};
209 foreman_cif.pipe.queue_length_packets = 32;
210 foreman_cif.pipe.queue_delay_ms = 100;
211 foreman_cif.pipe.link_capacity_kbps = 1000;
212 RunTest(foreman_cif);
213 }
214
215 TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
216 VideoQualityTest::Params conf_motion_hd;
217 conf_motion_hd.call.send_side_bwe = true;
218 conf_motion_hd.video = {true, 1280, 720, 50, 30000, 3000000, 3000000, false,
219 "VP8", 1, 0, 0, false, false, "",
220 "ConferenceMotion_1280_720_50"};
221 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
222 0.0, 0.0, kFullStackTestDurationSecs};
223 conf_motion_hd.pipe.queue_length_packets = 32;
224 conf_motion_hd.pipe.queue_delay_ms = 100;
225 conf_motion_hd.pipe.link_capacity_kbps = 2000;
226 RunTest(conf_motion_hd);
227 }
228
229 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL) {
230 VideoQualityTest::Params screenshare;
231 screenshare.call.send_side_bwe = true;
232 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
233 "VP8", 2, 1, 400000, false, false, "", ""};
234 screenshare.screenshare = {true, 10};
235 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
236 kFullStackTestDurationSecs};
237 RunTest(screenshare);
238 }
239
240 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
241 VideoQualityTest::Params config;
242 config.call.send_side_bwe = true;
243 config.video = {true, 1850, 1110 / 2, 5, 50000, 200000, 2000000, false,
244 "VP8", 2, 1, 400000, false, false, "", ""};
245 config.screenshare = {true, 10, 2};
246 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
247 kFullStackTestDurationSecs};
248 RunTest(config);
249 }
250
251 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
252 VideoQualityTest::Params screenshare;
253 screenshare.call.send_side_bwe = true;
254 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
255 "VP8", 2, 1, 400000, false, false, "", ""};
256 screenshare.screenshare = {true, 10};
257 screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
258 kFullStackTestDurationSecs};
259 screenshare.pipe.loss_percent = 5;
260 screenshare.pipe.queue_delay_ms = 200;
261 screenshare.pipe.link_capacity_kbps = 500;
262 RunTest(screenshare);
263 }
264
265 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
266 VideoQualityTest::Params screenshare;
267 screenshare.call.send_side_bwe = true;
268 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
269 "VP8", 2, 1, 400000, false, false, "", ""};
270 screenshare.screenshare = {true, 10};
271 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
272 kFullStackTestDurationSecs};
273 screenshare.pipe.loss_percent = 10;
274 screenshare.pipe.queue_delay_ms = 200;
275 screenshare.pipe.link_capacity_kbps = 500;
276 RunTest(screenshare);
277 }
278
279 #if !defined(RTC_DISABLE_VP9)
280 TEST_F(FullStackTest, ScreenshareSlidesVP9_2SL) {
281 VideoQualityTest::Params screenshare;
282 screenshare.call.send_side_bwe = true;
283 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
284 "VP9", 1, 0, 400000, false, false, "", ""};
285 screenshare.screenshare = {true, 10};
286 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
287 kFullStackTestDurationSecs};
288 screenshare.logs = false;
289 screenshare.ss = {std::vector<VideoStream>(), 0, 2, 1};
290 RunTest(screenshare);
291 }
292 #endif // !defined(RTC_DISABLE_VP9)
293 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/video/full_stack_plot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698