blob: 7307b462b7374884f7600dd301518b84146082c6 [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
philipeldd8b0d82018-09-27 11:18:10 +020093class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
94 public:
philipelf638bbc2018-10-04 16:57:12 +020095 GenericDescriptorTest()
Ilya Nikolaevskiy0500b522019-01-22 11:12:51 +010096 : field_trial_(AppendFieldTrials(GetParam())),
philipelf638bbc2018-10-04 16:57:12 +020097 generic_descriptor_enabled_(
98 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +020099
100 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +0200101 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +0200102 base += "_generic_descriptor";
103 return base;
104 }
105
philipelf638bbc2018-10-04 16:57:12 +0200106 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
107
philipeldd8b0d82018-09-27 11:18:10 +0200108 private:
109 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200110 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200111};
112
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100113#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200114TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
115 auto fixture = CreateVideoQualityTestFixture();
116 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800117 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100118 foreman_cif.video[0] = {
119 true, 352, 288, 30,
120 700000, 700000, 700000, false,
121 "VP9", 1, 0, 0,
122 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800123 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
124 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200125 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800126}
127
philipeldd8b0d82018-09-27 11:18:10 +0200128TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200129 auto fixture = CreateVideoQualityTestFixture();
130 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800131 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100132 foreman_cif.video[0] = {
133 true, 352, 288, 30,
134 30000, 500000, 2000000, false,
135 "VP9", 1, 0, 0,
136 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200137 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
138 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200139 foreman_cif.config->loss_percent = 5;
140 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200141 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200142 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800143}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800144
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700145TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
146 // Profile 2 might not be available on some platforms until
147 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
148 bool profile_2_is_supported = false;
149 for (const auto& codec : SupportedVP9Codecs()) {
150 if (ParseSdpForVP9Profile(codec.parameters)
151 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
152 profile_2_is_supported = true;
153 }
154 }
155 if (!profile_2_is_supported)
156 return;
157 auto fixture = CreateVideoQualityTestFixture();
158
159 SdpVideoFormat::Parameters vp92 = {
160 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
161 ParamsWithLogging generator;
162 generator.call.send_side_bwe = true;
163 generator.video[0] = {
164 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100165 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700166 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
167 kFullStackTestDurationSecs};
168 fixture->RunWithAnalyzer(generator);
169}
170
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200171TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
172 auto fixture = CreateVideoQualityTestFixture();
173 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800174 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100175 foreman_cif.video[0] = {
176 true, 352, 288, 30,
177 700000, 700000, 700000, false,
178 "multiplex", 1, 0, 0,
179 false, false, false, ClipNameToClipPath("foreman_cif")};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800180 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
181 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200182 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800183}
184
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200185TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
186 auto fixture = CreateVideoQualityTestFixture();
187
188 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700189 generator.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100190 generator.video[0] = {
191 true, 352, 288, 30, 700000, 700000, 700000, false,
192 "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700193 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
194 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200195 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800196}
197
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100198#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800199
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200200#if defined(WEBRTC_LINUX)
201// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
202#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
203#else
204#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
205#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200206TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
207 auto fixture = CreateVideoQualityTestFixture();
208 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700209 paris_qcif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100210 paris_qcif.video[0] = {
211 true, 176, 144, 30,
212 300000, 300000, 300000, false,
213 "VP8", 1, 0, 0,
214 false, false, true, ClipNameToClipPath("paris_qcif")};
minyue626bc952016-10-31 05:47:02 -0700215 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
216 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200217 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000218}
219
philipeldd8b0d82018-09-27 11:18:10 +0200220TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200221 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000222 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200223 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700224 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100225 foreman_cif.video[0] = {
226 true, 352, 288, 30,
227 700000, 700000, 700000, false,
228 "VP8", 1, 0, 0,
229 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200230 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
231 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200232 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200233 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000234}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000235
philipeldd8b0d82018-09-27 11:18:10 +0200236TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200237 auto fixture = CreateVideoQualityTestFixture();
238 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800239 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100240 foreman_cif.video[0] = {
241 true, 352, 288, 10,
242 30000, 30000, 30000, false,
243 "VP8", 1, 0, 0,
244 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200245 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
246 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200247 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200248 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800249}
250
Erik Språngd3438aa2018-11-08 16:56:43 +0100251// TODO(webrtc:9722): Remove when experiment is cleaned up.
252TEST_P(GenericDescriptorTest,
253 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
254 test::ScopedFieldTrials override_field_trials(
255 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
256 auto fixture = CreateVideoQualityTestFixture();
257
258 ParamsWithLogging foreman_cif;
259 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100260 foreman_cif.video[0] = {
261 true, 352, 288, 10,
262 30000, 30000, 30000, false,
263 "VP8", 1, 0, 0,
264 false, false, true, ClipNameToClipPath("foreman_cif")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100265 foreman_cif.analyzer = {
266 GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"),
267 0.0, 0.0, kFullStackTestDurationSecs};
268 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
269 fixture->RunWithAnalyzer(foreman_cif);
270}
271
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100272// Link capacity below default start rate.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200273TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
274 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200275 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200276 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100277 foreman_cif.video[0] = {
278 true, 352, 288, 30,
279 30000, 500000, 2000000, false,
280 "VP8", 1, 0, 0,
281 false, false, true, ClipNameToClipPath("foreman_cif")};
Jonas Olssona4d87372019-07-05 19:08:33 +0200282 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0", 0.0,
283 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200284 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200285 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200286}
287
Erik Språng616b2332019-02-11 14:16:28 +0100288// Restricted network and encoder overproducing by 30%.
289TEST(FullStackTest, ForemanCifLink150kbpsBadRateController) {
290 auto fixture = CreateVideoQualityTestFixture();
291 ParamsWithLogging foreman_cif;
292 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100293 foreman_cif.video[0] = {
294 true, 352, 288, 30,
295 30000, 500000, 2000000, false,
296 "VP8", 1, 0, 0,
297 false, false, true, ClipNameToClipPath("foreman_cif"),
298 0, {}, 1.30};
Erik Språng616b2332019-02-11 14:16:28 +0100299 foreman_cif.analyzer = {
300 "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
301 kFullStackTestDurationSecs};
302 foreman_cif.config->link_capacity_kbps = 150;
303 foreman_cif.config->queue_length_packets = 30;
304 foreman_cif.config->queue_delay_ms = 100;
305 fixture->RunWithAnalyzer(foreman_cif);
306}
307
Erik Språng8b8d01a2019-03-02 20:54:55 +0100308// Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
309// Packet rate and loss are low enough that loss will happen with ~3s interval.
310// This triggers protection overhead to toggle between zero and non-zero.
311// Link queue is restrictive enough to trigger loss on probes.
312TEST(FullStackTest, ForemanCifMediaCapacitySmallLossAndQueue) {
313 auto fixture = CreateVideoQualityTestFixture();
314 ParamsWithLogging foreman_cif;
315 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100316 foreman_cif.video[0] = {
317 true, 352, 288, 30,
318 30000, 500000, 2000000, false,
319 "VP8", 1, 0, 0,
320 false, false, true, ClipNameToClipPath("foreman_cif"),
321 0, {}, 1.30};
Erik Språng8b8d01a2019-03-02 20:54:55 +0100322 foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
323 0.0, 0.0, kFullStackTestDurationSecs};
324 foreman_cif.config->link_capacity_kbps = 250;
325 foreman_cif.config->queue_length_packets = 10;
326 foreman_cif.config->queue_delay_ms = 100;
327 foreman_cif.config->loss_percent = 1;
328 fixture->RunWithAnalyzer(foreman_cif);
329}
330
philipeldd8b0d82018-09-27 11:18:10 +0200331TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200332 auto fixture = CreateVideoQualityTestFixture();
333 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700334 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100335 foreman_cif.video[0] = {
336 true, 352, 288, 30,
337 30000, 500000, 2000000, false,
338 "VP8", 1, 0, 0,
339 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200340 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000341 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200342 foreman_cif.config->loss_percent = 5;
343 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200344 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200345 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000346}
347
philipeldd8b0d82018-09-27 11:18:10 +0200348TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200349 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 true, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200357 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
358 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200359 foreman_cif.config->loss_percent = 5;
360 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200361 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200362 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800363}
364
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200365TEST(FullStackTest, ForemanCifPlr5Flexfec) {
366 auto fixture = CreateVideoQualityTestFixture();
367 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800368 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100369 foreman_cif.video[0] = {
370 true, 352, 288, 30,
371 30000, 500000, 2000000, false,
372 "VP8", 1, 0, 0,
373 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800374 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
375 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200376 foreman_cif.config->loss_percent = 5;
377 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200378 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800379}
380
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200381TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
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 false, true, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700390 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200398TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
399 auto fixture = CreateVideoQualityTestFixture();
400 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700401 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100402 foreman_cif.video[0] = {
403 true, 352, 288, 30,
404 30000, 500000, 2000000, false,
405 "VP8", 1, 0, 0,
406 true, false, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700407 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
408 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200409 foreman_cif.config->loss_percent = 3;
410 foreman_cif.config->link_capacity_kbps = 500;
411 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200412 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700413}
414
brandtrdd369c62016-11-16 23:56:57 -0800415#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200416TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
417 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800418 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200419 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800420 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100421 foreman_cif.video[0] = {
422 true, 352, 288, 30,
423 700000, 700000, 700000, false,
424 "H264", 1, 0, 0,
425 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800426 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
427 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200428 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800429}
430
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200431TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
432 auto fixture = CreateVideoQualityTestFixture();
433 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800434 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100435 foreman_cif.video[0] = {
436 true, 352, 288, 10,
437 30000, 30000, 30000, false,
438 "H264", 1, 0, 0,
439 false, false, true, ClipNameToClipPath("foreman_cif")};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800440 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
441 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200442 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800443}
444
philipeldd8b0d82018-09-27 11:18:10 +0200445TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200446 auto fixture = CreateVideoQualityTestFixture();
447 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800448 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100449 foreman_cif.video[0] = {
450 true, 352, 288, 30,
451 30000, 500000, 2000000, false,
452 "H264", 1, 0, 0,
453 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200454 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
455 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200456 foreman_cif.config->loss_percent = 5;
457 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200458 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200459 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800460}
461
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200462TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100463 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200464 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100465 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100466
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200467 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100468 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100469 foreman_cif.video[0] = {
470 true, 352, 288, 30,
471 30000, 500000, 2000000, false,
472 "H264", 1, 0, 0,
473 false, false, true, ClipNameToClipPath("foreman_cif")};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100474 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
475 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200476 foreman_cif.config->loss_percent = 5;
477 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200478 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100479}
480
brandtrdd369c62016-11-16 23:56:57 -0800481// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200482TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
483 auto fixture = CreateVideoQualityTestFixture();
484 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800485 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100486 foreman_cif.video[0] = {
487 true, 352, 288, 30,
488 30000, 500000, 2000000, false,
489 "H264", 1, 0, 0,
490 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800491 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
492 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200493 foreman_cif.config->loss_percent = 5;
494 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200495 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800496}
497
498// Ulpfec with H264 is an unsupported combination, so this test is only useful
499// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200500TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
501 auto fixture = CreateVideoQualityTestFixture();
502 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800503 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100504 foreman_cif.video[0] = {
505 true, 352, 288, 30,
506 30000, 500000, 2000000, false,
507 "H264", 1, 0, 0,
508 true, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800509 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
510 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200511 foreman_cif.config->loss_percent = 5;
512 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200513 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800514}
515#endif // defined(WEBRTC_USE_H264)
516
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200517TEST(FullStackTest, ForemanCif500kbps) {
518 auto fixture = CreateVideoQualityTestFixture();
519 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700520 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100521 foreman_cif.video[0] = {
522 true, 352, 288, 30,
523 30000, 500000, 2000000, false,
524 "VP8", 1, 0, 0,
525 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700526 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
527 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200528 foreman_cif.config->queue_length_packets = 0;
529 foreman_cif.config->queue_delay_ms = 0;
530 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200531 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000532}
533
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200534TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
535 auto fixture = CreateVideoQualityTestFixture();
536 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700537 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100538 foreman_cif.video[0] = {
539 true, 352, 288, 30,
540 30000, 500000, 2000000, false,
541 "VP8", 1, 0, 0,
542 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700543 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
544 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200545 foreman_cif.config->queue_length_packets = 32;
546 foreman_cif.config->queue_delay_ms = 0;
547 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200548 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000549}
550
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200551TEST(FullStackTest, ForemanCif500kbps100ms) {
552 auto fixture = CreateVideoQualityTestFixture();
553 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700554 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100555 foreman_cif.video[0] = {
556 true, 352, 288, 30,
557 30000, 500000, 2000000, false,
558 "VP8", 1, 0, 0,
559 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700560 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
561 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200562 foreman_cif.config->queue_length_packets = 0;
563 foreman_cif.config->queue_delay_ms = 100;
564 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200565 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000566}
567
philipeldd8b0d82018-09-27 11:18:10 +0200568TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200569 auto fixture = CreateVideoQualityTestFixture();
570 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700571 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100572 foreman_cif.video[0] = {
573 true, 352, 288, 30,
574 30000, 500000, 2000000, false,
575 "VP8", 1, 0, 0,
576 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200577 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
578 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200579 foreman_cif.config->queue_length_packets = 32;
580 foreman_cif.config->queue_delay_ms = 100;
581 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200582 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200583 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700584}
585
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200586TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
587 auto fixture = CreateVideoQualityTestFixture();
588 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800589 foreman_cif.call.send_side_bwe = false;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100590 foreman_cif.video[0] = {
591 true, 352, 288, 30,
592 30000, 500000, 2000000, false,
593 "VP8", 1, 0, 0,
594 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800595 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
596 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200597 foreman_cif.config->queue_length_packets = 32;
598 foreman_cif.config->queue_delay_ms = 100;
599 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200600 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000601}
602
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200603TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
604 auto fixture = CreateVideoQualityTestFixture();
605 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700606 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100607 foreman_cif.video[0] = {
608 true, 352, 288, 30,
609 30000, 2000000, 2000000, false,
610 "VP8", 1, 0, 0,
611 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700612 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
613 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200614 foreman_cif.config->queue_length_packets = 32;
615 foreman_cif.config->queue_delay_ms = 100;
616 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200617 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000618}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000619
sprangff19d352017-09-06 07:14:02 -0700620// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200621TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
622 auto fixture = CreateVideoQualityTestFixture();
623 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700624 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100625 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100626 true, 1280,
627 720, 50,
628 30000, 3000000,
629 3000000, false,
630 "VP8", 1,
631 0, 0,
632 false, false,
633 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
minyue626bc952016-10-31 05:47:02 -0700634 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
635 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200636 conf_motion_hd.config->queue_length_packets = 32;
637 conf_motion_hd.config->queue_delay_ms = 100;
638 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200639 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700640}
641
Erik Språngd3438aa2018-11-08 16:56:43 +0100642// TODO(webrtc:9722): Remove when experiment is cleaned up.
643TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
644 test::ScopedFieldTrials override_field_trials(
645 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200646 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100647
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200648 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700649 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100650 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100651 true, 1280,
652 720, 50,
653 30000, 3000000,
654 3000000, false,
655 "VP8", 1,
656 -1, 0,
657 false, false,
658 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100659 conf_motion_hd.analyzer = {
660 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
661 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200662 conf_motion_hd.config->queue_length_packets = 50;
663 conf_motion_hd.config->loss_percent = 3;
664 conf_motion_hd.config->queue_delay_ms = 100;
665 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200666 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700667}
668
philipeldd8b0d82018-09-27 11:18:10 +0200669TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200670 auto fixture = CreateVideoQualityTestFixture();
671 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700672 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100673 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100674 true, 1280,
675 720, 50,
676 30000, 3000000,
677 3000000, false,
678 "VP8", 2,
679 -1, 0,
680 false, false,
681 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
philipeldd8b0d82018-09-27 11:18:10 +0200682 conf_motion_hd.analyzer = {
683 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
684 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200685 conf_motion_hd.config->queue_length_packets = 50;
686 conf_motion_hd.config->loss_percent = 3;
687 conf_motion_hd.config->queue_delay_ms = 100;
688 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200689 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200690 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700691}
692
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200693TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
694 auto fixture = CreateVideoQualityTestFixture();
695 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700696 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100697 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100698 true, 1280,
699 720, 50,
700 30000, 3000000,
701 3000000, false,
702 "VP8", 3,
703 -1, 0,
704 false, false,
705 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700706 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
707 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200708 conf_motion_hd.config->queue_length_packets = 50;
709 conf_motion_hd.config->loss_percent = 3;
710 conf_motion_hd.config->queue_delay_ms = 100;
711 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200712 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700713}
714
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200715TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
716 auto fixture = CreateVideoQualityTestFixture();
717 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700718 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100719 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100720 true, 1280,
721 720, 50,
722 30000, 3000000,
723 3000000, false,
724 "VP8", 4,
725 -1, 0,
726 false, false,
727 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700728 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
729 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200730 conf_motion_hd.config->queue_length_packets = 50;
731 conf_motion_hd.config->loss_percent = 3;
732 conf_motion_hd.config->queue_delay_ms = 100;
733 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200734 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700735}
736
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200737TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200738 test::ScopedFieldTrials field_trial(
739 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100740 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200741 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700742 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100743 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100744 true, 1280,
745 720, 50,
746 30000, 3000000,
747 3000000, false,
748 "VP8", 3,
749 -1, 0,
750 false, false,
751 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200752 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
753 0.0, 0.0, kFullStackTestDurationSecs};
754 conf_motion_hd.config->queue_length_packets = 50;
755 conf_motion_hd.config->loss_percent = 3;
756 conf_motion_hd.config->queue_delay_ms = 100;
757 conf_motion_hd.config->link_capacity_kbps = 2000;
758 fixture->RunWithAnalyzer(conf_motion_hd);
759}
760
761TEST(FullStackTest,
762 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
763 auto fixture = CreateVideoQualityTestFixture();
764 test::ScopedFieldTrials field_trial(
765 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
766 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
767 ParamsWithLogging conf_motion_hd;
768 conf_motion_hd.call.send_side_bwe = true;
769 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100770 true, 1280,
771 720, 50,
772 30000, 3000000,
773 3000000, false,
774 "VP8", 3,
775 -1, 0,
776 false, false,
777 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200778 conf_motion_hd.analyzer = {
779 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
780 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200781 conf_motion_hd.config->queue_length_packets = 50;
782 conf_motion_hd.config->loss_percent = 3;
783 conf_motion_hd.config->queue_delay_ms = 100;
784 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200785 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700786}
787
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100788#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200789TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
790 auto fixture = CreateVideoQualityTestFixture();
791 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800792 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100793 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100794 true, 1280,
795 720, 50,
796 30000, 3000000,
797 3000000, false,
798 "VP9", 1,
799 0, 0,
800 false, false,
801 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
jianj390e64d2017-02-03 09:51:23 -0800802 conf_motion_hd.analyzer = {
803 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
804 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200805 conf_motion_hd.config->queue_length_packets = 32;
806 conf_motion_hd.config->queue_delay_ms = 100;
807 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200808 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800809}
810#endif
811
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200812TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
813 auto fixture = CreateVideoQualityTestFixture();
814 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700815 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200816 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
817 1000000, false, "VP8", 2, 1, 400000,
818 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100819 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700820 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
821 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200823}
824
Florent Castelli66b38602019-07-10 16:57:57 +0200825#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100826// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100827TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200828 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200829 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800830 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100831 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100832 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100833 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100834 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800835 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
836 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200837 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100838 screenshare_params_high.video[0] = {
839 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
840 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800841 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100842 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200843 1000000, false, "VP8", 2, 0, 400000,
844 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800845
846 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200847 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
848 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200849 screenshare.ss[0] = {
850 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
851 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200852 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800853}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100854
Florent Castelli66b38602019-07-10 16:57:57 +0200855#endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
ilnikcb8c1462017-03-09 09:23:30 -0800856
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200857TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
858 auto fixture = CreateVideoQualityTestFixture();
859 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700860 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200861 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
862 1000000, false, "VP8", 2, 1, 400000,
863 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100864 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700865 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
866 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200867 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700868}
869
philipeldd8b0d82018-09-27 11:18:10 +0200870TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200871 auto fixture = CreateVideoQualityTestFixture();
872 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700873 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200874 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
875 1000000, false, "VP8", 2, 1, 400000,
876 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100877 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200878 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000879 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200880 screenshare.config->loss_percent = 5;
881 screenshare.config->queue_delay_ms = 200;
882 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200883 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200884 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800885}
886
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200887TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
888 auto fixture = CreateVideoQualityTestFixture();
889 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700890 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200891 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
892 1000000, false, "VP8", 2, 1, 400000,
893 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100894 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700895 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
896 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200897 screenshare.config->loss_percent = 10;
898 screenshare.config->queue_delay_ms = 200;
899 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200900 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800901}
902
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200903TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
904 auto fixture = CreateVideoQualityTestFixture();
905 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700906 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200907 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
908 1000000, false, "VP8", 2, 1, 400000,
909 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100910 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700911 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
912 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200913 screenshare.config->loss_percent = 5;
914 screenshare.config->link_capacity_kbps = 200;
915 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700916
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200917 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700918}
919
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200920TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
921 auto fixture = CreateVideoQualityTestFixture();
922 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700923 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200924 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
925 1000000, false, "VP8", 2, 1, 400000,
926 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100927 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700928 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
929 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200930 screenshare.config->loss_percent = 1;
931 screenshare.config->link_capacity_kbps = 1200;
932 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700933
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200934 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700935}
936
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100937// Since ParamsWithLogging::Video is not trivially destructible, we can't
938// store these structs as const globals.
939ParamsWithLogging::Video SvcVp9Video() {
940 return ParamsWithLogging::Video{
941 true, 1280,
942 720, 30,
943 800000, 2500000,
944 2500000, false,
945 "VP9", 3,
946 2, 400000,
947 false, false,
948 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
949}
ilnik566c43b2017-03-07 04:42:54 -0800950
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100951ParamsWithLogging::Video SimulcastVp8VideoHigh() {
952 return ParamsWithLogging::Video{
953 true, 1280,
954 720, 30,
955 800000, 2500000,
956 2500000, false,
957 "VP8", 3,
958 2, 400000,
959 false, false,
960 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
961}
ilnik566c43b2017-03-07 04:42:54 -0800962
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100963ParamsWithLogging::Video SimulcastVp8VideoMedium() {
964 return ParamsWithLogging::Video{
965 true, 640,
966 360, 30,
967 150000, 500000,
968 700000, false,
969 "VP8", 3,
970 2, 400000,
971 false, false,
972 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
973}
ilnik566c43b2017-03-07 04:42:54 -0800974
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100975ParamsWithLogging::Video SimulcastVp8VideoLow() {
976 return ParamsWithLogging::Video{
977 true, 320,
978 180, 30,
979 30000, 150000,
980 200000, false,
981 "VP8", 3,
982 2, 400000,
983 false, false,
984 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
985}
ilnik566c43b2017-03-07 04:42:54 -0800986
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100987#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100988
989TEST(FullStackTest, ScreenshareSlidesVP9_3SL_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200990 auto fixture = CreateVideoQualityTestFixture();
991 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700992 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100993 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
994 2000000, false, "VP9", 1, 0, 400000,
995 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100996 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100997 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -0700998 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200999 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001000 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1001 std::vector<SpatialLayer>(), true};
1002 fixture->RunWithAnalyzer(screenshare);
1003}
1004
Patrik Höglundf6767ed2020-03-13 12:45:32 +01001005// TODO(http://bugs.webrtc.org/9506): investigate.
Sergey Silkin7f978f12018-09-10 12:01:49 +00001006#if !defined(WEBRTC_MAC)
1007
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001008TEST(FullStackTest, VP9KSVC_3SL_High) {
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_high", 0.0, 0.0,
1016 kFullStackTestDurationSecs};
1017 simulcast.ss[0] = {
1018 std::vector<VideoStream>(), 0, 3, 2, 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}
1022
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001023TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001024 webrtc::test::ScopedFieldTrials override_trials(
1025 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001026 auto fixture = CreateVideoQualityTestFixture();
1027 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001028 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001029 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001030 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
1031 kFullStackTestDurationSecs};
1032 simulcast.ss[0] = {
1033 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1034 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001035 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001036}
“Michael277a6562018-06-01 14:09:19 -05001037
Ilya Nikolaevskiyef0033b2020-02-25 13:59:08 +01001038TEST(FullStackTest, VP9KSVC_3SL_Low_Bw_Limited) {
1039 webrtc::test::ScopedFieldTrials override_trials(
1040 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1041 "WebRTC-Vp9ExternalRefCtrl/Enabled/"));
1042 auto fixture = CreateVideoQualityTestFixture();
1043 ParamsWithLogging simulcast;
1044 simulcast.config->link_capacity_kbps = 500;
1045 simulcast.call.send_side_bwe = true;
1046 simulcast.video[0] = SvcVp9Video();
1047 simulcast.analyzer = {"vp9ksvc_3sl_low_bw_limited", 0.0, 0.0,
1048 kFullStackTestDurationSecs};
1049 simulcast.ss[0] = {
1050 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1051 std::vector<SpatialLayer>(), false};
1052 fixture->RunWithAnalyzer(simulcast);
1053}
1054
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001055TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001056 webrtc::test::ScopedFieldTrials override_trials(
1057 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001058 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +02001059 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -05001060 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001061 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 14:09:19 -05001062 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1063 kFullStackTestDurationSecs};
1064 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001065 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -05001066 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +02001067 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +02001068 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001069 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -05001070}
Erik Språngd3438aa2018-11-08 16:56:43 +01001071
1072// TODO(webrtc:9722): Remove when experiment is cleaned up.
1073TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
1074 webrtc::test::ScopedFieldTrials override_trials(
1075 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1076 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
1077 auto fixture = CreateVideoQualityTestFixture();
1078 ParamsWithLogging simulcast;
1079 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001080 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 16:56:43 +01001081 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1082 0.0, 0.0, kFullStackTestDurationSecs};
1083 simulcast.ss[0] = {
1084 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1085 std::vector<SpatialLayer>(), false};
1086 simulcast.config->link_capacity_kbps = 1000;
1087 simulcast.config->queue_delay_ms = 100;
1088 fixture->RunWithAnalyzer(simulcast);
1089}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001090#endif // !defined(WEBRTC_MAC)
1091
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001092#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001093
ilnik6b826ef2017-06-16 06:53:48 -07001094// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001095// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1096#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -07001097#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
1098#else
1099#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
1100#endif
1101
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001102TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
1103 auto fixture = CreateVideoQualityTestFixture();
1104 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001105 simulcast.call.send_side_bwe = true;
Jonas Olssona4d87372019-07-05 19:08:33 +02001106 simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
1107 2500000, false, "VP8", 3, 2, 400000,
1108 false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001109 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1110 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001111 simulcast.config->loss_percent = 0;
1112 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001113 std::vector<VideoStream> streams = {
Jonas Olssona4d87372019-07-05 19:08:33 +02001114 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1115 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1116 VideoQualityTest::DefaultVideoStream(simulcast, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001117 simulcast.ss[0] = {
1118 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1119 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001120 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1121 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001122 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001123}
1124
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001125TEST(FullStackTest, SimulcastVP8_3SL_High) {
1126 auto fixture = CreateVideoQualityTestFixture();
1127 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001128 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001129 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001130 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001131 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001132 simulcast.config->loss_percent = 0;
1133 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001134 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001135 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001136 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001137 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001138 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001139 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001140
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001141 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001142 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1143 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1144 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001145 simulcast.ss[0] = {
1146 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1147 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001148 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001149}
1150
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001151TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1152 auto fixture = CreateVideoQualityTestFixture();
1153 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001154 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001155 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001156 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001157 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001158 simulcast.config->loss_percent = 0;
1159 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001160 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001161 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001162 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001163 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001164 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001165 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001166
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001167 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001168 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1169 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1170 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001171 simulcast.ss[0] = {
1172 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1173 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001174 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001175}
1176
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001177// This test assumes ideal network conditions with target bandwidth being
1178// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1179// Android32 bots can't handle this high bitrate, so disable test for those.
1180#if defined(WEBRTC_ANDROID)
Emircan Uysaler62f55322019-01-16 17:48:47 -05001181#define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001182#else
1183#define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec
1184#endif // defined(WEBRTC_ANDROID)
1185TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) {
1186 auto fixture = CreateVideoQualityTestFixture();
1187 const int target_bitrate = 100000000;
1188 ParamsWithLogging generator;
1189 generator.call.send_side_bwe = true;
1190 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1191 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1192 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1193 generator.video[0] = {true,
1194 360,
1195 240,
1196 30,
1197 target_bitrate / 2,
1198 target_bitrate,
1199 target_bitrate * 2,
1200 false,
1201 "FakeCodec",
1202 1,
1203 0,
1204 0,
1205 false,
1206 false,
1207 false,
1208 "Generator"};
1209 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1210 kFullStackTestDurationSecs};
1211 fixture->RunWithAnalyzer(generator);
1212}
1213
oprypin743117f2017-09-15 05:24:24 -07001214#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1215// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001216// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1217#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
1218#else
1219#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
1220#endif
1221
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001222TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1223 auto fixture = CreateVideoQualityTestFixture();
1224 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001225 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001226 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001227 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1228 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001229 large_room.config->loss_percent = 0;
1230 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001231 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001232 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001233 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001234 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001235 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001236 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001237
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001238 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001239 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1240 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1241 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001242 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001243 large_room.ss[0] = {
1244 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1245 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001246 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001247}
1248
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001249INSTANTIATE_TEST_SUITE_P(
1250 FullStackTest,
1251 GenericDescriptorTest,
1252 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1253 "WebRTC-GenericDescriptor/Enabled/"));
philipeldd8b0d82018-09-27 11:18:10 +02001254
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001255} // namespace webrtc