blob: a12b33423017242cbe678be2252446521c1022c2 [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"
Emircan Uysaler0823eec2018-07-13 17:10:00 -070024#include "media/base/vp9_profile.h"
25#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;
Erik Språngd3438aa2018-11-08 16:56:43 +010051const char kVp8TrustedRateControllerFieldTrial[] =
52 "WebRTC-LibvpxVp8TrustedRateController/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000053
Patrik Höglundb6b29e02018-06-21 16:58:01 +020054struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000055 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020056 ParamsWithLogging() {
57 // Use these logging flags by default, for everything.
Mirko Bonadei2ab97f62019-07-18 13:44:12 +020058 logging = {absl::GetFlag(FLAGS_rtc_event_log_name),
59 absl::GetFlag(FLAGS_rtp_dump_name),
60 absl::GetFlag(FLAGS_encoded_frame_path)};
Artem Titov75e36472018-10-08 12:28:56 +020061 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000062 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000063};
64
Patrik Höglundb6b29e02018-06-21 16:58:01 +020065std::unique_ptr<VideoQualityTestFixtureInterface>
66CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020067 // The components will normally be nullptr (= use defaults), but it's possible
68 // for external test runners to override the list of injected components.
69 auto components = TestDependencyFactory::GetInstance().CreateComponents();
Mirko Bonadei317a1f02019-09-17 17:06:18 +020070 return std::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020071}
72
Erik Språngb6b1cac2018-08-09 16:12:54 +020073// Takes the current active field trials set, and appends some new trials.
74std::string AppendFieldTrials(std::string new_trial_string) {
75 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
76}
Rasmus Brandt3c589be2019-03-13 11:32:40 +010077
78std::string ClipNameToClipPath(const char* clip_name) {
79 return test::ResourcePath(clip_name, "yuv");
80}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020081} // namespace
82
sprangce4aef12015-11-02 07:23:20 -080083// VideoQualityTest::Params params = {
84// { ... }, // Common.
85// { ... }, // Video-specific settings.
86// { ... }, // Screenshare-specific settings.
87// { ... }, // Analyzer settings.
88// pipe, // FakeNetworkPipe::Config
89// { ... }, // Spatial scalability.
90// logs // bool
91// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000092
Mirko Bonadei8ef57932018-11-16 14:38:03 +010093#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +020094TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
95 auto fixture = CreateVideoQualityTestFixture();
96 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080097 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +010098 foreman_cif.video[0] = {
99 true, 352, 288, 30,
100 700000, 700000, 700000, false,
101 "VP9", 1, 0, 0,
102 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800103 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
104 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200105 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800106}
107
Danil Chapovalov636865e2020-06-03 14:11:26 +0200108TEST(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200109 auto fixture = CreateVideoQualityTestFixture();
110 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800111 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100112 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 14:11:26 +0200117 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9_generic_descriptor",
118 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200119 foreman_cif.config->loss_percent = 5;
120 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200121 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200122 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800123}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800124
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700125TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
126 // 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
139 SdpVideoFormat::Parameters vp92 = {
140 {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 15:39:08 +0100145 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700146 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
147 kFullStackTestDurationSecs};
148 fixture->RunWithAnalyzer(generator);
149}
150
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200151TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
152 auto fixture = CreateVideoQualityTestFixture();
153 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800154 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100155 foreman_cif.video[0] = {
156 true, 352, 288, 30,
157 700000, 700000, 700000, false,
158 "multiplex", 1, 0, 0,
159 false, false, false, ClipNameToClipPath("foreman_cif")};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800160 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
161 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200162 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800163}
164
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200165TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
166 auto fixture = CreateVideoQualityTestFixture();
167
168 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700169 generator.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100170 generator.video[0] = {
171 true, 352, 288, 30, 700000, 700000, 700000, false,
172 "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700173 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
174 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200175 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800176}
177
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100178#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800179
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200180#if defined(WEBRTC_LINUX)
181// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
182#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
183#else
184#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
185#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200186TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
187 auto fixture = CreateVideoQualityTestFixture();
188 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700189 paris_qcif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100190 paris_qcif.video[0] = {
191 true, 176, 144, 30,
192 300000, 300000, 300000, false,
193 "VP8", 1, 0, 0,
194 false, false, true, ClipNameToClipPath("paris_qcif")};
minyue626bc952016-10-31 05:47:02 -0700195 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
196 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200197 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000198}
199
Danil Chapovalov636865e2020-06-03 14:11:26 +0200200TEST(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
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
Danil Chapovalov636865e2020-06-03 14:11:26 +0200216TEST(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200217 auto fixture = CreateVideoQualityTestFixture();
218 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800219 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100220 foreman_cif.video[0] = {
221 true, 352, 288, 10,
222 30000, 30000, 30000, false,
223 "VP8", 1, 0, 0,
224 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200225 foreman_cif.analyzer = {
226 "foreman_cif_30kbps_net_delay_0_0_plr_0_generic_descriptor", 0.0, 0.0,
227 kFullStackTestDurationSecs};
228 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200229 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800230}
231
Erik Språngd3438aa2018-11-08 16:56:43 +0100232// TODO(webrtc:9722): Remove when experiment is cleaned up.
Danil Chapovalov636865e2020-06-03 14:11:26 +0200233TEST(GenericDescriptorTest,
234 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100235 test::ScopedFieldTrials override_field_trials(
236 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
237 auto fixture = CreateVideoQualityTestFixture();
238
239 ParamsWithLogging foreman_cif;
240 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100241 foreman_cif.video[0] = {
242 true, 352, 288, 10,
243 30000, 30000, 30000, false,
244 "VP8", 1, 0, 0,
245 false, false, true, ClipNameToClipPath("foreman_cif")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100246 foreman_cif.analyzer = {
Danil Chapovalov636865e2020-06-03 14:11:26 +0200247 "foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl_generic_"
248 "descriptor",
Erik Språngd3438aa2018-11-08 16:56:43 +0100249 0.0, 0.0, kFullStackTestDurationSecs};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200250 foreman_cif.call.generic_descriptor = true;
Erik Språngd3438aa2018-11-08 16:56:43 +0100251 fixture->RunWithAnalyzer(foreman_cif);
252}
253
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100254// Link capacity below default start rate.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200255TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
256 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200257 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200258 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100259 foreman_cif.video[0] = {
260 true, 352, 288, 30,
261 30000, 500000, 2000000, false,
262 "VP8", 1, 0, 0,
263 false, false, true, ClipNameToClipPath("foreman_cif")};
Jonas Olssona4d87372019-07-05 19:08:33 +0200264 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0", 0.0,
265 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200266 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200267 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200268}
269
Erik Språng616b2332019-02-11 14:16:28 +0100270// Restricted network and encoder overproducing by 30%.
271TEST(FullStackTest, ForemanCifLink150kbpsBadRateController) {
272 auto fixture = CreateVideoQualityTestFixture();
273 ParamsWithLogging foreman_cif;
274 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100275 foreman_cif.video[0] = {
276 true, 352, 288, 30,
277 30000, 500000, 2000000, false,
278 "VP8", 1, 0, 0,
279 false, false, true, ClipNameToClipPath("foreman_cif"),
280 0, {}, 1.30};
Erik Språng616b2332019-02-11 14:16:28 +0100281 foreman_cif.analyzer = {
282 "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
283 kFullStackTestDurationSecs};
284 foreman_cif.config->link_capacity_kbps = 150;
285 foreman_cif.config->queue_length_packets = 30;
286 foreman_cif.config->queue_delay_ms = 100;
287 fixture->RunWithAnalyzer(foreman_cif);
288}
289
Erik Språng8b8d01a2019-03-02 20:54:55 +0100290// Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
291// Packet rate and loss are low enough that loss will happen with ~3s interval.
292// This triggers protection overhead to toggle between zero and non-zero.
293// Link queue is restrictive enough to trigger loss on probes.
294TEST(FullStackTest, ForemanCifMediaCapacitySmallLossAndQueue) {
295 auto fixture = CreateVideoQualityTestFixture();
296 ParamsWithLogging foreman_cif;
297 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100298 foreman_cif.video[0] = {
299 true, 352, 288, 30,
300 30000, 500000, 2000000, false,
301 "VP8", 1, 0, 0,
302 false, false, true, ClipNameToClipPath("foreman_cif"),
303 0, {}, 1.30};
Erik Språng8b8d01a2019-03-02 20:54:55 +0100304 foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
305 0.0, 0.0, kFullStackTestDurationSecs};
306 foreman_cif.config->link_capacity_kbps = 250;
307 foreman_cif.config->queue_length_packets = 10;
308 foreman_cif.config->queue_delay_ms = 100;
309 foreman_cif.config->loss_percent = 1;
310 fixture->RunWithAnalyzer(foreman_cif);
311}
312
Danil Chapovalov636865e2020-06-03 14:11:26 +0200313TEST(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200314 auto fixture = CreateVideoQualityTestFixture();
315 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700316 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100317 foreman_cif.video[0] = {
318 true, 352, 288, 30,
319 30000, 500000, 2000000, false,
320 "VP8", 1, 0, 0,
321 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200322 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_generic_descriptor",
323 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200324 foreman_cif.config->loss_percent = 5;
325 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200326 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200327 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000328}
329
Danil Chapovalov636865e2020-06-03 14:11:26 +0200330TEST(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200331 auto fixture = CreateVideoQualityTestFixture();
332 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800333 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100334 foreman_cif.video[0] = {
335 true, 352, 288, 30,
336 30000, 500000, 2000000, false,
337 "VP8", 1, 0, 0,
338 true, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200339 foreman_cif.analyzer = {
340 "foreman_cif_delay_50_0_plr_5_ulpfec_generic_descriptor", 0.0, 0.0,
341 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200342 foreman_cif.config->loss_percent = 5;
343 foreman_cif.config->queue_delay_ms = 50;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200344 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200345 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800346}
347
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200348TEST(FullStackTest, ForemanCifPlr5Flexfec) {
349 auto fixture = CreateVideoQualityTestFixture();
350 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800351 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100352 foreman_cif.video[0] = {
353 true, 352, 288, 30,
354 30000, 500000, 2000000, false,
355 "VP8", 1, 0, 0,
356 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800357 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
358 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200359 foreman_cif.config->loss_percent = 5;
360 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200361 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800362}
363
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200364TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
365 auto fixture = CreateVideoQualityTestFixture();
366 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700367 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100368 foreman_cif.video[0] = {
369 true, 352, 288, 30,
370 30000, 500000, 2000000, false,
371 "VP8", 1, 0, 0,
372 false, true, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700373 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
374 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200375 foreman_cif.config->loss_percent = 3;
376 foreman_cif.config->link_capacity_kbps = 500;
377 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200378 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700379}
380
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200381TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
382 auto fixture = CreateVideoQualityTestFixture();
383 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700384 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 30000, 500000, 2000000, false,
388 "VP8", 1, 0, 0,
389 true, false, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700390 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
391 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200392 foreman_cif.config->loss_percent = 3;
393 foreman_cif.config->link_capacity_kbps = 500;
394 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200395 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700396}
397
brandtrdd369c62016-11-16 23:56:57 -0800398#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200399TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
400 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800401 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200402 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800403 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100404 foreman_cif.video[0] = {
405 true, 352, 288, 30,
406 700000, 700000, 700000, false,
407 "H264", 1, 0, 0,
408 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800409 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
410 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200411 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800412}
413
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200414TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
415 auto fixture = CreateVideoQualityTestFixture();
416 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800417 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100418 foreman_cif.video[0] = {
419 true, 352, 288, 10,
420 30000, 30000, 30000, false,
421 "H264", 1, 0, 0,
422 false, false, true, ClipNameToClipPath("foreman_cif")};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800423 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
424 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200425 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800426}
427
Danil Chapovalov636865e2020-06-03 14:11:26 +0200428TEST(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200429 auto fixture = CreateVideoQualityTestFixture();
430 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800431 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100432 foreman_cif.video[0] = {
433 true, 352, 288, 30,
434 30000, 500000, 2000000, false,
435 "H264", 1, 0, 0,
436 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200437 foreman_cif.analyzer = {
438 "foreman_cif_delay_50_0_plr_5_H264_generic_descriptor", 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;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200442 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200443 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800444}
445
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200446TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100447 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200448 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100449 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100450
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200451 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100452 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100453 foreman_cif.video[0] = {
454 true, 352, 288, 30,
455 30000, 500000, 2000000, false,
456 "H264", 1, 0, 0,
457 false, false, true, ClipNameToClipPath("foreman_cif")};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100458 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
459 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200460 foreman_cif.config->loss_percent = 5;
461 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200462 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100463}
464
brandtrdd369c62016-11-16 23:56:57 -0800465// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200466TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
467 auto fixture = CreateVideoQualityTestFixture();
468 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800469 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100470 foreman_cif.video[0] = {
471 true, 352, 288, 30,
472 30000, 500000, 2000000, false,
473 "H264", 1, 0, 0,
474 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800475 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
476 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200477 foreman_cif.config->loss_percent = 5;
478 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200479 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800480}
481
482// Ulpfec with H264 is an unsupported combination, so this test is only useful
483// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200484TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
485 auto fixture = CreateVideoQualityTestFixture();
486 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800487 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100488 foreman_cif.video[0] = {
489 true, 352, 288, 30,
490 30000, 500000, 2000000, false,
491 "H264", 1, 0, 0,
492 true, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800493 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
494 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200495 foreman_cif.config->loss_percent = 5;
496 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200497 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800498}
499#endif // defined(WEBRTC_USE_H264)
500
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200501TEST(FullStackTest, ForemanCif500kbps) {
502 auto fixture = CreateVideoQualityTestFixture();
503 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700504 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100505 foreman_cif.video[0] = {
506 true, 352, 288, 30,
507 30000, 500000, 2000000, false,
508 "VP8", 1, 0, 0,
509 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700510 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
511 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200512 foreman_cif.config->queue_length_packets = 0;
513 foreman_cif.config->queue_delay_ms = 0;
514 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200515 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000516}
517
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200518TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
519 auto fixture = CreateVideoQualityTestFixture();
520 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700521 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100522 foreman_cif.video[0] = {
523 true, 352, 288, 30,
524 30000, 500000, 2000000, false,
525 "VP8", 1, 0, 0,
526 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700527 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
528 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200529 foreman_cif.config->queue_length_packets = 32;
530 foreman_cif.config->queue_delay_ms = 0;
531 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200532 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000533}
534
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200535TEST(FullStackTest, ForemanCif500kbps100ms) {
536 auto fixture = CreateVideoQualityTestFixture();
537 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700538 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100539 foreman_cif.video[0] = {
540 true, 352, 288, 30,
541 30000, 500000, 2000000, false,
542 "VP8", 1, 0, 0,
543 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700544 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
545 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200546 foreman_cif.config->queue_length_packets = 0;
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
Danil Chapovalov636865e2020-06-03 14:11:26 +0200552TEST(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
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, 500000, 2000000, false,
559 "VP8", 1, 0, 0,
560 false, false, true, ClipNameToClipPath("foreman_cif")};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200561 foreman_cif.analyzer = {
562 "foreman_cif_500kbps_100ms_32pkts_queue_generic_descriptor", 0.0, 0.0,
563 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200564 foreman_cif.config->queue_length_packets = 32;
565 foreman_cif.config->queue_delay_ms = 100;
566 foreman_cif.config->link_capacity_kbps = 500;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200567 foreman_cif.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200568 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700569}
570
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200571TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
572 auto fixture = CreateVideoQualityTestFixture();
573 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800574 foreman_cif.call.send_side_bwe = false;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100575 foreman_cif.video[0] = {
576 true, 352, 288, 30,
577 30000, 500000, 2000000, false,
578 "VP8", 1, 0, 0,
579 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800580 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
581 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200582 foreman_cif.config->queue_length_packets = 32;
583 foreman_cif.config->queue_delay_ms = 100;
584 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200585 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000586}
587
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200588TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
589 auto fixture = CreateVideoQualityTestFixture();
590 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700591 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100592 foreman_cif.video[0] = {
593 true, 352, 288, 30,
594 30000, 2000000, 2000000, false,
595 "VP8", 1, 0, 0,
596 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700597 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
598 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200599 foreman_cif.config->queue_length_packets = 32;
600 foreman_cif.config->queue_delay_ms = 100;
601 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200602 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000603}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000604
sprangff19d352017-09-06 07:14:02 -0700605// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200606TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
607 auto fixture = CreateVideoQualityTestFixture();
608 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700609 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100610 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100611 true, 1280,
612 720, 50,
613 30000, 3000000,
614 3000000, false,
615 "VP8", 1,
616 0, 0,
617 false, false,
618 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
minyue626bc952016-10-31 05:47:02 -0700619 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
620 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200621 conf_motion_hd.config->queue_length_packets = 32;
622 conf_motion_hd.config->queue_delay_ms = 100;
623 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200624 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700625}
626
Erik Språngd3438aa2018-11-08 16:56:43 +0100627// TODO(webrtc:9722): Remove when experiment is cleaned up.
628TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
629 test::ScopedFieldTrials override_field_trials(
630 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200631 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100632
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200633 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700634 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100635 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100636 true, 1280,
637 720, 50,
638 30000, 3000000,
639 3000000, false,
640 "VP8", 1,
641 -1, 0,
642 false, false,
643 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100644 conf_motion_hd.analyzer = {
645 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
646 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200647 conf_motion_hd.config->queue_length_packets = 50;
648 conf_motion_hd.config->loss_percent = 3;
649 conf_motion_hd.config->queue_delay_ms = 100;
650 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200651 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700652}
653
Danil Chapovalov636865e2020-06-03 14:11:26 +0200654TEST(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200655 auto fixture = CreateVideoQualityTestFixture();
656 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700657 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100658 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100659 true, 1280,
660 720, 50,
661 30000, 3000000,
662 3000000, false,
663 "VP8", 2,
664 -1, 0,
665 false, false,
666 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
philipeldd8b0d82018-09-27 11:18:10 +0200667 conf_motion_hd.analyzer = {
Danil Chapovalov636865e2020-06-03 14:11:26 +0200668 "conference_motion_hd_2tl_moderate_limits_generic_descriptor", 0.0, 0.0,
philipeldd8b0d82018-09-27 11:18:10 +0200669 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200670 conf_motion_hd.config->queue_length_packets = 50;
671 conf_motion_hd.config->loss_percent = 3;
672 conf_motion_hd.config->queue_delay_ms = 100;
673 conf_motion_hd.config->link_capacity_kbps = 2000;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200674 conf_motion_hd.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200675 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700676}
677
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200678TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
679 auto fixture = CreateVideoQualityTestFixture();
680 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700681 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100682 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100683 true, 1280,
684 720, 50,
685 30000, 3000000,
686 3000000, false,
687 "VP8", 3,
688 -1, 0,
689 false, false,
690 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700691 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
692 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200693 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;
696 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200697 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700698}
699
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200700TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
701 auto fixture = CreateVideoQualityTestFixture();
702 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700703 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100704 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100705 true, 1280,
706 720, 50,
707 30000, 3000000,
708 3000000, false,
709 "VP8", 4,
710 -1, 0,
711 false, false,
712 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700713 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
714 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200715 conf_motion_hd.config->queue_length_packets = 50;
716 conf_motion_hd.config->loss_percent = 3;
717 conf_motion_hd.config->queue_delay_ms = 100;
718 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200719 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700720}
721
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200722TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200723 test::ScopedFieldTrials field_trial(
724 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100725 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200726 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700727 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100728 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100729 true, 1280,
730 720, 50,
731 30000, 3000000,
732 3000000, false,
733 "VP8", 3,
734 -1, 0,
735 false, false,
736 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200737 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
738 0.0, 0.0, kFullStackTestDurationSecs};
739 conf_motion_hd.config->queue_length_packets = 50;
740 conf_motion_hd.config->loss_percent = 3;
741 conf_motion_hd.config->queue_delay_ms = 100;
742 conf_motion_hd.config->link_capacity_kbps = 2000;
743 fixture->RunWithAnalyzer(conf_motion_hd);
744}
745
746TEST(FullStackTest,
747 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
748 auto fixture = CreateVideoQualityTestFixture();
749 test::ScopedFieldTrials field_trial(
750 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
751 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
752 ParamsWithLogging conf_motion_hd;
753 conf_motion_hd.call.send_side_bwe = true;
754 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100755 true, 1280,
756 720, 50,
757 30000, 3000000,
758 3000000, false,
759 "VP8", 3,
760 -1, 0,
761 false, false,
762 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200763 conf_motion_hd.analyzer = {
764 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
765 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200766 conf_motion_hd.config->queue_length_packets = 50;
767 conf_motion_hd.config->loss_percent = 3;
768 conf_motion_hd.config->queue_delay_ms = 100;
769 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200770 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700771}
772
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100773#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200774TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
775 auto fixture = CreateVideoQualityTestFixture();
776 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800777 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100778 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100779 true, 1280,
780 720, 50,
781 30000, 3000000,
782 3000000, false,
783 "VP9", 1,
784 0, 0,
785 false, false,
786 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
jianj390e64d2017-02-03 09:51:23 -0800787 conf_motion_hd.analyzer = {
788 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
789 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200790 conf_motion_hd.config->queue_length_packets = 32;
791 conf_motion_hd.config->queue_delay_ms = 100;
792 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200793 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800794}
795#endif
796
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200797TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
798 auto fixture = CreateVideoQualityTestFixture();
799 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700800 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200801 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
802 1000000, false, "VP8", 2, 1, 400000,
803 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100804 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700805 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
806 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200807 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200808}
809
Florent Castelli66b38602019-07-10 16:57:57 +0200810#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100811// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100812TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200813 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200814 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800815 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100816 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100817 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100818 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100819 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800820 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
821 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100823 screenshare_params_high.video[0] = {
824 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
825 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800826 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100827 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200828 1000000, false, "VP8", 2, 0, 400000,
829 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800830
831 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200832 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
833 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200834 screenshare.ss[0] = {
835 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
836 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200837 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800838}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100839
Florent Castelli66b38602019-07-10 16:57:57 +0200840#endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
ilnikcb8c1462017-03-09 09:23:30 -0800841
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200842TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
843 auto fixture = CreateVideoQualityTestFixture();
844 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700845 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200846 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
847 1000000, false, "VP8", 2, 1, 400000,
848 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100849 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700850 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
851 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200852 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700853}
854
Danil Chapovalov636865e2020-06-03 14:11:26 +0200855TEST(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200856 auto fixture = CreateVideoQualityTestFixture();
857 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700858 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200859 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
860 1000000, false, "VP8", 2, 1, 400000,
861 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100862 screenshare.screenshare[0] = {true, false, 10};
Danil Chapovalov636865e2020-06-03 14:11:26 +0200863 screenshare.analyzer = {"screenshare_slides_lossy_net_generic_descriptor",
864 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200865 screenshare.config->loss_percent = 5;
866 screenshare.config->queue_delay_ms = 200;
867 screenshare.config->link_capacity_kbps = 500;
Danil Chapovalov636865e2020-06-03 14:11:26 +0200868 screenshare.call.generic_descriptor = true;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200869 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800870}
871
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200872TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
873 auto fixture = CreateVideoQualityTestFixture();
874 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700875 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200876 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
877 1000000, false, "VP8", 2, 1, 400000,
878 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100879 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700880 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
881 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200882 screenshare.config->loss_percent = 10;
883 screenshare.config->queue_delay_ms = 200;
884 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200885 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800886}
887
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200888TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
889 auto fixture = CreateVideoQualityTestFixture();
890 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700891 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200892 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
893 1000000, false, "VP8", 2, 1, 400000,
894 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100895 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700896 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
897 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200898 screenshare.config->loss_percent = 5;
899 screenshare.config->link_capacity_kbps = 200;
900 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700901
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200902 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700903}
904
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200905TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
906 auto fixture = CreateVideoQualityTestFixture();
907 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700908 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200909 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
910 1000000, false, "VP8", 2, 1, 400000,
911 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100912 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700913 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
914 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200915 screenshare.config->loss_percent = 1;
916 screenshare.config->link_capacity_kbps = 1200;
917 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700918
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200919 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700920}
921
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100922// Since ParamsWithLogging::Video is not trivially destructible, we can't
923// store these structs as const globals.
924ParamsWithLogging::Video SvcVp9Video() {
925 return ParamsWithLogging::Video{
926 true, 1280,
927 720, 30,
928 800000, 2500000,
929 2500000, false,
930 "VP9", 3,
931 2, 400000,
932 false, false,
933 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
934}
ilnik566c43b2017-03-07 04:42:54 -0800935
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100936ParamsWithLogging::Video SimulcastVp8VideoHigh() {
937 return ParamsWithLogging::Video{
938 true, 1280,
939 720, 30,
940 800000, 2500000,
941 2500000, false,
942 "VP8", 3,
943 2, 400000,
944 false, false,
945 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
946}
ilnik566c43b2017-03-07 04:42:54 -0800947
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100948ParamsWithLogging::Video SimulcastVp8VideoMedium() {
949 return ParamsWithLogging::Video{
950 true, 640,
951 360, 30,
952 150000, 500000,
953 700000, false,
954 "VP8", 3,
955 2, 400000,
956 false, false,
957 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
958}
ilnik566c43b2017-03-07 04:42:54 -0800959
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100960ParamsWithLogging::Video SimulcastVp8VideoLow() {
961 return ParamsWithLogging::Video{
962 true, 320,
963 180, 30,
964 30000, 150000,
965 200000, false,
966 "VP8", 3,
967 2, 400000,
968 false, false,
969 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
970}
ilnik566c43b2017-03-07 04:42:54 -0800971
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100972#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100973
974TEST(FullStackTest, ScreenshareSlidesVP9_3SL_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200975 auto fixture = CreateVideoQualityTestFixture();
976 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700977 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100978 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
979 2000000, false, "VP9", 1, 0, 400000,
980 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100981 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100982 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -0700983 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200984 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100985 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
986 std::vector<SpatialLayer>(), true};
987 fixture->RunWithAnalyzer(screenshare);
988}
989
Patrik Höglundf6767ed2020-03-13 12:45:32 +0100990// TODO(http://bugs.webrtc.org/9506): investigate.
Sergey Silkin7f978f12018-09-10 12:01:49 +0000991#if !defined(WEBRTC_MAC)
992
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200993TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200994 webrtc::test::ScopedFieldTrials override_trials(
995 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200996 auto fixture = CreateVideoQualityTestFixture();
997 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200998 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100999 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001000 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
1001 kFullStackTestDurationSecs};
1002 simulcast.ss[0] = {
1003 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
1004 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001005 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001006}
1007
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001008TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001009 webrtc::test::ScopedFieldTrials override_trials(
1010 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001011 auto fixture = CreateVideoQualityTestFixture();
1012 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001013 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001014 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001015 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
1016 kFullStackTestDurationSecs};
1017 simulcast.ss[0] = {
1018 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1019 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001020 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001021}
“Michael277a6562018-06-01 14:09:19 -05001022
Ilya Nikolaevskiyef0033b2020-02-25 13:59:08 +01001023TEST(FullStackTest, VP9KSVC_3SL_Low_Bw_Limited) {
1024 webrtc::test::ScopedFieldTrials override_trials(
1025 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1026 "WebRTC-Vp9ExternalRefCtrl/Enabled/"));
1027 auto fixture = CreateVideoQualityTestFixture();
1028 ParamsWithLogging simulcast;
1029 simulcast.config->link_capacity_kbps = 500;
1030 simulcast.call.send_side_bwe = true;
1031 simulcast.video[0] = SvcVp9Video();
1032 simulcast.analyzer = {"vp9ksvc_3sl_low_bw_limited", 0.0, 0.0,
1033 kFullStackTestDurationSecs};
1034 simulcast.ss[0] = {
1035 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1036 std::vector<SpatialLayer>(), false};
1037 fixture->RunWithAnalyzer(simulcast);
1038}
1039
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001040TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001041 webrtc::test::ScopedFieldTrials override_trials(
1042 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001043 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +02001044 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -05001045 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001046 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 14:09:19 -05001047 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1048 kFullStackTestDurationSecs};
1049 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001050 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -05001051 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +02001052 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +02001053 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001054 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -05001055}
Erik Språngd3438aa2018-11-08 16:56:43 +01001056
1057// TODO(webrtc:9722): Remove when experiment is cleaned up.
1058TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
1059 webrtc::test::ScopedFieldTrials override_trials(
1060 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1061 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
1062 auto fixture = CreateVideoQualityTestFixture();
1063 ParamsWithLogging simulcast;
1064 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001065 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 16:56:43 +01001066 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1067 0.0, 0.0, kFullStackTestDurationSecs};
1068 simulcast.ss[0] = {
1069 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1070 std::vector<SpatialLayer>(), false};
1071 simulcast.config->link_capacity_kbps = 1000;
1072 simulcast.config->queue_delay_ms = 100;
1073 fixture->RunWithAnalyzer(simulcast);
1074}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001075#endif // !defined(WEBRTC_MAC)
1076
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001077#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001078
ilnik6b826ef2017-06-16 06:53:48 -07001079// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001080// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1081#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -07001082#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
1083#else
1084#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
1085#endif
1086
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001087TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
1088 auto fixture = CreateVideoQualityTestFixture();
1089 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001090 simulcast.call.send_side_bwe = true;
Jonas Olssona4d87372019-07-05 19:08:33 +02001091 simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
1092 2500000, false, "VP8", 3, 2, 400000,
1093 false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001094 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1095 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001096 simulcast.config->loss_percent = 0;
1097 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001098 std::vector<VideoStream> streams = {
Jonas Olssona4d87372019-07-05 19:08:33 +02001099 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1100 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1101 VideoQualityTest::DefaultVideoStream(simulcast, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001102 simulcast.ss[0] = {
1103 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1104 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001105 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1106 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001107 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001108}
1109
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001110TEST(FullStackTest, SimulcastVP8_3SL_High) {
1111 auto fixture = CreateVideoQualityTestFixture();
1112 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001113 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001114 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001115 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001116 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001117 simulcast.config->loss_percent = 0;
1118 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001119 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001120 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001121 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001122 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001123 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001124 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001125
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001126 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001127 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1128 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1129 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001130 simulcast.ss[0] = {
1131 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1132 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001133 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001134}
1135
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001136TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1137 auto fixture = CreateVideoQualityTestFixture();
1138 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001139 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001140 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001141 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001142 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001143 simulcast.config->loss_percent = 0;
1144 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001145 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001146 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001147 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001148 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001149 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001150 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001151
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001152 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001153 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1154 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1155 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001156 simulcast.ss[0] = {
1157 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1158 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001159 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001160}
1161
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001162// This test assumes ideal network conditions with target bandwidth being
1163// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1164// Android32 bots can't handle this high bitrate, so disable test for those.
1165#if defined(WEBRTC_ANDROID)
Emircan Uysaler62f55322019-01-16 17:48:47 -05001166#define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001167#else
1168#define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec
1169#endif // defined(WEBRTC_ANDROID)
1170TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) {
1171 auto fixture = CreateVideoQualityTestFixture();
1172 const int target_bitrate = 100000000;
1173 ParamsWithLogging generator;
1174 generator.call.send_side_bwe = true;
1175 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1176 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1177 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1178 generator.video[0] = {true,
1179 360,
1180 240,
1181 30,
1182 target_bitrate / 2,
1183 target_bitrate,
1184 target_bitrate * 2,
1185 false,
1186 "FakeCodec",
1187 1,
1188 0,
1189 0,
1190 false,
1191 false,
1192 false,
1193 "Generator"};
1194 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1195 kFullStackTestDurationSecs};
1196 fixture->RunWithAnalyzer(generator);
1197}
1198
oprypin743117f2017-09-15 05:24:24 -07001199#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1200// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001201// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1202#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
1203#else
1204#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
1205#endif
1206
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001207TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1208 auto fixture = CreateVideoQualityTestFixture();
1209 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001210 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001211 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001212 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1213 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001214 large_room.config->loss_percent = 0;
1215 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001216 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001217 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001218 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001219 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001220 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001221 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001222
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001223 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001224 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1225 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1226 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001227 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001228 large_room.ss[0] = {
1229 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1230 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001231 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001232}
1233
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001234} // namespace webrtc