blob: 5e3facde6ac5582c34dcba57876d68d5269b864b [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
Patrik Höglundd8f3c172018-09-26 14:39:17 +020012#include "api/test/test_dependency_factory.h"
Emircan Uysaler0823eec2018-07-13 17:10:00 -070013#include "media/base/vp9_profile.h"
14#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssoncabe3832018-01-12 10:54:18 +010015#include "rtc_base/experiments/alr_experiment.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020016#include "rtc_base/flags.h"
Mirko Bonadei17f48782018-09-28 08:51:10 +020017#include "system_wrappers/include/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020018#include "test/field_trial.h"
19#include "test/gtest.h"
20#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000021
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000022namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020023namespace flags {
24
Sebastian Janssonf8518882018-05-31 14:52:59 +020025DEFINE_string(rtc_event_log_name,
26 "",
27 "Filename for rtc event log. Two files "
28 "with \"_send\" and \"_recv\" suffixes will be created.");
29std::string RtcEventLogName() {
30 return static_cast<std::string>(FLAG_rtc_event_log_name);
31}
32DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream.");
33std::string RtpDumpName() {
34 return static_cast<std::string>(FLAG_rtp_dump_name);
35}
36DEFINE_string(encoded_frame_path,
37 "",
38 "The base path for encoded frame logs. Created files will have "
39 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
40std::string EncodedFramePath() {
41 return static_cast<std::string>(FLAG_encoded_frame_path);
42}
43} // namespace flags
44} // namespace webrtc
45
46namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000047
sprang89c4a7e2017-06-30 13:27:40 -070048namespace {
brandtrdd369c62016-11-16 23:56:57 -080049static const int kFullStackTestDurationSecs = 45;
Erik Språngb65aa012018-09-24 11:35:19 +020050const char kScreenshareSimulcastExperiment[] =
51 "WebRTC-SimulcastScreenshare/Enabled/";
Patrik Höglundb6b29e02018-06-21 16:58:01 +020052const char kPacerPushBackExperiment[] =
53 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000054
Patrik Höglundb6b29e02018-06-21 16:58:01 +020055struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000056 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020057 ParamsWithLogging() {
58 // Use these logging flags by default, for everything.
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() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020067 // The components will normally be nullptr (= use defaults), but it's possible
68 // for external test runners to override the list of injected components.
69 auto components = TestDependencyFactory::GetInstance().CreateComponents();
70 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020071}
72
Erik Språngb6b1cac2018-08-09 16:12:54 +020073// Takes the current active field trials set, and appends some new trials.
74std::string AppendFieldTrials(std::string new_trial_string) {
75 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
76}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020077} // namespace
78
sprangce4aef12015-11-02 07:23:20 -080079// VideoQualityTest::Params params = {
80// { ... }, // Common.
81// { ... }, // Video-specific settings.
82// { ... }, // Screenshare-specific settings.
83// { ... }, // Analyzer settings.
84// pipe, // FakeNetworkPipe::Config
85// { ... }, // Spatial scalability.
86// logs // bool
87// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000088
philipeldd8b0d82018-09-27 11:18:10 +020089class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
90 public:
91 GenericDescriptorTest() : field_trial_(GetParam()) {}
92
93 std::string GetTestName(std::string base) {
94 if (field_trial::IsEnabled("WebRTC-GenericDescriptor"))
95 base += "_generic_descriptor";
96 return base;
97 }
98
99 private:
100 test::ScopedFieldTrials field_trial_;
101};
102
Peter Boström12996152016-05-14 02:03:18 +0200103#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200104TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
105 auto fixture = CreateVideoQualityTestFixture();
106 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800107 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100108 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
109 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200110 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800111 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
112 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200113 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800114}
115
philipeldd8b0d82018-09-27 11:18:10 +0200116TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200117 auto fixture = CreateVideoQualityTestFixture();
118 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800119 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100120 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
121 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200122 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200123 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
124 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200125 foreman_cif.config->loss_percent = 5;
126 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200127 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800128}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800129
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700130TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
131 // Profile 2 might not be available on some platforms until
132 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
133 bool profile_2_is_supported = false;
134 for (const auto& codec : SupportedVP9Codecs()) {
135 if (ParseSdpForVP9Profile(codec.parameters)
136 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
137 profile_2_is_supported = true;
138 }
139 }
140 if (!profile_2_is_supported)
141 return;
142 auto fixture = CreateVideoQualityTestFixture();
143
144 SdpVideoFormat::Parameters vp92 = {
145 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
146 ParamsWithLogging generator;
147 generator.call.send_side_bwe = true;
148 generator.video[0] = {
149 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
150 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
151 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
152 kFullStackTestDurationSecs};
153 fixture->RunWithAnalyzer(generator);
154}
155
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200156TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
157 auto fixture = CreateVideoQualityTestFixture();
158 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800159 foreman_cif.call.send_side_bwe = true;
160 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
161 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200162 0, 0, false, false, false,
163 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800164 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
165 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200166 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800167}
168
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200169TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
170 auto fixture = CreateVideoQualityTestFixture();
171
172 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700173 generator.call.send_side_bwe = true;
174 generator.video[0] = {true, 352, 288, 30, 700000,
175 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200176 0, 0, false, false, false,
177 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700178 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
179 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200180 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800181}
182
Peter Boström12996152016-05-14 02:03:18 +0200183#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800184
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200185#if defined(WEBRTC_LINUX)
186// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
187#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
188#else
189#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
190#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200191TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
192 auto fixture = CreateVideoQualityTestFixture();
193 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700194 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100195 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
196 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200197 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700198 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
199 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200200 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000201}
202
philipeldd8b0d82018-09-27 11:18:10 +0200203TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200204 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000205 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200206 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700207 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100208 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
209 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200210 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200211 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
212 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200213 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000214}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000215
philipeldd8b0d82018-09-27 11:18:10 +0200216TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200217 auto fixture = CreateVideoQualityTestFixture();
218 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800219 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100220 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
221 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200222 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200223 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
224 0.0, 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200225 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800226}
227
Niels Möller6aa415e2018-06-07 11:14:13 +0200228// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200229TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
230 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200231 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200232 foreman_cif.call.send_side_bwe = true;
233 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
234 500000, 2000000, false, "VP8", 1,
235 0, 0, false, false, true, "foreman_cif"};
236 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
237 0.0, 0.0,
238 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200239 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200240 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200241}
242
philipeldd8b0d82018-09-27 11:18:10 +0200243TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200244 auto fixture = CreateVideoQualityTestFixture();
245 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700246 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100247 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
248 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200249 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200250 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000251 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200252 foreman_cif.config->loss_percent = 5;
253 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200254 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000255}
256
philipeldd8b0d82018-09-27 11:18:10 +0200257TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200258 auto fixture = CreateVideoQualityTestFixture();
259 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800260 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100261 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
262 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200263 0, 0, true, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200264 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
265 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200266 foreman_cif.config->loss_percent = 5;
267 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200268 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800269}
270
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200271TEST(FullStackTest, ForemanCifPlr5Flexfec) {
272 auto fixture = CreateVideoQualityTestFixture();
273 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800274 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100275 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
276 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200277 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800278 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
279 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200280 foreman_cif.config->loss_percent = 5;
281 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200282 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800283}
284
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200285TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
286 auto fixture = CreateVideoQualityTestFixture();
287 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700288 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100289 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
290 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200291 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700292 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
293 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200294 foreman_cif.config->loss_percent = 3;
295 foreman_cif.config->link_capacity_kbps = 500;
296 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200297 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700298}
299
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200300TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
301 auto fixture = CreateVideoQualityTestFixture();
302 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700303 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100304 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
305 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200306 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700307 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
308 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200309 foreman_cif.config->loss_percent = 3;
310 foreman_cif.config->link_capacity_kbps = 500;
311 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200312 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700313}
314
brandtrdd369c62016-11-16 23:56:57 -0800315#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200316TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
317 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800318 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200319 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800320 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100321 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
322 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200323 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800324 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
325 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200326 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800327}
328
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200329TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
330 auto fixture = CreateVideoQualityTestFixture();
331 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800332 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100333 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
334 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200335 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800336 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
337 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200338 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800339}
340
philipeldd8b0d82018-09-27 11:18:10 +0200341TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200342 auto fixture = CreateVideoQualityTestFixture();
343 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800344 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100345 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
346 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200347 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200348 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
349 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200350 foreman_cif.config->loss_percent = 5;
351 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200352 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800353}
354
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200355TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
356 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100357 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200358 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100359
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200360 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100361 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100362 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
363 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200364 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100365 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
366 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200367 foreman_cif.config->loss_percent = 5;
368 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200369 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100370}
371
brandtrdd369c62016-11-16 23:56:57 -0800372// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200373TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
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, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800380 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 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
387// Ulpfec with H264 is an unsupported combination, so this test is only useful
388// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200389TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
390 auto fixture = CreateVideoQualityTestFixture();
391 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800392 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100393 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
394 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200395 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800396 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
397 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200398 foreman_cif.config->loss_percent = 5;
399 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200400 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800401}
402#endif // defined(WEBRTC_USE_H264)
403
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200404TEST(FullStackTest, ForemanCif500kbps) {
405 auto fixture = CreateVideoQualityTestFixture();
406 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700407 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100408 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
409 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200410 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700411 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
412 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200413 foreman_cif.config->queue_length_packets = 0;
414 foreman_cif.config->queue_delay_ms = 0;
415 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200416 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000417}
418
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200419TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
420 auto fixture = CreateVideoQualityTestFixture();
421 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700422 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100423 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
424 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200425 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700426 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
427 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200428 foreman_cif.config->queue_length_packets = 32;
429 foreman_cif.config->queue_delay_ms = 0;
430 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200431 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000432}
433
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200434TEST(FullStackTest, ForemanCif500kbps100ms) {
435 auto fixture = CreateVideoQualityTestFixture();
436 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700437 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100438 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
439 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200440 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700441 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
442 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200443 foreman_cif.config->queue_length_packets = 0;
444 foreman_cif.config->queue_delay_ms = 100;
445 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200446 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000447}
448
philipeldd8b0d82018-09-27 11:18:10 +0200449TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200450 auto fixture = CreateVideoQualityTestFixture();
451 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700452 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100453 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
454 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200455 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200456 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
457 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200458 foreman_cif.config->queue_length_packets = 32;
459 foreman_cif.config->queue_delay_ms = 100;
460 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200461 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700462}
463
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200464TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
465 auto fixture = CreateVideoQualityTestFixture();
466 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800467 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100468 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
469 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200470 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800471 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
472 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200473 foreman_cif.config->queue_length_packets = 32;
474 foreman_cif.config->queue_delay_ms = 100;
475 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200476 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000477}
478
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200479TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
480 auto fixture = CreateVideoQualityTestFixture();
481 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700482 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100483 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
484 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200485 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700486 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
487 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200488 foreman_cif.config->queue_length_packets = 32;
489 foreman_cif.config->queue_delay_ms = 100;
490 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200491 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000492}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000493
sprangff19d352017-09-06 07:14:02 -0700494// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200495TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
496 auto fixture = CreateVideoQualityTestFixture();
497 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47: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 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700503 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
504 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200505 conf_motion_hd.config->queue_length_packets = 32;
506 conf_motion_hd.config->queue_delay_ms = 100;
507 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200508 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700509}
510
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200511TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
512 auto fixture = CreateVideoQualityTestFixture();
513 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700514 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100515 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000516 true, 1280, 720, 50, 30000,
517 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200518 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700519 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
520 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200521 conf_motion_hd.config->queue_length_packets = 50;
522 conf_motion_hd.config->loss_percent = 3;
523 conf_motion_hd.config->queue_delay_ms = 100;
524 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200525 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700526}
527
philipeldd8b0d82018-09-27 11:18:10 +0200528TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200529 auto fixture = CreateVideoQualityTestFixture();
530 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700531 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100532 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000533 true, 1280, 720, 50, 30000,
534 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200535 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200536 conf_motion_hd.analyzer = {
537 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
538 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, ConferenceMotionHd3TLModerateLimits) {
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", 3,
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_3tl_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, ConferenceMotionHd4TLModerateLimits) {
564 auto fixture = CreateVideoQualityTestFixture();
565 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700566 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100567 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000568 true, 1280, 720, 50, 30000,
569 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200570 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700571 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
572 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200573 conf_motion_hd.config->queue_length_packets = 50;
574 conf_motion_hd.config->loss_percent = 3;
575 conf_motion_hd.config->queue_delay_ms = 100;
576 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200577 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700578}
579
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200580TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
581 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200582 test::ScopedFieldTrials field_trial(
583 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200584 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700585 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100586 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000587 true, 1280, 720, 50, 30000,
588 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200589 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700590 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
591 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200592 conf_motion_hd.config->queue_length_packets = 50;
593 conf_motion_hd.config->loss_percent = 3;
594 conf_motion_hd.config->queue_delay_ms = 100;
595 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200596 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700597}
598
jianj390e64d2017-02-03 09:51:23 -0800599#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200600TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
601 auto fixture = CreateVideoQualityTestFixture();
602 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800603 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100604 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000605 true, 1280, 720, 50, 30000,
606 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200607 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800608 conf_motion_hd.analyzer = {
609 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
610 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200611 conf_motion_hd.config->queue_length_packets = 32;
612 conf_motion_hd.config->queue_delay_ms = 100;
613 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200614 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800615}
616#endif
617
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200618TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
619 auto fixture = CreateVideoQualityTestFixture();
620 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700621 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200622 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
623 1000000, false, "VP8", 2, 1, 400000,
624 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100625 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700626 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
627 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200628 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200629}
630
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200631TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
632 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb65aa012018-09-24 11:35:19 +0200633 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200634 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800635 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100636 screenshare.screenshare[0] = {true, false, 10};
637 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
638 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200639 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800640 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
641 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200642 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200643 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
644 1000000, false, "VP8", 3, 0, 400000,
645 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800646 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200647 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
648 1000000, false, "VP8", 2, 0, 400000,
649 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800650
651 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200652 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
653 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200654 screenshare.ss[0] = {
655 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
656 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200657 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800658}
659
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200660TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
661 auto fixture = CreateVideoQualityTestFixture();
662 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700663 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200664 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
665 1000000, false, "VP8", 2, 1, 400000,
666 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100667 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700668 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
669 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200670 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700671}
672
philipeldd8b0d82018-09-27 11:18:10 +0200673TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200674 auto fixture = CreateVideoQualityTestFixture();
675 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700676 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200677 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
678 1000000, false, "VP8", 2, 1, 400000,
679 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100680 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200681 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000682 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200683 screenshare.config->loss_percent = 5;
684 screenshare.config->queue_delay_ms = 200;
685 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200686 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800687}
688
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200689TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
690 auto fixture = CreateVideoQualityTestFixture();
691 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700692 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200693 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
694 1000000, false, "VP8", 2, 1, 400000,
695 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100696 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700697 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
698 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200699 screenshare.config->loss_percent = 10;
700 screenshare.config->queue_delay_ms = 200;
701 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200702 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800703}
704
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200705TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
706 auto fixture = CreateVideoQualityTestFixture();
707 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700708 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200709 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
710 1000000, false, "VP8", 2, 1, 400000,
711 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100712 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700713 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
714 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200715 screenshare.config->loss_percent = 5;
716 screenshare.config->link_capacity_kbps = 200;
717 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700718
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200719 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700720}
721
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200722TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
723 auto fixture = CreateVideoQualityTestFixture();
724 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700725 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200726 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
727 1000000, false, "VP8", 2, 1, 400000,
728 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100729 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700730 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
731 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200732 screenshare.config->loss_percent = 1;
733 screenshare.config->link_capacity_kbps = 1200;
734 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700735
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200736 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700737}
738
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200739const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000740 true, 1280, 720, 30, 800000,
741 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200742 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800743
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200744const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000745 true, 1280, 720, 30, 800000,
746 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200747 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800748
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200749const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000750 true, 640, 360, 30, 150000,
751 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200752 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800753
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200754const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000755 true, 320, 180, 30, 30000,
756 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200757 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800758
Peter Boström12996152016-05-14 02:03:18 +0200759#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200760TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
761 auto fixture = CreateVideoQualityTestFixture();
762 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700763 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100764 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
765 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200766 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100767 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700768 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
769 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200770 screenshare.ss[0] = {
771 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
772 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200773 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000774}
ilnik2a8c2f52017-02-15 02:23:28 -0800775
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200776TEST(FullStackTest, VP9SVC_3SL_High) {
777 auto fixture = CreateVideoQualityTestFixture();
778 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800779 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100780 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800781 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
782 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200783
Sergey Silkin57027362018-05-15 09:12:05 +0200784 simulcast.ss[0] = {
785 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
786 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200787 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800788}
789
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200790TEST(FullStackTest, VP9SVC_3SL_Medium) {
791 auto fixture = CreateVideoQualityTestFixture();
792 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800793 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100794 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800795 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
796 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200797 simulcast.ss[0] = {
798 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
799 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200800 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800801}
802
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200803TEST(FullStackTest, VP9SVC_3SL_Low) {
804 auto fixture = CreateVideoQualityTestFixture();
805 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800806 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100807 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800808 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200809 simulcast.ss[0] = {
810 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
811 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200812 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800813}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200814
Sergey Silkin7f978f12018-09-10 12:01:49 +0000815// bugs.webrtc.org/9506
816#if !defined(WEBRTC_MAC)
817
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200818TEST(FullStackTest, VP9KSVC_3SL_High) {
819 auto fixture = CreateVideoQualityTestFixture();
820 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200821 simulcast.call.send_side_bwe = true;
822 simulcast.video[0] = kSvcVp9Video;
823 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
824 kFullStackTestDurationSecs};
825 simulcast.ss[0] = {
826 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
827 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200828 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200829}
830
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200831TEST(FullStackTest, VP9KSVC_3SL_Medium) {
832 auto fixture = CreateVideoQualityTestFixture();
833 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200834 simulcast.call.send_side_bwe = true;
835 simulcast.video[0] = kSvcVp9Video;
836 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
837 kFullStackTestDurationSecs};
838 simulcast.ss[0] = {
839 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
840 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200841 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200842}
843
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200844TEST(FullStackTest, VP9KSVC_3SL_Low) {
845 auto fixture = CreateVideoQualityTestFixture();
846 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200847 simulcast.call.send_side_bwe = true;
848 simulcast.video[0] = kSvcVp9Video;
849 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
850 kFullStackTestDurationSecs};
851 simulcast.ss[0] = {
852 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
853 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200854 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200855}
“Michael277a6562018-06-01 14:09:19 -0500856
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200857TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
858 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200859 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500860 simulcast.call.send_side_bwe = true;
861 simulcast.video[0] = kSvcVp9Video;
862 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
863 kFullStackTestDurationSecs};
864 simulcast.ss[0] = {
865 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
866 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200867 simulcast.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200868 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500869}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000870#endif // !defined(WEBRTC_MAC)
871
Peter Boström12996152016-05-14 02:03:18 +0200872#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800873
ilnik6b826ef2017-06-16 06:53:48 -0700874// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000875// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
876#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700877#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
878#else
879#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
880#endif
881
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200882TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
883 auto fixture = CreateVideoQualityTestFixture();
884 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700885 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100886 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
887 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200888 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700889 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
890 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200891 simulcast.config->loss_percent = 0;
892 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200893 std::vector<VideoStream> streams = {
894 VideoQualityTest::DefaultVideoStream(simulcast, 0),
895 VideoQualityTest::DefaultVideoStream(simulcast, 0),
896 VideoQualityTest::DefaultVideoStream(simulcast, 0)
897 };
Sergey Silkin57027362018-05-15 09:12:05 +0200898 simulcast.ss[0] = {
899 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
900 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200901 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
902 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200903 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700904}
905
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200906TEST(FullStackTest, SimulcastVP8_3SL_High) {
907 auto fixture = CreateVideoQualityTestFixture();
908 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800909 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100910 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800911 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800912 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200913 simulcast.config->loss_percent = 0;
914 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200915 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100916 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200917 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100918 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200919 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100920 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800921
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100922 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200923 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
924 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
925 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200926 simulcast.ss[0] = {
927 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
928 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200929 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800930}
931
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200932TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
933 auto fixture = CreateVideoQualityTestFixture();
934 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800935 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100936 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800937 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800938 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200939 simulcast.config->loss_percent = 0;
940 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200941 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100942 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200943 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100944 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200945 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100946 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800947
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100948 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200949 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
950 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
951 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200952 simulcast.ss[0] = {
953 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
954 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200955 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800956}
957
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200958TEST(FullStackTest, SimulcastVP8_3SL_Low) {
959 auto fixture = CreateVideoQualityTestFixture();
960 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800961 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100962 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800963 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800964 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200965 simulcast.config->loss_percent = 0;
966 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200967 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100968 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200969 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100970 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200971 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100972 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800973
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100974 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200975 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
976 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
977 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200978 simulcast.ss[0] = {
979 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
980 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200981 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800982}
983
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200984TEST(FullStackTest, LargeRoomVP8_5thumb) {
985 auto fixture = CreateVideoQualityTestFixture();
986 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800987 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100988 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800989 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
990 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200991 large_room.config->loss_percent = 0;
992 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200993 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100994 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200995 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100996 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200997 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100998 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -0800999
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001000 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001001 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1002 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1003 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001004 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001005 large_room.ss[0] = {
1006 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1007 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001008 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001009}
1010
oprypin743117f2017-09-15 05:24:24 -07001011#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1012// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001013// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1014#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001015#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001016#else
1017#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001018#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001019#endif
1020
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001021TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1022 auto fixture = CreateVideoQualityTestFixture();
1023 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001024 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001025 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001026 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1027 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001028 large_room.config->loss_percent = 0;
1029 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001030 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001031 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001032 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001033 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001034 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001035 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001036
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001037 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001038 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1039 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1040 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001041 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001042 large_room.ss[0] = {
1043 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1044 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001045 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001046}
1047
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001048TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1049 auto fixture = CreateVideoQualityTestFixture();
1050 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001051 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001052 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001053 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1054 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001055 large_room.config->loss_percent = 0;
1056 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001057 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001058 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001059 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001060 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001061 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001062 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001063
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001064 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001065 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1066 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1067 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001068 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001069 large_room.ss[0] = {
1070 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1071 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001072 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001073}
1074
philipeldd8b0d82018-09-27 11:18:10 +02001075INSTANTIATE_TEST_CASE_P(FullStackTest,
1076 GenericDescriptorTest,
1077 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1078 "WebRTC-GenericDescriptor/Enabled/"));
1079
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001080class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001081
1082// Disable dual video test on mobile device becuase it's too heavy.
1083#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1084TEST_P(DualStreamsTest,
1085 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1086 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001087 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1088 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001089 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001090 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001091
1092 // Screenshare Settings.
1093 dual_streams.screenshare[first_stream] = {true, false, 10};
1094 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1095 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001096 2, 400000, false, false, false,
1097 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001098
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001099 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001100 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1101 1000000, false, "VP8", 3, 0, 400000,
1102 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001103 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001104 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1105 1000000, false, "VP8", 2, 0, 400000,
1106 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001107 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1109 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001110
Sergey Silkin57027362018-05-15 09:12:05 +02001111 dual_streams.ss[first_stream] = {
1112 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1113 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001114
1115 // Video settings.
1116 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1117
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001118 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001119 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001120 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001121 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001122 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001123 video_params_low.video[0] = kSimulcastVp8VideoLow;
1124 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001125 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1126 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1127 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001128
1129 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001130 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1131 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001132
1133 // Call settings.
1134 dual_streams.call.send_side_bwe = true;
1135 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001136 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1137 std::to_string(first_stream);
1138 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001139 dual_streams.config->loss_percent = 1;
1140 dual_streams.config->link_capacity_kbps = 7500;
1141 dual_streams.config->queue_length_packets = 30;
1142 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001143
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001144 auto fixture = CreateVideoQualityTestFixture();
1145 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001146}
1147#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1148
1149TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001150 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001151 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001152 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001153 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001154
1155 // Screenshare Settings.
1156 dual_streams.screenshare[first_stream] = {true, false, 10};
1157 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1158 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001159 2, 400000, false, false, false,
1160 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001161 // Video settings.
1162 dual_streams.video[1 - first_stream] = {
1163 true, 1280, 720, 30, 150000,
1164 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001165 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001166
1167 // Call settings.
1168 dual_streams.call.send_side_bwe = true;
1169 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001170 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1171 std::to_string(first_stream);
1172 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001173 dual_streams.config->loss_percent = 1;
1174 dual_streams.config->link_capacity_kbps = 5000;
1175 dual_streams.config->queue_length_packets = 30;
1176 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001177
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001178 auto fixture = CreateVideoQualityTestFixture();
1179 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001180}
1181
1182INSTANTIATE_TEST_CASE_P(FullStackTest,
1183 DualStreamsTest,
1184 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001185
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001186} // namespace webrtc