blob: 347fbd1412f36455072dd521ab7312bdadd16b6a [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 Brandt35836932018-10-23 09:17:24 +0200602 true, 1280, 720, 50,
603 30000, 3000000, 3000000, false,
604 "VP8", 3, -1, 0,
605 false, false, false, "ConferenceMotion_1280_720_50"};
606 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
607 0.0, 0.0, kFullStackTestDurationSecs};
608 conf_motion_hd.config->queue_length_packets = 50;
609 conf_motion_hd.config->loss_percent = 3;
610 conf_motion_hd.config->queue_delay_ms = 100;
611 conf_motion_hd.config->link_capacity_kbps = 2000;
612 fixture->RunWithAnalyzer(conf_motion_hd);
613}
614
615TEST(FullStackTest,
616 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
617 auto fixture = CreateVideoQualityTestFixture();
618 test::ScopedFieldTrials field_trial(
619 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
620 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
621 ParamsWithLogging conf_motion_hd;
622 conf_motion_hd.call.send_side_bwe = true;
623 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000624 true, 1280, 720, 50, 30000,
625 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200626 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Rasmus Brandt35836932018-10-23 09:17:24 +0200627 conf_motion_hd.analyzer = {
628 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
629 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200630 conf_motion_hd.config->queue_length_packets = 50;
631 conf_motion_hd.config->loss_percent = 3;
632 conf_motion_hd.config->queue_delay_ms = 100;
633 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200634 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700635}
636
jianj390e64d2017-02-03 09:51:23 -0800637#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200638TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
639 auto fixture = CreateVideoQualityTestFixture();
640 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800641 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100642 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000643 true, 1280, 720, 50, 30000,
644 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200645 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800646 conf_motion_hd.analyzer = {
647 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
648 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200649 conf_motion_hd.config->queue_length_packets = 32;
650 conf_motion_hd.config->queue_delay_ms = 100;
651 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200652 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800653}
654#endif
655
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200656TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
657 auto fixture = CreateVideoQualityTestFixture();
658 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700659 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200660 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
661 1000000, false, "VP8", 2, 1, 400000,
662 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100663 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700664 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
665 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200666 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200667}
668
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200669// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
670#if !defined(WEBRTC_MAC)
671const char kScreenshareSimulcastExperiment[] =
672 "WebRTC-SimulcastScreenshare/Enabled/";
673
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200674TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
675 auto fixture = CreateVideoQualityTestFixture();
Oleh Prypina1d9ca42018-10-11 14:33:39 +0000676 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200677 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800678 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100679 screenshare.screenshare[0] = {true, false, 10};
680 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
681 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200682 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800683 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
684 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200685 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200686 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
687 1000000, false, "VP8", 3, 0, 400000,
688 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800689 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200690 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
691 1000000, false, "VP8", 2, 0, 400000,
692 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800693
694 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200695 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
696 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200697 screenshare.ss[0] = {
698 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
699 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200700 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800701}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200702#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800703
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200704TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
705 auto fixture = CreateVideoQualityTestFixture();
706 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700707 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200708 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
709 1000000, false, "VP8", 2, 1, 400000,
710 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100711 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700712 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
713 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200714 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700715}
716
philipeldd8b0d82018-09-27 11:18:10 +0200717TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200718 auto fixture = CreateVideoQualityTestFixture();
719 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700720 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200721 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
722 1000000, false, "VP8", 2, 1, 400000,
723 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100724 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200725 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000726 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200727 screenshare.config->loss_percent = 5;
728 screenshare.config->queue_delay_ms = 200;
729 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200730 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200731 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800732}
733
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200734TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
735 auto fixture = CreateVideoQualityTestFixture();
736 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700737 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200738 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
739 1000000, false, "VP8", 2, 1, 400000,
740 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100741 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700742 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
743 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200744 screenshare.config->loss_percent = 10;
745 screenshare.config->queue_delay_ms = 200;
746 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200747 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800748}
749
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200750TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
751 auto fixture = CreateVideoQualityTestFixture();
752 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700753 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200754 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
755 1000000, false, "VP8", 2, 1, 400000,
756 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100757 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700758 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
759 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200760 screenshare.config->loss_percent = 5;
761 screenshare.config->link_capacity_kbps = 200;
762 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700763
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200764 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700765}
766
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200767TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
768 auto fixture = CreateVideoQualityTestFixture();
769 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700770 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200771 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
772 1000000, false, "VP8", 2, 1, 400000,
773 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100774 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700775 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
776 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200777 screenshare.config->loss_percent = 1;
778 screenshare.config->link_capacity_kbps = 1200;
779 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700780
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200781 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700782}
783
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200784const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000785 true, 1280, 720, 30, 800000,
786 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200787 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800788
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200789const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000790 true, 1280, 720, 30, 800000,
791 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200792 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800793
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200794const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000795 true, 640, 360, 30, 150000,
796 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200797 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800798
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200799const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000800 true, 320, 180, 30, 30000,
801 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200802 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800803
Peter Boström12996152016-05-14 02:03:18 +0200804#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200805TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
806 auto fixture = CreateVideoQualityTestFixture();
807 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700808 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100809 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
810 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200811 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100812 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700813 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
814 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200815 screenshare.ss[0] = {
816 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
817 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200818 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000819}
ilnik2a8c2f52017-02-15 02:23:28 -0800820
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200821TEST(FullStackTest, VP9SVC_3SL_High) {
822 auto fixture = CreateVideoQualityTestFixture();
823 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800824 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100825 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800826 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
827 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200828
Sergey Silkin57027362018-05-15 09:12:05 +0200829 simulcast.ss[0] = {
830 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
831 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200832 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800833}
834
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200835TEST(FullStackTest, VP9SVC_3SL_Medium) {
836 auto fixture = CreateVideoQualityTestFixture();
837 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800838 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100839 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800840 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
841 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200842 simulcast.ss[0] = {
843 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
844 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200845 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800846}
847
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200848TEST(FullStackTest, VP9SVC_3SL_Low) {
849 auto fixture = CreateVideoQualityTestFixture();
850 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800851 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100852 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800853 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200854 simulcast.ss[0] = {
855 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
856 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200857 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800858}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200859
Sergey Silkin7f978f12018-09-10 12:01:49 +0000860// bugs.webrtc.org/9506
861#if !defined(WEBRTC_MAC)
862
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200863TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200864 webrtc::test::ScopedFieldTrials override_trials(
865 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200866 auto fixture = CreateVideoQualityTestFixture();
867 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200868 simulcast.call.send_side_bwe = true;
869 simulcast.video[0] = kSvcVp9Video;
870 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
871 kFullStackTestDurationSecs};
872 simulcast.ss[0] = {
873 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
874 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200875 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200876}
877
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200878TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200879 webrtc::test::ScopedFieldTrials override_trials(
880 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200881 auto fixture = CreateVideoQualityTestFixture();
882 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200883 simulcast.call.send_side_bwe = true;
884 simulcast.video[0] = kSvcVp9Video;
885 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
886 kFullStackTestDurationSecs};
887 simulcast.ss[0] = {
888 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
889 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200890 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200891}
892
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200893TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200894 webrtc::test::ScopedFieldTrials override_trials(
895 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200896 auto fixture = CreateVideoQualityTestFixture();
897 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200898 simulcast.call.send_side_bwe = true;
899 simulcast.video[0] = kSvcVp9Video;
900 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
901 kFullStackTestDurationSecs};
902 simulcast.ss[0] = {
903 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
904 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200905 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200906}
“Michael277a6562018-06-01 14:09:19 -0500907
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200908TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200909 webrtc::test::ScopedFieldTrials override_trials(
910 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200911 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200912 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500913 simulcast.call.send_side_bwe = true;
914 simulcast.video[0] = kSvcVp9Video;
915 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
916 kFullStackTestDurationSecs};
917 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200918 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500919 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200920 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200921 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200922 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500923}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000924#endif // !defined(WEBRTC_MAC)
925
Peter Boström12996152016-05-14 02:03:18 +0200926#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800927
ilnik6b826ef2017-06-16 06:53:48 -0700928// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000929// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
930#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700931#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
932#else
933#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
934#endif
935
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200936TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
937 auto fixture = CreateVideoQualityTestFixture();
938 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700939 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100940 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
941 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200942 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700943 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
944 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200945 simulcast.config->loss_percent = 0;
946 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200947 std::vector<VideoStream> streams = {
948 VideoQualityTest::DefaultVideoStream(simulcast, 0),
949 VideoQualityTest::DefaultVideoStream(simulcast, 0),
950 VideoQualityTest::DefaultVideoStream(simulcast, 0)
951 };
Sergey Silkin57027362018-05-15 09:12:05 +0200952 simulcast.ss[0] = {
953 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
954 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200955 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
956 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200957 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700958}
959
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200960TEST(FullStackTest, SimulcastVP8_3SL_High) {
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_high", 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, 2, 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_Medium) {
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_medium", 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, 1, 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, SimulcastVP8_3SL_Low) {
1013 auto fixture = CreateVideoQualityTestFixture();
1014 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001015 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001016 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001017 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001018 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001019 simulcast.config->loss_percent = 0;
1020 simulcast.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;
ilnik3dd5ad92017-02-09 04:58:53 -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)};
Sergey Silkin57027362018-05-15 09:12:05 +02001032 simulcast.ss[0] = {
1033 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1034 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001035 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001036}
1037
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001038TEST(FullStackTest, LargeRoomVP8_5thumb) {
1039 auto fixture = CreateVideoQualityTestFixture();
1040 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001041 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001042 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001043 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1044 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001045 large_room.config->loss_percent = 0;
1046 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001047 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001048 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001049 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001050 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001051 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001052 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001053
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001054 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001055 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1056 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1057 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001058 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001059 large_room.ss[0] = {
1060 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1061 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001062 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001063}
1064
oprypin743117f2017-09-15 05:24:24 -07001065#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1066// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001067// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1068#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001069#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001070#else
1071#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001072#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001073#endif
1074
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001075TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1076 auto fixture = CreateVideoQualityTestFixture();
1077 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001078 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001079 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001080 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1081 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001082 large_room.config->loss_percent = 0;
1083 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001084 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001085 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001086 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001087 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001088 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001089 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001090
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001091 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001092 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1093 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1094 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001095 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001096 large_room.ss[0] = {
1097 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1098 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001099 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001100}
1101
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001102TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1103 auto fixture = CreateVideoQualityTestFixture();
1104 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001105 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001106 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001107 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1108 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001109 large_room.config->loss_percent = 0;
1110 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001111 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001112 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001113 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001114 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001115 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001116 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001117
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001118 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001119 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1120 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1121 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001122 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001123 large_room.ss[0] = {
1124 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1125 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001126 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001127}
1128
philipeldd8b0d82018-09-27 11:18:10 +02001129INSTANTIATE_TEST_CASE_P(FullStackTest,
1130 GenericDescriptorTest,
1131 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1132 "WebRTC-GenericDescriptor/Enabled/"));
1133
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001134class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001135
1136// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001137// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1138#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001139TEST_P(DualStreamsTest,
1140 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1141 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001142 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1143 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001144 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001145 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001146
1147 // Screenshare Settings.
1148 dual_streams.screenshare[first_stream] = {true, false, 10};
1149 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1150 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001151 2, 400000, false, false, false,
1152 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001153
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001154 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001155 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1156 1000000, false, "VP8", 3, 0, 400000,
1157 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001158 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001159 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1160 1000000, false, "VP8", 2, 0, 400000,
1161 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001162 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001163 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1164 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001165
Sergey Silkin57027362018-05-15 09:12:05 +02001166 dual_streams.ss[first_stream] = {
1167 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1168 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001169
1170 // Video settings.
1171 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1172
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001173 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001174 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001175 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001176 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001177 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001178 video_params_low.video[0] = kSimulcastVp8VideoLow;
1179 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001180 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1181 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1182 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001183
1184 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001185 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1186 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001187
1188 // Call settings.
1189 dual_streams.call.send_side_bwe = true;
1190 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001191 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1192 std::to_string(first_stream);
1193 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001194 dual_streams.config->loss_percent = 1;
1195 dual_streams.config->link_capacity_kbps = 7500;
1196 dual_streams.config->queue_length_packets = 30;
1197 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001198
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001199 auto fixture = CreateVideoQualityTestFixture();
1200 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001201}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001202#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1203 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001204
1205TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001206 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001207 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001208 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001209 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001210
1211 // Screenshare Settings.
1212 dual_streams.screenshare[first_stream] = {true, false, 10};
1213 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1214 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001215 2, 400000, false, false, false,
1216 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001217 // Video settings.
1218 dual_streams.video[1 - first_stream] = {
1219 true, 1280, 720, 30, 150000,
1220 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001221 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001222
1223 // Call settings.
1224 dual_streams.call.send_side_bwe = true;
1225 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001226 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1227 std::to_string(first_stream);
1228 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001229 dual_streams.config->loss_percent = 1;
1230 dual_streams.config->link_capacity_kbps = 5000;
1231 dual_streams.config->queue_length_packets = 30;
1232 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001233
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001234 auto fixture = CreateVideoQualityTestFixture();
1235 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001236}
1237
1238INSTANTIATE_TEST_CASE_P(FullStackTest,
1239 DualStreamsTest,
1240 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001241
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001242} // namespace webrtc