blob: 75fb69bbb5aa6245d0caec94d3c6d9a17a3bb2bb [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
428// Verify that this is worth the bot time, before enabling.
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200429TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Flexfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200430 auto fixture = CreateVideoQualityTestFixture();
431 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800432 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100433 foreman_cif.video[0] = {
434 true, 352, 288, 30,
435 30000, 500000, 2000000, false,
436 "H264", 1, 0, 0,
437 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800438 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
439 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200440 foreman_cif.config->loss_percent = 5;
441 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200442 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800443}
444
445// Ulpfec with H264 is an unsupported combination, so this test is only useful
446// for debugging. It is therefore disabled by default.
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200447TEST(FullStackTest, DISABLED_Foreman_Cif_Delay_50_0_Plr_5_H264_Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200448 auto fixture = CreateVideoQualityTestFixture();
449 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800450 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100451 foreman_cif.video[0] = {
452 true, 352, 288, 30,
453 30000, 500000, 2000000, false,
454 "H264", 1, 0, 0,
455 true, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800456 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
457 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200458 foreman_cif.config->loss_percent = 5;
459 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200460 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800461}
462#endif // defined(WEBRTC_USE_H264)
463
Jeremy Leconte4100d552020-09-11 18:02:36 +0200464TEST(FullStackTest, Foreman_Cif_500kbps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200465 auto fixture = CreateVideoQualityTestFixture();
466 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700467 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100468 foreman_cif.video[0] = {
469 true, 352, 288, 30,
470 30000, 500000, 2000000, false,
471 "VP8", 1, 0, 0,
472 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700473 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
474 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200475 foreman_cif.config->queue_length_packets = 0;
476 foreman_cif.config->queue_delay_ms = 0;
477 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200478 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000479}
480
Jeremy Leconte4100d552020-09-11 18:02:36 +0200481TEST(FullStackTest, Foreman_Cif_500kbps_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200482 auto fixture = CreateVideoQualityTestFixture();
483 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700484 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100485 foreman_cif.video[0] = {
486 true, 352, 288, 30,
487 30000, 500000, 2000000, false,
488 "VP8", 1, 0, 0,
489 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700490 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
491 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200492 foreman_cif.config->queue_length_packets = 32;
493 foreman_cif.config->queue_delay_ms = 0;
494 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200495 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000496}
497
Jeremy Leconte4100d552020-09-11 18:02:36 +0200498TEST(FullStackTest, Foreman_Cif_500kbps_100ms) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200499 auto fixture = CreateVideoQualityTestFixture();
500 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700501 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100502 foreman_cif.video[0] = {
503 true, 352, 288, 30,
504 30000, 500000, 2000000, false,
505 "VP8", 1, 0, 0,
506 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700507 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
508 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200509 foreman_cif.config->queue_length_packets = 0;
510 foreman_cif.config->queue_delay_ms = 100;
511 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200512 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000513}
514
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200515TEST(GenericDescriptorTest,
Jeremy Leconte4100d552020-09-11 18:02:36 +0200516 Foreman_Cif_500kbps_100ms_32pkts_Queue_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200517 auto fixture = CreateVideoQualityTestFixture();
518 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700519 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100520 foreman_cif.video[0] = {
521 true, 352, 288, 30,
522 30000, 500000, 2000000, false,
523 "VP8", 1, 0, 0,
524 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200525 foreman_cif.analyzer = {
526 "foreman_cif_500kbps_100ms_32pkts_queue_generic_descriptor", 0.0, 0.0,
527 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200528 foreman_cif.config->queue_length_packets = 32;
529 foreman_cif.config->queue_delay_ms = 100;
530 foreman_cif.config->link_capacity_kbps = 500;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200531 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200532 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700533}
534
Jeremy Leconte4100d552020-09-11 18:02:36 +0200535TEST(FullStackTest, Foreman_Cif_500kbps_100ms_32pkts_Queue_Recv_Bwe) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200536 auto fixture = CreateVideoQualityTestFixture();
537 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800538 foreman_cif.call.send_side_bwe = false;
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")};
brandtr93c5d032016-11-30 07:50:07 -0800544 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
545 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200546 foreman_cif.config->queue_length_packets = 32;
547 foreman_cif.config->queue_delay_ms = 100;
548 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200549 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000550}
551
Jeremy Leconte4100d552020-09-11 18:02:36 +0200552TEST(FullStackTest, Foreman_Cif_1000kbps_100ms_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200553 auto fixture = CreateVideoQualityTestFixture();
554 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700555 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100556 foreman_cif.video[0] = {
557 true, 352, 288, 30,
558 30000, 2000000, 2000000, false,
559 "VP8", 1, 0, 0,
560 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700561 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
562 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200563 foreman_cif.config->queue_length_packets = 32;
564 foreman_cif.config->queue_delay_ms = 100;
565 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200566 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000567}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000568
sprangff19d352017-09-06 07:14:02 -0700569// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Jeremy Leconte4100d552020-09-11 18:02:36 +0200570TEST(FullStackTest, Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200571 auto fixture = CreateVideoQualityTestFixture();
572 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700573 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100574 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100575 true, 1280,
576 720, 50,
577 30000, 3000000,
578 3000000, false,
579 "VP8", 1,
580 0, 0,
581 false, false,
582 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
minyue626bc952016-10-31 05:47:02 -0700583 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
584 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200585 conf_motion_hd.config->queue_length_packets = 32;
586 conf_motion_hd.config->queue_delay_ms = 100;
587 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200588 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700589}
590
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200591TEST(GenericDescriptorTest,
Jeremy Leconte4100d552020-09-11 18:02:36 +0200592 Conference_Motion_Hd_2tl_Moderate_Limits_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200593 auto fixture = CreateVideoQualityTestFixture();
594 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700595 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100596 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100597 true, 1280,
598 720, 50,
599 30000, 3000000,
600 3000000, false,
601 "VP8", 2,
602 -1, 0,
603 false, false,
604 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
philipeldd8b0d82018-09-27 11:18:10 +0200605 conf_motion_hd.analyzer = {
Danil Chapovalov636865e2020-06-03 14:11:26 +0200606 "conference_motion_hd_2tl_moderate_limits_generic_descriptor", 0.0, 0.0,
philipeldd8b0d82018-09-27 11:18:10 +0200607 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200608 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;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200612 conf_motion_hd.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200613 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700614}
615
Jeremy Leconte4100d552020-09-11 18:02:36 +0200616TEST(FullStackTest, Conference_Motion_Hd_3tl_Moderate_Limits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200617 auto fixture = CreateVideoQualityTestFixture();
618 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700619 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100620 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100621 true, 1280,
622 720, 50,
623 30000, 3000000,
624 3000000, false,
625 "VP8", 3,
626 -1, 0,
627 false, false,
628 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700629 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
630 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200631 conf_motion_hd.config->queue_length_packets = 50;
632 conf_motion_hd.config->loss_percent = 3;
633 conf_motion_hd.config->queue_delay_ms = 100;
634 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200635 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700636}
637
Jeremy Leconte4100d552020-09-11 18:02:36 +0200638TEST(FullStackTest, Conference_Motion_Hd_4tl_Moderate_Limits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200639 auto fixture = CreateVideoQualityTestFixture();
640 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700641 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100642 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100643 true, 1280,
644 720, 50,
645 30000, 3000000,
646 3000000, false,
647 "VP8", 4,
648 -1, 0,
649 false, false,
650 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700651 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
652 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200653 conf_motion_hd.config->queue_length_packets = 50;
654 conf_motion_hd.config->loss_percent = 3;
655 conf_motion_hd.config->queue_delay_ms = 100;
656 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200657 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700658}
659
Jeremy Leconte4100d552020-09-11 18:02:36 +0200660TEST(FullStackTest, Conference_Motion_Hd_3tl_Alt_Moderate_Limits) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200661 test::ScopedFieldTrials field_trial(
662 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100663 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200664 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700665 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100666 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100667 true, 1280,
668 720, 50,
669 30000, 3000000,
670 3000000, false,
671 "VP8", 3,
672 -1, 0,
673 false, false,
674 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200675 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
676 0.0, 0.0, kFullStackTestDurationSecs};
677 conf_motion_hd.config->queue_length_packets = 50;
678 conf_motion_hd.config->loss_percent = 3;
679 conf_motion_hd.config->queue_delay_ms = 100;
680 conf_motion_hd.config->link_capacity_kbps = 2000;
681 fixture->RunWithAnalyzer(conf_motion_hd);
682}
683
Jeremy Leconte4100d552020-09-11 18:02:36 +0200684TEST(FullStackTest, Conference_Motion_Hd_3tl_Alt_Heavy_Moderate_Limits) {
Rasmus Brandt35836932018-10-23 09:17:24 +0200685 auto fixture = CreateVideoQualityTestFixture();
686 test::ScopedFieldTrials field_trial(
687 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
688 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
689 ParamsWithLogging conf_motion_hd;
690 conf_motion_hd.call.send_side_bwe = true;
691 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100692 true, 1280,
693 720, 50,
694 30000, 3000000,
695 3000000, false,
696 "VP8", 3,
697 -1, 0,
698 false, false,
699 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200700 conf_motion_hd.analyzer = {
701 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
702 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200703 conf_motion_hd.config->queue_length_packets = 50;
704 conf_motion_hd.config->loss_percent = 3;
705 conf_motion_hd.config->queue_delay_ms = 100;
706 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200707 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700708}
709
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100710#if defined(RTC_ENABLE_VP9)
Jeremy Leconte4100d552020-09-11 18:02:36 +0200711TEST(FullStackTest, Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue_Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200712 auto fixture = CreateVideoQualityTestFixture();
713 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800714 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100715 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100716 true, 1280,
717 720, 50,
718 30000, 3000000,
719 3000000, false,
720 "VP9", 1,
721 0, 0,
722 false, false,
723 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
jianj390e64d2017-02-03 09:51:23 -0800724 conf_motion_hd.analyzer = {
725 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
726 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200727 conf_motion_hd.config->queue_length_packets = 32;
728 conf_motion_hd.config->queue_delay_ms = 100;
729 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200730 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800731}
732#endif
733
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200734TEST(FullStackTest, Screenshare_Slides) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200735 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", 0.0, 0.0,
743 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200744 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200745}
746
Florent Castelli66b38602019-07-10 16:57:57 +0200747#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100748// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200749TEST(FullStackTest, Screenshare_Slides_Simulcast) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200750 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200751 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800752 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100753 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100754 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100755 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100756 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800757 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
758 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200759 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100760 screenshare_params_high.video[0] = {
761 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
762 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800763 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100764 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200765 1000000, false, "VP8", 2, 0, 400000,
766 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800767
768 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200769 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
770 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200771 screenshare.ss[0] = {
772 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
773 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200774 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800775}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100776
Florent Castelli66b38602019-07-10 16:57:57 +0200777#endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
ilnikcb8c1462017-03-09 09:23:30 -0800778
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200779TEST(FullStackTest, Screenshare_Slides_Scrolling) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200780 auto fixture = CreateVideoQualityTestFixture();
781 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700782 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200783 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
784 1000000, false, "VP8", 2, 1, 400000,
785 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100786 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700787 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
788 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200789 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700790}
791
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200792TEST(GenericDescriptorTest, Screenshare_Slides_Lossy_Net_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200793 auto fixture = CreateVideoQualityTestFixture();
794 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700795 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200796 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
797 1000000, false, "VP8", 2, 1, 400000,
798 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100799 screenshare.screenshare[0] = {true, false, 10};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200800 screenshare.analyzer = {"screenshare_slides_lossy_net_generic_descriptor",
801 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200802 screenshare.config->loss_percent = 5;
803 screenshare.config->queue_delay_ms = 200;
804 screenshare.config->link_capacity_kbps = 500;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200805 screenshare.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200806 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800807}
808
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200809TEST(FullStackTest, Screenshare_Slides_Very_Lossy) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200810 auto fixture = CreateVideoQualityTestFixture();
811 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700812 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200813 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
814 1000000, false, "VP8", 2, 1, 400000,
815 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100816 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700817 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
818 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200819 screenshare.config->loss_percent = 10;
820 screenshare.config->queue_delay_ms = 200;
821 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800823}
824
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200825TEST(FullStackTest, Screenshare_Slides_Lossy_Limited) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200826 auto fixture = CreateVideoQualityTestFixture();
827 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700828 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200829 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
830 1000000, false, "VP8", 2, 1, 400000,
831 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100832 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700833 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
834 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200835 screenshare.config->loss_percent = 5;
836 screenshare.config->link_capacity_kbps = 200;
837 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700838
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200839 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700840}
841
Jeremy Lecontec8850cb2020-09-10 20:46:33 +0200842TEST(FullStackTest, Screenshare_Slides_Moderately_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200843 auto fixture = CreateVideoQualityTestFixture();
844 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700845 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200846 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
847 1000000, false, "VP8", 2, 1, 400000,
848 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100849 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700850 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
851 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200852 screenshare.config->loss_percent = 1;
853 screenshare.config->link_capacity_kbps = 1200;
854 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700855
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200856 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700857}
858
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100859// Since ParamsWithLogging::Video is not trivially destructible, we can't
860// store these structs as const globals.
861ParamsWithLogging::Video SvcVp9Video() {
862 return ParamsWithLogging::Video{
863 true, 1280,
864 720, 30,
865 800000, 2500000,
866 2500000, false,
867 "VP9", 3,
868 2, 400000,
869 false, false,
870 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
871}
ilnik566c43b2017-03-07 04:42:54 -0800872
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100873ParamsWithLogging::Video SimulcastVp8VideoHigh() {
874 return ParamsWithLogging::Video{
875 true, 1280,
876 720, 30,
877 800000, 2500000,
878 2500000, false,
879 "VP8", 3,
880 2, 400000,
881 false, false,
882 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
883}
ilnik566c43b2017-03-07 04:42:54 -0800884
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100885ParamsWithLogging::Video SimulcastVp8VideoMedium() {
886 return ParamsWithLogging::Video{
887 true, 640,
888 360, 30,
889 150000, 500000,
890 700000, false,
891 "VP8", 3,
892 2, 400000,
893 false, false,
894 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
895}
ilnik566c43b2017-03-07 04:42:54 -0800896
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100897ParamsWithLogging::Video SimulcastVp8VideoLow() {
898 return ParamsWithLogging::Video{
899 true, 320,
900 180, 30,
901 30000, 150000,
902 200000, false,
903 "VP8", 3,
904 2, 400000,
905 false, false,
906 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
907}
ilnik566c43b2017-03-07 04:42:54 -0800908
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100909#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100910
Jeremy Leconte4100d552020-09-11 18:02:36 +0200911TEST(FullStackTest, Screenshare_Slides_Vp9_3sl_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200912 auto fixture = CreateVideoQualityTestFixture();
913 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700914 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100915 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
916 2000000, false, "VP9", 1, 0, 400000,
917 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100918 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100919 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -0700920 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200921 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100922 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
923 std::vector<SpatialLayer>(), true};
924 fixture->RunWithAnalyzer(screenshare);
925}
926
Patrik Höglundf6767ed2020-03-13 12:45:32 +0100927// TODO(http://bugs.webrtc.org/9506): investigate.
Sergey Silkin7f978f12018-09-10 12:01:49 +0000928#if !defined(WEBRTC_MAC)
929
Jeremy Leconte4100d552020-09-11 18:02:36 +0200930TEST(FullStackTest, Vp9ksvc_3sl_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200931 webrtc::test::ScopedFieldTrials override_trials(
932 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200933 auto fixture = CreateVideoQualityTestFixture();
934 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200935 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100936 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +0200937 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
938 kFullStackTestDurationSecs};
939 simulcast.ss[0] = {
940 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
941 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200942 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200943}
944
Jeremy Leconte4100d552020-09-11 18:02:36 +0200945TEST(FullStackTest, Vp9ksvc_3sl_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200946 webrtc::test::ScopedFieldTrials override_trials(
947 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948 auto fixture = CreateVideoQualityTestFixture();
949 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200950 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100951 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +0200952 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
953 kFullStackTestDurationSecs};
954 simulcast.ss[0] = {
955 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
956 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200957 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200958}
“Michael277a6562018-06-01 14:09:19 -0500959
Jeremy Leconte4100d552020-09-11 18:02:36 +0200960TEST(FullStackTest, Vp9ksvc_3sl_Low_Bw_Limited) {
Ilya Nikolaevskiyef0033b2020-02-25 13:59:08 +0100961 webrtc::test::ScopedFieldTrials override_trials(
962 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
963 "WebRTC-Vp9ExternalRefCtrl/Enabled/"));
964 auto fixture = CreateVideoQualityTestFixture();
965 ParamsWithLogging simulcast;
966 simulcast.config->link_capacity_kbps = 500;
967 simulcast.call.send_side_bwe = true;
968 simulcast.video[0] = SvcVp9Video();
969 simulcast.analyzer = {"vp9ksvc_3sl_low_bw_limited", 0.0, 0.0,
970 kFullStackTestDurationSecs};
971 simulcast.ss[0] = {
972 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
973 std::vector<SpatialLayer>(), false};
974 fixture->RunWithAnalyzer(simulcast);
975}
976
Jeremy Leconte4100d552020-09-11 18:02:36 +0200977TEST(FullStackTest, Vp9ksvc_3sl_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200978 webrtc::test::ScopedFieldTrials override_trials(
979 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200980 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200981 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500982 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100983 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 14:09:19 -0500984 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
985 kFullStackTestDurationSecs};
986 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200987 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500988 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200989 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200990 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200991 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500992}
Erik Språngd3438aa2018-11-08 16:56:43 +0100993
994// TODO(webrtc:9722): Remove when experiment is cleaned up.
Jeremy Leconte4100d552020-09-11 18:02:36 +0200995TEST(FullStackTest, Vp9ksvc_3sl_Medium_Network_Restricted_Trusted_Rate) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100996 webrtc::test::ScopedFieldTrials override_trials(
Mirko Bonadeie39b3782020-09-24 14:02:39 +0200997 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100998 auto fixture = CreateVideoQualityTestFixture();
999 ParamsWithLogging simulcast;
1000 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001001 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 16:56:43 +01001002 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1003 0.0, 0.0, kFullStackTestDurationSecs};
1004 simulcast.ss[0] = {
1005 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1006 std::vector<SpatialLayer>(), false};
1007 simulcast.config->link_capacity_kbps = 1000;
1008 simulcast.config->queue_delay_ms = 100;
1009 fixture->RunWithAnalyzer(simulcast);
1010}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001011#endif // !defined(WEBRTC_MAC)
1012
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001013#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001014
ilnik6b826ef2017-06-16 06:53:48 -07001015// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001016// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1017#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001018#define MAYBE_Simulcast_HD_High DISABLED_Simulcast_HD_High
ilnik6b826ef2017-06-16 06:53:48 -07001019#else
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001020#define MAYBE_Simulcast_HD_High Simulcast_HD_High
ilnik6b826ef2017-06-16 06:53:48 -07001021#endif
1022
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001023TEST(FullStackTest, MAYBE_Simulcast_HD_High) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001024 auto fixture = CreateVideoQualityTestFixture();
1025 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001026 simulcast.call.send_side_bwe = true;
Jonas Olssona4d87372019-07-05 19:08:33 +02001027 simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
1028 2500000, false, "VP8", 3, 2, 400000,
1029 false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001030 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1031 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001032 simulcast.config->loss_percent = 0;
1033 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001034 std::vector<VideoStream> streams = {
Jonas Olssona4d87372019-07-05 19:08:33 +02001035 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1036 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1037 VideoQualityTest::DefaultVideoStream(simulcast, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001038 simulcast.ss[0] = {
1039 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1040 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001041 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1042 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001043 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001044}
1045
Jeremy Leconte4100d552020-09-11 18:02:36 +02001046TEST(FullStackTest, Simulcast_Vp8_3sl_High) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001047 auto fixture = CreateVideoQualityTestFixture();
1048 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001049 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001050 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001051 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001052 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001053 simulcast.config->loss_percent = 0;
1054 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001055 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001056 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001057 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001058 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001059 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001060 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001061
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001062 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001063 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1064 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1065 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001066 simulcast.ss[0] = {
1067 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1068 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001069 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001070}
1071
Jeremy Leconte4100d552020-09-11 18:02:36 +02001072TEST(FullStackTest, Simulcast_Vp8_3sl_Low) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001073 auto fixture = CreateVideoQualityTestFixture();
1074 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001075 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001076 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001077 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001078 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001079 simulcast.config->loss_percent = 0;
1080 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001081 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001082 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001083 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001084 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001085 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001086 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001087
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001088 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001089 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1090 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1091 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001092 simulcast.ss[0] = {
1093 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1094 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001095 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001096}
1097
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001098// This test assumes ideal network conditions with target bandwidth being
1099// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1100// Android32 bots can't handle this high bitrate, so disable test for those.
1101#if defined(WEBRTC_ANDROID)
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001102#define MAYBE_High_Bitrate_With_Fake_Codec DISABLED_High_Bitrate_With_Fake_Codec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001103#else
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001104#define MAYBE_High_Bitrate_With_Fake_Codec High_Bitrate_With_Fake_Codec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001105#endif // defined(WEBRTC_ANDROID)
Jeremy Lecontec8850cb2020-09-10 20:46:33 +02001106TEST(FullStackTest, MAYBE_High_Bitrate_With_Fake_Codec) {
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001107 auto fixture = CreateVideoQualityTestFixture();
1108 const int target_bitrate = 100000000;
1109 ParamsWithLogging generator;
1110 generator.call.send_side_bwe = true;
1111 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1112 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1113 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1114 generator.video[0] = {true,
1115 360,
1116 240,
1117 30,
1118 target_bitrate / 2,
1119 target_bitrate,
1120 target_bitrate * 2,
1121 false,
1122 "FakeCodec",
1123 1,
1124 0,
1125 0,
1126 false,
1127 false,
1128 false,
1129 "Generator"};
1130 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1131 kFullStackTestDurationSecs};
1132 fixture->RunWithAnalyzer(generator);
1133}
1134
oprypin743117f2017-09-15 05:24:24 -07001135#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1136// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001137// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
Jeremy Leconte4100d552020-09-11 18:02:36 +02001138#define MAYBE_Largeroom_50thumb DISABLED_Largeroom_50thumb
ilnikf89a7382017-03-07 06:15:27 -08001139#else
Jeremy Leconte4100d552020-09-11 18:02:36 +02001140#define MAYBE_Largeroom_50thumb Largeroom_50thumb
ilnikf89a7382017-03-07 06:15:27 -08001141#endif
1142
Jeremy Leconte4100d552020-09-11 18:02:36 +02001143TEST(FullStackTest, MAYBE_Largeroom_50thumb) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001144 auto fixture = CreateVideoQualityTestFixture();
1145 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001146 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001147 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001148 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1149 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001150 large_room.config->loss_percent = 0;
1151 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001152 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001153 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001154 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001155 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001156 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001157 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001158
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001159 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001160 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1161 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1162 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001163 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001164 large_room.ss[0] = {
1165 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1166 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001167 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001168}
1169
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001170} // namespace webrtc