1*d9f75844SAndroid Build Coastguard Worker /*
2*d9f75844SAndroid Build Coastguard Worker * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3*d9f75844SAndroid Build Coastguard Worker *
4*d9f75844SAndroid Build Coastguard Worker * Use of this source code is governed by a BSD-style license
5*d9f75844SAndroid Build Coastguard Worker * that can be found in the LICENSE file in the root of the source
6*d9f75844SAndroid Build Coastguard Worker * tree. An additional intellectual property rights grant can be found
7*d9f75844SAndroid Build Coastguard Worker * in the file PATENTS. All contributing project authors may
8*d9f75844SAndroid Build Coastguard Worker * be found in the AUTHORS file in the root of the source tree.
9*d9f75844SAndroid Build Coastguard Worker */
10*d9f75844SAndroid Build Coastguard Worker #include <memory>
11*d9f75844SAndroid Build Coastguard Worker #include <string>
12*d9f75844SAndroid Build Coastguard Worker #include <utility>
13*d9f75844SAndroid Build Coastguard Worker #include <vector>
14*d9f75844SAndroid Build Coastguard Worker
15*d9f75844SAndroid Build Coastguard Worker #include "absl/flags/flag.h"
16*d9f75844SAndroid Build Coastguard Worker #include "absl/flags/parse.h"
17*d9f75844SAndroid Build Coastguard Worker #include "absl/types/optional.h"
18*d9f75844SAndroid Build Coastguard Worker #include "api/test/simulated_network.h"
19*d9f75844SAndroid Build Coastguard Worker #include "api/test/test_dependency_factory.h"
20*d9f75844SAndroid Build Coastguard Worker #include "api/test/video_quality_test_fixture.h"
21*d9f75844SAndroid Build Coastguard Worker #include "api/video_codecs/sdp_video_format.h"
22*d9f75844SAndroid Build Coastguard Worker #include "api/video_codecs/video_codec.h"
23*d9f75844SAndroid Build Coastguard Worker #include "api/video_codecs/vp9_profile.h"
24*d9f75844SAndroid Build Coastguard Worker #include "modules/video_coding/codecs/vp9/include/vp9.h"
25*d9f75844SAndroid Build Coastguard Worker #include "system_wrappers/include/field_trial.h"
26*d9f75844SAndroid Build Coastguard Worker #include "test/field_trial.h"
27*d9f75844SAndroid Build Coastguard Worker #include "test/gtest.h"
28*d9f75844SAndroid Build Coastguard Worker #include "test/testsupport/file_utils.h"
29*d9f75844SAndroid Build Coastguard Worker #include "video/config/video_encoder_config.h"
30*d9f75844SAndroid Build Coastguard Worker #include "video/video_quality_test.h"
31*d9f75844SAndroid Build Coastguard Worker
32*d9f75844SAndroid Build Coastguard Worker ABSL_FLAG(std::string,
33*d9f75844SAndroid Build Coastguard Worker rtc_event_log_name,
34*d9f75844SAndroid Build Coastguard Worker "",
35*d9f75844SAndroid Build Coastguard Worker "Filename for rtc event log. Two files "
36*d9f75844SAndroid Build Coastguard Worker "with \"_send\" and \"_recv\" suffixes will be created.");
37*d9f75844SAndroid Build Coastguard Worker ABSL_FLAG(std::string,
38*d9f75844SAndroid Build Coastguard Worker rtp_dump_name,
39*d9f75844SAndroid Build Coastguard Worker "",
40*d9f75844SAndroid Build Coastguard Worker "Filename for dumped received RTP stream.");
41*d9f75844SAndroid Build Coastguard Worker ABSL_FLAG(std::string,
42*d9f75844SAndroid Build Coastguard Worker encoded_frame_path,
43*d9f75844SAndroid Build Coastguard Worker "",
44*d9f75844SAndroid Build Coastguard Worker "The base path for encoded frame logs. Created files will have "
45*d9f75844SAndroid Build Coastguard Worker "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
46*d9f75844SAndroid Build Coastguard Worker
47*d9f75844SAndroid Build Coastguard Worker namespace webrtc {
48*d9f75844SAndroid Build Coastguard Worker
49*d9f75844SAndroid Build Coastguard Worker namespace {
50*d9f75844SAndroid Build Coastguard Worker static const int kFullStackTestDurationSecs = 45;
51*d9f75844SAndroid Build Coastguard Worker
52*d9f75844SAndroid Build Coastguard Worker struct ParamsWithLogging : public VideoQualityTest::Params {
53*d9f75844SAndroid Build Coastguard Worker public:
ParamsWithLoggingwebrtc::__anon45a157310111::ParamsWithLogging54*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging() {
55*d9f75844SAndroid Build Coastguard Worker // Use these logging flags by default, for everything.
56*d9f75844SAndroid Build Coastguard Worker logging = {absl::GetFlag(FLAGS_rtc_event_log_name),
57*d9f75844SAndroid Build Coastguard Worker absl::GetFlag(FLAGS_rtp_dump_name),
58*d9f75844SAndroid Build Coastguard Worker absl::GetFlag(FLAGS_encoded_frame_path)};
59*d9f75844SAndroid Build Coastguard Worker this->config = BuiltInNetworkBehaviorConfig();
60*d9f75844SAndroid Build Coastguard Worker }
61*d9f75844SAndroid Build Coastguard Worker };
62*d9f75844SAndroid Build Coastguard Worker
63*d9f75844SAndroid Build Coastguard Worker std::unique_ptr<VideoQualityTestFixtureInterface>
CreateVideoQualityTestFixture()64*d9f75844SAndroid Build Coastguard Worker CreateVideoQualityTestFixture() {
65*d9f75844SAndroid Build Coastguard Worker // The components will normally be nullptr (= use defaults), but it's possible
66*d9f75844SAndroid Build Coastguard Worker // for external test runners to override the list of injected components.
67*d9f75844SAndroid Build Coastguard Worker auto components = TestDependencyFactory::GetInstance().CreateComponents();
68*d9f75844SAndroid Build Coastguard Worker return std::make_unique<VideoQualityTest>(std::move(components));
69*d9f75844SAndroid Build Coastguard Worker }
70*d9f75844SAndroid Build Coastguard Worker
71*d9f75844SAndroid Build Coastguard Worker // Takes the current active field trials set, and appends some new trials.
AppendFieldTrials(std::string new_trial_string)72*d9f75844SAndroid Build Coastguard Worker std::string AppendFieldTrials(std::string new_trial_string) {
73*d9f75844SAndroid Build Coastguard Worker return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
74*d9f75844SAndroid Build Coastguard Worker }
75*d9f75844SAndroid Build Coastguard Worker
ClipNameToClipPath(const char * clip_name)76*d9f75844SAndroid Build Coastguard Worker std::string ClipNameToClipPath(const char* clip_name) {
77*d9f75844SAndroid Build Coastguard Worker return test::ResourcePath(clip_name, "yuv");
78*d9f75844SAndroid Build Coastguard Worker }
79*d9f75844SAndroid Build Coastguard Worker } // namespace
80*d9f75844SAndroid Build Coastguard Worker
81*d9f75844SAndroid Build Coastguard Worker // VideoQualityTest::Params params = {
82*d9f75844SAndroid Build Coastguard Worker // { ... }, // Common.
83*d9f75844SAndroid Build Coastguard Worker // { ... }, // Video-specific settings.
84*d9f75844SAndroid Build Coastguard Worker // { ... }, // Screenshare-specific settings.
85*d9f75844SAndroid Build Coastguard Worker // { ... }, // Analyzer settings.
86*d9f75844SAndroid Build Coastguard Worker // pipe, // FakeNetworkPipe::Config
87*d9f75844SAndroid Build Coastguard Worker // { ... }, // Spatial scalability.
88*d9f75844SAndroid Build Coastguard Worker // logs // bool
89*d9f75844SAndroid Build Coastguard Worker // };
90*d9f75844SAndroid Build Coastguard Worker
91*d9f75844SAndroid Build Coastguard Worker #if defined(RTC_ENABLE_VP9)
TEST(FullStackTest,Foreman_Cif_Net_Delay_0_0_Plr_0_VP9)92*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_Net_Delay_0_0_Plr_0_VP9) {
93*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
94*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
95*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
96*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
97*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
98*d9f75844SAndroid Build Coastguard Worker 700000, 700000, 700000, false,
99*d9f75844SAndroid Build Coastguard Worker "VP9", 1, 0, 0,
100*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
101*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
102*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
103*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
104*d9f75844SAndroid Build Coastguard Worker }
105*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Foreman_Cif_Delay_50_0_Plr_5_VP9_Generic_Descriptor)106*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest,
107*d9f75844SAndroid Build Coastguard Worker Foreman_Cif_Delay_50_0_Plr_5_VP9_Generic_Descriptor) {
108*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
109*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
110*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
111*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
112*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
113*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
114*d9f75844SAndroid Build Coastguard Worker "VP9", 1, 0, 0,
115*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
116*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9_generic_descriptor",
117*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
118*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 5;
119*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
120*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.generic_descriptor = true;
121*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
122*d9f75844SAndroid Build Coastguard Worker }
123*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Generator_Net_Delay_0_0_Plr_0_VP9Profile2)124*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Generator_Net_Delay_0_0_Plr_0_VP9Profile2) {
125*d9f75844SAndroid Build Coastguard Worker // Profile 2 might not be available on some platforms until
126*d9f75844SAndroid Build Coastguard Worker // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
127*d9f75844SAndroid Build Coastguard Worker bool profile_2_is_supported = false;
128*d9f75844SAndroid Build Coastguard Worker for (const auto& codec : SupportedVP9Codecs()) {
129*d9f75844SAndroid Build Coastguard Worker if (ParseSdpForVP9Profile(codec.parameters)
130*d9f75844SAndroid Build Coastguard Worker .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
131*d9f75844SAndroid Build Coastguard Worker profile_2_is_supported = true;
132*d9f75844SAndroid Build Coastguard Worker }
133*d9f75844SAndroid Build Coastguard Worker }
134*d9f75844SAndroid Build Coastguard Worker if (!profile_2_is_supported)
135*d9f75844SAndroid Build Coastguard Worker return;
136*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
137*d9f75844SAndroid Build Coastguard Worker
138*d9f75844SAndroid Build Coastguard Worker SdpVideoFormat::Parameters vp92 = {
139*d9f75844SAndroid Build Coastguard Worker {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
140*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging generator;
141*d9f75844SAndroid Build Coastguard Worker generator.call.send_side_bwe = true;
142*d9f75844SAndroid Build Coastguard Worker generator.video[0] = {
143*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
144*d9f75844SAndroid Build Coastguard Worker 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
145*d9f75844SAndroid Build Coastguard Worker generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
146*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
147*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(generator);
148*d9f75844SAndroid Build Coastguard Worker }
149*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_Net_Delay_0_0_Plr_0_Multiplex)150*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_Net_Delay_0_0_Plr_0_Multiplex) {
151*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
152*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
153*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
154*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
155*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
156*d9f75844SAndroid Build Coastguard Worker 700000, 700000, 700000, false,
157*d9f75844SAndroid Build Coastguard Worker "multiplex", 1, 0, 0,
158*d9f75844SAndroid Build Coastguard Worker false, false, false, ClipNameToClipPath("foreman_cif")};
159*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
160*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
161*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
162*d9f75844SAndroid Build Coastguard Worker }
163*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Generator_Net_Delay_0_0_Plr_0_Multiplex)164*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Generator_Net_Delay_0_0_Plr_0_Multiplex) {
165*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
166*d9f75844SAndroid Build Coastguard Worker
167*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging generator;
168*d9f75844SAndroid Build Coastguard Worker generator.call.send_side_bwe = true;
169*d9f75844SAndroid Build Coastguard Worker generator.video[0] = {
170*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30, 700000, 700000, 700000, false,
171*d9f75844SAndroid Build Coastguard Worker "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"};
172*d9f75844SAndroid Build Coastguard Worker generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
173*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
174*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(generator);
175*d9f75844SAndroid Build Coastguard Worker }
176*d9f75844SAndroid Build Coastguard Worker
177*d9f75844SAndroid Build Coastguard Worker #endif // defined(RTC_ENABLE_VP9)
178*d9f75844SAndroid Build Coastguard Worker
179*d9f75844SAndroid Build Coastguard Worker #if defined(WEBRTC_LINUX)
180*d9f75844SAndroid Build Coastguard Worker // Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
181*d9f75844SAndroid Build Coastguard Worker #define MAYBE_Net_Delay_0_0_Plr_0 DISABLED_Net_Delay_0_0_Plr_0
182*d9f75844SAndroid Build Coastguard Worker #else
183*d9f75844SAndroid Build Coastguard Worker #define MAYBE_Net_Delay_0_0_Plr_0 Net_Delay_0_0_Plr_0
184*d9f75844SAndroid Build Coastguard Worker #endif
TEST(FullStackTest,MAYBE_Net_Delay_0_0_Plr_0)185*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, MAYBE_Net_Delay_0_0_Plr_0) {
186*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
187*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging paris_qcif;
188*d9f75844SAndroid Build Coastguard Worker paris_qcif.call.send_side_bwe = true;
189*d9f75844SAndroid Build Coastguard Worker paris_qcif.video[0] = {
190*d9f75844SAndroid Build Coastguard Worker true, 176, 144, 30,
191*d9f75844SAndroid Build Coastguard Worker 300000, 300000, 300000, false,
192*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
193*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("paris_qcif")};
194*d9f75844SAndroid Build Coastguard Worker paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
195*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
196*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(paris_qcif);
197*d9f75844SAndroid Build Coastguard Worker }
198*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Foreman_Cif_Net_Delay_0_0_Plr_0_Generic_Descriptor)199*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest,
200*d9f75844SAndroid Build Coastguard Worker Foreman_Cif_Net_Delay_0_0_Plr_0_Generic_Descriptor) {
201*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
202*d9f75844SAndroid Build Coastguard Worker // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
203*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
204*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
205*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
206*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
207*d9f75844SAndroid Build Coastguard Worker 700000, 700000, 700000, false,
208*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
209*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
210*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_generic_descriptor",
211*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
212*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.generic_descriptor = true;
213*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
214*d9f75844SAndroid Build Coastguard Worker }
215*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_Generic_Descriptor)216*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest,
217*d9f75844SAndroid Build Coastguard Worker Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_Generic_Descriptor) {
218*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
219*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
220*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
221*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
222*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 10,
223*d9f75844SAndroid Build Coastguard Worker 30000, 30000, 30000, false,
224*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
225*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
226*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {
227*d9f75844SAndroid Build Coastguard Worker "foreman_cif_30kbps_net_delay_0_0_plr_0_generic_descriptor", 0.0, 0.0,
228*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
229*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.generic_descriptor = true;
230*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
231*d9f75844SAndroid Build Coastguard Worker }
232*d9f75844SAndroid Build Coastguard Worker
233*d9f75844SAndroid Build Coastguard Worker // Link capacity below default start rate.
TEST(FullStackTest,Foreman_Cif_Link_150kbps_Net_Delay_0_0_Plr_0)234*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_Link_150kbps_Net_Delay_0_0_Plr_0) {
235*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
236*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
237*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
238*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
239*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
240*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
241*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
242*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
243*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0", 0.0,
244*d9f75844SAndroid Build Coastguard Worker 0.0, kFullStackTestDurationSecs};
245*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 150;
246*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
247*d9f75844SAndroid Build Coastguard Worker }
248*d9f75844SAndroid Build Coastguard Worker
249*d9f75844SAndroid Build Coastguard Worker // Restricted network and encoder overproducing by 30%.
TEST(FullStackTest,Foreman_Cif_Link_150kbps_Delay100ms_30pkts_Queue_Overshoot30)250*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest,
251*d9f75844SAndroid Build Coastguard Worker Foreman_Cif_Link_150kbps_Delay100ms_30pkts_Queue_Overshoot30) {
252*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
253*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
254*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
255*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
256*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
257*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
258*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
259*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif"),
260*d9f75844SAndroid Build Coastguard Worker 0, {}, 1.30};
261*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {
262*d9f75844SAndroid Build Coastguard Worker "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
263*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
264*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 150;
265*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_length_packets = 30;
266*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 100;
267*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
268*d9f75844SAndroid Build Coastguard Worker }
269*d9f75844SAndroid Build Coastguard Worker
270*d9f75844SAndroid Build Coastguard Worker // Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
271*d9f75844SAndroid Build Coastguard Worker // Packet rate and loss are low enough that loss will happen with ~3s interval.
272*d9f75844SAndroid Build Coastguard Worker // This triggers protection overhead to toggle between zero and non-zero.
273*d9f75844SAndroid Build Coastguard Worker // Link queue is restrictive enough to trigger loss on probes.
TEST(FullStackTest,Foreman_Cif_Link_250kbps_Delay100ms_10pkts_Loss1)274*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_Link_250kbps_Delay100ms_10pkts_Loss1) {
275*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
276*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
277*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
278*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
279*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
280*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
281*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
282*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif"),
283*d9f75844SAndroid Build Coastguard Worker 0, {}, 1.30};
284*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
285*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
286*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 250;
287*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_length_packets = 10;
288*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 100;
289*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 1;
290*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
291*d9f75844SAndroid Build Coastguard Worker }
292*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Foreman_Cif_Delay_50_0_Plr_5_Generic_Descriptor)293*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest, Foreman_Cif_Delay_50_0_Plr_5_Generic_Descriptor) {
294*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
295*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
296*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
297*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
298*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
299*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
300*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
301*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
302*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_generic_descriptor",
303*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
304*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 5;
305*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
306*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.generic_descriptor = true;
307*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
308*d9f75844SAndroid Build Coastguard Worker }
309*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Foreman_Cif_Delay_50_0_Plr_5_Ulpfec_Generic_Descriptor)310*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest,
311*d9f75844SAndroid Build Coastguard Worker Foreman_Cif_Delay_50_0_Plr_5_Ulpfec_Generic_Descriptor) {
312*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
313*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
314*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
315*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
316*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
317*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
318*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
319*d9f75844SAndroid Build Coastguard Worker true, false, true, ClipNameToClipPath("foreman_cif")};
320*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {
321*d9f75844SAndroid Build Coastguard Worker "foreman_cif_delay_50_0_plr_5_ulpfec_generic_descriptor", 0.0, 0.0,
322*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
323*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 5;
324*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
325*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.generic_descriptor = true;
326*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
327*d9f75844SAndroid Build Coastguard Worker }
328*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_Delay_50_0_Plr_5_Flexfec)329*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_Flexfec) {
330*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
331*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
332*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
333*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
334*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
335*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
336*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
337*d9f75844SAndroid Build Coastguard Worker false, true, true, ClipNameToClipPath("foreman_cif")};
338*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
339*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
340*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 5;
341*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
342*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
343*d9f75844SAndroid Build Coastguard Worker }
344*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_500kbps_Delay_50_0_Plr_3_Flexfec)345*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_500kbps_Delay_50_0_Plr_3_Flexfec) {
346*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
347*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
348*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
349*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
350*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
351*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
352*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
353*d9f75844SAndroid Build Coastguard Worker false, true, true, ClipNameToClipPath("foreman_cif")};
354*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
355*d9f75844SAndroid Build Coastguard Worker 0.0, kFullStackTestDurationSecs};
356*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 3;
357*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 500;
358*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
359*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
360*d9f75844SAndroid Build Coastguard Worker }
361*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_500kbps_Delay_50_0_Plr_3_Ulpfec)362*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_500kbps_Delay_50_0_Plr_3_Ulpfec) {
363*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
364*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
365*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
366*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
367*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
368*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
369*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
370*d9f75844SAndroid Build Coastguard Worker true, false, true, ClipNameToClipPath("foreman_cif")};
371*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
372*d9f75844SAndroid Build Coastguard Worker 0.0, kFullStackTestDurationSecs};
373*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 3;
374*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 500;
375*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
376*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
377*d9f75844SAndroid Build Coastguard Worker }
378*d9f75844SAndroid Build Coastguard Worker
379*d9f75844SAndroid Build Coastguard Worker #if defined(WEBRTC_USE_H264)
TEST(FullStackTest,Foreman_Cif_Net_Delay_0_0_Plr_0_H264)380*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_Net_Delay_0_0_Plr_0_H264) {
381*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
382*d9f75844SAndroid Build Coastguard Worker // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
383*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
384*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
385*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
386*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
387*d9f75844SAndroid Build Coastguard Worker 700000, 700000, 700000, false,
388*d9f75844SAndroid Build Coastguard Worker "H264", 1, 0, 0,
389*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
390*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
391*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
392*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
393*d9f75844SAndroid Build Coastguard Worker }
394*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_H264)395*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_H264) {
396*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
397*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
398*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
399*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
400*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 10,
401*d9f75844SAndroid Build Coastguard Worker 30000, 30000, 30000, false,
402*d9f75844SAndroid Build Coastguard Worker "H264", 1, 0, 0,
403*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
404*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
405*d9f75844SAndroid Build Coastguard Worker 0.0, kFullStackTestDurationSecs};
406*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
407*d9f75844SAndroid Build Coastguard Worker }
408*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Foreman_Cif_Delay_50_0_Plr_5_H264_Generic_Descriptor)409*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest,
410*d9f75844SAndroid Build Coastguard Worker Foreman_Cif_Delay_50_0_Plr_5_H264_Generic_Descriptor) {
411*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
412*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
413*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
414*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
415*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
416*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
417*d9f75844SAndroid Build Coastguard Worker "H264", 1, 0, 0,
418*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
419*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {
420*d9f75844SAndroid Build Coastguard Worker "foreman_cif_delay_50_0_plr_5_H264_generic_descriptor", 0.0, 0.0,
421*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
422*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 5;
423*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
424*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.generic_descriptor = true;
425*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
426*d9f75844SAndroid Build Coastguard Worker }
427*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_Delay_50_0_Plr_5_H264_Sps_Pps_Idr)428*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Sps_Pps_Idr) {
429*d9f75844SAndroid Build Coastguard Worker test::ScopedFieldTrials override_field_trials(
430*d9f75844SAndroid Build Coastguard Worker AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
431*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
432*d9f75844SAndroid Build Coastguard Worker
433*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
434*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
435*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
436*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
437*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
438*d9f75844SAndroid Build Coastguard Worker "H264", 1, 0, 0,
439*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
440*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
441*d9f75844SAndroid Build Coastguard Worker 0.0, kFullStackTestDurationSecs};
442*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 5;
443*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
444*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
445*d9f75844SAndroid Build Coastguard Worker }
446*d9f75844SAndroid Build Coastguard Worker
447*d9f75844SAndroid Build Coastguard Worker // Verify that this is worth the bot time, before enabling.
TEST(FullStackTest,Foreman_Cif_Delay_50_0_Plr_5_H264_Flexfec)448*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Flexfec) {
449*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
450*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
451*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
452*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
453*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
454*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
455*d9f75844SAndroid Build Coastguard Worker "H264", 1, 0, 0,
456*d9f75844SAndroid Build Coastguard Worker false, true, true, ClipNameToClipPath("foreman_cif")};
457*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
458*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
459*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 5;
460*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
461*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
462*d9f75844SAndroid Build Coastguard Worker }
463*d9f75844SAndroid Build Coastguard Worker
464*d9f75844SAndroid Build Coastguard Worker // Ulpfec with H264 is an unsupported combination, so this test is only useful
465*d9f75844SAndroid Build Coastguard Worker // for debugging. It is therefore disabled by default.
TEST(FullStackTest,DISABLED_Foreman_Cif_Delay_50_0_Plr_5_H264_Ulpfec)466*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, DISABLED_Foreman_Cif_Delay_50_0_Plr_5_H264_Ulpfec) {
467*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
468*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
469*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
470*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
471*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
472*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
473*d9f75844SAndroid Build Coastguard Worker "H264", 1, 0, 0,
474*d9f75844SAndroid Build Coastguard Worker true, false, true, ClipNameToClipPath("foreman_cif")};
475*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
476*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
477*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->loss_percent = 5;
478*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 50;
479*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
480*d9f75844SAndroid Build Coastguard Worker }
481*d9f75844SAndroid Build Coastguard Worker #endif // defined(WEBRTC_USE_H264)
482*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_500kbps)483*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_500kbps) {
484*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
485*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
486*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
487*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
488*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
489*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
490*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
491*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
492*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
493*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
494*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_length_packets = 0;
495*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 0;
496*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 500;
497*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
498*d9f75844SAndroid Build Coastguard Worker }
499*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_500kbps_32pkts_Queue)500*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_500kbps_32pkts_Queue) {
501*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
502*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
503*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
504*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
505*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
506*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
507*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
508*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
509*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
510*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
511*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_length_packets = 32;
512*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 0;
513*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 500;
514*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
515*d9f75844SAndroid Build Coastguard Worker }
516*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_500kbps_100ms)517*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_500kbps_100ms) {
518*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
519*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
520*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
521*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
522*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
523*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
524*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
525*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
526*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
527*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
528*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_length_packets = 0;
529*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 100;
530*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 500;
531*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
532*d9f75844SAndroid Build Coastguard Worker }
533*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Foreman_Cif_500kbps_100ms_32pkts_Queue_Generic_Descriptor)534*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest,
535*d9f75844SAndroid Build Coastguard Worker Foreman_Cif_500kbps_100ms_32pkts_Queue_Generic_Descriptor) {
536*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
537*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
538*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
539*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
540*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
541*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
542*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
543*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
544*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {
545*d9f75844SAndroid Build Coastguard Worker "foreman_cif_500kbps_100ms_32pkts_queue_generic_descriptor", 0.0, 0.0,
546*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
547*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_length_packets = 32;
548*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 100;
549*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 500;
550*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.generic_descriptor = true;
551*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
552*d9f75844SAndroid Build Coastguard Worker }
553*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_500kbps_100ms_32pkts_Queue_Recv_Bwe)554*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_500kbps_100ms_32pkts_Queue_Recv_Bwe) {
555*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
556*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
557*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = false;
558*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
559*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
560*d9f75844SAndroid Build Coastguard Worker 30000, 500000, 2000000, false,
561*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
562*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
563*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
564*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
565*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_length_packets = 32;
566*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 100;
567*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 500;
568*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
569*d9f75844SAndroid Build Coastguard Worker }
570*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Foreman_Cif_1000kbps_100ms_32pkts_Queue)571*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Foreman_Cif_1000kbps_100ms_32pkts_Queue) {
572*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
573*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging foreman_cif;
574*d9f75844SAndroid Build Coastguard Worker foreman_cif.call.send_side_bwe = true;
575*d9f75844SAndroid Build Coastguard Worker foreman_cif.video[0] = {
576*d9f75844SAndroid Build Coastguard Worker true, 352, 288, 30,
577*d9f75844SAndroid Build Coastguard Worker 30000, 2000000, 2000000, false,
578*d9f75844SAndroid Build Coastguard Worker "VP8", 1, 0, 0,
579*d9f75844SAndroid Build Coastguard Worker false, false, true, ClipNameToClipPath("foreman_cif")};
580*d9f75844SAndroid Build Coastguard Worker foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
581*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
582*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_length_packets = 32;
583*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->queue_delay_ms = 100;
584*d9f75844SAndroid Build Coastguard Worker foreman_cif.config->link_capacity_kbps = 1000;
585*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(foreman_cif);
586*d9f75844SAndroid Build Coastguard Worker }
587*d9f75844SAndroid Build Coastguard Worker
588*d9f75844SAndroid Build Coastguard Worker // TODO(sprang): Remove this if we have the similar ModerateLimits below?
TEST(FullStackTest,Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue)589*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue) {
590*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
591*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging conf_motion_hd;
592*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.call.send_side_bwe = true;
593*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.video[0] = {
594*d9f75844SAndroid Build Coastguard Worker true, 1280,
595*d9f75844SAndroid Build Coastguard Worker 720, 50,
596*d9f75844SAndroid Build Coastguard Worker 30000, 3000000,
597*d9f75844SAndroid Build Coastguard Worker 3000000, false,
598*d9f75844SAndroid Build Coastguard Worker "VP8", 1,
599*d9f75844SAndroid Build Coastguard Worker 0, 0,
600*d9f75844SAndroid Build Coastguard Worker false, false,
601*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
602*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
603*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
604*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_length_packets = 32;
605*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_delay_ms = 100;
606*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->link_capacity_kbps = 2000;
607*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(conf_motion_hd);
608*d9f75844SAndroid Build Coastguard Worker }
609*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Conference_Motion_Hd_2tl_Moderate_Limits_Generic_Descriptor)610*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest,
611*d9f75844SAndroid Build Coastguard Worker Conference_Motion_Hd_2tl_Moderate_Limits_Generic_Descriptor) {
612*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
613*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging conf_motion_hd;
614*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.call.send_side_bwe = true;
615*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.video[0] = {
616*d9f75844SAndroid Build Coastguard Worker true, 1280,
617*d9f75844SAndroid Build Coastguard Worker 720, 50,
618*d9f75844SAndroid Build Coastguard Worker 30000, 3000000,
619*d9f75844SAndroid Build Coastguard Worker 3000000, false,
620*d9f75844SAndroid Build Coastguard Worker "VP8", 2,
621*d9f75844SAndroid Build Coastguard Worker -1, 0,
622*d9f75844SAndroid Build Coastguard Worker false, false,
623*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
624*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.analyzer = {
625*d9f75844SAndroid Build Coastguard Worker "conference_motion_hd_2tl_moderate_limits_generic_descriptor", 0.0, 0.0,
626*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
627*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_length_packets = 50;
628*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->loss_percent = 3;
629*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_delay_ms = 100;
630*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->link_capacity_kbps = 2000;
631*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.call.generic_descriptor = true;
632*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(conf_motion_hd);
633*d9f75844SAndroid Build Coastguard Worker }
634*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Conference_Motion_Hd_3tl_Moderate_Limits)635*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Conference_Motion_Hd_3tl_Moderate_Limits) {
636*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
637*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging conf_motion_hd;
638*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.call.send_side_bwe = true;
639*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.video[0] = {
640*d9f75844SAndroid Build Coastguard Worker true, 1280,
641*d9f75844SAndroid Build Coastguard Worker 720, 50,
642*d9f75844SAndroid Build Coastguard Worker 30000, 3000000,
643*d9f75844SAndroid Build Coastguard Worker 3000000, false,
644*d9f75844SAndroid Build Coastguard Worker "VP8", 3,
645*d9f75844SAndroid Build Coastguard Worker -1, 0,
646*d9f75844SAndroid Build Coastguard Worker false, false,
647*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
648*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
649*d9f75844SAndroid Build Coastguard Worker 0.0, kFullStackTestDurationSecs};
650*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_length_packets = 50;
651*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->loss_percent = 3;
652*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_delay_ms = 100;
653*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->link_capacity_kbps = 2000;
654*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(conf_motion_hd);
655*d9f75844SAndroid Build Coastguard Worker }
656*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Conference_Motion_Hd_4tl_Moderate_Limits)657*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Conference_Motion_Hd_4tl_Moderate_Limits) {
658*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
659*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging conf_motion_hd;
660*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.call.send_side_bwe = true;
661*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.video[0] = {
662*d9f75844SAndroid Build Coastguard Worker true, 1280,
663*d9f75844SAndroid Build Coastguard Worker 720, 50,
664*d9f75844SAndroid Build Coastguard Worker 30000, 3000000,
665*d9f75844SAndroid Build Coastguard Worker 3000000, false,
666*d9f75844SAndroid Build Coastguard Worker "VP8", 4,
667*d9f75844SAndroid Build Coastguard Worker -1, 0,
668*d9f75844SAndroid Build Coastguard Worker false, false,
669*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
670*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
671*d9f75844SAndroid Build Coastguard Worker 0.0, kFullStackTestDurationSecs};
672*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_length_packets = 50;
673*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->loss_percent = 3;
674*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_delay_ms = 100;
675*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->link_capacity_kbps = 2000;
676*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(conf_motion_hd);
677*d9f75844SAndroid Build Coastguard Worker }
678*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Conference_Motion_Hd_3tl_Alt_Moderate_Limits)679*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Conference_Motion_Hd_3tl_Alt_Moderate_Limits) {
680*d9f75844SAndroid Build Coastguard Worker test::ScopedFieldTrials field_trial(
681*d9f75844SAndroid Build Coastguard Worker AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
682*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
683*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging conf_motion_hd;
684*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.call.send_side_bwe = true;
685*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.video[0] = {
686*d9f75844SAndroid Build Coastguard Worker true, 1280,
687*d9f75844SAndroid Build Coastguard Worker 720, 50,
688*d9f75844SAndroid Build Coastguard Worker 30000, 3000000,
689*d9f75844SAndroid Build Coastguard Worker 3000000, false,
690*d9f75844SAndroid Build Coastguard Worker "VP8", 3,
691*d9f75844SAndroid Build Coastguard Worker -1, 0,
692*d9f75844SAndroid Build Coastguard Worker false, false,
693*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
694*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
695*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
696*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_length_packets = 50;
697*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->loss_percent = 3;
698*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_delay_ms = 100;
699*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->link_capacity_kbps = 2000;
700*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(conf_motion_hd);
701*d9f75844SAndroid Build Coastguard Worker }
702*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Conference_Motion_Hd_3tl_Alt_Heavy_Moderate_Limits)703*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Conference_Motion_Hd_3tl_Alt_Heavy_Moderate_Limits) {
704*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
705*d9f75844SAndroid Build Coastguard Worker test::ScopedFieldTrials field_trial(
706*d9f75844SAndroid Build Coastguard Worker AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
707*d9f75844SAndroid Build Coastguard Worker "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
708*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging conf_motion_hd;
709*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.call.send_side_bwe = true;
710*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.video[0] = {
711*d9f75844SAndroid Build Coastguard Worker true, 1280,
712*d9f75844SAndroid Build Coastguard Worker 720, 50,
713*d9f75844SAndroid Build Coastguard Worker 30000, 3000000,
714*d9f75844SAndroid Build Coastguard Worker 3000000, false,
715*d9f75844SAndroid Build Coastguard Worker "VP8", 3,
716*d9f75844SAndroid Build Coastguard Worker -1, 0,
717*d9f75844SAndroid Build Coastguard Worker false, false,
718*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
719*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.analyzer = {
720*d9f75844SAndroid Build Coastguard Worker "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
721*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
722*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_length_packets = 50;
723*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->loss_percent = 3;
724*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_delay_ms = 100;
725*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->link_capacity_kbps = 2000;
726*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(conf_motion_hd);
727*d9f75844SAndroid Build Coastguard Worker }
728*d9f75844SAndroid Build Coastguard Worker
729*d9f75844SAndroid Build Coastguard Worker #if defined(RTC_ENABLE_VP9)
TEST(FullStackTest,Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue_Vp9)730*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue_Vp9) {
731*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
732*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging conf_motion_hd;
733*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.call.send_side_bwe = true;
734*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.video[0] = {
735*d9f75844SAndroid Build Coastguard Worker true, 1280,
736*d9f75844SAndroid Build Coastguard Worker 720, 50,
737*d9f75844SAndroid Build Coastguard Worker 30000, 3000000,
738*d9f75844SAndroid Build Coastguard Worker 3000000, false,
739*d9f75844SAndroid Build Coastguard Worker "VP9", 1,
740*d9f75844SAndroid Build Coastguard Worker 0, 0,
741*d9f75844SAndroid Build Coastguard Worker false, false,
742*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
743*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.analyzer = {
744*d9f75844SAndroid Build Coastguard Worker "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
745*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
746*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_length_packets = 32;
747*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->queue_delay_ms = 100;
748*d9f75844SAndroid Build Coastguard Worker conf_motion_hd.config->link_capacity_kbps = 2000;
749*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(conf_motion_hd);
750*d9f75844SAndroid Build Coastguard Worker }
751*d9f75844SAndroid Build Coastguard Worker #endif
752*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Screenshare_Slides)753*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Screenshare_Slides) {
754*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
755*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging screenshare;
756*d9f75844SAndroid Build Coastguard Worker screenshare.call.send_side_bwe = true;
757*d9f75844SAndroid Build Coastguard Worker screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
758*d9f75844SAndroid Build Coastguard Worker 1000000, false, "VP8", 2, 1, 400000,
759*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
760*d9f75844SAndroid Build Coastguard Worker screenshare.screenshare[0] = {true, false, 10};
761*d9f75844SAndroid Build Coastguard Worker screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
762*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
763*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(screenshare);
764*d9f75844SAndroid Build Coastguard Worker }
765*d9f75844SAndroid Build Coastguard Worker
766*d9f75844SAndroid Build Coastguard Worker #if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
767*d9f75844SAndroid Build Coastguard Worker // TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
TEST(FullStackTest,Screenshare_Slides_Simulcast)768*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Screenshare_Slides_Simulcast) {
769*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
770*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging screenshare;
771*d9f75844SAndroid Build Coastguard Worker screenshare.call.send_side_bwe = true;
772*d9f75844SAndroid Build Coastguard Worker screenshare.screenshare[0] = {true, false, 10};
773*d9f75844SAndroid Build Coastguard Worker screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
774*d9f75844SAndroid Build Coastguard Worker 2500000, false, "VP8", 2, 1, 400000,
775*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
776*d9f75844SAndroid Build Coastguard Worker screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
777*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
778*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging screenshare_params_high;
779*d9f75844SAndroid Build Coastguard Worker screenshare_params_high.video[0] = {
780*d9f75844SAndroid Build Coastguard Worker true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
781*d9f75844SAndroid Build Coastguard Worker "VP8", 2, 0, 400000, false, false, false, ""};
782*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::Params screenshare_params_low;
783*d9f75844SAndroid Build Coastguard Worker screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
784*d9f75844SAndroid Build Coastguard Worker 1000000, false, "VP8", 2, 0, 400000,
785*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
786*d9f75844SAndroid Build Coastguard Worker
787*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream> streams = {
788*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
789*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
790*d9f75844SAndroid Build Coastguard Worker screenshare.ss[0] = {
791*d9f75844SAndroid Build Coastguard Worker streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
792*d9f75844SAndroid Build Coastguard Worker false};
793*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(screenshare);
794*d9f75844SAndroid Build Coastguard Worker }
795*d9f75844SAndroid Build Coastguard Worker
796*d9f75844SAndroid Build Coastguard Worker #endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
797*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Screenshare_Slides_Scrolling)798*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Screenshare_Slides_Scrolling) {
799*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
800*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging config;
801*d9f75844SAndroid Build Coastguard Worker config.call.send_side_bwe = true;
802*d9f75844SAndroid Build Coastguard Worker config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
803*d9f75844SAndroid Build Coastguard Worker 1000000, false, "VP8", 2, 1, 400000,
804*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
805*d9f75844SAndroid Build Coastguard Worker config.screenshare[0] = {true, false, 10, 2};
806*d9f75844SAndroid Build Coastguard Worker config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
807*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
808*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(config);
809*d9f75844SAndroid Build Coastguard Worker }
810*d9f75844SAndroid Build Coastguard Worker
TEST(GenericDescriptorTest,Screenshare_Slides_Lossy_Net_Generic_Descriptor)811*d9f75844SAndroid Build Coastguard Worker TEST(GenericDescriptorTest, Screenshare_Slides_Lossy_Net_Generic_Descriptor) {
812*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
813*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging screenshare;
814*d9f75844SAndroid Build Coastguard Worker screenshare.call.send_side_bwe = true;
815*d9f75844SAndroid Build Coastguard Worker screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
816*d9f75844SAndroid Build Coastguard Worker 1000000, false, "VP8", 2, 1, 400000,
817*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
818*d9f75844SAndroid Build Coastguard Worker screenshare.screenshare[0] = {true, false, 10};
819*d9f75844SAndroid Build Coastguard Worker screenshare.analyzer = {"screenshare_slides_lossy_net_generic_descriptor",
820*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
821*d9f75844SAndroid Build Coastguard Worker screenshare.config->loss_percent = 5;
822*d9f75844SAndroid Build Coastguard Worker screenshare.config->queue_delay_ms = 200;
823*d9f75844SAndroid Build Coastguard Worker screenshare.config->link_capacity_kbps = 500;
824*d9f75844SAndroid Build Coastguard Worker screenshare.call.generic_descriptor = true;
825*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(screenshare);
826*d9f75844SAndroid Build Coastguard Worker }
827*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Screenshare_Slides_Very_Lossy)828*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Screenshare_Slides_Very_Lossy) {
829*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
830*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging screenshare;
831*d9f75844SAndroid Build Coastguard Worker screenshare.call.send_side_bwe = true;
832*d9f75844SAndroid Build Coastguard Worker screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
833*d9f75844SAndroid Build Coastguard Worker 1000000, false, "VP8", 2, 1, 400000,
834*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
835*d9f75844SAndroid Build Coastguard Worker screenshare.screenshare[0] = {true, false, 10};
836*d9f75844SAndroid Build Coastguard Worker screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
837*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
838*d9f75844SAndroid Build Coastguard Worker screenshare.config->loss_percent = 10;
839*d9f75844SAndroid Build Coastguard Worker screenshare.config->queue_delay_ms = 200;
840*d9f75844SAndroid Build Coastguard Worker screenshare.config->link_capacity_kbps = 500;
841*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(screenshare);
842*d9f75844SAndroid Build Coastguard Worker }
843*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Screenshare_Slides_Lossy_Limited)844*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Screenshare_Slides_Lossy_Limited) {
845*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
846*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging screenshare;
847*d9f75844SAndroid Build Coastguard Worker screenshare.call.send_side_bwe = true;
848*d9f75844SAndroid Build Coastguard Worker screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
849*d9f75844SAndroid Build Coastguard Worker 1000000, false, "VP8", 2, 1, 400000,
850*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
851*d9f75844SAndroid Build Coastguard Worker screenshare.screenshare[0] = {true, false, 10};
852*d9f75844SAndroid Build Coastguard Worker screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
853*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
854*d9f75844SAndroid Build Coastguard Worker screenshare.config->loss_percent = 5;
855*d9f75844SAndroid Build Coastguard Worker screenshare.config->link_capacity_kbps = 200;
856*d9f75844SAndroid Build Coastguard Worker screenshare.config->queue_length_packets = 30;
857*d9f75844SAndroid Build Coastguard Worker
858*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(screenshare);
859*d9f75844SAndroid Build Coastguard Worker }
860*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Screenshare_Slides_Moderately_Restricted)861*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Screenshare_Slides_Moderately_Restricted) {
862*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
863*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging screenshare;
864*d9f75844SAndroid Build Coastguard Worker screenshare.call.send_side_bwe = true;
865*d9f75844SAndroid Build Coastguard Worker screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
866*d9f75844SAndroid Build Coastguard Worker 1000000, false, "VP8", 2, 1, 400000,
867*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
868*d9f75844SAndroid Build Coastguard Worker screenshare.screenshare[0] = {true, false, 10};
869*d9f75844SAndroid Build Coastguard Worker screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
870*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
871*d9f75844SAndroid Build Coastguard Worker screenshare.config->loss_percent = 1;
872*d9f75844SAndroid Build Coastguard Worker screenshare.config->link_capacity_kbps = 1200;
873*d9f75844SAndroid Build Coastguard Worker screenshare.config->queue_length_packets = 30;
874*d9f75844SAndroid Build Coastguard Worker
875*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(screenshare);
876*d9f75844SAndroid Build Coastguard Worker }
877*d9f75844SAndroid Build Coastguard Worker
878*d9f75844SAndroid Build Coastguard Worker // Since ParamsWithLogging::Video is not trivially destructible, we can't
879*d9f75844SAndroid Build Coastguard Worker // store these structs as const globals.
SvcVp9Video()880*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging::Video SvcVp9Video() {
881*d9f75844SAndroid Build Coastguard Worker return ParamsWithLogging::Video{
882*d9f75844SAndroid Build Coastguard Worker true, 1280,
883*d9f75844SAndroid Build Coastguard Worker 720, 30,
884*d9f75844SAndroid Build Coastguard Worker 800000, 2500000,
885*d9f75844SAndroid Build Coastguard Worker 2500000, false,
886*d9f75844SAndroid Build Coastguard Worker "VP9", 3,
887*d9f75844SAndroid Build Coastguard Worker 2, 400000,
888*d9f75844SAndroid Build Coastguard Worker false, false,
889*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
890*d9f75844SAndroid Build Coastguard Worker }
891*d9f75844SAndroid Build Coastguard Worker
SimulcastVp8VideoHigh()892*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging::Video SimulcastVp8VideoHigh() {
893*d9f75844SAndroid Build Coastguard Worker return ParamsWithLogging::Video{
894*d9f75844SAndroid Build Coastguard Worker true, 1280,
895*d9f75844SAndroid Build Coastguard Worker 720, 30,
896*d9f75844SAndroid Build Coastguard Worker 800000, 2500000,
897*d9f75844SAndroid Build Coastguard Worker 2500000, false,
898*d9f75844SAndroid Build Coastguard Worker "VP8", 3,
899*d9f75844SAndroid Build Coastguard Worker 2, 400000,
900*d9f75844SAndroid Build Coastguard Worker false, false,
901*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
902*d9f75844SAndroid Build Coastguard Worker }
903*d9f75844SAndroid Build Coastguard Worker
SimulcastVp8VideoMedium()904*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging::Video SimulcastVp8VideoMedium() {
905*d9f75844SAndroid Build Coastguard Worker return ParamsWithLogging::Video{
906*d9f75844SAndroid Build Coastguard Worker true, 640,
907*d9f75844SAndroid Build Coastguard Worker 360, 30,
908*d9f75844SAndroid Build Coastguard Worker 150000, 500000,
909*d9f75844SAndroid Build Coastguard Worker 700000, false,
910*d9f75844SAndroid Build Coastguard Worker "VP8", 3,
911*d9f75844SAndroid Build Coastguard Worker 2, 400000,
912*d9f75844SAndroid Build Coastguard Worker false, false,
913*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
914*d9f75844SAndroid Build Coastguard Worker }
915*d9f75844SAndroid Build Coastguard Worker
SimulcastVp8VideoLow()916*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging::Video SimulcastVp8VideoLow() {
917*d9f75844SAndroid Build Coastguard Worker return ParamsWithLogging::Video{
918*d9f75844SAndroid Build Coastguard Worker true, 320,
919*d9f75844SAndroid Build Coastguard Worker 180, 30,
920*d9f75844SAndroid Build Coastguard Worker 30000, 150000,
921*d9f75844SAndroid Build Coastguard Worker 200000, false,
922*d9f75844SAndroid Build Coastguard Worker "VP8", 3,
923*d9f75844SAndroid Build Coastguard Worker 2, 400000,
924*d9f75844SAndroid Build Coastguard Worker false, false,
925*d9f75844SAndroid Build Coastguard Worker false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
926*d9f75844SAndroid Build Coastguard Worker }
927*d9f75844SAndroid Build Coastguard Worker
928*d9f75844SAndroid Build Coastguard Worker #if defined(RTC_ENABLE_VP9)
929*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Screenshare_Slides_Vp9_3sl_High_Fps)930*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Screenshare_Slides_Vp9_3sl_High_Fps) {
931*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
932*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging screenshare;
933*d9f75844SAndroid Build Coastguard Worker screenshare.call.send_side_bwe = true;
934*d9f75844SAndroid Build Coastguard Worker screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
935*d9f75844SAndroid Build Coastguard Worker 2000000, false, "VP9", 1, 0, 400000,
936*d9f75844SAndroid Build Coastguard Worker false, false, false, ""};
937*d9f75844SAndroid Build Coastguard Worker screenshare.screenshare[0] = {true, false, 10};
938*d9f75844SAndroid Build Coastguard Worker screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
939*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
940*d9f75844SAndroid Build Coastguard Worker screenshare.ss[0] = {
941*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
942*d9f75844SAndroid Build Coastguard Worker std::vector<SpatialLayer>(), true};
943*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(screenshare);
944*d9f75844SAndroid Build Coastguard Worker }
945*d9f75844SAndroid Build Coastguard Worker
946*d9f75844SAndroid Build Coastguard Worker // TODO(http://bugs.webrtc.org/9506): investigate.
947*d9f75844SAndroid Build Coastguard Worker #if !defined(WEBRTC_MAC)
948*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Vp9ksvc_3sl_High)949*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Vp9ksvc_3sl_High) {
950*d9f75844SAndroid Build Coastguard Worker webrtc::test::ScopedFieldTrials override_trials(
951*d9f75844SAndroid Build Coastguard Worker AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
952*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
953*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging simulcast;
954*d9f75844SAndroid Build Coastguard Worker simulcast.call.send_side_bwe = true;
955*d9f75844SAndroid Build Coastguard Worker simulcast.video[0] = SvcVp9Video();
956*d9f75844SAndroid Build Coastguard Worker simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
957*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
958*d9f75844SAndroid Build Coastguard Worker simulcast.ss[0] = {
959*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
960*d9f75844SAndroid Build Coastguard Worker std::vector<SpatialLayer>(), false};
961*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(simulcast);
962*d9f75844SAndroid Build Coastguard Worker }
963*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Vp9ksvc_3sl_Low)964*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Vp9ksvc_3sl_Low) {
965*d9f75844SAndroid Build Coastguard Worker webrtc::test::ScopedFieldTrials override_trials(
966*d9f75844SAndroid Build Coastguard Worker AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
967*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
968*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging simulcast;
969*d9f75844SAndroid Build Coastguard Worker simulcast.call.send_side_bwe = true;
970*d9f75844SAndroid Build Coastguard Worker simulcast.video[0] = SvcVp9Video();
971*d9f75844SAndroid Build Coastguard Worker simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
972*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
973*d9f75844SAndroid Build Coastguard Worker simulcast.ss[0] = {
974*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
975*d9f75844SAndroid Build Coastguard Worker std::vector<SpatialLayer>(), false};
976*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(simulcast);
977*d9f75844SAndroid Build Coastguard Worker }
978*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Vp9ksvc_3sl_Low_Bw_Limited)979*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Vp9ksvc_3sl_Low_Bw_Limited) {
980*d9f75844SAndroid Build Coastguard Worker webrtc::test::ScopedFieldTrials override_trials(
981*d9f75844SAndroid Build Coastguard Worker AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
982*d9f75844SAndroid Build Coastguard Worker "WebRTC-Vp9ExternalRefCtrl/Enabled/"));
983*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
984*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging simulcast;
985*d9f75844SAndroid Build Coastguard Worker simulcast.config->link_capacity_kbps = 500;
986*d9f75844SAndroid Build Coastguard Worker simulcast.call.send_side_bwe = true;
987*d9f75844SAndroid Build Coastguard Worker simulcast.video[0] = SvcVp9Video();
988*d9f75844SAndroid Build Coastguard Worker simulcast.analyzer = {"vp9ksvc_3sl_low_bw_limited", 0.0, 0.0,
989*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
990*d9f75844SAndroid Build Coastguard Worker simulcast.ss[0] = {
991*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
992*d9f75844SAndroid Build Coastguard Worker std::vector<SpatialLayer>(), false};
993*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(simulcast);
994*d9f75844SAndroid Build Coastguard Worker }
995*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Vp9ksvc_3sl_Medium_Network_Restricted)996*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Vp9ksvc_3sl_Medium_Network_Restricted) {
997*d9f75844SAndroid Build Coastguard Worker webrtc::test::ScopedFieldTrials override_trials(
998*d9f75844SAndroid Build Coastguard Worker AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
999*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
1000*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging simulcast;
1001*d9f75844SAndroid Build Coastguard Worker simulcast.call.send_side_bwe = true;
1002*d9f75844SAndroid Build Coastguard Worker simulcast.video[0] = SvcVp9Video();
1003*d9f75844SAndroid Build Coastguard Worker simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1004*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
1005*d9f75844SAndroid Build Coastguard Worker simulcast.ss[0] = {
1006*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1007*d9f75844SAndroid Build Coastguard Worker std::vector<SpatialLayer>(), false};
1008*d9f75844SAndroid Build Coastguard Worker simulcast.config->link_capacity_kbps = 1000;
1009*d9f75844SAndroid Build Coastguard Worker simulcast.config->queue_delay_ms = 100;
1010*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(simulcast);
1011*d9f75844SAndroid Build Coastguard Worker }
1012*d9f75844SAndroid Build Coastguard Worker
1013*d9f75844SAndroid Build Coastguard Worker // TODO(webrtc:9722): Remove when experiment is cleaned up.
TEST(FullStackTest,Vp9ksvc_3sl_Medium_Network_Restricted_Trusted_Rate)1014*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Vp9ksvc_3sl_Medium_Network_Restricted_Trusted_Rate) {
1015*d9f75844SAndroid Build Coastguard Worker webrtc::test::ScopedFieldTrials override_trials(
1016*d9f75844SAndroid Build Coastguard Worker AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
1017*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
1018*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging simulcast;
1019*d9f75844SAndroid Build Coastguard Worker simulcast.call.send_side_bwe = true;
1020*d9f75844SAndroid Build Coastguard Worker simulcast.video[0] = SvcVp9Video();
1021*d9f75844SAndroid Build Coastguard Worker simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1022*d9f75844SAndroid Build Coastguard Worker 0.0, 0.0, kFullStackTestDurationSecs};
1023*d9f75844SAndroid Build Coastguard Worker simulcast.ss[0] = {
1024*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1025*d9f75844SAndroid Build Coastguard Worker std::vector<SpatialLayer>(), false};
1026*d9f75844SAndroid Build Coastguard Worker simulcast.config->link_capacity_kbps = 1000;
1027*d9f75844SAndroid Build Coastguard Worker simulcast.config->queue_delay_ms = 100;
1028*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(simulcast);
1029*d9f75844SAndroid Build Coastguard Worker }
1030*d9f75844SAndroid Build Coastguard Worker #endif // !defined(WEBRTC_MAC)
1031*d9f75844SAndroid Build Coastguard Worker
1032*d9f75844SAndroid Build Coastguard Worker #endif // defined(RTC_ENABLE_VP9)
1033*d9f75844SAndroid Build Coastguard Worker
1034*d9f75844SAndroid Build Coastguard Worker // Android bots can't handle FullHD, so disable the test.
1035*d9f75844SAndroid Build Coastguard Worker // TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1036*d9f75844SAndroid Build Coastguard Worker #if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
1037*d9f75844SAndroid Build Coastguard Worker #define MAYBE_Simulcast_HD_High DISABLED_Simulcast_HD_High
1038*d9f75844SAndroid Build Coastguard Worker #else
1039*d9f75844SAndroid Build Coastguard Worker #define MAYBE_Simulcast_HD_High Simulcast_HD_High
1040*d9f75844SAndroid Build Coastguard Worker #endif
1041*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,MAYBE_Simulcast_HD_High)1042*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, MAYBE_Simulcast_HD_High) {
1043*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
1044*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging simulcast;
1045*d9f75844SAndroid Build Coastguard Worker simulcast.call.send_side_bwe = true;
1046*d9f75844SAndroid Build Coastguard Worker simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
1047*d9f75844SAndroid Build Coastguard Worker 2500000, false, "VP8", 3, 2, 400000,
1048*d9f75844SAndroid Build Coastguard Worker false, false, false, "Generator"};
1049*d9f75844SAndroid Build Coastguard Worker simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1050*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
1051*d9f75844SAndroid Build Coastguard Worker simulcast.config->loss_percent = 0;
1052*d9f75844SAndroid Build Coastguard Worker simulcast.config->queue_delay_ms = 100;
1053*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream> streams = {
1054*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(simulcast, 0),
1055*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(simulcast, 0),
1056*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(simulcast, 0)};
1057*d9f75844SAndroid Build Coastguard Worker simulcast.ss[0] = {
1058*d9f75844SAndroid Build Coastguard Worker streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1059*d9f75844SAndroid Build Coastguard Worker true};
1060*d9f75844SAndroid Build Coastguard Worker webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1061*d9f75844SAndroid Build Coastguard Worker "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
1062*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(simulcast);
1063*d9f75844SAndroid Build Coastguard Worker }
1064*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Simulcast_Vp8_3sl_High)1065*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Simulcast_Vp8_3sl_High) {
1066*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
1067*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging simulcast;
1068*d9f75844SAndroid Build Coastguard Worker simulcast.call.send_side_bwe = true;
1069*d9f75844SAndroid Build Coastguard Worker simulcast.video[0] = SimulcastVp8VideoHigh();
1070*d9f75844SAndroid Build Coastguard Worker simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
1071*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
1072*d9f75844SAndroid Build Coastguard Worker simulcast.config->loss_percent = 0;
1073*d9f75844SAndroid Build Coastguard Worker simulcast.config->queue_delay_ms = 100;
1074*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_high;
1075*d9f75844SAndroid Build Coastguard Worker video_params_high.video[0] = SimulcastVp8VideoHigh();
1076*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_medium;
1077*d9f75844SAndroid Build Coastguard Worker video_params_medium.video[0] = SimulcastVp8VideoMedium();
1078*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_low;
1079*d9f75844SAndroid Build Coastguard Worker video_params_low.video[0] = SimulcastVp8VideoLow();
1080*d9f75844SAndroid Build Coastguard Worker
1081*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream> streams = {
1082*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1083*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1084*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
1085*d9f75844SAndroid Build Coastguard Worker simulcast.ss[0] = {
1086*d9f75844SAndroid Build Coastguard Worker streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1087*d9f75844SAndroid Build Coastguard Worker false};
1088*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(simulcast);
1089*d9f75844SAndroid Build Coastguard Worker }
1090*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,Simulcast_Vp8_3sl_Low)1091*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, Simulcast_Vp8_3sl_Low) {
1092*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
1093*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging simulcast;
1094*d9f75844SAndroid Build Coastguard Worker simulcast.call.send_side_bwe = true;
1095*d9f75844SAndroid Build Coastguard Worker simulcast.video[0] = SimulcastVp8VideoHigh();
1096*d9f75844SAndroid Build Coastguard Worker simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
1097*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
1098*d9f75844SAndroid Build Coastguard Worker simulcast.config->loss_percent = 0;
1099*d9f75844SAndroid Build Coastguard Worker simulcast.config->queue_delay_ms = 100;
1100*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_high;
1101*d9f75844SAndroid Build Coastguard Worker video_params_high.video[0] = SimulcastVp8VideoHigh();
1102*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_medium;
1103*d9f75844SAndroid Build Coastguard Worker video_params_medium.video[0] = SimulcastVp8VideoMedium();
1104*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_low;
1105*d9f75844SAndroid Build Coastguard Worker video_params_low.video[0] = SimulcastVp8VideoLow();
1106*d9f75844SAndroid Build Coastguard Worker
1107*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream> streams = {
1108*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1109*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1110*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
1111*d9f75844SAndroid Build Coastguard Worker simulcast.ss[0] = {
1112*d9f75844SAndroid Build Coastguard Worker streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1113*d9f75844SAndroid Build Coastguard Worker false};
1114*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(simulcast);
1115*d9f75844SAndroid Build Coastguard Worker }
1116*d9f75844SAndroid Build Coastguard Worker
1117*d9f75844SAndroid Build Coastguard Worker // This test assumes ideal network conditions with target bandwidth being
1118*d9f75844SAndroid Build Coastguard Worker // available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1119*d9f75844SAndroid Build Coastguard Worker // Android32 bots can't handle this high bitrate, so disable test for those.
1120*d9f75844SAndroid Build Coastguard Worker #if defined(WEBRTC_ANDROID)
1121*d9f75844SAndroid Build Coastguard Worker #define MAYBE_High_Bitrate_With_Fake_Codec DISABLED_High_Bitrate_With_Fake_Codec
1122*d9f75844SAndroid Build Coastguard Worker #else
1123*d9f75844SAndroid Build Coastguard Worker #define MAYBE_High_Bitrate_With_Fake_Codec High_Bitrate_With_Fake_Codec
1124*d9f75844SAndroid Build Coastguard Worker #endif // defined(WEBRTC_ANDROID)
TEST(FullStackTest,MAYBE_High_Bitrate_With_Fake_Codec)1125*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, MAYBE_High_Bitrate_With_Fake_Codec) {
1126*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
1127*d9f75844SAndroid Build Coastguard Worker const int target_bitrate = 100000000;
1128*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging generator;
1129*d9f75844SAndroid Build Coastguard Worker generator.call.send_side_bwe = true;
1130*d9f75844SAndroid Build Coastguard Worker generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1131*d9f75844SAndroid Build Coastguard Worker generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1132*d9f75844SAndroid Build Coastguard Worker generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1133*d9f75844SAndroid Build Coastguard Worker generator.video[0] = {true,
1134*d9f75844SAndroid Build Coastguard Worker 360,
1135*d9f75844SAndroid Build Coastguard Worker 240,
1136*d9f75844SAndroid Build Coastguard Worker 30,
1137*d9f75844SAndroid Build Coastguard Worker target_bitrate / 2,
1138*d9f75844SAndroid Build Coastguard Worker target_bitrate,
1139*d9f75844SAndroid Build Coastguard Worker target_bitrate * 2,
1140*d9f75844SAndroid Build Coastguard Worker false,
1141*d9f75844SAndroid Build Coastguard Worker "FakeCodec",
1142*d9f75844SAndroid Build Coastguard Worker 1,
1143*d9f75844SAndroid Build Coastguard Worker 0,
1144*d9f75844SAndroid Build Coastguard Worker 0,
1145*d9f75844SAndroid Build Coastguard Worker false,
1146*d9f75844SAndroid Build Coastguard Worker false,
1147*d9f75844SAndroid Build Coastguard Worker false,
1148*d9f75844SAndroid Build Coastguard Worker "Generator"};
1149*d9f75844SAndroid Build Coastguard Worker generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1150*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
1151*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(generator);
1152*d9f75844SAndroid Build Coastguard Worker }
1153*d9f75844SAndroid Build Coastguard Worker
1154*d9f75844SAndroid Build Coastguard Worker #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1155*d9f75844SAndroid Build Coastguard Worker // Fails on mobile devices:
1156*d9f75844SAndroid Build Coastguard Worker // https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1157*d9f75844SAndroid Build Coastguard Worker #define MAYBE_Largeroom_50thumb DISABLED_Largeroom_50thumb
1158*d9f75844SAndroid Build Coastguard Worker #else
1159*d9f75844SAndroid Build Coastguard Worker #define MAYBE_Largeroom_50thumb Largeroom_50thumb
1160*d9f75844SAndroid Build Coastguard Worker #endif
1161*d9f75844SAndroid Build Coastguard Worker
TEST(FullStackTest,MAYBE_Largeroom_50thumb)1162*d9f75844SAndroid Build Coastguard Worker TEST(FullStackTest, MAYBE_Largeroom_50thumb) {
1163*d9f75844SAndroid Build Coastguard Worker auto fixture = CreateVideoQualityTestFixture();
1164*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging large_room;
1165*d9f75844SAndroid Build Coastguard Worker large_room.call.send_side_bwe = true;
1166*d9f75844SAndroid Build Coastguard Worker large_room.video[0] = SimulcastVp8VideoHigh();
1167*d9f75844SAndroid Build Coastguard Worker large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1168*d9f75844SAndroid Build Coastguard Worker kFullStackTestDurationSecs};
1169*d9f75844SAndroid Build Coastguard Worker large_room.config->loss_percent = 0;
1170*d9f75844SAndroid Build Coastguard Worker large_room.config->queue_delay_ms = 100;
1171*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_high;
1172*d9f75844SAndroid Build Coastguard Worker video_params_high.video[0] = SimulcastVp8VideoHigh();
1173*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_medium;
1174*d9f75844SAndroid Build Coastguard Worker video_params_medium.video[0] = SimulcastVp8VideoMedium();
1175*d9f75844SAndroid Build Coastguard Worker ParamsWithLogging video_params_low;
1176*d9f75844SAndroid Build Coastguard Worker video_params_low.video[0] = SimulcastVp8VideoLow();
1177*d9f75844SAndroid Build Coastguard Worker
1178*d9f75844SAndroid Build Coastguard Worker std::vector<VideoStream> streams = {
1179*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1180*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1181*d9f75844SAndroid Build Coastguard Worker VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
1182*d9f75844SAndroid Build Coastguard Worker large_room.call.num_thumbnails = 50;
1183*d9f75844SAndroid Build Coastguard Worker large_room.ss[0] = {
1184*d9f75844SAndroid Build Coastguard Worker streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1185*d9f75844SAndroid Build Coastguard Worker false};
1186*d9f75844SAndroid Build Coastguard Worker fixture->RunWithAnalyzer(large_room);
1187*d9f75844SAndroid Build Coastguard Worker }
1188*d9f75844SAndroid Build Coastguard Worker
1189*d9f75844SAndroid Build Coastguard Worker } // namespace webrtc
1190