blob: 765ace507378aad7a96b946df3b55ffb74ad9465 [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()
105 : field_trial_(GetParam()),
106 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;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100127 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
128 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200129 0, 0, false, false, false, "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;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100139 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
140 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200141 0, 0, false, false, false, "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",
170 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
171 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;
180 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
181 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200182 0, 0, false, false, false,
183 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800184 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
185 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200186 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800187}
188
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200189TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
190 auto fixture = CreateVideoQualityTestFixture();
191
192 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700193 generator.call.send_side_bwe = true;
194 generator.video[0] = {true, 352, 288, 30, 700000,
195 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200196 0, 0, false, false, false,
197 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700198 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
199 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200200 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800201}
202
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100203#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800204
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200205#if defined(WEBRTC_LINUX)
206// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
207#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
208#else
209#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
210#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200211TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
212 auto fixture = CreateVideoQualityTestFixture();
213 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700214 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100215 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
216 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200217 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700218 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
219 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200220 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000221}
222
philipeldd8b0d82018-09-27 11:18:10 +0200223TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200224 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000225 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200226 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700227 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100228 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
229 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200230 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200231 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
232 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200233 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200234 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000235}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000236
philipeldd8b0d82018-09-27 11:18:10 +0200237TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200238 auto fixture = CreateVideoQualityTestFixture();
239 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800240 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100241 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
242 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200243 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200244 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
245 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200246 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200247 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800248}
249
Erik Språngd3438aa2018-11-08 16:56:43 +0100250// TODO(webrtc:9722): Remove when experiment is cleaned up.
251TEST_P(GenericDescriptorTest,
252 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
253 test::ScopedFieldTrials override_field_trials(
254 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
255 auto fixture = CreateVideoQualityTestFixture();
256
257 ParamsWithLogging foreman_cif;
258 foreman_cif.call.send_side_bwe = true;
259 foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000,
260 false, "VP8", 1, 0, 0, false, false,
261 false, "foreman_cif"};
262 foreman_cif.analyzer = {
263 GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"),
264 0.0, 0.0, kFullStackTestDurationSecs};
265 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
266 fixture->RunWithAnalyzer(foreman_cif);
267}
268
Niels Möller6aa415e2018-06-07 11:14:13 +0200269// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200270TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
271 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200272 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200273 foreman_cif.call.send_side_bwe = true;
274 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
275 500000, 2000000, false, "VP8", 1,
276 0, 0, false, false, true, "foreman_cif"};
277 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
278 0.0, 0.0,
279 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200280 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200281 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200282}
283
philipeldd8b0d82018-09-27 11:18:10 +0200284TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200285 auto fixture = CreateVideoQualityTestFixture();
286 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700287 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100288 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
289 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200290 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200291 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000292 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200293 foreman_cif.config->loss_percent = 5;
294 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200295 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200296 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000297}
298
philipeldd8b0d82018-09-27 11:18:10 +0200299TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200300 auto fixture = CreateVideoQualityTestFixture();
301 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800302 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100303 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
304 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200305 0, 0, true, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200306 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
307 0.0, 0.0, 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);
brandtr93c5d032016-11-30 07:50:07 -0800312}
313
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200314TEST(FullStackTest, ForemanCifPlr5Flexfec) {
315 auto fixture = CreateVideoQualityTestFixture();
316 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800317 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100318 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
319 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200320 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800321 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
322 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200323 foreman_cif.config->loss_percent = 5;
324 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200325 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800326}
327
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200328TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
329 auto fixture = CreateVideoQualityTestFixture();
330 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700331 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100332 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
333 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200334 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700335 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
336 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200337 foreman_cif.config->loss_percent = 3;
338 foreman_cif.config->link_capacity_kbps = 500;
339 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200340 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700341}
342
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200343TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
344 auto fixture = CreateVideoQualityTestFixture();
345 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700346 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100347 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
348 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200349 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700350 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 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
brandtrdd369c62016-11-16 23:56:57 -0800358#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200359TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
360 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800361 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200362 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800363 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100364 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
365 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200366 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800367 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
368 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200369 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800370}
371
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200372TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
373 auto fixture = CreateVideoQualityTestFixture();
374 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800375 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100376 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
377 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200378 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800379 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
380 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200381 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800382}
383
philipeldd8b0d82018-09-27 11:18:10 +0200384TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200385 auto fixture = CreateVideoQualityTestFixture();
386 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800387 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100388 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
389 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200390 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200391 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
392 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200393 foreman_cif.config->loss_percent = 5;
394 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200395 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200396 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800397}
398
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200399TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100400 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200401 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100402 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100403
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200404 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100405 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100406 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
407 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200408 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100409 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
410 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200411 foreman_cif.config->loss_percent = 5;
412 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200413 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100414}
415
brandtrdd369c62016-11-16 23:56:57 -0800416// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200417TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
418 auto fixture = CreateVideoQualityTestFixture();
419 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800420 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100421 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
422 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200423 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800424 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
425 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);
brandtrdd369c62016-11-16 23:56:57 -0800429}
430
431// Ulpfec with H264 is an unsupported combination, so this test is only useful
432// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200433TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
434 auto fixture = CreateVideoQualityTestFixture();
435 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800436 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100437 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
438 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200439 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800440 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
441 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200442 foreman_cif.config->loss_percent = 5;
443 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200444 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800445}
446#endif // defined(WEBRTC_USE_H264)
447
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200448TEST(FullStackTest, ForemanCif500kbps) {
449 auto fixture = CreateVideoQualityTestFixture();
450 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700451 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100452 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
453 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200454 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700455 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
456 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200457 foreman_cif.config->queue_length_packets = 0;
458 foreman_cif.config->queue_delay_ms = 0;
459 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200460 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000461}
462
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200463TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
464 auto fixture = CreateVideoQualityTestFixture();
465 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700466 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100467 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
468 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200469 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700470 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
471 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200472 foreman_cif.config->queue_length_packets = 32;
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, ForemanCif500kbps100ms) {
479 auto fixture = CreateVideoQualityTestFixture();
480 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700481 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100482 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
483 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200484 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700485 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
486 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200487 foreman_cif.config->queue_length_packets = 0;
488 foreman_cif.config->queue_delay_ms = 100;
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
philipeldd8b0d82018-09-27 11:18:10 +0200493TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200494 auto fixture = CreateVideoQualityTestFixture();
495 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700496 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100497 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
498 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200499 0, 0, false, false, false, "foreman_cif"};
philipeldd8b0d82018-09-27 11:18:10 +0200500 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
501 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200502 foreman_cif.config->queue_length_packets = 32;
503 foreman_cif.config->queue_delay_ms = 100;
504 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200505 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200506 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700507}
508
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200509TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
510 auto fixture = CreateVideoQualityTestFixture();
511 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800512 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100513 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
514 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200515 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800516 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
517 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200518 foreman_cif.config->queue_length_packets = 32;
519 foreman_cif.config->queue_delay_ms = 100;
520 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200521 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000522}
523
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200524TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
525 auto fixture = CreateVideoQualityTestFixture();
526 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700527 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100528 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
529 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200530 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700531 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
532 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 = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200536 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000537}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000538
sprangff19d352017-09-06 07:14:02 -0700539// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200540TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
541 auto fixture = CreateVideoQualityTestFixture();
542 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700543 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100544 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000545 true, 1280, 720, 50, 30000,
546 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200547 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700548 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
549 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200550 conf_motion_hd.config->queue_length_packets = 32;
551 conf_motion_hd.config->queue_delay_ms = 100;
552 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200553 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700554}
555
Erik Språngd3438aa2018-11-08 16:56:43 +0100556// TODO(webrtc:9722): Remove when experiment is cleaned up.
557TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
558 test::ScopedFieldTrials override_field_trials(
559 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200560 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100561
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200562 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700563 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100564 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000565 true, 1280, 720, 50, 30000,
566 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200567 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Erik Språngd3438aa2018-11-08 16:56:43 +0100568 conf_motion_hd.analyzer = {
569 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
570 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200571 conf_motion_hd.config->queue_length_packets = 50;
572 conf_motion_hd.config->loss_percent = 3;
573 conf_motion_hd.config->queue_delay_ms = 100;
574 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200575 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700576}
577
philipeldd8b0d82018-09-27 11:18:10 +0200578TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200579 auto fixture = CreateVideoQualityTestFixture();
580 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700581 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100582 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000583 true, 1280, 720, 50, 30000,
584 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200585 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
philipeldd8b0d82018-09-27 11:18:10 +0200586 conf_motion_hd.analyzer = {
587 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
588 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200589 conf_motion_hd.config->queue_length_packets = 50;
590 conf_motion_hd.config->loss_percent = 3;
591 conf_motion_hd.config->queue_delay_ms = 100;
592 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200593 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200594 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700595}
596
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200597TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
598 auto fixture = CreateVideoQualityTestFixture();
599 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700600 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100601 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000602 true, 1280, 720, 50, 30000,
603 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200604 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700605 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
606 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200607 conf_motion_hd.config->queue_length_packets = 50;
608 conf_motion_hd.config->loss_percent = 3;
609 conf_motion_hd.config->queue_delay_ms = 100;
610 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200611 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700612}
613
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200614TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
615 auto fixture = CreateVideoQualityTestFixture();
616 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700617 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100618 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000619 true, 1280, 720, 50, 30000,
620 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200621 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700622 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
623 0.0, 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;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200628 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700629}
630
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200631TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200632 test::ScopedFieldTrials field_trial(
633 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100634 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200635 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700636 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100637 conf_motion_hd.video[0] = {
Rasmus Brandt35836932018-10-23 09:17:24 +0200638 true, 1280, 720, 50,
639 30000, 3000000, 3000000, false,
640 "VP8", 3, -1, 0,
641 false, false, false, "ConferenceMotion_1280_720_50"};
642 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
643 0.0, 0.0, kFullStackTestDurationSecs};
644 conf_motion_hd.config->queue_length_packets = 50;
645 conf_motion_hd.config->loss_percent = 3;
646 conf_motion_hd.config->queue_delay_ms = 100;
647 conf_motion_hd.config->link_capacity_kbps = 2000;
648 fixture->RunWithAnalyzer(conf_motion_hd);
649}
650
651TEST(FullStackTest,
652 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
653 auto fixture = CreateVideoQualityTestFixture();
654 test::ScopedFieldTrials field_trial(
655 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
656 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
657 ParamsWithLogging conf_motion_hd;
658 conf_motion_hd.call.send_side_bwe = true;
659 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000660 true, 1280, 720, 50, 30000,
661 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200662 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Rasmus Brandt35836932018-10-23 09:17:24 +0200663 conf_motion_hd.analyzer = {
664 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
665 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200666 conf_motion_hd.config->queue_length_packets = 50;
667 conf_motion_hd.config->loss_percent = 3;
668 conf_motion_hd.config->queue_delay_ms = 100;
669 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200670 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700671}
672
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100673#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200674TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
675 auto fixture = CreateVideoQualityTestFixture();
676 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800677 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100678 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000679 true, 1280, 720, 50, 30000,
680 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200681 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800682 conf_motion_hd.analyzer = {
683 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
684 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200685 conf_motion_hd.config->queue_length_packets = 32;
686 conf_motion_hd.config->queue_delay_ms = 100;
687 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200688 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800689}
690#endif
691
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200692TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
693 auto fixture = CreateVideoQualityTestFixture();
694 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700695 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200696 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
697 1000000, false, "VP8", 2, 1, 400000,
698 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100699 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700700 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
701 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200702 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200703}
704
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200705// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
706#if !defined(WEBRTC_MAC)
707const char kScreenshareSimulcastExperiment[] =
708 "WebRTC-SimulcastScreenshare/Enabled/";
709
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200710TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100711 test::ScopedFieldTrials field_trial(
712 AppendFieldTrials(kScreenshareSimulcastExperiment));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200713 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200714 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800715 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100716 screenshare.screenshare[0] = {true, false, 10};
717 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
718 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200719 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800720 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
721 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200722 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200723 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
724 1000000, false, "VP8", 3, 0, 400000,
725 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800726 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200727 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
728 1000000, false, "VP8", 2, 0, 400000,
729 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800730
731 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200732 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
733 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200734 screenshare.ss[0] = {
735 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
736 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200737 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800738}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200739#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800740
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200741TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
742 auto fixture = CreateVideoQualityTestFixture();
743 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700744 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200745 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
746 1000000, false, "VP8", 2, 1, 400000,
747 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100748 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700749 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
750 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200751 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700752}
753
philipeldd8b0d82018-09-27 11:18:10 +0200754TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200755 auto fixture = CreateVideoQualityTestFixture();
756 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700757 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200758 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
759 1000000, false, "VP8", 2, 1, 400000,
760 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100761 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200762 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000763 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200764 screenshare.config->loss_percent = 5;
765 screenshare.config->queue_delay_ms = 200;
766 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200767 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200768 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800769}
770
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200771TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
772 auto fixture = CreateVideoQualityTestFixture();
773 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700774 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200775 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
776 1000000, false, "VP8", 2, 1, 400000,
777 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100778 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700779 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
780 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200781 screenshare.config->loss_percent = 10;
782 screenshare.config->queue_delay_ms = 200;
783 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200784 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800785}
786
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200787TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
788 auto fixture = CreateVideoQualityTestFixture();
789 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700790 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200791 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
792 1000000, false, "VP8", 2, 1, 400000,
793 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100794 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700795 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
796 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200797 screenshare.config->loss_percent = 5;
798 screenshare.config->link_capacity_kbps = 200;
799 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700800
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200801 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700802}
803
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200804TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
805 auto fixture = CreateVideoQualityTestFixture();
806 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700807 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200808 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
809 1000000, false, "VP8", 2, 1, 400000,
810 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100811 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700812 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
813 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200814 screenshare.config->loss_percent = 1;
815 screenshare.config->link_capacity_kbps = 1200;
816 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700817
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200818 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700819}
820
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200821const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000822 true, 1280, 720, 30, 800000,
823 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200824 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800825
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200826const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000827 true, 1280, 720, 30, 800000,
828 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200829 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800830
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200831const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000832 true, 640, 360, 30, 150000,
833 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200834 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800835
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200836const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000837 true, 320, 180, 30, 30000,
838 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200839 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800840
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100841#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200842TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
843 auto fixture = CreateVideoQualityTestFixture();
844 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700845 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100846 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
847 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200848 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100849 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700850 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
851 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200852 screenshare.ss[0] = {
853 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
854 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200855 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000856}
ilnik2a8c2f52017-02-15 02:23:28 -0800857
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200858TEST(FullStackTest, VP9SVC_3SL_High) {
859 auto fixture = CreateVideoQualityTestFixture();
860 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800861 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100862 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800863 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
864 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200865
Sergey Silkin57027362018-05-15 09:12:05 +0200866 simulcast.ss[0] = {
867 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
868 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200869 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800870}
871
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200872TEST(FullStackTest, VP9SVC_3SL_Medium) {
873 auto fixture = CreateVideoQualityTestFixture();
874 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800875 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100876 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800877 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
878 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200879 simulcast.ss[0] = {
880 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
881 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200882 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800883}
884
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200885TEST(FullStackTest, VP9SVC_3SL_Low) {
886 auto fixture = CreateVideoQualityTestFixture();
887 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800888 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100889 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800890 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200891 simulcast.ss[0] = {
892 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
893 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200894 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800895}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200896
Sergey Silkin7f978f12018-09-10 12:01:49 +0000897// bugs.webrtc.org/9506
898#if !defined(WEBRTC_MAC)
899
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200900TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200901 webrtc::test::ScopedFieldTrials override_trials(
902 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200903 auto fixture = CreateVideoQualityTestFixture();
904 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200905 simulcast.call.send_side_bwe = true;
906 simulcast.video[0] = kSvcVp9Video;
907 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
908 kFullStackTestDurationSecs};
909 simulcast.ss[0] = {
910 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
911 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200912 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200913}
914
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200915TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200916 webrtc::test::ScopedFieldTrials override_trials(
917 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200918 auto fixture = CreateVideoQualityTestFixture();
919 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200920 simulcast.call.send_side_bwe = true;
921 simulcast.video[0] = kSvcVp9Video;
922 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
923 kFullStackTestDurationSecs};
924 simulcast.ss[0] = {
925 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
926 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200927 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200928}
929
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200930TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200931 webrtc::test::ScopedFieldTrials override_trials(
932 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200933 auto fixture = CreateVideoQualityTestFixture();
934 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200935 simulcast.call.send_side_bwe = true;
936 simulcast.video[0] = kSvcVp9Video;
937 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
938 kFullStackTestDurationSecs};
939 simulcast.ss[0] = {
940 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
941 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200942 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200943}
“Michael277a6562018-06-01 14:09:19 -0500944
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200945TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200946 webrtc::test::ScopedFieldTrials override_trials(
947 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200949 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500950 simulcast.call.send_side_bwe = true;
951 simulcast.video[0] = kSvcVp9Video;
952 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
953 kFullStackTestDurationSecs};
954 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200955 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500956 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200957 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200958 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200959 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500960}
Erik Språngd3438aa2018-11-08 16:56:43 +0100961
962// TODO(webrtc:9722): Remove when experiment is cleaned up.
963TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
964 webrtc::test::ScopedFieldTrials override_trials(
965 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
966 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
967 auto fixture = CreateVideoQualityTestFixture();
968 ParamsWithLogging simulcast;
969 simulcast.call.send_side_bwe = true;
970 simulcast.video[0] = kSvcVp9Video;
971 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
972 0.0, 0.0, kFullStackTestDurationSecs};
973 simulcast.ss[0] = {
974 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
975 std::vector<SpatialLayer>(), false};
976 simulcast.config->link_capacity_kbps = 1000;
977 simulcast.config->queue_delay_ms = 100;
978 fixture->RunWithAnalyzer(simulcast);
979}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000980#endif // !defined(WEBRTC_MAC)
981
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100982#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800983
ilnik6b826ef2017-06-16 06:53:48 -0700984// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000985// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
986#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700987#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
988#else
989#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
990#endif
991
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200992TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
993 auto fixture = CreateVideoQualityTestFixture();
994 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700995 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100996 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
997 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200998 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700999 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1000 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001001 simulcast.config->loss_percent = 0;
1002 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001003 std::vector<VideoStream> streams = {
1004 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1005 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1006 VideoQualityTest::DefaultVideoStream(simulcast, 0)
1007 };
Sergey Silkin57027362018-05-15 09:12:05 +02001008 simulcast.ss[0] = {
1009 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1010 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001011 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1012 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001013 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001014}
1015
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001016TEST(FullStackTest, SimulcastVP8_3SL_High) {
1017 auto fixture = CreateVideoQualityTestFixture();
1018 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001019 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001020 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001021 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001022 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001023 simulcast.config->loss_percent = 0;
1024 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001025 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001026 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001027 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001028 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001029 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001030 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001031
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001032 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001033 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1034 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1035 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001036 simulcast.ss[0] = {
1037 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1038 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001039 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001040}
1041
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001042TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1043 auto fixture = CreateVideoQualityTestFixture();
1044 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001045 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001046 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001047 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001048 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001049 simulcast.config->loss_percent = 0;
1050 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001051 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001052 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001053 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001054 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001055 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001056 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001057
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001058 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001059 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1060 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1061 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001062 simulcast.ss[0] = {
1063 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1064 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001065 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001066}
1067
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001068TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1069 auto fixture = CreateVideoQualityTestFixture();
1070 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001071 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001072 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001073 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001074 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001075 simulcast.config->loss_percent = 0;
1076 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001077 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001078 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001079 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001080 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001081 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001082 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001083
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001084 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001085 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1086 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1087 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001088 simulcast.ss[0] = {
1089 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1090 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001091 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001092}
1093
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001094TEST(FullStackTest, LargeRoomVP8_5thumb) {
1095 auto fixture = CreateVideoQualityTestFixture();
1096 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001097 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001098 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001099 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1100 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001101 large_room.config->loss_percent = 0;
1102 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001103 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001104 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001105 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001106 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001107 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001108 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001109
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001110 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001111 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1112 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1113 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001114 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001115 large_room.ss[0] = {
1116 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1117 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001118 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001119}
1120
oprypin743117f2017-09-15 05:24:24 -07001121#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1122// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001123// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1124#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001125#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001126#else
1127#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001128#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001129#endif
1130
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001131TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1132 auto fixture = CreateVideoQualityTestFixture();
1133 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001134 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001135 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001136 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1137 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001138 large_room.config->loss_percent = 0;
1139 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001140 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001141 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001142 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001143 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001144 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001145 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001146
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001147 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001148 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1149 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1150 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001151 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001152 large_room.ss[0] = {
1153 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1154 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001155 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001156}
1157
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001158TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1159 auto fixture = CreateVideoQualityTestFixture();
1160 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001161 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001162 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001163 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1164 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001165 large_room.config->loss_percent = 0;
1166 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001167 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001168 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001169 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001170 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001171 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001172 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001173
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001174 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001175 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1176 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1177 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001178 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001179 large_room.ss[0] = {
1180 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1181 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001182 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001183}
1184
philipeldd8b0d82018-09-27 11:18:10 +02001185INSTANTIATE_TEST_CASE_P(FullStackTest,
1186 GenericDescriptorTest,
1187 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1188 "WebRTC-GenericDescriptor/Enabled/"));
1189
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001190class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001191
1192// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001193// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1194#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001195TEST_P(DualStreamsTest,
1196 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1197 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001198 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1199 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001200 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001201 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001202
1203 // Screenshare Settings.
1204 dual_streams.screenshare[first_stream] = {true, false, 10};
1205 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1206 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001207 2, 400000, false, false, false,
1208 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001209
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001210 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001211 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1212 1000000, false, "VP8", 3, 0, 400000,
1213 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001214 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001215 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1216 1000000, false, "VP8", 2, 0, 400000,
1217 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001218 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001219 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1220 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001221
Sergey Silkin57027362018-05-15 09:12:05 +02001222 dual_streams.ss[first_stream] = {
1223 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1224 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001225
1226 // Video settings.
1227 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1228
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001229 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001230 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001231 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001232 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001233 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001234 video_params_low.video[0] = kSimulcastVp8VideoLow;
1235 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001236 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1237 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1238 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001239
1240 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001241 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1242 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001243
1244 // Call settings.
1245 dual_streams.call.send_side_bwe = true;
1246 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001247 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1248 std::to_string(first_stream);
1249 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001250 dual_streams.config->loss_percent = 1;
1251 dual_streams.config->link_capacity_kbps = 7500;
1252 dual_streams.config->queue_length_packets = 30;
1253 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001254
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001255 auto fixture = CreateVideoQualityTestFixture();
1256 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001257}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001258#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1259 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001260
1261TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001262 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001263 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001264 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001265 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001266
1267 // Screenshare Settings.
1268 dual_streams.screenshare[first_stream] = {true, false, 10};
1269 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1270 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001271 2, 400000, false, false, false,
1272 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001273 // Video settings.
1274 dual_streams.video[1 - first_stream] = {
1275 true, 1280, 720, 30, 150000,
1276 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001277 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001278
1279 // Call settings.
1280 dual_streams.call.send_side_bwe = true;
1281 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001282 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1283 std::to_string(first_stream);
1284 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001285 dual_streams.config->loss_percent = 1;
1286 dual_streams.config->link_capacity_kbps = 5000;
1287 dual_streams.config->queue_length_packets = 30;
1288 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001289
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001290 auto fixture = CreateVideoQualityTestFixture();
1291 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001292}
1293
1294INSTANTIATE_TEST_CASE_P(FullStackTest,
1295 DualStreamsTest,
1296 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001297
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001298} // namespace webrtc