blob: bed77f4161eb36e48ec48c3bf16cffe980eae15b [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
Emircan Uysaler0823eec2018-07-13 17:10:00 -070012#include "media/base/vp9_profile.h"
13#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssoncabe3832018-01-12 10:54:18 +010014#include "rtc_base/experiments/alr_experiment.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020015#include "rtc_base/flags.h"
Erik Språngb6b1cac2018-08-09 16:12:54 +020016#include "system_wrappers/include/field_trial_default.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020017#include "test/field_trial.h"
18#include "test/gtest.h"
19#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000020
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000021namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020022namespace flags {
23
Sebastian Janssonf8518882018-05-31 14:52:59 +020024DEFINE_string(rtc_event_log_name,
25 "",
26 "Filename for rtc event log. Two files "
27 "with \"_send\" and \"_recv\" suffixes will be created.");
28std::string RtcEventLogName() {
29 return static_cast<std::string>(FLAG_rtc_event_log_name);
30}
31DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream.");
32std::string RtpDumpName() {
33 return static_cast<std::string>(FLAG_rtp_dump_name);
34}
35DEFINE_string(encoded_frame_path,
36 "",
37 "The base path for encoded frame logs. Created files will have "
38 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
39std::string EncodedFramePath() {
40 return static_cast<std::string>(FLAG_encoded_frame_path);
41}
42} // namespace flags
43} // namespace webrtc
44
45namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000046
sprang89c4a7e2017-06-30 13:27:40 -070047namespace {
brandtrdd369c62016-11-16 23:56:57 -080048static const int kFullStackTestDurationSecs = 45;
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +020049const char kNotScreenshareSimulcastExperiment[] =
50 "WebRTC-SimulcastScreenshare/Disabled/";
Ilya Nikolaevskiy504edc02018-09-04 09:02:26 +000051const char kRoundRobinPacingQueueExperiment[] =
52 "WebRTC-RoundRobinPacing/Enabled/";
Patrik Höglundb6b29e02018-06-21 16:58:01 +020053const char kPacerPushBackExperiment[] =
54 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000055
Patrik Höglundb6b29e02018-06-21 16:58:01 +020056struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000057 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020058 ParamsWithLogging() {
59 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020060 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
61 flags::EncodedFramePath()};
Artem Titovf18b3522018-08-28 16:54:24 +020062 this->config = DefaultNetworkSimulationConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000063 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000064};
65
Patrik Höglundb6b29e02018-06-21 16:58:01 +020066std::unique_ptr<VideoQualityTestFixtureInterface>
67CreateVideoQualityTestFixture() {
Karl Wiberg918f50c2018-07-05 11:40:33 +020068 return absl::make_unique<VideoQualityTest>(nullptr);
Patrik Höglundb6b29e02018-06-21 16:58:01 +020069}
70
Erik Språngb6b1cac2018-08-09 16:12:54 +020071// Takes the current active field trials set, and appends some new trials.
72std::string AppendFieldTrials(std::string new_trial_string) {
73 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
74}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020075} // namespace
76
sprangce4aef12015-11-02 07:23:20 -080077// VideoQualityTest::Params params = {
78// { ... }, // Common.
79// { ... }, // Video-specific settings.
80// { ... }, // Screenshare-specific settings.
81// { ... }, // Analyzer settings.
82// pipe, // FakeNetworkPipe::Config
83// { ... }, // Spatial scalability.
84// logs // bool
85// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000086
Peter Boström12996152016-05-14 02:03:18 +020087#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +020088TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
89 auto fixture = CreateVideoQualityTestFixture();
90 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080091 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +010092 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
93 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +020094 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -080095 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
96 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +020097 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -080098}
99
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200100TEST(FullStackTest, ForemanCifPlr5Vp9) {
101 auto fixture = CreateVideoQualityTestFixture();
102 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800103 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100104 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
105 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200106 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800107 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0,
108 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200109 foreman_cif.config->loss_percent = 5;
110 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200111 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800112}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800113
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700114TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
115 // Profile 2 might not be available on some platforms until
116 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
117 bool profile_2_is_supported = false;
118 for (const auto& codec : SupportedVP9Codecs()) {
119 if (ParseSdpForVP9Profile(codec.parameters)
120 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
121 profile_2_is_supported = true;
122 }
123 }
124 if (!profile_2_is_supported)
125 return;
126 auto fixture = CreateVideoQualityTestFixture();
127
128 SdpVideoFormat::Parameters vp92 = {
129 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
130 ParamsWithLogging generator;
131 generator.call.send_side_bwe = true;
132 generator.video[0] = {
133 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
134 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
135 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
136 kFullStackTestDurationSecs};
137 fixture->RunWithAnalyzer(generator);
138}
139
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200140TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
141 auto fixture = CreateVideoQualityTestFixture();
142 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800143 foreman_cif.call.send_side_bwe = true;
144 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
145 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200146 0, 0, false, false, false,
147 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800148 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
149 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200150 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800151}
152
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200153TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
154 auto fixture = CreateVideoQualityTestFixture();
155
156 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700157 generator.call.send_side_bwe = true;
158 generator.video[0] = {true, 352, 288, 30, 700000,
159 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200160 0, 0, false, false, false,
161 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700162 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
163 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200164 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800165}
166
Peter Boström12996152016-05-14 02:03:18 +0200167#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800168
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200169#if defined(WEBRTC_LINUX)
170// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
171#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
172#else
173#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
174#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200175TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
176 auto fixture = CreateVideoQualityTestFixture();
177 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700178 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100179 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
180 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200181 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700182 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
183 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200184 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000185}
186
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200187TEST(FullStackTest, ForemanCifWithoutPacketLoss) {
188 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000189 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200190 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700191 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100192 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
193 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200194 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700195 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0,
196 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200197 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000198}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000199
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200200TEST(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
201 auto fixture = CreateVideoQualityTestFixture();
202 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800203 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100204 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
205 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200206 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800207 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0", 0.0, 0.0,
208 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200209 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800210}
211
Niels Möller6aa415e2018-06-07 11:14:13 +0200212// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200213TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
214 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200215 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200216 foreman_cif.call.send_side_bwe = true;
217 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
218 500000, 2000000, false, "VP8", 1,
219 0, 0, false, false, true, "foreman_cif"};
220 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
221 0.0, 0.0,
222 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200223 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200224 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200225}
226
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200227TEST(FullStackTest, ForemanCifPlr5) {
228 auto fixture = CreateVideoQualityTestFixture();
229 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700230 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100231 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
232 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200233 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700234 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
235 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200236 foreman_cif.config->loss_percent = 5;
237 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200238 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000239}
240
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200241TEST(FullStackTest, ForemanCifPlr5Ulpfec) {
242 auto fixture = CreateVideoQualityTestFixture();
243 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800244 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100245 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
246 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200247 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800248 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0,
249 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200250 foreman_cif.config->loss_percent = 5;
251 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200252 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800253}
254
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200255TEST(FullStackTest, ForemanCifPlr5Flexfec) {
256 auto fixture = CreateVideoQualityTestFixture();
257 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800258 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100259 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
260 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200261 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800262 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
263 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200264 foreman_cif.config->loss_percent = 5;
265 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200266 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800267}
268
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200269TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
270 auto fixture = CreateVideoQualityTestFixture();
271 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700272 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100273 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
274 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200275 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700276 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
277 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200278 foreman_cif.config->loss_percent = 3;
279 foreman_cif.config->link_capacity_kbps = 500;
280 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200281 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700282}
283
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200284TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
285 auto fixture = CreateVideoQualityTestFixture();
286 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700287 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100288 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
289 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200290 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700291 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
292 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200293 foreman_cif.config->loss_percent = 3;
294 foreman_cif.config->link_capacity_kbps = 500;
295 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200296 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700297}
298
brandtrdd369c62016-11-16 23:56:57 -0800299#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200300TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
301 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800302 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200303 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800304 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100305 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
306 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200307 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800308 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
309 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200310 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800311}
312
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200313TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
314 auto fixture = CreateVideoQualityTestFixture();
315 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800316 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100317 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
318 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200319 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800320 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
321 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200322 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800323}
324
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200325TEST(FullStackTest, ForemanCifPlr5H264) {
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, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800332 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0,
333 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200334 foreman_cif.config->loss_percent = 5;
335 foreman_cif.config->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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200339TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
340 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100341 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200342 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100343
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200344 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100345 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100346 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
347 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200348 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100349 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
350 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200351 foreman_cif.config->loss_percent = 5;
352 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200353 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100354}
355
brandtrdd369c62016-11-16 23:56:57 -0800356// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200357TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
358 auto fixture = CreateVideoQualityTestFixture();
359 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800360 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100361 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
362 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200363 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800364 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
365 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200366 foreman_cif.config->loss_percent = 5;
367 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200368 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800369}
370
371// Ulpfec with H264 is an unsupported combination, so this test is only useful
372// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200373TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
374 auto fixture = CreateVideoQualityTestFixture();
375 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800376 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100377 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
378 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200379 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800380 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
381 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200382 foreman_cif.config->loss_percent = 5;
383 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200384 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800385}
386#endif // defined(WEBRTC_USE_H264)
387
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200388TEST(FullStackTest, ForemanCif500kbps) {
389 auto fixture = CreateVideoQualityTestFixture();
390 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700391 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100392 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
393 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200394 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700395 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
396 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200397 foreman_cif.config->queue_length_packets = 0;
398 foreman_cif.config->queue_delay_ms = 0;
399 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200400 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000401}
402
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200403TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
404 auto fixture = CreateVideoQualityTestFixture();
405 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700406 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100407 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
408 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200409 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700410 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
411 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200412 foreman_cif.config->queue_length_packets = 32;
413 foreman_cif.config->queue_delay_ms = 0;
414 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200415 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000416}
417
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200418TEST(FullStackTest, ForemanCif500kbps100ms) {
419 auto fixture = CreateVideoQualityTestFixture();
420 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700421 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100422 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
423 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200424 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700425 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
426 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200427 foreman_cif.config->queue_length_packets = 0;
428 foreman_cif.config->queue_delay_ms = 100;
429 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200430 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000431}
432
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200433TEST(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
434 auto fixture = CreateVideoQualityTestFixture();
435 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700436 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100437 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
438 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200439 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700440 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
441 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200442 foreman_cif.config->queue_length_packets = 32;
443 foreman_cif.config->queue_delay_ms = 100;
444 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200445 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700446}
447
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200448TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
449 auto fixture = CreateVideoQualityTestFixture();
450 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800451 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100452 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
453 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200454 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800455 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
456 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200457 foreman_cif.config->queue_length_packets = 32;
458 foreman_cif.config->queue_delay_ms = 100;
459 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200460 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000461}
462
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200463TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
464 auto fixture = CreateVideoQualityTestFixture();
465 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700466 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100467 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
468 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200469 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700470 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
471 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200472 foreman_cif.config->queue_length_packets = 32;
473 foreman_cif.config->queue_delay_ms = 100;
474 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200475 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000476}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000477
sprangff19d352017-09-06 07:14:02 -0700478// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200479TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
480 auto fixture = CreateVideoQualityTestFixture();
481 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700482 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100483 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000484 true, 1280, 720, 50, 30000,
485 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200486 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700487 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
488 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200489 conf_motion_hd.config->queue_length_packets = 32;
490 conf_motion_hd.config->queue_delay_ms = 100;
491 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200492 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700493}
494
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200495TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
496 auto fixture = CreateVideoQualityTestFixture();
497 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700498 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100499 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000500 true, 1280, 720, 50, 30000,
501 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200502 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700503 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
504 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200505 conf_motion_hd.config->queue_length_packets = 50;
506 conf_motion_hd.config->loss_percent = 3;
507 conf_motion_hd.config->queue_delay_ms = 100;
508 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200509 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700510}
511
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200512TEST(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
513 auto fixture = CreateVideoQualityTestFixture();
514 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700515 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100516 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000517 true, 1280, 720, 50, 30000,
518 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200519 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700520 conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0,
521 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200522 conf_motion_hd.config->queue_length_packets = 50;
523 conf_motion_hd.config->loss_percent = 3;
524 conf_motion_hd.config->queue_delay_ms = 100;
525 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200526 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700527}
528
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200529TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
530 auto fixture = CreateVideoQualityTestFixture();
531 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700532 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100533 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000534 true, 1280, 720, 50, 30000,
535 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200536 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700537 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
538 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200539 conf_motion_hd.config->queue_length_packets = 50;
540 conf_motion_hd.config->loss_percent = 3;
541 conf_motion_hd.config->queue_delay_ms = 100;
542 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200543 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700544}
545
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200546TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
547 auto fixture = CreateVideoQualityTestFixture();
548 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700549 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100550 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000551 true, 1280, 720, 50, 30000,
552 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200553 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700554 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
555 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200556 conf_motion_hd.config->queue_length_packets = 50;
557 conf_motion_hd.config->loss_percent = 3;
558 conf_motion_hd.config->queue_delay_ms = 100;
559 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200560 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700561}
562
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200563TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
564 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200565 test::ScopedFieldTrials field_trial(
566 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200567 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700568 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100569 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000570 true, 1280, 720, 50, 30000,
571 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200572 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700573 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
574 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200575 conf_motion_hd.config->queue_length_packets = 50;
576 conf_motion_hd.config->loss_percent = 3;
577 conf_motion_hd.config->queue_delay_ms = 100;
578 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200579 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700580}
581
jianj390e64d2017-02-03 09:51:23 -0800582#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200583TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
584 auto fixture = CreateVideoQualityTestFixture();
585 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800586 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100587 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000588 true, 1280, 720, 50, 30000,
589 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200590 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800591 conf_motion_hd.analyzer = {
592 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
593 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200594 conf_motion_hd.config->queue_length_packets = 32;
595 conf_motion_hd.config->queue_delay_ms = 100;
596 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200597 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800598}
599#endif
600
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200601TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200602 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200603 auto fixture = CreateVideoQualityTestFixture();
604 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700605 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200606 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
607 1000000, false, "VP8", 2, 1, 400000,
608 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100609 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700610 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
611 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200612 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200613}
614
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200615TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
616 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200617 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800618 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100619 screenshare.screenshare[0] = {true, false, 10};
620 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
621 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200622 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800623 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
624 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200625 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200626 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
627 1000000, false, "VP8", 3, 0, 400000,
628 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800629 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200630 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
631 1000000, false, "VP8", 2, 0, 400000,
632 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800633
634 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200635 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
636 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200637 screenshare.ss[0] = {
638 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
639 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200640 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800641}
642
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200643TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200644 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
645
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200646 auto fixture = CreateVideoQualityTestFixture();
647 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700648 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200649 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
650 1000000, false, "VP8", 2, 1, 400000,
651 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100652 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700653 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
654 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200655 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700656}
657
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200658TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200659 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
660
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200661 auto fixture = CreateVideoQualityTestFixture();
662 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700663 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200664 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
665 1000000, false, "VP8", 2, 1, 400000,
666 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100667 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700668 screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
669 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200670 screenshare.config->loss_percent = 5;
671 screenshare.config->queue_delay_ms = 200;
672 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200673 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800674}
675
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200676TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200677 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
678
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200679 auto fixture = CreateVideoQualityTestFixture();
680 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700681 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200682 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
683 1000000, false, "VP8", 2, 1, 400000,
684 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100685 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700686 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
687 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200688 screenshare.config->loss_percent = 10;
689 screenshare.config->queue_delay_ms = 200;
690 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200691 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800692}
693
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200694TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200695 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
696
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200697 auto fixture = CreateVideoQualityTestFixture();
698 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700699 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200700 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
701 1000000, false, "VP8", 2, 1, 400000,
702 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100703 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700704 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
705 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200706 screenshare.config->loss_percent = 5;
707 screenshare.config->link_capacity_kbps = 200;
708 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700709
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200710 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700711}
712
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200713TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200714 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
715
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200716 auto fixture = CreateVideoQualityTestFixture();
717 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700718 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200719 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
720 1000000, false, "VP8", 2, 1, 400000,
721 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100722 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700723 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
724 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200725 screenshare.config->loss_percent = 1;
726 screenshare.config->link_capacity_kbps = 1200;
727 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700728
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200729 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700730}
731
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200732const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000733 true, 1280, 720, 30, 800000,
734 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200735 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800736
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200737const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000738 true, 1280, 720, 30, 800000,
739 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200740 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800741
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200742const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000743 true, 640, 360, 30, 150000,
744 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200745 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800746
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200747const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000748 true, 320, 180, 30, 30000,
749 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200750 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800751
Peter Boström12996152016-05-14 02:03:18 +0200752#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200753TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
754 auto fixture = CreateVideoQualityTestFixture();
755 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700756 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100757 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
758 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200759 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100760 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700761 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
762 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200763 screenshare.ss[0] = {
764 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
765 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200766 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000767}
ilnik2a8c2f52017-02-15 02:23:28 -0800768
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200769TEST(FullStackTest, VP9SVC_3SL_High) {
770 auto fixture = CreateVideoQualityTestFixture();
771 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800772 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100773 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800774 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
775 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200776
Sergey Silkin57027362018-05-15 09:12:05 +0200777 simulcast.ss[0] = {
778 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
779 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200780 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800781}
782
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200783TEST(FullStackTest, VP9SVC_3SL_Medium) {
784 auto fixture = CreateVideoQualityTestFixture();
785 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800786 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100787 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800788 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
789 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200790 simulcast.ss[0] = {
791 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
792 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200793 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800794}
795
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200796TEST(FullStackTest, VP9SVC_3SL_Low) {
797 auto fixture = CreateVideoQualityTestFixture();
798 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800799 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100800 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800801 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200802 simulcast.ss[0] = {
803 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
804 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200805 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800806}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200807
Ilya Nikolaevskiy14ac7932018-07-12 10:39:41 +0200808// bugs.webrtc.org/9506
809#if !defined(WEBRTC_MAC)
810
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200811TEST(FullStackTest, VP9KSVC_3SL_High) {
812 auto fixture = CreateVideoQualityTestFixture();
813 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200814 simulcast.call.send_side_bwe = true;
815 simulcast.video[0] = kSvcVp9Video;
816 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
817 kFullStackTestDurationSecs};
818 simulcast.ss[0] = {
819 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
820 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200821 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200822}
823
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200824TEST(FullStackTest, VP9KSVC_3SL_Medium) {
825 auto fixture = CreateVideoQualityTestFixture();
826 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200827 simulcast.call.send_side_bwe = true;
828 simulcast.video[0] = kSvcVp9Video;
829 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
830 kFullStackTestDurationSecs};
831 simulcast.ss[0] = {
832 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
833 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200834 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200835}
836
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200837TEST(FullStackTest, VP9KSVC_3SL_Low) {
838 auto fixture = CreateVideoQualityTestFixture();
839 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200840 simulcast.call.send_side_bwe = true;
841 simulcast.video[0] = kSvcVp9Video;
842 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
843 kFullStackTestDurationSecs};
844 simulcast.ss[0] = {
845 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
846 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200847 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200848}
“Michael277a6562018-06-01 14:09:19 -0500849
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200850TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
851 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200852 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500853 simulcast.call.send_side_bwe = true;
854 simulcast.video[0] = kSvcVp9Video;
855 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
856 kFullStackTestDurationSecs};
857 simulcast.ss[0] = {
858 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
859 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200860 simulcast.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200861 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500862}
Ilya Nikolaevskiy14ac7932018-07-12 10:39:41 +0200863#endif // !defined(WEBRTC_MAC)
“Michael277a6562018-06-01 14:09:19 -0500864
Peter Boström12996152016-05-14 02:03:18 +0200865#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800866
ilnik6b826ef2017-06-16 06:53:48 -0700867// Android bots can't handle FullHD, so disable the test.
Sam Zackrissonc3d8bb12018-05-02 10:22:32 +0200868// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
869#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700870#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
871#else
872#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
873#endif
874
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200875TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
876 auto fixture = CreateVideoQualityTestFixture();
877 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700878 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100879 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
880 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200881 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700882 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
883 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200884 simulcast.config->loss_percent = 0;
885 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200886 std::vector<VideoStream> streams = {
887 VideoQualityTest::DefaultVideoStream(simulcast, 0),
888 VideoQualityTest::DefaultVideoStream(simulcast, 0),
889 VideoQualityTest::DefaultVideoStream(simulcast, 0)
890 };
Sergey Silkin57027362018-05-15 09:12:05 +0200891 simulcast.ss[0] = {
892 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
893 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200894 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
895 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200896 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700897}
898
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200899TEST(FullStackTest, SimulcastVP8_3SL_High) {
900 auto fixture = CreateVideoQualityTestFixture();
901 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800902 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100903 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800904 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800905 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200906 simulcast.config->loss_percent = 0;
907 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200908 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100909 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200910 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100911 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200912 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100913 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800914
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100915 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200916 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
917 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
918 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200919 simulcast.ss[0] = {
920 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
921 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200922 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800923}
924
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200925TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
926 auto fixture = CreateVideoQualityTestFixture();
927 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800928 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100929 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800930 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800931 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200932 simulcast.config->loss_percent = 0;
933 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200934 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100935 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200936 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100937 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200938 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100939 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800940
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100941 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200942 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
943 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
944 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200945 simulcast.ss[0] = {
946 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
947 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800949}
950
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200951TEST(FullStackTest, SimulcastVP8_3SL_Low) {
952 auto fixture = CreateVideoQualityTestFixture();
953 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800954 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100955 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800956 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800957 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200958 simulcast.config->loss_percent = 0;
959 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200960 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100961 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200962 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100963 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200964 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100965 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800966
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100967 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200968 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
969 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
970 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200971 simulcast.ss[0] = {
972 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
973 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200974 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800975}
976
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200977TEST(FullStackTest, LargeRoomVP8_5thumb) {
978 auto fixture = CreateVideoQualityTestFixture();
979 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800980 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100981 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800982 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
983 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200984 large_room.config->loss_percent = 0;
985 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200986 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100987 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200988 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100989 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200990 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100991 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -0800992
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100993 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200994 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
995 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
996 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -0700997 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +0200998 large_room.ss[0] = {
999 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1000 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001001 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001002}
1003
oprypin743117f2017-09-15 05:24:24 -07001004#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1005// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001006// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1007#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001008#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001009#else
1010#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001011#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001012#endif
1013
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001014TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1015 auto fixture = CreateVideoQualityTestFixture();
1016 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001017 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001018 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001019 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1020 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001021 large_room.config->loss_percent = 0;
1022 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001023 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001024 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001025 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001026 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001027 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001028 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001029
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001030 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001031 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1032 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1033 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001034 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001035 large_room.ss[0] = {
1036 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1037 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001038 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001039}
1040
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001041TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1042 auto fixture = CreateVideoQualityTestFixture();
1043 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001044 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001045 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001046 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1047 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001048 large_room.config->loss_percent = 0;
1049 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001050 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001051 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001052 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001053 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001054 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001055 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001056
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001057 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001058 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1059 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1060 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001061 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001062 large_room.ss[0] = {
1063 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1064 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001065 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001066}
1067
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001068class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001069
1070// Disable dual video test on mobile device becuase it's too heavy.
1071#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1072TEST_P(DualStreamsTest,
1073 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1074 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiy504edc02018-09-04 09:02:26 +00001075 AppendFieldTrials(std::string(kRoundRobinPacingQueueExperiment) +
1076 std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001077 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001078 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001079
1080 // Screenshare Settings.
1081 dual_streams.screenshare[first_stream] = {true, false, 10};
1082 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1083 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001084 2, 400000, false, false, false,
1085 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001086
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001087 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001088 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1089 1000000, false, "VP8", 3, 0, 400000,
1090 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001091 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001092 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1093 1000000, false, "VP8", 2, 0, 400000,
1094 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001095 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001096 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1097 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001098
Sergey Silkin57027362018-05-15 09:12:05 +02001099 dual_streams.ss[first_stream] = {
1100 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1101 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001102
1103 // Video settings.
1104 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1105
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001106 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001107 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001109 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001110 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001111 video_params_low.video[0] = kSimulcastVp8VideoLow;
1112 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001113 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1114 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1115 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001116
1117 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001118 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1119 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001120
1121 // Call settings.
1122 dual_streams.call.send_side_bwe = true;
1123 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001124 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1125 std::to_string(first_stream);
1126 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001127 dual_streams.config->loss_percent = 1;
1128 dual_streams.config->link_capacity_kbps = 7500;
1129 dual_streams.config->queue_length_packets = 30;
1130 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001131
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001132 auto fixture = CreateVideoQualityTestFixture();
1133 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001134}
1135#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1136
1137TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001138 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiy504edc02018-09-04 09:02:26 +00001139 AppendFieldTrials(std::string(kRoundRobinPacingQueueExperiment) +
1140 std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001141 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001142 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001143
1144 // Screenshare Settings.
1145 dual_streams.screenshare[first_stream] = {true, false, 10};
1146 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1147 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001148 2, 400000, false, false, false,
1149 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001150 // Video settings.
1151 dual_streams.video[1 - first_stream] = {
1152 true, 1280, 720, 30, 150000,
1153 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001154 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001155
1156 // Call settings.
1157 dual_streams.call.send_side_bwe = true;
1158 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001159 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1160 std::to_string(first_stream);
1161 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001162 dual_streams.config->loss_percent = 1;
1163 dual_streams.config->link_capacity_kbps = 5000;
1164 dual_streams.config->queue_length_packets = 30;
1165 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001166
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001167 auto fixture = CreateVideoQualityTestFixture();
1168 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001169}
1170
1171INSTANTIATE_TEST_CASE_P(FullStackTest,
1172 DualStreamsTest,
1173 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001174
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001175} // namespace webrtc