blob: f65869ee8683ddb4988be817b59285bedecc5c37 [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;
Yves Gerey33687212019-03-09 09:50:21 +0000127 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;
Yves Gerey33687212019-03-09 09:50:21 +0000139 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;
Yves Gerey33687212019-03-09 09:50:21 +0000180 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;
Yves Gerey33687212019-03-09 09:50:21 +0000213 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;
Yves Gerey33687212019-03-09 09:50:21 +0000226 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;
Yves Gerey33687212019-03-09 09:50:21 +0000239 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;
Yves Gerey33687212019-03-09 09:50:21 +0000257 foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000,
258 false, "VP8", 1, 0, 0, false, false,
259 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;
Yves Gerey33687212019-03-09 09:50:21 +0000272 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
273 500000, 2000000, false, "VP8", 1,
274 0, 0, false, false, true, "foreman_cif"};
Niels Möller6aa415e2018-06-07 11:14:13 +0200275 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;
Yves Gerey33687212019-03-09 09:50:21 +0000287 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};
Erik Språng616b2332019-02-11 14:16:28 +0100290 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
Erik Språng8b8d01a2019-03-02 20:54:55 +0100299// Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
300// Packet rate and loss are low enough that loss will happen with ~3s interval.
301// This triggers protection overhead to toggle between zero and non-zero.
302// Link queue is restrictive enough to trigger loss on probes.
303TEST(FullStackTest, ForemanCifMediaCapacitySmallLossAndQueue) {
304 auto fixture = CreateVideoQualityTestFixture();
305 ParamsWithLogging foreman_cif;
306 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000307 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
308 false, "VP8", 1, 0, 0, false, false,
309 true, "foreman_cif", 0, {}, 1.30};
Erik Språng8b8d01a2019-03-02 20:54:55 +0100310 foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
311 0.0, 0.0, kFullStackTestDurationSecs};
312 foreman_cif.config->link_capacity_kbps = 250;
313 foreman_cif.config->queue_length_packets = 10;
314 foreman_cif.config->queue_delay_ms = 100;
315 foreman_cif.config->loss_percent = 1;
316 fixture->RunWithAnalyzer(foreman_cif);
317}
318
philipeldd8b0d82018-09-27 11:18:10 +0200319TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200320 auto fixture = CreateVideoQualityTestFixture();
321 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700322 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000323 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
324 false, "VP8", 1, 0, 0, false, false,
325 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200326 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000327 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200328 foreman_cif.config->loss_percent = 5;
329 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200330 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200331 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000332}
333
philipeldd8b0d82018-09-27 11:18:10 +0200334TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200335 auto fixture = CreateVideoQualityTestFixture();
336 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800337 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000338 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
339 false, "VP8", 1, 0, 0, true, false,
340 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200341 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
342 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200343 foreman_cif.config->loss_percent = 5;
344 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200345 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200346 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800347}
348
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200349TEST(FullStackTest, ForemanCifPlr5Flexfec) {
350 auto fixture = CreateVideoQualityTestFixture();
351 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800352 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000353 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
354 false, "VP8", 1, 0, 0, false, true,
355 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800356 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
357 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200358 foreman_cif.config->loss_percent = 5;
359 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200360 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800361}
362
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200363TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
364 auto fixture = CreateVideoQualityTestFixture();
365 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700366 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000367 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
368 false, "VP8", 1, 0, 0, false, true,
369 true, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700370 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
371 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200372 foreman_cif.config->loss_percent = 3;
373 foreman_cif.config->link_capacity_kbps = 500;
374 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200375 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700376}
377
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200378TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
379 auto fixture = CreateVideoQualityTestFixture();
380 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700381 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000382 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
383 false, "VP8", 1, 0, 0, true, false,
384 true, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700385 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
386 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200387 foreman_cif.config->loss_percent = 3;
388 foreman_cif.config->link_capacity_kbps = 500;
389 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200390 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700391}
392
brandtrdd369c62016-11-16 23:56:57 -0800393#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200394TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
395 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800396 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200397 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800398 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000399 foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000,
400 false, "H264", 1, 0, 0, false, false,
401 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800402 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
403 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200404 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800405}
406
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200407TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
408 auto fixture = CreateVideoQualityTestFixture();
409 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800410 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000411 foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000,
412 false, "H264", 1, 0, 0, false, false,
413 true, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800414 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
415 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200416 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800417}
418
philipeldd8b0d82018-09-27 11:18:10 +0200419TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200420 auto fixture = CreateVideoQualityTestFixture();
421 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800422 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000423 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
424 false, "H264", 1, 0, 0, false, false,
425 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200426 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
427 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200428 foreman_cif.config->loss_percent = 5;
429 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200430 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200431 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800432}
433
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200434TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100435 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200436 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100437 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100438
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200439 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100440 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000441 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
442 false, "H264", 1, 0, 0, false, false,
443 true, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100444 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
445 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200446 foreman_cif.config->loss_percent = 5;
447 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200448 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100449}
450
brandtrdd369c62016-11-16 23:56:57 -0800451// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200452TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
453 auto fixture = CreateVideoQualityTestFixture();
454 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800455 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000456 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
457 false, "H264", 1, 0, 0, false, true,
458 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800459 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
460 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200461 foreman_cif.config->loss_percent = 5;
462 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200463 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800464}
465
466// Ulpfec with H264 is an unsupported combination, so this test is only useful
467// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200468TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
469 auto fixture = CreateVideoQualityTestFixture();
470 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800471 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000472 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
473 false, "H264", 1, 0, 0, true, false,
474 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800475 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
476 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200477 foreman_cif.config->loss_percent = 5;
478 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200479 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800480}
481#endif // defined(WEBRTC_USE_H264)
482
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200483TEST(FullStackTest, ForemanCif500kbps) {
484 auto fixture = CreateVideoQualityTestFixture();
485 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700486 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000487 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
488 false, "VP8", 1, 0, 0, false, false,
489 true, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700490 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
491 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200492 foreman_cif.config->queue_length_packets = 0;
493 foreman_cif.config->queue_delay_ms = 0;
494 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200495 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000496}
497
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200498TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
499 auto fixture = CreateVideoQualityTestFixture();
500 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700501 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000502 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
503 false, "VP8", 1, 0, 0, false, false,
504 true, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700505 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
506 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200507 foreman_cif.config->queue_length_packets = 32;
508 foreman_cif.config->queue_delay_ms = 0;
509 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200510 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000511}
512
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200513TEST(FullStackTest, ForemanCif500kbps100ms) {
514 auto fixture = CreateVideoQualityTestFixture();
515 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700516 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000517 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
518 false, "VP8", 1, 0, 0, false, false,
519 true, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700520 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
521 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200522 foreman_cif.config->queue_length_packets = 0;
523 foreman_cif.config->queue_delay_ms = 100;
524 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200525 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000526}
527
philipeldd8b0d82018-09-27 11:18:10 +0200528TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200529 auto fixture = CreateVideoQualityTestFixture();
530 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700531 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000532 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
533 false, "VP8", 1, 0, 0, false, false,
534 true, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200535 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
536 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200537 foreman_cif.config->queue_length_packets = 32;
538 foreman_cif.config->queue_delay_ms = 100;
539 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200540 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200541 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700542}
543
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200544TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
545 auto fixture = CreateVideoQualityTestFixture();
546 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800547 foreman_cif.call.send_side_bwe = false;
Yves Gerey33687212019-03-09 09:50:21 +0000548 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000,
549 false, "VP8", 1, 0, 0, false, false,
550 true, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800551 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
552 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200553 foreman_cif.config->queue_length_packets = 32;
554 foreman_cif.config->queue_delay_ms = 100;
555 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200556 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000557}
558
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200559TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
560 auto fixture = CreateVideoQualityTestFixture();
561 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700562 foreman_cif.call.send_side_bwe = true;
Yves Gerey33687212019-03-09 09:50:21 +0000563 foreman_cif.video[0] = {true, 352, 288, 30, 30000, 2000000, 2000000,
564 false, "VP8", 1, 0, 0, false, false,
565 true, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700566 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
567 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200568 foreman_cif.config->queue_length_packets = 32;
569 foreman_cif.config->queue_delay_ms = 100;
570 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200571 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000572}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000573
sprangff19d352017-09-06 07:14:02 -0700574// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200575TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
576 auto fixture = CreateVideoQualityTestFixture();
577 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700578 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100579 conf_motion_hd.video[0] = {
Yves Gerey33687212019-03-09 09:50:21 +0000580 true, 1280, 720, 50, 30000,
581 3000000, 3000000, false, "VP8", 1,
582 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700583 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
584 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200585 conf_motion_hd.config->queue_length_packets = 32;
586 conf_motion_hd.config->queue_delay_ms = 100;
587 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200588 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700589}
590
Erik Språngd3438aa2018-11-08 16:56:43 +0100591// TODO(webrtc:9722): Remove when experiment is cleaned up.
592TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
593 test::ScopedFieldTrials override_field_trials(
594 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200595 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100596
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200597 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700598 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100599 conf_motion_hd.video[0] = {
Yves Gerey33687212019-03-09 09:50:21 +0000600 true, 1280, 720, 50, 30000,
601 3000000, 3000000, false, "VP8", 1,
602 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Erik Språngd3438aa2018-11-08 16:56:43 +0100603 conf_motion_hd.analyzer = {
604 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
605 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200606 conf_motion_hd.config->queue_length_packets = 50;
607 conf_motion_hd.config->loss_percent = 3;
608 conf_motion_hd.config->queue_delay_ms = 100;
609 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200610 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700611}
612
philipeldd8b0d82018-09-27 11:18:10 +0200613TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200614 auto fixture = CreateVideoQualityTestFixture();
615 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700616 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100617 conf_motion_hd.video[0] = {
Yves Gerey33687212019-03-09 09:50:21 +0000618 true, 1280, 720, 50, 30000,
619 3000000, 3000000, false, "VP8", 2,
620 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200621 conf_motion_hd.analyzer = {
622 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
623 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200624 conf_motion_hd.config->queue_length_packets = 50;
625 conf_motion_hd.config->loss_percent = 3;
626 conf_motion_hd.config->queue_delay_ms = 100;
627 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200628 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200629 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700630}
631
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200632TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
633 auto fixture = CreateVideoQualityTestFixture();
634 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700635 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100636 conf_motion_hd.video[0] = {
Yves Gerey33687212019-03-09 09:50:21 +0000637 true, 1280, 720, 50, 30000,
638 3000000, 3000000, false, "VP8", 3,
639 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700640 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
641 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200642 conf_motion_hd.config->queue_length_packets = 50;
643 conf_motion_hd.config->loss_percent = 3;
644 conf_motion_hd.config->queue_delay_ms = 100;
645 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200646 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700647}
648
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200649TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
650 auto fixture = CreateVideoQualityTestFixture();
651 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700652 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100653 conf_motion_hd.video[0] = {
Yves Gerey33687212019-03-09 09:50:21 +0000654 true, 1280, 720, 50, 30000,
655 3000000, 3000000, false, "VP8", 4,
656 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700657 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
658 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200659 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;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200663 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700664}
665
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200666TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200667 test::ScopedFieldTrials field_trial(
668 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100669 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200670 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700671 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100672 conf_motion_hd.video[0] = {
Yves Gerey33687212019-03-09 09:50:21 +0000673 true, 1280, 720, 50,
674 30000, 3000000, 3000000, false,
675 "VP8", 3, -1, 0,
676 false, false, false, "ConferenceMotion_1280_720_50"};
Rasmus Brandt35836932018-10-23 09:17:24 +0200677 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
678 0.0, 0.0, kFullStackTestDurationSecs};
679 conf_motion_hd.config->queue_length_packets = 50;
680 conf_motion_hd.config->loss_percent = 3;
681 conf_motion_hd.config->queue_delay_ms = 100;
682 conf_motion_hd.config->link_capacity_kbps = 2000;
683 fixture->RunWithAnalyzer(conf_motion_hd);
684}
685
686TEST(FullStackTest,
687 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
688 auto fixture = CreateVideoQualityTestFixture();
689 test::ScopedFieldTrials field_trial(
690 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
691 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
692 ParamsWithLogging conf_motion_hd;
693 conf_motion_hd.call.send_side_bwe = true;
694 conf_motion_hd.video[0] = {
Yves Gerey33687212019-03-09 09:50:21 +0000695 true, 1280, 720, 50, 30000,
696 3000000, 3000000, false, "VP8", 3,
697 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Rasmus Brandt35836932018-10-23 09:17:24 +0200698 conf_motion_hd.analyzer = {
699 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
700 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200701 conf_motion_hd.config->queue_length_packets = 50;
702 conf_motion_hd.config->loss_percent = 3;
703 conf_motion_hd.config->queue_delay_ms = 100;
704 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200705 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700706}
707
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100708#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200709TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
710 auto fixture = CreateVideoQualityTestFixture();
711 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800712 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100713 conf_motion_hd.video[0] = {
Yves Gerey33687212019-03-09 09:50:21 +0000714 true, 1280, 720, 50, 30000,
715 3000000, 3000000, false, "VP9", 1,
716 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800717 conf_motion_hd.analyzer = {
718 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
719 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200720 conf_motion_hd.config->queue_length_packets = 32;
721 conf_motion_hd.config->queue_delay_ms = 100;
722 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200723 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800724}
725#endif
726
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200727TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
728 auto fixture = CreateVideoQualityTestFixture();
729 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700730 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200731 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
732 1000000, false, "VP8", 2, 1, 400000,
733 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100734 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700735 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
736 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200737 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200738}
739
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200740#if !defined(WEBRTC_MAC)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100741// All the tests using this constant are disabled on Mac.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200742const char kScreenshareSimulcastExperiment[] =
743 "WebRTC-SimulcastScreenshare/Enabled/";
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100744// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
745#if !defined(WEBRTC_WIN)
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100746const char kScreenshareSimulcastVariableFramerateExperiment[] =
747 "WebRTC-SimulcastScreenshare/Enabled/"
748 "WebRTC-VP8VariableFramerateScreenshare/"
749 "Enabled,min_fps:5.0,min_qp:15,undershoot:30/";
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100750TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100751 test::ScopedFieldTrials field_trial(
752 AppendFieldTrials(kScreenshareSimulcastExperiment));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200753 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200754 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800755 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100756 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100757 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100758 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100759 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800760 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
761 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200762 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100763 screenshare_params_high.video[0] = {
764 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
765 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800766 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100767 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200768 1000000, false, "VP8", 2, 0, 400000,
769 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800770
771 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200772 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
773 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200774 screenshare.ss[0] = {
775 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
776 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200777 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800778}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100779
780TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_Variable_Framerate) {
781 test::ScopedFieldTrials field_trial(
782 AppendFieldTrials(kScreenshareSimulcastVariableFramerateExperiment));
783 auto fixture = CreateVideoQualityTestFixture();
784 ParamsWithLogging screenshare;
785 screenshare.call.send_side_bwe = true;
786 screenshare.screenshare[0] = {true, false, 10};
787 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
788 2500000, false, "VP8", 2, 1, 400000,
789 false, false, false, ""};
790 screenshare.analyzer = {"screenshare_slides_simulcast_variable_framerate",
791 0.0, 0.0, kFullStackTestDurationSecs};
792 ParamsWithLogging screenshare_params_high;
793 screenshare_params_high.video[0] = {
794 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
795 "VP8", 2, 0, 400000, false, false, false, ""};
796 VideoQualityTest::Params screenshare_params_low;
797 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
798 1000000, false, "VP8", 2, 0, 400000,
799 false, false, false, ""};
800
801 std::vector<VideoStream> streams = {
802 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
803 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
804 screenshare.ss[0] = {
805 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
806 false};
807 fixture->RunWithAnalyzer(screenshare);
808}
Ilya Nikolaevskiy9699f092019-03-12 14:02:26 +0100809
810TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_low) {
811 test::ScopedFieldTrials field_trial(
812 AppendFieldTrials(kScreenshareSimulcastExperiment));
813 auto fixture = CreateVideoQualityTestFixture();
814 ParamsWithLogging screenshare;
815 screenshare.call.send_side_bwe = true;
816 screenshare.screenshare[0] = {true, false, 10};
817 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
818 2500000, false, "VP8", 2, 1, 400000,
819 false, false, false, ""};
820 screenshare.analyzer = {"screenshare_slides_simulcast_low", 0.0, 0.0,
821 kFullStackTestDurationSecs};
822 VideoQualityTest::Params screenshare_params_high;
823 screenshare_params_high.video[0] = {
824 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
825 "VP8", 2, 0, 400000, false, false, false, ""};
826 VideoQualityTest::Params screenshare_params_low;
827 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
828 1000000, false, "VP8", 2, 0, 400000,
829 false, false, false, ""};
830
831 std::vector<VideoStream> streams = {
832 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
833 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
834 screenshare.ss[0] = {
835 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
836 false};
837 fixture->RunWithAnalyzer(screenshare);
838}
839
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100840#endif // !defined(WEBRTC_WIN)
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200841#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800842
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200843TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
844 auto fixture = CreateVideoQualityTestFixture();
845 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700846 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200847 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
848 1000000, false, "VP8", 2, 1, 400000,
849 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100850 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700851 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
852 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200853 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700854}
855
philipeldd8b0d82018-09-27 11:18:10 +0200856TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200857 auto fixture = CreateVideoQualityTestFixture();
858 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700859 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200860 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
861 1000000, false, "VP8", 2, 1, 400000,
862 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100863 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200864 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000865 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200866 screenshare.config->loss_percent = 5;
867 screenshare.config->queue_delay_ms = 200;
868 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200869 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200870 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800871}
872
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200873TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
874 auto fixture = CreateVideoQualityTestFixture();
875 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700876 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200877 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
878 1000000, false, "VP8", 2, 1, 400000,
879 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100880 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700881 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
882 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200883 screenshare.config->loss_percent = 10;
884 screenshare.config->queue_delay_ms = 200;
885 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200886 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800887}
888
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200889TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
890 auto fixture = CreateVideoQualityTestFixture();
891 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700892 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200893 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
894 1000000, false, "VP8", 2, 1, 400000,
895 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100896 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700897 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
898 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200899 screenshare.config->loss_percent = 5;
900 screenshare.config->link_capacity_kbps = 200;
901 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700902
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200903 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700904}
905
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200906TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
907 auto fixture = CreateVideoQualityTestFixture();
908 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700909 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200910 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
911 1000000, false, "VP8", 2, 1, 400000,
912 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100913 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700914 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
915 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200916 screenshare.config->loss_percent = 1;
917 screenshare.config->link_capacity_kbps = 1200;
918 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700919
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200920 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700921}
922
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200923const ParamsWithLogging::Video kSvcVp9Video = {
Yves Gerey33687212019-03-09 09:50:21 +0000924 true, 1280, 720, 30, 800000,
925 2500000, 2500000, false, "VP9", 3,
926 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800927
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200928const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Yves Gerey33687212019-03-09 09:50:21 +0000929 true, 1280, 720, 30, 800000,
930 2500000, 2500000, false, "VP8", 3,
931 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800932
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200933const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Yves Gerey33687212019-03-09 09:50:21 +0000934 true, 640, 360, 30, 150000,
935 500000, 700000, false, "VP8", 3,
936 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800937
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200938const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Yves Gerey33687212019-03-09 09:50:21 +0000939 true, 320, 180, 30, 30000,
940 150000, 200000, false, "VP8", 3,
941 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800942
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100943#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100944
945TEST(FullStackTest, ScreenshareSlidesVP9_3SL_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200946 auto fixture = CreateVideoQualityTestFixture();
947 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700948 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100949 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
950 2000000, false, "VP9", 1, 0, 400000,
951 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100952 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100953 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -0700954 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200955 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +0100956 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
957 std::vector<SpatialLayer>(), true};
958 fixture->RunWithAnalyzer(screenshare);
959}
960
961TEST(FullStackTest, ScreenshareSlidesVP9_3SL_Variable_Fps) {
962 webrtc::test::ScopedFieldTrials override_trials(
963 AppendFieldTrials("WebRTC-VP9VariableFramerateScreenshare/"
964 "Enabled,min_qp:32,min_fps:5.0,undershoot:30,frames_"
965 "before_steady_state:5/"));
966 auto fixture = CreateVideoQualityTestFixture();
967 ParamsWithLogging screenshare;
968 screenshare.call.send_side_bwe = true;
969 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
970 2000000, false, "VP9", 1, 0, 400000,
971 false, false, false, ""};
972 screenshare.screenshare[0] = {true, false, 10};
973 screenshare.analyzer = {"screenshare_slides_vp9_3sl_variable_fps", 0.0, 0.0,
974 kFullStackTestDurationSecs};
975 screenshare.ss[0] = {
976 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
977 std::vector<SpatialLayer>(), true};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200978 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000979}
ilnik2a8c2f52017-02-15 02:23:28 -0800980
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200981TEST(FullStackTest, VP9SVC_3SL_High) {
982 auto fixture = CreateVideoQualityTestFixture();
983 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800984 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100985 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800986 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
987 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200988
Sergey Silkin57027362018-05-15 09:12:05 +0200989 simulcast.ss[0] = {
990 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
991 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200992 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800993}
994
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200995TEST(FullStackTest, VP9SVC_3SL_Medium) {
996 auto fixture = CreateVideoQualityTestFixture();
997 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800998 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100999 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -08001000 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
1001 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001002 simulcast.ss[0] = {
1003 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
1004 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001005 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001006}
1007
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001008TEST(FullStackTest, VP9SVC_3SL_Low) {
1009 auto fixture = CreateVideoQualityTestFixture();
1010 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001011 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001012 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -08001013 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001014 simulcast.ss[0] = {
1015 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
1016 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001017 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001018}
Sergey Silkin0643fd62018-05-17 12:50:53 +02001019
Sergey Silkin7f978f12018-09-10 12:01:49 +00001020// bugs.webrtc.org/9506
1021#if !defined(WEBRTC_MAC)
1022
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001023TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001024 webrtc::test::ScopedFieldTrials override_trials(
1025 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001026 auto fixture = CreateVideoQualityTestFixture();
1027 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001028 simulcast.call.send_side_bwe = true;
1029 simulcast.video[0] = kSvcVp9Video;
1030 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
1031 kFullStackTestDurationSecs};
1032 simulcast.ss[0] = {
1033 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
1034 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001035 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001036}
1037
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001038TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001039 webrtc::test::ScopedFieldTrials override_trials(
1040 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001041 auto fixture = CreateVideoQualityTestFixture();
1042 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001043 simulcast.call.send_side_bwe = true;
1044 simulcast.video[0] = kSvcVp9Video;
1045 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
1046 kFullStackTestDurationSecs};
1047 simulcast.ss[0] = {
1048 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
1049 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001050 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001051}
1052
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001053TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001054 webrtc::test::ScopedFieldTrials override_trials(
1055 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001056 auto fixture = CreateVideoQualityTestFixture();
1057 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001058 simulcast.call.send_side_bwe = true;
1059 simulcast.video[0] = kSvcVp9Video;
1060 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
1061 kFullStackTestDurationSecs};
1062 simulcast.ss[0] = {
1063 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1064 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001065 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001066}
“Michael277a6562018-06-01 14:09:19 -05001067
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001068TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001069 webrtc::test::ScopedFieldTrials override_trials(
1070 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001071 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +02001072 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -05001073 simulcast.call.send_side_bwe = true;
1074 simulcast.video[0] = kSvcVp9Video;
1075 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1076 kFullStackTestDurationSecs};
1077 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001078 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -05001079 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +02001080 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +02001081 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001082 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -05001083}
Erik Språngd3438aa2018-11-08 16:56:43 +01001084
1085// TODO(webrtc:9722): Remove when experiment is cleaned up.
1086TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
1087 webrtc::test::ScopedFieldTrials override_trials(
1088 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1089 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
1090 auto fixture = CreateVideoQualityTestFixture();
1091 ParamsWithLogging simulcast;
1092 simulcast.call.send_side_bwe = true;
1093 simulcast.video[0] = kSvcVp9Video;
1094 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1095 0.0, 0.0, kFullStackTestDurationSecs};
1096 simulcast.ss[0] = {
1097 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1098 std::vector<SpatialLayer>(), false};
1099 simulcast.config->link_capacity_kbps = 1000;
1100 simulcast.config->queue_delay_ms = 100;
1101 fixture->RunWithAnalyzer(simulcast);
1102}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001103#endif // !defined(WEBRTC_MAC)
1104
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001105#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001106
ilnik6b826ef2017-06-16 06:53:48 -07001107// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001108// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1109#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -07001110#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
1111#else
1112#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
1113#endif
1114
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001115TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
1116 auto fixture = CreateVideoQualityTestFixture();
1117 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001118 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001119 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
1120 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001121 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001122 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1123 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001124 simulcast.config->loss_percent = 0;
1125 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001126 std::vector<VideoStream> streams = {
1127 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1128 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1129 VideoQualityTest::DefaultVideoStream(simulcast, 0)
1130 };
Sergey Silkin57027362018-05-15 09:12:05 +02001131 simulcast.ss[0] = {
1132 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1133 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001134 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1135 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001136 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001137}
1138
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001139TEST(FullStackTest, SimulcastVP8_3SL_High) {
1140 auto fixture = CreateVideoQualityTestFixture();
1141 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001142 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001143 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001144 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001145 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001146 simulcast.config->loss_percent = 0;
1147 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001148 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001149 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001150 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001151 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001152 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001153 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001154
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001155 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001156 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1157 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1158 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001159 simulcast.ss[0] = {
1160 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1161 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001162 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001163}
1164
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001165TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1166 auto fixture = CreateVideoQualityTestFixture();
1167 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001168 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001169 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001170 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001171 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001172 simulcast.config->loss_percent = 0;
1173 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001174 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001175 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001176 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001177 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001178 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001179 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001180
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001181 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001182 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1183 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1184 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001185 simulcast.ss[0] = {
1186 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1187 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001188 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001189}
1190
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001191TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1192 auto fixture = CreateVideoQualityTestFixture();
1193 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001194 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001195 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001196 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001197 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001198 simulcast.config->loss_percent = 0;
1199 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001200 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001201 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001202 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001203 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001204 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001205 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001206
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001207 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001208 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1209 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1210 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001211 simulcast.ss[0] = {
1212 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1213 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001214 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001215}
1216
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001217// This test assumes ideal network conditions with target bandwidth being
1218// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1219// Android32 bots can't handle this high bitrate, so disable test for those.
1220#if defined(WEBRTC_ANDROID)
Emircan Uysaler62f55322019-01-16 17:48:47 -05001221#define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001222#else
1223#define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec
1224#endif // defined(WEBRTC_ANDROID)
1225TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) {
1226 auto fixture = CreateVideoQualityTestFixture();
1227 const int target_bitrate = 100000000;
1228 ParamsWithLogging generator;
1229 generator.call.send_side_bwe = true;
1230 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1231 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1232 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1233 generator.video[0] = {true,
1234 360,
1235 240,
1236 30,
1237 target_bitrate / 2,
1238 target_bitrate,
1239 target_bitrate * 2,
1240 false,
1241 "FakeCodec",
1242 1,
1243 0,
1244 0,
1245 false,
1246 false,
1247 false,
1248 "Generator"};
1249 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1250 kFullStackTestDurationSecs};
1251 fixture->RunWithAnalyzer(generator);
1252}
1253
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001254TEST(FullStackTest, LargeRoomVP8_5thumb) {
1255 auto fixture = CreateVideoQualityTestFixture();
1256 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001257 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001258 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001259 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1260 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001261 large_room.config->loss_percent = 0;
1262 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001263 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001264 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001265 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001266 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001267 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001268 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001269
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001270 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001271 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1272 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1273 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001274 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001275 large_room.ss[0] = {
1276 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1277 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001278 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001279}
1280
oprypin743117f2017-09-15 05:24:24 -07001281#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1282// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001283// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1284#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001285#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001286#else
1287#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001288#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001289#endif
1290
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001291TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1292 auto fixture = CreateVideoQualityTestFixture();
1293 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001294 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001295 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001296 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1297 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001298 large_room.config->loss_percent = 0;
1299 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001300 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001301 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001302 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001303 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001304 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001305 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001306
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001307 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001308 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1309 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1310 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001311 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001312 large_room.ss[0] = {
1313 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1314 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001315 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001316}
1317
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001318TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1319 auto fixture = CreateVideoQualityTestFixture();
1320 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001321 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001322 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001323 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1324 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001325 large_room.config->loss_percent = 0;
1326 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001327 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001328 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001329 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001330 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001331 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001332 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001333
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001334 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001335 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1336 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1337 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001338 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001339 large_room.ss[0] = {
1340 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1341 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001342 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001343}
1344
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001345INSTANTIATE_TEST_SUITE_P(
1346 FullStackTest,
1347 GenericDescriptorTest,
1348 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1349 "WebRTC-GenericDescriptor/Enabled/"));
philipeldd8b0d82018-09-27 11:18:10 +02001350
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001351class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001352
1353// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001354// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1355#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001356TEST_P(DualStreamsTest,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001357 ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) {
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001358 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001359 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1360 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001361 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001362 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001363
1364 // Screenshare Settings.
1365 dual_streams.screenshare[first_stream] = {true, false, 10};
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +01001366 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
1367 2500000, false, "VP8", 2, 1, 400000,
1368 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001369
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001370 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001371 screenshare_params_high.video[0] = {
1372 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
1373 "VP8", 2, 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001374 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001375 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +02001376 1000000, false, "VP8", 2, 0, 400000,
1377 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001378 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001379 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1380 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001381
Sergey Silkin57027362018-05-15 09:12:05 +02001382 dual_streams.ss[first_stream] = {
1383 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1384 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001385
1386 // Video settings.
1387 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1388
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001389 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001390 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001391 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001392 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001393 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001394 video_params_low.video[0] = kSimulcastVp8VideoLow;
1395 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001396 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1397 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1398 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001399
1400 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001401 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1402 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001403
1404 // Call settings.
1405 dual_streams.call.send_side_bwe = true;
1406 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001407 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1408 std::to_string(first_stream);
1409 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001410 dual_streams.config->loss_percent = 1;
1411 dual_streams.config->link_capacity_kbps = 7500;
1412 dual_streams.config->queue_length_packets = 30;
1413 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001414
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001415 auto fixture = CreateVideoQualityTestFixture();
1416 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001417}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001418#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1419 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001420
1421TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001422 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001423 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001424 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001425 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001426
1427 // Screenshare Settings.
1428 dual_streams.screenshare[first_stream] = {true, false, 10};
1429 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1430 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001431 2, 400000, false, false, false,
1432 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001433 // Video settings.
1434 dual_streams.video[1 - first_stream] = {
Yves Gerey33687212019-03-09 09:50:21 +00001435 true, 1280, 720, 30, 150000,
1436 500000, 700000, false, "VP8", 3,
1437 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001438
1439 // Call settings.
1440 dual_streams.call.send_side_bwe = true;
1441 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001442 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1443 std::to_string(first_stream);
1444 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001445 dual_streams.config->loss_percent = 1;
1446 dual_streams.config->link_capacity_kbps = 5000;
1447 dual_streams.config->queue_length_packets = 30;
1448 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001449
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001450 auto fixture = CreateVideoQualityTestFixture();
1451 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001452}
1453
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001454INSTANTIATE_TEST_SUITE_P(FullStackTest,
1455 DualStreamsTest,
1456 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001457
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001458} // namespace webrtc