blob: 77da2534489a2aae8027dc79ea838a12d1eb967c [file] [log] [blame]
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10#include <stdio.h>
11
Patrik Höglundd8f3c172018-09-26 14:39:17 +020012#include "api/test/test_dependency_factory.h"
Emircan Uysaler0823eec2018-07-13 17:10:00 -070013#include "media/base/vp9_profile.h"
14#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssoncabe3832018-01-12 10:54:18 +010015#include "rtc_base/experiments/alr_experiment.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020016#include "rtc_base/flags.h"
Mirko Bonadei17f48782018-09-28 08:51:10 +020017#include "system_wrappers/include/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020018#include "test/field_trial.h"
19#include "test/gtest.h"
20#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000021
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000022namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020023namespace flags {
24
Sebastian Janssonf8518882018-05-31 14:52:59 +020025DEFINE_string(rtc_event_log_name,
26 "",
27 "Filename for rtc event log. Two files "
28 "with \"_send\" and \"_recv\" suffixes will be created.");
29std::string RtcEventLogName() {
30 return static_cast<std::string>(FLAG_rtc_event_log_name);
31}
32DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream.");
33std::string RtpDumpName() {
34 return static_cast<std::string>(FLAG_rtp_dump_name);
35}
36DEFINE_string(encoded_frame_path,
37 "",
38 "The base path for encoded frame logs. Created files will have "
39 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
40std::string EncodedFramePath() {
41 return static_cast<std::string>(FLAG_encoded_frame_path);
42}
43} // namespace flags
44} // namespace webrtc
45
46namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000047
sprang89c4a7e2017-06-30 13:27:40 -070048namespace {
brandtrdd369c62016-11-16 23:56:57 -080049static const int kFullStackTestDurationSecs = 45;
Erik Språngb65aa012018-09-24 11:35:19 +020050const char kScreenshareSimulcastExperiment[] =
51 "WebRTC-SimulcastScreenshare/Enabled/";
Patrik Höglundb6b29e02018-06-21 16:58:01 +020052const char kPacerPushBackExperiment[] =
53 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000054
Patrik Höglundb6b29e02018-06-21 16:58:01 +020055struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000056 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020057 ParamsWithLogging() {
58 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020059 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
60 flags::EncodedFramePath()};
Artem Titovf18b3522018-08-28 16:54:24 +020061 this->config = DefaultNetworkSimulationConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000062 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000063};
64
Patrik Höglundb6b29e02018-06-21 16:58:01 +020065std::unique_ptr<VideoQualityTestFixtureInterface>
66CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020067 // The components will normally be nullptr (= use defaults), but it's possible
68 // for external test runners to override the list of injected components.
69 auto components = TestDependencyFactory::GetInstance().CreateComponents();
70 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020071}
72
Erik Språngb6b1cac2018-08-09 16:12:54 +020073// Takes the current active field trials set, and appends some new trials.
74std::string AppendFieldTrials(std::string new_trial_string) {
75 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
76}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020077} // namespace
78
sprangce4aef12015-11-02 07:23:20 -080079// VideoQualityTest::Params params = {
80// { ... }, // Common.
81// { ... }, // Video-specific settings.
82// { ... }, // Screenshare-specific settings.
83// { ... }, // Analyzer settings.
84// pipe, // FakeNetworkPipe::Config
85// { ... }, // Spatial scalability.
86// logs // bool
87// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000088
philipeldd8b0d82018-09-27 11:18:10 +020089class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
90 public:
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
Niels Möller6aa415e2018-06-07 11:14:13 +0200237// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200238TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
239 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200240 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200241 foreman_cif.call.send_side_bwe = true;
242 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
243 500000, 2000000, false, "VP8", 1,
244 0, 0, false, false, true, "foreman_cif"};
245 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
246 0.0, 0.0,
247 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200248 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200249 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200250}
251
philipeldd8b0d82018-09-27 11:18:10 +0200252TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200253 auto fixture = CreateVideoQualityTestFixture();
254 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700255 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100256 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
257 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200258 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200259 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000260 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200261 foreman_cif.config->loss_percent = 5;
262 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200263 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200264 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000265}
266
philipeldd8b0d82018-09-27 11:18:10 +0200267TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200268 auto fixture = CreateVideoQualityTestFixture();
269 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800270 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100271 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
272 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200273 0, 0, true, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200274 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
275 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200276 foreman_cif.config->loss_percent = 5;
277 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200278 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200279 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800280}
281
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200282TEST(FullStackTest, ForemanCifPlr5Flexfec) {
283 auto fixture = CreateVideoQualityTestFixture();
284 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800285 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100286 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
287 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200288 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800289 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
290 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200291 foreman_cif.config->loss_percent = 5;
292 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200293 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800294}
295
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200296TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
297 auto fixture = CreateVideoQualityTestFixture();
298 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700299 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100300 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
301 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200302 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700303 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
304 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200305 foreman_cif.config->loss_percent = 3;
306 foreman_cif.config->link_capacity_kbps = 500;
307 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200308 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700309}
310
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200311TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
312 auto fixture = CreateVideoQualityTestFixture();
313 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700314 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100315 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
316 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200317 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700318 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
319 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200320 foreman_cif.config->loss_percent = 3;
321 foreman_cif.config->link_capacity_kbps = 500;
322 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200323 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700324}
325
brandtrdd369c62016-11-16 23:56:57 -0800326#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200327TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
328 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800329 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200330 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800331 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100332 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
333 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200334 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800335 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
336 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200337 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800338}
339
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200340TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
341 auto fixture = CreateVideoQualityTestFixture();
342 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800343 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100344 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
345 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200346 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800347 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
348 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200349 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800350}
351
philipeldd8b0d82018-09-27 11:18:10 +0200352TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200353 auto fixture = CreateVideoQualityTestFixture();
354 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800355 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100356 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
357 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200358 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200359 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
360 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200361 foreman_cif.config->loss_percent = 5;
362 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200363 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200364 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800365}
366
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200367TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
368 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100369 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200370 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100371
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200372 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100373 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100374 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
375 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200376 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100377 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
378 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200379 foreman_cif.config->loss_percent = 5;
380 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200381 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100382}
383
brandtrdd369c62016-11-16 23:56:57 -0800384// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200385TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
386 auto fixture = CreateVideoQualityTestFixture();
387 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800388 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100389 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
390 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200391 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800392 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
393 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200394 foreman_cif.config->loss_percent = 5;
395 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200396 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800397}
398
399// Ulpfec with H264 is an unsupported combination, so this test is only useful
400// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200401TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
402 auto fixture = CreateVideoQualityTestFixture();
403 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800404 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100405 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
406 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200407 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800408 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
409 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200410 foreman_cif.config->loss_percent = 5;
411 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200412 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800413}
414#endif // defined(WEBRTC_USE_H264)
415
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200416TEST(FullStackTest, ForemanCif500kbps) {
417 auto fixture = CreateVideoQualityTestFixture();
418 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700419 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100420 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
421 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200422 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700423 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
424 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200425 foreman_cif.config->queue_length_packets = 0;
426 foreman_cif.config->queue_delay_ms = 0;
427 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200428 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000429}
430
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200431TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
432 auto fixture = CreateVideoQualityTestFixture();
433 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700434 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100435 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
436 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200437 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700438 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
439 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200440 foreman_cif.config->queue_length_packets = 32;
441 foreman_cif.config->queue_delay_ms = 0;
442 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200443 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000444}
445
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200446TEST(FullStackTest, ForemanCif500kbps100ms) {
447 auto fixture = CreateVideoQualityTestFixture();
448 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700449 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100450 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
451 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200452 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700453 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
454 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200455 foreman_cif.config->queue_length_packets = 0;
456 foreman_cif.config->queue_delay_ms = 100;
457 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200458 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000459}
460
philipeldd8b0d82018-09-27 11:18:10 +0200461TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200462 auto fixture = CreateVideoQualityTestFixture();
463 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700464 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100465 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
466 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200467 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200468 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
469 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200470 foreman_cif.config->queue_length_packets = 32;
471 foreman_cif.config->queue_delay_ms = 100;
472 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200473 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200474 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700475}
476
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200477TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
478 auto fixture = CreateVideoQualityTestFixture();
479 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800480 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100481 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
482 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200483 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800484 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
485 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200486 foreman_cif.config->queue_length_packets = 32;
487 foreman_cif.config->queue_delay_ms = 100;
488 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200489 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000490}
491
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200492TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
493 auto fixture = CreateVideoQualityTestFixture();
494 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700495 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100496 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
497 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200498 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700499 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
500 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200501 foreman_cif.config->queue_length_packets = 32;
502 foreman_cif.config->queue_delay_ms = 100;
503 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200504 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000505}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000506
sprangff19d352017-09-06 07:14:02 -0700507// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200508TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
509 auto fixture = CreateVideoQualityTestFixture();
510 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700511 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100512 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000513 true, 1280, 720, 50, 30000,
514 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200515 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700516 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
517 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200518 conf_motion_hd.config->queue_length_packets = 32;
519 conf_motion_hd.config->queue_delay_ms = 100;
520 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200521 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700522}
523
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200524TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
525 auto fixture = CreateVideoQualityTestFixture();
526 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700527 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100528 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000529 true, 1280, 720, 50, 30000,
530 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200531 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700532 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
533 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200534 conf_motion_hd.config->queue_length_packets = 50;
535 conf_motion_hd.config->loss_percent = 3;
536 conf_motion_hd.config->queue_delay_ms = 100;
537 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200538 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700539}
540
philipeldd8b0d82018-09-27 11:18:10 +0200541TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200542 auto fixture = CreateVideoQualityTestFixture();
543 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700544 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100545 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000546 true, 1280, 720, 50, 30000,
547 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200548 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200549 conf_motion_hd.analyzer = {
550 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
551 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200552 conf_motion_hd.config->queue_length_packets = 50;
553 conf_motion_hd.config->loss_percent = 3;
554 conf_motion_hd.config->queue_delay_ms = 100;
555 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200556 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200557 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700558}
559
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200560TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
561 auto fixture = CreateVideoQualityTestFixture();
562 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700563 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100564 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000565 true, 1280, 720, 50, 30000,
566 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200567 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700568 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
569 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200570 conf_motion_hd.config->queue_length_packets = 50;
571 conf_motion_hd.config->loss_percent = 3;
572 conf_motion_hd.config->queue_delay_ms = 100;
573 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200574 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700575}
576
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200577TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
578 auto fixture = CreateVideoQualityTestFixture();
579 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700580 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100581 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000582 true, 1280, 720, 50, 30000,
583 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200584 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700585 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
586 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200587 conf_motion_hd.config->queue_length_packets = 50;
588 conf_motion_hd.config->loss_percent = 3;
589 conf_motion_hd.config->queue_delay_ms = 100;
590 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200591 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700592}
593
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200594TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
595 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200596 test::ScopedFieldTrials field_trial(
597 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200598 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700599 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100600 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000601 true, 1280, 720, 50, 30000,
602 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200603 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700604 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
605 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200606 conf_motion_hd.config->queue_length_packets = 50;
607 conf_motion_hd.config->loss_percent = 3;
608 conf_motion_hd.config->queue_delay_ms = 100;
609 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200610 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700611}
612
jianj390e64d2017-02-03 09:51:23 -0800613#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200614TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
615 auto fixture = CreateVideoQualityTestFixture();
616 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800617 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100618 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000619 true, 1280, 720, 50, 30000,
620 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200621 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800622 conf_motion_hd.analyzer = {
623 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
624 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200625 conf_motion_hd.config->queue_length_packets = 32;
626 conf_motion_hd.config->queue_delay_ms = 100;
627 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200628 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800629}
630#endif
631
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200632TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
633 auto fixture = CreateVideoQualityTestFixture();
634 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700635 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200636 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
637 1000000, false, "VP8", 2, 1, 400000,
638 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100639 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700640 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
641 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200642 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200643}
644
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200645TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
646 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb65aa012018-09-24 11:35:19 +0200647 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200648 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800649 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100650 screenshare.screenshare[0] = {true, false, 10};
651 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
652 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200653 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800654 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
655 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200656 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200657 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
658 1000000, false, "VP8", 3, 0, 400000,
659 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800660 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200661 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
662 1000000, false, "VP8", 2, 0, 400000,
663 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800664
665 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200666 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
667 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200668 screenshare.ss[0] = {
669 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
670 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200671 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800672}
673
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200674TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
675 auto fixture = CreateVideoQualityTestFixture();
676 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700677 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200678 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
679 1000000, false, "VP8", 2, 1, 400000,
680 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100681 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700682 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
683 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200684 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700685}
686
philipeldd8b0d82018-09-27 11:18:10 +0200687TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200688 auto fixture = CreateVideoQualityTestFixture();
689 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700690 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200691 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
692 1000000, false, "VP8", 2, 1, 400000,
693 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100694 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200695 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000696 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200697 screenshare.config->loss_percent = 5;
698 screenshare.config->queue_delay_ms = 200;
699 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200700 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200701 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800702}
703
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200704TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
705 auto fixture = CreateVideoQualityTestFixture();
706 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700707 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200708 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
709 1000000, false, "VP8", 2, 1, 400000,
710 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100711 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700712 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
713 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200714 screenshare.config->loss_percent = 10;
715 screenshare.config->queue_delay_ms = 200;
716 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200717 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800718}
719
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200720TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
721 auto fixture = CreateVideoQualityTestFixture();
722 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700723 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200724 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
725 1000000, false, "VP8", 2, 1, 400000,
726 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100727 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700728 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
729 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200730 screenshare.config->loss_percent = 5;
731 screenshare.config->link_capacity_kbps = 200;
732 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700733
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200734 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700735}
736
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200737TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
738 auto fixture = CreateVideoQualityTestFixture();
739 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700740 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200741 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
742 1000000, false, "VP8", 2, 1, 400000,
743 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100744 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700745 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
746 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200747 screenshare.config->loss_percent = 1;
748 screenshare.config->link_capacity_kbps = 1200;
749 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700750
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200751 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700752}
753
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200754const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000755 true, 1280, 720, 30, 800000,
756 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200757 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800758
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200759const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000760 true, 1280, 720, 30, 800000,
761 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200762 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800763
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200764const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000765 true, 640, 360, 30, 150000,
766 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200767 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800768
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200769const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000770 true, 320, 180, 30, 30000,
771 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200772 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800773
Peter Boström12996152016-05-14 02:03:18 +0200774#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200775TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
776 auto fixture = CreateVideoQualityTestFixture();
777 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700778 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100779 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
780 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200781 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100782 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700783 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
784 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200785 screenshare.ss[0] = {
786 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
787 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200788 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000789}
ilnik2a8c2f52017-02-15 02:23:28 -0800790
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200791TEST(FullStackTest, VP9SVC_3SL_High) {
792 auto fixture = CreateVideoQualityTestFixture();
793 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800794 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100795 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800796 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
797 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200798
Sergey Silkin57027362018-05-15 09:12:05 +0200799 simulcast.ss[0] = {
800 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
801 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200802 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800803}
804
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200805TEST(FullStackTest, VP9SVC_3SL_Medium) {
806 auto fixture = CreateVideoQualityTestFixture();
807 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800808 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100809 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800810 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
811 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200812 simulcast.ss[0] = {
813 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
814 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200815 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800816}
817
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200818TEST(FullStackTest, VP9SVC_3SL_Low) {
819 auto fixture = CreateVideoQualityTestFixture();
820 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800821 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100822 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800823 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200824 simulcast.ss[0] = {
825 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
826 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200827 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800828}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200829
Sergey Silkin7f978f12018-09-10 12:01:49 +0000830// bugs.webrtc.org/9506
831#if !defined(WEBRTC_MAC)
832
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200833TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200834 webrtc::test::ScopedFieldTrials override_trials(
835 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200836 auto fixture = CreateVideoQualityTestFixture();
837 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200838 simulcast.call.send_side_bwe = true;
839 simulcast.video[0] = kSvcVp9Video;
840 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
841 kFullStackTestDurationSecs};
842 simulcast.ss[0] = {
843 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
844 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200845 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200846}
847
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200848TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200849 webrtc::test::ScopedFieldTrials override_trials(
850 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200851 auto fixture = CreateVideoQualityTestFixture();
852 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200853 simulcast.call.send_side_bwe = true;
854 simulcast.video[0] = kSvcVp9Video;
855 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
856 kFullStackTestDurationSecs};
857 simulcast.ss[0] = {
858 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
859 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200860 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200861}
862
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200863TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200864 webrtc::test::ScopedFieldTrials override_trials(
865 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200866 auto fixture = CreateVideoQualityTestFixture();
867 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200868 simulcast.call.send_side_bwe = true;
869 simulcast.video[0] = kSvcVp9Video;
870 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
871 kFullStackTestDurationSecs};
872 simulcast.ss[0] = {
873 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
874 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200875 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200876}
“Michael277a6562018-06-01 14:09:19 -0500877
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200878TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200879 webrtc::test::ScopedFieldTrials override_trials(
880 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200881 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200882 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500883 simulcast.call.send_side_bwe = true;
884 simulcast.video[0] = kSvcVp9Video;
885 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
886 kFullStackTestDurationSecs};
887 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200888 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500889 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200890 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200891 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200892 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500893}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000894#endif // !defined(WEBRTC_MAC)
895
Peter Boström12996152016-05-14 02:03:18 +0200896#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800897
ilnik6b826ef2017-06-16 06:53:48 -0700898// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000899// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
900#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700901#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
902#else
903#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
904#endif
905
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200906TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
907 auto fixture = CreateVideoQualityTestFixture();
908 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700909 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100910 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
911 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200912 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700913 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
914 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200915 simulcast.config->loss_percent = 0;
916 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200917 std::vector<VideoStream> streams = {
918 VideoQualityTest::DefaultVideoStream(simulcast, 0),
919 VideoQualityTest::DefaultVideoStream(simulcast, 0),
920 VideoQualityTest::DefaultVideoStream(simulcast, 0)
921 };
Sergey Silkin57027362018-05-15 09:12:05 +0200922 simulcast.ss[0] = {
923 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
924 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200925 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
926 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200927 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700928}
929
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200930TEST(FullStackTest, SimulcastVP8_3SL_High) {
931 auto fixture = CreateVideoQualityTestFixture();
932 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800933 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100934 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800935 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800936 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200937 simulcast.config->loss_percent = 0;
938 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200939 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100940 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200941 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100942 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200943 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100944 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800945
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100946 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200947 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
948 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
949 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200950 simulcast.ss[0] = {
951 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
952 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200953 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800954}
955
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200956TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
957 auto fixture = CreateVideoQualityTestFixture();
958 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800959 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100960 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800961 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800962 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200963 simulcast.config->loss_percent = 0;
964 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200965 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100966 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200967 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100968 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200969 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100970 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800971
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100972 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200973 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
974 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
975 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200976 simulcast.ss[0] = {
977 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
978 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200979 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800980}
981
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200982TEST(FullStackTest, SimulcastVP8_3SL_Low) {
983 auto fixture = CreateVideoQualityTestFixture();
984 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800985 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100986 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800987 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800988 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200989 simulcast.config->loss_percent = 0;
990 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200991 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100992 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200993 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100994 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200995 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100996 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800997
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100998 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200999 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1000 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1001 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001002 simulcast.ss[0] = {
1003 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1004 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001005 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001006}
1007
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001008TEST(FullStackTest, LargeRoomVP8_5thumb) {
1009 auto fixture = CreateVideoQualityTestFixture();
1010 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001011 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001012 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001013 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1014 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001015 large_room.config->loss_percent = 0;
1016 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001017 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001018 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001019 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001020 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001021 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001022 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001023
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001024 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001025 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1026 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1027 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001028 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001029 large_room.ss[0] = {
1030 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1031 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001032 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001033}
1034
oprypin743117f2017-09-15 05:24:24 -07001035#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1036// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001037// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1038#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001039#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001040#else
1041#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001042#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001043#endif
1044
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001045TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1046 auto fixture = CreateVideoQualityTestFixture();
1047 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001048 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001049 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001050 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1051 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001052 large_room.config->loss_percent = 0;
1053 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001054 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001055 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001056 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001057 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001058 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001059 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001060
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001061 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001062 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1063 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1064 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001065 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001066 large_room.ss[0] = {
1067 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1068 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001069 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001070}
1071
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001072TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1073 auto fixture = CreateVideoQualityTestFixture();
1074 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001075 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001076 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001077 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1078 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001079 large_room.config->loss_percent = 0;
1080 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001081 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001082 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001083 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001084 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001085 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001086 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001087
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001088 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001089 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1090 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1091 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001092 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001093 large_room.ss[0] = {
1094 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1095 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001096 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001097}
1098
philipeldd8b0d82018-09-27 11:18:10 +02001099INSTANTIATE_TEST_CASE_P(FullStackTest,
1100 GenericDescriptorTest,
1101 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1102 "WebRTC-GenericDescriptor/Enabled/"));
1103
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001104class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001105
1106// Disable dual video test on mobile device becuase it's too heavy.
1107#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1108TEST_P(DualStreamsTest,
1109 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1110 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001111 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1112 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001113 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001114 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001115
1116 // Screenshare Settings.
1117 dual_streams.screenshare[first_stream] = {true, false, 10};
1118 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1119 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001120 2, 400000, false, false, false,
1121 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001122
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001123 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001124 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1125 1000000, false, "VP8", 3, 0, 400000,
1126 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001127 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001128 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1129 1000000, false, "VP8", 2, 0, 400000,
1130 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001131 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001132 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1133 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001134
Sergey Silkin57027362018-05-15 09:12:05 +02001135 dual_streams.ss[first_stream] = {
1136 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1137 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001138
1139 // Video settings.
1140 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1141
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001142 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001143 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001144 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001145 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001146 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001147 video_params_low.video[0] = kSimulcastVp8VideoLow;
1148 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001149 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1150 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1151 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001152
1153 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001154 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1155 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001156
1157 // Call settings.
1158 dual_streams.call.send_side_bwe = true;
1159 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001160 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1161 std::to_string(first_stream);
1162 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001163 dual_streams.config->loss_percent = 1;
1164 dual_streams.config->link_capacity_kbps = 7500;
1165 dual_streams.config->queue_length_packets = 30;
1166 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001167
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001168 auto fixture = CreateVideoQualityTestFixture();
1169 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001170}
1171#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1172
1173TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001174 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001175 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001176 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001177 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001178
1179 // Screenshare Settings.
1180 dual_streams.screenshare[first_stream] = {true, false, 10};
1181 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1182 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001183 2, 400000, false, false, false,
1184 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001185 // Video settings.
1186 dual_streams.video[1 - first_stream] = {
1187 true, 1280, 720, 30, 150000,
1188 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001189 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001190
1191 // Call settings.
1192 dual_streams.call.send_side_bwe = true;
1193 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001194 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1195 std::to_string(first_stream);
1196 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001197 dual_streams.config->loss_percent = 1;
1198 dual_streams.config->link_capacity_kbps = 5000;
1199 dual_streams.config->queue_length_packets = 30;
1200 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001201
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001202 auto fixture = CreateVideoQualityTestFixture();
1203 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001204}
1205
1206INSTANTIATE_TEST_CASE_P(FullStackTest,
1207 DualStreamsTest,
1208 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001209
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001210} // namespace webrtc