blob: 049df6f32e600c3c8833ec011bce32c30edf55ea [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) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200819 webrtc::test::ScopedFieldTrials override_trials(
820 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200821 auto fixture = CreateVideoQualityTestFixture();
822 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200823 simulcast.call.send_side_bwe = true;
824 simulcast.video[0] = kSvcVp9Video;
825 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
826 kFullStackTestDurationSecs};
827 simulcast.ss[0] = {
828 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
829 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200830 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200831}
832
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200833TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200834 webrtc::test::ScopedFieldTrials override_trials(
835 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200836 auto fixture = CreateVideoQualityTestFixture();
837 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200838 simulcast.call.send_side_bwe = true;
839 simulcast.video[0] = kSvcVp9Video;
840 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
841 kFullStackTestDurationSecs};
842 simulcast.ss[0] = {
843 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
844 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200845 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200846}
847
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200848TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200849 webrtc::test::ScopedFieldTrials override_trials(
850 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200851 auto fixture = CreateVideoQualityTestFixture();
852 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200853 simulcast.call.send_side_bwe = true;
854 simulcast.video[0] = kSvcVp9Video;
855 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
856 kFullStackTestDurationSecs};
857 simulcast.ss[0] = {
858 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
859 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200860 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200861}
“Michael277a6562018-06-01 14:09:19 -0500862
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200863TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200864 webrtc::test::ScopedFieldTrials override_trials(
865 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200866 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200867 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500868 simulcast.call.send_side_bwe = true;
869 simulcast.video[0] = kSvcVp9Video;
870 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
871 kFullStackTestDurationSecs};
872 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200873 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500874 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200875 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200876 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200877 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500878}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000879#endif // !defined(WEBRTC_MAC)
880
Peter Boström12996152016-05-14 02:03:18 +0200881#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800882
ilnik6b826ef2017-06-16 06:53:48 -0700883// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000884// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
885#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700886#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
887#else
888#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
889#endif
890
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200891TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
892 auto fixture = CreateVideoQualityTestFixture();
893 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700894 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100895 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
896 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200897 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700898 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
899 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200900 simulcast.config->loss_percent = 0;
901 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200902 std::vector<VideoStream> streams = {
903 VideoQualityTest::DefaultVideoStream(simulcast, 0),
904 VideoQualityTest::DefaultVideoStream(simulcast, 0),
905 VideoQualityTest::DefaultVideoStream(simulcast, 0)
906 };
Sergey Silkin57027362018-05-15 09:12:05 +0200907 simulcast.ss[0] = {
908 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
909 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200910 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
911 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200912 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700913}
914
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200915TEST(FullStackTest, SimulcastVP8_3SL_High) {
916 auto fixture = CreateVideoQualityTestFixture();
917 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800918 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100919 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800920 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800921 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200922 simulcast.config->loss_percent = 0;
923 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200924 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100925 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200926 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100927 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200928 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100929 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800930
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100931 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200932 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
933 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
934 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200935 simulcast.ss[0] = {
936 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
937 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200938 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800939}
940
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200941TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
942 auto fixture = CreateVideoQualityTestFixture();
943 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800944 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100945 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800946 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800947 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200948 simulcast.config->loss_percent = 0;
949 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200950 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100951 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200952 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100953 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200954 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100955 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800956
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100957 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200958 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
959 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
960 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200961 simulcast.ss[0] = {
962 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
963 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200964 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800965}
966
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200967TEST(FullStackTest, SimulcastVP8_3SL_Low) {
968 auto fixture = CreateVideoQualityTestFixture();
969 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800970 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100971 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800972 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800973 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200974 simulcast.config->loss_percent = 0;
975 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200976 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100977 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200978 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100979 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200980 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100981 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800982
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100983 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200984 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
985 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
986 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200987 simulcast.ss[0] = {
988 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
989 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200990 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800991}
992
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200993TEST(FullStackTest, LargeRoomVP8_5thumb) {
994 auto fixture = CreateVideoQualityTestFixture();
995 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800996 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100997 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800998 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
999 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001000 large_room.config->loss_percent = 0;
1001 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001002 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001003 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001004 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001005 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001006 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001007 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001008
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001009 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001010 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1011 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1012 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001013 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001014 large_room.ss[0] = {
1015 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1016 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001017 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001018}
1019
oprypin743117f2017-09-15 05:24:24 -07001020#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1021// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001022// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1023#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001024#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001025#else
1026#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001027#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001028#endif
1029
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001030TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1031 auto fixture = CreateVideoQualityTestFixture();
1032 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001033 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001034 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001035 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1036 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001037 large_room.config->loss_percent = 0;
1038 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001039 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001040 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001041 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001042 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001043 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001044 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001045
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001046 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001047 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1048 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1049 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001050 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001051 large_room.ss[0] = {
1052 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1053 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001054 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001055}
1056
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001057TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1058 auto fixture = CreateVideoQualityTestFixture();
1059 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001060 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001061 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001062 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1063 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001064 large_room.config->loss_percent = 0;
1065 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001066 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001067 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001068 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001069 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001070 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001071 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001072
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001073 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001074 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1075 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1076 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001077 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001078 large_room.ss[0] = {
1079 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1080 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001081 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001082}
1083
philipeldd8b0d82018-09-27 11:18:10 +02001084INSTANTIATE_TEST_CASE_P(FullStackTest,
1085 GenericDescriptorTest,
1086 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1087 "WebRTC-GenericDescriptor/Enabled/"));
1088
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001089class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001090
1091// Disable dual video test on mobile device becuase it's too heavy.
1092#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1093TEST_P(DualStreamsTest,
1094 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1095 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001096 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1097 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001098 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001099 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001100
1101 // Screenshare Settings.
1102 dual_streams.screenshare[first_stream] = {true, false, 10};
1103 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1104 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001105 2, 400000, false, false, false,
1106 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001107
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001109 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1110 1000000, false, "VP8", 3, 0, 400000,
1111 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001112 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001113 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1114 1000000, false, "VP8", 2, 0, 400000,
1115 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001116 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001117 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1118 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001119
Sergey Silkin57027362018-05-15 09:12:05 +02001120 dual_streams.ss[first_stream] = {
1121 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1122 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001123
1124 // Video settings.
1125 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1126
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001127 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001128 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001129 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001130 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001131 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001132 video_params_low.video[0] = kSimulcastVp8VideoLow;
1133 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001134 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1135 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1136 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001137
1138 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001139 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1140 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001141
1142 // Call settings.
1143 dual_streams.call.send_side_bwe = true;
1144 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001145 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1146 std::to_string(first_stream);
1147 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001148 dual_streams.config->loss_percent = 1;
1149 dual_streams.config->link_capacity_kbps = 7500;
1150 dual_streams.config->queue_length_packets = 30;
1151 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001152
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001153 auto fixture = CreateVideoQualityTestFixture();
1154 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001155}
1156#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1157
1158TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001159 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001160 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001161 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001162 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001163
1164 // Screenshare Settings.
1165 dual_streams.screenshare[first_stream] = {true, false, 10};
1166 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1167 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001168 2, 400000, false, false, false,
1169 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001170 // Video settings.
1171 dual_streams.video[1 - first_stream] = {
1172 true, 1280, 720, 30, 150000,
1173 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001174 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001175
1176 // Call settings.
1177 dual_streams.call.send_side_bwe = true;
1178 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001179 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1180 std::to_string(first_stream);
1181 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001182 dual_streams.config->loss_percent = 1;
1183 dual_streams.config->link_capacity_kbps = 5000;
1184 dual_streams.config->queue_length_packets = 30;
1185 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001186
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001187 auto fixture = CreateVideoQualityTestFixture();
1188 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001189}
1190
1191INSTANTIATE_TEST_CASE_P(FullStackTest,
1192 DualStreamsTest,
1193 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001194
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001195} // namespace webrtc