blob: bceafe41c5d00e8557e80d9b2b8c510a2fe23baf [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#if !defined(WEBRTC_MAC)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100706// All the tests using this constant are disabled on Mac.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200707const char kScreenshareSimulcastExperiment[] =
708 "WebRTC-SimulcastScreenshare/Enabled/";
709
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100710// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
711#if !defined(WEBRTC_WIN)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200712TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100713 test::ScopedFieldTrials field_trial(
714 AppendFieldTrials(kScreenshareSimulcastExperiment));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200715 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200716 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800717 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100718 screenshare.screenshare[0] = {true, false, 10};
719 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
720 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200721 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800722 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
723 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200724 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200725 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
726 1000000, false, "VP8", 3, 0, 400000,
727 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800728 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200729 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
730 1000000, false, "VP8", 2, 0, 400000,
731 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800732
733 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200734 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
735 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200736 screenshare.ss[0] = {
737 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
738 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200739 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800740}
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100741#endif // !defined(WEBRTC_WIN)
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200742#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800743
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200744TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
745 auto fixture = CreateVideoQualityTestFixture();
746 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700747 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200748 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
749 1000000, false, "VP8", 2, 1, 400000,
750 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100751 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700752 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
753 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200754 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700755}
756
philipeldd8b0d82018-09-27 11:18:10 +0200757TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200758 auto fixture = CreateVideoQualityTestFixture();
759 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700760 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200761 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
762 1000000, false, "VP8", 2, 1, 400000,
763 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100764 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200765 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000766 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200767 screenshare.config->loss_percent = 5;
768 screenshare.config->queue_delay_ms = 200;
769 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200770 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200771 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800772}
773
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200774TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
775 auto fixture = CreateVideoQualityTestFixture();
776 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700777 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200778 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
779 1000000, false, "VP8", 2, 1, 400000,
780 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100781 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700782 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
783 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200784 screenshare.config->loss_percent = 10;
785 screenshare.config->queue_delay_ms = 200;
786 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200787 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800788}
789
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200790TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
791 auto fixture = CreateVideoQualityTestFixture();
792 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700793 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200794 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
795 1000000, false, "VP8", 2, 1, 400000,
796 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100797 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700798 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
799 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200800 screenshare.config->loss_percent = 5;
801 screenshare.config->link_capacity_kbps = 200;
802 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700803
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200804 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700805}
806
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200807TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
808 auto fixture = CreateVideoQualityTestFixture();
809 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700810 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200811 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
812 1000000, false, "VP8", 2, 1, 400000,
813 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100814 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700815 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
816 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200817 screenshare.config->loss_percent = 1;
818 screenshare.config->link_capacity_kbps = 1200;
819 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700820
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200821 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700822}
823
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200824const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000825 true, 1280, 720, 30, 800000,
826 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200827 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800828
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200829const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000830 true, 1280, 720, 30, 800000,
831 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200832 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800833
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200834const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000835 true, 640, 360, 30, 150000,
836 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200837 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800838
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200839const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000840 true, 320, 180, 30, 30000,
841 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200842 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800843
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100844#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200845TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
846 auto fixture = CreateVideoQualityTestFixture();
847 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700848 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100849 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
850 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200851 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100852 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700853 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
854 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200855 screenshare.ss[0] = {
856 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
857 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200858 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000859}
ilnik2a8c2f52017-02-15 02:23:28 -0800860
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200861TEST(FullStackTest, VP9SVC_3SL_High) {
862 auto fixture = CreateVideoQualityTestFixture();
863 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800864 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100865 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800866 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
867 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200868
Sergey Silkin57027362018-05-15 09:12:05 +0200869 simulcast.ss[0] = {
870 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
871 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200872 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800873}
874
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200875TEST(FullStackTest, VP9SVC_3SL_Medium) {
876 auto fixture = CreateVideoQualityTestFixture();
877 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800878 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100879 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800880 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
881 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200882 simulcast.ss[0] = {
883 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
884 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200885 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800886}
887
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200888TEST(FullStackTest, VP9SVC_3SL_Low) {
889 auto fixture = CreateVideoQualityTestFixture();
890 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800891 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100892 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800893 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200894 simulcast.ss[0] = {
895 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
896 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200897 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800898}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200899
Sergey Silkin7f978f12018-09-10 12:01:49 +0000900// bugs.webrtc.org/9506
901#if !defined(WEBRTC_MAC)
902
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200903TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200904 webrtc::test::ScopedFieldTrials override_trials(
905 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200906 auto fixture = CreateVideoQualityTestFixture();
907 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200908 simulcast.call.send_side_bwe = true;
909 simulcast.video[0] = kSvcVp9Video;
910 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
911 kFullStackTestDurationSecs};
912 simulcast.ss[0] = {
913 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
914 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200915 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200916}
917
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200918TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200919 webrtc::test::ScopedFieldTrials override_trials(
920 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200921 auto fixture = CreateVideoQualityTestFixture();
922 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200923 simulcast.call.send_side_bwe = true;
924 simulcast.video[0] = kSvcVp9Video;
925 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
926 kFullStackTestDurationSecs};
927 simulcast.ss[0] = {
928 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
929 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200930 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200931}
932
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200933TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200934 webrtc::test::ScopedFieldTrials override_trials(
935 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200936 auto fixture = CreateVideoQualityTestFixture();
937 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200938 simulcast.call.send_side_bwe = true;
939 simulcast.video[0] = kSvcVp9Video;
940 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
941 kFullStackTestDurationSecs};
942 simulcast.ss[0] = {
943 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
944 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200945 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200946}
“Michael277a6562018-06-01 14:09:19 -0500947
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200949 webrtc::test::ScopedFieldTrials override_trials(
950 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200951 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200952 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500953 simulcast.call.send_side_bwe = true;
954 simulcast.video[0] = kSvcVp9Video;
955 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
956 kFullStackTestDurationSecs};
957 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +0200958 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -0500959 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200960 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +0200961 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200962 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500963}
Erik Språngd3438aa2018-11-08 16:56:43 +0100964
965// TODO(webrtc:9722): Remove when experiment is cleaned up.
966TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
967 webrtc::test::ScopedFieldTrials override_trials(
968 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
969 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
970 auto fixture = CreateVideoQualityTestFixture();
971 ParamsWithLogging simulcast;
972 simulcast.call.send_side_bwe = true;
973 simulcast.video[0] = kSvcVp9Video;
974 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
975 0.0, 0.0, kFullStackTestDurationSecs};
976 simulcast.ss[0] = {
977 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
978 std::vector<SpatialLayer>(), false};
979 simulcast.config->link_capacity_kbps = 1000;
980 simulcast.config->queue_delay_ms = 100;
981 fixture->RunWithAnalyzer(simulcast);
982}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000983#endif // !defined(WEBRTC_MAC)
984
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100985#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800986
ilnik6b826ef2017-06-16 06:53:48 -0700987// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000988// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
989#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700990#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
991#else
992#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
993#endif
994
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200995TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
996 auto fixture = CreateVideoQualityTestFixture();
997 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700998 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100999 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
1000 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001001 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001002 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1003 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001004 simulcast.config->loss_percent = 0;
1005 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001006 std::vector<VideoStream> streams = {
1007 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1008 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1009 VideoQualityTest::DefaultVideoStream(simulcast, 0)
1010 };
Sergey Silkin57027362018-05-15 09:12:05 +02001011 simulcast.ss[0] = {
1012 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1013 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001014 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1015 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001016 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001017}
1018
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001019TEST(FullStackTest, SimulcastVP8_3SL_High) {
1020 auto fixture = CreateVideoQualityTestFixture();
1021 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001022 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001023 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001024 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001025 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001026 simulcast.config->loss_percent = 0;
1027 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001028 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001029 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001030 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001031 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001032 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001033 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001034
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001035 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001036 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1037 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1038 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001039 simulcast.ss[0] = {
1040 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1041 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001042 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001043}
1044
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001045TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1046 auto fixture = CreateVideoQualityTestFixture();
1047 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001048 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001049 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001050 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001051 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001052 simulcast.config->loss_percent = 0;
1053 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001054 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001055 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001056 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001057 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001058 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001059 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001060
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001061 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001062 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1063 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1064 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001065 simulcast.ss[0] = {
1066 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1067 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001068 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001069}
1070
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001071TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1072 auto fixture = CreateVideoQualityTestFixture();
1073 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001074 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001075 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -08001076 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001077 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001078 simulcast.config->loss_percent = 0;
1079 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001080 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001081 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001082 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001083 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001084 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001085 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001086
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001087 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001088 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1089 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1090 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001091 simulcast.ss[0] = {
1092 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1093 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001094 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001095}
1096
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001097TEST(FullStackTest, LargeRoomVP8_5thumb) {
1098 auto fixture = CreateVideoQualityTestFixture();
1099 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001100 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001101 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001102 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1103 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001104 large_room.config->loss_percent = 0;
1105 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001106 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001107 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001109 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001110 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001111 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001112
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001113 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001114 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1115 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1116 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001117 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001118 large_room.ss[0] = {
1119 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1120 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001121 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001122}
1123
oprypin743117f2017-09-15 05:24:24 -07001124#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1125// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001126// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1127#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001128#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001129#else
1130#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001131#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001132#endif
1133
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001134TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1135 auto fixture = CreateVideoQualityTestFixture();
1136 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001137 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001138 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001139 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1140 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001141 large_room.config->loss_percent = 0;
1142 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001143 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001144 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001145 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001146 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001147 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001148 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001149
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001150 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001151 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1152 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1153 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001154 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001155 large_room.ss[0] = {
1156 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1157 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001158 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001159}
1160
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001161TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1162 auto fixture = CreateVideoQualityTestFixture();
1163 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001164 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001165 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001166 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1167 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001168 large_room.config->loss_percent = 0;
1169 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001170 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001171 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001172 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001173 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001174 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001175 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001176
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001177 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001178 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1179 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1180 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001181 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001182 large_room.ss[0] = {
1183 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1184 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001185 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001186}
1187
philipeldd8b0d82018-09-27 11:18:10 +02001188INSTANTIATE_TEST_CASE_P(FullStackTest,
1189 GenericDescriptorTest,
1190 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1191 "WebRTC-GenericDescriptor/Enabled/"));
1192
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001193class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001194
1195// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001196// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1197#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001198TEST_P(DualStreamsTest,
1199 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1200 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001201 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1202 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001203 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001204 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001205
1206 // Screenshare Settings.
1207 dual_streams.screenshare[first_stream] = {true, false, 10};
1208 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1209 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001210 2, 400000, false, false, false,
1211 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001212
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001213 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001214 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1215 1000000, false, "VP8", 3, 0, 400000,
1216 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001217 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001218 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1219 1000000, false, "VP8", 2, 0, 400000,
1220 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001221 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001222 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1223 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001224
Sergey Silkin57027362018-05-15 09:12:05 +02001225 dual_streams.ss[first_stream] = {
1226 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1227 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001228
1229 // Video settings.
1230 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1231
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001232 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001233 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001234 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001235 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001236 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001237 video_params_low.video[0] = kSimulcastVp8VideoLow;
1238 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001239 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1240 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1241 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001242
1243 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001244 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1245 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001246
1247 // Call settings.
1248 dual_streams.call.send_side_bwe = true;
1249 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001250 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1251 std::to_string(first_stream);
1252 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001253 dual_streams.config->loss_percent = 1;
1254 dual_streams.config->link_capacity_kbps = 7500;
1255 dual_streams.config->queue_length_packets = 30;
1256 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001257
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001258 auto fixture = CreateVideoQualityTestFixture();
1259 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001260}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001261#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1262 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001263
1264TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001265 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001266 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001267 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001268 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001269
1270 // Screenshare Settings.
1271 dual_streams.screenshare[first_stream] = {true, false, 10};
1272 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1273 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001274 2, 400000, false, false, false,
1275 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001276 // Video settings.
1277 dual_streams.video[1 - first_stream] = {
1278 true, 1280, 720, 30, 150000,
1279 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001280 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001281
1282 // Call settings.
1283 dual_streams.call.send_side_bwe = true;
1284 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001285 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1286 std::to_string(first_stream);
1287 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001288 dual_streams.config->loss_percent = 1;
1289 dual_streams.config->link_capacity_kbps = 5000;
1290 dual_streams.config->queue_length_packets = 30;
1291 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001292
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001293 auto fixture = CreateVideoQualityTestFixture();
1294 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001295}
1296
1297INSTANTIATE_TEST_CASE_P(FullStackTest,
1298 DualStreamsTest,
1299 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001300
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001301} // namespace webrtc