blob: 0980fe42836eefc521cf5e7858716576494d9c43 [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;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020050const char kPacerPushBackExperiment[] =
51 "WebRTC-PacerPushbackExperiment/Enabled/";
Erik Språng3e335d12018-10-11 10:35:49 +020052const char kVp8TrustedRateControllerFieldTrial[] =
53 "WebRTC-Vp8TrustedRateController/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 Titov75e36472018-10-08 12:28:56 +020061 this->config = BuiltInNetworkBehaviorConfig();
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:
philipelf638bbc2018-10-04 16:57:12 +020091 GenericDescriptorTest()
92 : field_trial_(GetParam()),
93 generic_descriptor_enabled_(
94 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +020095
96 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +020097 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +020098 base += "_generic_descriptor";
99 return base;
100 }
101
philipelf638bbc2018-10-04 16:57:12 +0200102 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
103
philipeldd8b0d82018-09-27 11:18:10 +0200104 private:
105 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200106 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200107};
108
Peter Boström12996152016-05-14 02:03:18 +0200109#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200110TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
111 auto fixture = CreateVideoQualityTestFixture();
112 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800113 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100114 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
115 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200116 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800117 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
118 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200119 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800120}
121
philipeldd8b0d82018-09-27 11:18:10 +0200122TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200123 auto fixture = CreateVideoQualityTestFixture();
124 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800125 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100126 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
127 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200128 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200129 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
130 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200131 foreman_cif.config->loss_percent = 5;
132 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200133 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200134 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800135}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800136
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700137TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
138 // Profile 2 might not be available on some platforms until
139 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
140 bool profile_2_is_supported = false;
141 for (const auto& codec : SupportedVP9Codecs()) {
142 if (ParseSdpForVP9Profile(codec.parameters)
143 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
144 profile_2_is_supported = true;
145 }
146 }
147 if (!profile_2_is_supported)
148 return;
149 auto fixture = CreateVideoQualityTestFixture();
150
151 SdpVideoFormat::Parameters vp92 = {
152 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
153 ParamsWithLogging generator;
154 generator.call.send_side_bwe = true;
155 generator.video[0] = {
156 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
157 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
158 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
159 kFullStackTestDurationSecs};
160 fixture->RunWithAnalyzer(generator);
161}
162
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200163TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
164 auto fixture = CreateVideoQualityTestFixture();
165 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800166 foreman_cif.call.send_side_bwe = true;
167 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
168 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200169 0, 0, false, false, false,
170 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800171 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
172 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200173 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800174}
175
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200176TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
177 auto fixture = CreateVideoQualityTestFixture();
178
179 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700180 generator.call.send_side_bwe = true;
181 generator.video[0] = {true, 352, 288, 30, 700000,
182 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200183 0, 0, false, false, false,
184 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700185 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
186 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200187 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800188}
189
Peter Boström12996152016-05-14 02:03:18 +0200190#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800191
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200192#if defined(WEBRTC_LINUX)
193// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
194#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
195#else
196#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
197#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200198TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
199 auto fixture = CreateVideoQualityTestFixture();
200 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700201 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100202 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
203 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200204 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700205 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
206 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200207 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000208}
209
philipeldd8b0d82018-09-27 11:18:10 +0200210TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200211 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000212 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200213 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700214 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100215 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
216 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200217 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200218 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
219 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200220 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200221 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000222}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000223
philipeldd8b0d82018-09-27 11:18:10 +0200224TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200225 auto fixture = CreateVideoQualityTestFixture();
226 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800227 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100228 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
229 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200230 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200231 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
232 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200233 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200234 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800235}
236
Erik Språng3e335d12018-10-11 10:35:49 +0200237// TODO(webrtc:9722): Remove when experiment is cleaned up.
238TEST_P(GenericDescriptorTest,
239 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
240 test::ScopedFieldTrials override_field_trials(
241 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
242 auto fixture = CreateVideoQualityTestFixture();
243
244 ParamsWithLogging foreman_cif;
245 foreman_cif.call.send_side_bwe = true;
246 foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000,
247 false, "VP8", 1, 0, 0, false, false,
248 false, "foreman_cif"};
249 foreman_cif.analyzer = {
250 GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"),
251 0.0, 0.0, kFullStackTestDurationSecs};
252 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
253 fixture->RunWithAnalyzer(foreman_cif);
254}
255
Niels Möller6aa415e2018-06-07 11:14:13 +0200256// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200257TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
258 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200259 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200260 foreman_cif.call.send_side_bwe = true;
261 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
262 500000, 2000000, false, "VP8", 1,
263 0, 0, false, false, true, "foreman_cif"};
264 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
265 0.0, 0.0,
266 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200267 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200268 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200269}
270
philipeldd8b0d82018-09-27 11:18:10 +0200271TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200272 auto fixture = CreateVideoQualityTestFixture();
273 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700274 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, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200278 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000279 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200280 foreman_cif.config->loss_percent = 5;
281 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200282 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200283 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000284}
285
philipeldd8b0d82018-09-27 11:18:10 +0200286TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200287 auto fixture = CreateVideoQualityTestFixture();
288 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800289 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100290 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
291 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200292 0, 0, true, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200293 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
294 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200295 foreman_cif.config->loss_percent = 5;
296 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200297 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200298 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800299}
300
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200301TEST(FullStackTest, ForemanCifPlr5Flexfec) {
302 auto fixture = CreateVideoQualityTestFixture();
303 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800304 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100305 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
306 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200307 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800308 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
309 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200310 foreman_cif.config->loss_percent = 5;
311 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200312 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800313}
314
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200315TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
316 auto fixture = CreateVideoQualityTestFixture();
317 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700318 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100319 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
320 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200321 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700322 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
323 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200324 foreman_cif.config->loss_percent = 3;
325 foreman_cif.config->link_capacity_kbps = 500;
326 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200327 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700328}
329
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200330TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
331 auto fixture = CreateVideoQualityTestFixture();
332 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700333 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100334 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
335 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200336 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700337 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
338 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200339 foreman_cif.config->loss_percent = 3;
340 foreman_cif.config->link_capacity_kbps = 500;
341 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200342 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700343}
344
brandtrdd369c62016-11-16 23:56:57 -0800345#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200346TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
347 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800348 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200349 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800350 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100351 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
352 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200353 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800354 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
355 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200356 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800357}
358
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200359TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
360 auto fixture = CreateVideoQualityTestFixture();
361 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800362 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100363 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
364 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200365 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800366 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
367 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200368 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800369}
370
philipeldd8b0d82018-09-27 11:18:10 +0200371TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200372 auto fixture = CreateVideoQualityTestFixture();
373 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800374 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100375 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
376 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200377 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200378 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
379 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200380 foreman_cif.config->loss_percent = 5;
381 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200382 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200383 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800384}
385
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200386TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100387 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200388 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språng3e335d12018-10-11 10:35:49 +0200389 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100390
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200391 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100392 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, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100396 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
397 0.0, 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);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100401}
402
brandtrdd369c62016-11-16 23:56:57 -0800403// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200404TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
405 auto fixture = CreateVideoQualityTestFixture();
406 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800407 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, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200410 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800411 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
412 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200413 foreman_cif.config->loss_percent = 5;
414 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200415 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800416}
417
418// Ulpfec with H264 is an unsupported combination, so this test is only useful
419// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200420TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
421 auto fixture = CreateVideoQualityTestFixture();
422 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800423 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100424 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
425 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200426 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800427 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
428 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200429 foreman_cif.config->loss_percent = 5;
430 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200431 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800432}
433#endif // defined(WEBRTC_USE_H264)
434
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200435TEST(FullStackTest, ForemanCif500kbps) {
436 auto fixture = CreateVideoQualityTestFixture();
437 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700438 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100439 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
440 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200441 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700442 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
443 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200444 foreman_cif.config->queue_length_packets = 0;
445 foreman_cif.config->queue_delay_ms = 0;
446 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200447 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000448}
449
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200450TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
451 auto fixture = CreateVideoQualityTestFixture();
452 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700453 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100454 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
455 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200456 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700457 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
458 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200459 foreman_cif.config->queue_length_packets = 32;
460 foreman_cif.config->queue_delay_ms = 0;
461 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200462 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000463}
464
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200465TEST(FullStackTest, ForemanCif500kbps100ms) {
466 auto fixture = CreateVideoQualityTestFixture();
467 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700468 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100469 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
470 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200471 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700472 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
473 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200474 foreman_cif.config->queue_length_packets = 0;
475 foreman_cif.config->queue_delay_ms = 100;
476 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200477 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000478}
479
philipeldd8b0d82018-09-27 11:18:10 +0200480TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200481 auto fixture = CreateVideoQualityTestFixture();
482 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700483 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100484 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
485 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200486 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200487 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
488 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200489 foreman_cif.config->queue_length_packets = 32;
490 foreman_cif.config->queue_delay_ms = 100;
491 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200492 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200493 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700494}
495
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200496TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
497 auto fixture = CreateVideoQualityTestFixture();
498 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800499 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100500 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
501 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200502 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800503 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
504 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200505 foreman_cif.config->queue_length_packets = 32;
506 foreman_cif.config->queue_delay_ms = 100;
507 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200508 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000509}
510
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200511TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
512 auto fixture = CreateVideoQualityTestFixture();
513 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700514 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100515 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
516 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200517 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700518 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
519 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200520 foreman_cif.config->queue_length_packets = 32;
521 foreman_cif.config->queue_delay_ms = 100;
522 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200523 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000524}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000525
sprangff19d352017-09-06 07:14:02 -0700526// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200527TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
528 auto fixture = CreateVideoQualityTestFixture();
529 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700530 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100531 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000532 true, 1280, 720, 50, 30000,
533 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200534 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700535 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
536 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200537 conf_motion_hd.config->queue_length_packets = 32;
538 conf_motion_hd.config->queue_delay_ms = 100;
539 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200540 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700541}
542
Erik Språng3e335d12018-10-11 10:35:49 +0200543// TODO(webrtc:9722): Remove when experiment is cleaned up.
544TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
545 test::ScopedFieldTrials override_field_trials(
546 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200547 auto fixture = CreateVideoQualityTestFixture();
Erik Språng3e335d12018-10-11 10:35:49 +0200548
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200549 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700550 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100551 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000552 true, 1280, 720, 50, 30000,
553 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200554 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Erik Språng3e335d12018-10-11 10:35:49 +0200555 conf_motion_hd.analyzer = {
556 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
557 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200558 conf_motion_hd.config->queue_length_packets = 50;
559 conf_motion_hd.config->loss_percent = 3;
560 conf_motion_hd.config->queue_delay_ms = 100;
561 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200562 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700563}
564
philipeldd8b0d82018-09-27 11:18:10 +0200565TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200566 auto fixture = CreateVideoQualityTestFixture();
567 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700568 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100569 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000570 true, 1280, 720, 50, 30000,
571 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200572 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200573 conf_motion_hd.analyzer = {
574 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
575 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200576 conf_motion_hd.config->queue_length_packets = 50;
577 conf_motion_hd.config->loss_percent = 3;
578 conf_motion_hd.config->queue_delay_ms = 100;
579 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200580 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200581 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700582}
583
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200584TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
585 auto fixture = CreateVideoQualityTestFixture();
586 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700587 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100588 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000589 true, 1280, 720, 50, 30000,
590 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200591 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700592 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
593 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200594 conf_motion_hd.config->queue_length_packets = 50;
595 conf_motion_hd.config->loss_percent = 3;
596 conf_motion_hd.config->queue_delay_ms = 100;
597 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200598 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700599}
600
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200601TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
602 auto fixture = CreateVideoQualityTestFixture();
603 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700604 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100605 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000606 true, 1280, 720, 50, 30000,
607 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200608 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700609 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
610 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200611 conf_motion_hd.config->queue_length_packets = 50;
612 conf_motion_hd.config->loss_percent = 3;
613 conf_motion_hd.config->queue_delay_ms = 100;
614 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200615 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700616}
617
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200618TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200619 test::ScopedFieldTrials field_trial(
620 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språng3e335d12018-10-11 10:35:49 +0200621 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200622 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700623 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100624 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000625 true, 1280, 720, 50, 30000,
626 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200627 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700628 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
629 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200630 conf_motion_hd.config->queue_length_packets = 50;
631 conf_motion_hd.config->loss_percent = 3;
632 conf_motion_hd.config->queue_delay_ms = 100;
633 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200634 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700635}
636
jianj390e64d2017-02-03 09:51:23 -0800637#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200638TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
639 auto fixture = CreateVideoQualityTestFixture();
640 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800641 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100642 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000643 true, 1280, 720, 50, 30000,
644 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200645 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800646 conf_motion_hd.analyzer = {
647 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
648 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200649 conf_motion_hd.config->queue_length_packets = 32;
650 conf_motion_hd.config->queue_delay_ms = 100;
651 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200652 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800653}
654#endif
655
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200656TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
657 auto fixture = CreateVideoQualityTestFixture();
658 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700659 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200660 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
661 1000000, false, "VP8", 2, 1, 400000,
662 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100663 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700664 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
665 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200666 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200667}
668
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200669// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
670#if !defined(WEBRTC_MAC)
671const char kScreenshareSimulcastExperiment[] =
672 "WebRTC-SimulcastScreenshare/Enabled/";
673
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200674TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
Erik Språng3e335d12018-10-11 10:35:49 +0200675 test::ScopedFieldTrials field_trial(
676 AppendFieldTrials(kScreenshareSimulcastExperiment));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200677 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200678 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800679 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100680 screenshare.screenshare[0] = {true, false, 10};
681 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
682 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200683 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800684 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
685 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200686 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200687 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
688 1000000, false, "VP8", 3, 0, 400000,
689 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800690 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200691 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
692 1000000, false, "VP8", 2, 0, 400000,
693 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800694
695 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200696 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
697 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200698 screenshare.ss[0] = {
699 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
700 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200701 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800702}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200703#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800704
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200705TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
706 auto fixture = CreateVideoQualityTestFixture();
707 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700708 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200709 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
710 1000000, false, "VP8", 2, 1, 400000,
711 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100712 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700713 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
714 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200715 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700716}
717
philipeldd8b0d82018-09-27 11:18:10 +0200718TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200719 auto fixture = CreateVideoQualityTestFixture();
720 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700721 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200722 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
723 1000000, false, "VP8", 2, 1, 400000,
724 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100725 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200726 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000727 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200728 screenshare.config->loss_percent = 5;
729 screenshare.config->queue_delay_ms = 200;
730 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200731 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200732 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800733}
734
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200735TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
736 auto fixture = CreateVideoQualityTestFixture();
737 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700738 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200739 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
740 1000000, false, "VP8", 2, 1, 400000,
741 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100742 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700743 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
744 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200745 screenshare.config->loss_percent = 10;
746 screenshare.config->queue_delay_ms = 200;
747 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200748 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800749}
750
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200751TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
752 auto fixture = CreateVideoQualityTestFixture();
753 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700754 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200755 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
756 1000000, false, "VP8", 2, 1, 400000,
757 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100758 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700759 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
760 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200761 screenshare.config->loss_percent = 5;
762 screenshare.config->link_capacity_kbps = 200;
763 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700764
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200765 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700766}
767
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200768TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
769 auto fixture = CreateVideoQualityTestFixture();
770 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700771 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200772 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
773 1000000, false, "VP8", 2, 1, 400000,
774 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100775 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700776 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
777 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200778 screenshare.config->loss_percent = 1;
779 screenshare.config->link_capacity_kbps = 1200;
780 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700781
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200782 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700783}
784
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200785const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000786 true, 1280, 720, 30, 800000,
787 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200788 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800789
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200790const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000791 true, 1280, 720, 30, 800000,
792 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200793 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800794
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200795const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000796 true, 640, 360, 30, 150000,
797 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200798 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800799
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200800const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000801 true, 320, 180, 30, 30000,
802 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200803 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800804
Peter Boström12996152016-05-14 02:03:18 +0200805#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200806TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
807 auto fixture = CreateVideoQualityTestFixture();
808 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700809 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100810 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
811 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200812 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100813 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700814 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
815 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200816 screenshare.ss[0] = {
817 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
818 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200819 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000820}
ilnik2a8c2f52017-02-15 02:23:28 -0800821
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822TEST(FullStackTest, VP9SVC_3SL_High) {
823 auto fixture = CreateVideoQualityTestFixture();
824 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800825 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100826 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800827 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
828 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200829
Sergey Silkin57027362018-05-15 09:12:05 +0200830 simulcast.ss[0] = {
831 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
832 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200833 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800834}
835
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200836TEST(FullStackTest, VP9SVC_3SL_Medium) {
837 auto fixture = CreateVideoQualityTestFixture();
838 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800839 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100840 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800841 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
842 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200843 simulcast.ss[0] = {
844 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
845 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200846 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800847}
848
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200849TEST(FullStackTest, VP9SVC_3SL_Low) {
850 auto fixture = CreateVideoQualityTestFixture();
851 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800852 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100853 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800854 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200855 simulcast.ss[0] = {
856 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
857 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200858 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800859}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200860
Sergey Silkin7f978f12018-09-10 12:01:49 +0000861// bugs.webrtc.org/9506
862#if !defined(WEBRTC_MAC)
863
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200864TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200865 webrtc::test::ScopedFieldTrials override_trials(
866 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200867 auto fixture = CreateVideoQualityTestFixture();
868 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200869 simulcast.call.send_side_bwe = true;
870 simulcast.video[0] = kSvcVp9Video;
871 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
872 kFullStackTestDurationSecs};
873 simulcast.ss[0] = {
874 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
875 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200876 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200877}
878
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200879TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200880 webrtc::test::ScopedFieldTrials override_trials(
881 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200882 auto fixture = CreateVideoQualityTestFixture();
883 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200884 simulcast.call.send_side_bwe = true;
885 simulcast.video[0] = kSvcVp9Video;
886 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
887 kFullStackTestDurationSecs};
888 simulcast.ss[0] = {
889 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
890 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200891 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200892}
893
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200894TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200895 webrtc::test::ScopedFieldTrials override_trials(
896 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200897 auto fixture = CreateVideoQualityTestFixture();
898 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200899 simulcast.call.send_side_bwe = true;
900 simulcast.video[0] = kSvcVp9Video;
901 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
902 kFullStackTestDurationSecs};
903 simulcast.ss[0] = {
904 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
905 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200906 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200907}
“Michael277a6562018-06-01 14:09:19 -0500908
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200909TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200910 webrtc::test::ScopedFieldTrials override_trials(
911 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200912 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200913 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500914 simulcast.call.send_side_bwe = true;
915 simulcast.video[0] = kSvcVp9Video;
916 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
917 kFullStackTestDurationSecs};
918 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200919 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500920 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200921 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200922 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200923 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500924}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000925#endif // !defined(WEBRTC_MAC)
926
Peter Boström12996152016-05-14 02:03:18 +0200927#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800928
ilnik6b826ef2017-06-16 06:53:48 -0700929// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000930// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
931#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700932#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
933#else
934#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
935#endif
936
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200937TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
938 auto fixture = CreateVideoQualityTestFixture();
939 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700940 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100941 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
942 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200943 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700944 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
945 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200946 simulcast.config->loss_percent = 0;
947 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948 std::vector<VideoStream> streams = {
949 VideoQualityTest::DefaultVideoStream(simulcast, 0),
950 VideoQualityTest::DefaultVideoStream(simulcast, 0),
951 VideoQualityTest::DefaultVideoStream(simulcast, 0)
952 };
Sergey Silkin57027362018-05-15 09:12:05 +0200953 simulcast.ss[0] = {
954 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
955 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200956 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
957 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200958 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700959}
960
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200961TEST(FullStackTest, SimulcastVP8_3SL_High) {
962 auto fixture = CreateVideoQualityTestFixture();
963 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800964 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100965 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800966 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800967 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200968 simulcast.config->loss_percent = 0;
969 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200970 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100971 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200972 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100973 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200974 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100975 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800976
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100977 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200978 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
979 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
980 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200981 simulcast.ss[0] = {
982 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
983 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200984 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800985}
986
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200987TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
988 auto fixture = CreateVideoQualityTestFixture();
989 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800990 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100991 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800992 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800993 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200994 simulcast.config->loss_percent = 0;
995 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200996 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100997 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200998 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100999 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001000 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001001 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001002
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001003 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001004 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1005 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1006 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001007 simulcast.ss[0] = {
1008 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1009 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001010 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001011}
1012
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001013TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1014 auto fixture = CreateVideoQualityTestFixture();
1015 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001016 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001017 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001018 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001019 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001020 simulcast.config->loss_percent = 0;
1021 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001022 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001023 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001024 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001025 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001026 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001027 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001028
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001029 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001030 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1031 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1032 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001033 simulcast.ss[0] = {
1034 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1035 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001036 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001037}
1038
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001039TEST(FullStackTest, LargeRoomVP8_5thumb) {
1040 auto fixture = CreateVideoQualityTestFixture();
1041 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001042 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001043 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001044 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1045 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001046 large_room.config->loss_percent = 0;
1047 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001048 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001049 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001050 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001051 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001052 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001053 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001054
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001055 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001056 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1057 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1058 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001059 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001060 large_room.ss[0] = {
1061 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1062 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001063 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001064}
1065
oprypin743117f2017-09-15 05:24:24 -07001066#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1067// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001068// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1069#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001070#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001071#else
1072#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001073#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001074#endif
1075
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001076TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1077 auto fixture = CreateVideoQualityTestFixture();
1078 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001079 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001080 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001081 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1082 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001083 large_room.config->loss_percent = 0;
1084 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001085 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001086 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001087 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001088 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001089 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001090 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001091
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001092 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001093 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1094 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1095 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001096 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001097 large_room.ss[0] = {
1098 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1099 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001100 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001101}
1102
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001103TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1104 auto fixture = CreateVideoQualityTestFixture();
1105 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001106 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001107 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001108 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1109 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001110 large_room.config->loss_percent = 0;
1111 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001112 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001113 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001114 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001115 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001116 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001117 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001118
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001119 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001120 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1121 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1122 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001123 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001124 large_room.ss[0] = {
1125 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1126 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001127 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001128}
1129
philipeldd8b0d82018-09-27 11:18:10 +02001130INSTANTIATE_TEST_CASE_P(FullStackTest,
1131 GenericDescriptorTest,
1132 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1133 "WebRTC-GenericDescriptor/Enabled/"));
1134
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001135class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001136
1137// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001138// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1139#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001140TEST_P(DualStreamsTest,
1141 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1142 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001143 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1144 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001145 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001146 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001147
1148 // Screenshare Settings.
1149 dual_streams.screenshare[first_stream] = {true, false, 10};
1150 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1151 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001152 2, 400000, false, false, false,
1153 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001154
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001155 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001156 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1157 1000000, false, "VP8", 3, 0, 400000,
1158 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001159 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001160 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1161 1000000, false, "VP8", 2, 0, 400000,
1162 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001163 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001164 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1165 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001166
Sergey Silkin57027362018-05-15 09:12:05 +02001167 dual_streams.ss[first_stream] = {
1168 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1169 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001170
1171 // Video settings.
1172 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1173
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001174 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001175 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001176 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001177 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001178 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001179 video_params_low.video[0] = kSimulcastVp8VideoLow;
1180 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001181 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1182 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1183 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001184
1185 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001186 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1187 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001188
1189 // Call settings.
1190 dual_streams.call.send_side_bwe = true;
1191 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001192 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1193 std::to_string(first_stream);
1194 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001195 dual_streams.config->loss_percent = 1;
1196 dual_streams.config->link_capacity_kbps = 7500;
1197 dual_streams.config->queue_length_packets = 30;
1198 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001199
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001200 auto fixture = CreateVideoQualityTestFixture();
1201 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001202}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001203#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1204 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001205
1206TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001207 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001208 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001209 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001210 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001211
1212 // Screenshare Settings.
1213 dual_streams.screenshare[first_stream] = {true, false, 10};
1214 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1215 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001216 2, 400000, false, false, false,
1217 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001218 // Video settings.
1219 dual_streams.video[1 - first_stream] = {
1220 true, 1280, 720, 30, 150000,
1221 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001222 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001223
1224 // Call settings.
1225 dual_streams.call.send_side_bwe = true;
1226 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001227 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1228 std::to_string(first_stream);
1229 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001230 dual_streams.config->loss_percent = 1;
1231 dual_streams.config->link_capacity_kbps = 5000;
1232 dual_streams.config->queue_length_packets = 30;
1233 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001234
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001235 auto fixture = CreateVideoQualityTestFixture();
1236 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001237}
1238
1239INSTANTIATE_TEST_CASE_P(FullStackTest,
1240 DualStreamsTest,
1241 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001242
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001243} // namespace webrtc