blob: 9a8d252bfcc51c6fad13b5416901618702104e94 [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
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020025WEBRTC_DEFINE_string(rtc_event_log_name,
26 "",
27 "Filename for rtc event log. Two files "
28 "with \"_send\" and \"_recv\" suffixes will be created.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020029std::string RtcEventLogName() {
30 return static_cast<std::string>(FLAG_rtc_event_log_name);
31}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020032WEBRTC_DEFINE_string(rtp_dump_name,
33 "",
34 "Filename for dumped received RTP stream.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020035std::string RtpDumpName() {
36 return static_cast<std::string>(FLAG_rtp_dump_name);
37}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020038WEBRTC_DEFINE_string(
39 encoded_frame_path,
40 "",
41 "The base path for encoded frame logs. Created files will have "
42 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
Sebastian Janssonf8518882018-05-31 14:52:59 +020043std::string EncodedFramePath() {
44 return static_cast<std::string>(FLAG_encoded_frame_path);
45}
46} // namespace flags
47} // namespace webrtc
48
49namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000050
sprang89c4a7e2017-06-30 13:27:40 -070051namespace {
brandtrdd369c62016-11-16 23:56:57 -080052static const int kFullStackTestDurationSecs = 45;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020053const char kPacerPushBackExperiment[] =
54 "WebRTC-PacerPushbackExperiment/Enabled/";
Erik Språngd3438aa2018-11-08 16:56:43 +010055const char kVp8TrustedRateControllerFieldTrial[] =
56 "WebRTC-LibvpxVp8TrustedRateController/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000057
Patrik Höglundb6b29e02018-06-21 16:58:01 +020058struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000059 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020060 ParamsWithLogging() {
61 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020062 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
63 flags::EncodedFramePath()};
Artem Titov75e36472018-10-08 12:28:56 +020064 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000065 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000066};
67
Patrik Höglundb6b29e02018-06-21 16:58:01 +020068std::unique_ptr<VideoQualityTestFixtureInterface>
69CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020070 // The components will normally be nullptr (= use defaults), but it's possible
71 // for external test runners to override the list of injected components.
72 auto components = TestDependencyFactory::GetInstance().CreateComponents();
73 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020074}
75
Erik Språngb6b1cac2018-08-09 16:12:54 +020076// Takes the current active field trials set, and appends some new trials.
77std::string AppendFieldTrials(std::string new_trial_string) {
78 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
79}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020080} // namespace
81
sprangce4aef12015-11-02 07:23:20 -080082// VideoQualityTest::Params params = {
83// { ... }, // Common.
84// { ... }, // Video-specific settings.
85// { ... }, // Screenshare-specific settings.
86// { ... }, // Analyzer settings.
87// pipe, // FakeNetworkPipe::Config
88// { ... }, // Spatial scalability.
89// logs // bool
90// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000091
philipeldd8b0d82018-09-27 11:18:10 +020092class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
93 public:
philipelf638bbc2018-10-04 16:57:12 +020094 GenericDescriptorTest()
95 : field_trial_(GetParam()),
96 generic_descriptor_enabled_(
97 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +020098
99 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +0200100 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +0200101 base += "_generic_descriptor";
102 return base;
103 }
104
philipelf638bbc2018-10-04 16:57:12 +0200105 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
106
philipeldd8b0d82018-09-27 11:18:10 +0200107 private:
108 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200109 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200110};
111
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100112#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200113TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
114 auto fixture = CreateVideoQualityTestFixture();
115 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800116 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100117 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
118 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200119 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800120 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
121 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200122 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800123}
124
philipeldd8b0d82018-09-27 11:18:10 +0200125TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200126 auto fixture = CreateVideoQualityTestFixture();
127 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800128 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100129 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
130 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200131 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200132 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
133 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200134 foreman_cif.config->loss_percent = 5;
135 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200136 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200137 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800138}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800139
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700140TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
141 // Profile 2 might not be available on some platforms until
142 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
143 bool profile_2_is_supported = false;
144 for (const auto& codec : SupportedVP9Codecs()) {
145 if (ParseSdpForVP9Profile(codec.parameters)
146 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
147 profile_2_is_supported = true;
148 }
149 }
150 if (!profile_2_is_supported)
151 return;
152 auto fixture = CreateVideoQualityTestFixture();
153
154 SdpVideoFormat::Parameters vp92 = {
155 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
156 ParamsWithLogging generator;
157 generator.call.send_side_bwe = true;
158 generator.video[0] = {
159 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
160 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
161 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
162 kFullStackTestDurationSecs};
163 fixture->RunWithAnalyzer(generator);
164}
165
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200166TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
167 auto fixture = CreateVideoQualityTestFixture();
168 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800169 foreman_cif.call.send_side_bwe = true;
170 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
171 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200172 0, 0, false, false, false,
173 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800174 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
175 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200176 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800177}
178
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200179TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
180 auto fixture = CreateVideoQualityTestFixture();
181
182 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700183 generator.call.send_side_bwe = true;
184 generator.video[0] = {true, 352, 288, 30, 700000,
185 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200186 0, 0, false, false, false,
187 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700188 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
189 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200190 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800191}
192
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100193#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800194
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200195#if defined(WEBRTC_LINUX)
196// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
197#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
198#else
199#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
200#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200201TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
202 auto fixture = CreateVideoQualityTestFixture();
203 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700204 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100205 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
206 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200207 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700208 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
209 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200210 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000211}
212
philipeldd8b0d82018-09-27 11:18:10 +0200213TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200214 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000215 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200216 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700217 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100218 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
219 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200220 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200221 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
222 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200223 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200224 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000225}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000226
philipeldd8b0d82018-09-27 11:18:10 +0200227TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200228 auto fixture = CreateVideoQualityTestFixture();
229 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800230 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100231 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
232 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200233 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200234 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
235 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200236 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200237 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800238}
239
Erik Språngd3438aa2018-11-08 16:56:43 +0100240// TODO(webrtc:9722): Remove when experiment is cleaned up.
241TEST_P(GenericDescriptorTest,
242 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
243 test::ScopedFieldTrials override_field_trials(
244 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
245 auto fixture = CreateVideoQualityTestFixture();
246
247 ParamsWithLogging foreman_cif;
248 foreman_cif.call.send_side_bwe = true;
249 foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000,
250 false, "VP8", 1, 0, 0, false, false,
251 false, "foreman_cif"};
252 foreman_cif.analyzer = {
253 GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"),
254 0.0, 0.0, kFullStackTestDurationSecs};
255 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
256 fixture->RunWithAnalyzer(foreman_cif);
257}
258
Niels Möller6aa415e2018-06-07 11:14:13 +0200259// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200260TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
261 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200262 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200263 foreman_cif.call.send_side_bwe = true;
264 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
265 500000, 2000000, false, "VP8", 1,
266 0, 0, false, false, true, "foreman_cif"};
267 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
268 0.0, 0.0,
269 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200270 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200271 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200272}
273
philipeldd8b0d82018-09-27 11:18:10 +0200274TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200275 auto fixture = CreateVideoQualityTestFixture();
276 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700277 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100278 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
279 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200280 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200281 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000282 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200283 foreman_cif.config->loss_percent = 5;
284 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200285 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200286 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000287}
288
philipeldd8b0d82018-09-27 11:18:10 +0200289TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200290 auto fixture = CreateVideoQualityTestFixture();
291 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800292 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100293 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
294 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200295 0, 0, true, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200296 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
297 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200298 foreman_cif.config->loss_percent = 5;
299 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200300 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200301 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800302}
303
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200304TEST(FullStackTest, ForemanCifPlr5Flexfec) {
305 auto fixture = CreateVideoQualityTestFixture();
306 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800307 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100308 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
309 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200310 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800311 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
312 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200313 foreman_cif.config->loss_percent = 5;
314 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200315 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800316}
317
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200318TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
319 auto fixture = CreateVideoQualityTestFixture();
320 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700321 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100322 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
323 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200324 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700325 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
326 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200327 foreman_cif.config->loss_percent = 3;
328 foreman_cif.config->link_capacity_kbps = 500;
329 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200330 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700331}
332
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200333TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
334 auto fixture = CreateVideoQualityTestFixture();
335 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700336 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100337 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
338 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200339 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700340 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
341 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200342 foreman_cif.config->loss_percent = 3;
343 foreman_cif.config->link_capacity_kbps = 500;
344 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200345 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700346}
347
brandtrdd369c62016-11-16 23:56:57 -0800348#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200349TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
350 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800351 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200352 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800353 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100354 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
355 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200356 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800357 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
358 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200359 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800360}
361
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200362TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
363 auto fixture = CreateVideoQualityTestFixture();
364 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800365 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100366 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
367 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200368 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800369 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
370 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200371 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800372}
373
philipeldd8b0d82018-09-27 11:18:10 +0200374TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200375 auto fixture = CreateVideoQualityTestFixture();
376 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800377 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100378 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
379 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200380 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200381 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
382 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200383 foreman_cif.config->loss_percent = 5;
384 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200385 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200386 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800387}
388
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200389TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100390 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200391 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100392 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100393
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200394 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100395 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100396 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
397 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200398 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100399 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
400 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200401 foreman_cif.config->loss_percent = 5;
402 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200403 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100404}
405
brandtrdd369c62016-11-16 23:56:57 -0800406// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200407TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
408 auto fixture = CreateVideoQualityTestFixture();
409 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800410 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100411 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
412 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200413 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800414 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
415 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200416 foreman_cif.config->loss_percent = 5;
417 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200418 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800419}
420
421// Ulpfec with H264 is an unsupported combination, so this test is only useful
422// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200423TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
424 auto fixture = CreateVideoQualityTestFixture();
425 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800426 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100427 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
428 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200429 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800430 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
431 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200432 foreman_cif.config->loss_percent = 5;
433 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200434 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800435}
436#endif // defined(WEBRTC_USE_H264)
437
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200438TEST(FullStackTest, ForemanCif500kbps) {
439 auto fixture = CreateVideoQualityTestFixture();
440 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700441 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100442 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
443 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200444 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700445 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
446 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200447 foreman_cif.config->queue_length_packets = 0;
448 foreman_cif.config->queue_delay_ms = 0;
449 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200450 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000451}
452
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200453TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
454 auto fixture = CreateVideoQualityTestFixture();
455 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700456 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100457 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
458 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200459 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700460 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
461 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200462 foreman_cif.config->queue_length_packets = 32;
463 foreman_cif.config->queue_delay_ms = 0;
464 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200465 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000466}
467
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200468TEST(FullStackTest, ForemanCif500kbps100ms) {
469 auto fixture = CreateVideoQualityTestFixture();
470 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700471 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100472 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
473 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200474 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700475 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
476 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200477 foreman_cif.config->queue_length_packets = 0;
478 foreman_cif.config->queue_delay_ms = 100;
479 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200480 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000481}
482
philipeldd8b0d82018-09-27 11:18:10 +0200483TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200484 auto fixture = CreateVideoQualityTestFixture();
485 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700486 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100487 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
488 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200489 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200490 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
491 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200492 foreman_cif.config->queue_length_packets = 32;
493 foreman_cif.config->queue_delay_ms = 100;
494 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200495 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200496 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700497}
498
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200499TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
500 auto fixture = CreateVideoQualityTestFixture();
501 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800502 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100503 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
504 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200505 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800506 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
507 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200508 foreman_cif.config->queue_length_packets = 32;
509 foreman_cif.config->queue_delay_ms = 100;
510 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200511 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000512}
513
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200514TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
515 auto fixture = CreateVideoQualityTestFixture();
516 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700517 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100518 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
519 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200520 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700521 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
522 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200523 foreman_cif.config->queue_length_packets = 32;
524 foreman_cif.config->queue_delay_ms = 100;
525 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200526 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000527}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000528
sprangff19d352017-09-06 07:14:02 -0700529// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200530TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
531 auto fixture = CreateVideoQualityTestFixture();
532 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700533 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100534 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000535 true, 1280, 720, 50, 30000,
536 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200537 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700538 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
539 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200540 conf_motion_hd.config->queue_length_packets = 32;
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);
stefanb1797672016-08-11 07:00:57 -0700544}
545
Erik Språngd3438aa2018-11-08 16:56:43 +0100546// TODO(webrtc:9722): Remove when experiment is cleaned up.
547TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
548 test::ScopedFieldTrials override_field_trials(
549 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200550 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100551
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200552 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700553 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100554 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000555 true, 1280, 720, 50, 30000,
556 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200557 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Erik Språngd3438aa2018-11-08 16:56:43 +0100558 conf_motion_hd.analyzer = {
559 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
560 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200561 conf_motion_hd.config->queue_length_packets = 50;
562 conf_motion_hd.config->loss_percent = 3;
563 conf_motion_hd.config->queue_delay_ms = 100;
564 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200565 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700566}
567
philipeldd8b0d82018-09-27 11:18:10 +0200568TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200569 auto fixture = CreateVideoQualityTestFixture();
570 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700571 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100572 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000573 true, 1280, 720, 50, 30000,
574 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200575 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200576 conf_motion_hd.analyzer = {
577 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
578 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200579 conf_motion_hd.config->queue_length_packets = 50;
580 conf_motion_hd.config->loss_percent = 3;
581 conf_motion_hd.config->queue_delay_ms = 100;
582 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200583 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200584 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700585}
586
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200587TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
588 auto fixture = CreateVideoQualityTestFixture();
589 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700590 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100591 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000592 true, 1280, 720, 50, 30000,
593 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200594 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700595 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
596 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200597 conf_motion_hd.config->queue_length_packets = 50;
598 conf_motion_hd.config->loss_percent = 3;
599 conf_motion_hd.config->queue_delay_ms = 100;
600 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200601 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700602}
603
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200604TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
605 auto fixture = CreateVideoQualityTestFixture();
606 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700607 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100608 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000609 true, 1280, 720, 50, 30000,
610 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200611 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700612 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
613 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200614 conf_motion_hd.config->queue_length_packets = 50;
615 conf_motion_hd.config->loss_percent = 3;
616 conf_motion_hd.config->queue_delay_ms = 100;
617 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200618 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700619}
620
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200621TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200622 test::ScopedFieldTrials field_trial(
623 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100624 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200625 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700626 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100627 conf_motion_hd.video[0] = {
Rasmus Brandt35836932018-10-23 09:17:24 +0200628 true, 1280, 720, 50,
629 30000, 3000000, 3000000, false,
630 "VP8", 3, -1, 0,
631 false, false, false, "ConferenceMotion_1280_720_50"};
632 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
633 0.0, 0.0, kFullStackTestDurationSecs};
634 conf_motion_hd.config->queue_length_packets = 50;
635 conf_motion_hd.config->loss_percent = 3;
636 conf_motion_hd.config->queue_delay_ms = 100;
637 conf_motion_hd.config->link_capacity_kbps = 2000;
638 fixture->RunWithAnalyzer(conf_motion_hd);
639}
640
641TEST(FullStackTest,
642 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
643 auto fixture = CreateVideoQualityTestFixture();
644 test::ScopedFieldTrials field_trial(
645 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
646 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
647 ParamsWithLogging conf_motion_hd;
648 conf_motion_hd.call.send_side_bwe = true;
649 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000650 true, 1280, 720, 50, 30000,
651 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200652 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Rasmus Brandt35836932018-10-23 09:17:24 +0200653 conf_motion_hd.analyzer = {
654 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
655 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200656 conf_motion_hd.config->queue_length_packets = 50;
657 conf_motion_hd.config->loss_percent = 3;
658 conf_motion_hd.config->queue_delay_ms = 100;
659 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200660 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700661}
662
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100663#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200664TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
665 auto fixture = CreateVideoQualityTestFixture();
666 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800667 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100668 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000669 true, 1280, 720, 50, 30000,
670 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200671 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800672 conf_motion_hd.analyzer = {
673 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
674 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200675 conf_motion_hd.config->queue_length_packets = 32;
676 conf_motion_hd.config->queue_delay_ms = 100;
677 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200678 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800679}
680#endif
681
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200682TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
683 auto fixture = CreateVideoQualityTestFixture();
684 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700685 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200686 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
687 1000000, false, "VP8", 2, 1, 400000,
688 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100689 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700690 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
691 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200692 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200693}
694
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200695// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
696#if !defined(WEBRTC_MAC)
697const char kScreenshareSimulcastExperiment[] =
698 "WebRTC-SimulcastScreenshare/Enabled/";
699
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200700TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100701 test::ScopedFieldTrials field_trial(
702 AppendFieldTrials(kScreenshareSimulcastExperiment));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200703 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200704 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800705 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100706 screenshare.screenshare[0] = {true, false, 10};
707 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
708 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200709 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800710 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
711 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200712 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200713 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
714 1000000, false, "VP8", 3, 0, 400000,
715 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800716 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200717 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
718 1000000, false, "VP8", 2, 0, 400000,
719 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800720
721 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200722 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
723 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200724 screenshare.ss[0] = {
725 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
726 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200727 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800728}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200729#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800730
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200731TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
732 auto fixture = CreateVideoQualityTestFixture();
733 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700734 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200735 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
736 1000000, false, "VP8", 2, 1, 400000,
737 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100738 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700739 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
740 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200741 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700742}
743
philipeldd8b0d82018-09-27 11:18:10 +0200744TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200745 auto fixture = CreateVideoQualityTestFixture();
746 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700747 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200748 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
749 1000000, false, "VP8", 2, 1, 400000,
750 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100751 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200752 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000753 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200754 screenshare.config->loss_percent = 5;
755 screenshare.config->queue_delay_ms = 200;
756 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200757 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200758 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800759}
760
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200761TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
762 auto fixture = CreateVideoQualityTestFixture();
763 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700764 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200765 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
766 1000000, false, "VP8", 2, 1, 400000,
767 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100768 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700769 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
770 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200771 screenshare.config->loss_percent = 10;
772 screenshare.config->queue_delay_ms = 200;
773 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200774 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800775}
776
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200777TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
778 auto fixture = CreateVideoQualityTestFixture();
779 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700780 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200781 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
782 1000000, false, "VP8", 2, 1, 400000,
783 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100784 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700785 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
786 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200787 screenshare.config->loss_percent = 5;
788 screenshare.config->link_capacity_kbps = 200;
789 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700790
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200791 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700792}
793
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200794TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
795 auto fixture = CreateVideoQualityTestFixture();
796 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700797 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200798 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
799 1000000, false, "VP8", 2, 1, 400000,
800 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100801 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700802 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
803 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200804 screenshare.config->loss_percent = 1;
805 screenshare.config->link_capacity_kbps = 1200;
806 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700807
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200808 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700809}
810
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200811const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000812 true, 1280, 720, 30, 800000,
813 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200814 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800815
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200816const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000817 true, 1280, 720, 30, 800000,
818 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200819 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800820
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200821const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000822 true, 640, 360, 30, 150000,
823 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200824 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800825
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200826const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000827 true, 320, 180, 30, 30000,
828 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200829 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800830
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100831#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200832TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
833 auto fixture = CreateVideoQualityTestFixture();
834 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700835 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100836 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
837 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200838 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100839 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700840 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
841 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200842 screenshare.ss[0] = {
843 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
844 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200845 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000846}
ilnik2a8c2f52017-02-15 02:23:28 -0800847
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200848TEST(FullStackTest, VP9SVC_3SL_High) {
849 auto fixture = CreateVideoQualityTestFixture();
850 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800851 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100852 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800853 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
854 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200855
Sergey Silkin57027362018-05-15 09:12:05 +0200856 simulcast.ss[0] = {
857 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
858 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200859 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800860}
861
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200862TEST(FullStackTest, VP9SVC_3SL_Medium) {
863 auto fixture = CreateVideoQualityTestFixture();
864 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800865 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100866 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800867 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
868 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200869 simulcast.ss[0] = {
870 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
871 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200872 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800873}
874
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200875TEST(FullStackTest, VP9SVC_3SL_Low) {
876 auto fixture = CreateVideoQualityTestFixture();
877 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800878 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100879 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800880 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200881 simulcast.ss[0] = {
882 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
883 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200884 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800885}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200886
Sergey Silkin7f978f12018-09-10 12:01:49 +0000887// bugs.webrtc.org/9506
888#if !defined(WEBRTC_MAC)
889
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200890TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200891 webrtc::test::ScopedFieldTrials override_trials(
892 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200893 auto fixture = CreateVideoQualityTestFixture();
894 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200895 simulcast.call.send_side_bwe = true;
896 simulcast.video[0] = kSvcVp9Video;
897 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
898 kFullStackTestDurationSecs};
899 simulcast.ss[0] = {
900 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
901 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200902 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200903}
904
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200905TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200906 webrtc::test::ScopedFieldTrials override_trials(
907 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200908 auto fixture = CreateVideoQualityTestFixture();
909 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200910 simulcast.call.send_side_bwe = true;
911 simulcast.video[0] = kSvcVp9Video;
912 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
913 kFullStackTestDurationSecs};
914 simulcast.ss[0] = {
915 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
916 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200917 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200918}
919
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200920TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200921 webrtc::test::ScopedFieldTrials override_trials(
922 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200923 auto fixture = CreateVideoQualityTestFixture();
924 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200925 simulcast.call.send_side_bwe = true;
926 simulcast.video[0] = kSvcVp9Video;
927 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
928 kFullStackTestDurationSecs};
929 simulcast.ss[0] = {
930 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
931 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200932 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200933}
“Michael277a6562018-06-01 14:09:19 -0500934
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200935TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200936 webrtc::test::ScopedFieldTrials override_trials(
937 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200938 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200939 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500940 simulcast.call.send_side_bwe = true;
941 simulcast.video[0] = kSvcVp9Video;
942 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
943 kFullStackTestDurationSecs};
944 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200945 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500946 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200947 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200948 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200949 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500950}
Erik Språngd3438aa2018-11-08 16:56:43 +0100951
952// TODO(webrtc:9722): Remove when experiment is cleaned up.
953TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
954 webrtc::test::ScopedFieldTrials override_trials(
955 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
956 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
957 auto fixture = CreateVideoQualityTestFixture();
958 ParamsWithLogging simulcast;
959 simulcast.call.send_side_bwe = true;
960 simulcast.video[0] = kSvcVp9Video;
961 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
962 0.0, 0.0, kFullStackTestDurationSecs};
963 simulcast.ss[0] = {
964 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
965 std::vector<SpatialLayer>(), false};
966 simulcast.config->link_capacity_kbps = 1000;
967 simulcast.config->queue_delay_ms = 100;
968 fixture->RunWithAnalyzer(simulcast);
969}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000970#endif // !defined(WEBRTC_MAC)
971
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100972#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800973
ilnik6b826ef2017-06-16 06:53:48 -0700974// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000975// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
976#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700977#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
978#else
979#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
980#endif
981
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200982TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
983 auto fixture = CreateVideoQualityTestFixture();
984 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700985 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100986 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
987 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200988 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700989 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
990 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200991 simulcast.config->loss_percent = 0;
992 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200993 std::vector<VideoStream> streams = {
994 VideoQualityTest::DefaultVideoStream(simulcast, 0),
995 VideoQualityTest::DefaultVideoStream(simulcast, 0),
996 VideoQualityTest::DefaultVideoStream(simulcast, 0)
997 };
Sergey Silkin57027362018-05-15 09:12:05 +0200998 simulcast.ss[0] = {
999 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1000 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001001 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1002 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001003 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001004}
1005
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001006TEST(FullStackTest, SimulcastVP8_3SL_High) {
1007 auto fixture = CreateVideoQualityTestFixture();
1008 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001009 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001010 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001011 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001012 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001013 simulcast.config->loss_percent = 0;
1014 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001015 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001016 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001017 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001018 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001019 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001020 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001021
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001022 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001023 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1024 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1025 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001026 simulcast.ss[0] = {
1027 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1028 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001029 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001030}
1031
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001032TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1033 auto fixture = CreateVideoQualityTestFixture();
1034 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001035 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001036 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001037 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001038 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001039 simulcast.config->loss_percent = 0;
1040 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001041 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001042 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001043 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001044 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001045 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001046 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001047
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001048 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001049 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1050 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1051 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001052 simulcast.ss[0] = {
1053 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1054 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001055 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001056}
1057
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001058TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1059 auto fixture = CreateVideoQualityTestFixture();
1060 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001061 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001062 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001063 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001064 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001065 simulcast.config->loss_percent = 0;
1066 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001067 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001068 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001069 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001070 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001071 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001072 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001073
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001074 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001075 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1076 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1077 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001078 simulcast.ss[0] = {
1079 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1080 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001081 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001082}
1083
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001084TEST(FullStackTest, LargeRoomVP8_5thumb) {
1085 auto fixture = CreateVideoQualityTestFixture();
1086 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001087 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001088 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001089 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1090 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001091 large_room.config->loss_percent = 0;
1092 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001093 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001094 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001095 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001096 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001097 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001098 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001099
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001100 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001101 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1102 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1103 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001104 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001105 large_room.ss[0] = {
1106 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1107 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001109}
1110
oprypin743117f2017-09-15 05:24:24 -07001111#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1112// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001113// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1114#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001115#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001116#else
1117#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001118#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001119#endif
1120
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001121TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1122 auto fixture = CreateVideoQualityTestFixture();
1123 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001124 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001125 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001126 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1127 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001128 large_room.config->loss_percent = 0;
1129 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001130 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001131 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001132 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001133 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001134 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001135 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001136
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001137 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001138 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1139 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1140 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001141 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001142 large_room.ss[0] = {
1143 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1144 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001145 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001146}
1147
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001148TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1149 auto fixture = CreateVideoQualityTestFixture();
1150 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001151 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001152 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001153 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1154 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001155 large_room.config->loss_percent = 0;
1156 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001157 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001158 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001159 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001160 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001161 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001162 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001163
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001164 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001165 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1166 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1167 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001168 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001169 large_room.ss[0] = {
1170 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1171 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001172 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001173}
1174
philipeldd8b0d82018-09-27 11:18:10 +02001175INSTANTIATE_TEST_CASE_P(FullStackTest,
1176 GenericDescriptorTest,
1177 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1178 "WebRTC-GenericDescriptor/Enabled/"));
1179
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001180class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001181
1182// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001183// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1184#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001185TEST_P(DualStreamsTest,
1186 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1187 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001188 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1189 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001190 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001191 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001192
1193 // Screenshare Settings.
1194 dual_streams.screenshare[first_stream] = {true, false, 10};
1195 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1196 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001197 2, 400000, false, false, false,
1198 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001199
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001200 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001201 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1202 1000000, false, "VP8", 3, 0, 400000,
1203 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001204 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001205 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1206 1000000, false, "VP8", 2, 0, 400000,
1207 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001208 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001209 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1210 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001211
Sergey Silkin57027362018-05-15 09:12:05 +02001212 dual_streams.ss[first_stream] = {
1213 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1214 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001215
1216 // Video settings.
1217 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1218
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001219 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001220 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001221 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001222 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001223 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001224 video_params_low.video[0] = kSimulcastVp8VideoLow;
1225 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001226 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1227 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1228 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001229
1230 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001231 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1232 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001233
1234 // Call settings.
1235 dual_streams.call.send_side_bwe = true;
1236 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001237 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1238 std::to_string(first_stream);
1239 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001240 dual_streams.config->loss_percent = 1;
1241 dual_streams.config->link_capacity_kbps = 7500;
1242 dual_streams.config->queue_length_packets = 30;
1243 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001244
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001245 auto fixture = CreateVideoQualityTestFixture();
1246 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001247}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001248#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1249 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001250
1251TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001252 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001253 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001254 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001255 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001256
1257 // Screenshare Settings.
1258 dual_streams.screenshare[first_stream] = {true, false, 10};
1259 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1260 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001261 2, 400000, false, false, false,
1262 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001263 // Video settings.
1264 dual_streams.video[1 - first_stream] = {
1265 true, 1280, 720, 30, 150000,
1266 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001267 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001268
1269 // Call settings.
1270 dual_streams.call.send_side_bwe = true;
1271 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001272 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1273 std::to_string(first_stream);
1274 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001275 dual_streams.config->loss_percent = 1;
1276 dual_streams.config->link_capacity_kbps = 5000;
1277 dual_streams.config->queue_length_packets = 30;
1278 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001279
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001280 auto fixture = CreateVideoQualityTestFixture();
1281 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001282}
1283
1284INSTANTIATE_TEST_CASE_P(FullStackTest,
1285 DualStreamsTest,
1286 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001287
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001288} // namespace webrtc