blob: 3831fdfcef3a51467e0b937bf6e7d52d437f8738 [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 */
Yves Gerey3e707812018-11-28 16:47:49 +010010#include <memory>
11#include <string>
12#include <utility>
13#include <vector>
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000014
Mirko Bonadei2ab97f62019-07-18 13:44:12 +020015#include "absl/flags/flag.h"
16#include "absl/flags/parse.h"
Yves Gerey3e707812018-11-28 16:47:49 +010017#include "absl/types/optional.h"
18#include "api/test/simulated_network.h"
Patrik Höglundd8f3c172018-09-26 14:39:17 +020019#include "api/test/test_dependency_factory.h"
Yves Gerey3e707812018-11-28 16:47:49 +010020#include "api/test/video_quality_test_fixture.h"
21#include "api/video_codecs/sdp_video_format.h"
22#include "api/video_codecs/video_codec.h"
23#include "api/video_codecs/video_encoder_config.h"
Johannes Kronc3fcee72021-04-19 09:09:26 +020024#include "api/video_codecs/vp9_profile.h"
Emircan Uysaler0823eec2018-07-13 17:10:00 -070025#include "modules/video_coding/codecs/vp9/include/vp9.h"
Mirko Bonadei17f48782018-09-28 08:51:10 +020026#include "system_wrappers/include/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020027#include "test/field_trial.h"
28#include "test/gtest.h"
Rasmus Brandt3c589be2019-03-13 11:32:40 +010029#include "test/testsupport/file_utils.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020030#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000031
Mirko Bonadei2ab97f62019-07-18 13:44:12 +020032ABSL_FLAG(std::string,
33 rtc_event_log_name,
34 "",
35 "Filename for rtc event log. Two files "
36 "with \"_send\" and \"_recv\" suffixes will be created.");
37ABSL_FLAG(std::string,
38 rtp_dump_name,
39 "",
40 "Filename for dumped received RTP stream.");
41ABSL_FLAG(std::string,
42 encoded_frame_path,
43 "",
44 "The base path for encoded frame logs. Created files will have "
45 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
Sebastian Janssonf8518882018-05-31 14:52:59 +020046
47namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000048
sprang89c4a7e2017-06-30 13:27:40 -070049namespace {
brandtrdd369c62016-11-16 23:56:57 -080050static const int kFullStackTestDurationSecs = 45;
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000051
Patrik Höglundb6b29e02018-06-21 16:58:01 +020052struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000053 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020054 ParamsWithLogging() {
55 // Use these logging flags by default, for everything.
Mirko Bonadei2ab97f62019-07-18 13:44:12 +020056 logging = {absl::GetFlag(FLAGS_rtc_event_log_name),
57 absl::GetFlag(FLAGS_rtp_dump_name),
58 absl::GetFlag(FLAGS_encoded_frame_path)};
Artem Titov75e36472018-10-08 12:28:56 +020059 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000060 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000061};
62
Patrik Höglundb6b29e02018-06-21 16:58:01 +020063std::unique_ptr<VideoQualityTestFixtureInterface>
64CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020065 // The components will normally be nullptr (= use defaults), but it's possible
66 // for external test runners to override the list of injected components.
67 auto components = TestDependencyFactory::GetInstance().CreateComponents();
Mirko Bonadei317a1f02019-09-17 17:06:18 +020068 return std::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020069}
70
Erik Språngb6b1cac2018-08-09 16:12:54 +020071// Takes the current active field trials set, and appends some new trials.
72std::string AppendFieldTrials(std::string new_trial_string) {
73 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
74}
Rasmus Brandt3c589be2019-03-13 11:32:40 +010075
76std::string ClipNameToClipPath(const char* clip_name) {
77 return test::ResourcePath(clip_name, "yuv");
78}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020079} // namespace
80
sprangce4aef12015-11-02 07:23:20 -080081// VideoQualityTest::Params params = {
82// { ... }, // Common.
83// { ... }, // Video-specific settings.
84// { ... }, // Screenshare-specific settings.
85// { ... }, // Analyzer settings.
86// pipe, // FakeNetworkPipe::Config
87// { ... }, // Spatial scalability.
88// logs // bool
89// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000090
Mirko Bonadei8ef57932018-11-16 14:38:03 +010091#if defined(RTC_ENABLE_VP9)
Jeremy Lecontec8850cb2020-09-10 20:46:33 +020092TEST(FullStackTest, Foreman_Cif_Net_Delay_0_0_Plr_0_VP9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +020093 auto fixture = CreateVideoQualityTestFixture();
94 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080095 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +010096 foreman_cif.video[0] = {
97 true, 352, 288, 30,
98 700000, 700000, 700000, false,
99 "VP9", 1, 0, 0,
100 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800101 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
102 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200103 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800104}
105
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200106TEST(GenericDescriptorTest,
107 Foreman_Cif_Delay_50_0_Plr_5_VP9_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200108 auto fixture = CreateVideoQualityTestFixture();
109 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800110 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100111 foreman_cif.video[0] = {
112 true, 352, 288, 30,
113 30000, 500000, 2000000, false,
114 "VP9", 1, 0, 0,
115 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200116 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9_generic_descriptor",
117 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200118 foreman_cif.config->loss_percent = 5;
119 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200120 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200121 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800122}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800123
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200124TEST(FullStackTest, Generator_Net_Delay_0_0_Plr_0_VP9Profile2) {
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700125 // Profile 2 might not be available on some platforms until
126 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
127 bool profile_2_is_supported = false;
128 for (const auto& codec : SupportedVP9Codecs()) {
129 if (ParseSdpForVP9Profile(codec.parameters)
130 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
131 profile_2_is_supported = true;
132 }
133 }
134 if (!profile_2_is_supported)
135 return;
136 auto fixture = CreateVideoQualityTestFixture();
137
138 SdpVideoFormat::Parameters vp92 = {
139 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
140 ParamsWithLogging generator;
141 generator.call.send_side_bwe = true;
142 generator.video[0] = {
143 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100144 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700145 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
146 kFullStackTestDurationSecs};
147 fixture->RunWithAnalyzer(generator);
148}
149
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200150TEST(FullStackTest, Foreman_Cif_Net_Delay_0_0_Plr_0_Multiplex) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200151 auto fixture = CreateVideoQualityTestFixture();
152 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800153 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100154 foreman_cif.video[0] = {
155 true, 352, 288, 30,
156 700000, 700000, 700000, false,
157 "multiplex", 1, 0, 0,
158 false, false, false, ClipNameToClipPath("foreman_cif")};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800159 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
160 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200161 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800162}
163
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200164TEST(FullStackTest, Generator_Net_Delay_0_0_Plr_0_Multiplex) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200165 auto fixture = CreateVideoQualityTestFixture();
166
167 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700168 generator.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100169 generator.video[0] = {
170 true, 352, 288, 30, 700000, 700000, 700000, false,
171 "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700172 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
173 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200174 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800175}
176
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100177#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800178
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200179#if defined(WEBRTC_LINUX)
180// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200181#define MAYBE_Net_Delay_0_0_Plr_0 DISABLED_Net_Delay_0_0_Plr_0
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200182#else
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200183#define MAYBE_Net_Delay_0_0_Plr_0 Net_Delay_0_0_Plr_0
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200184#endif
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200185TEST(FullStackTest, MAYBE_Net_Delay_0_0_Plr_0) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200186 auto fixture = CreateVideoQualityTestFixture();
187 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700188 paris_qcif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100189 paris_qcif.video[0] = {
190 true, 176, 144, 30,
191 300000, 300000, 300000, false,
192 "VP8", 1, 0, 0,
193 false, false, true, ClipNameToClipPath("paris_qcif")};
minyue626bc952016-10-31 05:47:02 -0700194 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
195 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200196 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000197}
198
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200199TEST(GenericDescriptorTest,
200 Foreman_Cif_Net_Delay_0_0_Plr_0_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200201 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000202 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200203 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700204 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100205 foreman_cif.video[0] = {
206 true, 352, 288, 30,
207 700000, 700000, 700000, false,
208 "VP8", 1, 0, 0,
209 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200210 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_generic_descriptor",
211 0.0, 0.0, kFullStackTestDurationSecs};
212 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200213 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000214}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000215
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200216TEST(GenericDescriptorTest,
Jeremy Leconte4100d552020-09-11 18:02:36 +0200217 Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200218 auto fixture = CreateVideoQualityTestFixture();
219 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800220 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100221 foreman_cif.video[0] = {
222 true, 352, 288, 10,
223 30000, 30000, 30000, false,
224 "VP8", 1, 0, 0,
225 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200226 foreman_cif.analyzer = {
227 "foreman_cif_30kbps_net_delay_0_0_plr_0_generic_descriptor", 0.0, 0.0,
228 kFullStackTestDurationSecs};
229 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200230 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800231}
232
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100233// Link capacity below default start rate.
Jeremy Leconte4100d552020-09-11 18:02:36 +0200234TEST(FullStackTest, Foreman_Cif_Link_150kbps_Net_Delay_0_0_Plr_0) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200235 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200236 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200237 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100238 foreman_cif.video[0] = {
239 true, 352, 288, 30,
240 30000, 500000, 2000000, false,
241 "VP8", 1, 0, 0,
242 false, false, true, ClipNameToClipPath("foreman_cif")};
Jonas Olssona4d87372019-07-05 19:08:33 +0200243 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0", 0.0,
244 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200245 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200246 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200247}
248
Erik Språng616b2332019-02-11 14:16:28 +0100249// Restricted network and encoder overproducing by 30%.
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200250TEST(FullStackTest,
Jeremy Leconte4100d552020-09-11 18:02:36 +0200251 Foreman_Cif_Link_150kbps_Delay100ms_30pkts_Queue_Overshoot30) {
Erik Språng616b2332019-02-11 14:16:28 +0100252 auto fixture = CreateVideoQualityTestFixture();
253 ParamsWithLogging foreman_cif;
254 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100255 foreman_cif.video[0] = {
256 true, 352, 288, 30,
257 30000, 500000, 2000000, false,
258 "VP8", 1, 0, 0,
259 false, false, true, ClipNameToClipPath("foreman_cif"),
260 0, {}, 1.30};
Erik Språng616b2332019-02-11 14:16:28 +0100261 foreman_cif.analyzer = {
262 "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
263 kFullStackTestDurationSecs};
264 foreman_cif.config->link_capacity_kbps = 150;
265 foreman_cif.config->queue_length_packets = 30;
266 foreman_cif.config->queue_delay_ms = 100;
267 fixture->RunWithAnalyzer(foreman_cif);
268}
269
Erik Språng8b8d01a2019-03-02 20:54:55 +0100270// Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
271// Packet rate and loss are low enough that loss will happen with ~3s interval.
272// This triggers protection overhead to toggle between zero and non-zero.
273// Link queue is restrictive enough to trigger loss on probes.
Jeremy Leconte4100d552020-09-11 18:02:36 +0200274TEST(FullStackTest, Foreman_Cif_Link_250kbps_Delay100ms_10pkts_Loss1) {
Erik Språng8b8d01a2019-03-02 20:54:55 +0100275 auto fixture = CreateVideoQualityTestFixture();
276 ParamsWithLogging foreman_cif;
277 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100278 foreman_cif.video[0] = {
279 true, 352, 288, 30,
280 30000, 500000, 2000000, false,
281 "VP8", 1, 0, 0,
282 false, false, true, ClipNameToClipPath("foreman_cif"),
283 0, {}, 1.30};
Erik Språng8b8d01a2019-03-02 20:54:55 +0100284 foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
285 0.0, 0.0, kFullStackTestDurationSecs};
286 foreman_cif.config->link_capacity_kbps = 250;
287 foreman_cif.config->queue_length_packets = 10;
288 foreman_cif.config->queue_delay_ms = 100;
289 foreman_cif.config->loss_percent = 1;
290 fixture->RunWithAnalyzer(foreman_cif);
291}
292
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200293TEST(GenericDescriptorTest, Foreman_Cif_Delay_50_0_Plr_5_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200294 auto fixture = CreateVideoQualityTestFixture();
295 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700296 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100297 foreman_cif.video[0] = {
298 true, 352, 288, 30,
299 30000, 500000, 2000000, false,
300 "VP8", 1, 0, 0,
301 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200302 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_generic_descriptor",
303 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200304 foreman_cif.config->loss_percent = 5;
305 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200306 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200307 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000308}
309
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200310TEST(GenericDescriptorTest,
311 Foreman_Cif_Delay_50_0_Plr_5_Ulpfec_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200312 auto fixture = CreateVideoQualityTestFixture();
313 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800314 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100315 foreman_cif.video[0] = {
316 true, 352, 288, 30,
317 30000, 500000, 2000000, false,
318 "VP8", 1, 0, 0,
319 true, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200320 foreman_cif.analyzer = {
321 "foreman_cif_delay_50_0_plr_5_ulpfec_generic_descriptor", 0.0, 0.0,
322 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200323 foreman_cif.config->loss_percent = 5;
324 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200325 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200326 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800327}
328
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200329TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_Flexfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200330 auto fixture = CreateVideoQualityTestFixture();
331 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800332 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100333 foreman_cif.video[0] = {
334 true, 352, 288, 30,
335 30000, 500000, 2000000, false,
336 "VP8", 1, 0, 0,
337 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800338 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
339 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200340 foreman_cif.config->loss_percent = 5;
341 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200342 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800343}
344
Jeremy Leconte4100d552020-09-11 18:02:36 +0200345TEST(FullStackTest, Foreman_Cif_500kbps_Delay_50_0_Plr_3_Flexfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200346 auto fixture = CreateVideoQualityTestFixture();
347 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700348 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100349 foreman_cif.video[0] = {
350 true, 352, 288, 30,
351 30000, 500000, 2000000, false,
352 "VP8", 1, 0, 0,
353 false, true, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700354 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
355 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200356 foreman_cif.config->loss_percent = 3;
357 foreman_cif.config->link_capacity_kbps = 500;
358 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200359 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700360}
361
Jeremy Leconte4100d552020-09-11 18:02:36 +0200362TEST(FullStackTest, Foreman_Cif_500kbps_Delay_50_0_Plr_3_Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200363 auto fixture = CreateVideoQualityTestFixture();
364 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700365 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100366 foreman_cif.video[0] = {
367 true, 352, 288, 30,
368 30000, 500000, 2000000, false,
369 "VP8", 1, 0, 0,
370 true, false, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700371 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
372 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200373 foreman_cif.config->loss_percent = 3;
374 foreman_cif.config->link_capacity_kbps = 500;
375 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200376 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700377}
378
brandtrdd369c62016-11-16 23:56:57 -0800379#if defined(WEBRTC_USE_H264)
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200380TEST(FullStackTest, Foreman_Cif_Net_Delay_0_0_Plr_0_H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200381 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800382 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200383 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800384 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100385 foreman_cif.video[0] = {
386 true, 352, 288, 30,
387 700000, 700000, 700000, false,
388 "H264", 1, 0, 0,
389 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800390 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
391 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200392 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800393}
394
Jeremy Leconte4100d552020-09-11 18:02:36 +0200395TEST(FullStackTest, Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200396 auto fixture = CreateVideoQualityTestFixture();
397 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800398 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100399 foreman_cif.video[0] = {
400 true, 352, 288, 10,
401 30000, 30000, 30000, false,
402 "H264", 1, 0, 0,
403 false, false, true, ClipNameToClipPath("foreman_cif")};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800404 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
405 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200406 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800407}
408
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200409TEST(GenericDescriptorTest,
410 Foreman_Cif_Delay_50_0_Plr_5_H264_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200411 auto fixture = CreateVideoQualityTestFixture();
412 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800413 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100414 foreman_cif.video[0] = {
415 true, 352, 288, 30,
416 30000, 500000, 2000000, false,
417 "H264", 1, 0, 0,
418 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200419 foreman_cif.analyzer = {
420 "foreman_cif_delay_50_0_plr_5_H264_generic_descriptor", 0.0, 0.0,
421 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200422 foreman_cif.config->loss_percent = 5;
423 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200424 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200425 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800426}
427
Erik Språngeb3307f2022-08-22 09:06:06 +0000428TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Sps_Pps_Idr) {
429 test::ScopedFieldTrials override_field_trials(
430 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
431 auto fixture = CreateVideoQualityTestFixture();
432
433 ParamsWithLogging foreman_cif;
434 foreman_cif.call.send_side_bwe = true;
435 foreman_cif.video[0] = {
436 true, 352, 288, 30,
437 30000, 500000, 2000000, false,
438 "H264", 1, 0, 0,
439 false, false, true, ClipNameToClipPath("foreman_cif")};
440 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
441 0.0, kFullStackTestDurationSecs};
442 foreman_cif.config->loss_percent = 5;
443 foreman_cif.config->queue_delay_ms = 50;
444 fixture->RunWithAnalyzer(foreman_cif);
445}
446
brandtrdd369c62016-11-16 23:56:57 -0800447// Verify that this is worth the bot time, before enabling.
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200448TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Flexfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200449 auto fixture = CreateVideoQualityTestFixture();
450 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800451 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100452 foreman_cif.video[0] = {
453 true, 352, 288, 30,
454 30000, 500000, 2000000, false,
455 "H264", 1, 0, 0,
456 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800457 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
458 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200459 foreman_cif.config->loss_percent = 5;
460 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200461 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800462}
463
464// Ulpfec with H264 is an unsupported combination, so this test is only useful
465// for debugging. It is therefore disabled by default.
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200466TEST(FullStackTest, DISABLED_Foreman_Cif_Delay_50_0_Plr_5_H264_Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200467 auto fixture = CreateVideoQualityTestFixture();
468 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800469 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100470 foreman_cif.video[0] = {
471 true, 352, 288, 30,
472 30000, 500000, 2000000, false,
473 "H264", 1, 0, 0,
474 true, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800475 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
476 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200477 foreman_cif.config->loss_percent = 5;
478 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200479 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800480}
481#endif // defined(WEBRTC_USE_H264)
482
Jeremy Leconte4100d552020-09-11 18:02:36 +0200483TEST(FullStackTest, Foreman_Cif_500kbps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200484 auto fixture = CreateVideoQualityTestFixture();
485 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700486 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100487 foreman_cif.video[0] = {
488 true, 352, 288, 30,
489 30000, 500000, 2000000, false,
490 "VP8", 1, 0, 0,
491 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700492 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
493 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200494 foreman_cif.config->queue_length_packets = 0;
495 foreman_cif.config->queue_delay_ms = 0;
496 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200497 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000498}
499
Jeremy Leconte4100d552020-09-11 18:02:36 +0200500TEST(FullStackTest, Foreman_Cif_500kbps_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200501 auto fixture = CreateVideoQualityTestFixture();
502 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700503 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100504 foreman_cif.video[0] = {
505 true, 352, 288, 30,
506 30000, 500000, 2000000, false,
507 "VP8", 1, 0, 0,
508 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700509 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
510 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200511 foreman_cif.config->queue_length_packets = 32;
512 foreman_cif.config->queue_delay_ms = 0;
513 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200514 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000515}
516
Jeremy Leconte4100d552020-09-11 18:02:36 +0200517TEST(FullStackTest, Foreman_Cif_500kbps_100ms) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200518 auto fixture = CreateVideoQualityTestFixture();
519 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700520 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100521 foreman_cif.video[0] = {
522 true, 352, 288, 30,
523 30000, 500000, 2000000, false,
524 "VP8", 1, 0, 0,
525 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700526 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
527 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200528 foreman_cif.config->queue_length_packets = 0;
529 foreman_cif.config->queue_delay_ms = 100;
530 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200531 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000532}
533
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200534TEST(GenericDescriptorTest,
Jeremy Leconte4100d552020-09-11 18:02:36 +0200535 Foreman_Cif_500kbps_100ms_32pkts_Queue_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200536 auto fixture = CreateVideoQualityTestFixture();
537 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700538 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100539 foreman_cif.video[0] = {
540 true, 352, 288, 30,
541 30000, 500000, 2000000, false,
542 "VP8", 1, 0, 0,
543 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200544 foreman_cif.analyzer = {
545 "foreman_cif_500kbps_100ms_32pkts_queue_generic_descriptor", 0.0, 0.0,
546 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200547 foreman_cif.config->queue_length_packets = 32;
548 foreman_cif.config->queue_delay_ms = 100;
549 foreman_cif.config->link_capacity_kbps = 500;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200550 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200551 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700552}
553
Jeremy Leconte4100d552020-09-11 18:02:36 +0200554TEST(FullStackTest, Foreman_Cif_500kbps_100ms_32pkts_Queue_Recv_Bwe) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200555 auto fixture = CreateVideoQualityTestFixture();
556 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800557 foreman_cif.call.send_side_bwe = false;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100558 foreman_cif.video[0] = {
559 true, 352, 288, 30,
560 30000, 500000, 2000000, false,
561 "VP8", 1, 0, 0,
562 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800563 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
564 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200565 foreman_cif.config->queue_length_packets = 32;
566 foreman_cif.config->queue_delay_ms = 100;
567 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200568 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000569}
570
Jeremy Leconte4100d552020-09-11 18:02:36 +0200571TEST(FullStackTest, Foreman_Cif_1000kbps_100ms_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200572 auto fixture = CreateVideoQualityTestFixture();
573 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700574 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100575 foreman_cif.video[0] = {
576 true, 352, 288, 30,
577 30000, 2000000, 2000000, false,
578 "VP8", 1, 0, 0,
579 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700580 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
581 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200582 foreman_cif.config->queue_length_packets = 32;
583 foreman_cif.config->queue_delay_ms = 100;
584 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200585 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000586}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000587
sprangff19d352017-09-06 07:14:02 -0700588// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Jeremy Leconte4100d552020-09-11 18:02:36 +0200589TEST(FullStackTest, Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200590 auto fixture = CreateVideoQualityTestFixture();
591 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700592 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100593 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100594 true, 1280,
595 720, 50,
596 30000, 3000000,
597 3000000, false,
598 "VP8", 1,
599 0, 0,
600 false, false,
601 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
minyue626bc952016-10-31 05:47:02 -0700602 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
603 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200604 conf_motion_hd.config->queue_length_packets = 32;
605 conf_motion_hd.config->queue_delay_ms = 100;
606 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200607 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700608}
609
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200610TEST(GenericDescriptorTest,
Jeremy Leconte4100d552020-09-11 18:02:36 +0200611 Conference_Motion_Hd_2tl_Moderate_Limits_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200612 auto fixture = CreateVideoQualityTestFixture();
613 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700614 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100615 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100616 true, 1280,
617 720, 50,
618 30000, 3000000,
619 3000000, false,
620 "VP8", 2,
621 -1, 0,
622 false, false,
623 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
philipeldd8b0d82018-09-27 11:18:10 +0200624 conf_motion_hd.analyzer = {
Danil Chapovalov636865e2020-06-03 14:11:26 +0200625 "conference_motion_hd_2tl_moderate_limits_generic_descriptor", 0.0, 0.0,
philipeldd8b0d82018-09-27 11:18:10 +0200626 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200627 conf_motion_hd.config->queue_length_packets = 50;
628 conf_motion_hd.config->loss_percent = 3;
629 conf_motion_hd.config->queue_delay_ms = 100;
630 conf_motion_hd.config->link_capacity_kbps = 2000;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200631 conf_motion_hd.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200632 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700633}
634
Jeremy Leconte4100d552020-09-11 18:02:36 +0200635TEST(FullStackTest, Conference_Motion_Hd_3tl_Moderate_Limits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200636 auto fixture = CreateVideoQualityTestFixture();
637 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700638 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100639 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100640 true, 1280,
641 720, 50,
642 30000, 3000000,
643 3000000, false,
644 "VP8", 3,
645 -1, 0,
646 false, false,
647 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700648 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
649 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200650 conf_motion_hd.config->queue_length_packets = 50;
651 conf_motion_hd.config->loss_percent = 3;
652 conf_motion_hd.config->queue_delay_ms = 100;
653 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200654 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700655}
656
Jeremy Leconte4100d552020-09-11 18:02:36 +0200657TEST(FullStackTest, Conference_Motion_Hd_4tl_Moderate_Limits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200658 auto fixture = CreateVideoQualityTestFixture();
659 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700660 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100661 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100662 true, 1280,
663 720, 50,
664 30000, 3000000,
665 3000000, false,
666 "VP8", 4,
667 -1, 0,
668 false, false,
669 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700670 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
671 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200672 conf_motion_hd.config->queue_length_packets = 50;
673 conf_motion_hd.config->loss_percent = 3;
674 conf_motion_hd.config->queue_delay_ms = 100;
675 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200676 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700677}
678
Jeremy Leconte4100d552020-09-11 18:02:36 +0200679TEST(FullStackTest, Conference_Motion_Hd_3tl_Alt_Moderate_Limits) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200680 test::ScopedFieldTrials field_trial(
681 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100682 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200683 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700684 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100685 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100686 true, 1280,
687 720, 50,
688 30000, 3000000,
689 3000000, false,
690 "VP8", 3,
691 -1, 0,
692 false, false,
693 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200694 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
695 0.0, 0.0, kFullStackTestDurationSecs};
696 conf_motion_hd.config->queue_length_packets = 50;
697 conf_motion_hd.config->loss_percent = 3;
698 conf_motion_hd.config->queue_delay_ms = 100;
699 conf_motion_hd.config->link_capacity_kbps = 2000;
700 fixture->RunWithAnalyzer(conf_motion_hd);
701}
702
Jeremy Leconte4100d552020-09-11 18:02:36 +0200703TEST(FullStackTest, Conference_Motion_Hd_3tl_Alt_Heavy_Moderate_Limits) {
Rasmus Brandt35836932018-10-23 09:17:24 +0200704 auto fixture = CreateVideoQualityTestFixture();
705 test::ScopedFieldTrials field_trial(
706 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
707 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
708 ParamsWithLogging conf_motion_hd;
709 conf_motion_hd.call.send_side_bwe = true;
710 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100711 true, 1280,
712 720, 50,
713 30000, 3000000,
714 3000000, false,
715 "VP8", 3,
716 -1, 0,
717 false, false,
718 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200719 conf_motion_hd.analyzer = {
720 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
721 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200722 conf_motion_hd.config->queue_length_packets = 50;
723 conf_motion_hd.config->loss_percent = 3;
724 conf_motion_hd.config->queue_delay_ms = 100;
725 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200726 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700727}
728
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100729#if defined(RTC_ENABLE_VP9)
Jeremy Leconte4100d552020-09-11 18:02:36 +0200730TEST(FullStackTest, Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue_Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200731 auto fixture = CreateVideoQualityTestFixture();
732 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800733 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100734 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100735 true, 1280,
736 720, 50,
737 30000, 3000000,
738 3000000, false,
739 "VP9", 1,
740 0, 0,
741 false, false,
742 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
jianj390e64d2017-02-03 09:51:23 -0800743 conf_motion_hd.analyzer = {
744 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
745 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200746 conf_motion_hd.config->queue_length_packets = 32;
747 conf_motion_hd.config->queue_delay_ms = 100;
748 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200749 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800750}
751#endif
752
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200753TEST(FullStackTest, Screenshare_Slides) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200754 auto fixture = CreateVideoQualityTestFixture();
755 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700756 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200757 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
758 1000000, false, "VP8", 2, 1, 400000,
759 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100760 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700761 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
762 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200763 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200764}
765
Florent Castelli66b38602019-07-10 16:57:57 +0200766#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100767// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200768TEST(FullStackTest, Screenshare_Slides_Simulcast) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200769 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200770 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800771 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100772 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100773 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100774 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100775 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800776 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
777 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200778 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100779 screenshare_params_high.video[0] = {
780 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
781 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800782 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100783 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200784 1000000, false, "VP8", 2, 0, 400000,
785 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800786
787 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200788 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
789 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200790 screenshare.ss[0] = {
791 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
792 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200793 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800794}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100795
Florent Castelli66b38602019-07-10 16:57:57 +0200796#endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
ilnikcb8c1462017-03-09 09:23:30 -0800797
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200798TEST(FullStackTest, Screenshare_Slides_Scrolling) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200799 auto fixture = CreateVideoQualityTestFixture();
800 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700801 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200802 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
803 1000000, false, "VP8", 2, 1, 400000,
804 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100805 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700806 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
807 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200808 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700809}
810
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200811TEST(GenericDescriptorTest, Screenshare_Slides_Lossy_Net_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200812 auto fixture = CreateVideoQualityTestFixture();
813 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700814 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200815 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
816 1000000, false, "VP8", 2, 1, 400000,
817 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100818 screenshare.screenshare[0] = {true, false, 10};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200819 screenshare.analyzer = {"screenshare_slides_lossy_net_generic_descriptor",
820 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200821 screenshare.config->loss_percent = 5;
822 screenshare.config->queue_delay_ms = 200;
823 screenshare.config->link_capacity_kbps = 500;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200824 screenshare.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200825 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800826}
827
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200828TEST(FullStackTest, Screenshare_Slides_Very_Lossy) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200829 auto fixture = CreateVideoQualityTestFixture();
830 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700831 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200832 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
833 1000000, false, "VP8", 2, 1, 400000,
834 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100835 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700836 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
837 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200838 screenshare.config->loss_percent = 10;
839 screenshare.config->queue_delay_ms = 200;
840 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200841 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800842}
843
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200844TEST(FullStackTest, Screenshare_Slides_Lossy_Limited) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200845 auto fixture = CreateVideoQualityTestFixture();
846 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700847 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200848 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
849 1000000, false, "VP8", 2, 1, 400000,
850 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100851 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700852 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
853 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200854 screenshare.config->loss_percent = 5;
855 screenshare.config->link_capacity_kbps = 200;
856 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700857
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200858 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700859}
860
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200861TEST(FullStackTest, Screenshare_Slides_Moderately_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200862 auto fixture = CreateVideoQualityTestFixture();
863 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700864 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200865 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
866 1000000, false, "VP8", 2, 1, 400000,
867 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100868 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700869 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
870 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200871 screenshare.config->loss_percent = 1;
872 screenshare.config->link_capacity_kbps = 1200;
873 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700874
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200875 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700876}
877
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100878// Since ParamsWithLogging::Video is not trivially destructible, we can't
879// store these structs as const globals.
880ParamsWithLogging::Video SvcVp9Video() {
881 return ParamsWithLogging::Video{
882 true, 1280,
883 720, 30,
884 800000, 2500000,
885 2500000, false,
886 "VP9", 3,
887 2, 400000,
888 false, false,
889 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
890}
ilnik566c43b2017-03-07 04:42:54 -0800891
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100892ParamsWithLogging::Video SimulcastVp8VideoHigh() {
893 return ParamsWithLogging::Video{
894 true, 1280,
895 720, 30,
896 800000, 2500000,
897 2500000, false,
898 "VP8", 3,
899 2, 400000,
900 false, false,
901 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
902}
ilnik566c43b2017-03-07 04:42:54 -0800903
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100904ParamsWithLogging::Video SimulcastVp8VideoMedium() {
905 return ParamsWithLogging::Video{
906 true, 640,
907 360, 30,
908 150000, 500000,
909 700000, false,
910 "VP8", 3,
911 2, 400000,
912 false, false,
913 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
914}
ilnik566c43b2017-03-07 04:42:54 -0800915
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100916ParamsWithLogging::Video SimulcastVp8VideoLow() {
917 return ParamsWithLogging::Video{
918 true, 320,
919 180, 30,
920 30000, 150000,
921 200000, false,
922 "VP8", 3,
923 2, 400000,
924 false, false,
925 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
926}
ilnik566c43b2017-03-07 04:42:54 -0800927
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100928#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100929
Jeremy Leconte4100d552020-09-11 18:02:36 +0200930TEST(FullStackTest, Screenshare_Slides_Vp9_3sl_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200931 auto fixture = CreateVideoQualityTestFixture();
932 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700933 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100934 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
935 2000000, false, "VP9", 1, 0, 400000,
936 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100937 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100938 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -0700939 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200940 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100941 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
942 std::vector<SpatialLayer>(), true};
943 fixture->RunWithAnalyzer(screenshare);
944}
945
Patrik Höglundf6767ed2020-03-13 12:45:32 +0100946// TODO(http://bugs.webrtc.org/9506): investigate.
Sergey Silkin7f978f12018-09-10 12:01:49 +0000947#if !defined(WEBRTC_MAC)
948
Jeremy Leconte4100d552020-09-11 18:02:36 +0200949TEST(FullStackTest, Vp9ksvc_3sl_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200950 webrtc::test::ScopedFieldTrials override_trials(
951 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200952 auto fixture = CreateVideoQualityTestFixture();
953 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200954 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100955 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +0200956 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
957 kFullStackTestDurationSecs};
958 simulcast.ss[0] = {
959 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
960 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200961 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200962}
963
Jeremy Leconte4100d552020-09-11 18:02:36 +0200964TEST(FullStackTest, Vp9ksvc_3sl_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200965 webrtc::test::ScopedFieldTrials override_trials(
966 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200967 auto fixture = CreateVideoQualityTestFixture();
968 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200969 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100970 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +0200971 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
972 kFullStackTestDurationSecs};
973 simulcast.ss[0] = {
974 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
975 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200976 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200977}
“Michael277a6562018-06-01 14:09:19 -0500978
Jeremy Leconte4100d552020-09-11 18:02:36 +0200979TEST(FullStackTest, Vp9ksvc_3sl_Low_Bw_Limited) {
Ilya Nikolaevskiyef0033b2020-02-25 13:59:08 +0100980 webrtc::test::ScopedFieldTrials override_trials(
981 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
982 "WebRTC-Vp9ExternalRefCtrl/Enabled/"));
983 auto fixture = CreateVideoQualityTestFixture();
984 ParamsWithLogging simulcast;
985 simulcast.config->link_capacity_kbps = 500;
986 simulcast.call.send_side_bwe = true;
987 simulcast.video[0] = SvcVp9Video();
988 simulcast.analyzer = {"vp9ksvc_3sl_low_bw_limited", 0.0, 0.0,
989 kFullStackTestDurationSecs};
990 simulcast.ss[0] = {
991 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
992 std::vector<SpatialLayer>(), false};
993 fixture->RunWithAnalyzer(simulcast);
994}
995
Jeremy Leconte4100d552020-09-11 18:02:36 +0200996TEST(FullStackTest, Vp9ksvc_3sl_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200997 webrtc::test::ScopedFieldTrials override_trials(
998 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200999 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +02001000 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -05001001 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001002 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 14:09:19 -05001003 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1004 kFullStackTestDurationSecs};
1005 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001006 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -05001007 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +02001008 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +02001009 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001010 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -05001011}
Erik Språngd3438aa2018-11-08 16:56:43 +01001012
1013// TODO(webrtc:9722): Remove when experiment is cleaned up.
Jeremy Leconte4100d552020-09-11 18:02:36 +02001014TEST(FullStackTest, Vp9ksvc_3sl_Medium_Network_Restricted_Trusted_Rate) {
Erik Språngd3438aa2018-11-08 16:56:43 +01001015 webrtc::test::ScopedFieldTrials override_trials(
Mirko Bonadeie39b3782020-09-24 14:02:39 +02001016 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +01001017 auto fixture = CreateVideoQualityTestFixture();
1018 ParamsWithLogging simulcast;
1019 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001020 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 16:56:43 +01001021 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1022 0.0, 0.0, kFullStackTestDurationSecs};
1023 simulcast.ss[0] = {
1024 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1025 std::vector<SpatialLayer>(), false};
1026 simulcast.config->link_capacity_kbps = 1000;
1027 simulcast.config->queue_delay_ms = 100;
1028 fixture->RunWithAnalyzer(simulcast);
1029}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001030#endif // !defined(WEBRTC_MAC)
1031
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001032#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001033
ilnik6b826ef2017-06-16 06:53:48 -07001034// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001035// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1036#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001037#define MAYBE_Simulcast_HD_High DISABLED_Simulcast_HD_High
ilnik6b826ef2017-06-16 06:53:48 -07001038#else
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001039#define MAYBE_Simulcast_HD_High Simulcast_HD_High
ilnik6b826ef2017-06-16 06:53:48 -07001040#endif
1041
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001042TEST(FullStackTest, MAYBE_Simulcast_HD_High) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001043 auto fixture = CreateVideoQualityTestFixture();
1044 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001045 simulcast.call.send_side_bwe = true;
Jonas Olssona4d87372019-07-05 19:08:33 +02001046 simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
1047 2500000, false, "VP8", 3, 2, 400000,
1048 false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001049 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1050 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001051 simulcast.config->loss_percent = 0;
1052 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001053 std::vector<VideoStream> streams = {
Jonas Olssona4d87372019-07-05 19:08:33 +02001054 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1055 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1056 VideoQualityTest::DefaultVideoStream(simulcast, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001057 simulcast.ss[0] = {
1058 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1059 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001060 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1061 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001062 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001063}
1064
Jeremy Leconte4100d552020-09-11 18:02:36 +02001065TEST(FullStackTest, Simulcast_Vp8_3sl_High) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001066 auto fixture = CreateVideoQualityTestFixture();
1067 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001068 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001069 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001070 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001071 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001072 simulcast.config->loss_percent = 0;
1073 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001074 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001075 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001076 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001077 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001078 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001079 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001080
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001081 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001082 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1083 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1084 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001085 simulcast.ss[0] = {
1086 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1087 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001088 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001089}
1090
Jeremy Leconte4100d552020-09-11 18:02:36 +02001091TEST(FullStackTest, Simulcast_Vp8_3sl_Low) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001092 auto fixture = CreateVideoQualityTestFixture();
1093 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001094 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001095 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001096 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001097 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001098 simulcast.config->loss_percent = 0;
1099 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001100 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001101 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001102 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001103 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001104 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001105 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001106
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001107 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1109 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1110 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001111 simulcast.ss[0] = {
1112 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1113 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001114 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001115}
1116
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001117// This test assumes ideal network conditions with target bandwidth being
1118// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1119// Android32 bots can't handle this high bitrate, so disable test for those.
1120#if defined(WEBRTC_ANDROID)
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001121#define MAYBE_High_Bitrate_With_Fake_Codec DISABLED_High_Bitrate_With_Fake_Codec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001122#else
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001123#define MAYBE_High_Bitrate_With_Fake_Codec High_Bitrate_With_Fake_Codec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001124#endif // defined(WEBRTC_ANDROID)
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001125TEST(FullStackTest, MAYBE_High_Bitrate_With_Fake_Codec) {
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001126 auto fixture = CreateVideoQualityTestFixture();
1127 const int target_bitrate = 100000000;
1128 ParamsWithLogging generator;
1129 generator.call.send_side_bwe = true;
1130 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1131 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1132 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1133 generator.video[0] = {true,
1134 360,
1135 240,
1136 30,
1137 target_bitrate / 2,
1138 target_bitrate,
1139 target_bitrate * 2,
1140 false,
1141 "FakeCodec",
1142 1,
1143 0,
1144 0,
1145 false,
1146 false,
1147 false,
1148 "Generator"};
1149 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1150 kFullStackTestDurationSecs};
1151 fixture->RunWithAnalyzer(generator);
1152}
1153
oprypin743117f2017-09-15 05:24:24 -07001154#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1155// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001156// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
Jeremy Leconte4100d552020-09-11 18:02:36 +02001157#define MAYBE_Largeroom_50thumb DISABLED_Largeroom_50thumb
ilnikf89a7382017-03-07 06:15:27 -08001158#else
Jeremy Leconte4100d552020-09-11 18:02:36 +02001159#define MAYBE_Largeroom_50thumb Largeroom_50thumb
ilnikf89a7382017-03-07 06:15:27 -08001160#endif
1161
Jeremy Leconte4100d552020-09-11 18:02:36 +02001162TEST(FullStackTest, MAYBE_Largeroom_50thumb) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001163 auto fixture = CreateVideoQualityTestFixture();
1164 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001165 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001166 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001167 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1168 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001169 large_room.config->loss_percent = 0;
1170 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001171 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001172 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001173 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001174 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001175 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001176 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001177
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001178 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001179 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1180 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1181 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001182 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001183 large_room.ss[0] = {
1184 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1185 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001186 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001187}
1188
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001189} // namespace webrtc