blob: 6562173e879a2037ed88de9696acc3d0c6e16042 [file] [log] [blame]
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10#include <stdio.h>
11
Patrik Höglundd8f3c172018-09-26 14:39:17 +020012#include "api/test/test_dependency_factory.h"
Emircan Uysaler0823eec2018-07-13 17:10:00 -070013#include "media/base/vp9_profile.h"
14#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssoncabe3832018-01-12 10:54:18 +010015#include "rtc_base/experiments/alr_experiment.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020016#include "rtc_base/flags.h"
Mirko Bonadei17f48782018-09-28 08:51:10 +020017#include "system_wrappers/include/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020018#include "test/field_trial.h"
19#include "test/gtest.h"
20#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000021
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000022namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020023namespace flags {
24
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020025WEBRTC_DEFINE_string(rtc_event_log_name,
26 "",
27 "Filename for rtc event log. Two files "
28 "with \"_send\" and \"_recv\" suffixes will be created.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020029std::string RtcEventLogName() {
30 return static_cast<std::string>(FLAG_rtc_event_log_name);
31}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020032WEBRTC_DEFINE_string(rtp_dump_name,
33 "",
34 "Filename for dumped received RTP stream.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020035std::string RtpDumpName() {
36 return static_cast<std::string>(FLAG_rtp_dump_name);
37}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020038WEBRTC_DEFINE_string(
39 encoded_frame_path,
40 "",
41 "The base path for encoded frame logs. Created files will have "
42 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
Sebastian Janssonf8518882018-05-31 14:52:59 +020043std::string EncodedFramePath() {
44 return static_cast<std::string>(FLAG_encoded_frame_path);
45}
46} // namespace flags
47} // namespace webrtc
48
49namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000050
sprang89c4a7e2017-06-30 13:27:40 -070051namespace {
brandtrdd369c62016-11-16 23:56:57 -080052static const int kFullStackTestDurationSecs = 45;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020053const char kPacerPushBackExperiment[] =
54 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000055
Patrik Höglundb6b29e02018-06-21 16:58:01 +020056struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000057 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020058 ParamsWithLogging() {
59 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020060 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
61 flags::EncodedFramePath()};
Artem Titov75e36472018-10-08 12:28:56 +020062 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000063 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000064};
65
Patrik Höglundb6b29e02018-06-21 16:58:01 +020066std::unique_ptr<VideoQualityTestFixtureInterface>
67CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020068 // The components will normally be nullptr (= use defaults), but it's possible
69 // for external test runners to override the list of injected components.
70 auto components = TestDependencyFactory::GetInstance().CreateComponents();
71 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020072}
73
Erik Språngb6b1cac2018-08-09 16:12:54 +020074// Takes the current active field trials set, and appends some new trials.
75std::string AppendFieldTrials(std::string new_trial_string) {
76 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
77}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020078} // namespace
79
sprangce4aef12015-11-02 07:23:20 -080080// VideoQualityTest::Params params = {
81// { ... }, // Common.
82// { ... }, // Video-specific settings.
83// { ... }, // Screenshare-specific settings.
84// { ... }, // Analyzer settings.
85// pipe, // FakeNetworkPipe::Config
86// { ... }, // Spatial scalability.
87// logs // bool
88// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000089
philipeldd8b0d82018-09-27 11:18:10 +020090class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
91 public:
philipelf638bbc2018-10-04 16:57:12 +020092 GenericDescriptorTest()
93 : field_trial_(GetParam()),
94 generic_descriptor_enabled_(
95 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +020096
97 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +020098 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +020099 base += "_generic_descriptor";
100 return base;
101 }
102
philipelf638bbc2018-10-04 16:57:12 +0200103 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
104
philipeldd8b0d82018-09-27 11:18:10 +0200105 private:
106 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200107 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200108};
109
Peter Boström12996152016-05-14 02:03:18 +0200110#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200111TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
112 auto fixture = CreateVideoQualityTestFixture();
113 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800114 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100115 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
116 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200117 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800118 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
119 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200120 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800121}
122
philipeldd8b0d82018-09-27 11:18:10 +0200123TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200124 auto fixture = CreateVideoQualityTestFixture();
125 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800126 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100127 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
128 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200129 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200130 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
131 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200132 foreman_cif.config->loss_percent = 5;
133 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200134 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200135 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800136}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800137
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700138TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
139 // Profile 2 might not be available on some platforms until
140 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
141 bool profile_2_is_supported = false;
142 for (const auto& codec : SupportedVP9Codecs()) {
143 if (ParseSdpForVP9Profile(codec.parameters)
144 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
145 profile_2_is_supported = true;
146 }
147 }
148 if (!profile_2_is_supported)
149 return;
150 auto fixture = CreateVideoQualityTestFixture();
151
152 SdpVideoFormat::Parameters vp92 = {
153 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
154 ParamsWithLogging generator;
155 generator.call.send_side_bwe = true;
156 generator.video[0] = {
157 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
158 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
159 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
160 kFullStackTestDurationSecs};
161 fixture->RunWithAnalyzer(generator);
162}
163
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200164TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
165 auto fixture = CreateVideoQualityTestFixture();
166 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800167 foreman_cif.call.send_side_bwe = true;
168 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
169 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200170 0, 0, false, false, false,
171 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800172 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
173 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200174 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800175}
176
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200177TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
178 auto fixture = CreateVideoQualityTestFixture();
179
180 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700181 generator.call.send_side_bwe = true;
182 generator.video[0] = {true, 352, 288, 30, 700000,
183 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200184 0, 0, false, false, false,
185 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700186 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
187 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200188 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800189}
190
Peter Boström12996152016-05-14 02:03:18 +0200191#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800192
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200193#if defined(WEBRTC_LINUX)
194// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
195#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
196#else
197#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
198#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200199TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
200 auto fixture = CreateVideoQualityTestFixture();
201 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700202 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100203 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
204 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200205 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700206 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
207 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200208 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000209}
210
philipeldd8b0d82018-09-27 11:18:10 +0200211TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200212 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000213 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200214 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700215 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100216 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
217 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200218 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200219 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
220 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200221 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200222 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000223}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000224
philipeldd8b0d82018-09-27 11:18:10 +0200225TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200226 auto fixture = CreateVideoQualityTestFixture();
227 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800228 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100229 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
230 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200231 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200232 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
233 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200234 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200235 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800236}
237
Niels Möller6aa415e2018-06-07 11:14:13 +0200238// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200239TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
240 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200241 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200242 foreman_cif.call.send_side_bwe = true;
243 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
244 500000, 2000000, false, "VP8", 1,
245 0, 0, false, false, true, "foreman_cif"};
246 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
247 0.0, 0.0,
248 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200249 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200250 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200251}
252
philipeldd8b0d82018-09-27 11:18:10 +0200253TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200254 auto fixture = CreateVideoQualityTestFixture();
255 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700256 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100257 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
258 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200259 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200260 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000261 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200262 foreman_cif.config->loss_percent = 5;
263 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200264 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200265 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000266}
267
philipeldd8b0d82018-09-27 11:18:10 +0200268TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200269 auto fixture = CreateVideoQualityTestFixture();
270 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800271 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100272 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
273 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200274 0, 0, true, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200275 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
276 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200277 foreman_cif.config->loss_percent = 5;
278 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200279 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200280 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800281}
282
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200283TEST(FullStackTest, ForemanCifPlr5Flexfec) {
284 auto fixture = CreateVideoQualityTestFixture();
285 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800286 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100287 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
288 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200289 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800290 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
291 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200292 foreman_cif.config->loss_percent = 5;
293 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200294 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800295}
296
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200297TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
298 auto fixture = CreateVideoQualityTestFixture();
299 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700300 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100301 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
302 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200303 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700304 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
305 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200306 foreman_cif.config->loss_percent = 3;
307 foreman_cif.config->link_capacity_kbps = 500;
308 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200309 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700310}
311
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200312TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
313 auto fixture = CreateVideoQualityTestFixture();
314 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700315 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100316 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
317 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200318 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700319 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
320 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200321 foreman_cif.config->loss_percent = 3;
322 foreman_cif.config->link_capacity_kbps = 500;
323 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200324 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700325}
326
brandtrdd369c62016-11-16 23:56:57 -0800327#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200328TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
329 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800330 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200331 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800332 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100333 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
334 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200335 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800336 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
337 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200338 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800339}
340
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200341TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
342 auto fixture = CreateVideoQualityTestFixture();
343 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800344 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100345 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
346 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200347 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800348 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
349 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200350 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800351}
352
philipeldd8b0d82018-09-27 11:18:10 +0200353TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200354 auto fixture = CreateVideoQualityTestFixture();
355 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800356 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100357 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
358 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200359 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200360 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
361 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200362 foreman_cif.config->loss_percent = 5;
363 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200364 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200365 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800366}
367
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200368TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000369 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100370 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200371 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100372
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200373 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100374 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100375 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
376 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200377 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100378 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
379 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200380 foreman_cif.config->loss_percent = 5;
381 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200382 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100383}
384
brandtrdd369c62016-11-16 23:56:57 -0800385// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200386TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
387 auto fixture = CreateVideoQualityTestFixture();
388 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800389 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100390 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
391 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200392 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800393 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
394 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200395 foreman_cif.config->loss_percent = 5;
396 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200397 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800398}
399
400// Ulpfec with H264 is an unsupported combination, so this test is only useful
401// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200402TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
403 auto fixture = CreateVideoQualityTestFixture();
404 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800405 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100406 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
407 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200408 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800409 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
410 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200411 foreman_cif.config->loss_percent = 5;
412 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200413 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800414}
415#endif // defined(WEBRTC_USE_H264)
416
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200417TEST(FullStackTest, ForemanCif500kbps) {
418 auto fixture = CreateVideoQualityTestFixture();
419 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700420 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100421 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
422 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200423 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700424 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
425 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200426 foreman_cif.config->queue_length_packets = 0;
427 foreman_cif.config->queue_delay_ms = 0;
428 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200429 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000430}
431
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200432TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
433 auto fixture = CreateVideoQualityTestFixture();
434 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700435 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100436 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
437 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200438 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700439 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
440 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200441 foreman_cif.config->queue_length_packets = 32;
442 foreman_cif.config->queue_delay_ms = 0;
443 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200444 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000445}
446
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200447TEST(FullStackTest, ForemanCif500kbps100ms) {
448 auto fixture = CreateVideoQualityTestFixture();
449 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700450 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100451 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
452 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200453 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700454 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
455 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200456 foreman_cif.config->queue_length_packets = 0;
457 foreman_cif.config->queue_delay_ms = 100;
458 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200459 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000460}
461
philipeldd8b0d82018-09-27 11:18:10 +0200462TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200463 auto fixture = CreateVideoQualityTestFixture();
464 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700465 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100466 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
467 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200468 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200469 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
470 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200471 foreman_cif.config->queue_length_packets = 32;
472 foreman_cif.config->queue_delay_ms = 100;
473 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200474 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200475 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700476}
477
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200478TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
479 auto fixture = CreateVideoQualityTestFixture();
480 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800481 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100482 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
483 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200484 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800485 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
486 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200487 foreman_cif.config->queue_length_packets = 32;
488 foreman_cif.config->queue_delay_ms = 100;
489 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200490 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000491}
492
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200493TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
494 auto fixture = CreateVideoQualityTestFixture();
495 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700496 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100497 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
498 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200499 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700500 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
501 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200502 foreman_cif.config->queue_length_packets = 32;
503 foreman_cif.config->queue_delay_ms = 100;
504 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200505 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000506}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000507
sprangff19d352017-09-06 07:14:02 -0700508// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200509TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
510 auto fixture = CreateVideoQualityTestFixture();
511 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700512 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100513 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000514 true, 1280, 720, 50, 30000,
515 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200516 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700517 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
518 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200519 conf_motion_hd.config->queue_length_packets = 32;
520 conf_motion_hd.config->queue_delay_ms = 100;
521 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200522 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700523}
524
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000525TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200526 auto fixture = CreateVideoQualityTestFixture();
527 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700528 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100529 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000530 true, 1280, 720, 50, 30000,
531 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200532 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000533 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
534 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200535 conf_motion_hd.config->queue_length_packets = 50;
536 conf_motion_hd.config->loss_percent = 3;
537 conf_motion_hd.config->queue_delay_ms = 100;
538 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200539 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700540}
541
philipeldd8b0d82018-09-27 11:18:10 +0200542TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200543 auto fixture = CreateVideoQualityTestFixture();
544 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700545 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100546 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000547 true, 1280, 720, 50, 30000,
548 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200549 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200550 conf_motion_hd.analyzer = {
551 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
552 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200553 conf_motion_hd.config->queue_length_packets = 50;
554 conf_motion_hd.config->loss_percent = 3;
555 conf_motion_hd.config->queue_delay_ms = 100;
556 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200557 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200558 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700559}
560
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200561TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
562 auto fixture = CreateVideoQualityTestFixture();
563 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700564 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100565 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000566 true, 1280, 720, 50, 30000,
567 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200568 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700569 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
570 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200571 conf_motion_hd.config->queue_length_packets = 50;
572 conf_motion_hd.config->loss_percent = 3;
573 conf_motion_hd.config->queue_delay_ms = 100;
574 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200575 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700576}
577
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200578TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
579 auto fixture = CreateVideoQualityTestFixture();
580 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700581 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100582 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000583 true, 1280, 720, 50, 30000,
584 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200585 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700586 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
587 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200588 conf_motion_hd.config->queue_length_packets = 50;
589 conf_motion_hd.config->loss_percent = 3;
590 conf_motion_hd.config->queue_delay_ms = 100;
591 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200592 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700593}
594
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200595TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000596 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200597 test::ScopedFieldTrials field_trial(
598 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200599 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700600 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100601 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000602 true, 1280, 720, 50, 30000,
603 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200604 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700605 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
606 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200607 conf_motion_hd.config->queue_length_packets = 50;
608 conf_motion_hd.config->loss_percent = 3;
609 conf_motion_hd.config->queue_delay_ms = 100;
610 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200611 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700612}
613
jianj390e64d2017-02-03 09:51:23 -0800614#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200615TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
616 auto fixture = CreateVideoQualityTestFixture();
617 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800618 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100619 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000620 true, 1280, 720, 50, 30000,
621 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200622 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800623 conf_motion_hd.analyzer = {
624 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
625 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200626 conf_motion_hd.config->queue_length_packets = 32;
627 conf_motion_hd.config->queue_delay_ms = 100;
628 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200629 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800630}
631#endif
632
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200633TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
634 auto fixture = CreateVideoQualityTestFixture();
635 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700636 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200637 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
638 1000000, false, "VP8", 2, 1, 400000,
639 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100640 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700641 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
642 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200643 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200644}
645
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200646// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
647#if !defined(WEBRTC_MAC)
648const char kScreenshareSimulcastExperiment[] =
649 "WebRTC-SimulcastScreenshare/Enabled/";
650
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200651TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
652 auto fixture = CreateVideoQualityTestFixture();
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000653 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200654 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800655 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100656 screenshare.screenshare[0] = {true, false, 10};
657 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
658 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200659 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800660 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
661 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200662 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200663 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
664 1000000, false, "VP8", 3, 0, 400000,
665 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800666 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200667 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
668 1000000, false, "VP8", 2, 0, 400000,
669 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800670
671 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200672 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
673 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200674 screenshare.ss[0] = {
675 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
676 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200677 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800678}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200679#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800680
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200681TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
682 auto fixture = CreateVideoQualityTestFixture();
683 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700684 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200685 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
686 1000000, false, "VP8", 2, 1, 400000,
687 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100688 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700689 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
690 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200691 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700692}
693
philipeldd8b0d82018-09-27 11:18:10 +0200694TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200695 auto fixture = CreateVideoQualityTestFixture();
696 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700697 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200698 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
699 1000000, false, "VP8", 2, 1, 400000,
700 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100701 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200702 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000703 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200704 screenshare.config->loss_percent = 5;
705 screenshare.config->queue_delay_ms = 200;
706 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200707 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200708 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800709}
710
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200711TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
712 auto fixture = CreateVideoQualityTestFixture();
713 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700714 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200715 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
716 1000000, false, "VP8", 2, 1, 400000,
717 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100718 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700719 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
720 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200721 screenshare.config->loss_percent = 10;
722 screenshare.config->queue_delay_ms = 200;
723 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200724 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800725}
726
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200727TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
728 auto fixture = CreateVideoQualityTestFixture();
729 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700730 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200731 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
732 1000000, false, "VP8", 2, 1, 400000,
733 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100734 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700735 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
736 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200737 screenshare.config->loss_percent = 5;
738 screenshare.config->link_capacity_kbps = 200;
739 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700740
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200741 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700742}
743
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200744TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
745 auto fixture = CreateVideoQualityTestFixture();
746 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700747 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200748 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
749 1000000, false, "VP8", 2, 1, 400000,
750 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100751 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700752 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
753 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200754 screenshare.config->loss_percent = 1;
755 screenshare.config->link_capacity_kbps = 1200;
756 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700757
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200758 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700759}
760
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200761const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000762 true, 1280, 720, 30, 800000,
763 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200764 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800765
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200766const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000767 true, 1280, 720, 30, 800000,
768 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200769 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800770
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200771const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000772 true, 640, 360, 30, 150000,
773 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200774 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800775
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200776const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000777 true, 320, 180, 30, 30000,
778 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200779 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800780
Peter Boström12996152016-05-14 02:03:18 +0200781#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200782TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
783 auto fixture = CreateVideoQualityTestFixture();
784 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700785 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100786 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
787 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200788 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100789 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700790 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
791 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200792 screenshare.ss[0] = {
793 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
794 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200795 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000796}
ilnik2a8c2f52017-02-15 02:23:28 -0800797
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200798TEST(FullStackTest, VP9SVC_3SL_High) {
799 auto fixture = CreateVideoQualityTestFixture();
800 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800801 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100802 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800803 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
804 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200805
Sergey Silkin57027362018-05-15 09:12:05 +0200806 simulcast.ss[0] = {
807 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
808 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200809 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800810}
811
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200812TEST(FullStackTest, VP9SVC_3SL_Medium) {
813 auto fixture = CreateVideoQualityTestFixture();
814 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800815 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100816 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800817 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
818 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200819 simulcast.ss[0] = {
820 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
821 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800823}
824
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200825TEST(FullStackTest, VP9SVC_3SL_Low) {
826 auto fixture = CreateVideoQualityTestFixture();
827 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800828 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100829 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800830 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200831 simulcast.ss[0] = {
832 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
833 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200834 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800835}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200836
Sergey Silkin7f978f12018-09-10 12:01:49 +0000837// bugs.webrtc.org/9506
838#if !defined(WEBRTC_MAC)
839
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200840TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200841 webrtc::test::ScopedFieldTrials override_trials(
842 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200843 auto fixture = CreateVideoQualityTestFixture();
844 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200845 simulcast.call.send_side_bwe = true;
846 simulcast.video[0] = kSvcVp9Video;
847 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
848 kFullStackTestDurationSecs};
849 simulcast.ss[0] = {
850 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
851 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200852 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200853}
854
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200855TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200856 webrtc::test::ScopedFieldTrials override_trials(
857 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200858 auto fixture = CreateVideoQualityTestFixture();
859 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200860 simulcast.call.send_side_bwe = true;
861 simulcast.video[0] = kSvcVp9Video;
862 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
863 kFullStackTestDurationSecs};
864 simulcast.ss[0] = {
865 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
866 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200867 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200868}
869
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200870TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200871 webrtc::test::ScopedFieldTrials override_trials(
872 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200873 auto fixture = CreateVideoQualityTestFixture();
874 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200875 simulcast.call.send_side_bwe = true;
876 simulcast.video[0] = kSvcVp9Video;
877 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
878 kFullStackTestDurationSecs};
879 simulcast.ss[0] = {
880 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
881 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200882 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200883}
“Michael277a6562018-06-01 14:09:19 -0500884
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200885TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200886 webrtc::test::ScopedFieldTrials override_trials(
887 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200888 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200889 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500890 simulcast.call.send_side_bwe = true;
891 simulcast.video[0] = kSvcVp9Video;
892 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
893 kFullStackTestDurationSecs};
894 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200895 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500896 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200897 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200898 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200899 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500900}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000901#endif // !defined(WEBRTC_MAC)
902
Peter Boström12996152016-05-14 02:03:18 +0200903#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800904
ilnik6b826ef2017-06-16 06:53:48 -0700905// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000906// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
907#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700908#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
909#else
910#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
911#endif
912
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200913TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
914 auto fixture = CreateVideoQualityTestFixture();
915 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700916 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100917 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
918 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200919 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700920 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
921 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200922 simulcast.config->loss_percent = 0;
923 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200924 std::vector<VideoStream> streams = {
925 VideoQualityTest::DefaultVideoStream(simulcast, 0),
926 VideoQualityTest::DefaultVideoStream(simulcast, 0),
927 VideoQualityTest::DefaultVideoStream(simulcast, 0)
928 };
Sergey Silkin57027362018-05-15 09:12:05 +0200929 simulcast.ss[0] = {
930 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
931 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200932 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
933 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200934 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700935}
936
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200937TEST(FullStackTest, SimulcastVP8_3SL_High) {
938 auto fixture = CreateVideoQualityTestFixture();
939 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800940 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100941 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800942 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800943 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200944 simulcast.config->loss_percent = 0;
945 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200946 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100947 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100949 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200950 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100951 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800952
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100953 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200954 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
955 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
956 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200957 simulcast.ss[0] = {
958 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
959 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200960 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800961}
962
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200963TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
964 auto fixture = CreateVideoQualityTestFixture();
965 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800966 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100967 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800968 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800969 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200970 simulcast.config->loss_percent = 0;
971 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200972 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100973 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200974 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100975 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200976 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100977 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800978
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100979 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200980 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
981 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
982 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200983 simulcast.ss[0] = {
984 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
985 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200986 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800987}
988
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200989TEST(FullStackTest, SimulcastVP8_3SL_Low) {
990 auto fixture = CreateVideoQualityTestFixture();
991 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800992 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100993 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800994 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800995 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200996 simulcast.config->loss_percent = 0;
997 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200998 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100999 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001000 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001001 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001002 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001003 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001004
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001005 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001006 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1007 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1008 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001009 simulcast.ss[0] = {
1010 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1011 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001012 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001013}
1014
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001015TEST(FullStackTest, LargeRoomVP8_5thumb) {
1016 auto fixture = CreateVideoQualityTestFixture();
1017 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001018 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001019 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001020 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1021 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001022 large_room.config->loss_percent = 0;
1023 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001024 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001025 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001026 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001027 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001028 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001029 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001030
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001031 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001032 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1033 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1034 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001035 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001036 large_room.ss[0] = {
1037 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1038 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001039 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001040}
1041
oprypin743117f2017-09-15 05:24:24 -07001042#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1043// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001044// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1045#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001046#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001047#else
1048#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001049#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001050#endif
1051
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001052TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1053 auto fixture = CreateVideoQualityTestFixture();
1054 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001055 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001056 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001057 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1058 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001059 large_room.config->loss_percent = 0;
1060 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001061 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001062 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001063 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001064 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001065 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001066 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001067
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001068 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001069 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1070 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1071 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001072 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001073 large_room.ss[0] = {
1074 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1075 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001076 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001077}
1078
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001079TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1080 auto fixture = CreateVideoQualityTestFixture();
1081 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001082 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001083 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001084 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1085 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001086 large_room.config->loss_percent = 0;
1087 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001088 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001089 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001090 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001091 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001092 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001093 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001094
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001095 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001096 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1097 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1098 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001099 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001100 large_room.ss[0] = {
1101 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1102 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001103 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001104}
1105
philipeldd8b0d82018-09-27 11:18:10 +02001106INSTANTIATE_TEST_CASE_P(FullStackTest,
1107 GenericDescriptorTest,
1108 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1109 "WebRTC-GenericDescriptor/Enabled/"));
1110
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001111class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001112
1113// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001114// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1115#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001116TEST_P(DualStreamsTest,
1117 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1118 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001119 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1120 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001121 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001122 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001123
1124 // Screenshare Settings.
1125 dual_streams.screenshare[first_stream] = {true, false, 10};
1126 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1127 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001128 2, 400000, false, false, false,
1129 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001130
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001131 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001132 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1133 1000000, false, "VP8", 3, 0, 400000,
1134 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001135 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001136 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1137 1000000, false, "VP8", 2, 0, 400000,
1138 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001139 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001140 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1141 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001142
Sergey Silkin57027362018-05-15 09:12:05 +02001143 dual_streams.ss[first_stream] = {
1144 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1145 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001146
1147 // Video settings.
1148 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1149
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001150 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001151 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001152 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001153 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001154 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001155 video_params_low.video[0] = kSimulcastVp8VideoLow;
1156 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001157 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1158 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1159 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001160
1161 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001162 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1163 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001164
1165 // Call settings.
1166 dual_streams.call.send_side_bwe = true;
1167 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001168 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1169 std::to_string(first_stream);
1170 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001171 dual_streams.config->loss_percent = 1;
1172 dual_streams.config->link_capacity_kbps = 7500;
1173 dual_streams.config->queue_length_packets = 30;
1174 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001175
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001176 auto fixture = CreateVideoQualityTestFixture();
1177 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001178}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001179#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1180 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001181
1182TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001183 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001184 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001185 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001186 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001187
1188 // Screenshare Settings.
1189 dual_streams.screenshare[first_stream] = {true, false, 10};
1190 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1191 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001192 2, 400000, false, false, false,
1193 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001194 // Video settings.
1195 dual_streams.video[1 - first_stream] = {
1196 true, 1280, 720, 30, 150000,
1197 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001198 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001199
1200 // Call settings.
1201 dual_streams.call.send_side_bwe = true;
1202 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001203 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1204 std::to_string(first_stream);
1205 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001206 dual_streams.config->loss_percent = 1;
1207 dual_streams.config->link_capacity_kbps = 5000;
1208 dual_streams.config->queue_length_packets = 30;
1209 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001210
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001211 auto fixture = CreateVideoQualityTestFixture();
1212 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001213}
1214
1215INSTANTIATE_TEST_CASE_P(FullStackTest,
1216 DualStreamsTest,
1217 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001218
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001219} // namespace webrtc