blob: 0f7fb34fafd1dabaf5ccf8b0ac6122025e296bd7 [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;
Erik Språngb65aa012018-09-24 11:35:19 +020049const char kScreenshareSimulcastExperiment[] =
50 "WebRTC-SimulcastScreenshare/Enabled/";
Patrik Höglundb6b29e02018-06-21 16:58:01 +020051const char kPacerPushBackExperiment[] =
52 "WebRTC-PacerPushbackExperiment/Enabled/";
philipel3f4a4fa2018-09-25 18:19:00 +020053const char kGenericDescriptorExperiment[] = "WebRTC-GenericDescriptor";
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.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020059 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
60 flags::EncodedFramePath()};
Artem Titovf18b3522018-08-28 16:54:24 +020061 this->config = DefaultNetworkSimulationConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000062 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000063};
64
Patrik Höglundb6b29e02018-06-21 16:58:01 +020065std::unique_ptr<VideoQualityTestFixtureInterface>
66CreateVideoQualityTestFixture() {
Karl Wiberg918f50c2018-07-05 11:40:33 +020067 return absl::make_unique<VideoQualityTest>(nullptr);
Patrik Höglundb6b29e02018-06-21 16:58:01 +020068}
69
Erik Språngb6b1cac2018-08-09 16:12:54 +020070// Takes the current active field trials set, and appends some new trials.
71std::string AppendFieldTrials(std::string new_trial_string) {
72 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
73}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020074} // namespace
75
sprangce4aef12015-11-02 07:23:20 -080076// VideoQualityTest::Params params = {
77// { ... }, // Common.
78// { ... }, // Video-specific settings.
79// { ... }, // Screenshare-specific settings.
80// { ... }, // Analyzer settings.
81// pipe, // FakeNetworkPipe::Config
82// { ... }, // Spatial scalability.
83// logs // bool
84// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000085
philipel3f4a4fa2018-09-25 18:19:00 +020086class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {};
87
Peter Boström12996152016-05-14 02:03:18 +020088#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +020089TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
90 auto fixture = CreateVideoQualityTestFixture();
91 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080092 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +010093 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
94 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +020095 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -080096 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
97 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +020098 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -080099}
100
philipel3f4a4fa2018-09-25 18:19:00 +0200101TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
102 test::ScopedFieldTrials field_trial(GetParam());
103 std::string test_name = "foreman_cif_delay_50_0_plr_5_VP9";
104 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
105 test_name += "_generic_descriptor";
106
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200107 auto fixture = CreateVideoQualityTestFixture();
108 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800109 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100110 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
111 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200112 0, 0, false, false, false, "foreman_cif"};
philipel3f4a4fa2018-09-25 18:19:00 +0200113 foreman_cif.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200114 foreman_cif.config->loss_percent = 5;
115 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200116 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800117}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800118
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700119TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
120 // Profile 2 might not be available on some platforms until
121 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
122 bool profile_2_is_supported = false;
123 for (const auto& codec : SupportedVP9Codecs()) {
124 if (ParseSdpForVP9Profile(codec.parameters)
125 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
126 profile_2_is_supported = true;
127 }
128 }
129 if (!profile_2_is_supported)
130 return;
131 auto fixture = CreateVideoQualityTestFixture();
132
133 SdpVideoFormat::Parameters vp92 = {
134 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
135 ParamsWithLogging generator;
136 generator.call.send_side_bwe = true;
137 generator.video[0] = {
138 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
139 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
140 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
141 kFullStackTestDurationSecs};
142 fixture->RunWithAnalyzer(generator);
143}
144
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200145TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
146 auto fixture = CreateVideoQualityTestFixture();
147 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800148 foreman_cif.call.send_side_bwe = true;
149 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
150 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200151 0, 0, false, false, false,
152 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800153 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
154 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200155 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800156}
157
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200158TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
159 auto fixture = CreateVideoQualityTestFixture();
160
161 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700162 generator.call.send_side_bwe = true;
163 generator.video[0] = {true, 352, 288, 30, 700000,
164 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200165 0, 0, false, false, false,
166 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700167 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
168 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200169 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800170}
171
Peter Boström12996152016-05-14 02:03:18 +0200172#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800173
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200174#if defined(WEBRTC_LINUX)
175// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
176#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
177#else
178#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
179#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200180TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
181 auto fixture = CreateVideoQualityTestFixture();
182 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700183 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100184 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
185 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200186 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700187 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
188 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200189 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000190}
191
philipel3f4a4fa2018-09-25 18:19:00 +0200192TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
193 test::ScopedFieldTrials field_trial(GetParam());
194 std::string test_name = "foreman_cif_net_delay_0_0_plr_0";
195 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
196 test_name += "_generic_descriptor";
197
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200198 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000199 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200200 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700201 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100202 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
203 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200204 0, 0, false, false, false, "foreman_cif"};
philipel3f4a4fa2018-09-25 18:19:00 +0200205 foreman_cif.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200206 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000207}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000208
philipel3f4a4fa2018-09-25 18:19:00 +0200209TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
210 test::ScopedFieldTrials field_trial(GetParam());
211 std::string test_name = "foreman_cif_30kbps_net_delay_0_0_plr_0";
212 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
213 test_name += "_generic_descriptor";
214
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200215 auto fixture = CreateVideoQualityTestFixture();
216 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800217 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100218 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
219 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200220 0, 0, false, false, false, "foreman_cif"};
philipel3f4a4fa2018-09-25 18:19:00 +0200221 foreman_cif.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200222 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800223}
224
Niels Möller6aa415e2018-06-07 11:14:13 +0200225// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200226TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
227 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200228 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200229 foreman_cif.call.send_side_bwe = true;
230 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
231 500000, 2000000, false, "VP8", 1,
232 0, 0, false, false, true, "foreman_cif"};
233 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
234 0.0, 0.0,
235 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200236 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200237 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200238}
239
philipel3f4a4fa2018-09-25 18:19:00 +0200240TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
241 test::ScopedFieldTrials field_trial(GetParam());
242 std::string test_name = "foreman_cif_delay_50_0_plr_5";
243 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
244 test_name += "_generic_descriptor";
245
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200246 auto fixture = CreateVideoQualityTestFixture();
247 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700248 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100249 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
250 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200251 0, 0, false, false, false, "foreman_cif"};
philipel3f4a4fa2018-09-25 18:19:00 +0200252 foreman_cif.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200253 foreman_cif.config->loss_percent = 5;
254 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200255 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000256}
257
philipel3f4a4fa2018-09-25 18:19:00 +0200258TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
259 test::ScopedFieldTrials field_trial(GetParam());
260 std::string test_name = "foreman_cif_delay_50_0_plr_5_ulpfec";
261 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
262 test_name += "_generic_descriptor";
263
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200264 auto fixture = CreateVideoQualityTestFixture();
265 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800266 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100267 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
268 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200269 0, 0, true, false, false, "foreman_cif"};
philipel3f4a4fa2018-09-25 18:19:00 +0200270 foreman_cif.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200271 foreman_cif.config->loss_percent = 5;
272 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200273 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800274}
275
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200276TEST(FullStackTest, ForemanCifPlr5Flexfec) {
277 auto fixture = CreateVideoQualityTestFixture();
278 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800279 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100280 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
281 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200282 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800283 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
284 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200285 foreman_cif.config->loss_percent = 5;
286 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200287 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800288}
289
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200290TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
291 auto fixture = CreateVideoQualityTestFixture();
292 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700293 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100294 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
295 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200296 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700297 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
298 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200299 foreman_cif.config->loss_percent = 3;
300 foreman_cif.config->link_capacity_kbps = 500;
301 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200302 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700303}
304
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200305TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
306 auto fixture = CreateVideoQualityTestFixture();
307 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700308 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100309 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
310 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200311 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700312 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
313 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200314 foreman_cif.config->loss_percent = 3;
315 foreman_cif.config->link_capacity_kbps = 500;
316 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200317 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700318}
319
brandtrdd369c62016-11-16 23:56:57 -0800320#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200321TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
322 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800323 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200324 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800325 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100326 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
327 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200328 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800329 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
330 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200331 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800332}
333
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200334TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
335 auto fixture = CreateVideoQualityTestFixture();
336 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800337 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100338 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
339 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200340 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800341 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
342 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200343 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800344}
345
philipel3f4a4fa2018-09-25 18:19:00 +0200346TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
347 test::ScopedFieldTrials field_trial(GetParam());
348 std::string test_name = "foreman_cif_delay_50_0_plr_5_H264";
349 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
350 test_name += "_generic_descriptor";
351
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200352 auto fixture = CreateVideoQualityTestFixture();
353 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800354 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100355 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
356 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200357 0, 0, false, false, false, "foreman_cif"};
philipel3f4a4fa2018-09-25 18:19:00 +0200358 foreman_cif.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200359 foreman_cif.config->loss_percent = 5;
360 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200361 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800362}
363
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200364TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
365 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100366 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200367 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100368
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200369 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100370 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100371 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
372 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200373 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100374 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
375 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200376 foreman_cif.config->loss_percent = 5;
377 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200378 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100379}
380
brandtrdd369c62016-11-16 23:56:57 -0800381// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200382TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
383 auto fixture = CreateVideoQualityTestFixture();
384 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800385 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100386 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
387 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200388 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800389 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
390 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200391 foreman_cif.config->loss_percent = 5;
392 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200393 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800394}
395
396// Ulpfec with H264 is an unsupported combination, so this test is only useful
397// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200398TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
399 auto fixture = CreateVideoQualityTestFixture();
400 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800401 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100402 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
403 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200404 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800405 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
406 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200407 foreman_cif.config->loss_percent = 5;
408 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200409 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800410}
411#endif // defined(WEBRTC_USE_H264)
412
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200413TEST(FullStackTest, ForemanCif500kbps) {
414 auto fixture = CreateVideoQualityTestFixture();
415 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700416 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100417 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
418 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200419 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700420 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
421 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200422 foreman_cif.config->queue_length_packets = 0;
423 foreman_cif.config->queue_delay_ms = 0;
424 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200425 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000426}
427
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200428TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
429 auto fixture = CreateVideoQualityTestFixture();
430 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700431 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100432 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
433 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200434 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700435 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
436 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200437 foreman_cif.config->queue_length_packets = 32;
438 foreman_cif.config->queue_delay_ms = 0;
439 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200440 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000441}
442
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200443TEST(FullStackTest, ForemanCif500kbps100ms) {
444 auto fixture = CreateVideoQualityTestFixture();
445 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700446 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100447 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
448 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200449 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700450 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
451 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200452 foreman_cif.config->queue_length_packets = 0;
453 foreman_cif.config->queue_delay_ms = 100;
454 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200455 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000456}
457
philipel3f4a4fa2018-09-25 18:19:00 +0200458TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
459 test::ScopedFieldTrials field_trial(GetParam());
460 std::string test_name = "foreman_cif_500kbps_100ms_32pkts_queue";
461 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
462 test_name += "_generic_descriptor";
463
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200464 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 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200469 0, 0, false, false, false, "foreman_cif"};
philipel3f4a4fa2018-09-25 18:19:00 +0200470 foreman_cif.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200471 foreman_cif.config->queue_length_packets = 32;
472 foreman_cif.config->queue_delay_ms = 100;
473 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200474 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700475}
476
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200477TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
478 auto fixture = CreateVideoQualityTestFixture();
479 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800480 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100481 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
482 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200483 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800484 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
485 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200486 foreman_cif.config->queue_length_packets = 32;
487 foreman_cif.config->queue_delay_ms = 100;
488 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200489 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000490}
491
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200492TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
493 auto fixture = CreateVideoQualityTestFixture();
494 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700495 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100496 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
497 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200498 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700499 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
500 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200501 foreman_cif.config->queue_length_packets = 32;
502 foreman_cif.config->queue_delay_ms = 100;
503 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200504 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000505}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000506
sprangff19d352017-09-06 07:14:02 -0700507// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200508TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
509 auto fixture = CreateVideoQualityTestFixture();
510 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700511 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100512 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000513 true, 1280, 720, 50, 30000,
514 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200515 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700516 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
517 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200518 conf_motion_hd.config->queue_length_packets = 32;
519 conf_motion_hd.config->queue_delay_ms = 100;
520 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200521 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700522}
523
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200524TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
525 auto fixture = CreateVideoQualityTestFixture();
526 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700527 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100528 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000529 true, 1280, 720, 50, 30000,
530 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200531 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700532 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
533 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200534 conf_motion_hd.config->queue_length_packets = 50;
535 conf_motion_hd.config->loss_percent = 3;
536 conf_motion_hd.config->queue_delay_ms = 100;
537 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200538 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700539}
540
philipel3f4a4fa2018-09-25 18:19:00 +0200541TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
542 test::ScopedFieldTrials field_trial(GetParam());
543 std::string test_name = "conference_motion_hd_2tl_moderate_limits";
544 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
545 test_name += "_generic_descriptor";
546
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200547 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", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200553 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipel3f4a4fa2018-09-25 18:19:00 +0200554 conf_motion_hd.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200555 conf_motion_hd.config->queue_length_packets = 50;
556 conf_motion_hd.config->loss_percent = 3;
557 conf_motion_hd.config->queue_delay_ms = 100;
558 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200559 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700560}
561
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200562TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
563 auto fixture = CreateVideoQualityTestFixture();
564 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700565 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100566 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000567 true, 1280, 720, 50, 30000,
568 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200569 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700570 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
571 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200572 conf_motion_hd.config->queue_length_packets = 50;
573 conf_motion_hd.config->loss_percent = 3;
574 conf_motion_hd.config->queue_delay_ms = 100;
575 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200576 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700577}
578
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200579TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
580 auto fixture = CreateVideoQualityTestFixture();
581 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700582 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100583 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000584 true, 1280, 720, 50, 30000,
585 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200586 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700587 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
588 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200589 conf_motion_hd.config->queue_length_packets = 50;
590 conf_motion_hd.config->loss_percent = 3;
591 conf_motion_hd.config->queue_delay_ms = 100;
592 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200593 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700594}
595
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200596TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
597 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200598 test::ScopedFieldTrials field_trial(
599 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200600 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700601 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100602 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000603 true, 1280, 720, 50, 30000,
604 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200605 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700606 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
607 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200608 conf_motion_hd.config->queue_length_packets = 50;
609 conf_motion_hd.config->loss_percent = 3;
610 conf_motion_hd.config->queue_delay_ms = 100;
611 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200612 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700613}
614
jianj390e64d2017-02-03 09:51:23 -0800615#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200616TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
617 auto fixture = CreateVideoQualityTestFixture();
618 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800619 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100620 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000621 true, 1280, 720, 50, 30000,
622 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200623 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800624 conf_motion_hd.analyzer = {
625 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
626 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200627 conf_motion_hd.config->queue_length_packets = 32;
628 conf_motion_hd.config->queue_delay_ms = 100;
629 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200630 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800631}
632#endif
633
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200634TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
635 auto fixture = CreateVideoQualityTestFixture();
636 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700637 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200638 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
639 1000000, false, "VP8", 2, 1, 400000,
640 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100641 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700642 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
643 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200644 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200645}
646
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200647TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
648 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb65aa012018-09-24 11:35:19 +0200649 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200650 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800651 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100652 screenshare.screenshare[0] = {true, false, 10};
653 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
654 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200655 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800656 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
657 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200658 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200659 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
660 1000000, false, "VP8", 3, 0, 400000,
661 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800662 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200663 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
664 1000000, false, "VP8", 2, 0, 400000,
665 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800666
667 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200668 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
669 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200670 screenshare.ss[0] = {
671 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
672 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200673 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800674}
675
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200676TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
677 auto fixture = CreateVideoQualityTestFixture();
678 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700679 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200680 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
681 1000000, false, "VP8", 2, 1, 400000,
682 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100683 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700684 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
685 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200686 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700687}
688
philipel3f4a4fa2018-09-25 18:19:00 +0200689TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
690 test::ScopedFieldTrials field_trial(GetParam());
691 std::string test_name = "screenshare_slides_lossy_net";
692 if (field_trial::IsEnabled(kGenericDescriptorExperiment))
693 test_name += "_generic_descriptor";
694
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200695 auto fixture = CreateVideoQualityTestFixture();
696 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700697 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200698 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
699 1000000, false, "VP8", 2, 1, 400000,
700 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100701 screenshare.screenshare[0] = {true, false, 10};
philipel3f4a4fa2018-09-25 18:19:00 +0200702 screenshare.analyzer = {test_name, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200703 screenshare.config->loss_percent = 5;
704 screenshare.config->queue_delay_ms = 200;
705 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200706 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800707}
708
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200709TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
710 auto fixture = CreateVideoQualityTestFixture();
711 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700712 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200713 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
714 1000000, false, "VP8", 2, 1, 400000,
715 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100716 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700717 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
718 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200719 screenshare.config->loss_percent = 10;
720 screenshare.config->queue_delay_ms = 200;
721 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200722 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800723}
724
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200725TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
726 auto fixture = CreateVideoQualityTestFixture();
727 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700728 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200729 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
730 1000000, false, "VP8", 2, 1, 400000,
731 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100732 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700733 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
734 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200735 screenshare.config->loss_percent = 5;
736 screenshare.config->link_capacity_kbps = 200;
737 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700738
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200739 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700740}
741
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200742TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
743 auto fixture = CreateVideoQualityTestFixture();
744 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700745 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200746 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
747 1000000, false, "VP8", 2, 1, 400000,
748 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100749 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700750 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
751 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200752 screenshare.config->loss_percent = 1;
753 screenshare.config->link_capacity_kbps = 1200;
754 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700755
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200756 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700757}
758
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200759const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000760 true, 1280, 720, 30, 800000,
761 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200762 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800763
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200764const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000765 true, 1280, 720, 30, 800000,
766 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200767 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800768
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200769const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000770 true, 640, 360, 30, 150000,
771 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200772 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800773
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200774const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000775 true, 320, 180, 30, 30000,
776 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200777 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800778
Peter Boström12996152016-05-14 02:03:18 +0200779#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200780TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
781 auto fixture = CreateVideoQualityTestFixture();
782 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700783 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100784 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
785 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200786 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100787 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700788 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
789 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200790 screenshare.ss[0] = {
791 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
792 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200793 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000794}
ilnik2a8c2f52017-02-15 02:23:28 -0800795
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200796TEST(FullStackTest, VP9SVC_3SL_High) {
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_high", 0.0, 0.0,
802 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200803
Sergey Silkin57027362018-05-15 09:12:05 +0200804 simulcast.ss[0] = {
805 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
806 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200807 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800808}
809
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200810TEST(FullStackTest, VP9SVC_3SL_Medium) {
811 auto fixture = CreateVideoQualityTestFixture();
812 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800813 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100814 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800815 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
816 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200817 simulcast.ss[0] = {
818 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
819 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200820 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800821}
822
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200823TEST(FullStackTest, VP9SVC_3SL_Low) {
824 auto fixture = CreateVideoQualityTestFixture();
825 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800826 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100827 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800828 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200829 simulcast.ss[0] = {
830 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
831 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200832 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800833}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200834
Sergey Silkin7f978f12018-09-10 12:01:49 +0000835// bugs.webrtc.org/9506
836#if !defined(WEBRTC_MAC)
837
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200838TEST(FullStackTest, VP9KSVC_3SL_High) {
839 auto fixture = CreateVideoQualityTestFixture();
840 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200841 simulcast.call.send_side_bwe = true;
842 simulcast.video[0] = kSvcVp9Video;
843 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
844 kFullStackTestDurationSecs};
845 simulcast.ss[0] = {
846 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
847 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200848 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200849}
850
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200851TEST(FullStackTest, VP9KSVC_3SL_Medium) {
852 auto fixture = CreateVideoQualityTestFixture();
853 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200854 simulcast.call.send_side_bwe = true;
855 simulcast.video[0] = kSvcVp9Video;
856 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
857 kFullStackTestDurationSecs};
858 simulcast.ss[0] = {
859 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
860 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200861 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200862}
863
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200864TEST(FullStackTest, VP9KSVC_3SL_Low) {
865 auto fixture = CreateVideoQualityTestFixture();
866 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200867 simulcast.call.send_side_bwe = true;
868 simulcast.video[0] = kSvcVp9Video;
869 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
870 kFullStackTestDurationSecs};
871 simulcast.ss[0] = {
872 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
873 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200874 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200875}
“Michael277a6562018-06-01 14:09:19 -0500876
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200877TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
878 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200879 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500880 simulcast.call.send_side_bwe = true;
881 simulcast.video[0] = kSvcVp9Video;
882 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
883 kFullStackTestDurationSecs};
884 simulcast.ss[0] = {
885 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
886 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200887 simulcast.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200888 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500889}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000890#endif // !defined(WEBRTC_MAC)
891
Peter Boström12996152016-05-14 02:03:18 +0200892#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800893
ilnik6b826ef2017-06-16 06:53:48 -0700894// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000895// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
896#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700897#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
898#else
899#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
900#endif
901
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200902TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
903 auto fixture = CreateVideoQualityTestFixture();
904 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700905 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100906 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
907 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200908 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700909 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
910 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200911 simulcast.config->loss_percent = 0;
912 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200913 std::vector<VideoStream> streams = {
914 VideoQualityTest::DefaultVideoStream(simulcast, 0),
915 VideoQualityTest::DefaultVideoStream(simulcast, 0),
916 VideoQualityTest::DefaultVideoStream(simulcast, 0)
917 };
Sergey Silkin57027362018-05-15 09:12:05 +0200918 simulcast.ss[0] = {
919 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
920 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200921 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
922 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200923 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700924}
925
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200926TEST(FullStackTest, SimulcastVP8_3SL_High) {
927 auto fixture = CreateVideoQualityTestFixture();
928 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800929 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100930 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800931 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800932 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200933 simulcast.config->loss_percent = 0;
934 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200935 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100936 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200937 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100938 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200939 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100940 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800941
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100942 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200943 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
944 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
945 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200946 simulcast.ss[0] = {
947 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
948 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200949 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800950}
951
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200952TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
953 auto fixture = CreateVideoQualityTestFixture();
954 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800955 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100956 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800957 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800958 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200959 simulcast.config->loss_percent = 0;
960 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200961 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100962 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200963 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100964 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200965 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100966 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800967
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100968 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200969 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
970 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
971 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200972 simulcast.ss[0] = {
973 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
974 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200975 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800976}
977
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200978TEST(FullStackTest, SimulcastVP8_3SL_Low) {
979 auto fixture = CreateVideoQualityTestFixture();
980 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800981 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100982 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800983 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800984 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200985 simulcast.config->loss_percent = 0;
986 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200987 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100988 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200989 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100990 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200991 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100992 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800993
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100994 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200995 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
996 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
997 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200998 simulcast.ss[0] = {
999 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1000 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001001 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001002}
1003
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001004TEST(FullStackTest, LargeRoomVP8_5thumb) {
1005 auto fixture = CreateVideoQualityTestFixture();
1006 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001007 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001008 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001009 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1010 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001011 large_room.config->loss_percent = 0;
1012 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001013 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001014 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001015 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001016 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001017 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001018 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001019
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001020 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001021 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1022 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1023 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001024 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001025 large_room.ss[0] = {
1026 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1027 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001028 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001029}
1030
oprypin743117f2017-09-15 05:24:24 -07001031#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1032// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001033// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1034#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001035#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001036#else
1037#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001038#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001039#endif
1040
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001041TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
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_15thumb", 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 = 15;
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 +02001068TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1069 auto fixture = CreateVideoQualityTestFixture();
1070 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001071 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001072 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001073 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1074 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001075 large_room.config->loss_percent = 0;
1076 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001077 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001078 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001079 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001080 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001081 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001082 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001083
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001084 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001085 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1086 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1087 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001088 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001089 large_room.ss[0] = {
1090 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1091 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001092 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001093}
1094
philipel3f4a4fa2018-09-25 18:19:00 +02001095INSTANTIATE_TEST_CASE_P(FullStackTest,
1096 GenericDescriptorTest,
1097 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1098 "WebRTC-GenericDescriptor/Enabled/"));
1099
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001100class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001101
1102// Disable dual video test on mobile device becuase it's too heavy.
1103#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1104TEST_P(DualStreamsTest,
1105 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1106 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001107 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1108 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001109 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001110 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001111
1112 // Screenshare Settings.
1113 dual_streams.screenshare[first_stream] = {true, false, 10};
1114 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1115 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001116 2, 400000, false, false, false,
1117 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001118
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001119 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001120 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1121 1000000, false, "VP8", 3, 0, 400000,
1122 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001123 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001124 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1125 1000000, false, "VP8", 2, 0, 400000,
1126 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001127 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001128 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1129 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001130
Sergey Silkin57027362018-05-15 09:12:05 +02001131 dual_streams.ss[first_stream] = {
1132 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1133 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001134
1135 // Video settings.
1136 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1137
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001138 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001139 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001140 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001141 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001142 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001143 video_params_low.video[0] = kSimulcastVp8VideoLow;
1144 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001145 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1146 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1147 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001148
1149 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001150 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1151 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001152
1153 // Call settings.
1154 dual_streams.call.send_side_bwe = true;
1155 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001156 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1157 std::to_string(first_stream);
1158 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001159 dual_streams.config->loss_percent = 1;
1160 dual_streams.config->link_capacity_kbps = 7500;
1161 dual_streams.config->queue_length_packets = 30;
1162 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001163
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001164 auto fixture = CreateVideoQualityTestFixture();
1165 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001166}
1167#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1168
1169TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001170 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001171 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001172 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001173 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001174
1175 // Screenshare Settings.
1176 dual_streams.screenshare[first_stream] = {true, false, 10};
1177 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1178 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001179 2, 400000, false, false, false,
1180 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001181 // Video settings.
1182 dual_streams.video[1 - first_stream] = {
1183 true, 1280, 720, 30, 150000,
1184 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001185 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001186
1187 // Call settings.
1188 dual_streams.call.send_side_bwe = true;
1189 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001190 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1191 std::to_string(first_stream);
1192 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001193 dual_streams.config->loss_percent = 1;
1194 dual_streams.config->link_capacity_kbps = 5000;
1195 dual_streams.config->queue_length_packets = 30;
1196 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001197
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001198 auto fixture = CreateVideoQualityTestFixture();
1199 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001200}
1201
1202INSTANTIATE_TEST_CASE_P(FullStackTest,
1203 DualStreamsTest,
1204 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001205
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001206} // namespace webrtc