blob: 8651d124ae58f9dd396bcd1e1381394374387f60 [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
Yves Gerey3e707812018-11-28 16:47:49 +010015#include "absl/memory/memory.h"
16#include "absl/types/optional.h"
17#include "api/test/simulated_network.h"
Patrik Höglundd8f3c172018-09-26 14:39:17 +020018#include "api/test/test_dependency_factory.h"
Yves Gerey3e707812018-11-28 16:47:49 +010019#include "api/test/video_quality_test_fixture.h"
20#include "api/video_codecs/sdp_video_format.h"
21#include "api/video_codecs/video_codec.h"
22#include "api/video_codecs/video_encoder_config.h"
23#include "common_types.h" // NOLINT(build/include)
Emircan Uysaler0823eec2018-07-13 17:10:00 -070024#include "media/base/vp9_profile.h"
25#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020026#include "rtc_base/flags.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"
30#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000031
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000032namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020033namespace flags {
34
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020035WEBRTC_DEFINE_string(rtc_event_log_name,
36 "",
37 "Filename for rtc event log. Two files "
38 "with \"_send\" and \"_recv\" suffixes will be created.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020039std::string RtcEventLogName() {
40 return static_cast<std::string>(FLAG_rtc_event_log_name);
41}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020042WEBRTC_DEFINE_string(rtp_dump_name,
43 "",
44 "Filename for dumped received RTP stream.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020045std::string RtpDumpName() {
46 return static_cast<std::string>(FLAG_rtp_dump_name);
47}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020048WEBRTC_DEFINE_string(
49 encoded_frame_path,
50 "",
51 "The base path for encoded frame logs. Created files will have "
52 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
Sebastian Janssonf8518882018-05-31 14:52:59 +020053std::string EncodedFramePath() {
54 return static_cast<std::string>(FLAG_encoded_frame_path);
55}
56} // namespace flags
57} // namespace webrtc
58
59namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000060
sprang89c4a7e2017-06-30 13:27:40 -070061namespace {
brandtrdd369c62016-11-16 23:56:57 -080062static const int kFullStackTestDurationSecs = 45;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020063const char kPacerPushBackExperiment[] =
64 "WebRTC-PacerPushbackExperiment/Enabled/";
Erik Språngd3438aa2018-11-08 16:56:43 +010065const char kVp8TrustedRateControllerFieldTrial[] =
66 "WebRTC-LibvpxVp8TrustedRateController/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000067
Patrik Höglundb6b29e02018-06-21 16:58:01 +020068struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000069 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020070 ParamsWithLogging() {
71 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020072 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
73 flags::EncodedFramePath()};
Artem Titov75e36472018-10-08 12:28:56 +020074 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000075 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000076};
77
Patrik Höglundb6b29e02018-06-21 16:58:01 +020078std::unique_ptr<VideoQualityTestFixtureInterface>
79CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020080 // The components will normally be nullptr (= use defaults), but it's possible
81 // for external test runners to override the list of injected components.
82 auto components = TestDependencyFactory::GetInstance().CreateComponents();
83 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020084}
85
Erik Språngb6b1cac2018-08-09 16:12:54 +020086// Takes the current active field trials set, and appends some new trials.
87std::string AppendFieldTrials(std::string new_trial_string) {
88 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
89}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020090} // namespace
91
sprangce4aef12015-11-02 07:23:20 -080092// VideoQualityTest::Params params = {
93// { ... }, // Common.
94// { ... }, // Video-specific settings.
95// { ... }, // Screenshare-specific settings.
96// { ... }, // Analyzer settings.
97// pipe, // FakeNetworkPipe::Config
98// { ... }, // Spatial scalability.
99// logs // bool
100// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000101
philipeldd8b0d82018-09-27 11:18:10 +0200102class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
103 public:
philipelf638bbc2018-10-04 16:57:12 +0200104 GenericDescriptorTest()
Ilya Nikolaevskiy0500b522019-01-22 11:12:51 +0100105 : field_trial_(AppendFieldTrials(GetParam())),
philipelf638bbc2018-10-04 16:57:12 +0200106 generic_descriptor_enabled_(
107 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +0200108
109 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +0200110 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +0200111 base += "_generic_descriptor";
112 return base;
113 }
114
philipelf638bbc2018-10-04 16:57:12 +0200115 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
116
philipeldd8b0d82018-09-27 11:18:10 +0200117 private:
118 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200119 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200120};
121
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100122#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200123TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
124 auto fixture = CreateVideoQualityTestFixture();
125 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800126 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100127 foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000,
128 false, "VP9", 1, 0, 0, false, false,
129 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800130 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
131 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200132 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800133}
134
philipeldd8b0d82018-09-27 11:18:10 +0200135TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200136 auto fixture = CreateVideoQualityTestFixture();
137 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800138 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100139 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
140 false, "VP9", 1, 0, 0, false, false,
141 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200142 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
143 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200144 foreman_cif.config->loss_percent = 5;
145 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200146 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200147 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800148}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800149
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700150TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
151 // Profile 2 might not be available on some platforms until
152 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
153 bool profile_2_is_supported = false;
154 for (const auto& codec : SupportedVP9Codecs()) {
155 if (ParseSdpForVP9Profile(codec.parameters)
156 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
157 profile_2_is_supported = true;
158 }
159 }
160 if (!profile_2_is_supported)
161 return;
162 auto fixture = CreateVideoQualityTestFixture();
163
164 SdpVideoFormat::Parameters vp92 = {
165 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
166 ParamsWithLogging generator;
167 generator.call.send_side_bwe = true;
168 generator.video[0] = {
169 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100170 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700171 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
172 kFullStackTestDurationSecs};
173 fixture->RunWithAnalyzer(generator);
174}
175
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200176TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
177 auto fixture = CreateVideoQualityTestFixture();
178 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800179 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100180 foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000,
181 false, "multiplex", 1, 0, 0, false, false,
182 false, "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800183 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
184 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200185 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800186}
187
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200188TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
189 auto fixture = CreateVideoQualityTestFixture();
190
191 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700192 generator.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100193 generator.video[0] = {
194 true, 352, 288, 30, 700000, 700000, 700000, false,
195 "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700196 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
197 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200198 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800199}
200
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100201#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800202
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200203#if defined(WEBRTC_LINUX)
204// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
205#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
206#else
207#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
208#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200209TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
210 auto fixture = CreateVideoQualityTestFixture();
211 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700212 paris_qcif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100213 paris_qcif.video[0] = {true, 176, 144, 30, 300000, 300000,
214 300000, false, "VP8", 1, 0, 0,
215 false, false, true, "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;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100226 foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000,
227 false, "VP8", 1, 0, 0, false, false,
228 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200229 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
230 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200231 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200232 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000233}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000234
philipeldd8b0d82018-09-27 11:18:10 +0200235TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200236 auto fixture = CreateVideoQualityTestFixture();
237 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800238 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100239 foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000,
240 false, "VP8", 1, 0, 0, false, false,
241 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200242 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
243 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200244 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200245 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800246}
247
Erik Språngd3438aa2018-11-08 16:56:43 +0100248// TODO(webrtc:9722): Remove when experiment is cleaned up.
249TEST_P(GenericDescriptorTest,
250 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
251 test::ScopedFieldTrials override_field_trials(
252 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
253 auto fixture = CreateVideoQualityTestFixture();
254
255 ParamsWithLogging foreman_cif;
256 foreman_cif.call.send_side_bwe = true;
257 foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000,
258 false, "VP8", 1, 0, 0, false, false,
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100259 true, "foreman_cif"};
Erik Språngd3438aa2018-11-08 16:56:43 +0100260 foreman_cif.analyzer = {
261 GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"),
262 0.0, 0.0, kFullStackTestDurationSecs};
263 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
264 fixture->RunWithAnalyzer(foreman_cif);
265}
266
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100267// Link capacity below default start rate.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200268TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
269 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200270 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200271 foreman_cif.call.send_side_bwe = true;
272 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
273 500000, 2000000, false, "VP8", 1,
274 0, 0, false, false, true, "foreman_cif"};
275 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
276 0.0, 0.0,
277 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200278 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200279 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200280}
281
Erik Språng616b2332019-02-11 14:16:28 +0100282// Restricted network and encoder overproducing by 30%.
283TEST(FullStackTest, ForemanCifLink150kbpsBadRateController) {
284 auto fixture = CreateVideoQualityTestFixture();
285 ParamsWithLogging foreman_cif;
286 foreman_cif.call.send_side_bwe = true;
287 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
288 false, "VP8", 1, 0, 0, false, false,
289 true, "foreman_cif", 0, {}, 1.30};
290 foreman_cif.analyzer = {
291 "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
292 kFullStackTestDurationSecs};
293 foreman_cif.config->link_capacity_kbps = 150;
294 foreman_cif.config->queue_length_packets = 30;
295 foreman_cif.config->queue_delay_ms = 100;
296 fixture->RunWithAnalyzer(foreman_cif);
297}
298
philipeldd8b0d82018-09-27 11:18:10 +0200299TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200300 auto fixture = CreateVideoQualityTestFixture();
301 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700302 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100303 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
304 false, "VP8", 1, 0, 0, false, false,
305 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200306 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000307 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200308 foreman_cif.config->loss_percent = 5;
309 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200310 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200311 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000312}
313
philipeldd8b0d82018-09-27 11:18:10 +0200314TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200315 auto fixture = CreateVideoQualityTestFixture();
316 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800317 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100318 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
319 false, "VP8", 1, 0, 0, true, false,
320 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200321 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
322 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200323 foreman_cif.config->loss_percent = 5;
324 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200325 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200326 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800327}
328
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200329TEST(FullStackTest, ForemanCifPlr5Flexfec) {
330 auto fixture = CreateVideoQualityTestFixture();
331 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800332 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100333 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
334 false, "VP8", 1, 0, 0, false, true,
335 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800336 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
337 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200338 foreman_cif.config->loss_percent = 5;
339 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200340 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800341}
342
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200343TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
344 auto fixture = CreateVideoQualityTestFixture();
345 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700346 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100347 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
348 false, "VP8", 1, 0, 0, false, true,
349 true, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700350 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
351 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200352 foreman_cif.config->loss_percent = 3;
353 foreman_cif.config->link_capacity_kbps = 500;
354 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200355 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700356}
357
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200358TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
359 auto fixture = CreateVideoQualityTestFixture();
360 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700361 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100362 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
363 false, "VP8", 1, 0, 0, true, false,
364 true, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700365 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
366 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200367 foreman_cif.config->loss_percent = 3;
368 foreman_cif.config->link_capacity_kbps = 500;
369 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200370 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700371}
372
brandtrdd369c62016-11-16 23:56:57 -0800373#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200374TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
375 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800376 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200377 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800378 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100379 foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000,
380 false, "H264", 1, 0, 0, false, false,
381 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800382 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
383 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200384 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800385}
386
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200387TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
388 auto fixture = CreateVideoQualityTestFixture();
389 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800390 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100391 foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000,
392 false, "H264", 1, 0, 0, false, false,
393 true, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800394 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
395 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200396 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800397}
398
philipeldd8b0d82018-09-27 11:18:10 +0200399TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200400 auto fixture = CreateVideoQualityTestFixture();
401 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800402 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100403 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
404 false, "H264", 1, 0, 0, false, false,
405 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200406 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
407 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200408 foreman_cif.config->loss_percent = 5;
409 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200410 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200411 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800412}
413
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200414TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100415 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200416 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100417 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100418
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200419 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100420 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100421 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
422 false, "H264", 1, 0, 0, false, false,
423 true, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100424 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
425 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200426 foreman_cif.config->loss_percent = 5;
427 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200428 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100429}
430
brandtrdd369c62016-11-16 23:56:57 -0800431// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200432TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
433 auto fixture = CreateVideoQualityTestFixture();
434 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800435 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100436 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
437 false, "H264", 1, 0, 0, false, true,
438 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800439 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
440 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200441 foreman_cif.config->loss_percent = 5;
442 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200443 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800444}
445
446// Ulpfec with H264 is an unsupported combination, so this test is only useful
447// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200448TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
449 auto fixture = CreateVideoQualityTestFixture();
450 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800451 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100452 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
453 false, "H264", 1, 0, 0, true, false,
454 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800455 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
456 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200457 foreman_cif.config->loss_percent = 5;
458 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200459 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800460}
461#endif // defined(WEBRTC_USE_H264)
462
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200463TEST(FullStackTest, ForemanCif500kbps) {
464 auto fixture = CreateVideoQualityTestFixture();
465 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700466 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100467 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
468 false, "VP8", 1, 0, 0, false, false,
469 true, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700470 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
471 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200472 foreman_cif.config->queue_length_packets = 0;
473 foreman_cif.config->queue_delay_ms = 0;
474 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200475 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000476}
477
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200478TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
479 auto fixture = CreateVideoQualityTestFixture();
480 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700481 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100482 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
483 false, "VP8", 1, 0, 0, false, false,
484 true, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700485 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
486 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200487 foreman_cif.config->queue_length_packets = 32;
488 foreman_cif.config->queue_delay_ms = 0;
489 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200490 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000491}
492
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200493TEST(FullStackTest, ForemanCif500kbps100ms) {
494 auto fixture = CreateVideoQualityTestFixture();
495 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700496 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100497 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
498 false, "VP8", 1, 0, 0, false, false,
499 true, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700500 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
501 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200502 foreman_cif.config->queue_length_packets = 0;
503 foreman_cif.config->queue_delay_ms = 100;
504 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200505 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000506}
507
philipeldd8b0d82018-09-27 11:18:10 +0200508TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200509 auto fixture = CreateVideoQualityTestFixture();
510 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700511 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100512 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
513 false, "VP8", 1, 0, 0, false, false,
514 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200515 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
516 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200517 foreman_cif.config->queue_length_packets = 32;
518 foreman_cif.config->queue_delay_ms = 100;
519 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200520 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200521 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700522}
523
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200524TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
525 auto fixture = CreateVideoQualityTestFixture();
526 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800527 foreman_cif.call.send_side_bwe = false;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100528 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
529 false, "VP8", 1, 0, 0, false, false,
530 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800531 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
532 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200533 foreman_cif.config->queue_length_packets = 32;
534 foreman_cif.config->queue_delay_ms = 100;
535 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200536 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000537}
538
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200539TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
540 auto fixture = CreateVideoQualityTestFixture();
541 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700542 foreman_cif.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100543 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 2000000, 2000000,
544 false, "VP8", 1, 0, 0, false, false,
545 true, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700546 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
547 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200548 foreman_cif.config->queue_length_packets = 32;
549 foreman_cif.config->queue_delay_ms = 100;
550 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200551 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000552}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000553
sprangff19d352017-09-06 07:14:02 -0700554// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200555TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
556 auto fixture = CreateVideoQualityTestFixture();
557 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700558 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100559 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000560 true, 1280, 720, 50, 30000,
561 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200562 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700563 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
564 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200565 conf_motion_hd.config->queue_length_packets = 32;
566 conf_motion_hd.config->queue_delay_ms = 100;
567 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200568 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700569}
570
Erik Språngd3438aa2018-11-08 16:56:43 +0100571// TODO(webrtc:9722): Remove when experiment is cleaned up.
572TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
573 test::ScopedFieldTrials override_field_trials(
574 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200575 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100576
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200577 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700578 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100579 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000580 true, 1280, 720, 50, 30000,
581 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200582 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Erik Språngd3438aa2018-11-08 16:56:43 +0100583 conf_motion_hd.analyzer = {
584 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
585 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200586 conf_motion_hd.config->queue_length_packets = 50;
587 conf_motion_hd.config->loss_percent = 3;
588 conf_motion_hd.config->queue_delay_ms = 100;
589 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200590 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700591}
592
philipeldd8b0d82018-09-27 11:18:10 +0200593TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200594 auto fixture = CreateVideoQualityTestFixture();
595 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700596 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100597 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000598 true, 1280, 720, 50, 30000,
599 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200600 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200601 conf_motion_hd.analyzer = {
602 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
603 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200604 conf_motion_hd.config->queue_length_packets = 50;
605 conf_motion_hd.config->loss_percent = 3;
606 conf_motion_hd.config->queue_delay_ms = 100;
607 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200608 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200609 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700610}
611
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200612TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
613 auto fixture = CreateVideoQualityTestFixture();
614 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700615 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100616 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000617 true, 1280, 720, 50, 30000,
618 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200619 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700620 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
621 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200622 conf_motion_hd.config->queue_length_packets = 50;
623 conf_motion_hd.config->loss_percent = 3;
624 conf_motion_hd.config->queue_delay_ms = 100;
625 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200626 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700627}
628
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200629TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
630 auto fixture = CreateVideoQualityTestFixture();
631 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700632 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100633 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000634 true, 1280, 720, 50, 30000,
635 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200636 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700637 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
638 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200639 conf_motion_hd.config->queue_length_packets = 50;
640 conf_motion_hd.config->loss_percent = 3;
641 conf_motion_hd.config->queue_delay_ms = 100;
642 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200643 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700644}
645
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200646TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200647 test::ScopedFieldTrials field_trial(
648 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100649 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200650 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700651 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100652 conf_motion_hd.video[0] = {
Rasmus Brandt35836932018-10-23 09:17:24 +0200653 true, 1280, 720, 50,
654 30000, 3000000, 3000000, false,
655 "VP8", 3, -1, 0,
656 false, false, false, "ConferenceMotion_1280_720_50"};
657 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
658 0.0, 0.0, kFullStackTestDurationSecs};
659 conf_motion_hd.config->queue_length_packets = 50;
660 conf_motion_hd.config->loss_percent = 3;
661 conf_motion_hd.config->queue_delay_ms = 100;
662 conf_motion_hd.config->link_capacity_kbps = 2000;
663 fixture->RunWithAnalyzer(conf_motion_hd);
664}
665
666TEST(FullStackTest,
667 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
668 auto fixture = CreateVideoQualityTestFixture();
669 test::ScopedFieldTrials field_trial(
670 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
671 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
672 ParamsWithLogging conf_motion_hd;
673 conf_motion_hd.call.send_side_bwe = true;
674 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000675 true, 1280, 720, 50, 30000,
676 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200677 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Rasmus Brandt35836932018-10-23 09:17:24 +0200678 conf_motion_hd.analyzer = {
679 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
680 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200681 conf_motion_hd.config->queue_length_packets = 50;
682 conf_motion_hd.config->loss_percent = 3;
683 conf_motion_hd.config->queue_delay_ms = 100;
684 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200685 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700686}
687
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100688#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200689TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
690 auto fixture = CreateVideoQualityTestFixture();
691 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800692 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100693 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000694 true, 1280, 720, 50, 30000,
695 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200696 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800697 conf_motion_hd.analyzer = {
698 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
699 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200700 conf_motion_hd.config->queue_length_packets = 32;
701 conf_motion_hd.config->queue_delay_ms = 100;
702 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200703 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800704}
705#endif
706
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200707TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
708 auto fixture = CreateVideoQualityTestFixture();
709 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700710 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200711 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
712 1000000, false, "VP8", 2, 1, 400000,
713 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100714 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700715 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
716 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200717 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200718}
719
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200720#if !defined(WEBRTC_MAC)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100721// All the tests using this constant are disabled on Mac.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200722const char kScreenshareSimulcastExperiment[] =
723 "WebRTC-SimulcastScreenshare/Enabled/";
724
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100725// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
726#if !defined(WEBRTC_WIN)
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100727TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100728 test::ScopedFieldTrials field_trial(
729 AppendFieldTrials(kScreenshareSimulcastExperiment));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200730 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200731 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800732 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100733 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100734 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100735 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100736 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800737 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
738 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200739 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100740 screenshare_params_high.video[0] = {
741 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
742 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800743 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100744 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200745 1000000, false, "VP8", 2, 0, 400000,
746 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800747
748 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200749 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
750 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200751 screenshare.ss[0] = {
752 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
753 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200754 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800755}
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100756#endif // !defined(WEBRTC_WIN)
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200757#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800758
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200759TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
760 auto fixture = CreateVideoQualityTestFixture();
761 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700762 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200763 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
764 1000000, false, "VP8", 2, 1, 400000,
765 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100766 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700767 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
768 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200769 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700770}
771
philipeldd8b0d82018-09-27 11:18:10 +0200772TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200773 auto fixture = CreateVideoQualityTestFixture();
774 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700775 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200776 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
777 1000000, false, "VP8", 2, 1, 400000,
778 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100779 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200780 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000781 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200782 screenshare.config->loss_percent = 5;
783 screenshare.config->queue_delay_ms = 200;
784 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200785 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200786 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800787}
788
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200789TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
790 auto fixture = CreateVideoQualityTestFixture();
791 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700792 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200793 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
794 1000000, false, "VP8", 2, 1, 400000,
795 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100796 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700797 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
798 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200799 screenshare.config->loss_percent = 10;
800 screenshare.config->queue_delay_ms = 200;
801 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200802 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800803}
804
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200805TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
806 auto fixture = CreateVideoQualityTestFixture();
807 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700808 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200809 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
810 1000000, false, "VP8", 2, 1, 400000,
811 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100812 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700813 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
814 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200815 screenshare.config->loss_percent = 5;
816 screenshare.config->link_capacity_kbps = 200;
817 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700818
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200819 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700820}
821
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
823 auto fixture = CreateVideoQualityTestFixture();
824 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700825 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200826 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
827 1000000, false, "VP8", 2, 1, 400000,
828 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100829 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700830 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
831 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200832 screenshare.config->loss_percent = 1;
833 screenshare.config->link_capacity_kbps = 1200;
834 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700835
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200836 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700837}
838
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200839const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000840 true, 1280, 720, 30, 800000,
841 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200842 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800843
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200844const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000845 true, 1280, 720, 30, 800000,
846 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200847 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800848
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200849const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000850 true, 640, 360, 30, 150000,
851 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200852 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800853
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200854const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000855 true, 320, 180, 30, 30000,
856 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200857 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800858
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100859#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200860TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
861 auto fixture = CreateVideoQualityTestFixture();
862 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700863 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100864 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
865 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200866 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100867 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700868 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
869 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200870 screenshare.ss[0] = {
871 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
872 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200873 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000874}
ilnik2a8c2f52017-02-15 02:23:28 -0800875
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200876TEST(FullStackTest, VP9SVC_3SL_High) {
877 auto fixture = CreateVideoQualityTestFixture();
878 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800879 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100880 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800881 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
882 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200883
Sergey Silkin57027362018-05-15 09:12:05 +0200884 simulcast.ss[0] = {
885 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
886 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200887 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800888}
889
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200890TEST(FullStackTest, VP9SVC_3SL_Medium) {
891 auto fixture = CreateVideoQualityTestFixture();
892 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800893 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100894 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800895 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
896 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200897 simulcast.ss[0] = {
898 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
899 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200900 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800901}
902
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200903TEST(FullStackTest, VP9SVC_3SL_Low) {
904 auto fixture = CreateVideoQualityTestFixture();
905 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800906 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100907 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800908 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200909 simulcast.ss[0] = {
910 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
911 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200912 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800913}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200914
Sergey Silkin7f978f12018-09-10 12:01:49 +0000915// bugs.webrtc.org/9506
916#if !defined(WEBRTC_MAC)
917
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200918TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200919 webrtc::test::ScopedFieldTrials override_trials(
920 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200921 auto fixture = CreateVideoQualityTestFixture();
922 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200923 simulcast.call.send_side_bwe = true;
924 simulcast.video[0] = kSvcVp9Video;
925 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
926 kFullStackTestDurationSecs};
927 simulcast.ss[0] = {
928 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
929 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200930 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200931}
932
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200933TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200934 webrtc::test::ScopedFieldTrials override_trials(
935 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200936 auto fixture = CreateVideoQualityTestFixture();
937 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200938 simulcast.call.send_side_bwe = true;
939 simulcast.video[0] = kSvcVp9Video;
940 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
941 kFullStackTestDurationSecs};
942 simulcast.ss[0] = {
943 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
944 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200945 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200946}
947
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200949 webrtc::test::ScopedFieldTrials override_trials(
950 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200951 auto fixture = CreateVideoQualityTestFixture();
952 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200953 simulcast.call.send_side_bwe = true;
954 simulcast.video[0] = kSvcVp9Video;
955 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
956 kFullStackTestDurationSecs};
957 simulcast.ss[0] = {
958 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
959 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200960 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200961}
“Michael277a6562018-06-01 14:09:19 -0500962
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200963TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200964 webrtc::test::ScopedFieldTrials override_trials(
965 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200966 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200967 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500968 simulcast.call.send_side_bwe = true;
969 simulcast.video[0] = kSvcVp9Video;
970 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
971 kFullStackTestDurationSecs};
972 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200973 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500974 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200975 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200976 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200977 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500978}
Erik Språngd3438aa2018-11-08 16:56:43 +0100979
980// TODO(webrtc:9722): Remove when experiment is cleaned up.
981TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
982 webrtc::test::ScopedFieldTrials override_trials(
983 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
984 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
985 auto fixture = CreateVideoQualityTestFixture();
986 ParamsWithLogging simulcast;
987 simulcast.call.send_side_bwe = true;
988 simulcast.video[0] = kSvcVp9Video;
989 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
990 0.0, 0.0, kFullStackTestDurationSecs};
991 simulcast.ss[0] = {
992 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
993 std::vector<SpatialLayer>(), false};
994 simulcast.config->link_capacity_kbps = 1000;
995 simulcast.config->queue_delay_ms = 100;
996 fixture->RunWithAnalyzer(simulcast);
997}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000998#endif // !defined(WEBRTC_MAC)
999
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001000#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001001
ilnik6b826ef2017-06-16 06:53:48 -07001002// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001003// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1004#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -07001005#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
1006#else
1007#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
1008#endif
1009
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001010TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
1011 auto fixture = CreateVideoQualityTestFixture();
1012 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001013 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001014 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
1015 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001016 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001017 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1018 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001019 simulcast.config->loss_percent = 0;
1020 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001021 std::vector<VideoStream> streams = {
1022 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1023 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1024 VideoQualityTest::DefaultVideoStream(simulcast, 0)
1025 };
Sergey Silkin57027362018-05-15 09:12:05 +02001026 simulcast.ss[0] = {
1027 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1028 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001029 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1030 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001031 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001032}
1033
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001034TEST(FullStackTest, SimulcastVP8_3SL_High) {
1035 auto fixture = CreateVideoQualityTestFixture();
1036 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001037 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001038 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001039 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001040 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001041 simulcast.config->loss_percent = 0;
1042 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001043 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001044 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001045 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001046 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001047 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001048 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001049
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001050 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001051 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1052 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1053 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001054 simulcast.ss[0] = {
1055 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1056 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001057 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001058}
1059
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001060TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1061 auto fixture = CreateVideoQualityTestFixture();
1062 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001063 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001064 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001065 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001066 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001067 simulcast.config->loss_percent = 0;
1068 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001069 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001070 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001071 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001072 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001073 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001074 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001075
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001076 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001077 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1078 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1079 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001080 simulcast.ss[0] = {
1081 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1082 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001083 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001084}
1085
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001086TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1087 auto fixture = CreateVideoQualityTestFixture();
1088 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001089 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001090 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001091 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001092 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001093 simulcast.config->loss_percent = 0;
1094 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001095 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001096 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001097 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001098 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001099 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001100 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001101
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001102 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001103 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1104 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1105 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001106 simulcast.ss[0] = {
1107 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1108 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001109 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001110}
1111
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001112// This test assumes ideal network conditions with target bandwidth being
1113// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1114// Android32 bots can't handle this high bitrate, so disable test for those.
1115#if defined(WEBRTC_ANDROID)
Emircan Uysaler62f55322019-01-16 17:48:47 -05001116#define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001117#else
1118#define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec
1119#endif // defined(WEBRTC_ANDROID)
1120TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) {
1121 auto fixture = CreateVideoQualityTestFixture();
1122 const int target_bitrate = 100000000;
1123 ParamsWithLogging generator;
1124 generator.call.send_side_bwe = true;
1125 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1126 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1127 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1128 generator.video[0] = {true,
1129 360,
1130 240,
1131 30,
1132 target_bitrate / 2,
1133 target_bitrate,
1134 target_bitrate * 2,
1135 false,
1136 "FakeCodec",
1137 1,
1138 0,
1139 0,
1140 false,
1141 false,
1142 false,
1143 "Generator"};
1144 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1145 kFullStackTestDurationSecs};
1146 fixture->RunWithAnalyzer(generator);
1147}
1148
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001149TEST(FullStackTest, LargeRoomVP8_5thumb) {
1150 auto fixture = CreateVideoQualityTestFixture();
1151 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001152 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001153 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001154 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1155 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001156 large_room.config->loss_percent = 0;
1157 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001158 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001159 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001160 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001161 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001162 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001163 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001164
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001165 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001166 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1167 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1168 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001169 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001170 large_room.ss[0] = {
1171 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1172 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001173 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001174}
1175
oprypin743117f2017-09-15 05:24:24 -07001176#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1177// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001178// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1179#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001180#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001181#else
1182#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001183#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001184#endif
1185
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001186TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1187 auto fixture = CreateVideoQualityTestFixture();
1188 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001189 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001190 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001191 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1192 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001193 large_room.config->loss_percent = 0;
1194 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001195 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001196 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001197 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001198 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001199 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001200 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001201
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001202 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001203 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1204 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1205 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001206 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001207 large_room.ss[0] = {
1208 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1209 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001210 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001211}
1212
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001213TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1214 auto fixture = CreateVideoQualityTestFixture();
1215 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001216 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001217 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001218 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1219 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001220 large_room.config->loss_percent = 0;
1221 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001222 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001223 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001224 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001225 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001226 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001227 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001228
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001229 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001230 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1231 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1232 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001233 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001234 large_room.ss[0] = {
1235 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1236 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001237 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001238}
1239
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001240INSTANTIATE_TEST_SUITE_P(
1241 FullStackTest,
1242 GenericDescriptorTest,
1243 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1244 "WebRTC-GenericDescriptor/Enabled/"));
philipeldd8b0d82018-09-27 11:18:10 +02001245
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001246class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001247
1248// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001249// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1250#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001251TEST_P(DualStreamsTest,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001252 ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) {
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001253 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001254 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1255 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001256 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001257 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001258
1259 // Screenshare Settings.
1260 dual_streams.screenshare[first_stream] = {true, false, 10};
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +01001261 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
1262 2500000, false, "VP8", 2, 1, 400000,
1263 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001264
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001265 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001266 screenshare_params_high.video[0] = {
1267 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
1268 "VP8", 2, 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001269 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001270 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +02001271 1000000, false, "VP8", 2, 0, 400000,
1272 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001273 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001274 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1275 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001276
Sergey Silkin57027362018-05-15 09:12:05 +02001277 dual_streams.ss[first_stream] = {
1278 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1279 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001280
1281 // Video settings.
1282 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1283
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001284 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001285 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001286 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001287 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001288 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001289 video_params_low.video[0] = kSimulcastVp8VideoLow;
1290 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001291 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1292 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1293 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001294
1295 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001296 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1297 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001298
1299 // Call settings.
1300 dual_streams.call.send_side_bwe = true;
1301 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001302 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1303 std::to_string(first_stream);
1304 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001305 dual_streams.config->loss_percent = 1;
1306 dual_streams.config->link_capacity_kbps = 7500;
1307 dual_streams.config->queue_length_packets = 30;
1308 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001309
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001310 auto fixture = CreateVideoQualityTestFixture();
1311 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001312}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001313#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1314 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001315
1316TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001317 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001318 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001319 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001320 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001321
1322 // Screenshare Settings.
1323 dual_streams.screenshare[first_stream] = {true, false, 10};
1324 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1325 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001326 2, 400000, false, false, false,
1327 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001328 // Video settings.
1329 dual_streams.video[1 - first_stream] = {
1330 true, 1280, 720, 30, 150000,
1331 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001332 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001333
1334 // Call settings.
1335 dual_streams.call.send_side_bwe = true;
1336 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001337 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1338 std::to_string(first_stream);
1339 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001340 dual_streams.config->loss_percent = 1;
1341 dual_streams.config->link_capacity_kbps = 5000;
1342 dual_streams.config->queue_length_packets = 30;
1343 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001344
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001345 auto fixture = CreateVideoQualityTestFixture();
1346 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001347}
1348
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001349INSTANTIATE_TEST_SUITE_P(FullStackTest,
1350 DualStreamsTest,
1351 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001352
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001353} // namespace webrtc