blob: 21a8e621bc30180db2862a962e2cbb3c3f1d3a35 [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 Bonadeic538fc72018-10-19 15:04:07 +000025DEFINE_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 Bonadeic538fc72018-10-19 15:04:07 +000032DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020033std::string RtpDumpName() {
34 return static_cast<std::string>(FLAG_rtp_dump_name);
35}
Mirko Bonadeic538fc72018-10-19 15:04:07 +000036DEFINE_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");
Sebastian Janssonf8518882018-05-31 14:52:59 +020040std::string EncodedFramePath() {
41 return static_cast<std::string>(FLAG_encoded_frame_path);
42}
43} // namespace flags
44} // namespace webrtc
45
46namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000047
sprang89c4a7e2017-06-30 13:27:40 -070048namespace {
brandtrdd369c62016-11-16 23:56:57 -080049static const int kFullStackTestDurationSecs = 45;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020050const char kPacerPushBackExperiment[] =
51 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000052
Patrik Höglundb6b29e02018-06-21 16:58:01 +020053struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000054 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020055 ParamsWithLogging() {
56 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020057 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
58 flags::EncodedFramePath()};
Artem Titov75e36472018-10-08 12:28:56 +020059 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000060 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000061};
62
Patrik Höglundb6b29e02018-06-21 16:58:01 +020063std::unique_ptr<VideoQualityTestFixtureInterface>
64CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020065 // The components will normally be nullptr (= use defaults), but it's possible
66 // for external test runners to override the list of injected components.
67 auto components = TestDependencyFactory::GetInstance().CreateComponents();
68 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020069}
70
Erik Språngb6b1cac2018-08-09 16:12:54 +020071// Takes the current active field trials set, and appends some new trials.
72std::string AppendFieldTrials(std::string new_trial_string) {
73 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
74}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020075} // namespace
76
sprangce4aef12015-11-02 07:23:20 -080077// VideoQualityTest::Params params = {
78// { ... }, // Common.
79// { ... }, // Video-specific settings.
80// { ... }, // Screenshare-specific settings.
81// { ... }, // Analyzer settings.
82// pipe, // FakeNetworkPipe::Config
83// { ... }, // Spatial scalability.
84// logs // bool
85// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000086
philipeldd8b0d82018-09-27 11:18:10 +020087class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
88 public:
philipelf638bbc2018-10-04 16:57:12 +020089 GenericDescriptorTest()
90 : field_trial_(GetParam()),
91 generic_descriptor_enabled_(
92 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +020093
94 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +020095 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +020096 base += "_generic_descriptor";
97 return base;
98 }
99
philipelf638bbc2018-10-04 16:57:12 +0200100 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
101
philipeldd8b0d82018-09-27 11:18:10 +0200102 private:
103 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200104 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200105};
106
Peter Boström12996152016-05-14 02:03:18 +0200107#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200108TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
109 auto fixture = CreateVideoQualityTestFixture();
110 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800111 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100112 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
113 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200114 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800115 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
116 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200117 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800118}
119
philipeldd8b0d82018-09-27 11:18:10 +0200120TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200121 auto fixture = CreateVideoQualityTestFixture();
122 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800123 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100124 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
125 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200126 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200127 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
128 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200129 foreman_cif.config->loss_percent = 5;
130 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200131 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200132 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800133}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800134
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700135TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
136 // Profile 2 might not be available on some platforms until
137 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
138 bool profile_2_is_supported = false;
139 for (const auto& codec : SupportedVP9Codecs()) {
140 if (ParseSdpForVP9Profile(codec.parameters)
141 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
142 profile_2_is_supported = true;
143 }
144 }
145 if (!profile_2_is_supported)
146 return;
147 auto fixture = CreateVideoQualityTestFixture();
148
149 SdpVideoFormat::Parameters vp92 = {
150 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
151 ParamsWithLogging generator;
152 generator.call.send_side_bwe = true;
153 generator.video[0] = {
154 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
155 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
156 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
157 kFullStackTestDurationSecs};
158 fixture->RunWithAnalyzer(generator);
159}
160
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200161TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
162 auto fixture = CreateVideoQualityTestFixture();
163 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800164 foreman_cif.call.send_side_bwe = true;
165 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
166 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200167 0, 0, false, false, false,
168 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800169 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
170 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200171 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800172}
173
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200174TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
175 auto fixture = CreateVideoQualityTestFixture();
176
177 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700178 generator.call.send_side_bwe = true;
179 generator.video[0] = {true, 352, 288, 30, 700000,
180 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200181 0, 0, false, false, false,
182 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700183 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
184 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200185 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800186}
187
Peter Boström12996152016-05-14 02:03:18 +0200188#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800189
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200190#if defined(WEBRTC_LINUX)
191// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
192#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
193#else
194#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
195#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200196TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
197 auto fixture = CreateVideoQualityTestFixture();
198 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700199 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100200 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
201 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200202 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700203 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
204 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200205 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000206}
207
philipeldd8b0d82018-09-27 11:18:10 +0200208TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200209 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000210 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200211 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700212 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100213 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
214 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200215 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200216 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
217 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200218 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200219 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000220}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000221
philipeldd8b0d82018-09-27 11:18:10 +0200222TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200223 auto fixture = CreateVideoQualityTestFixture();
224 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800225 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100226 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
227 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200228 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200229 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
230 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200231 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200232 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800233}
234
Niels Möller6aa415e2018-06-07 11:14:13 +0200235// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200236TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
237 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200238 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200239 foreman_cif.call.send_side_bwe = true;
240 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
241 500000, 2000000, false, "VP8", 1,
242 0, 0, false, false, true, "foreman_cif"};
243 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
244 0.0, 0.0,
245 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200246 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200247 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200248}
249
philipeldd8b0d82018-09-27 11:18:10 +0200250TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200251 auto fixture = CreateVideoQualityTestFixture();
252 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700253 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100254 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
255 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200256 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200257 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000258 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200259 foreman_cif.config->loss_percent = 5;
260 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200261 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200262 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000263}
264
philipeldd8b0d82018-09-27 11:18:10 +0200265TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200266 auto fixture = CreateVideoQualityTestFixture();
267 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800268 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100269 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
270 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200271 0, 0, true, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200272 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
273 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200274 foreman_cif.config->loss_percent = 5;
275 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200276 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200277 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800278}
279
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200280TEST(FullStackTest, ForemanCifPlr5Flexfec) {
281 auto fixture = CreateVideoQualityTestFixture();
282 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800283 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100284 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
285 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200286 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800287 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
288 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200289 foreman_cif.config->loss_percent = 5;
290 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200291 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800292}
293
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200294TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
295 auto fixture = CreateVideoQualityTestFixture();
296 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700297 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100298 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
299 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200300 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700301 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
302 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200303 foreman_cif.config->loss_percent = 3;
304 foreman_cif.config->link_capacity_kbps = 500;
305 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200306 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700307}
308
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200309TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
310 auto fixture = CreateVideoQualityTestFixture();
311 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700312 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100313 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
314 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200315 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700316 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
317 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200318 foreman_cif.config->loss_percent = 3;
319 foreman_cif.config->link_capacity_kbps = 500;
320 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200321 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700322}
323
brandtrdd369c62016-11-16 23:56:57 -0800324#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200325TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
326 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800327 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200328 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800329 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100330 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
331 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200332 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800333 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
334 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200335 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800336}
337
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200338TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
339 auto fixture = CreateVideoQualityTestFixture();
340 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800341 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100342 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
343 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200344 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800345 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
346 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200347 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800348}
349
philipeldd8b0d82018-09-27 11:18:10 +0200350TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200351 auto fixture = CreateVideoQualityTestFixture();
352 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, 30000,
355 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200356 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200357 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
358 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200359 foreman_cif.config->loss_percent = 5;
360 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200361 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200362 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800363}
364
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200365TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000366 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100367 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200368 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100369
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200370 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100371 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100372 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
373 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200374 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100375 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
376 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200377 foreman_cif.config->loss_percent = 5;
378 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200379 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100380}
381
brandtrdd369c62016-11-16 23:56:57 -0800382// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200383TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
384 auto fixture = CreateVideoQualityTestFixture();
385 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800386 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100387 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
388 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200389 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800390 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
391 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200392 foreman_cif.config->loss_percent = 5;
393 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200394 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800395}
396
397// Ulpfec with H264 is an unsupported combination, so this test is only useful
398// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200399TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
400 auto fixture = CreateVideoQualityTestFixture();
401 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800402 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100403 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
404 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200405 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800406 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
407 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200408 foreman_cif.config->loss_percent = 5;
409 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200410 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800411}
412#endif // defined(WEBRTC_USE_H264)
413
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200414TEST(FullStackTest, ForemanCif500kbps) {
415 auto fixture = CreateVideoQualityTestFixture();
416 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700417 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100418 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
419 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200420 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700421 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
422 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200423 foreman_cif.config->queue_length_packets = 0;
424 foreman_cif.config->queue_delay_ms = 0;
425 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200426 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000427}
428
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200429TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
430 auto fixture = CreateVideoQualityTestFixture();
431 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700432 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100433 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
434 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200435 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700436 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
437 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200438 foreman_cif.config->queue_length_packets = 32;
439 foreman_cif.config->queue_delay_ms = 0;
440 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200441 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000442}
443
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200444TEST(FullStackTest, ForemanCif500kbps100ms) {
445 auto fixture = CreateVideoQualityTestFixture();
446 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700447 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100448 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
449 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200450 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700451 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
452 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200453 foreman_cif.config->queue_length_packets = 0;
454 foreman_cif.config->queue_delay_ms = 100;
455 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200456 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000457}
458
philipeldd8b0d82018-09-27 11:18:10 +0200459TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200460 auto fixture = CreateVideoQualityTestFixture();
461 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700462 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100463 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
464 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200465 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200466 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
467 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200468 foreman_cif.config->queue_length_packets = 32;
469 foreman_cif.config->queue_delay_ms = 100;
470 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200471 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200472 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700473}
474
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200475TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
476 auto fixture = CreateVideoQualityTestFixture();
477 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800478 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100479 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
480 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200481 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800482 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
483 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200484 foreman_cif.config->queue_length_packets = 32;
485 foreman_cif.config->queue_delay_ms = 100;
486 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200487 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000488}
489
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200490TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
491 auto fixture = CreateVideoQualityTestFixture();
492 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700493 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100494 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
495 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200496 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700497 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
498 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200499 foreman_cif.config->queue_length_packets = 32;
500 foreman_cif.config->queue_delay_ms = 100;
501 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200502 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000503}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000504
sprangff19d352017-09-06 07:14:02 -0700505// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200506TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
507 auto fixture = CreateVideoQualityTestFixture();
508 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700509 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100510 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000511 true, 1280, 720, 50, 30000,
512 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200513 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700514 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
515 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200516 conf_motion_hd.config->queue_length_packets = 32;
517 conf_motion_hd.config->queue_delay_ms = 100;
518 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200519 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700520}
521
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000522TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200523 auto fixture = CreateVideoQualityTestFixture();
524 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700525 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100526 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000527 true, 1280, 720, 50, 30000,
528 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200529 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000530 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
531 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200532 conf_motion_hd.config->queue_length_packets = 50;
533 conf_motion_hd.config->loss_percent = 3;
534 conf_motion_hd.config->queue_delay_ms = 100;
535 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200536 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700537}
538
philipeldd8b0d82018-09-27 11:18:10 +0200539TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200540 auto fixture = CreateVideoQualityTestFixture();
541 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700542 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100543 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000544 true, 1280, 720, 50, 30000,
545 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200546 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200547 conf_motion_hd.analyzer = {
548 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
549 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200550 conf_motion_hd.config->queue_length_packets = 50;
551 conf_motion_hd.config->loss_percent = 3;
552 conf_motion_hd.config->queue_delay_ms = 100;
553 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200554 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200555 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700556}
557
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200558TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
559 auto fixture = CreateVideoQualityTestFixture();
560 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700561 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100562 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000563 true, 1280, 720, 50, 30000,
564 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200565 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700566 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
567 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200568 conf_motion_hd.config->queue_length_packets = 50;
569 conf_motion_hd.config->loss_percent = 3;
570 conf_motion_hd.config->queue_delay_ms = 100;
571 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200572 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700573}
574
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200575TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
576 auto fixture = CreateVideoQualityTestFixture();
577 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700578 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100579 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000580 true, 1280, 720, 50, 30000,
581 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200582 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700583 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
584 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200585 conf_motion_hd.config->queue_length_packets = 50;
586 conf_motion_hd.config->loss_percent = 3;
587 conf_motion_hd.config->queue_delay_ms = 100;
588 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200589 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700590}
591
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200592TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000593 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200594 test::ScopedFieldTrials field_trial(
595 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200596 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700597 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100598 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000599 true, 1280, 720, 50, 30000,
600 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200601 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700602 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
603 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200604 conf_motion_hd.config->queue_length_packets = 50;
605 conf_motion_hd.config->loss_percent = 3;
606 conf_motion_hd.config->queue_delay_ms = 100;
607 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200608 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700609}
610
jianj390e64d2017-02-03 09:51:23 -0800611#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200612TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
613 auto fixture = CreateVideoQualityTestFixture();
614 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800615 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100616 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000617 true, 1280, 720, 50, 30000,
618 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200619 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800620 conf_motion_hd.analyzer = {
621 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
622 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200623 conf_motion_hd.config->queue_length_packets = 32;
624 conf_motion_hd.config->queue_delay_ms = 100;
625 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200626 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800627}
628#endif
629
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200630TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
631 auto fixture = CreateVideoQualityTestFixture();
632 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700633 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200634 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
635 1000000, false, "VP8", 2, 1, 400000,
636 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100637 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700638 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
639 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200640 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200641}
642
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200643// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
644#if !defined(WEBRTC_MAC)
645const char kScreenshareSimulcastExperiment[] =
646 "WebRTC-SimulcastScreenshare/Enabled/";
647
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200648TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
649 auto fixture = CreateVideoQualityTestFixture();
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000650 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200651 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800652 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100653 screenshare.screenshare[0] = {true, false, 10};
654 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
655 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200656 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800657 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
658 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200659 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200660 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
661 1000000, false, "VP8", 3, 0, 400000,
662 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800663 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200664 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
665 1000000, false, "VP8", 2, 0, 400000,
666 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800667
668 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200669 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
670 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200671 screenshare.ss[0] = {
672 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
673 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200674 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800675}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200676#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800677
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200678TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
679 auto fixture = CreateVideoQualityTestFixture();
680 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700681 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200682 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
683 1000000, false, "VP8", 2, 1, 400000,
684 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100685 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700686 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
687 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200688 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700689}
690
philipeldd8b0d82018-09-27 11:18:10 +0200691TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200692 auto fixture = CreateVideoQualityTestFixture();
693 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700694 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200695 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
696 1000000, false, "VP8", 2, 1, 400000,
697 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100698 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200699 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000700 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200701 screenshare.config->loss_percent = 5;
702 screenshare.config->queue_delay_ms = 200;
703 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200704 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200705 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800706}
707
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200708TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
709 auto fixture = CreateVideoQualityTestFixture();
710 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700711 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200712 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
713 1000000, false, "VP8", 2, 1, 400000,
714 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100715 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700716 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
717 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200718 screenshare.config->loss_percent = 10;
719 screenshare.config->queue_delay_ms = 200;
720 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200721 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800722}
723
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200724TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
725 auto fixture = CreateVideoQualityTestFixture();
726 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700727 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200728 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
729 1000000, false, "VP8", 2, 1, 400000,
730 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100731 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700732 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
733 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200734 screenshare.config->loss_percent = 5;
735 screenshare.config->link_capacity_kbps = 200;
736 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700737
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200738 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700739}
740
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200741TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
742 auto fixture = CreateVideoQualityTestFixture();
743 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700744 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200745 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
746 1000000, false, "VP8", 2, 1, 400000,
747 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100748 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700749 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
750 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200751 screenshare.config->loss_percent = 1;
752 screenshare.config->link_capacity_kbps = 1200;
753 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700754
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200755 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700756}
757
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200758const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000759 true, 1280, 720, 30, 800000,
760 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200761 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800762
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200763const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000764 true, 1280, 720, 30, 800000,
765 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200766 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800767
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200768const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000769 true, 640, 360, 30, 150000,
770 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200771 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800772
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200773const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000774 true, 320, 180, 30, 30000,
775 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200776 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800777
Peter Boström12996152016-05-14 02:03:18 +0200778#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200779TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
780 auto fixture = CreateVideoQualityTestFixture();
781 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700782 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100783 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
784 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200785 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100786 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700787 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
788 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200789 screenshare.ss[0] = {
790 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
791 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200792 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000793}
ilnik2a8c2f52017-02-15 02:23:28 -0800794
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200795TEST(FullStackTest, VP9SVC_3SL_High) {
796 auto fixture = CreateVideoQualityTestFixture();
797 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800798 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100799 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800800 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
801 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200802
Sergey Silkin57027362018-05-15 09:12:05 +0200803 simulcast.ss[0] = {
804 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
805 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200806 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800807}
808
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200809TEST(FullStackTest, VP9SVC_3SL_Medium) {
810 auto fixture = CreateVideoQualityTestFixture();
811 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800812 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100813 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800814 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
815 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200816 simulcast.ss[0] = {
817 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
818 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200819 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800820}
821
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822TEST(FullStackTest, VP9SVC_3SL_Low) {
823 auto fixture = CreateVideoQualityTestFixture();
824 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800825 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100826 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800827 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200828 simulcast.ss[0] = {
829 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
830 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200831 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800832}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200833
Sergey Silkin7f978f12018-09-10 12:01:49 +0000834// bugs.webrtc.org/9506
835#if !defined(WEBRTC_MAC)
836
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200837TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200838 webrtc::test::ScopedFieldTrials override_trials(
839 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200840 auto fixture = CreateVideoQualityTestFixture();
841 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200842 simulcast.call.send_side_bwe = true;
843 simulcast.video[0] = kSvcVp9Video;
844 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
845 kFullStackTestDurationSecs};
846 simulcast.ss[0] = {
847 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
848 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200849 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200850}
851
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200852TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200853 webrtc::test::ScopedFieldTrials override_trials(
854 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200855 auto fixture = CreateVideoQualityTestFixture();
856 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200857 simulcast.call.send_side_bwe = true;
858 simulcast.video[0] = kSvcVp9Video;
859 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
860 kFullStackTestDurationSecs};
861 simulcast.ss[0] = {
862 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
863 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200864 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200865}
866
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200867TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200868 webrtc::test::ScopedFieldTrials override_trials(
869 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200870 auto fixture = CreateVideoQualityTestFixture();
871 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200872 simulcast.call.send_side_bwe = true;
873 simulcast.video[0] = kSvcVp9Video;
874 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
875 kFullStackTestDurationSecs};
876 simulcast.ss[0] = {
877 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
878 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200879 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200880}
“Michael277a6562018-06-01 14:09:19 -0500881
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200882TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200883 webrtc::test::ScopedFieldTrials override_trials(
884 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200885 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200886 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500887 simulcast.call.send_side_bwe = true;
888 simulcast.video[0] = kSvcVp9Video;
889 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
890 kFullStackTestDurationSecs};
891 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200892 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500893 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200894 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200895 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200896 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500897}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000898#endif // !defined(WEBRTC_MAC)
899
Peter Boström12996152016-05-14 02:03:18 +0200900#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800901
ilnik6b826ef2017-06-16 06:53:48 -0700902// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000903// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
904#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700905#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
906#else
907#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
908#endif
909
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200910TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
911 auto fixture = CreateVideoQualityTestFixture();
912 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700913 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100914 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
915 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200916 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700917 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
918 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200919 simulcast.config->loss_percent = 0;
920 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200921 std::vector<VideoStream> streams = {
922 VideoQualityTest::DefaultVideoStream(simulcast, 0),
923 VideoQualityTest::DefaultVideoStream(simulcast, 0),
924 VideoQualityTest::DefaultVideoStream(simulcast, 0)
925 };
Sergey Silkin57027362018-05-15 09:12:05 +0200926 simulcast.ss[0] = {
927 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
928 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200929 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
930 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200931 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700932}
933
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200934TEST(FullStackTest, SimulcastVP8_3SL_High) {
935 auto fixture = CreateVideoQualityTestFixture();
936 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800937 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100938 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800939 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800940 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200941 simulcast.config->loss_percent = 0;
942 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200943 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100944 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200945 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100946 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200947 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100948 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800949
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100950 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200951 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
952 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
953 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200954 simulcast.ss[0] = {
955 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
956 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200957 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800958}
959
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200960TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
961 auto fixture = CreateVideoQualityTestFixture();
962 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800963 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100964 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800965 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800966 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200967 simulcast.config->loss_percent = 0;
968 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200969 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100970 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200971 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100972 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200973 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100974 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800975
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100976 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200977 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
978 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
979 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200980 simulcast.ss[0] = {
981 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
982 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200983 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800984}
985
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200986TEST(FullStackTest, SimulcastVP8_3SL_Low) {
987 auto fixture = CreateVideoQualityTestFixture();
988 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800989 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100990 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800991 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800992 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200993 simulcast.config->loss_percent = 0;
994 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200995 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100996 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200997 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100998 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200999 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001000 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001001
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001002 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001003 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1004 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1005 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001006 simulcast.ss[0] = {
1007 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1008 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001009 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001010}
1011
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001012TEST(FullStackTest, LargeRoomVP8_5thumb) {
1013 auto fixture = CreateVideoQualityTestFixture();
1014 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001015 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001016 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001017 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1018 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001019 large_room.config->loss_percent = 0;
1020 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001021 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001022 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001023 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001024 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001025 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001026 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001027
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001028 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001029 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1030 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1031 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001032 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001033 large_room.ss[0] = {
1034 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1035 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001036 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001037}
1038
oprypin743117f2017-09-15 05:24:24 -07001039#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1040// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001041// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1042#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001043#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001044#else
1045#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001046#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001047#endif
1048
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001049TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1050 auto fixture = CreateVideoQualityTestFixture();
1051 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001052 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001053 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001054 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1055 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001056 large_room.config->loss_percent = 0;
1057 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001058 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001059 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001060 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001061 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001062 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001063 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001064
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001065 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001066 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1067 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1068 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001069 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001070 large_room.ss[0] = {
1071 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1072 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001073 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001074}
1075
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001076TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1077 auto fixture = CreateVideoQualityTestFixture();
1078 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001079 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001080 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001081 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1082 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001083 large_room.config->loss_percent = 0;
1084 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001085 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001086 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001087 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001088 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001089 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001090 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001091
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001092 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001093 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1094 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1095 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001096 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001097 large_room.ss[0] = {
1098 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1099 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001100 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001101}
1102
philipeldd8b0d82018-09-27 11:18:10 +02001103INSTANTIATE_TEST_CASE_P(FullStackTest,
1104 GenericDescriptorTest,
1105 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1106 "WebRTC-GenericDescriptor/Enabled/"));
1107
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001109
1110// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001111// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1112#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001113TEST_P(DualStreamsTest,
1114 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1115 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001116 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1117 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001118 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001119 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001120
1121 // Screenshare Settings.
1122 dual_streams.screenshare[first_stream] = {true, false, 10};
1123 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1124 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001125 2, 400000, false, false, false,
1126 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001127
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001128 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001129 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1130 1000000, false, "VP8", 3, 0, 400000,
1131 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001132 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001133 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1134 1000000, false, "VP8", 2, 0, 400000,
1135 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001136 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001137 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1138 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001139
Sergey Silkin57027362018-05-15 09:12:05 +02001140 dual_streams.ss[first_stream] = {
1141 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1142 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001143
1144 // Video settings.
1145 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1146
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001147 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001148 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001149 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001150 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001151 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001152 video_params_low.video[0] = kSimulcastVp8VideoLow;
1153 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001154 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1155 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1156 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001157
1158 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001159 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1160 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001161
1162 // Call settings.
1163 dual_streams.call.send_side_bwe = true;
1164 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001165 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1166 std::to_string(first_stream);
1167 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001168 dual_streams.config->loss_percent = 1;
1169 dual_streams.config->link_capacity_kbps = 7500;
1170 dual_streams.config->queue_length_packets = 30;
1171 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001172
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001173 auto fixture = CreateVideoQualityTestFixture();
1174 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001175}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001176#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1177 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001178
1179TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001180 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001181 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001182 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001183 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001184
1185 // Screenshare Settings.
1186 dual_streams.screenshare[first_stream] = {true, false, 10};
1187 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1188 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001189 2, 400000, false, false, false,
1190 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001191 // Video settings.
1192 dual_streams.video[1 - first_stream] = {
1193 true, 1280, 720, 30, 150000,
1194 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001195 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001196
1197 // Call settings.
1198 dual_streams.call.send_side_bwe = true;
1199 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001200 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1201 std::to_string(first_stream);
1202 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001203 dual_streams.config->loss_percent = 1;
1204 dual_streams.config->link_capacity_kbps = 5000;
1205 dual_streams.config->queue_length_packets = 30;
1206 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001207
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001208 auto fixture = CreateVideoQualityTestFixture();
1209 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001210}
1211
1212INSTANTIATE_TEST_CASE_P(FullStackTest,
1213 DualStreamsTest,
1214 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001215
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001216} // namespace webrtc