blob: 823137b973a17143950dc69026235a6654e74004 [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 Nikolaevskiy7b412252019-03-06 16:40:42 +0100827const char kScreenshareSimulcastVariableFramerateExperiment[] =
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100828 "WebRTC-VP8VariableFramerateScreenshare/"
829 "Enabled,min_fps:5.0,min_qp:15,undershoot:30/";
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100830TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200831 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200832 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800833 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100834 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100835 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100836 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100837 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800838 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
839 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200840 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100841 screenshare_params_high.video[0] = {
842 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
843 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800844 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100845 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200846 1000000, false, "VP8", 2, 0, 400000,
847 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800848
849 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200850 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
851 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200852 screenshare.ss[0] = {
853 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
854 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200855 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800856}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100857
858TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_Variable_Framerate) {
859 test::ScopedFieldTrials field_trial(
860 AppendFieldTrials(kScreenshareSimulcastVariableFramerateExperiment));
861 auto fixture = CreateVideoQualityTestFixture();
862 ParamsWithLogging screenshare;
863 screenshare.call.send_side_bwe = true;
864 screenshare.screenshare[0] = {true, false, 10};
865 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
866 2500000, false, "VP8", 2, 1, 400000,
867 false, false, false, ""};
868 screenshare.analyzer = {"screenshare_slides_simulcast_variable_framerate",
869 0.0, 0.0, kFullStackTestDurationSecs};
870 ParamsWithLogging screenshare_params_high;
871 screenshare_params_high.video[0] = {
872 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
873 "VP8", 2, 0, 400000, false, false, false, ""};
874 VideoQualityTest::Params screenshare_params_low;
875 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
876 1000000, false, "VP8", 2, 0, 400000,
877 false, false, false, ""};
878
879 std::vector<VideoStream> streams = {
880 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
881 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
882 screenshare.ss[0] = {
883 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
884 false};
885 fixture->RunWithAnalyzer(screenshare);
886}
Ilya Nikolaevskiy9699f092019-03-12 14:02:26 +0100887
888TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_low) {
Ilya Nikolaevskiy9699f092019-03-12 14:02:26 +0100889 auto fixture = CreateVideoQualityTestFixture();
890 ParamsWithLogging screenshare;
891 screenshare.call.send_side_bwe = true;
892 screenshare.screenshare[0] = {true, false, 10};
893 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
894 2500000, false, "VP8", 2, 1, 400000,
895 false, false, false, ""};
896 screenshare.analyzer = {"screenshare_slides_simulcast_low", 0.0, 0.0,
897 kFullStackTestDurationSecs};
898 VideoQualityTest::Params screenshare_params_high;
899 screenshare_params_high.video[0] = {
900 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
901 "VP8", 2, 0, 400000, false, false, false, ""};
902 VideoQualityTest::Params screenshare_params_low;
903 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
904 1000000, false, "VP8", 2, 0, 400000,
905 false, false, false, ""};
906
907 std::vector<VideoStream> streams = {
908 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
909 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
910 screenshare.ss[0] = {
911 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
912 false};
913 fixture->RunWithAnalyzer(screenshare);
914}
915
Florent Castelli66b38602019-07-10 16:57:57 +0200916#endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
ilnikcb8c1462017-03-09 09:23:30 -0800917
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200918TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
919 auto fixture = CreateVideoQualityTestFixture();
920 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700921 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200922 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
923 1000000, false, "VP8", 2, 1, 400000,
924 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100925 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700926 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
927 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200928 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700929}
930
philipeldd8b0d82018-09-27 11:18:10 +0200931TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200932 auto fixture = CreateVideoQualityTestFixture();
933 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700934 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200935 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
936 1000000, false, "VP8", 2, 1, 400000,
937 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100938 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200939 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000940 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200941 screenshare.config->loss_percent = 5;
942 screenshare.config->queue_delay_ms = 200;
943 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200944 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200945 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800946}
947
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
949 auto fixture = CreateVideoQualityTestFixture();
950 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700951 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200952 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
953 1000000, false, "VP8", 2, 1, 400000,
954 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100955 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700956 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
957 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200958 screenshare.config->loss_percent = 10;
959 screenshare.config->queue_delay_ms = 200;
960 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200961 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800962}
963
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200964TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
965 auto fixture = CreateVideoQualityTestFixture();
966 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700967 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200968 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
969 1000000, false, "VP8", 2, 1, 400000,
970 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100971 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700972 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
973 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200974 screenshare.config->loss_percent = 5;
975 screenshare.config->link_capacity_kbps = 200;
976 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700977
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200978 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700979}
980
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200981TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
982 auto fixture = CreateVideoQualityTestFixture();
983 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700984 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200985 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
986 1000000, false, "VP8", 2, 1, 400000,
987 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100988 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700989 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
990 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200991 screenshare.config->loss_percent = 1;
992 screenshare.config->link_capacity_kbps = 1200;
993 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700994
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200995 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700996}
997
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100998// Since ParamsWithLogging::Video is not trivially destructible, we can't
999// store these structs as const globals.
1000ParamsWithLogging::Video SvcVp9Video() {
1001 return ParamsWithLogging::Video{
1002 true, 1280,
1003 720, 30,
1004 800000, 2500000,
1005 2500000, false,
1006 "VP9", 3,
1007 2, 400000,
1008 false, false,
1009 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1010}
ilnik566c43b2017-03-07 04:42:54 -08001011
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001012ParamsWithLogging::Video SimulcastVp8VideoHigh() {
1013 return ParamsWithLogging::Video{
1014 true, 1280,
1015 720, 30,
1016 800000, 2500000,
1017 2500000, false,
1018 "VP8", 3,
1019 2, 400000,
1020 false, false,
1021 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1022}
ilnik566c43b2017-03-07 04:42:54 -08001023
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001024ParamsWithLogging::Video SimulcastVp8VideoMedium() {
1025 return ParamsWithLogging::Video{
1026 true, 640,
1027 360, 30,
1028 150000, 500000,
1029 700000, false,
1030 "VP8", 3,
1031 2, 400000,
1032 false, false,
1033 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1034}
ilnik566c43b2017-03-07 04:42:54 -08001035
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001036ParamsWithLogging::Video SimulcastVp8VideoLow() {
1037 return ParamsWithLogging::Video{
1038 true, 320,
1039 180, 30,
1040 30000, 150000,
1041 200000, false,
1042 "VP8", 3,
1043 2, 400000,
1044 false, false,
1045 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1046}
ilnik566c43b2017-03-07 04:42:54 -08001047
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001048#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001049
1050TEST(FullStackTest, ScreenshareSlidesVP9_3SL_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001051 auto fixture = CreateVideoQualityTestFixture();
1052 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -07001053 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001054 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
1055 2000000, false, "VP9", 1, 0, 400000,
1056 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001057 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001058 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -07001059 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001060 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001061 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1062 std::vector<SpatialLayer>(), true};
1063 fixture->RunWithAnalyzer(screenshare);
1064}
1065
1066TEST(FullStackTest, ScreenshareSlidesVP9_3SL_Variable_Fps) {
1067 webrtc::test::ScopedFieldTrials override_trials(
1068 AppendFieldTrials("WebRTC-VP9VariableFramerateScreenshare/"
1069 "Enabled,min_qp:32,min_fps:5.0,undershoot:30,frames_"
1070 "before_steady_state:5/"));
1071 auto fixture = CreateVideoQualityTestFixture();
1072 ParamsWithLogging screenshare;
1073 screenshare.call.send_side_bwe = true;
1074 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
1075 2000000, false, "VP9", 1, 0, 400000,
1076 false, false, false, ""};
1077 screenshare.screenshare[0] = {true, false, 10};
1078 screenshare.analyzer = {"screenshare_slides_vp9_3sl_variable_fps", 0.0, 0.0,
1079 kFullStackTestDurationSecs};
1080 screenshare.ss[0] = {
1081 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1082 std::vector<SpatialLayer>(), true};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001083 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +00001084}
ilnik2a8c2f52017-02-15 02:23:28 -08001085
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001086TEST(FullStackTest, VP9SVC_3SL_High) {
1087 auto fixture = CreateVideoQualityTestFixture();
1088 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001089 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001090 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001091 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
1092 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001093
Sergey Silkin57027362018-05-15 09:12:05 +02001094 simulcast.ss[0] = {
1095 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1096 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001097 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001098}
1099
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001100TEST(FullStackTest, VP9SVC_3SL_Medium) {
1101 auto fixture = CreateVideoQualityTestFixture();
1102 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001103 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001104 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001105 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
1106 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001107 simulcast.ss[0] = {
1108 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
1109 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001110 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001111}
1112
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001113TEST(FullStackTest, VP9SVC_3SL_Low) {
1114 auto fixture = CreateVideoQualityTestFixture();
1115 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001116 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001117 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001118 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001119 simulcast.ss[0] = {
1120 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
1121 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001122 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001123}
Sergey Silkin0643fd62018-05-17 12:50:53 +02001124
Sergey Silkin7f978f12018-09-10 12:01:49 +00001125// bugs.webrtc.org/9506
1126#if !defined(WEBRTC_MAC)
1127
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001128TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001129 webrtc::test::ScopedFieldTrials override_trials(
1130 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001131 auto fixture = CreateVideoQualityTestFixture();
1132 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001133 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001134 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001135 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
1136 kFullStackTestDurationSecs};
1137 simulcast.ss[0] = {
1138 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
1139 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001140 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001141}
1142
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001143TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001144 webrtc::test::ScopedFieldTrials override_trials(
1145 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001146 auto fixture = CreateVideoQualityTestFixture();
1147 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001148 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001149 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001150 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
1151 kFullStackTestDurationSecs};
1152 simulcast.ss[0] = {
1153 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
1154 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001155 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001156}
1157
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001158TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001159 webrtc::test::ScopedFieldTrials override_trials(
1160 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001161 auto fixture = CreateVideoQualityTestFixture();
1162 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001163 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001164 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001165 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
1166 kFullStackTestDurationSecs};
1167 simulcast.ss[0] = {
1168 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1169 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001170 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001171}
“Michael277a6562018-06-01 14:09:19 -05001172
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001173TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001174 webrtc::test::ScopedFieldTrials override_trials(
1175 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001176 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +02001177 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -05001178 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001179 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 14:09:19 -05001180 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1181 kFullStackTestDurationSecs};
1182 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001183 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -05001184 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +02001185 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +02001186 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001187 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -05001188}
Erik Språngd3438aa2018-11-08 16:56:43 +01001189
1190// TODO(webrtc:9722): Remove when experiment is cleaned up.
1191TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
1192 webrtc::test::ScopedFieldTrials override_trials(
1193 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1194 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
1195 auto fixture = CreateVideoQualityTestFixture();
1196 ParamsWithLogging simulcast;
1197 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001198 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 16:56:43 +01001199 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1200 0.0, 0.0, kFullStackTestDurationSecs};
1201 simulcast.ss[0] = {
1202 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1203 std::vector<SpatialLayer>(), false};
1204 simulcast.config->link_capacity_kbps = 1000;
1205 simulcast.config->queue_delay_ms = 100;
1206 fixture->RunWithAnalyzer(simulcast);
1207}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001208#endif // !defined(WEBRTC_MAC)
1209
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001210#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001211
ilnik6b826ef2017-06-16 06:53:48 -07001212// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001213// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1214#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -07001215#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
1216#else
1217#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
1218#endif
1219
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001220TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
1221 auto fixture = CreateVideoQualityTestFixture();
1222 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001223 simulcast.call.send_side_bwe = true;
Jonas Olssona4d87372019-07-05 19:08:33 +02001224 simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
1225 2500000, false, "VP8", 3, 2, 400000,
1226 false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001227 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1228 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001229 simulcast.config->loss_percent = 0;
1230 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001231 std::vector<VideoStream> streams = {
Jonas Olssona4d87372019-07-05 19:08:33 +02001232 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1233 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1234 VideoQualityTest::DefaultVideoStream(simulcast, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001235 simulcast.ss[0] = {
1236 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1237 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001238 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1239 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001240 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001241}
1242
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001243TEST(FullStackTest, SimulcastVP8_3SL_High) {
1244 auto fixture = CreateVideoQualityTestFixture();
1245 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001246 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001247 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001248 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001249 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001250 simulcast.config->loss_percent = 0;
1251 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001252 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001253 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001254 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001255 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001256 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001257 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001258
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001259 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001260 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1261 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1262 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001263 simulcast.ss[0] = {
1264 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1265 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001266 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001267}
1268
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001269TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1270 auto fixture = CreateVideoQualityTestFixture();
1271 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001272 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001273 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001274 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001275 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001276 simulcast.config->loss_percent = 0;
1277 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001278 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001279 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001280 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001281 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001282 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001283 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001284
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001285 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001286 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1287 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1288 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001289 simulcast.ss[0] = {
1290 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1291 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001292 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001293}
1294
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001295TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1296 auto fixture = CreateVideoQualityTestFixture();
1297 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001298 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001299 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001300 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001301 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001302 simulcast.config->loss_percent = 0;
1303 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001304 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001305 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001306 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001307 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001308 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001309 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001310
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001311 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001312 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1313 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1314 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001315 simulcast.ss[0] = {
1316 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1317 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001318 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001319}
1320
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001321// This test assumes ideal network conditions with target bandwidth being
1322// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1323// Android32 bots can't handle this high bitrate, so disable test for those.
1324#if defined(WEBRTC_ANDROID)
Emircan Uysaler62f55322019-01-16 17:48:47 -05001325#define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001326#else
1327#define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec
1328#endif // defined(WEBRTC_ANDROID)
1329TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) {
1330 auto fixture = CreateVideoQualityTestFixture();
1331 const int target_bitrate = 100000000;
1332 ParamsWithLogging generator;
1333 generator.call.send_side_bwe = true;
1334 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1335 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1336 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1337 generator.video[0] = {true,
1338 360,
1339 240,
1340 30,
1341 target_bitrate / 2,
1342 target_bitrate,
1343 target_bitrate * 2,
1344 false,
1345 "FakeCodec",
1346 1,
1347 0,
1348 0,
1349 false,
1350 false,
1351 false,
1352 "Generator"};
1353 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1354 kFullStackTestDurationSecs};
1355 fixture->RunWithAnalyzer(generator);
1356}
1357
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001358TEST(FullStackTest, LargeRoomVP8_5thumb) {
1359 auto fixture = CreateVideoQualityTestFixture();
1360 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001361 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001362 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001363 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1364 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001365 large_room.config->loss_percent = 0;
1366 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001367 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001368 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001369 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001370 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001371 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001372 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001373
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001374 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001375 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1376 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1377 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001378 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001379 large_room.ss[0] = {
1380 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1381 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001382 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001383}
1384
oprypin743117f2017-09-15 05:24:24 -07001385#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1386// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001387// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1388#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001389#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001390#else
1391#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001392#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001393#endif
1394
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001395TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1396 auto fixture = CreateVideoQualityTestFixture();
1397 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001398 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001399 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001400 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1401 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001402 large_room.config->loss_percent = 0;
1403 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001404 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001405 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001406 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001407 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001408 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001409 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001410
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001411 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001412 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1413 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1414 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001415 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001416 large_room.ss[0] = {
1417 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1418 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001419 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001420}
1421
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001422TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1423 auto fixture = CreateVideoQualityTestFixture();
1424 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001425 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001426 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001427 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1428 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001429 large_room.config->loss_percent = 0;
1430 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001431 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001432 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001433 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001434 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001435 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001436 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001437
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001438 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001439 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1440 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1441 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001442 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001443 large_room.ss[0] = {
1444 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1445 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001446 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001447}
1448
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001449INSTANTIATE_TEST_SUITE_P(
1450 FullStackTest,
1451 GenericDescriptorTest,
1452 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1453 "WebRTC-GenericDescriptor/Enabled/"));
philipeldd8b0d82018-09-27 11:18:10 +02001454
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001455class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001456
1457// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001458// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1459#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001460TEST_P(DualStreamsTest,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001461 ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) {
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001462 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001463 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001464
1465 // Screenshare Settings.
1466 dual_streams.screenshare[first_stream] = {true, false, 10};
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +01001467 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
1468 2500000, false, "VP8", 2, 1, 400000,
1469 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001470
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001471 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001472 screenshare_params_high.video[0] = {
1473 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
1474 "VP8", 2, 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001475 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001476 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +02001477 1000000, false, "VP8", 2, 0, 400000,
1478 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001479 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001480 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1481 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001482
Sergey Silkin57027362018-05-15 09:12:05 +02001483 dual_streams.ss[first_stream] = {
1484 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1485 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001486
1487 // Video settings.
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001488 dual_streams.video[1 - first_stream] = SimulcastVp8VideoHigh();
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001489
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001490 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001491 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001492 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001493 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001494 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001495 video_params_low.video[0] = SimulcastVp8VideoLow();
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001496 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001497 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1498 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1499 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001500
1501 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001502 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1503 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001504
1505 // Call settings.
1506 dual_streams.call.send_side_bwe = true;
1507 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001508 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1509 std::to_string(first_stream);
1510 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001511 dual_streams.config->loss_percent = 1;
1512 dual_streams.config->link_capacity_kbps = 7500;
1513 dual_streams.config->queue_length_packets = 30;
1514 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001515
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001516 auto fixture = CreateVideoQualityTestFixture();
1517 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001518}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001519#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1520 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001521
1522TEST_P(DualStreamsTest, Conference_Restricted) {
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001523 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001524 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001525
1526 // Screenshare Settings.
1527 dual_streams.screenshare[first_stream] = {true, false, 10};
Jonas Olssona4d87372019-07-05 19:08:33 +02001528 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
1529 2500000, false, "VP8", 3, 2, 400000,
1530 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001531 // Video settings.
1532 dual_streams.video[1 - first_stream] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001533 true, 1280,
1534 720, 30,
1535 150000, 500000,
1536 700000, false,
1537 "VP8", 3,
1538 2, 400000,
1539 false, false,
1540 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001541
1542 // Call settings.
1543 dual_streams.call.send_side_bwe = true;
1544 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001545 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1546 std::to_string(first_stream);
1547 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001548 dual_streams.config->loss_percent = 1;
1549 dual_streams.config->link_capacity_kbps = 5000;
1550 dual_streams.config->queue_length_packets = 30;
1551 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001552
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001553 auto fixture = CreateVideoQualityTestFixture();
1554 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001555}
1556
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001557INSTANTIATE_TEST_SUITE_P(FullStackTest,
1558 DualStreamsTest,
1559 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001560
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001561} // namespace webrtc