blob: 7e462605e14eced3d899df9456fb52b72a59bba0 [file] [log] [blame]
pbos@webrtc.orgaf8d5af2013-07-09 08:02:331/*
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 15:47:4910#include <memory>
Florent Castelli8037fc62024-08-29 13:00:4011#include <optional>
Yves Gerey3e707812018-11-28 15:47:4912#include <string>
13#include <utility>
14#include <vector>
pbos@webrtc.orgaf8d5af2013-07-09 08:02:3315
Mirko Bonadei2ab97f62019-07-18 11:44:1216#include "absl/flags/flag.h"
17#include "absl/flags/parse.h"
Yves Gerey3e707812018-11-28 15:47:4918#include "api/test/simulated_network.h"
Patrik Höglundd8f3c172018-09-26 12:39:1719#include "api/test/test_dependency_factory.h"
Yves Gerey3e707812018-11-28 15:47:4920#include "api/test/video_quality_test_fixture.h"
Per K5566b912024-05-15 15:53:0221#include "api/units/data_rate.h"
Yves Gerey3e707812018-11-28 15:47:4922#include "api/video_codecs/sdp_video_format.h"
23#include "api/video_codecs/video_codec.h"
Johannes Kronc3fcee72021-04-19 07:09:2624#include "api/video_codecs/vp9_profile.h"
Emircan Uysaler0823eec2018-07-14 00:10:0025#include "modules/video_coding/codecs/vp9/include/vp9.h"
Mirko Bonadei17f48782018-09-28 06:51:1026#include "system_wrappers/include/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 04:47:3127#include "test/field_trial.h"
28#include "test/gtest.h"
Rasmus Brandt3c589be2019-03-13 10:32:4029#include "test/testsupport/file_utils.h"
Jonas Oreland6c2dae22022-09-29 08:28:2430#include "video/config/video_encoder_config.h"
Mirko Bonadei92ea95e2017-09-15 04:47:3131#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:3332
Mirko Bonadei2ab97f62019-07-18 11:44:1233ABSL_FLAG(std::string,
34 rtc_event_log_name,
35 "",
36 "Filename for rtc event log. Two files "
37 "with \"_send\" and \"_recv\" suffixes will be created.");
38ABSL_FLAG(std::string,
39 rtp_dump_name,
40 "",
41 "Filename for dumped received RTP stream.");
42ABSL_FLAG(std::string,
43 encoded_frame_path,
44 "",
45 "The base path for encoded frame logs. Created files will have "
46 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
Sebastian Janssonf8518882018-05-31 12:52:5947
48namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:3349
sprang89c4a7e2017-06-30 20:27:4050namespace {
brandtrdd369c62016-11-17 07:56:5751static const int kFullStackTestDurationSecs = 45;
pbos@webrtc.orgb613b5a2013-12-03 10:13:0452
Patrik Höglundb6b29e02018-06-21 14:58:0153struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:3354 public:
Patrik Höglundb6b29e02018-06-21 14:58:0155 ParamsWithLogging() {
56 // Use these logging flags by default, for everything.
Mirko Bonadei2ab97f62019-07-18 11:44:1257 logging = {absl::GetFlag(FLAGS_rtc_event_log_name),
58 absl::GetFlag(FLAGS_rtp_dump_name),
59 absl::GetFlag(FLAGS_encoded_frame_path)};
Artem Titov75e36472018-10-08 10:28:5660 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:3761 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:3362};
63
Patrik Höglundb6b29e02018-06-21 14:58:0164std::unique_ptr<VideoQualityTestFixtureInterface>
65CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 12:39:1766 // The components will normally be nullptr (= use defaults), but it's possible
67 // for external test runners to override the list of injected components.
68 auto components = TestDependencyFactory::GetInstance().CreateComponents();
Mirko Bonadei317a1f02019-09-17 15:06:1869 return std::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 14:58:0170}
71
Erik Språngb6b1cac2018-08-09 14:12:5472// Takes the current active field trials set, and appends some new trials.
73std::string AppendFieldTrials(std::string new_trial_string) {
74 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
75}
Rasmus Brandt3c589be2019-03-13 10:32:4076
77std::string ClipNameToClipPath(const char* clip_name) {
78 return test::ResourcePath(clip_name, "yuv");
79}
Patrik Höglundb6b29e02018-06-21 14:58:0180} // namespace
81
sprangce4aef12015-11-02 15:23:2082// VideoQualityTest::Params params = {
83// { ... }, // Common.
84// { ... }, // Video-specific settings.
85// { ... }, // Screenshare-specific settings.
86// { ... }, // Analyzer settings.
87// pipe, // FakeNetworkPipe::Config
88// { ... }, // Spatial scalability.
89// logs // bool
90// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:3391
Mirko Bonadei8ef57932018-11-16 13:38:0392#if defined(RTC_ENABLE_VP9)
Jeremy Lecontec8850cb2020-09-10 18:46:3393TEST(FullStackTest, Foreman_Cif_Net_Delay_0_0_Plr_0_VP9) {
Patrik Höglundb6b29e02018-06-21 14:58:0194 auto fixture = CreateVideoQualityTestFixture();
95 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:0796 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:4097 foreman_cif.video[0] = {
98 true, 352, 288, 30,
99 700000, 700000, 700000, false,
100 "VP9", 1, 0, 0,
101 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 15:50:07102 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
103 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 14:58:01104 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 21:16:43105}
106
Jeremy Lecontec8850cb2020-09-10 18:46:33107TEST(GenericDescriptorTest,
108 Foreman_Cif_Delay_50_0_Plr_5_VP9_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01109 auto fixture = CreateVideoQualityTestFixture();
110 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:07111 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40112 foreman_cif.video[0] = {
113 true, 352, 288, 30,
114 30000, 500000, 2000000, false,
115 "VP9", 1, 0, 0,
116 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 12:11:26117 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9_generic_descriptor",
118 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24119 foreman_cif.config->loss_percent = 5;
120 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 12:11:26121 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01122 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 21:16:43123}
Emircan Uysaler03e6ec92018-03-09 23:03:26124
Jeremy Lecontec8850cb2020-09-10 18:46:33125TEST(FullStackTest, Generator_Net_Delay_0_0_Plr_0_VP9Profile2) {
Emircan Uysaler0823eec2018-07-14 00:10:00126 // Profile 2 might not be available on some platforms until
127 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
128 bool profile_2_is_supported = false;
129 for (const auto& codec : SupportedVP9Codecs()) {
130 if (ParseSdpForVP9Profile(codec.parameters)
131 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
132 profile_2_is_supported = true;
133 }
134 }
135 if (!profile_2_is_supported)
136 return;
137 auto fixture = CreateVideoQualityTestFixture();
138
Philipp Hanckede172522023-12-14 08:45:39139 CodecParameterMap vp92 = {
Emircan Uysaler0823eec2018-07-14 00:10:00140 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
141 ParamsWithLogging generator;
142 generator.call.send_side_bwe = true;
143 generator.video[0] = {
144 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
Stefan Holmer1f7a0082019-01-11 14:39:08145 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
Emircan Uysaler0823eec2018-07-14 00:10:00146 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
147 kFullStackTestDurationSecs};
148 fixture->RunWithAnalyzer(generator);
149}
150
Mirko Bonadei8ef57932018-11-16 13:38:03151#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 21:16:43152
Patrik Höglund11bf2fa2018-04-09 10:20:50153#if defined(WEBRTC_LINUX)
154// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
Jeremy Lecontec8850cb2020-09-10 18:46:33155#define MAYBE_Net_Delay_0_0_Plr_0 DISABLED_Net_Delay_0_0_Plr_0
Patrik Höglund11bf2fa2018-04-09 10:20:50156#else
Jeremy Lecontec8850cb2020-09-10 18:46:33157#define MAYBE_Net_Delay_0_0_Plr_0 Net_Delay_0_0_Plr_0
Patrik Höglund11bf2fa2018-04-09 10:20:50158#endif
Jeremy Lecontec8850cb2020-09-10 18:46:33159TEST(FullStackTest, MAYBE_Net_Delay_0_0_Plr_0) {
Patrik Höglundb6b29e02018-06-21 14:58:01160 auto fixture = CreateVideoQualityTestFixture();
161 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 12:47:02162 paris_qcif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40163 paris_qcif.video[0] = {
164 true, 176, 144, 30,
165 300000, 300000, 300000, false,
166 "VP8", 1, 0, 0,
167 false, false, true, ClipNameToClipPath("paris_qcif")};
minyue626bc952016-10-31 12:47:02168 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
169 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 14:58:01170 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52171}
172
Jeremy Lecontec8850cb2020-09-10 18:46:33173TEST(GenericDescriptorTest,
174 Foreman_Cif_Net_Delay_0_0_Plr_0_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01175 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06176 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 14:58:01177 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 12:47:02178 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40179 foreman_cif.video[0] = {
180 true, 352, 288, 30,
181 700000, 700000, 700000, false,
182 "VP8", 1, 0, 0,
183 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 12:11:26184 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_generic_descriptor",
185 0.0, 0.0, kFullStackTestDurationSecs};
186 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01187 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52188}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33189
Jeremy Lecontec8850cb2020-09-10 18:46:33190TEST(GenericDescriptorTest,
Jeremy Leconte4100d552020-09-11 16:02:36191 Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01192 auto fixture = CreateVideoQualityTestFixture();
193 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 14:54:01194 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40195 foreman_cif.video[0] = {
196 true, 352, 288, 10,
197 30000, 30000, 30000, false,
198 "VP8", 1, 0, 0,
199 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 12:11:26200 foreman_cif.analyzer = {
201 "foreman_cif_30kbps_net_delay_0_0_plr_0_generic_descriptor", 0.0, 0.0,
202 kFullStackTestDurationSecs};
203 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01204 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 14:54:01205}
206
Stefan Holmer1f7a0082019-01-11 14:39:08207// Link capacity below default start rate.
Jeremy Leconte4100d552020-09-11 16:02:36208TEST(FullStackTest, Foreman_Cif_Link_150kbps_Net_Delay_0_0_Plr_0) {
Patrik Höglundb6b29e02018-06-21 14:58:01209 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 15:34:35210 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 09:14:13211 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40212 foreman_cif.video[0] = {
213 true, 352, 288, 30,
214 30000, 500000, 2000000, false,
215 "VP8", 1, 0, 0,
216 false, false, true, ClipNameToClipPath("foreman_cif")};
Jonas Olssona4d87372019-07-05 17:08:33217 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0", 0.0,
218 0.0, kFullStackTestDurationSecs};
Per K5566b912024-05-15 15:53:02219 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(150);
Patrik Höglundb6b29e02018-06-21 14:58:01220 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 09:14:13221}
222
Erik Språng616b2332019-02-11 13:16:28223// Restricted network and encoder overproducing by 30%.
Jeremy Lecontec8850cb2020-09-10 18:46:33224TEST(FullStackTest,
Jeremy Leconte4100d552020-09-11 16:02:36225 Foreman_Cif_Link_150kbps_Delay100ms_30pkts_Queue_Overshoot30) {
Erik Språng616b2332019-02-11 13:16:28226 auto fixture = CreateVideoQualityTestFixture();
227 ParamsWithLogging foreman_cif;
228 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40229 foreman_cif.video[0] = {
230 true, 352, 288, 30,
231 30000, 500000, 2000000, false,
232 "VP8", 1, 0, 0,
233 false, false, true, ClipNameToClipPath("foreman_cif"),
234 0, {}, 1.30};
Erik Språng616b2332019-02-11 13:16:28235 foreman_cif.analyzer = {
236 "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
237 kFullStackTestDurationSecs};
Per K5566b912024-05-15 15:53:02238 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(150);
Erik Språng616b2332019-02-11 13:16:28239 foreman_cif.config->queue_length_packets = 30;
240 foreman_cif.config->queue_delay_ms = 100;
241 fixture->RunWithAnalyzer(foreman_cif);
242}
243
Erik Språng8b8d01a2019-03-02 19:54:55244// Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
245// Packet rate and loss are low enough that loss will happen with ~3s interval.
246// This triggers protection overhead to toggle between zero and non-zero.
247// Link queue is restrictive enough to trigger loss on probes.
Jeremy Leconte4100d552020-09-11 16:02:36248TEST(FullStackTest, Foreman_Cif_Link_250kbps_Delay100ms_10pkts_Loss1) {
Erik Språng8b8d01a2019-03-02 19:54:55249 auto fixture = CreateVideoQualityTestFixture();
250 ParamsWithLogging foreman_cif;
251 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40252 foreman_cif.video[0] = {
253 true, 352, 288, 30,
254 30000, 500000, 2000000, false,
255 "VP8", 1, 0, 0,
256 false, false, true, ClipNameToClipPath("foreman_cif"),
257 0, {}, 1.30};
Erik Språng8b8d01a2019-03-02 19:54:55258 foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
259 0.0, 0.0, kFullStackTestDurationSecs};
Per K5566b912024-05-15 15:53:02260 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(250);
Erik Språng8b8d01a2019-03-02 19:54:55261 foreman_cif.config->queue_length_packets = 10;
262 foreman_cif.config->queue_delay_ms = 100;
263 foreman_cif.config->loss_percent = 1;
264 fixture->RunWithAnalyzer(foreman_cif);
265}
266
Jeremy Lecontec8850cb2020-09-10 18:46:33267TEST(GenericDescriptorTest, Foreman_Cif_Delay_50_0_Plr_5_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01268 auto fixture = CreateVideoQualityTestFixture();
269 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 12:47:02270 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40271 foreman_cif.video[0] = {
272 true, 352, 288, 30,
273 30000, 500000, 2000000, false,
274 "VP8", 1, 0, 0,
275 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 12:11:26276 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_generic_descriptor",
277 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24278 foreman_cif.config->loss_percent = 5;
279 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 12:11:26280 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01281 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49282}
283
Jeremy Lecontec8850cb2020-09-10 18:46:33284TEST(GenericDescriptorTest,
285 Foreman_Cif_Delay_50_0_Plr_5_Ulpfec_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01286 auto fixture = CreateVideoQualityTestFixture();
287 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:07288 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40289 foreman_cif.video[0] = {
290 true, 352, 288, 30,
291 30000, 500000, 2000000, false,
292 "VP8", 1, 0, 0,
293 true, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 12:11:26294 foreman_cif.analyzer = {
295 "foreman_cif_delay_50_0_plr_5_ulpfec_generic_descriptor", 0.0, 0.0,
296 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24297 foreman_cif.config->loss_percent = 5;
298 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 12:11:26299 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01300 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 15:50:07301}
302
Jeremy Lecontec8850cb2020-09-10 18:46:33303TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_Flexfec) {
Patrik Höglundb6b29e02018-06-21 14:58:01304 auto fixture = CreateVideoQualityTestFixture();
305 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:07306 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40307 foreman_cif.video[0] = {
308 true, 352, 288, 30,
309 30000, 500000, 2000000, false,
310 "VP8", 1, 0, 0,
311 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 15:50:07312 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
313 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24314 foreman_cif.config->loss_percent = 5;
315 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 14:58:01316 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 15:50:07317}
318
Jeremy Leconte4100d552020-09-11 16:02:36319TEST(FullStackTest, Foreman_Cif_500kbps_Delay_50_0_Plr_3_Flexfec) {
Patrik Höglundb6b29e02018-06-21 14:58:01320 auto fixture = CreateVideoQualityTestFixture();
321 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 10:03:02322 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40323 foreman_cif.video[0] = {
324 true, 352, 288, 30,
325 30000, 500000, 2000000, false,
326 "VP8", 1, 0, 0,
327 false, true, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 10:03:02328 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
329 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24330 foreman_cif.config->loss_percent = 3;
Per K5566b912024-05-15 15:53:02331 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(500);
Artem Titovf18b3522018-08-28 14:54:24332 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 14:58:01333 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 10:03:02334}
335
Jeremy Leconte4100d552020-09-11 16:02:36336TEST(FullStackTest, Foreman_Cif_500kbps_Delay_50_0_Plr_3_Ulpfec) {
Patrik Höglundb6b29e02018-06-21 14:58:01337 auto fixture = CreateVideoQualityTestFixture();
338 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 10:03:02339 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40340 foreman_cif.video[0] = {
341 true, 352, 288, 30,
342 30000, 500000, 2000000, false,
343 "VP8", 1, 0, 0,
344 true, false, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 10:03:02345 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
346 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24347 foreman_cif.config->loss_percent = 3;
Per K5566b912024-05-15 15:53:02348 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(500);
Artem Titovf18b3522018-08-28 14:54:24349 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 14:58:01350 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 10:03:02351}
352
brandtrdd369c62016-11-17 07:56:57353#if defined(WEBRTC_USE_H264)
Jeremy Lecontec8850cb2020-09-10 18:46:33354TEST(FullStackTest, Foreman_Cif_Net_Delay_0_0_Plr_0_H264) {
Patrik Höglundb6b29e02018-06-21 14:58:01355 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 15:50:07356 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 14:58:01357 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:07358 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40359 foreman_cif.video[0] = {
360 true, 352, 288, 30,
361 700000, 700000, 700000, false,
362 "H264", 1, 0, 0,
363 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 15:50:07364 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
365 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 14:58:01366 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-17 07:56:57367}
368
Jeremy Leconte4100d552020-09-11 16:02:36369TEST(FullStackTest, Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_H264) {
Patrik Höglundb6b29e02018-06-21 14:58:01370 auto fixture = CreateVideoQualityTestFixture();
371 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 14:54:01372 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40373 foreman_cif.video[0] = {
374 true, 352, 288, 10,
375 30000, 30000, 30000, false,
376 "H264", 1, 0, 0,
377 false, false, true, ClipNameToClipPath("foreman_cif")};
asaperssonfb6ad3b2016-12-16 14:54:01378 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
379 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 14:58:01380 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 14:54:01381}
382
Jeremy Lecontec8850cb2020-09-10 18:46:33383TEST(GenericDescriptorTest,
384 Foreman_Cif_Delay_50_0_Plr_5_H264_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01385 auto fixture = CreateVideoQualityTestFixture();
386 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:07387 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40388 foreman_cif.video[0] = {
389 true, 352, 288, 30,
390 30000, 500000, 2000000, false,
391 "H264", 1, 0, 0,
392 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 12:11:26393 foreman_cif.analyzer = {
394 "foreman_cif_delay_50_0_plr_5_H264_generic_descriptor", 0.0, 0.0,
395 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24396 foreman_cif.config->loss_percent = 5;
397 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 12:11:26398 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01399 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-17 07:56:57400}
401
Erik Språngeb3307f2022-08-22 09:06:06402TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Sps_Pps_Idr) {
403 test::ScopedFieldTrials override_field_trials(
404 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
405 auto fixture = CreateVideoQualityTestFixture();
406
407 ParamsWithLogging foreman_cif;
408 foreman_cif.call.send_side_bwe = true;
409 foreman_cif.video[0] = {
410 true, 352, 288, 30,
411 30000, 500000, 2000000, false,
412 "H264", 1, 0, 0,
413 false, false, true, ClipNameToClipPath("foreman_cif")};
414 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
415 0.0, kFullStackTestDurationSecs};
416 foreman_cif.config->loss_percent = 5;
417 foreman_cif.config->queue_delay_ms = 50;
418 fixture->RunWithAnalyzer(foreman_cif);
419}
420
brandtrdd369c62016-11-17 07:56:57421// Verify that this is worth the bot time, before enabling.
Jeremy Lecontec8850cb2020-09-10 18:46:33422TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Flexfec) {
Patrik Höglundb6b29e02018-06-21 14:58:01423 auto fixture = CreateVideoQualityTestFixture();
424 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:07425 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40426 foreman_cif.video[0] = {
427 true, 352, 288, 30,
428 30000, 500000, 2000000, false,
429 "H264", 1, 0, 0,
430 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 15:50:07431 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
432 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24433 foreman_cif.config->loss_percent = 5;
434 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 14:58:01435 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-17 07:56:57436}
437
438// Ulpfec with H264 is an unsupported combination, so this test is only useful
439// for debugging. It is therefore disabled by default.
Jeremy Lecontec8850cb2020-09-10 18:46:33440TEST(FullStackTest, DISABLED_Foreman_Cif_Delay_50_0_Plr_5_H264_Ulpfec) {
Patrik Höglundb6b29e02018-06-21 14:58:01441 auto fixture = CreateVideoQualityTestFixture();
442 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:07443 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40444 foreman_cif.video[0] = {
445 true, 352, 288, 30,
446 30000, 500000, 2000000, false,
447 "H264", 1, 0, 0,
448 true, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 15:50:07449 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
450 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24451 foreman_cif.config->loss_percent = 5;
452 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 14:58:01453 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-17 07:56:57454}
455#endif // defined(WEBRTC_USE_H264)
456
Jeremy Leconte4100d552020-09-11 16:02:36457TEST(FullStackTest, Foreman_Cif_500kbps) {
Patrik Höglundb6b29e02018-06-21 14:58:01458 auto fixture = CreateVideoQualityTestFixture();
459 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 12:47:02460 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40461 foreman_cif.video[0] = {
462 true, 352, 288, 30,
463 30000, 500000, 2000000, false,
464 "VP8", 1, 0, 0,
465 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 12:47:02466 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
467 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24468 foreman_cif.config->queue_length_packets = 0;
469 foreman_cif.config->queue_delay_ms = 0;
Per K5566b912024-05-15 15:53:02470 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(500);
Patrik Höglundb6b29e02018-06-21 14:58:01471 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06472}
473
Jeremy Leconte4100d552020-09-11 16:02:36474TEST(FullStackTest, Foreman_Cif_500kbps_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 14:58:01475 auto fixture = CreateVideoQualityTestFixture();
476 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 12:47:02477 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40478 foreman_cif.video[0] = {
479 true, 352, 288, 30,
480 30000, 500000, 2000000, false,
481 "VP8", 1, 0, 0,
482 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 12:47:02483 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
484 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24485 foreman_cif.config->queue_length_packets = 32;
486 foreman_cif.config->queue_delay_ms = 0;
Per K5566b912024-05-15 15:53:02487 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(500);
Patrik Höglundb6b29e02018-06-21 14:58:01488 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06489}
490
Jeremy Leconte4100d552020-09-11 16:02:36491TEST(FullStackTest, Foreman_Cif_500kbps_100ms) {
Patrik Höglundb6b29e02018-06-21 14:58:01492 auto fixture = CreateVideoQualityTestFixture();
493 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 12:47:02494 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40495 foreman_cif.video[0] = {
496 true, 352, 288, 30,
497 30000, 500000, 2000000, false,
498 "VP8", 1, 0, 0,
499 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 12:47:02500 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
501 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24502 foreman_cif.config->queue_length_packets = 0;
503 foreman_cif.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02504 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(500);
Patrik Höglundb6b29e02018-06-21 14:58:01505 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06506}
507
Jeremy Lecontec8850cb2020-09-10 18:46:33508TEST(GenericDescriptorTest,
Jeremy Leconte4100d552020-09-11 16:02:36509 Foreman_Cif_500kbps_100ms_32pkts_Queue_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01510 auto fixture = CreateVideoQualityTestFixture();
511 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 12:47:02512 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40513 foreman_cif.video[0] = {
514 true, 352, 288, 30,
515 30000, 500000, 2000000, false,
516 "VP8", 1, 0, 0,
517 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 12:11:26518 foreman_cif.analyzer = {
519 "foreman_cif_500kbps_100ms_32pkts_queue_generic_descriptor", 0.0, 0.0,
520 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24521 foreman_cif.config->queue_length_packets = 32;
522 foreman_cif.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02523 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(500);
Danil Chapovalov636865e2020-06-03 12:11:26524 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01525 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 14:00:57526}
527
Jeremy Leconte4100d552020-09-11 16:02:36528TEST(FullStackTest, Foreman_Cif_500kbps_100ms_32pkts_Queue_Recv_Bwe) {
Patrik Höglundb6b29e02018-06-21 14:58:01529 auto fixture = CreateVideoQualityTestFixture();
530 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 15:50:07531 foreman_cif.call.send_side_bwe = false;
Rasmus Brandt3c589be2019-03-13 10:32:40532 foreman_cif.video[0] = {
533 true, 352, 288, 30,
534 30000, 500000, 2000000, false,
535 "VP8", 1, 0, 0,
536 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 15:50:07537 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
538 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24539 foreman_cif.config->queue_length_packets = 32;
540 foreman_cif.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02541 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(500);
Patrik Höglundb6b29e02018-06-21 14:58:01542 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06543}
544
Jeremy Leconte4100d552020-09-11 16:02:36545TEST(FullStackTest, Foreman_Cif_1000kbps_100ms_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 14:58:01546 auto fixture = CreateVideoQualityTestFixture();
547 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 12:47:02548 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40549 foreman_cif.video[0] = {
550 true, 352, 288, 30,
551 30000, 2000000, 2000000, false,
552 "VP8", 1, 0, 0,
553 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 12:47:02554 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
555 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24556 foreman_cif.config->queue_length_packets = 32;
557 foreman_cif.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02558 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(1000);
Patrik Höglundb6b29e02018-06-21 14:58:01559 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06560}
sprang@webrtc.org131bea82015-02-18 12:46:06561
sprangff19d352017-09-06 14:14:02562// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Jeremy Leconte4100d552020-09-11 16:02:36563TEST(FullStackTest, Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue) {
Patrik Höglundb6b29e02018-06-21 14:58:01564 auto fixture = CreateVideoQualityTestFixture();
565 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 12:47:02566 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59567 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 10:32:40568 true, 1280,
569 720, 50,
570 30000, 3000000,
571 3000000, false,
572 "VP8", 1,
573 0, 0,
574 false, false,
575 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
minyue626bc952016-10-31 12:47:02576 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
577 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24578 conf_motion_hd.config->queue_length_packets = 32;
579 conf_motion_hd.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02580 conf_motion_hd.config->link_capacity = DataRate::KilobitsPerSec(2000);
Patrik Höglundb6b29e02018-06-21 14:58:01581 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 14:00:57582}
583
Jeremy Lecontec8850cb2020-09-10 18:46:33584TEST(GenericDescriptorTest,
Jeremy Leconte4100d552020-09-11 16:02:36585 Conference_Motion_Hd_2tl_Moderate_Limits_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01586 auto fixture = CreateVideoQualityTestFixture();
587 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 14:14:02588 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59589 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 10:32:40590 true, 1280,
591 720, 50,
592 30000, 3000000,
593 3000000, false,
594 "VP8", 2,
595 -1, 0,
596 false, false,
597 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
philipeldd8b0d82018-09-27 09:18:10598 conf_motion_hd.analyzer = {
Danil Chapovalov636865e2020-06-03 12:11:26599 "conference_motion_hd_2tl_moderate_limits_generic_descriptor", 0.0, 0.0,
philipeldd8b0d82018-09-27 09:18:10600 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24601 conf_motion_hd.config->queue_length_packets = 50;
602 conf_motion_hd.config->loss_percent = 3;
603 conf_motion_hd.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02604 conf_motion_hd.config->link_capacity = DataRate::KilobitsPerSec(2000);
Danil Chapovalov636865e2020-06-03 12:11:26605 conf_motion_hd.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01606 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 14:14:02607}
608
Jeremy Leconte4100d552020-09-11 16:02:36609TEST(FullStackTest, Conference_Motion_Hd_3tl_Moderate_Limits) {
Patrik Höglundb6b29e02018-06-21 14:58:01610 auto fixture = CreateVideoQualityTestFixture();
611 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 14:14:02612 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59613 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 10:32:40614 true, 1280,
615 720, 50,
616 30000, 3000000,
617 3000000, false,
618 "VP8", 3,
619 -1, 0,
620 false, false,
621 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 14:14:02622 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
623 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24624 conf_motion_hd.config->queue_length_packets = 50;
625 conf_motion_hd.config->loss_percent = 3;
626 conf_motion_hd.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02627 conf_motion_hd.config->link_capacity = DataRate::KilobitsPerSec(2000);
Patrik Höglundb6b29e02018-06-21 14:58:01628 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 14:14:02629}
630
Jeremy Leconte4100d552020-09-11 16:02:36631TEST(FullStackTest, Conference_Motion_Hd_4tl_Moderate_Limits) {
Patrik Höglundb6b29e02018-06-21 14:58:01632 auto fixture = CreateVideoQualityTestFixture();
633 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 14:14:02634 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59635 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 10:32:40636 true, 1280,
637 720, 50,
638 30000, 3000000,
639 3000000, false,
640 "VP8", 4,
641 -1, 0,
642 false, false,
643 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 14:14:02644 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
645 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24646 conf_motion_hd.config->queue_length_packets = 50;
647 conf_motion_hd.config->loss_percent = 3;
648 conf_motion_hd.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02649 conf_motion_hd.config->link_capacity = DataRate::KilobitsPerSec(2000);
Patrik Höglundb6b29e02018-06-21 14:58:01650 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 14:14:02651}
652
philipelc22893b2023-04-24 09:34:39653TEST(FullStackTest, Foreman_Cif_30kbps_AV1) {
654 auto fixture = CreateVideoQualityTestFixture();
655 ParamsWithLogging foreman_cif;
656 foreman_cif.call.send_side_bwe = true;
657 foreman_cif.video[0] = {.enabled = true,
658 .width = 352,
659 .height = 288,
660 .fps = 10,
661 .min_bitrate_bps = 20'000,
662 .target_bitrate_bps = 30'000,
663 .max_bitrate_bps = 100'000,
664 .codec = "AV1",
665 .num_temporal_layers = 1,
666 .selected_tl = 0,
667 .clip_path = ClipNameToClipPath("foreman_cif")};
668 foreman_cif.analyzer = {.test_label = "foreman_cif_30kbps_AV1",
669 .test_durations_secs = kFullStackTestDurationSecs};
Per K5566b912024-05-15 15:53:02670 foreman_cif.config->link_capacity = DataRate::KilobitsPerSec(30);
philipelc22893b2023-04-24 09:34:39671 foreman_cif.call.generic_descriptor = true;
672 fixture->RunWithAnalyzer(foreman_cif);
673}
674
675TEST(FullStackTest, Conference_Motion_Hd_3tl_AV1) {
676 auto fixture = CreateVideoQualityTestFixture();
677 ParamsWithLogging conf_motion_hd;
678 conf_motion_hd.call.send_side_bwe = true;
679 conf_motion_hd.video[0] = {
680 .enabled = true,
681 .width = 1280,
682 .height = 720,
683 .fps = 50,
684 .min_bitrate_bps = 20'000,
685 .target_bitrate_bps = 500'000,
686 .max_bitrate_bps = 1'000'000,
687 .codec = "AV1",
688 .num_temporal_layers = 3,
689 .clip_path = ClipNameToClipPath("ConferenceMotion_1280_720_50")};
690
691 conf_motion_hd.analyzer = {.test_label = "conference_motion_hd_3tl_AV1",
692 .test_durations_secs = kFullStackTestDurationSecs};
693 conf_motion_hd.config->queue_length_packets = 50;
694 conf_motion_hd.config->loss_percent = 3;
695 conf_motion_hd.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02696 conf_motion_hd.config->link_capacity = DataRate::KilobitsPerSec(1000);
philipelc22893b2023-04-24 09:34:39697 conf_motion_hd.call.generic_descriptor = true;
698 fixture->RunWithAnalyzer(conf_motion_hd);
699}
700
Sergey Silkinffca3242024-07-08 07:04:10701#if defined(WEBRTC_MAC)
702// TODO(webrtc:351644561): Flaky on Mac x86/ARM.
703#define MAYBE_Screenshare_Slides_Simulcast_AV1 \
704 DISABLED_Screenshare_Slides_Simulcast_AV1
705#else
706#define MAYBE_Screenshare_Slides_Simulcast_AV1 Screenshare_Slides_Simulcast_AV1
707#endif
708TEST(FullStackTest, MAYBE_Screenshare_Slides_Simulcast_AV1) {
Sergey Silkin26d3e562024-06-22 11:39:49709 auto fixture = CreateVideoQualityTestFixture();
710 ParamsWithLogging screenshare;
711 screenshare.analyzer = {.test_label = "screenshare_slides_simulcast_AV1",
712 .test_durations_secs = kFullStackTestDurationSecs};
713 screenshare.call.send_side_bwe = true;
714 screenshare.screenshare[0] = {.enabled = true};
715 screenshare.video[0] = {.enabled = true,
716 .width = 1850,
717 .height = 1110,
718 .fps = 30,
719 .min_bitrate_bps = 0,
720 .target_bitrate_bps = 0,
721 .max_bitrate_bps = 2500000,
722 .codec = "AV1",
723 .num_temporal_layers = 2};
724
725 // Set `min_bitrate_bps` and `target_bitrate_bps` to zero to use WebRTC
726 // defaults.
727 VideoQualityTest::Params screenshare_params_low;
728 screenshare_params_low.video[0] = {.enabled = true,
729 .width = 1850,
730 .height = 1110,
731 .fps = 5,
732 .min_bitrate_bps = 0,
733 .target_bitrate_bps = 0,
734 .max_bitrate_bps = 420'000,
735 .codec = "AV1",
736 .num_temporal_layers = 2};
737
738 VideoQualityTest::Params screenshare_params_high;
739 screenshare_params_high.video[0] = {.enabled = true,
740 .width = 1850,
741 .height = 1110,
742 .fps = 30,
743 .min_bitrate_bps = 0,
744 .target_bitrate_bps = 0,
745 .max_bitrate_bps = 2'500'000,
746 .codec = "AV1",
747 .num_temporal_layers = 2};
748
749 std::vector<VideoStream> streams = {
750 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
751 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
752 screenshare.ss[0] = {
753 .streams = streams,
754 .selected_stream = 1,
755 };
756 fixture->RunWithAnalyzer(screenshare);
757}
758
Mirko Bonadei8ef57932018-11-16 13:38:03759#if defined(RTC_ENABLE_VP9)
Jeremy Leconte4100d552020-09-11 16:02:36760TEST(FullStackTest, Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue_Vp9) {
Patrik Höglundb6b29e02018-06-21 14:58:01761 auto fixture = CreateVideoQualityTestFixture();
762 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 17:51:23763 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59764 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 10:32:40765 true, 1280,
766 720, 50,
767 30000, 3000000,
768 3000000, false,
769 "VP9", 1,
770 0, 0,
771 false, false,
772 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
jianj390e64d2017-02-03 17:51:23773 conf_motion_hd.analyzer = {
774 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
775 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24776 conf_motion_hd.config->queue_length_packets = 32;
777 conf_motion_hd.config->queue_delay_ms = 100;
Per K5566b912024-05-15 15:53:02778 conf_motion_hd.config->link_capacity = DataRate::KilobitsPerSec(2000);
Patrik Höglundb6b29e02018-06-21 14:58:01779 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 17:51:23780}
781#endif
782
Jeremy Lecontec8850cb2020-09-10 18:46:33783TEST(FullStackTest, Screenshare_Slides) {
Patrik Höglundb6b29e02018-06-21 14:58:01784 auto fixture = CreateVideoQualityTestFixture();
785 ParamsWithLogging screenshare;
minyue626bc952016-10-31 12:47:02786 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 14:06:55787 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
788 1000000, false, "VP8", 2, 1, 400000,
789 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59790 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 12:47:02791 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
792 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 14:58:01793 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 13:58:05794}
795
Florent Castelli66b38602019-07-10 14:57:57796#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
Oskar Sundbom8bacf252019-01-08 15:40:08797// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
Jeremy Lecontec8850cb2020-09-10 18:46:33798TEST(FullStackTest, Screenshare_Slides_Simulcast) {
Patrik Höglundb6b29e02018-06-21 14:58:01799 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 14:58:01800 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 17:23:30801 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59802 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 09:00:06803 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 11:52:11804 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 09:00:06805 false, false, false, ""};
ilnikcb8c1462017-03-09 17:23:30806 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
807 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 14:58:01808 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 09:00:06809 screenshare_params_high.video[0] = {
810 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
811 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 17:23:30812 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 09:00:06813 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 14:06:55814 1000000, false, "VP8", 2, 0, 400000,
815 false, false, false, ""};
ilnikcb8c1462017-03-09 17:23:30816
817 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 14:58:01818 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
819 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 07:12:05820 screenshare.ss[0] = {
821 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
822 false};
Patrik Höglundb6b29e02018-06-21 14:58:01823 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 17:23:30824}
Ilya Nikolaevskiy7b412252019-03-06 15:40:42825
Florent Castelli66b38602019-07-10 14:57:57826#endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
ilnikcb8c1462017-03-09 17:23:30827
Jeremy Lecontec8850cb2020-09-10 18:46:33828TEST(FullStackTest, Screenshare_Slides_Scrolling) {
Patrik Höglundb6b29e02018-06-21 14:58:01829 auto fixture = CreateVideoQualityTestFixture();
830 ParamsWithLogging config;
minyue626bc952016-10-31 12:47:02831 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 14:06:55832 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
833 1000000, false, "VP8", 2, 1, 400000,
834 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59835 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 12:47:02836 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
837 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 14:58:01838 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 09:15:56839}
840
Jeremy Lecontec8850cb2020-09-10 18:46:33841TEST(GenericDescriptorTest, Screenshare_Slides_Lossy_Net_Generic_Descriptor) {
Patrik Höglundb6b29e02018-06-21 14:58:01842 auto fixture = CreateVideoQualityTestFixture();
843 ParamsWithLogging screenshare;
minyue626bc952016-10-31 12:47:02844 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 14:06:55845 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
846 1000000, false, "VP8", 2, 1, 400000,
847 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59848 screenshare.screenshare[0] = {true, false, 10};
Danil Chapovalov636865e2020-06-03 12:11:26849 screenshare.analyzer = {"screenshare_slides_lossy_net_generic_descriptor",
850 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24851 screenshare.config->loss_percent = 5;
852 screenshare.config->queue_delay_ms = 200;
Per K5566b912024-05-15 15:53:02853 screenshare.config->link_capacity = DataRate::KilobitsPerSec(500);
Danil Chapovalov636865e2020-06-03 12:11:26854 screenshare.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 14:58:01855 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 14:10:23856}
857
Jeremy Lecontec8850cb2020-09-10 18:46:33858TEST(FullStackTest, Screenshare_Slides_Very_Lossy) {
Patrik Höglundb6b29e02018-06-21 14:58:01859 auto fixture = CreateVideoQualityTestFixture();
860 ParamsWithLogging screenshare;
minyue626bc952016-10-31 12:47:02861 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 14:06:55862 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
863 1000000, false, "VP8", 2, 1, 400000,
864 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59865 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 12:47:02866 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
867 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24868 screenshare.config->loss_percent = 10;
869 screenshare.config->queue_delay_ms = 200;
Per K5566b912024-05-15 15:53:02870 screenshare.config->link_capacity = DataRate::KilobitsPerSec(500);
Patrik Höglundb6b29e02018-06-21 14:58:01871 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 14:10:23872}
873
Jeremy Lecontec8850cb2020-09-10 18:46:33874TEST(FullStackTest, Screenshare_Slides_Lossy_Limited) {
Patrik Höglundb6b29e02018-06-21 14:58:01875 auto fixture = CreateVideoQualityTestFixture();
876 ParamsWithLogging screenshare;
sprange566e172017-06-08 08:29:15877 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 14:06:55878 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
879 1000000, false, "VP8", 2, 1, 400000,
880 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59881 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 08:29:15882 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
883 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24884 screenshare.config->loss_percent = 5;
Per K5566b912024-05-15 15:53:02885 screenshare.config->link_capacity = DataRate::KilobitsPerSec(200);
Artem Titovf18b3522018-08-28 14:54:24886 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 08:29:15887
Patrik Höglundb6b29e02018-06-21 14:58:01888 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 08:29:15889}
890
Jeremy Lecontec8850cb2020-09-10 18:46:33891TEST(FullStackTest, Screenshare_Slides_Moderately_Restricted) {
Patrik Höglundb6b29e02018-06-21 14:58:01892 auto fixture = CreateVideoQualityTestFixture();
893 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 20:27:40894 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 14:06:55895 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
896 1000000, false, "VP8", 2, 1, 400000,
897 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59898 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 20:27:40899 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
900 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:24901 screenshare.config->loss_percent = 1;
Per K5566b912024-05-15 15:53:02902 screenshare.config->link_capacity = DataRate::KilobitsPerSec(1200);
Artem Titovf18b3522018-08-28 14:54:24903 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 20:27:40904
Patrik Höglundb6b29e02018-06-21 14:58:01905 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 20:27:40906}
907
Rasmus Brandt3c589be2019-03-13 10:32:40908// Since ParamsWithLogging::Video is not trivially destructible, we can't
909// store these structs as const globals.
910ParamsWithLogging::Video SvcVp9Video() {
911 return ParamsWithLogging::Video{
912 true, 1280,
913 720, 30,
914 800000, 2500000,
915 2500000, false,
916 "VP9", 3,
917 2, 400000,
918 false, false,
919 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
920}
ilnik566c43b2017-03-07 12:42:54921
Rasmus Brandt3c589be2019-03-13 10:32:40922ParamsWithLogging::Video SimulcastVp8VideoHigh() {
923 return ParamsWithLogging::Video{
924 true, 1280,
925 720, 30,
926 800000, 2500000,
927 2500000, false,
928 "VP8", 3,
929 2, 400000,
930 false, false,
931 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
932}
ilnik566c43b2017-03-07 12:42:54933
Rasmus Brandt3c589be2019-03-13 10:32:40934ParamsWithLogging::Video SimulcastVp8VideoMedium() {
935 return ParamsWithLogging::Video{
936 true, 640,
937 360, 30,
938 150000, 500000,
939 700000, false,
940 "VP8", 3,
941 2, 400000,
942 false, false,
943 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
944}
ilnik566c43b2017-03-07 12:42:54945
Rasmus Brandt3c589be2019-03-13 10:32:40946ParamsWithLogging::Video SimulcastVp8VideoLow() {
947 return ParamsWithLogging::Video{
948 true, 320,
949 180, 30,
950 30000, 150000,
951 200000, false,
952 "VP8", 3,
953 2, 400000,
954 false, false,
955 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
956}
ilnik566c43b2017-03-07 12:42:54957
Mirko Bonadei8ef57932018-11-16 13:38:03958#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 15:04:32959
Jeremy Leconte4100d552020-09-11 16:02:36960TEST(FullStackTest, Screenshare_Slides_Vp9_3sl_High_Fps) {
Patrik Höglundb6b29e02018-06-21 14:58:01961 auto fixture = CreateVideoQualityTestFixture();
962 ParamsWithLogging screenshare;
minyue626bc952016-10-31 12:47:02963 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 15:04:32964 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
965 2000000, false, "VP9", 1, 0, 400000,
966 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:59967 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 15:04:32968 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 12:47:02969 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 07:12:05970 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 15:04:32971 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
972 std::vector<SpatialLayer>(), true};
973 fixture->RunWithAnalyzer(screenshare);
974}
975
Patrik Höglundf6767ed2020-03-13 11:45:32976// TODO(http://bugs.webrtc.org/9506): investigate.
Sergey Silkin7f978f12018-09-10 12:01:49977#if !defined(WEBRTC_MAC)
978
Jeremy Leconte4100d552020-09-11 16:02:36979TEST(FullStackTest, Vp9ksvc_3sl_High) {
Sergey Silkine7ce8882018-10-03 16:04:57980 webrtc::test::ScopedFieldTrials override_trials(
981 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 14:58:01982 auto fixture = CreateVideoQualityTestFixture();
983 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 10:50:53984 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:40985 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 10:50:53986 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
987 kFullStackTestDurationSecs};
988 simulcast.ss[0] = {
989 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
990 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 14:58:01991 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 10:50:53992}
993
Jeremy Leconte4100d552020-09-11 16:02:36994TEST(FullStackTest, Vp9ksvc_3sl_Low) {
Sergey Silkine7ce8882018-10-03 16:04:57995 webrtc::test::ScopedFieldTrials override_trials(
996 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 14:58:01997 auto fixture = CreateVideoQualityTestFixture();
998 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 10:50:53999 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:401000 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 10:50:531001 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
1002 kFullStackTestDurationSecs};
1003 simulcast.ss[0] = {
1004 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1005 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 14:58:011006 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 10:50:531007}
“Michael277a6562018-06-01 19:09:191008
Jeremy Leconte4100d552020-09-11 16:02:361009TEST(FullStackTest, Vp9ksvc_3sl_Low_Bw_Limited) {
Ilya Nikolaevskiyef0033b2020-02-25 12:59:081010 webrtc::test::ScopedFieldTrials override_trials(
1011 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1012 "WebRTC-Vp9ExternalRefCtrl/Enabled/"));
1013 auto fixture = CreateVideoQualityTestFixture();
1014 ParamsWithLogging simulcast;
Per K5566b912024-05-15 15:53:021015 simulcast.config->link_capacity = DataRate::KilobitsPerSec(500);
Ilya Nikolaevskiyef0033b2020-02-25 12:59:081016 simulcast.call.send_side_bwe = true;
1017 simulcast.video[0] = SvcVp9Video();
1018 simulcast.analyzer = {"vp9ksvc_3sl_low_bw_limited", 0.0, 0.0,
1019 kFullStackTestDurationSecs};
1020 simulcast.ss[0] = {
1021 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1022 std::vector<SpatialLayer>(), false};
1023 fixture->RunWithAnalyzer(simulcast);
1024}
1025
Jeremy Leconte4100d552020-09-11 16:02:361026TEST(FullStackTest, Vp9ksvc_3sl_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 16:04:571027 webrtc::test::ScopedFieldTrials override_trials(
1028 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 14:58:011029 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 15:34:351030 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 19:09:191031 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:401032 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 19:09:191033 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1034 kFullStackTestDurationSecs};
1035 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 16:04:571036 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 19:09:191037 std::vector<SpatialLayer>(), false};
Per K5566b912024-05-15 15:53:021038 simulcast.config->link_capacity = DataRate::KilobitsPerSec(1000);
Sergey Silkine7ce8882018-10-03 16:04:571039 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 14:58:011040 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 19:09:191041}
Erik Språngd3438aa2018-11-08 15:56:431042
1043// TODO(webrtc:9722): Remove when experiment is cleaned up.
Jeremy Leconte4100d552020-09-11 16:02:361044TEST(FullStackTest, Vp9ksvc_3sl_Medium_Network_Restricted_Trusted_Rate) {
Erik Språngd3438aa2018-11-08 15:56:431045 webrtc::test::ScopedFieldTrials override_trials(
Mirko Bonadeie39b3782020-09-24 12:02:391046 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Erik Språngd3438aa2018-11-08 15:56:431047 auto fixture = CreateVideoQualityTestFixture();
1048 ParamsWithLogging simulcast;
1049 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:401050 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 15:56:431051 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1052 0.0, 0.0, kFullStackTestDurationSecs};
1053 simulcast.ss[0] = {
1054 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1055 std::vector<SpatialLayer>(), false};
Per K5566b912024-05-15 15:53:021056 simulcast.config->link_capacity = DataRate::KilobitsPerSec(1000);
Erik Språngd3438aa2018-11-08 15:56:431057 simulcast.config->queue_delay_ms = 100;
1058 fixture->RunWithAnalyzer(simulcast);
1059}
Sergey Silkin7f978f12018-09-10 12:01:491060#endif // !defined(WEBRTC_MAC)
1061
Mirko Bonadei8ef57932018-11-16 13:38:031062#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 15:50:071063
ilnik6b826ef2017-06-16 13:53:481064// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:501065// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1066#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
Jeremy Lecontec8850cb2020-09-10 18:46:331067#define MAYBE_Simulcast_HD_High DISABLED_Simulcast_HD_High
ilnik6b826ef2017-06-16 13:53:481068#else
Jeremy Lecontec8850cb2020-09-10 18:46:331069#define MAYBE_Simulcast_HD_High Simulcast_HD_High
ilnik6b826ef2017-06-16 13:53:481070#endif
1071
Jeremy Lecontec8850cb2020-09-10 18:46:331072TEST(FullStackTest, MAYBE_Simulcast_HD_High) {
Patrik Höglundb6b29e02018-06-21 14:58:011073 auto fixture = CreateVideoQualityTestFixture();
1074 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 13:53:481075 simulcast.call.send_side_bwe = true;
Jonas Olssona4d87372019-07-05 17:08:331076 simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
1077 2500000, false, "VP8", 3, 2, 400000,
1078 false, false, false, "Generator"};
ilnik6b826ef2017-06-16 13:53:481079 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1080 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:241081 simulcast.config->loss_percent = 0;
1082 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 14:58:011083 std::vector<VideoStream> streams = {
Jonas Olssona4d87372019-07-05 17:08:331084 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1085 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1086 VideoQualityTest::DefaultVideoStream(simulcast, 0)};
Sergey Silkin57027362018-05-15 07:12:051087 simulcast.ss[0] = {
1088 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1089 true};
Erik Språngb6b1cac2018-08-09 14:12:541090 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1091 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 14:58:011092 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 13:53:481093}
1094
Jeremy Leconte4100d552020-09-11 16:02:361095TEST(FullStackTest, Simulcast_Vp8_3sl_High) {
Patrik Höglundb6b29e02018-06-21 14:58:011096 auto fixture = CreateVideoQualityTestFixture();
1097 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 12:58:531098 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:401099 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 10:23:281100 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 12:58:531101 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:241102 simulcast.config->loss_percent = 0;
1103 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 14:58:011104 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 10:32:401105 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 14:58:011106 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 10:32:401107 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 14:58:011108 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 10:32:401109 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 12:58:531110
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:591111 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 14:58:011112 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1113 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1114 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 07:12:051115 simulcast.ss[0] = {
1116 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1117 false};
Patrik Höglundb6b29e02018-06-21 14:58:011118 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 12:58:531119}
1120
Jeremy Leconte4100d552020-09-11 16:02:361121TEST(FullStackTest, Simulcast_Vp8_3sl_Low) {
Patrik Höglundb6b29e02018-06-21 14:58:011122 auto fixture = CreateVideoQualityTestFixture();
1123 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 12:58:531124 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:401125 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 10:23:281126 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 12:58:531127 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:241128 simulcast.config->loss_percent = 0;
1129 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 14:58:011130 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 10:32:401131 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 14:58:011132 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 10:32:401133 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 14:58:011134 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 10:32:401135 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 12:58:531136
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:591137 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 14:58:011138 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1139 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1140 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 07:12:051141 simulcast.ss[0] = {
1142 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1143 false};
Patrik Höglundb6b29e02018-06-21 14:58:011144 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 12:58:531145}
1146
Emircan Uysaler7c03bdc2019-01-16 20:07:561147// This test assumes ideal network conditions with target bandwidth being
1148// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1149// Android32 bots can't handle this high bitrate, so disable test for those.
1150#if defined(WEBRTC_ANDROID)
Jeremy Lecontec8850cb2020-09-10 18:46:331151#define MAYBE_High_Bitrate_With_Fake_Codec DISABLED_High_Bitrate_With_Fake_Codec
Emircan Uysaler7c03bdc2019-01-16 20:07:561152#else
Jeremy Lecontec8850cb2020-09-10 18:46:331153#define MAYBE_High_Bitrate_With_Fake_Codec High_Bitrate_With_Fake_Codec
Emircan Uysaler7c03bdc2019-01-16 20:07:561154#endif // defined(WEBRTC_ANDROID)
Jeremy Lecontec8850cb2020-09-10 18:46:331155TEST(FullStackTest, MAYBE_High_Bitrate_With_Fake_Codec) {
Emircan Uysaler7c03bdc2019-01-16 20:07:561156 auto fixture = CreateVideoQualityTestFixture();
1157 const int target_bitrate = 100000000;
1158 ParamsWithLogging generator;
1159 generator.call.send_side_bwe = true;
1160 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1161 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1162 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1163 generator.video[0] = {true,
1164 360,
1165 240,
1166 30,
1167 target_bitrate / 2,
1168 target_bitrate,
1169 target_bitrate * 2,
1170 false,
1171 "FakeCodec",
1172 1,
1173 0,
1174 0,
1175 false,
1176 false,
1177 false,
1178 "Generator"};
1179 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1180 kFullStackTestDurationSecs};
1181 fixture->RunWithAnalyzer(generator);
1182}
1183
oprypin743117f2017-09-15 12:24:241184#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1185// Fails on mobile devices:
ilnikf89a7382017-03-07 14:15:271186// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
Jeremy Leconte4100d552020-09-11 16:02:361187#define MAYBE_Largeroom_50thumb DISABLED_Largeroom_50thumb
ilnikf89a7382017-03-07 14:15:271188#else
Jeremy Leconte4100d552020-09-11 16:02:361189#define MAYBE_Largeroom_50thumb Largeroom_50thumb
ilnikf89a7382017-03-07 14:15:271190#endif
1191
Jeremy Leconte4100d552020-09-11 16:02:361192TEST(FullStackTest, MAYBE_Largeroom_50thumb) {
Patrik Höglundb6b29e02018-06-21 14:58:011193 auto fixture = CreateVideoQualityTestFixture();
1194 ParamsWithLogging large_room;
ilnika014cc52017-03-07 12:21:041195 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 10:32:401196 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 12:21:041197 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1198 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 14:54:241199 large_room.config->loss_percent = 0;
1200 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 14:58:011201 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 10:32:401202 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 14:58:011203 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 10:32:401204 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 14:58:011205 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 10:32:401206 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 12:21:041207
Ilya Nikolaevskiy255d1cd2017-12-21 17:02:591208 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 14:58:011209 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1210 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1211 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 07:47:031212 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 07:12:051213 large_room.ss[0] = {
1214 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1215 false};
Patrik Höglundb6b29e02018-06-21 14:58:011216 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 12:21:041217}
1218
pbos@webrtc.orgaf8d5af2013-07-09 08:02:331219} // namespace webrtc