blob: b9a94ae7eae1157d4c642e4698cfd79b2755758d [file] [log] [blame]
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001/*
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
Sebastian Janssoncabe3832018-01-12 10:54:18 +010012#include "rtc_base/experiments/alr_experiment.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020013#include "rtc_base/flags.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "test/field_trial.h"
15#include "test/gtest.h"
16#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000017
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000018namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020019namespace flags {
20
21DEFINE_bool(logs, false, "print logs to stderr");
22
23DEFINE_string(rtc_event_log_name,
24 "",
25 "Filename for rtc event log. Two files "
26 "with \"_send\" and \"_recv\" suffixes will be created.");
27std::string RtcEventLogName() {
28 return static_cast<std::string>(FLAG_rtc_event_log_name);
29}
30DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream.");
31std::string RtpDumpName() {
32 return static_cast<std::string>(FLAG_rtp_dump_name);
33}
34DEFINE_string(encoded_frame_path,
35 "",
36 "The base path for encoded frame logs. Created files will have "
37 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
38std::string EncodedFramePath() {
39 return static_cast<std::string>(FLAG_encoded_frame_path);
40}
41} // namespace flags
42} // namespace webrtc
43
44namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000045
sprang89c4a7e2017-06-30 13:27:40 -070046namespace {
brandtrdd369c62016-11-16 23:56:57 -080047static const int kFullStackTestDurationSecs = 45;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020048const char kScreenshareSimulcastExperiment[] =
49 "WebRTC-SimulcastScreenshare/Enabled/";
50const char kRoundRobinPacingQueueExperiment[] =
51 "WebRTC-RoundRobinPacing/Enabled/";
52const char kPacerPushBackExperiment[] =
53 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000054
Patrik Höglundb6b29e02018-06-21 16:58:01 +020055struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000056 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020057 ParamsWithLogging() {
58 // Use these logging flags by default, for everything.
59 logging = {flags::FLAG_logs, flags::RtcEventLogName(),
60 flags::RtpDumpName(), flags::EncodedFramePath()};
pbos@webrtc.org94015242013-10-16 11:05:37 +000061 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000062};
63
Patrik Höglundb6b29e02018-06-21 16:58:01 +020064std::unique_ptr<VideoQualityTestFixtureInterface>
65CreateVideoQualityTestFixture() {
Karl Wiberg918f50c2018-07-05 11:40:33 +020066 return absl::make_unique<VideoQualityTest>(nullptr);
Patrik Höglundb6b29e02018-06-21 16:58:01 +020067}
68
69} // namespace
70
sprangce4aef12015-11-02 07:23:20 -080071// VideoQualityTest::Params params = {
72// { ... }, // Common.
73// { ... }, // Video-specific settings.
74// { ... }, // Screenshare-specific settings.
75// { ... }, // Analyzer settings.
76// pipe, // FakeNetworkPipe::Config
77// { ... }, // Spatial scalability.
78// logs // bool
79// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000080
Peter Boström12996152016-05-14 02:03:18 +020081#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +020082TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
83 auto fixture = CreateVideoQualityTestFixture();
84 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080085 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +010086 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
87 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +020088 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -080089 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
90 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +020091 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -080092}
93
Patrik Höglundb6b29e02018-06-21 16:58:01 +020094TEST(FullStackTest, ForemanCifPlr5Vp9) {
95 auto fixture = CreateVideoQualityTestFixture();
96 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080097 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +010098 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
99 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200100 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800101 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0,
102 kFullStackTestDurationSecs};
103 foreman_cif.pipe.loss_percent = 5;
104 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200105 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800106}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800107
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200108TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
109 auto fixture = CreateVideoQualityTestFixture();
110 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800111 foreman_cif.call.send_side_bwe = true;
112 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
113 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200114 0, 0, false, false, false,
115 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800116 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
117 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200118 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800119}
120
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200121TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
122 auto fixture = CreateVideoQualityTestFixture();
123
124 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700125 generator.call.send_side_bwe = true;
126 generator.video[0] = {true, 352, 288, 30, 700000,
127 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200128 0, 0, false, false, false,
129 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700130 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
131 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200132 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800133}
134
Peter Boström12996152016-05-14 02:03:18 +0200135#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800136
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200137#if defined(WEBRTC_LINUX)
138// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
139#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
140#else
141#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
142#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200143TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
144 auto fixture = CreateVideoQualityTestFixture();
145 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700146 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100147 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
148 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200149 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700150 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
151 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200152 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000153}
154
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200155TEST(FullStackTest, ForemanCifWithoutPacketLoss) {
156 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000157 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200158 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700159 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100160 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
161 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200162 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700163 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0,
164 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200165 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000166}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000167
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200168TEST(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
169 auto fixture = CreateVideoQualityTestFixture();
170 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800171 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100172 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
173 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200174 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800175 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0", 0.0, 0.0,
176 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200177 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800178}
179
Niels Möller6aa415e2018-06-07 11:14:13 +0200180// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200181TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
182 auto fixture = CreateVideoQualityTestFixture();
Niels Möller6aa415e2018-06-07 11:14:13 +0200183 VideoQualityTest::Params foreman_cif;
184 foreman_cif.call.send_side_bwe = true;
185 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
186 500000, 2000000, false, "VP8", 1,
187 0, 0, false, false, true, "foreman_cif"};
188 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
189 0.0, 0.0,
190 kFullStackTestDurationSecs};
191 foreman_cif.pipe.link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200192 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200193}
194
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200195TEST(FullStackTest, ForemanCifPlr5) {
196 auto fixture = CreateVideoQualityTestFixture();
197 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700198 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100199 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
200 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200201 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700202 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
203 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700204 foreman_cif.pipe.loss_percent = 5;
205 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200206 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000207}
208
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200209TEST(FullStackTest, ForemanCifPlr5Ulpfec) {
210 auto fixture = CreateVideoQualityTestFixture();
211 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800212 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100213 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
214 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200215 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800216 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0,
217 kFullStackTestDurationSecs};
218 foreman_cif.pipe.loss_percent = 5;
219 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200220 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800221}
222
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200223TEST(FullStackTest, ForemanCifPlr5Flexfec) {
224 auto fixture = CreateVideoQualityTestFixture();
225 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800226 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100227 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
228 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200229 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800230 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
231 kFullStackTestDurationSecs};
232 foreman_cif.pipe.loss_percent = 5;
233 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200234 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800235}
236
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200237TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
238 auto fixture = CreateVideoQualityTestFixture();
239 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700240 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100241 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
242 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200243 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700244 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
245 0.0, kFullStackTestDurationSecs};
246 foreman_cif.pipe.loss_percent = 3;
247 foreman_cif.pipe.link_capacity_kbps = 500;
248 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200249 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700250}
251
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200252TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
253 auto fixture = CreateVideoQualityTestFixture();
254 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700255 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100256 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
257 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200258 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700259 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
260 0.0, kFullStackTestDurationSecs};
261 foreman_cif.pipe.loss_percent = 3;
262 foreman_cif.pipe.link_capacity_kbps = 500;
263 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200264 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700265}
266
brandtrdd369c62016-11-16 23:56:57 -0800267#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200268TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
269 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800270 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200271 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800272 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100273 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
274 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200275 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800276 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
277 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200278 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800279}
280
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200281TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
282 auto fixture = CreateVideoQualityTestFixture();
283 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800284 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100285 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
286 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200287 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800288 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
289 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200290 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800291}
292
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200293TEST(FullStackTest, ForemanCifPlr5H264) {
294 auto fixture = CreateVideoQualityTestFixture();
295 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800296 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100297 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
298 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200299 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800300 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0,
301 kFullStackTestDurationSecs};
302 foreman_cif.pipe.loss_percent = 5;
303 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200304 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800305}
306
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200307TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
308 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100309 test::ScopedFieldTrials override_field_trials(
310 "WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/");
311
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200312 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100313 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100314 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
315 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200316 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100317 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
318 0.0, kFullStackTestDurationSecs};
319 foreman_cif.pipe.loss_percent = 5;
320 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200321 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100322}
323
brandtrdd369c62016-11-16 23:56:57 -0800324// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200325TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
326 auto fixture = CreateVideoQualityTestFixture();
327 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800328 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100329 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
330 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200331 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800332 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
333 kFullStackTestDurationSecs};
334 foreman_cif.pipe.loss_percent = 5;
335 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200336 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800337}
338
339// Ulpfec with H264 is an unsupported combination, so this test is only useful
340// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200341TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
342 auto fixture = CreateVideoQualityTestFixture();
343 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800344 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100345 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
346 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200347 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800348 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
349 kFullStackTestDurationSecs};
350 foreman_cif.pipe.loss_percent = 5;
351 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200352 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800353}
354#endif // defined(WEBRTC_USE_H264)
355
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200356TEST(FullStackTest, ForemanCif500kbps) {
357 auto fixture = CreateVideoQualityTestFixture();
358 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700359 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100360 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
361 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200362 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700363 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
364 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700365 foreman_cif.pipe.queue_length_packets = 0;
366 foreman_cif.pipe.queue_delay_ms = 0;
367 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200368 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000369}
370
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200371TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
372 auto fixture = CreateVideoQualityTestFixture();
373 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700374 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100375 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
376 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200377 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700378 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
379 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700380 foreman_cif.pipe.queue_length_packets = 32;
381 foreman_cif.pipe.queue_delay_ms = 0;
382 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200383 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000384}
385
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200386TEST(FullStackTest, ForemanCif500kbps100ms) {
387 auto fixture = CreateVideoQualityTestFixture();
388 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700389 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100390 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
391 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200392 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700393 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
394 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700395 foreman_cif.pipe.queue_length_packets = 0;
396 foreman_cif.pipe.queue_delay_ms = 100;
397 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200398 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000399}
400
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200401TEST(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
402 auto fixture = CreateVideoQualityTestFixture();
403 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700404 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100405 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
406 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200407 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700408 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
409 kFullStackTestDurationSecs};
stefanb1797672016-08-11 07:00:57 -0700410 foreman_cif.pipe.queue_length_packets = 32;
411 foreman_cif.pipe.queue_delay_ms = 100;
412 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200413 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700414}
415
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200416TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
417 auto fixture = CreateVideoQualityTestFixture();
418 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800419 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100420 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
421 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200422 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800423 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
424 0.0, 0.0, kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700425 foreman_cif.pipe.queue_length_packets = 32;
426 foreman_cif.pipe.queue_delay_ms = 100;
427 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200428 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000429}
430
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200431TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
432 auto fixture = CreateVideoQualityTestFixture();
433 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700434 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100435 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
436 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200437 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700438 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
439 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700440 foreman_cif.pipe.queue_length_packets = 32;
441 foreman_cif.pipe.queue_delay_ms = 100;
442 foreman_cif.pipe.link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200443 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000444}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000445
sprangff19d352017-09-06 07:14:02 -0700446// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200447TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
448 auto fixture = CreateVideoQualityTestFixture();
449 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700450 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100451 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000452 true, 1280, 720, 50, 30000,
453 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200454 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700455 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
456 0.0, 0.0, kFullStackTestDurationSecs};
stefanb1797672016-08-11 07:00:57 -0700457 conf_motion_hd.pipe.queue_length_packets = 32;
458 conf_motion_hd.pipe.queue_delay_ms = 100;
459 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200460 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700461}
462
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200463TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
464 auto fixture = CreateVideoQualityTestFixture();
465 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700466 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100467 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000468 true, 1280, 720, 50, 30000,
469 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200470 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700471 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
472 0.0, kFullStackTestDurationSecs};
473 conf_motion_hd.pipe.queue_length_packets = 50;
474 conf_motion_hd.pipe.loss_percent = 3;
475 conf_motion_hd.pipe.queue_delay_ms = 100;
476 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200477 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700478}
479
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200480TEST(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
481 auto fixture = CreateVideoQualityTestFixture();
482 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700483 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100484 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000485 true, 1280, 720, 50, 30000,
486 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200487 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700488 conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0,
489 0.0, kFullStackTestDurationSecs};
490 conf_motion_hd.pipe.queue_length_packets = 50;
491 conf_motion_hd.pipe.loss_percent = 3;
492 conf_motion_hd.pipe.queue_delay_ms = 100;
493 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200494 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700495}
496
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200497TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
498 auto fixture = CreateVideoQualityTestFixture();
499 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700500 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100501 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000502 true, 1280, 720, 50, 30000,
503 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200504 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700505 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
506 0.0, kFullStackTestDurationSecs};
507 conf_motion_hd.pipe.queue_length_packets = 50;
508 conf_motion_hd.pipe.loss_percent = 3;
509 conf_motion_hd.pipe.queue_delay_ms = 100;
510 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200511 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700512}
513
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200514TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
515 auto fixture = CreateVideoQualityTestFixture();
516 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700517 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100518 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000519 true, 1280, 720, 50, 30000,
520 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200521 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700522 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
523 0.0, kFullStackTestDurationSecs};
524 conf_motion_hd.pipe.queue_length_packets = 50;
525 conf_motion_hd.pipe.loss_percent = 3;
526 conf_motion_hd.pipe.queue_delay_ms = 100;
527 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200528 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700529}
530
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200531TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
532 auto fixture = CreateVideoQualityTestFixture();
sprangff19d352017-09-06 07:14:02 -0700533 test::ScopedFieldTrials field_trial("WebRTC-UseShortVP8TL3Pattern/Enabled/");
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200534 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700535 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100536 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000537 true, 1280, 720, 50, 30000,
538 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200539 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700540 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
541 0.0, 0.0, kFullStackTestDurationSecs};
542 conf_motion_hd.pipe.queue_length_packets = 50;
543 conf_motion_hd.pipe.loss_percent = 3;
544 conf_motion_hd.pipe.queue_delay_ms = 100;
545 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200546 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700547}
548
jianj390e64d2017-02-03 09:51:23 -0800549#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200550TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
551 auto fixture = CreateVideoQualityTestFixture();
552 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800553 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100554 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000555 true, 1280, 720, 50, 30000,
556 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200557 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800558 conf_motion_hd.analyzer = {
559 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
560 kFullStackTestDurationSecs};
561 conf_motion_hd.pipe.queue_length_packets = 32;
562 conf_motion_hd.pipe.queue_delay_ms = 100;
563 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200564 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800565}
566#endif
567
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200568TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
569 auto fixture = CreateVideoQualityTestFixture();
570 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700571 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200572 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
573 1000000, false, "VP8", 2, 1, 400000,
574 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100575 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700576 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
577 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200578 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200579}
580
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200581TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
582 auto fixture = CreateVideoQualityTestFixture();
sprang89c4a7e2017-06-30 13:27:40 -0700583 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200584 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800585 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100586 screenshare.screenshare[0] = {true, false, 10};
587 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
588 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200589 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800590 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
591 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200592 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200593 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
594 1000000, false, "VP8", 3, 0, 400000,
595 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800596 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200597 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
598 1000000, false, "VP8", 2, 0, 400000,
599 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800600
601 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200602 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
603 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200604 screenshare.ss[0] = {
605 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
606 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200607 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800608}
609
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200610TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
611 auto fixture = CreateVideoQualityTestFixture();
612 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700613 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200614 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
615 1000000, false, "VP8", 2, 1, 400000,
616 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100617 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700618 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
619 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200620 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700621}
622
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200623TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
624 auto fixture = CreateVideoQualityTestFixture();
625 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700626 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200627 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
628 1000000, false, "VP8", 2, 1, 400000,
629 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100630 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700631 screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
632 kFullStackTestDurationSecs};
sprangee37de32015-11-23 06:10:23 -0800633 screenshare.pipe.loss_percent = 5;
634 screenshare.pipe.queue_delay_ms = 200;
635 screenshare.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200636 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800637}
638
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200639TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
640 auto fixture = CreateVideoQualityTestFixture();
641 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700642 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200643 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
644 1000000, false, "VP8", 2, 1, 400000,
645 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100646 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700647 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
648 kFullStackTestDurationSecs};
sprangee37de32015-11-23 06:10:23 -0800649 screenshare.pipe.loss_percent = 10;
650 screenshare.pipe.queue_delay_ms = 200;
651 screenshare.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200652 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800653}
654
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200655TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
656 auto fixture = CreateVideoQualityTestFixture();
657 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700658 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200659 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
660 1000000, false, "VP8", 2, 1, 400000,
661 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100662 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700663 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
664 kFullStackTestDurationSecs};
665 screenshare.pipe.loss_percent = 5;
666 screenshare.pipe.link_capacity_kbps = 200;
667 screenshare.pipe.queue_length_packets = 30;
668
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200669 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700670}
671
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200672TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
673 auto fixture = CreateVideoQualityTestFixture();
674 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700675 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200676 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
677 1000000, false, "VP8", 2, 1, 400000,
678 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100679 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700680 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
681 kFullStackTestDurationSecs};
682 screenshare.pipe.loss_percent = 1;
683 screenshare.pipe.link_capacity_kbps = 1200;
684 screenshare.pipe.queue_length_packets = 30;
685
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200686 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700687}
688
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200689const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000690 true, 1280, 720, 30, 800000,
691 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200692 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800693
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200694const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000695 true, 1280, 720, 30, 800000,
696 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200697 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800698
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200699const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000700 true, 640, 360, 30, 150000,
701 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200702 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800703
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200704const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000705 true, 320, 180, 30, 30000,
706 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200707 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800708
Peter Boström12996152016-05-14 02:03:18 +0200709#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200710TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
711 auto fixture = CreateVideoQualityTestFixture();
712 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700713 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100714 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
715 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200716 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100717 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700718 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
719 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200720 screenshare.ss[0] = {
721 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
722 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200723 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000724}
ilnik2a8c2f52017-02-15 02:23:28 -0800725
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200726TEST(FullStackTest, VP9SVC_3SL_High) {
727 auto fixture = CreateVideoQualityTestFixture();
728 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800729 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100730 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800731 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
732 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200733
Sergey Silkin57027362018-05-15 09:12:05 +0200734 simulcast.ss[0] = {
735 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
736 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200737 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800738}
739
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200740TEST(FullStackTest, VP9SVC_3SL_Medium) {
741 auto fixture = CreateVideoQualityTestFixture();
742 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800743 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100744 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800745 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
746 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200747 simulcast.ss[0] = {
748 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
749 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200750 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800751}
752
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200753TEST(FullStackTest, VP9SVC_3SL_Low) {
754 auto fixture = CreateVideoQualityTestFixture();
755 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800756 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100757 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800758 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200759 simulcast.ss[0] = {
760 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
761 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200762 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800763}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200764
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200765TEST(FullStackTest, VP9KSVC_3SL_High) {
766 auto fixture = CreateVideoQualityTestFixture();
767 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200768 simulcast.call.send_side_bwe = true;
769 simulcast.video[0] = kSvcVp9Video;
770 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
771 kFullStackTestDurationSecs};
772 simulcast.ss[0] = {
773 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
774 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200775 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200776}
777
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200778TEST(FullStackTest, VP9KSVC_3SL_Medium) {
779 auto fixture = CreateVideoQualityTestFixture();
780 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200781 simulcast.call.send_side_bwe = true;
782 simulcast.video[0] = kSvcVp9Video;
783 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
784 kFullStackTestDurationSecs};
785 simulcast.ss[0] = {
786 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
787 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200788 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200789}
790
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200791TEST(FullStackTest, VP9KSVC_3SL_Low) {
792 auto fixture = CreateVideoQualityTestFixture();
793 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200794 simulcast.call.send_side_bwe = true;
795 simulcast.video[0] = kSvcVp9Video;
796 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
797 kFullStackTestDurationSecs};
798 simulcast.ss[0] = {
799 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
800 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200801 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200802}
“Michael277a6562018-06-01 14:09:19 -0500803
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200804TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
805 auto fixture = CreateVideoQualityTestFixture();
“Michael277a6562018-06-01 14:09:19 -0500806 VideoQualityTest::Params simulcast;
807 simulcast.call.send_side_bwe = true;
808 simulcast.video[0] = kSvcVp9Video;
809 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
810 kFullStackTestDurationSecs};
811 simulcast.ss[0] = {
812 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
813 std::vector<SpatialLayer>(), false};
814 simulcast.pipe.link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200815 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500816}
817
Peter Boström12996152016-05-14 02:03:18 +0200818#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800819
ilnik6b826ef2017-06-16 06:53:48 -0700820// Android bots can't handle FullHD, so disable the test.
Sam Zackrissonc3d8bb12018-05-02 10:22:32 +0200821// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
822#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700823#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
824#else
825#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
826#endif
827
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200828TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
829 auto fixture = CreateVideoQualityTestFixture();
830 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700831 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100832 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
833 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200834 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700835 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
836 kFullStackTestDurationSecs};
837 simulcast.pipe.loss_percent = 0;
838 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200839 std::vector<VideoStream> streams = {
840 VideoQualityTest::DefaultVideoStream(simulcast, 0),
841 VideoQualityTest::DefaultVideoStream(simulcast, 0),
842 VideoQualityTest::DefaultVideoStream(simulcast, 0)
843 };
Sergey Silkin57027362018-05-15 09:12:05 +0200844 simulcast.ss[0] = {
845 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
846 true};
ilnik6b826ef2017-06-16 06:53:48 -0700847 webrtc::test::ScopedFieldTrials override_trials(
848 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/");
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200849 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700850}
851
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200852TEST(FullStackTest, SimulcastVP8_3SL_High) {
853 auto fixture = CreateVideoQualityTestFixture();
854 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800855 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100856 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800857 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800858 kFullStackTestDurationSecs};
859 simulcast.pipe.loss_percent = 0;
860 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200861 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100862 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200863 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100864 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200865 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100866 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800867
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100868 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200869 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
870 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
871 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200872 simulcast.ss[0] = {
873 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
874 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200875 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800876}
877
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200878TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
879 auto fixture = CreateVideoQualityTestFixture();
880 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800881 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100882 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800883 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800884 kFullStackTestDurationSecs};
885 simulcast.pipe.loss_percent = 0;
886 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200887 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100888 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200889 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100890 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200891 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100892 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800893
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100894 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200895 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
896 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
897 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200898 simulcast.ss[0] = {
899 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
900 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200901 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800902}
903
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200904TEST(FullStackTest, SimulcastVP8_3SL_Low) {
905 auto fixture = CreateVideoQualityTestFixture();
906 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800907 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100908 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800909 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800910 kFullStackTestDurationSecs};
911 simulcast.pipe.loss_percent = 0;
912 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200913 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100914 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200915 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100916 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200917 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100918 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800919
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100920 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200921 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
922 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
923 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200924 simulcast.ss[0] = {
925 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
926 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200927 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800928}
929
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200930TEST(FullStackTest, LargeRoomVP8_5thumb) {
931 auto fixture = CreateVideoQualityTestFixture();
932 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800933 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100934 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800935 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
936 kFullStackTestDurationSecs};
937 large_room.pipe.loss_percent = 0;
938 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200939 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100940 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200941 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100942 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200943 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100944 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -0800945
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100946 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200947 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
948 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
949 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -0700950 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +0200951 large_room.ss[0] = {
952 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
953 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200954 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -0800955}
956
oprypin743117f2017-09-15 05:24:24 -0700957#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
958// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -0800959// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
960#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -0800961#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -0800962#else
963#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -0800964#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -0800965#endif
966
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200967TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
968 auto fixture = CreateVideoQualityTestFixture();
969 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800970 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100971 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800972 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
973 kFullStackTestDurationSecs};
974 large_room.pipe.loss_percent = 0;
975 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200976 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100977 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200978 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100979 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200980 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100981 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -0800982
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100983 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200984 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
985 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
986 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -0700987 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +0200988 large_room.ss[0] = {
989 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
990 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200991 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -0800992}
993
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200994TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
995 auto fixture = CreateVideoQualityTestFixture();
996 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800997 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100998 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800999 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1000 kFullStackTestDurationSecs};
1001 large_room.pipe.loss_percent = 0;
1002 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001003 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001004 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001005 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001006 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001007 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001008 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001009
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001010 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001011 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1012 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1013 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001014 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001015 large_room.ss[0] = {
1016 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1017 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001018 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001019}
1020
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001021class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001022
1023// Disable dual video test on mobile device becuase it's too heavy.
1024#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1025TEST_P(DualStreamsTest,
1026 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1027 test::ScopedFieldTrials field_trial(
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001028 std::string(kScreenshareSimulcastExperiment) +
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001029 std::string(kRoundRobinPacingQueueExperiment) +
1030 std::string(kPacerPushBackExperiment));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001031 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001032 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001033
1034 // Screenshare Settings.
1035 dual_streams.screenshare[first_stream] = {true, false, 10};
1036 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1037 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001038 2, 400000, false, false, false,
1039 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001040
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001041 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001042 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1043 1000000, false, "VP8", 3, 0, 400000,
1044 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001045 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001046 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1047 1000000, false, "VP8", 2, 0, 400000,
1048 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001049 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001050 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1051 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001052
Sergey Silkin57027362018-05-15 09:12:05 +02001053 dual_streams.ss[first_stream] = {
1054 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1055 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001056
1057 // Video settings.
1058 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1059
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001060 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001061 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001062 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001063 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001064 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001065 video_params_low.video[0] = kSimulcastVp8VideoLow;
1066 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001067 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1068 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1069 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001070
1071 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001072 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1073 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001074
1075 // Call settings.
1076 dual_streams.call.send_side_bwe = true;
1077 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001078 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1079 std::to_string(first_stream);
1080 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001081 dual_streams.pipe.loss_percent = 1;
1082 dual_streams.pipe.link_capacity_kbps = 7500;
1083 dual_streams.pipe.queue_length_packets = 30;
1084 dual_streams.pipe.queue_delay_ms = 100;
1085
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001086 auto fixture = CreateVideoQualityTestFixture();
1087 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001088}
1089#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1090
1091TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001092 test::ScopedFieldTrials field_trial(
1093 std::string(kRoundRobinPacingQueueExperiment) +
1094 std::string(kPacerPushBackExperiment));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001095 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001096 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001097
1098 // Screenshare Settings.
1099 dual_streams.screenshare[first_stream] = {true, false, 10};
1100 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1101 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001102 2, 400000, false, false, false,
1103 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001104 // Video settings.
1105 dual_streams.video[1 - first_stream] = {
1106 true, 1280, 720, 30, 150000,
1107 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001108 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001109
1110 // Call settings.
1111 dual_streams.call.send_side_bwe = true;
1112 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001113 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1114 std::to_string(first_stream);
1115 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001116 dual_streams.pipe.loss_percent = 1;
1117 dual_streams.pipe.link_capacity_kbps = 5000;
1118 dual_streams.pipe.queue_length_packets = 30;
1119 dual_streams.pipe.queue_delay_ms = 100;
1120
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001121 auto fixture = CreateVideoQualityTestFixture();
1122 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001123}
1124
1125INSTANTIATE_TEST_CASE_P(FullStackTest,
1126 DualStreamsTest,
1127 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001128
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001129} // namespace webrtc