blob: 07d15107342943938f77b8242f543adc1619e591 [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/memory/memory.h"
18#include "absl/types/optional.h"
19#include "api/test/simulated_network.h"
Patrik Höglundd8f3c172018-09-26 14:39:17 +020020#include "api/test/test_dependency_factory.h"
Yves Gerey3e707812018-11-28 16:47:49 +010021#include "api/test/video_quality_test_fixture.h"
22#include "api/video_codecs/sdp_video_format.h"
23#include "api/video_codecs/video_codec.h"
24#include "api/video_codecs/video_encoder_config.h"
Emircan Uysaler0823eec2018-07-13 17:10:00 -070025#include "media/base/vp9_profile.h"
26#include "modules/video_coding/codecs/vp9/include/vp9.h"
Mirko Bonadei17f48782018-09-28 08:51:10 +020027#include "system_wrappers/include/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020028#include "test/field_trial.h"
29#include "test/gtest.h"
Rasmus Brandt3c589be2019-03-13 11:32:40 +010030#include "test/testsupport/file_utils.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020031#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000032
Mirko Bonadei2ab97f62019-07-18 13:44:12 +020033ABSL_FLAG(std::string,
34 rtc_event_log_name,
35 "",
36 "Filename for rtc event log. Two files "
37 "with \"_send\" and \"_recv\" suffixes will be created.");
38ABSL_FLAG(std::string,
39 rtp_dump_name,
40 "",
41 "Filename for dumped received RTP stream.");
42ABSL_FLAG(std::string,
43 encoded_frame_path,
44 "",
45 "The base path for encoded frame logs. Created files will have "
46 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
Sebastian Janssonf8518882018-05-31 14:52:59 +020047
48namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000049
sprang89c4a7e2017-06-30 13:27:40 -070050namespace {
brandtrdd369c62016-11-16 23:56:57 -080051static const int kFullStackTestDurationSecs = 45;
Erik Språngd3438aa2018-11-08 16:56:43 +010052const char kVp8TrustedRateControllerFieldTrial[] =
53 "WebRTC-LibvpxVp8TrustedRateController/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000054
Patrik Höglundb6b29e02018-06-21 16:58:01 +020055struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000056 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020057 ParamsWithLogging() {
58 // Use these logging flags by default, for everything.
Mirko Bonadei2ab97f62019-07-18 13:44:12 +020059 logging = {absl::GetFlag(FLAGS_rtc_event_log_name),
60 absl::GetFlag(FLAGS_rtp_dump_name),
61 absl::GetFlag(FLAGS_encoded_frame_path)};
Artem Titov75e36472018-10-08 12:28:56 +020062 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000063 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000064};
65
Patrik Höglundb6b29e02018-06-21 16:58:01 +020066std::unique_ptr<VideoQualityTestFixtureInterface>
67CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020068 // The components will normally be nullptr (= use defaults), but it's possible
69 // for external test runners to override the list of injected components.
70 auto components = TestDependencyFactory::GetInstance().CreateComponents();
71 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020072}
73
Erik Språngb6b1cac2018-08-09 16:12:54 +020074// Takes the current active field trials set, and appends some new trials.
75std::string AppendFieldTrials(std::string new_trial_string) {
76 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
77}
Rasmus Brandt3c589be2019-03-13 11:32:40 +010078
79std::string ClipNameToClipPath(const char* clip_name) {
80 return test::ResourcePath(clip_name, "yuv");
81}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020082} // namespace
83
sprangce4aef12015-11-02 07:23:20 -080084// VideoQualityTest::Params params = {
85// { ... }, // Common.
86// { ... }, // Video-specific settings.
87// { ... }, // Screenshare-specific settings.
88// { ... }, // Analyzer settings.
89// pipe, // FakeNetworkPipe::Config
90// { ... }, // Spatial scalability.
91// logs // bool
92// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000093
philipeldd8b0d82018-09-27 11:18:10 +020094class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
95 public:
philipelf638bbc2018-10-04 16:57:12 +020096 GenericDescriptorTest()
Ilya Nikolaevskiy0500b522019-01-22 11:12:51 +010097 : field_trial_(AppendFieldTrials(GetParam())),
philipelf638bbc2018-10-04 16:57:12 +020098 generic_descriptor_enabled_(
99 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +0200100
101 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +0200102 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +0200103 base += "_generic_descriptor";
104 return base;
105 }
106
philipelf638bbc2018-10-04 16:57:12 +0200107 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
108
philipeldd8b0d82018-09-27 11:18:10 +0200109 private:
110 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200111 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200112};
113
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100114#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200115TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
116 auto fixture = CreateVideoQualityTestFixture();
117 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800118 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100119 foreman_cif.video[0] = {
120 true, 352, 288, 30,
121 700000, 700000, 700000, false,
122 "VP9", 1, 0, 0,
123 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800124 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
125 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200126 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800127}
128
philipeldd8b0d82018-09-27 11:18:10 +0200129TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200130 auto fixture = CreateVideoQualityTestFixture();
131 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800132 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100133 foreman_cif.video[0] = {
134 true, 352, 288, 30,
135 30000, 500000, 2000000, false,
136 "VP9", 1, 0, 0,
137 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200138 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
139 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200140 foreman_cif.config->loss_percent = 5;
141 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200142 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200143 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800144}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800145
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700146TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
147 // Profile 2 might not be available on some platforms until
148 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
149 bool profile_2_is_supported = false;
150 for (const auto& codec : SupportedVP9Codecs()) {
151 if (ParseSdpForVP9Profile(codec.parameters)
152 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
153 profile_2_is_supported = true;
154 }
155 }
156 if (!profile_2_is_supported)
157 return;
158 auto fixture = CreateVideoQualityTestFixture();
159
160 SdpVideoFormat::Parameters vp92 = {
161 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
162 ParamsWithLogging generator;
163 generator.call.send_side_bwe = true;
164 generator.video[0] = {
165 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100166 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700167 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
168 kFullStackTestDurationSecs};
169 fixture->RunWithAnalyzer(generator);
170}
171
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200172TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
173 auto fixture = CreateVideoQualityTestFixture();
174 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800175 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100176 foreman_cif.video[0] = {
177 true, 352, 288, 30,
178 700000, 700000, 700000, false,
179 "multiplex", 1, 0, 0,
180 false, false, false, ClipNameToClipPath("foreman_cif")};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800181 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
182 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200183 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800184}
185
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200186TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
187 auto fixture = CreateVideoQualityTestFixture();
188
189 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700190 generator.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100191 generator.video[0] = {
192 true, 352, 288, 30, 700000, 700000, 700000, false,
193 "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700194 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
195 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200196 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800197}
198
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100199#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800200
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200201#if defined(WEBRTC_LINUX)
202// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
203#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
204#else
205#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
206#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200207TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
208 auto fixture = CreateVideoQualityTestFixture();
209 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700210 paris_qcif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100211 paris_qcif.video[0] = {
212 true, 176, 144, 30,
213 300000, 300000, 300000, false,
214 "VP8", 1, 0, 0,
215 false, false, true, ClipNameToClipPath("paris_qcif")};
minyue626bc952016-10-31 05:47:02 -0700216 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
217 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200218 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000219}
220
philipeldd8b0d82018-09-27 11:18:10 +0200221TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200222 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000223 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200224 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700225 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100226 foreman_cif.video[0] = {
227 true, 352, 288, 30,
228 700000, 700000, 700000, false,
229 "VP8", 1, 0, 0,
230 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200231 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
232 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200233 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200234 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000235}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000236
philipeldd8b0d82018-09-27 11:18:10 +0200237TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200238 auto fixture = CreateVideoQualityTestFixture();
239 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800240 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")};
philipeldd8b0d82018-09-27 11:18:10 +0200246 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
247 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200248 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200249 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800250}
251
Erik Språngd3438aa2018-11-08 16:56:43 +0100252// TODO(webrtc:9722): Remove when experiment is cleaned up.
253TEST_P(GenericDescriptorTest,
254 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
255 test::ScopedFieldTrials override_field_trials(
256 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
257 auto fixture = CreateVideoQualityTestFixture();
258
259 ParamsWithLogging foreman_cif;
260 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100261 foreman_cif.video[0] = {
262 true, 352, 288, 10,
263 30000, 30000, 30000, false,
264 "VP8", 1, 0, 0,
265 false, false, true, ClipNameToClipPath("foreman_cif")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100266 foreman_cif.analyzer = {
267 GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"),
268 0.0, 0.0, kFullStackTestDurationSecs};
269 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
270 fixture->RunWithAnalyzer(foreman_cif);
271}
272
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100273// Link capacity below default start rate.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200274TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
275 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200276 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200277 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100278 foreman_cif.video[0] = {
279 true, 352, 288, 30,
280 30000, 500000, 2000000, false,
281 "VP8", 1, 0, 0,
282 false, false, true, ClipNameToClipPath("foreman_cif")};
Jonas Olssona4d87372019-07-05 19:08:33 +0200283 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0", 0.0,
284 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200285 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200286 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200287}
288
Erik Språng616b2332019-02-11 14:16:28 +0100289// Restricted network and encoder overproducing by 30%.
290TEST(FullStackTest, ForemanCifLink150kbpsBadRateController) {
291 auto fixture = CreateVideoQualityTestFixture();
292 ParamsWithLogging foreman_cif;
293 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100294 foreman_cif.video[0] = {
295 true, 352, 288, 30,
296 30000, 500000, 2000000, false,
297 "VP8", 1, 0, 0,
298 false, false, true, ClipNameToClipPath("foreman_cif"),
299 0, {}, 1.30};
Erik Språng616b2332019-02-11 14:16:28 +0100300 foreman_cif.analyzer = {
301 "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
302 kFullStackTestDurationSecs};
303 foreman_cif.config->link_capacity_kbps = 150;
304 foreman_cif.config->queue_length_packets = 30;
305 foreman_cif.config->queue_delay_ms = 100;
306 fixture->RunWithAnalyzer(foreman_cif);
307}
308
Erik Språng8b8d01a2019-03-02 20:54:55 +0100309// Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
310// Packet rate and loss are low enough that loss will happen with ~3s interval.
311// This triggers protection overhead to toggle between zero and non-zero.
312// Link queue is restrictive enough to trigger loss on probes.
313TEST(FullStackTest, ForemanCifMediaCapacitySmallLossAndQueue) {
314 auto fixture = CreateVideoQualityTestFixture();
315 ParamsWithLogging foreman_cif;
316 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"),
322 0, {}, 1.30};
Erik Språng8b8d01a2019-03-02 20:54:55 +0100323 foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
324 0.0, 0.0, kFullStackTestDurationSecs};
325 foreman_cif.config->link_capacity_kbps = 250;
326 foreman_cif.config->queue_length_packets = 10;
327 foreman_cif.config->queue_delay_ms = 100;
328 foreman_cif.config->loss_percent = 1;
329 fixture->RunWithAnalyzer(foreman_cif);
330}
331
philipeldd8b0d82018-09-27 11:18:10 +0200332TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200333 auto fixture = CreateVideoQualityTestFixture();
334 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700335 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100336 foreman_cif.video[0] = {
337 true, 352, 288, 30,
338 30000, 500000, 2000000, false,
339 "VP8", 1, 0, 0,
340 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200341 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000342 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200343 foreman_cif.config->loss_percent = 5;
344 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200345 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200346 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000347}
348
philipeldd8b0d82018-09-27 11:18:10 +0200349TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200350 auto fixture = CreateVideoQualityTestFixture();
351 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800352 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100353 foreman_cif.video[0] = {
354 true, 352, 288, 30,
355 30000, 500000, 2000000, false,
356 "VP8", 1, 0, 0,
357 true, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200358 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
359 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200360 foreman_cif.config->loss_percent = 5;
361 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200362 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200363 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800364}
365
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200366TEST(FullStackTest, ForemanCifPlr5Flexfec) {
367 auto fixture = CreateVideoQualityTestFixture();
368 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800369 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100370 foreman_cif.video[0] = {
371 true, 352, 288, 30,
372 30000, 500000, 2000000, false,
373 "VP8", 1, 0, 0,
374 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800375 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
376 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200377 foreman_cif.config->loss_percent = 5;
378 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200379 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800380}
381
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200382TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
383 auto fixture = CreateVideoQualityTestFixture();
384 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700385 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100386 foreman_cif.video[0] = {
387 true, 352, 288, 30,
388 30000, 500000, 2000000, false,
389 "VP8", 1, 0, 0,
390 false, true, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700391 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
392 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200393 foreman_cif.config->loss_percent = 3;
394 foreman_cif.config->link_capacity_kbps = 500;
395 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200396 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700397}
398
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200399TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
400 auto fixture = CreateVideoQualityTestFixture();
401 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700402 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100403 foreman_cif.video[0] = {
404 true, 352, 288, 30,
405 30000, 500000, 2000000, false,
406 "VP8", 1, 0, 0,
407 true, false, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700408 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
409 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200410 foreman_cif.config->loss_percent = 3;
411 foreman_cif.config->link_capacity_kbps = 500;
412 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200413 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700414}
415
brandtrdd369c62016-11-16 23:56:57 -0800416#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200417TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
418 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800419 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200420 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800421 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100422 foreman_cif.video[0] = {
423 true, 352, 288, 30,
424 700000, 700000, 700000, false,
425 "H264", 1, 0, 0,
426 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800427 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
428 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200429 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800430}
431
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200432TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
433 auto fixture = CreateVideoQualityTestFixture();
434 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800435 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100436 foreman_cif.video[0] = {
437 true, 352, 288, 10,
438 30000, 30000, 30000, false,
439 "H264", 1, 0, 0,
440 false, false, true, ClipNameToClipPath("foreman_cif")};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800441 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
442 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200443 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800444}
445
philipeldd8b0d82018-09-27 11:18:10 +0200446TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200447 auto fixture = CreateVideoQualityTestFixture();
448 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800449 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100450 foreman_cif.video[0] = {
451 true, 352, 288, 30,
452 30000, 500000, 2000000, false,
453 "H264", 1, 0, 0,
454 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200455 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
456 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200457 foreman_cif.config->loss_percent = 5;
458 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200459 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200460 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800461}
462
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200463TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100464 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200465 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100466 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100467
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200468 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100469 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, false, true, ClipNameToClipPath("foreman_cif")};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100475 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
476 0.0, 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);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100480}
481
brandtrdd369c62016-11-16 23:56:57 -0800482// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200483TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
484 auto fixture = CreateVideoQualityTestFixture();
485 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800486 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100487 foreman_cif.video[0] = {
488 true, 352, 288, 30,
489 30000, 500000, 2000000, false,
490 "H264", 1, 0, 0,
491 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800492 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
493 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200494 foreman_cif.config->loss_percent = 5;
495 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200496 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800497}
498
499// Ulpfec with H264 is an unsupported combination, so this test is only useful
500// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200501TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
502 auto fixture = CreateVideoQualityTestFixture();
503 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800504 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 "H264", 1, 0, 0,
509 true, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800510 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
511 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200512 foreman_cif.config->loss_percent = 5;
513 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200514 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800515}
516#endif // defined(WEBRTC_USE_H264)
517
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200518TEST(FullStackTest, ForemanCif500kbps) {
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", 0.0, 0.0,
528 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200529 foreman_cif.config->queue_length_packets = 0;
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, ForemanCif500kbpsLimitedQueue) {
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_32pkts_queue", 0.0, 0.0,
545 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200546 foreman_cif.config->queue_length_packets = 32;
547 foreman_cif.config->queue_delay_ms = 0;
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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200552TEST(FullStackTest, ForemanCif500kbps100ms) {
553 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")};
minyue626bc952016-10-31 05:47:02 -0700561 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
562 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200563 foreman_cif.config->queue_length_packets = 0;
564 foreman_cif.config->queue_delay_ms = 100;
565 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200566 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000567}
568
philipeldd8b0d82018-09-27 11:18:10 +0200569TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200570 auto fixture = CreateVideoQualityTestFixture();
571 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700572 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100573 foreman_cif.video[0] = {
574 true, 352, 288, 30,
575 30000, 500000, 2000000, false,
576 "VP8", 1, 0, 0,
577 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200578 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
579 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200580 foreman_cif.config->queue_length_packets = 32;
581 foreman_cif.config->queue_delay_ms = 100;
582 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200583 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200584 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700585}
586
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200587TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
588 auto fixture = CreateVideoQualityTestFixture();
589 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800590 foreman_cif.call.send_side_bwe = false;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100591 foreman_cif.video[0] = {
592 true, 352, 288, 30,
593 30000, 500000, 2000000, false,
594 "VP8", 1, 0, 0,
595 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800596 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
597 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200598 foreman_cif.config->queue_length_packets = 32;
599 foreman_cif.config->queue_delay_ms = 100;
600 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200601 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000602}
603
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200604TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
605 auto fixture = CreateVideoQualityTestFixture();
606 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700607 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100608 foreman_cif.video[0] = {
609 true, 352, 288, 30,
610 30000, 2000000, 2000000, false,
611 "VP8", 1, 0, 0,
612 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700613 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
614 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200615 foreman_cif.config->queue_length_packets = 32;
616 foreman_cif.config->queue_delay_ms = 100;
617 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200618 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000619}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000620
sprangff19d352017-09-06 07:14:02 -0700621// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200622TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
623 auto fixture = CreateVideoQualityTestFixture();
624 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700625 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100626 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100627 true, 1280,
628 720, 50,
629 30000, 3000000,
630 3000000, false,
631 "VP8", 1,
632 0, 0,
633 false, false,
634 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
minyue626bc952016-10-31 05:47:02 -0700635 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
636 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200637 conf_motion_hd.config->queue_length_packets = 32;
638 conf_motion_hd.config->queue_delay_ms = 100;
639 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200640 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700641}
642
Erik Språngd3438aa2018-11-08 16:56:43 +0100643// TODO(webrtc:9722): Remove when experiment is cleaned up.
644TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
645 test::ScopedFieldTrials override_field_trials(
646 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200647 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100648
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200649 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700650 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100651 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100652 true, 1280,
653 720, 50,
654 30000, 3000000,
655 3000000, false,
656 "VP8", 1,
657 -1, 0,
658 false, false,
659 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100660 conf_motion_hd.analyzer = {
661 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
662 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200663 conf_motion_hd.config->queue_length_packets = 50;
664 conf_motion_hd.config->loss_percent = 3;
665 conf_motion_hd.config->queue_delay_ms = 100;
666 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200667 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700668}
669
philipeldd8b0d82018-09-27 11:18:10 +0200670TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200671 auto fixture = CreateVideoQualityTestFixture();
672 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700673 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100674 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100675 true, 1280,
676 720, 50,
677 30000, 3000000,
678 3000000, false,
679 "VP8", 2,
680 -1, 0,
681 false, false,
682 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
philipeldd8b0d82018-09-27 11:18:10 +0200683 conf_motion_hd.analyzer = {
684 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
685 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200686 conf_motion_hd.config->queue_length_packets = 50;
687 conf_motion_hd.config->loss_percent = 3;
688 conf_motion_hd.config->queue_delay_ms = 100;
689 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200690 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200691 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700692}
693
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200694TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
695 auto fixture = CreateVideoQualityTestFixture();
696 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700697 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100698 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100699 true, 1280,
700 720, 50,
701 30000, 3000000,
702 3000000, false,
703 "VP8", 3,
704 -1, 0,
705 false, false,
706 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700707 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
708 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200709 conf_motion_hd.config->queue_length_packets = 50;
710 conf_motion_hd.config->loss_percent = 3;
711 conf_motion_hd.config->queue_delay_ms = 100;
712 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200713 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700714}
715
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200716TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
717 auto fixture = CreateVideoQualityTestFixture();
718 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700719 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100720 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100721 true, 1280,
722 720, 50,
723 30000, 3000000,
724 3000000, false,
725 "VP8", 4,
726 -1, 0,
727 false, false,
728 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700729 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
730 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200731 conf_motion_hd.config->queue_length_packets = 50;
732 conf_motion_hd.config->loss_percent = 3;
733 conf_motion_hd.config->queue_delay_ms = 100;
734 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200735 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700736}
737
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200738TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200739 test::ScopedFieldTrials field_trial(
740 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100741 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200742 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700743 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100744 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100745 true, 1280,
746 720, 50,
747 30000, 3000000,
748 3000000, false,
749 "VP8", 3,
750 -1, 0,
751 false, false,
752 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200753 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
754 0.0, 0.0, kFullStackTestDurationSecs};
755 conf_motion_hd.config->queue_length_packets = 50;
756 conf_motion_hd.config->loss_percent = 3;
757 conf_motion_hd.config->queue_delay_ms = 100;
758 conf_motion_hd.config->link_capacity_kbps = 2000;
759 fixture->RunWithAnalyzer(conf_motion_hd);
760}
761
762TEST(FullStackTest,
763 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
764 auto fixture = CreateVideoQualityTestFixture();
765 test::ScopedFieldTrials field_trial(
766 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
767 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
768 ParamsWithLogging conf_motion_hd;
769 conf_motion_hd.call.send_side_bwe = true;
770 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100771 true, 1280,
772 720, 50,
773 30000, 3000000,
774 3000000, false,
775 "VP8", 3,
776 -1, 0,
777 false, false,
778 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200779 conf_motion_hd.analyzer = {
780 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
781 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200782 conf_motion_hd.config->queue_length_packets = 50;
783 conf_motion_hd.config->loss_percent = 3;
784 conf_motion_hd.config->queue_delay_ms = 100;
785 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200786 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700787}
788
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100789#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200790TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
791 auto fixture = CreateVideoQualityTestFixture();
792 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800793 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100794 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100795 true, 1280,
796 720, 50,
797 30000, 3000000,
798 3000000, false,
799 "VP9", 1,
800 0, 0,
801 false, false,
802 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
jianj390e64d2017-02-03 09:51:23 -0800803 conf_motion_hd.analyzer = {
804 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
805 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200806 conf_motion_hd.config->queue_length_packets = 32;
807 conf_motion_hd.config->queue_delay_ms = 100;
808 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200809 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800810}
811#endif
812
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200813TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
814 auto fixture = CreateVideoQualityTestFixture();
815 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700816 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200817 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
818 1000000, false, "VP8", 2, 1, 400000,
819 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100820 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700821 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
822 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200823 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200824}
825
Florent Castelli66b38602019-07-10 16:57:57 +0200826#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100827// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100828const char kScreenshareSimulcastVariableFramerateExperiment[] =
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100829 "WebRTC-VP8VariableFramerateScreenshare/"
830 "Enabled,min_fps:5.0,min_qp:15,undershoot:30/";
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100831TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200832 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200833 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800834 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100835 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100836 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100837 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100838 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800839 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
840 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200841 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100842 screenshare_params_high.video[0] = {
843 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
844 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800845 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100846 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200847 1000000, false, "VP8", 2, 0, 400000,
848 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800849
850 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200851 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
852 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200853 screenshare.ss[0] = {
854 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
855 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200856 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800857}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100858
859TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_Variable_Framerate) {
860 test::ScopedFieldTrials field_trial(
861 AppendFieldTrials(kScreenshareSimulcastVariableFramerateExperiment));
862 auto fixture = CreateVideoQualityTestFixture();
863 ParamsWithLogging screenshare;
864 screenshare.call.send_side_bwe = true;
865 screenshare.screenshare[0] = {true, false, 10};
866 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
867 2500000, false, "VP8", 2, 1, 400000,
868 false, false, false, ""};
869 screenshare.analyzer = {"screenshare_slides_simulcast_variable_framerate",
870 0.0, 0.0, kFullStackTestDurationSecs};
871 ParamsWithLogging screenshare_params_high;
872 screenshare_params_high.video[0] = {
873 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
874 "VP8", 2, 0, 400000, false, false, false, ""};
875 VideoQualityTest::Params screenshare_params_low;
876 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
877 1000000, false, "VP8", 2, 0, 400000,
878 false, false, false, ""};
879
880 std::vector<VideoStream> streams = {
881 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
882 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
883 screenshare.ss[0] = {
884 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
885 false};
886 fixture->RunWithAnalyzer(screenshare);
887}
Ilya Nikolaevskiy9699f092019-03-12 14:02:26 +0100888
889TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_low) {
Ilya Nikolaevskiy9699f092019-03-12 14:02:26 +0100890 auto fixture = CreateVideoQualityTestFixture();
891 ParamsWithLogging screenshare;
892 screenshare.call.send_side_bwe = true;
893 screenshare.screenshare[0] = {true, false, 10};
894 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
895 2500000, false, "VP8", 2, 1, 400000,
896 false, false, false, ""};
897 screenshare.analyzer = {"screenshare_slides_simulcast_low", 0.0, 0.0,
898 kFullStackTestDurationSecs};
899 VideoQualityTest::Params screenshare_params_high;
900 screenshare_params_high.video[0] = {
901 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
902 "VP8", 2, 0, 400000, false, false, false, ""};
903 VideoQualityTest::Params screenshare_params_low;
904 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
905 1000000, false, "VP8", 2, 0, 400000,
906 false, false, false, ""};
907
908 std::vector<VideoStream> streams = {
909 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
910 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
911 screenshare.ss[0] = {
912 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
913 false};
914 fixture->RunWithAnalyzer(screenshare);
915}
916
Florent Castelli66b38602019-07-10 16:57:57 +0200917#endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
ilnikcb8c1462017-03-09 09:23:30 -0800918
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200919TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
920 auto fixture = CreateVideoQualityTestFixture();
921 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700922 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200923 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
924 1000000, false, "VP8", 2, 1, 400000,
925 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100926 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700927 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
928 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200929 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700930}
931
philipeldd8b0d82018-09-27 11:18:10 +0200932TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200933 auto fixture = CreateVideoQualityTestFixture();
934 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700935 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200936 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
937 1000000, false, "VP8", 2, 1, 400000,
938 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100939 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200940 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000941 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200942 screenshare.config->loss_percent = 5;
943 screenshare.config->queue_delay_ms = 200;
944 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200945 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200946 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800947}
948
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200949TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
950 auto fixture = CreateVideoQualityTestFixture();
951 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700952 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200953 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
954 1000000, false, "VP8", 2, 1, 400000,
955 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100956 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700957 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
958 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200959 screenshare.config->loss_percent = 10;
960 screenshare.config->queue_delay_ms = 200;
961 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200962 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800963}
964
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200965TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
966 auto fixture = CreateVideoQualityTestFixture();
967 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700968 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200969 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
970 1000000, false, "VP8", 2, 1, 400000,
971 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100972 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700973 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
974 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200975 screenshare.config->loss_percent = 5;
976 screenshare.config->link_capacity_kbps = 200;
977 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700978
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200979 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700980}
981
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200982TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
983 auto fixture = CreateVideoQualityTestFixture();
984 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700985 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200986 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
987 1000000, false, "VP8", 2, 1, 400000,
988 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100989 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700990 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
991 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200992 screenshare.config->loss_percent = 1;
993 screenshare.config->link_capacity_kbps = 1200;
994 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700995
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200996 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700997}
998
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100999// Since ParamsWithLogging::Video is not trivially destructible, we can't
1000// store these structs as const globals.
1001ParamsWithLogging::Video SvcVp9Video() {
1002 return ParamsWithLogging::Video{
1003 true, 1280,
1004 720, 30,
1005 800000, 2500000,
1006 2500000, false,
1007 "VP9", 3,
1008 2, 400000,
1009 false, false,
1010 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1011}
ilnik566c43b2017-03-07 04:42:54 -08001012
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001013ParamsWithLogging::Video SimulcastVp8VideoHigh() {
1014 return ParamsWithLogging::Video{
1015 true, 1280,
1016 720, 30,
1017 800000, 2500000,
1018 2500000, false,
1019 "VP8", 3,
1020 2, 400000,
1021 false, false,
1022 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1023}
ilnik566c43b2017-03-07 04:42:54 -08001024
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001025ParamsWithLogging::Video SimulcastVp8VideoMedium() {
1026 return ParamsWithLogging::Video{
1027 true, 640,
1028 360, 30,
1029 150000, 500000,
1030 700000, false,
1031 "VP8", 3,
1032 2, 400000,
1033 false, false,
1034 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1035}
ilnik566c43b2017-03-07 04:42:54 -08001036
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001037ParamsWithLogging::Video SimulcastVp8VideoLow() {
1038 return ParamsWithLogging::Video{
1039 true, 320,
1040 180, 30,
1041 30000, 150000,
1042 200000, false,
1043 "VP8", 3,
1044 2, 400000,
1045 false, false,
1046 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1047}
ilnik566c43b2017-03-07 04:42:54 -08001048
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001049#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001050
1051TEST(FullStackTest, ScreenshareSlidesVP9_3SL_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001052 auto fixture = CreateVideoQualityTestFixture();
1053 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -07001054 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001055 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
1056 2000000, false, "VP9", 1, 0, 400000,
1057 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001058 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001059 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -07001060 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001061 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001062 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1063 std::vector<SpatialLayer>(), true};
1064 fixture->RunWithAnalyzer(screenshare);
1065}
1066
1067TEST(FullStackTest, ScreenshareSlidesVP9_3SL_Variable_Fps) {
1068 webrtc::test::ScopedFieldTrials override_trials(
1069 AppendFieldTrials("WebRTC-VP9VariableFramerateScreenshare/"
1070 "Enabled,min_qp:32,min_fps:5.0,undershoot:30,frames_"
1071 "before_steady_state:5/"));
1072 auto fixture = CreateVideoQualityTestFixture();
1073 ParamsWithLogging screenshare;
1074 screenshare.call.send_side_bwe = true;
1075 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
1076 2000000, false, "VP9", 1, 0, 400000,
1077 false, false, false, ""};
1078 screenshare.screenshare[0] = {true, false, 10};
1079 screenshare.analyzer = {"screenshare_slides_vp9_3sl_variable_fps", 0.0, 0.0,
1080 kFullStackTestDurationSecs};
1081 screenshare.ss[0] = {
1082 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1083 std::vector<SpatialLayer>(), true};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001084 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +00001085}
ilnik2a8c2f52017-02-15 02:23:28 -08001086
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001087TEST(FullStackTest, VP9SVC_3SL_High) {
1088 auto fixture = CreateVideoQualityTestFixture();
1089 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001090 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001091 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001092 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
1093 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001094
Sergey Silkin57027362018-05-15 09:12:05 +02001095 simulcast.ss[0] = {
1096 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1097 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001098 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001099}
1100
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001101TEST(FullStackTest, VP9SVC_3SL_Medium) {
1102 auto fixture = CreateVideoQualityTestFixture();
1103 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001104 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001105 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001106 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
1107 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001108 simulcast.ss[0] = {
1109 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
1110 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001111 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001112}
1113
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001114TEST(FullStackTest, VP9SVC_3SL_Low) {
1115 auto fixture = CreateVideoQualityTestFixture();
1116 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001117 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001118 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001119 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001120 simulcast.ss[0] = {
1121 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
1122 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001123 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001124}
Sergey Silkin0643fd62018-05-17 12:50:53 +02001125
Sergey Silkin7f978f12018-09-10 12:01:49 +00001126// bugs.webrtc.org/9506
1127#if !defined(WEBRTC_MAC)
1128
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001129TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001130 webrtc::test::ScopedFieldTrials override_trials(
1131 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001132 auto fixture = CreateVideoQualityTestFixture();
1133 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001134 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001135 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001136 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
1137 kFullStackTestDurationSecs};
1138 simulcast.ss[0] = {
1139 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
1140 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001141 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001142}
1143
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001144TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001145 webrtc::test::ScopedFieldTrials override_trials(
1146 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001147 auto fixture = CreateVideoQualityTestFixture();
1148 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001149 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001150 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001151 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
1152 kFullStackTestDurationSecs};
1153 simulcast.ss[0] = {
1154 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
1155 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001156 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001157}
1158
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001159TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001160 webrtc::test::ScopedFieldTrials override_trials(
1161 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001162 auto fixture = CreateVideoQualityTestFixture();
1163 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001164 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001165 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001166 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
1167 kFullStackTestDurationSecs};
1168 simulcast.ss[0] = {
1169 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1170 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001171 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001172}
“Michael277a6562018-06-01 14:09:19 -05001173
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001174TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001175 webrtc::test::ScopedFieldTrials override_trials(
1176 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001177 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +02001178 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -05001179 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001180 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 14:09:19 -05001181 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1182 kFullStackTestDurationSecs};
1183 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001184 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -05001185 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +02001186 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +02001187 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001188 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -05001189}
Erik Språngd3438aa2018-11-08 16:56:43 +01001190
1191// TODO(webrtc:9722): Remove when experiment is cleaned up.
1192TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
1193 webrtc::test::ScopedFieldTrials override_trials(
1194 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1195 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
1196 auto fixture = CreateVideoQualityTestFixture();
1197 ParamsWithLogging simulcast;
1198 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001199 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 16:56:43 +01001200 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1201 0.0, 0.0, kFullStackTestDurationSecs};
1202 simulcast.ss[0] = {
1203 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1204 std::vector<SpatialLayer>(), false};
1205 simulcast.config->link_capacity_kbps = 1000;
1206 simulcast.config->queue_delay_ms = 100;
1207 fixture->RunWithAnalyzer(simulcast);
1208}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001209#endif // !defined(WEBRTC_MAC)
1210
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001211#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001212
ilnik6b826ef2017-06-16 06:53:48 -07001213// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001214// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1215#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -07001216#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
1217#else
1218#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
1219#endif
1220
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001221TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
1222 auto fixture = CreateVideoQualityTestFixture();
1223 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001224 simulcast.call.send_side_bwe = true;
Jonas Olssona4d87372019-07-05 19:08:33 +02001225 simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
1226 2500000, false, "VP8", 3, 2, 400000,
1227 false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001228 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1229 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001230 simulcast.config->loss_percent = 0;
1231 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001232 std::vector<VideoStream> streams = {
Jonas Olssona4d87372019-07-05 19:08:33 +02001233 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1234 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1235 VideoQualityTest::DefaultVideoStream(simulcast, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001236 simulcast.ss[0] = {
1237 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1238 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001239 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1240 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001241 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001242}
1243
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001244TEST(FullStackTest, SimulcastVP8_3SL_High) {
1245 auto fixture = CreateVideoQualityTestFixture();
1246 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001247 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001248 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001249 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001250 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001251 simulcast.config->loss_percent = 0;
1252 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001253 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001254 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001255 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001256 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001257 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001258 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001259
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001260 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001261 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1262 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1263 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001264 simulcast.ss[0] = {
1265 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1266 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001267 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001268}
1269
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001270TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1271 auto fixture = CreateVideoQualityTestFixture();
1272 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001273 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001274 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001275 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001276 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001277 simulcast.config->loss_percent = 0;
1278 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001279 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001280 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001281 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001282 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001283 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001284 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001285
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001286 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001287 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1288 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1289 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001290 simulcast.ss[0] = {
1291 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1292 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001293 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001294}
1295
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001296TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1297 auto fixture = CreateVideoQualityTestFixture();
1298 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001299 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001300 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001301 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001302 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001303 simulcast.config->loss_percent = 0;
1304 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001305 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001306 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001307 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001308 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001309 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001310 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001311
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001312 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001313 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1314 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1315 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001316 simulcast.ss[0] = {
1317 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1318 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001319 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001320}
1321
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001322// This test assumes ideal network conditions with target bandwidth being
1323// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1324// Android32 bots can't handle this high bitrate, so disable test for those.
1325#if defined(WEBRTC_ANDROID)
Emircan Uysaler62f55322019-01-16 17:48:47 -05001326#define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001327#else
1328#define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec
1329#endif // defined(WEBRTC_ANDROID)
1330TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) {
1331 auto fixture = CreateVideoQualityTestFixture();
1332 const int target_bitrate = 100000000;
1333 ParamsWithLogging generator;
1334 generator.call.send_side_bwe = true;
1335 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1336 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1337 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1338 generator.video[0] = {true,
1339 360,
1340 240,
1341 30,
1342 target_bitrate / 2,
1343 target_bitrate,
1344 target_bitrate * 2,
1345 false,
1346 "FakeCodec",
1347 1,
1348 0,
1349 0,
1350 false,
1351 false,
1352 false,
1353 "Generator"};
1354 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1355 kFullStackTestDurationSecs};
1356 fixture->RunWithAnalyzer(generator);
1357}
1358
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001359TEST(FullStackTest, LargeRoomVP8_5thumb) {
1360 auto fixture = CreateVideoQualityTestFixture();
1361 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001362 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001363 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001364 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1365 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001366 large_room.config->loss_percent = 0;
1367 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001368 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001369 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001370 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001371 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001372 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001373 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001374
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001375 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001376 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1377 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1378 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001379 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001380 large_room.ss[0] = {
1381 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1382 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001383 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001384}
1385
oprypin743117f2017-09-15 05:24:24 -07001386#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1387// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001388// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1389#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001390#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001391#else
1392#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001393#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001394#endif
1395
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001396TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1397 auto fixture = CreateVideoQualityTestFixture();
1398 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001399 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001400 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001401 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1402 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001403 large_room.config->loss_percent = 0;
1404 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001405 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001406 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001407 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001408 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001409 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001410 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001411
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001412 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001413 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1414 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1415 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001416 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001417 large_room.ss[0] = {
1418 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1419 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001420 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001421}
1422
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001423TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1424 auto fixture = CreateVideoQualityTestFixture();
1425 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001426 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001427 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001428 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1429 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001430 large_room.config->loss_percent = 0;
1431 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001432 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001433 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001434 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001435 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001436 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001437 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001438
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001439 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001440 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1441 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1442 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001443 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001444 large_room.ss[0] = {
1445 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1446 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001447 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001448}
1449
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001450INSTANTIATE_TEST_SUITE_P(
1451 FullStackTest,
1452 GenericDescriptorTest,
1453 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1454 "WebRTC-GenericDescriptor/Enabled/"));
philipeldd8b0d82018-09-27 11:18:10 +02001455
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001456class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001457
1458// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001459// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1460#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001461TEST_P(DualStreamsTest,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001462 ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) {
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001463 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001464 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001465
1466 // Screenshare Settings.
1467 dual_streams.screenshare[first_stream] = {true, false, 10};
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +01001468 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
1469 2500000, false, "VP8", 2, 1, 400000,
1470 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001471
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001472 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001473 screenshare_params_high.video[0] = {
1474 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
1475 "VP8", 2, 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001476 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001477 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +02001478 1000000, false, "VP8", 2, 0, 400000,
1479 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001480 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001481 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1482 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001483
Sergey Silkin57027362018-05-15 09:12:05 +02001484 dual_streams.ss[first_stream] = {
1485 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1486 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001487
1488 // Video settings.
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001489 dual_streams.video[1 - first_stream] = SimulcastVp8VideoHigh();
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001490
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001491 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001492 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001493 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001494 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001495 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001496 video_params_low.video[0] = SimulcastVp8VideoLow();
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001497 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001498 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1499 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1500 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001501
1502 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001503 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1504 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001505
1506 // Call settings.
1507 dual_streams.call.send_side_bwe = true;
1508 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001509 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1510 std::to_string(first_stream);
1511 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001512 dual_streams.config->loss_percent = 1;
1513 dual_streams.config->link_capacity_kbps = 7500;
1514 dual_streams.config->queue_length_packets = 30;
1515 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001516
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001517 auto fixture = CreateVideoQualityTestFixture();
1518 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001519}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001520#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1521 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001522
1523TEST_P(DualStreamsTest, Conference_Restricted) {
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001524 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001525 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001526
1527 // Screenshare Settings.
1528 dual_streams.screenshare[first_stream] = {true, false, 10};
Jonas Olssona4d87372019-07-05 19:08:33 +02001529 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
1530 2500000, false, "VP8", 3, 2, 400000,
1531 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001532 // Video settings.
1533 dual_streams.video[1 - first_stream] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001534 true, 1280,
1535 720, 30,
1536 150000, 500000,
1537 700000, false,
1538 "VP8", 3,
1539 2, 400000,
1540 false, false,
1541 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001542
1543 // Call settings.
1544 dual_streams.call.send_side_bwe = true;
1545 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001546 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1547 std::to_string(first_stream);
1548 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001549 dual_streams.config->loss_percent = 1;
1550 dual_streams.config->link_capacity_kbps = 5000;
1551 dual_streams.config->queue_length_packets = 30;
1552 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001553
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001554 auto fixture = CreateVideoQualityTestFixture();
1555 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001556}
1557
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001558INSTANTIATE_TEST_SUITE_P(FullStackTest,
1559 DualStreamsTest,
1560 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001561
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001562} // namespace webrtc