pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 10 | #include <memory> |
| 11 | #include <string> |
| 12 | #include <utility> |
| 13 | #include <vector> |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 14 | |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 15 | #include "absl/memory/memory.h" |
| 16 | #include "absl/types/optional.h" |
| 17 | #include "api/test/simulated_network.h" |
Patrik Höglund | d8f3c17 | 2018-09-26 14:39:17 +0200 | [diff] [blame] | 18 | #include "api/test/test_dependency_factory.h" |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 19 | #include "api/test/video_quality_test_fixture.h" |
| 20 | #include "api/video_codecs/sdp_video_format.h" |
| 21 | #include "api/video_codecs/video_codec.h" |
| 22 | #include "api/video_codecs/video_encoder_config.h" |
| 23 | #include "common_types.h" // NOLINT(build/include) |
Emircan Uysaler | 0823eec | 2018-07-13 17:10:00 -0700 | [diff] [blame] | 24 | #include "media/base/vp9_profile.h" |
| 25 | #include "modules/video_coding/codecs/vp9/include/vp9.h" |
Sebastian Jansson | f851888 | 2018-05-31 14:52:59 +0200 | [diff] [blame] | 26 | #include "rtc_base/flags.h" |
Mirko Bonadei | 17f4878 | 2018-09-28 08:51:10 +0200 | [diff] [blame] | 27 | #include "system_wrappers/include/field_trial.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 28 | #include "test/field_trial.h" |
| 29 | #include "test/gtest.h" |
| 30 | #include "video/video_quality_test.h" |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 31 | |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 32 | namespace webrtc { |
Sebastian Jansson | f851888 | 2018-05-31 14:52:59 +0200 | [diff] [blame] | 33 | namespace flags { |
| 34 | |
Mirko Bonadei | 2dfa998 | 2018-10-18 11:35:32 +0200 | [diff] [blame] | 35 | WEBRTC_DEFINE_string(rtc_event_log_name, |
| 36 | "", |
| 37 | "Filename for rtc event log. Two files " |
| 38 | "with \"_send\" and \"_recv\" suffixes will be created."); |
Sebastian Jansson | f851888 | 2018-05-31 14:52:59 +0200 | [diff] [blame] | 39 | std::string RtcEventLogName() { |
| 40 | return static_cast<std::string>(FLAG_rtc_event_log_name); |
| 41 | } |
Mirko Bonadei | 2dfa998 | 2018-10-18 11:35:32 +0200 | [diff] [blame] | 42 | WEBRTC_DEFINE_string(rtp_dump_name, |
| 43 | "", |
| 44 | "Filename for dumped received RTP stream."); |
Sebastian Jansson | f851888 | 2018-05-31 14:52:59 +0200 | [diff] [blame] | 45 | std::string RtpDumpName() { |
| 46 | return static_cast<std::string>(FLAG_rtp_dump_name); |
| 47 | } |
Mirko Bonadei | 2dfa998 | 2018-10-18 11:35:32 +0200 | [diff] [blame] | 48 | WEBRTC_DEFINE_string( |
| 49 | encoded_frame_path, |
| 50 | "", |
| 51 | "The base path for encoded frame logs. Created files will have " |
| 52 | "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf"); |
Sebastian Jansson | f851888 | 2018-05-31 14:52:59 +0200 | [diff] [blame] | 53 | std::string EncodedFramePath() { |
| 54 | return static_cast<std::string>(FLAG_encoded_frame_path); |
| 55 | } |
| 56 | } // namespace flags |
| 57 | } // namespace webrtc |
| 58 | |
| 59 | namespace webrtc { |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 60 | |
sprang | 89c4a7e | 2017-06-30 13:27:40 -0700 | [diff] [blame] | 61 | namespace { |
brandtr | dd369c6 | 2016-11-16 23:56:57 -0800 | [diff] [blame] | 62 | static const int kFullStackTestDurationSecs = 45; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 63 | const char kPacerPushBackExperiment[] = |
| 64 | "WebRTC-PacerPushbackExperiment/Enabled/"; |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 65 | const char kVp8TrustedRateControllerFieldTrial[] = |
| 66 | "WebRTC-LibvpxVp8TrustedRateController/Enabled/"; |
pbos@webrtc.org | b613b5a | 2013-12-03 10:13:04 +0000 | [diff] [blame] | 67 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 68 | struct ParamsWithLogging : public VideoQualityTest::Params { |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 69 | public: |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 70 | ParamsWithLogging() { |
| 71 | // Use these logging flags by default, for everything. |
Mirko Bonadei | 45a4c41 | 2018-07-31 15:07:28 +0200 | [diff] [blame] | 72 | logging = {flags::RtcEventLogName(), flags::RtpDumpName(), |
| 73 | flags::EncodedFramePath()}; |
Artem Titov | 75e3647 | 2018-10-08 12:28:56 +0200 | [diff] [blame] | 74 | this->config = BuiltInNetworkBehaviorConfig(); |
pbos@webrtc.org | 9401524 | 2013-10-16 11:05:37 +0000 | [diff] [blame] | 75 | } |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 76 | }; |
| 77 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 78 | std::unique_ptr<VideoQualityTestFixtureInterface> |
| 79 | CreateVideoQualityTestFixture() { |
Patrik Höglund | d8f3c17 | 2018-09-26 14:39:17 +0200 | [diff] [blame] | 80 | // The components will normally be nullptr (= use defaults), but it's possible |
| 81 | // for external test runners to override the list of injected components. |
| 82 | auto components = TestDependencyFactory::GetInstance().CreateComponents(); |
| 83 | return absl::make_unique<VideoQualityTest>(std::move(components)); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 84 | } |
| 85 | |
Erik Språng | b6b1cac | 2018-08-09 16:12:54 +0200 | [diff] [blame] | 86 | // Takes the current active field trials set, and appends some new trials. |
| 87 | std::string AppendFieldTrials(std::string new_trial_string) { |
| 88 | return std::string(field_trial::GetFieldTrialString()) + new_trial_string; |
| 89 | } |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 90 | } // namespace |
| 91 | |
sprang | ce4aef1 | 2015-11-02 07:23:20 -0800 | [diff] [blame] | 92 | // VideoQualityTest::Params params = { |
| 93 | // { ... }, // Common. |
| 94 | // { ... }, // Video-specific settings. |
| 95 | // { ... }, // Screenshare-specific settings. |
| 96 | // { ... }, // Analyzer settings. |
| 97 | // pipe, // FakeNetworkPipe::Config |
| 98 | // { ... }, // Spatial scalability. |
| 99 | // logs // bool |
| 100 | // }; |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 101 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 102 | class GenericDescriptorTest : public ::testing::TestWithParam<std::string> { |
| 103 | public: |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 104 | GenericDescriptorTest() |
Ilya Nikolaevskiy | 0500b52 | 2019-01-22 11:12:51 +0100 | [diff] [blame] | 105 | : field_trial_(AppendFieldTrials(GetParam())), |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 106 | generic_descriptor_enabled_( |
| 107 | field_trial::IsEnabled("WebRTC-GenericDescriptor")) {} |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 108 | |
| 109 | std::string GetTestName(std::string base) { |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 110 | if (generic_descriptor_enabled_) |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 111 | base += "_generic_descriptor"; |
| 112 | return base; |
| 113 | } |
| 114 | |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 115 | bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; } |
| 116 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 117 | private: |
| 118 | test::ScopedFieldTrials field_trial_; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 119 | bool generic_descriptor_enabled_; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 120 | }; |
| 121 | |
Mirko Bonadei | 8ef5793 | 2018-11-16 14:38:03 +0100 | [diff] [blame] | 122 | #if defined(RTC_ENABLE_VP9) |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 123 | TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) { |
| 124 | auto fixture = CreateVideoQualityTestFixture(); |
| 125 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 126 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 127 | foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000, |
| 128 | false, "VP9", 1, 0, 0, false, false, |
| 129 | true, "foreman_cif"}; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 130 | foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0, |
| 131 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 132 | fixture->RunWithAnalyzer(foreman_cif); |
asapersson | 88b0a22 | 2016-02-12 13:16:43 -0800 | [diff] [blame] | 133 | } |
| 134 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 135 | TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 136 | auto fixture = CreateVideoQualityTestFixture(); |
| 137 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 138 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 139 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 140 | false, "VP9", 1, 0, 0, false, false, |
| 141 | true, "foreman_cif"}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 142 | foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0, |
| 143 | 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 144 | foreman_cif.config->loss_percent = 5; |
| 145 | foreman_cif.config->queue_delay_ms = 50; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 146 | foreman_cif.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 147 | fixture->RunWithAnalyzer(foreman_cif); |
asapersson | 88b0a22 | 2016-02-12 13:16:43 -0800 | [diff] [blame] | 148 | } |
Emircan Uysaler | 03e6ec9 | 2018-03-09 15:03:26 -0800 | [diff] [blame] | 149 | |
Emircan Uysaler | 0823eec | 2018-07-13 17:10:00 -0700 | [diff] [blame] | 150 | TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) { |
| 151 | // Profile 2 might not be available on some platforms until |
| 152 | // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved. |
| 153 | bool profile_2_is_supported = false; |
| 154 | for (const auto& codec : SupportedVP9Codecs()) { |
| 155 | if (ParseSdpForVP9Profile(codec.parameters) |
| 156 | .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) { |
| 157 | profile_2_is_supported = true; |
| 158 | } |
| 159 | } |
| 160 | if (!profile_2_is_supported) |
| 161 | return; |
| 162 | auto fixture = CreateVideoQualityTestFixture(); |
| 163 | |
| 164 | SdpVideoFormat::Parameters vp92 = { |
| 165 | {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}}; |
| 166 | ParamsWithLogging generator; |
| 167 | generator.call.send_side_bwe = true; |
| 168 | generator.video[0] = { |
| 169 | true, 352, 288, 30, 700000, 700000, 700000, false, "VP9", |
Stefan Holmer | 1f7a008 | 2019-01-11 15:39:08 +0100 | [diff] [blame] | 170 | 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92}; |
Emircan Uysaler | 0823eec | 2018-07-13 17:10:00 -0700 | [diff] [blame] | 171 | generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0, |
| 172 | kFullStackTestDurationSecs}; |
| 173 | fixture->RunWithAnalyzer(generator); |
| 174 | } |
| 175 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 176 | TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) { |
| 177 | auto fixture = CreateVideoQualityTestFixture(); |
| 178 | ParamsWithLogging foreman_cif; |
Emircan Uysaler | 03e6ec9 | 2018-03-09 15:03:26 -0800 | [diff] [blame] | 179 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 180 | foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000, |
| 181 | false, "multiplex", 1, 0, 0, false, false, |
| 182 | false, "foreman_cif"}; |
Emircan Uysaler | 03e6ec9 | 2018-03-09 15:03:26 -0800 | [diff] [blame] | 183 | foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0, |
| 184 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 185 | fixture->RunWithAnalyzer(foreman_cif); |
Emircan Uysaler | 03e6ec9 | 2018-03-09 15:03:26 -0800 | [diff] [blame] | 186 | } |
| 187 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 188 | TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) { |
| 189 | auto fixture = CreateVideoQualityTestFixture(); |
| 190 | |
| 191 | ParamsWithLogging generator; |
Emircan Uysaler | f1ff3bd | 2018-03-12 11:53:21 -0700 | [diff] [blame] | 192 | generator.call.send_side_bwe = true; |
Stefan Holmer | 1f7a008 | 2019-01-11 15:39:08 +0100 | [diff] [blame] | 193 | generator.video[0] = { |
| 194 | true, 352, 288, 30, 700000, 700000, 700000, false, |
| 195 | "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"}; |
Emircan Uysaler | f1ff3bd | 2018-03-12 11:53:21 -0700 | [diff] [blame] | 196 | generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0, |
| 197 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 198 | fixture->RunWithAnalyzer(generator); |
Emircan Uysaler | 03e6ec9 | 2018-03-09 15:03:26 -0800 | [diff] [blame] | 199 | } |
| 200 | |
Mirko Bonadei | 8ef5793 | 2018-11-16 14:38:03 +0100 | [diff] [blame] | 201 | #endif // defined(RTC_ENABLE_VP9) |
asapersson | 88b0a22 | 2016-02-12 13:16:43 -0800 | [diff] [blame] | 202 | |
Patrik Höglund | 11bf2fa | 2018-04-09 12:20:50 +0200 | [diff] [blame] | 203 | #if defined(WEBRTC_LINUX) |
| 204 | // Crashes on the linux trusty perf bot: bugs.webrtc.org/9129. |
| 205 | #define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss |
| 206 | #else |
| 207 | #define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss |
| 208 | #endif |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 209 | TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) { |
| 210 | auto fixture = CreateVideoQualityTestFixture(); |
| 211 | ParamsWithLogging paris_qcif; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 212 | paris_qcif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 213 | paris_qcif.video[0] = {true, 176, 144, 30, 300000, 300000, |
| 214 | 300000, false, "VP8", 1, 0, 0, |
| 215 | false, false, true, "paris_qcif"}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 216 | paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96, |
| 217 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 218 | fixture->RunWithAnalyzer(paris_qcif); |
pbos@webrtc.org | 994d0b7 | 2014-06-27 08:47:52 +0000 | [diff] [blame] | 219 | } |
| 220 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 221 | TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 222 | auto fixture = CreateVideoQualityTestFixture(); |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 223 | // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 224 | ParamsWithLogging foreman_cif; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 225 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 226 | foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000, |
| 227 | false, "VP8", 1, 0, 0, false, false, |
| 228 | true, "foreman_cif"}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 229 | foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0, |
| 230 | 0.0, kFullStackTestDurationSecs}; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 231 | foreman_cif.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 232 | fixture->RunWithAnalyzer(foreman_cif); |
pbos@webrtc.org | 994d0b7 | 2014-06-27 08:47:52 +0000 | [diff] [blame] | 233 | } |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 234 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 235 | TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 236 | auto fixture = CreateVideoQualityTestFixture(); |
| 237 | ParamsWithLogging foreman_cif; |
asapersson | fb6ad3b | 2016-12-16 06:54:01 -0800 | [diff] [blame] | 238 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 239 | foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000, |
| 240 | false, "VP8", 1, 0, 0, false, false, |
| 241 | true, "foreman_cif"}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 242 | foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"), |
| 243 | 0.0, 0.0, kFullStackTestDurationSecs}; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 244 | foreman_cif.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 245 | fixture->RunWithAnalyzer(foreman_cif); |
asapersson | fb6ad3b | 2016-12-16 06:54:01 -0800 | [diff] [blame] | 246 | } |
| 247 | |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 248 | // TODO(webrtc:9722): Remove when experiment is cleaned up. |
| 249 | TEST_P(GenericDescriptorTest, |
| 250 | ForemanCif30kbpsWithoutPacketLossTrustedRateControl) { |
| 251 | test::ScopedFieldTrials override_field_trials( |
| 252 | AppendFieldTrials(kVp8TrustedRateControllerFieldTrial)); |
| 253 | auto fixture = CreateVideoQualityTestFixture(); |
| 254 | |
| 255 | ParamsWithLogging foreman_cif; |
| 256 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 257 | foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000, |
| 258 | false, "VP8", 1, 0, 0, false, false, |
| 259 | true, "foreman_cif"}; |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 260 | foreman_cif.analyzer = { |
| 261 | GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"), |
| 262 | 0.0, 0.0, kFullStackTestDurationSecs}; |
| 263 | foreman_cif.call.generic_descriptor = GenericDescriptorEnabled(); |
| 264 | fixture->RunWithAnalyzer(foreman_cif); |
| 265 | } |
| 266 | |
Stefan Holmer | 1f7a008 | 2019-01-11 15:39:08 +0100 | [diff] [blame] | 267 | // Link capacity below default start rate. |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 268 | TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) { |
| 269 | auto fixture = CreateVideoQualityTestFixture(); |
Niels Möller | 0e90982 | 2018-08-21 17:34:35 +0200 | [diff] [blame] | 270 | ParamsWithLogging foreman_cif; |
Niels Möller | 6aa415e | 2018-06-07 11:14:13 +0200 | [diff] [blame] | 271 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 272 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, |
| 273 | 500000, 2000000, false, "VP8", 1, |
| 274 | 0, 0, false, false, true, "foreman_cif"}; |
Niels Möller | 6aa415e | 2018-06-07 11:14:13 +0200 | [diff] [blame] | 275 | foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0", |
| 276 | 0.0, 0.0, |
| 277 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 278 | foreman_cif.config->link_capacity_kbps = 150; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 279 | fixture->RunWithAnalyzer(foreman_cif); |
Niels Möller | 6aa415e | 2018-06-07 11:14:13 +0200 | [diff] [blame] | 280 | } |
| 281 | |
Erik Språng | 616b233 | 2019-02-11 14:16:28 +0100 | [diff] [blame] | 282 | // Restricted network and encoder overproducing by 30%. |
| 283 | TEST(FullStackTest, ForemanCifLink150kbpsBadRateController) { |
| 284 | auto fixture = CreateVideoQualityTestFixture(); |
| 285 | ParamsWithLogging foreman_cif; |
| 286 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 287 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 288 | false, "VP8", 1, 0, 0, false, false, |
| 289 | true, "foreman_cif", 0, {}, 1.30}; |
Erik Språng | 616b233 | 2019-02-11 14:16:28 +0100 | [diff] [blame] | 290 | foreman_cif.analyzer = { |
| 291 | "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0, |
| 292 | kFullStackTestDurationSecs}; |
| 293 | foreman_cif.config->link_capacity_kbps = 150; |
| 294 | foreman_cif.config->queue_length_packets = 30; |
| 295 | foreman_cif.config->queue_delay_ms = 100; |
| 296 | fixture->RunWithAnalyzer(foreman_cif); |
| 297 | } |
| 298 | |
Erik Språng | 8b8d01a | 2019-03-02 20:54:55 +0100 | [diff] [blame] | 299 | // Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue. |
| 300 | // Packet rate and loss are low enough that loss will happen with ~3s interval. |
| 301 | // This triggers protection overhead to toggle between zero and non-zero. |
| 302 | // Link queue is restrictive enough to trigger loss on probes. |
| 303 | TEST(FullStackTest, ForemanCifMediaCapacitySmallLossAndQueue) { |
| 304 | auto fixture = CreateVideoQualityTestFixture(); |
| 305 | ParamsWithLogging foreman_cif; |
| 306 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 307 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 308 | false, "VP8", 1, 0, 0, false, false, |
| 309 | true, "foreman_cif", 0, {}, 1.30}; |
Erik Språng | 8b8d01a | 2019-03-02 20:54:55 +0100 | [diff] [blame] | 310 | foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1", |
| 311 | 0.0, 0.0, kFullStackTestDurationSecs}; |
| 312 | foreman_cif.config->link_capacity_kbps = 250; |
| 313 | foreman_cif.config->queue_length_packets = 10; |
| 314 | foreman_cif.config->queue_delay_ms = 100; |
| 315 | foreman_cif.config->loss_percent = 1; |
| 316 | fixture->RunWithAnalyzer(foreman_cif); |
| 317 | } |
| 318 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 319 | TEST_P(GenericDescriptorTest, ForemanCifPlr5) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 320 | auto fixture = CreateVideoQualityTestFixture(); |
| 321 | ParamsWithLogging foreman_cif; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 322 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 323 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 324 | false, "VP8", 1, 0, 0, false, false, |
| 325 | true, "foreman_cif"}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 326 | foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0, |
Lu Liu | 6f68324 | 2018-09-25 18:48:48 +0000 | [diff] [blame] | 327 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 328 | foreman_cif.config->loss_percent = 5; |
| 329 | foreman_cif.config->queue_delay_ms = 50; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 330 | foreman_cif.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 331 | fixture->RunWithAnalyzer(foreman_cif); |
stefan@webrtc.org | c216b9a | 2014-10-14 10:38:49 +0000 | [diff] [blame] | 332 | } |
| 333 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 334 | TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 335 | auto fixture = CreateVideoQualityTestFixture(); |
| 336 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 337 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 338 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 339 | false, "VP8", 1, 0, 0, true, false, |
| 340 | true, "foreman_cif"}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 341 | foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"), |
| 342 | 0.0, 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 343 | foreman_cif.config->loss_percent = 5; |
| 344 | foreman_cif.config->queue_delay_ms = 50; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 345 | foreman_cif.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 346 | fixture->RunWithAnalyzer(foreman_cif); |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 347 | } |
| 348 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 349 | TEST(FullStackTest, ForemanCifPlr5Flexfec) { |
| 350 | auto fixture = CreateVideoQualityTestFixture(); |
| 351 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 352 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 353 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 354 | false, "VP8", 1, 0, 0, false, true, |
| 355 | true, "foreman_cif"}; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 356 | foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0, |
| 357 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 358 | foreman_cif.config->loss_percent = 5; |
| 359 | foreman_cif.config->queue_delay_ms = 50; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 360 | fixture->RunWithAnalyzer(foreman_cif); |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 361 | } |
| 362 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 363 | TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) { |
| 364 | auto fixture = CreateVideoQualityTestFixture(); |
| 365 | ParamsWithLogging foreman_cif; |
stefan | 889d965 | 2017-07-05 03:03:02 -0700 | [diff] [blame] | 366 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 367 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 368 | false, "VP8", 1, 0, 0, false, true, |
| 369 | true, "foreman_cif"}; |
stefan | 889d965 | 2017-07-05 03:03:02 -0700 | [diff] [blame] | 370 | foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0, |
| 371 | 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 372 | foreman_cif.config->loss_percent = 3; |
| 373 | foreman_cif.config->link_capacity_kbps = 500; |
| 374 | foreman_cif.config->queue_delay_ms = 50; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 375 | fixture->RunWithAnalyzer(foreman_cif); |
stefan | 889d965 | 2017-07-05 03:03:02 -0700 | [diff] [blame] | 376 | } |
| 377 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 378 | TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) { |
| 379 | auto fixture = CreateVideoQualityTestFixture(); |
| 380 | ParamsWithLogging foreman_cif; |
stefan | 889d965 | 2017-07-05 03:03:02 -0700 | [diff] [blame] | 381 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 382 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 383 | false, "VP8", 1, 0, 0, true, false, |
| 384 | true, "foreman_cif"}; |
stefan | 889d965 | 2017-07-05 03:03:02 -0700 | [diff] [blame] | 385 | foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0, |
| 386 | 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 387 | foreman_cif.config->loss_percent = 3; |
| 388 | foreman_cif.config->link_capacity_kbps = 500; |
| 389 | foreman_cif.config->queue_delay_ms = 50; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 390 | fixture->RunWithAnalyzer(foreman_cif); |
stefan | 889d965 | 2017-07-05 03:03:02 -0700 | [diff] [blame] | 391 | } |
| 392 | |
brandtr | dd369c6 | 2016-11-16 23:56:57 -0800 | [diff] [blame] | 393 | #if defined(WEBRTC_USE_H264) |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 394 | TEST(FullStackTest, ForemanCifWithoutPacketlossH264) { |
| 395 | auto fixture = CreateVideoQualityTestFixture(); |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 396 | // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 397 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 398 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 399 | foreman_cif.video[0] = {true, 352, 288, 30, 700000, 700000, 700000, |
| 400 | false, "H264", 1, 0, 0, false, false, |
| 401 | true, "foreman_cif"}; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 402 | foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0, |
| 403 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 404 | fixture->RunWithAnalyzer(foreman_cif); |
brandtr | dd369c6 | 2016-11-16 23:56:57 -0800 | [diff] [blame] | 405 | } |
| 406 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 407 | TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) { |
| 408 | auto fixture = CreateVideoQualityTestFixture(); |
| 409 | ParamsWithLogging foreman_cif; |
asapersson | fb6ad3b | 2016-12-16 06:54:01 -0800 | [diff] [blame] | 410 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 411 | foreman_cif.video[0] = {true, 352, 288, 10, 30000, 30000, 30000, |
| 412 | false, "H264", 1, 0, 0, false, false, |
| 413 | true, "foreman_cif"}; |
asapersson | fb6ad3b | 2016-12-16 06:54:01 -0800 | [diff] [blame] | 414 | foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0, |
| 415 | 0.0, kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 416 | fixture->RunWithAnalyzer(foreman_cif); |
asapersson | fb6ad3b | 2016-12-16 06:54:01 -0800 | [diff] [blame] | 417 | } |
| 418 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 419 | TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 420 | auto fixture = CreateVideoQualityTestFixture(); |
| 421 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 422 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 423 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 424 | false, "H264", 1, 0, 0, false, false, |
| 425 | true, "foreman_cif"}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 426 | foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0, |
| 427 | 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 428 | foreman_cif.config->loss_percent = 5; |
| 429 | foreman_cif.config->queue_delay_ms = 50; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 430 | foreman_cif.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 431 | fixture->RunWithAnalyzer(foreman_cif); |
brandtr | dd369c6 | 2016-11-16 23:56:57 -0800 | [diff] [blame] | 432 | } |
| 433 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 434 | TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) { |
Rasmus Brandt | 88f080a | 2017-11-02 14:28:06 +0100 | [diff] [blame] | 435 | test::ScopedFieldTrials override_field_trials( |
Erik Språng | b6b1cac | 2018-08-09 16:12:54 +0200 | [diff] [blame] | 436 | AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/")); |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 437 | auto fixture = CreateVideoQualityTestFixture(); |
Rasmus Brandt | 88f080a | 2017-11-02 14:28:06 +0100 | [diff] [blame] | 438 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 439 | ParamsWithLogging foreman_cif; |
Rasmus Brandt | 88f080a | 2017-11-02 14:28:06 +0100 | [diff] [blame] | 440 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 441 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 442 | false, "H264", 1, 0, 0, false, false, |
| 443 | true, "foreman_cif"}; |
Rasmus Brandt | 88f080a | 2017-11-02 14:28:06 +0100 | [diff] [blame] | 444 | foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0, |
| 445 | 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 446 | foreman_cif.config->loss_percent = 5; |
| 447 | foreman_cif.config->queue_delay_ms = 50; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 448 | fixture->RunWithAnalyzer(foreman_cif); |
Rasmus Brandt | 88f080a | 2017-11-02 14:28:06 +0100 | [diff] [blame] | 449 | } |
| 450 | |
brandtr | dd369c6 | 2016-11-16 23:56:57 -0800 | [diff] [blame] | 451 | // Verify that this is worth the bot time, before enabling. |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 452 | TEST(FullStackTest, ForemanCifPlr5H264Flexfec) { |
| 453 | auto fixture = CreateVideoQualityTestFixture(); |
| 454 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 455 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 456 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 457 | false, "H264", 1, 0, 0, false, true, |
| 458 | true, "foreman_cif"}; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 459 | foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0, |
| 460 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 461 | foreman_cif.config->loss_percent = 5; |
| 462 | foreman_cif.config->queue_delay_ms = 50; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 463 | fixture->RunWithAnalyzer(foreman_cif); |
brandtr | dd369c6 | 2016-11-16 23:56:57 -0800 | [diff] [blame] | 464 | } |
| 465 | |
| 466 | // Ulpfec with H264 is an unsupported combination, so this test is only useful |
| 467 | // for debugging. It is therefore disabled by default. |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 468 | TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) { |
| 469 | auto fixture = CreateVideoQualityTestFixture(); |
| 470 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 471 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 472 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 473 | false, "H264", 1, 0, 0, true, false, |
| 474 | true, "foreman_cif"}; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 475 | foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0, |
| 476 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 477 | foreman_cif.config->loss_percent = 5; |
| 478 | foreman_cif.config->queue_delay_ms = 50; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 479 | fixture->RunWithAnalyzer(foreman_cif); |
brandtr | dd369c6 | 2016-11-16 23:56:57 -0800 | [diff] [blame] | 480 | } |
| 481 | #endif // defined(WEBRTC_USE_H264) |
| 482 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 483 | TEST(FullStackTest, ForemanCif500kbps) { |
| 484 | auto fixture = CreateVideoQualityTestFixture(); |
| 485 | ParamsWithLogging foreman_cif; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 486 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 487 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 488 | false, "VP8", 1, 0, 0, false, false, |
| 489 | true, "foreman_cif"}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 490 | foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0, |
| 491 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 492 | foreman_cif.config->queue_length_packets = 0; |
| 493 | foreman_cif.config->queue_delay_ms = 0; |
| 494 | foreman_cif.config->link_capacity_kbps = 500; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 495 | fixture->RunWithAnalyzer(foreman_cif); |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 496 | } |
| 497 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 498 | TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) { |
| 499 | auto fixture = CreateVideoQualityTestFixture(); |
| 500 | ParamsWithLogging foreman_cif; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 501 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 502 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 503 | false, "VP8", 1, 0, 0, false, false, |
| 504 | true, "foreman_cif"}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 505 | foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0, |
| 506 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 507 | foreman_cif.config->queue_length_packets = 32; |
| 508 | foreman_cif.config->queue_delay_ms = 0; |
| 509 | foreman_cif.config->link_capacity_kbps = 500; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 510 | fixture->RunWithAnalyzer(foreman_cif); |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 511 | } |
| 512 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 513 | TEST(FullStackTest, ForemanCif500kbps100ms) { |
| 514 | auto fixture = CreateVideoQualityTestFixture(); |
| 515 | ParamsWithLogging foreman_cif; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 516 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 517 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 518 | false, "VP8", 1, 0, 0, false, false, |
| 519 | true, "foreman_cif"}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 520 | foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0, |
| 521 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 522 | foreman_cif.config->queue_length_packets = 0; |
| 523 | foreman_cif.config->queue_delay_ms = 100; |
| 524 | foreman_cif.config->link_capacity_kbps = 500; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 525 | fixture->RunWithAnalyzer(foreman_cif); |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 526 | } |
| 527 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 528 | TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 529 | auto fixture = CreateVideoQualityTestFixture(); |
| 530 | ParamsWithLogging foreman_cif; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 531 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 532 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 533 | false, "VP8", 1, 0, 0, false, false, |
| 534 | true, "foreman_cif"}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 535 | foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"), |
| 536 | 0.0, 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 537 | foreman_cif.config->queue_length_packets = 32; |
| 538 | foreman_cif.config->queue_delay_ms = 100; |
| 539 | foreman_cif.config->link_capacity_kbps = 500; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 540 | foreman_cif.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 541 | fixture->RunWithAnalyzer(foreman_cif); |
stefan | b179767 | 2016-08-11 07:00:57 -0700 | [diff] [blame] | 542 | } |
| 543 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 544 | TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) { |
| 545 | auto fixture = CreateVideoQualityTestFixture(); |
| 546 | ParamsWithLogging foreman_cif; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 547 | foreman_cif.call.send_side_bwe = false; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 548 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 500000, 2000000, |
| 549 | false, "VP8", 1, 0, 0, false, false, |
| 550 | true, "foreman_cif"}; |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 551 | foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe", |
| 552 | 0.0, 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 553 | foreman_cif.config->queue_length_packets = 32; |
| 554 | foreman_cif.config->queue_delay_ms = 100; |
| 555 | foreman_cif.config->link_capacity_kbps = 500; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 556 | fixture->RunWithAnalyzer(foreman_cif); |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 557 | } |
| 558 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 559 | TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) { |
| 560 | auto fixture = CreateVideoQualityTestFixture(); |
| 561 | ParamsWithLogging foreman_cif; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 562 | foreman_cif.call.send_side_bwe = true; |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 563 | foreman_cif.video[0] = {true, 352, 288, 30, 30000, 2000000, 2000000, |
| 564 | false, "VP8", 1, 0, 0, false, false, |
| 565 | true, "foreman_cif"}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 566 | foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0, |
| 567 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 568 | foreman_cif.config->queue_length_packets = 32; |
| 569 | foreman_cif.config->queue_delay_ms = 100; |
| 570 | foreman_cif.config->link_capacity_kbps = 1000; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 571 | fixture->RunWithAnalyzer(foreman_cif); |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 572 | } |
sprang@webrtc.org | 131bea8 | 2015-02-18 12:46:06 +0000 | [diff] [blame] | 573 | |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 574 | // TODO(sprang): Remove this if we have the similar ModerateLimits below? |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 575 | TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) { |
| 576 | auto fixture = CreateVideoQualityTestFixture(); |
| 577 | ParamsWithLogging conf_motion_hd; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 578 | conf_motion_hd.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 579 | conf_motion_hd.video[0] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 580 | true, 1280, 720, 50, 30000, |
| 581 | 3000000, 3000000, false, "VP8", 1, |
| 582 | 0, 0, false, false, false, "ConferenceMotion_1280_720_50"}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 583 | conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue", |
| 584 | 0.0, 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 585 | conf_motion_hd.config->queue_length_packets = 32; |
| 586 | conf_motion_hd.config->queue_delay_ms = 100; |
| 587 | conf_motion_hd.config->link_capacity_kbps = 2000; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 588 | fixture->RunWithAnalyzer(conf_motion_hd); |
stefan | b179767 | 2016-08-11 07:00:57 -0700 | [diff] [blame] | 589 | } |
| 590 | |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 591 | // TODO(webrtc:9722): Remove when experiment is cleaned up. |
| 592 | TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) { |
| 593 | test::ScopedFieldTrials override_field_trials( |
| 594 | AppendFieldTrials(kVp8TrustedRateControllerFieldTrial)); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 595 | auto fixture = CreateVideoQualityTestFixture(); |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 596 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 597 | ParamsWithLogging conf_motion_hd; |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 598 | conf_motion_hd.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 599 | conf_motion_hd.video[0] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 600 | true, 1280, 720, 50, 30000, |
| 601 | 3000000, 3000000, false, "VP8", 1, |
| 602 | -1, 0, false, false, false, "ConferenceMotion_1280_720_50"}; |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 603 | conf_motion_hd.analyzer = { |
| 604 | "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0, |
| 605 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 606 | conf_motion_hd.config->queue_length_packets = 50; |
| 607 | conf_motion_hd.config->loss_percent = 3; |
| 608 | conf_motion_hd.config->queue_delay_ms = 100; |
| 609 | conf_motion_hd.config->link_capacity_kbps = 2000; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 610 | fixture->RunWithAnalyzer(conf_motion_hd); |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 611 | } |
| 612 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 613 | TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 614 | auto fixture = CreateVideoQualityTestFixture(); |
| 615 | ParamsWithLogging conf_motion_hd; |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 616 | conf_motion_hd.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 617 | conf_motion_hd.video[0] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 618 | true, 1280, 720, 50, 30000, |
| 619 | 3000000, 3000000, false, "VP8", 2, |
| 620 | -1, 0, false, false, false, "ConferenceMotion_1280_720_50"}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 621 | conf_motion_hd.analyzer = { |
| 622 | GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0, |
| 623 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 624 | conf_motion_hd.config->queue_length_packets = 50; |
| 625 | conf_motion_hd.config->loss_percent = 3; |
| 626 | conf_motion_hd.config->queue_delay_ms = 100; |
| 627 | conf_motion_hd.config->link_capacity_kbps = 2000; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 628 | conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 629 | fixture->RunWithAnalyzer(conf_motion_hd); |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 630 | } |
| 631 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 632 | TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) { |
| 633 | auto fixture = CreateVideoQualityTestFixture(); |
| 634 | ParamsWithLogging conf_motion_hd; |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 635 | conf_motion_hd.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 636 | conf_motion_hd.video[0] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 637 | true, 1280, 720, 50, 30000, |
| 638 | 3000000, 3000000, false, "VP8", 3, |
| 639 | -1, 0, false, false, false, "ConferenceMotion_1280_720_50"}; |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 640 | conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0, |
| 641 | 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 642 | conf_motion_hd.config->queue_length_packets = 50; |
| 643 | conf_motion_hd.config->loss_percent = 3; |
| 644 | conf_motion_hd.config->queue_delay_ms = 100; |
| 645 | conf_motion_hd.config->link_capacity_kbps = 2000; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 646 | fixture->RunWithAnalyzer(conf_motion_hd); |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 647 | } |
| 648 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 649 | TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) { |
| 650 | auto fixture = CreateVideoQualityTestFixture(); |
| 651 | ParamsWithLogging conf_motion_hd; |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 652 | conf_motion_hd.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 653 | conf_motion_hd.video[0] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 654 | true, 1280, 720, 50, 30000, |
| 655 | 3000000, 3000000, false, "VP8", 4, |
| 656 | -1, 0, false, false, false, "ConferenceMotion_1280_720_50"}; |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 657 | conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0, |
| 658 | 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 659 | conf_motion_hd.config->queue_length_packets = 50; |
| 660 | conf_motion_hd.config->loss_percent = 3; |
| 661 | conf_motion_hd.config->queue_delay_ms = 100; |
| 662 | conf_motion_hd.config->link_capacity_kbps = 2000; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 663 | fixture->RunWithAnalyzer(conf_motion_hd); |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 664 | } |
| 665 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 666 | TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) { |
Erik Språng | b6b1cac | 2018-08-09 16:12:54 +0200 | [diff] [blame] | 667 | test::ScopedFieldTrials field_trial( |
| 668 | AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/")); |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 669 | auto fixture = CreateVideoQualityTestFixture(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 670 | ParamsWithLogging conf_motion_hd; |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 671 | conf_motion_hd.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 672 | conf_motion_hd.video[0] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 673 | true, 1280, 720, 50, |
| 674 | 30000, 3000000, 3000000, false, |
| 675 | "VP8", 3, -1, 0, |
| 676 | false, false, false, "ConferenceMotion_1280_720_50"}; |
Rasmus Brandt | 3583693 | 2018-10-23 09:17:24 +0200 | [diff] [blame] | 677 | conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits", |
| 678 | 0.0, 0.0, kFullStackTestDurationSecs}; |
| 679 | conf_motion_hd.config->queue_length_packets = 50; |
| 680 | conf_motion_hd.config->loss_percent = 3; |
| 681 | conf_motion_hd.config->queue_delay_ms = 100; |
| 682 | conf_motion_hd.config->link_capacity_kbps = 2000; |
| 683 | fixture->RunWithAnalyzer(conf_motion_hd); |
| 684 | } |
| 685 | |
| 686 | TEST(FullStackTest, |
| 687 | ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) { |
| 688 | auto fixture = CreateVideoQualityTestFixture(); |
| 689 | test::ScopedFieldTrials field_trial( |
| 690 | AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/" |
| 691 | "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/")); |
| 692 | ParamsWithLogging conf_motion_hd; |
| 693 | conf_motion_hd.call.send_side_bwe = true; |
| 694 | conf_motion_hd.video[0] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 695 | true, 1280, 720, 50, 30000, |
| 696 | 3000000, 3000000, false, "VP8", 3, |
| 697 | -1, 0, false, false, false, "ConferenceMotion_1280_720_50"}; |
Rasmus Brandt | 3583693 | 2018-10-23 09:17:24 +0200 | [diff] [blame] | 698 | conf_motion_hd.analyzer = { |
| 699 | "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0, |
| 700 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 701 | conf_motion_hd.config->queue_length_packets = 50; |
| 702 | conf_motion_hd.config->loss_percent = 3; |
| 703 | conf_motion_hd.config->queue_delay_ms = 100; |
| 704 | conf_motion_hd.config->link_capacity_kbps = 2000; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 705 | fixture->RunWithAnalyzer(conf_motion_hd); |
sprang | ff19d35 | 2017-09-06 07:14:02 -0700 | [diff] [blame] | 706 | } |
| 707 | |
Mirko Bonadei | 8ef5793 | 2018-11-16 14:38:03 +0100 | [diff] [blame] | 708 | #if defined(RTC_ENABLE_VP9) |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 709 | TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) { |
| 710 | auto fixture = CreateVideoQualityTestFixture(); |
| 711 | ParamsWithLogging conf_motion_hd; |
jianj | 390e64d | 2017-02-03 09:51:23 -0800 | [diff] [blame] | 712 | conf_motion_hd.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 713 | conf_motion_hd.video[0] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 714 | true, 1280, 720, 50, 30000, |
| 715 | 3000000, 3000000, false, "VP9", 1, |
| 716 | 0, 0, false, false, false, "ConferenceMotion_1280_720_50"}; |
jianj | 390e64d | 2017-02-03 09:51:23 -0800 | [diff] [blame] | 717 | conf_motion_hd.analyzer = { |
| 718 | "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0, |
| 719 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 720 | conf_motion_hd.config->queue_length_packets = 32; |
| 721 | conf_motion_hd.config->queue_delay_ms = 100; |
| 722 | conf_motion_hd.config->link_capacity_kbps = 2000; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 723 | fixture->RunWithAnalyzer(conf_motion_hd); |
jianj | 390e64d | 2017-02-03 09:51:23 -0800 | [diff] [blame] | 724 | } |
| 725 | #endif |
| 726 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 727 | TEST(FullStackTest, ScreenshareSlidesVP8_2TL) { |
| 728 | auto fixture = CreateVideoQualityTestFixture(); |
| 729 | ParamsWithLogging screenshare; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 730 | screenshare.call.send_side_bwe = true; |
Erik Språng | 28bb391 | 2018-07-11 16:06:55 +0200 | [diff] [blame] | 731 | screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000, |
| 732 | 1000000, false, "VP8", 2, 1, 400000, |
| 733 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 734 | screenshare.screenshare[0] = {true, false, 10}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 735 | screenshare.analyzer = {"screenshare_slides", 0.0, 0.0, |
| 736 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 737 | fixture->RunWithAnalyzer(screenshare); |
Erik Språng | 6ee69aa | 2015-09-03 15:58:05 +0200 | [diff] [blame] | 738 | } |
| 739 | |
Ilya Nikolaevskiy | f08dd9d | 2018-10-09 17:22:15 +0200 | [diff] [blame] | 740 | #if !defined(WEBRTC_MAC) |
Oskar Sundbom | 8bacf25 | 2019-01-08 16:40:08 +0100 | [diff] [blame] | 741 | // All the tests using this constant are disabled on Mac. |
Ilya Nikolaevskiy | f08dd9d | 2018-10-09 17:22:15 +0200 | [diff] [blame] | 742 | const char kScreenshareSimulcastExperiment[] = |
| 743 | "WebRTC-SimulcastScreenshare/Enabled/"; |
Oskar Sundbom | 8bacf25 | 2019-01-08 16:40:08 +0100 | [diff] [blame] | 744 | // TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac. |
| 745 | #if !defined(WEBRTC_WIN) |
Ilya Nikolaevskiy | 7b41225 | 2019-03-06 16:40:42 +0100 | [diff] [blame] | 746 | const char kScreenshareSimulcastVariableFramerateExperiment[] = |
| 747 | "WebRTC-SimulcastScreenshare/Enabled/" |
| 748 | "WebRTC-VP8VariableFramerateScreenshare/" |
| 749 | "Enabled,min_fps:5.0,min_qp:15,undershoot:30/"; |
Ilya Nikolaevskiy | dda5fdc | 2019-02-27 10:00:06 +0100 | [diff] [blame] | 750 | TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) { |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 751 | test::ScopedFieldTrials field_trial( |
| 752 | AppendFieldTrials(kScreenshareSimulcastExperiment)); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 753 | auto fixture = CreateVideoQualityTestFixture(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 754 | ParamsWithLogging screenshare; |
ilnik | cb8c146 | 2017-03-09 09:23:30 -0800 | [diff] [blame] | 755 | screenshare.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 756 | screenshare.screenshare[0] = {true, false, 10}; |
Ilya Nikolaevskiy | dda5fdc | 2019-02-27 10:00:06 +0100 | [diff] [blame] | 757 | screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000, |
Ilya Nikolaevskiy | aec663e | 2019-02-27 12:52:11 +0100 | [diff] [blame] | 758 | 2500000, false, "VP8", 2, 1, 400000, |
Ilya Nikolaevskiy | dda5fdc | 2019-02-27 10:00:06 +0100 | [diff] [blame] | 759 | false, false, false, ""}; |
ilnik | cb8c146 | 2017-03-09 09:23:30 -0800 | [diff] [blame] | 760 | screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0, |
| 761 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 762 | ParamsWithLogging screenshare_params_high; |
Ilya Nikolaevskiy | dda5fdc | 2019-02-27 10:00:06 +0100 | [diff] [blame] | 763 | screenshare_params_high.video[0] = { |
| 764 | true, 1850, 1110, 60, 600000, 1250000, 1250000, false, |
| 765 | "VP8", 2, 0, 400000, false, false, false, ""}; |
ilnik | cb8c146 | 2017-03-09 09:23:30 -0800 | [diff] [blame] | 766 | VideoQualityTest::Params screenshare_params_low; |
Ilya Nikolaevskiy | dda5fdc | 2019-02-27 10:00:06 +0100 | [diff] [blame] | 767 | screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000, |
Erik Språng | 28bb391 | 2018-07-11 16:06:55 +0200 | [diff] [blame] | 768 | 1000000, false, "VP8", 2, 0, 400000, |
| 769 | false, false, false, ""}; |
ilnik | cb8c146 | 2017-03-09 09:23:30 -0800 | [diff] [blame] | 770 | |
| 771 | std::vector<VideoStream> streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 772 | VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0), |
| 773 | VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)}; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 774 | screenshare.ss[0] = { |
| 775 | streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 776 | false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 777 | fixture->RunWithAnalyzer(screenshare); |
ilnik | cb8c146 | 2017-03-09 09:23:30 -0800 | [diff] [blame] | 778 | } |
Ilya Nikolaevskiy | 7b41225 | 2019-03-06 16:40:42 +0100 | [diff] [blame] | 779 | |
| 780 | TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_Variable_Framerate) { |
| 781 | test::ScopedFieldTrials field_trial( |
| 782 | AppendFieldTrials(kScreenshareSimulcastVariableFramerateExperiment)); |
| 783 | auto fixture = CreateVideoQualityTestFixture(); |
| 784 | ParamsWithLogging screenshare; |
| 785 | screenshare.call.send_side_bwe = true; |
| 786 | screenshare.screenshare[0] = {true, false, 10}; |
| 787 | screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000, |
| 788 | 2500000, false, "VP8", 2, 1, 400000, |
| 789 | false, false, false, ""}; |
| 790 | screenshare.analyzer = {"screenshare_slides_simulcast_variable_framerate", |
| 791 | 0.0, 0.0, kFullStackTestDurationSecs}; |
| 792 | ParamsWithLogging screenshare_params_high; |
| 793 | screenshare_params_high.video[0] = { |
| 794 | true, 1850, 1110, 60, 600000, 1250000, 1250000, false, |
| 795 | "VP8", 2, 0, 400000, false, false, false, ""}; |
| 796 | VideoQualityTest::Params screenshare_params_low; |
| 797 | screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000, |
| 798 | 1000000, false, "VP8", 2, 0, 400000, |
| 799 | false, false, false, ""}; |
| 800 | |
| 801 | std::vector<VideoStream> streams = { |
| 802 | VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0), |
| 803 | VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)}; |
| 804 | screenshare.ss[0] = { |
| 805 | streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 806 | false}; |
| 807 | fixture->RunWithAnalyzer(screenshare); |
| 808 | } |
Oskar Sundbom | 8bacf25 | 2019-01-08 16:40:08 +0100 | [diff] [blame] | 809 | #endif // !defined(WEBRTC_WIN) |
Ilya Nikolaevskiy | f08dd9d | 2018-10-09 17:22:15 +0200 | [diff] [blame] | 810 | #endif // !defined(WEBRTC_MAC) |
ilnik | cb8c146 | 2017-03-09 09:23:30 -0800 | [diff] [blame] | 811 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 812 | TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) { |
| 813 | auto fixture = CreateVideoQualityTestFixture(); |
| 814 | ParamsWithLogging config; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 815 | config.call.send_side_bwe = true; |
Erik Språng | 28bb391 | 2018-07-11 16:06:55 +0200 | [diff] [blame] | 816 | config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000, |
| 817 | 1000000, false, "VP8", 2, 1, 400000, |
| 818 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 819 | config.screenshare[0] = {true, false, 10, 2}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 820 | config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0, |
| 821 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 822 | fixture->RunWithAnalyzer(config); |
ivica | 028cf48 | 2015-07-30 02:15:56 -0700 | [diff] [blame] | 823 | } |
| 824 | |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 825 | TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 826 | auto fixture = CreateVideoQualityTestFixture(); |
| 827 | ParamsWithLogging screenshare; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 828 | screenshare.call.send_side_bwe = true; |
Erik Språng | 28bb391 | 2018-07-11 16:06:55 +0200 | [diff] [blame] | 829 | screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000, |
| 830 | 1000000, false, "VP8", 2, 1, 400000, |
| 831 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 832 | screenshare.screenshare[0] = {true, false, 10}; |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 833 | screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0, |
Lu Liu | 6f68324 | 2018-09-25 18:48:48 +0000 | [diff] [blame] | 834 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 835 | screenshare.config->loss_percent = 5; |
| 836 | screenshare.config->queue_delay_ms = 200; |
| 837 | screenshare.config->link_capacity_kbps = 500; |
philipel | f638bbc | 2018-10-04 16:57:12 +0200 | [diff] [blame] | 838 | screenshare.call.generic_descriptor = GenericDescriptorEnabled(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 839 | fixture->RunWithAnalyzer(screenshare); |
sprang | ee37de3 | 2015-11-23 06:10:23 -0800 | [diff] [blame] | 840 | } |
| 841 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 842 | TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) { |
| 843 | auto fixture = CreateVideoQualityTestFixture(); |
| 844 | ParamsWithLogging screenshare; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 845 | screenshare.call.send_side_bwe = true; |
Erik Språng | 28bb391 | 2018-07-11 16:06:55 +0200 | [diff] [blame] | 846 | screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000, |
| 847 | 1000000, false, "VP8", 2, 1, 400000, |
| 848 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 849 | screenshare.screenshare[0] = {true, false, 10}; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 850 | screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0, |
| 851 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 852 | screenshare.config->loss_percent = 10; |
| 853 | screenshare.config->queue_delay_ms = 200; |
| 854 | screenshare.config->link_capacity_kbps = 500; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 855 | fixture->RunWithAnalyzer(screenshare); |
sprang | ee37de3 | 2015-11-23 06:10:23 -0800 | [diff] [blame] | 856 | } |
| 857 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 858 | TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) { |
| 859 | auto fixture = CreateVideoQualityTestFixture(); |
| 860 | ParamsWithLogging screenshare; |
sprang | e566e17 | 2017-06-08 01:29:15 -0700 | [diff] [blame] | 861 | screenshare.call.send_side_bwe = true; |
Erik Språng | 28bb391 | 2018-07-11 16:06:55 +0200 | [diff] [blame] | 862 | screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000, |
| 863 | 1000000, false, "VP8", 2, 1, 400000, |
| 864 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 865 | screenshare.screenshare[0] = {true, false, 10}; |
sprang | e566e17 | 2017-06-08 01:29:15 -0700 | [diff] [blame] | 866 | screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0, |
| 867 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 868 | screenshare.config->loss_percent = 5; |
| 869 | screenshare.config->link_capacity_kbps = 200; |
| 870 | screenshare.config->queue_length_packets = 30; |
sprang | e566e17 | 2017-06-08 01:29:15 -0700 | [diff] [blame] | 871 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 872 | fixture->RunWithAnalyzer(screenshare); |
sprang | e566e17 | 2017-06-08 01:29:15 -0700 | [diff] [blame] | 873 | } |
| 874 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 875 | TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) { |
| 876 | auto fixture = CreateVideoQualityTestFixture(); |
| 877 | ParamsWithLogging screenshare; |
sprang | 89c4a7e | 2017-06-30 13:27:40 -0700 | [diff] [blame] | 878 | screenshare.call.send_side_bwe = true; |
Erik Språng | 28bb391 | 2018-07-11 16:06:55 +0200 | [diff] [blame] | 879 | screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000, |
| 880 | 1000000, false, "VP8", 2, 1, 400000, |
| 881 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 882 | screenshare.screenshare[0] = {true, false, 10}; |
sprang | 89c4a7e | 2017-06-30 13:27:40 -0700 | [diff] [blame] | 883 | screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0, |
| 884 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 885 | screenshare.config->loss_percent = 1; |
| 886 | screenshare.config->link_capacity_kbps = 1200; |
| 887 | screenshare.config->queue_length_packets = 30; |
sprang | 89c4a7e | 2017-06-30 13:27:40 -0700 | [diff] [blame] | 888 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 889 | fixture->RunWithAnalyzer(screenshare); |
sprang | 89c4a7e | 2017-06-30 13:27:40 -0700 | [diff] [blame] | 890 | } |
| 891 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 892 | const ParamsWithLogging::Video kSvcVp9Video = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 893 | true, 1280, 720, 30, 800000, |
| 894 | 2500000, 2500000, false, "VP9", 3, |
| 895 | 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"}; |
ilnik | 566c43b | 2017-03-07 04:42:54 -0800 | [diff] [blame] | 896 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 897 | const ParamsWithLogging::Video kSimulcastVp8VideoHigh = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 898 | true, 1280, 720, 30, 800000, |
| 899 | 2500000, 2500000, false, "VP8", 3, |
| 900 | 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"}; |
ilnik | 566c43b | 2017-03-07 04:42:54 -0800 | [diff] [blame] | 901 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 902 | const ParamsWithLogging::Video kSimulcastVp8VideoMedium = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 903 | true, 640, 360, 30, 150000, |
| 904 | 500000, 700000, false, "VP8", 3, |
| 905 | 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"}; |
ilnik | 566c43b | 2017-03-07 04:42:54 -0800 | [diff] [blame] | 906 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 907 | const ParamsWithLogging::Video kSimulcastVp8VideoLow = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 908 | true, 320, 180, 30, 30000, |
| 909 | 150000, 200000, false, "VP8", 3, |
| 910 | 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"}; |
ilnik | 566c43b | 2017-03-07 04:42:54 -0800 | [diff] [blame] | 911 | |
Mirko Bonadei | 8ef5793 | 2018-11-16 14:38:03 +0100 | [diff] [blame] | 912 | #if defined(RTC_ENABLE_VP9) |
Ilya Nikolaevskiy | 6117068 | 2019-03-06 16:04:32 +0100 | [diff] [blame] | 913 | |
| 914 | TEST(FullStackTest, ScreenshareSlidesVP9_3SL_High_Fps) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 915 | auto fixture = CreateVideoQualityTestFixture(); |
| 916 | ParamsWithLogging screenshare; |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 917 | screenshare.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 6117068 | 2019-03-06 16:04:32 +0100 | [diff] [blame] | 918 | screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000, |
| 919 | 2000000, false, "VP9", 1, 0, 400000, |
| 920 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 921 | screenshare.screenshare[0] = {true, false, 10}; |
Ilya Nikolaevskiy | 6117068 | 2019-03-06 16:04:32 +0100 | [diff] [blame] | 922 | screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0, |
minyue | 626bc95 | 2016-10-31 05:47:02 -0700 | [diff] [blame] | 923 | kFullStackTestDurationSecs}; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 924 | screenshare.ss[0] = { |
Ilya Nikolaevskiy | 6117068 | 2019-03-06 16:04:32 +0100 | [diff] [blame] | 925 | std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn, |
| 926 | std::vector<SpatialLayer>(), true}; |
| 927 | fixture->RunWithAnalyzer(screenshare); |
| 928 | } |
| 929 | |
| 930 | TEST(FullStackTest, ScreenshareSlidesVP9_3SL_Variable_Fps) { |
| 931 | webrtc::test::ScopedFieldTrials override_trials( |
| 932 | AppendFieldTrials("WebRTC-VP9VariableFramerateScreenshare/" |
| 933 | "Enabled,min_qp:32,min_fps:5.0,undershoot:30,frames_" |
| 934 | "before_steady_state:5/")); |
| 935 | auto fixture = CreateVideoQualityTestFixture(); |
| 936 | ParamsWithLogging screenshare; |
| 937 | screenshare.call.send_side_bwe = true; |
| 938 | screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000, |
| 939 | 2000000, false, "VP9", 1, 0, 400000, |
| 940 | false, false, false, ""}; |
| 941 | screenshare.screenshare[0] = {true, false, 10}; |
| 942 | screenshare.analyzer = {"screenshare_slides_vp9_3sl_variable_fps", 0.0, 0.0, |
| 943 | kFullStackTestDurationSecs}; |
| 944 | screenshare.ss[0] = { |
| 945 | std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn, |
| 946 | std::vector<SpatialLayer>(), true}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 947 | fixture->RunWithAnalyzer(screenshare); |
sprang@webrtc.org | 131bea8 | 2015-02-18 12:46:06 +0000 | [diff] [blame] | 948 | } |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 949 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 950 | TEST(FullStackTest, VP9SVC_3SL_High) { |
| 951 | auto fixture = CreateVideoQualityTestFixture(); |
| 952 | ParamsWithLogging simulcast; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 953 | simulcast.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 954 | simulcast.video[0] = kSvcVp9Video; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 955 | simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0, |
| 956 | kFullStackTestDurationSecs}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 957 | |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 958 | simulcast.ss[0] = { |
| 959 | std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn, |
| 960 | std::vector<SpatialLayer>(), false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 961 | fixture->RunWithAnalyzer(simulcast); |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 962 | } |
| 963 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 964 | TEST(FullStackTest, VP9SVC_3SL_Medium) { |
| 965 | auto fixture = CreateVideoQualityTestFixture(); |
| 966 | ParamsWithLogging simulcast; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 967 | simulcast.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 968 | simulcast.video[0] = kSvcVp9Video; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 969 | simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0, |
| 970 | kFullStackTestDurationSecs}; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 971 | simulcast.ss[0] = { |
| 972 | std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn, |
| 973 | std::vector<SpatialLayer>(), false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 974 | fixture->RunWithAnalyzer(simulcast); |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 975 | } |
| 976 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 977 | TEST(FullStackTest, VP9SVC_3SL_Low) { |
| 978 | auto fixture = CreateVideoQualityTestFixture(); |
| 979 | ParamsWithLogging simulcast; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 980 | simulcast.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 981 | simulcast.video[0] = kSvcVp9Video; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 982 | simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs}; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 983 | simulcast.ss[0] = { |
| 984 | std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn, |
| 985 | std::vector<SpatialLayer>(), false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 986 | fixture->RunWithAnalyzer(simulcast); |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 987 | } |
Sergey Silkin | 0643fd6 | 2018-05-17 12:50:53 +0200 | [diff] [blame] | 988 | |
Sergey Silkin | 7f978f1 | 2018-09-10 12:01:49 +0000 | [diff] [blame] | 989 | // bugs.webrtc.org/9506 |
| 990 | #if !defined(WEBRTC_MAC) |
| 991 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 992 | TEST(FullStackTest, VP9KSVC_3SL_High) { |
Sergey Silkin | e7ce888 | 2018-10-03 18:04:57 +0200 | [diff] [blame] | 993 | webrtc::test::ScopedFieldTrials override_trials( |
| 994 | AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/")); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 995 | auto fixture = CreateVideoQualityTestFixture(); |
| 996 | ParamsWithLogging simulcast; |
Sergey Silkin | 0643fd6 | 2018-05-17 12:50:53 +0200 | [diff] [blame] | 997 | simulcast.call.send_side_bwe = true; |
| 998 | simulcast.video[0] = kSvcVp9Video; |
| 999 | simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0, |
| 1000 | kFullStackTestDurationSecs}; |
| 1001 | simulcast.ss[0] = { |
| 1002 | std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic, |
| 1003 | std::vector<SpatialLayer>(), false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1004 | fixture->RunWithAnalyzer(simulcast); |
Sergey Silkin | 0643fd6 | 2018-05-17 12:50:53 +0200 | [diff] [blame] | 1005 | } |
| 1006 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1007 | TEST(FullStackTest, VP9KSVC_3SL_Medium) { |
Sergey Silkin | e7ce888 | 2018-10-03 18:04:57 +0200 | [diff] [blame] | 1008 | webrtc::test::ScopedFieldTrials override_trials( |
| 1009 | AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/")); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1010 | auto fixture = CreateVideoQualityTestFixture(); |
| 1011 | ParamsWithLogging simulcast; |
Sergey Silkin | 0643fd6 | 2018-05-17 12:50:53 +0200 | [diff] [blame] | 1012 | simulcast.call.send_side_bwe = true; |
| 1013 | simulcast.video[0] = kSvcVp9Video; |
| 1014 | simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0, |
| 1015 | kFullStackTestDurationSecs}; |
| 1016 | simulcast.ss[0] = { |
| 1017 | std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic, |
| 1018 | std::vector<SpatialLayer>(), false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1019 | fixture->RunWithAnalyzer(simulcast); |
Sergey Silkin | 0643fd6 | 2018-05-17 12:50:53 +0200 | [diff] [blame] | 1020 | } |
| 1021 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1022 | TEST(FullStackTest, VP9KSVC_3SL_Low) { |
Sergey Silkin | e7ce888 | 2018-10-03 18:04:57 +0200 | [diff] [blame] | 1023 | webrtc::test::ScopedFieldTrials override_trials( |
| 1024 | AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/")); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1025 | auto fixture = CreateVideoQualityTestFixture(); |
| 1026 | ParamsWithLogging simulcast; |
Sergey Silkin | 0643fd6 | 2018-05-17 12:50:53 +0200 | [diff] [blame] | 1027 | simulcast.call.send_side_bwe = true; |
| 1028 | simulcast.video[0] = kSvcVp9Video; |
| 1029 | simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0, |
| 1030 | kFullStackTestDurationSecs}; |
| 1031 | simulcast.ss[0] = { |
| 1032 | std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic, |
| 1033 | std::vector<SpatialLayer>(), false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1034 | fixture->RunWithAnalyzer(simulcast); |
Sergey Silkin | 0643fd6 | 2018-05-17 12:50:53 +0200 | [diff] [blame] | 1035 | } |
“Michael | 277a656 | 2018-06-01 14:09:19 -0500 | [diff] [blame] | 1036 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1037 | TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) { |
Sergey Silkin | e7ce888 | 2018-10-03 18:04:57 +0200 | [diff] [blame] | 1038 | webrtc::test::ScopedFieldTrials override_trials( |
| 1039 | AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/")); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1040 | auto fixture = CreateVideoQualityTestFixture(); |
Niels Möller | 0e90982 | 2018-08-21 17:34:35 +0200 | [diff] [blame] | 1041 | ParamsWithLogging simulcast; |
“Michael | 277a656 | 2018-06-01 14:09:19 -0500 | [diff] [blame] | 1042 | simulcast.call.send_side_bwe = true; |
| 1043 | simulcast.video[0] = kSvcVp9Video; |
| 1044 | simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0, |
| 1045 | kFullStackTestDurationSecs}; |
| 1046 | simulcast.ss[0] = { |
Sergey Silkin | e7ce888 | 2018-10-03 18:04:57 +0200 | [diff] [blame] | 1047 | std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic, |
“Michael | 277a656 | 2018-06-01 14:09:19 -0500 | [diff] [blame] | 1048 | std::vector<SpatialLayer>(), false}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1049 | simulcast.config->link_capacity_kbps = 1000; |
Sergey Silkin | e7ce888 | 2018-10-03 18:04:57 +0200 | [diff] [blame] | 1050 | simulcast.config->queue_delay_ms = 100; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1051 | fixture->RunWithAnalyzer(simulcast); |
“Michael | 277a656 | 2018-06-01 14:09:19 -0500 | [diff] [blame] | 1052 | } |
Erik Språng | d3438aa | 2018-11-08 16:56:43 +0100 | [diff] [blame] | 1053 | |
| 1054 | // TODO(webrtc:9722): Remove when experiment is cleaned up. |
| 1055 | TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) { |
| 1056 | webrtc::test::ScopedFieldTrials override_trials( |
| 1057 | AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/" |
| 1058 | "WebRTC-LibvpxVp9TrustedRateController/Enabled/")); |
| 1059 | auto fixture = CreateVideoQualityTestFixture(); |
| 1060 | ParamsWithLogging simulcast; |
| 1061 | simulcast.call.send_side_bwe = true; |
| 1062 | simulcast.video[0] = kSvcVp9Video; |
| 1063 | simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate", |
| 1064 | 0.0, 0.0, kFullStackTestDurationSecs}; |
| 1065 | simulcast.ss[0] = { |
| 1066 | std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic, |
| 1067 | std::vector<SpatialLayer>(), false}; |
| 1068 | simulcast.config->link_capacity_kbps = 1000; |
| 1069 | simulcast.config->queue_delay_ms = 100; |
| 1070 | fixture->RunWithAnalyzer(simulcast); |
| 1071 | } |
Sergey Silkin | 7f978f1 | 2018-09-10 12:01:49 +0000 | [diff] [blame] | 1072 | #endif // !defined(WEBRTC_MAC) |
| 1073 | |
Mirko Bonadei | 8ef5793 | 2018-11-16 14:38:03 +0100 | [diff] [blame] | 1074 | #endif // defined(RTC_ENABLE_VP9) |
brandtr | 93c5d03 | 2016-11-30 07:50:07 -0800 | [diff] [blame] | 1075 | |
ilnik | 6b826ef | 2017-06-16 06:53:48 -0700 | [diff] [blame] | 1076 | // Android bots can't handle FullHD, so disable the test. |
Ilya Nikolaevskiy | 7e5203f | 2018-09-10 12:04:50 +0000 | [diff] [blame] | 1077 | // TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac. |
| 1078 | #if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC) |
ilnik | 6b826ef | 2017-06-16 06:53:48 -0700 | [diff] [blame] | 1079 | #define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse |
| 1080 | #else |
| 1081 | #define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse |
| 1082 | #endif |
| 1083 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1084 | TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) { |
| 1085 | auto fixture = CreateVideoQualityTestFixture(); |
| 1086 | ParamsWithLogging simulcast; |
ilnik | 6b826ef | 2017-06-16 06:53:48 -0700 | [diff] [blame] | 1087 | simulcast.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1088 | simulcast.video[0] = {true, 1920, 1080, 30, 800000, |
| 1089 | 2500000, 2500000, false, "VP8", 3, |
Niels Möller | 6aa415e | 2018-06-07 11:14:13 +0200 | [diff] [blame] | 1090 | 2, 400000, false, false, false, "Generator"}; |
ilnik | 6b826ef | 2017-06-16 06:53:48 -0700 | [diff] [blame] | 1091 | simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0, |
| 1092 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1093 | simulcast.config->loss_percent = 0; |
| 1094 | simulcast.config->queue_delay_ms = 100; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1095 | std::vector<VideoStream> streams = { |
| 1096 | VideoQualityTest::DefaultVideoStream(simulcast, 0), |
| 1097 | VideoQualityTest::DefaultVideoStream(simulcast, 0), |
| 1098 | VideoQualityTest::DefaultVideoStream(simulcast, 0) |
| 1099 | }; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1100 | simulcast.ss[0] = { |
| 1101 | streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 1102 | true}; |
Erik Språng | b6b1cac | 2018-08-09 16:12:54 +0200 | [diff] [blame] | 1103 | webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials( |
| 1104 | "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/")); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1105 | fixture->RunWithAnalyzer(simulcast); |
ilnik | 6b826ef | 2017-06-16 06:53:48 -0700 | [diff] [blame] | 1106 | } |
| 1107 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1108 | TEST(FullStackTest, SimulcastVP8_3SL_High) { |
| 1109 | auto fixture = CreateVideoQualityTestFixture(); |
| 1110 | ParamsWithLogging simulcast; |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1111 | simulcast.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1112 | simulcast.video[0] = kSimulcastVp8VideoHigh; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 1113 | simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0, |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1114 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1115 | simulcast.config->loss_percent = 0; |
| 1116 | simulcast.config->queue_delay_ms = 100; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1117 | ParamsWithLogging video_params_high; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1118 | video_params_high.video[0] = kSimulcastVp8VideoHigh; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1119 | ParamsWithLogging video_params_medium; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1120 | video_params_medium.video[0] = kSimulcastVp8VideoMedium; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1121 | ParamsWithLogging video_params_low; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1122 | video_params_low.video[0] = kSimulcastVp8VideoLow; |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1123 | |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1124 | std::vector<VideoStream> streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1125 | VideoQualityTest::DefaultVideoStream(video_params_low, 0), |
| 1126 | VideoQualityTest::DefaultVideoStream(video_params_medium, 0), |
| 1127 | VideoQualityTest::DefaultVideoStream(video_params_high, 0)}; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1128 | simulcast.ss[0] = { |
| 1129 | streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 1130 | false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1131 | fixture->RunWithAnalyzer(simulcast); |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1132 | } |
| 1133 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1134 | TEST(FullStackTest, SimulcastVP8_3SL_Medium) { |
| 1135 | auto fixture = CreateVideoQualityTestFixture(); |
| 1136 | ParamsWithLogging simulcast; |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1137 | simulcast.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1138 | simulcast.video[0] = kSimulcastVp8VideoHigh; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 1139 | simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0, |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1140 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1141 | simulcast.config->loss_percent = 0; |
| 1142 | simulcast.config->queue_delay_ms = 100; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1143 | ParamsWithLogging video_params_high; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1144 | video_params_high.video[0] = kSimulcastVp8VideoHigh; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1145 | ParamsWithLogging video_params_medium; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1146 | video_params_medium.video[0] = kSimulcastVp8VideoMedium; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1147 | ParamsWithLogging video_params_low; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1148 | video_params_low.video[0] = kSimulcastVp8VideoLow; |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1149 | |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1150 | std::vector<VideoStream> streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1151 | VideoQualityTest::DefaultVideoStream(video_params_low, 0), |
| 1152 | VideoQualityTest::DefaultVideoStream(video_params_medium, 0), |
| 1153 | VideoQualityTest::DefaultVideoStream(video_params_high, 0)}; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1154 | simulcast.ss[0] = { |
| 1155 | streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 1156 | false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1157 | fixture->RunWithAnalyzer(simulcast); |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1158 | } |
| 1159 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1160 | TEST(FullStackTest, SimulcastVP8_3SL_Low) { |
| 1161 | auto fixture = CreateVideoQualityTestFixture(); |
| 1162 | ParamsWithLogging simulcast; |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1163 | simulcast.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1164 | simulcast.video[0] = kSimulcastVp8VideoHigh; |
ilnik | 2a8c2f5 | 2017-02-15 02:23:28 -0800 | [diff] [blame] | 1165 | simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0, |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1166 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1167 | simulcast.config->loss_percent = 0; |
| 1168 | simulcast.config->queue_delay_ms = 100; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1169 | ParamsWithLogging video_params_high; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1170 | video_params_high.video[0] = kSimulcastVp8VideoHigh; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1171 | ParamsWithLogging video_params_medium; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1172 | video_params_medium.video[0] = kSimulcastVp8VideoMedium; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1173 | ParamsWithLogging video_params_low; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1174 | video_params_low.video[0] = kSimulcastVp8VideoLow; |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1175 | |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1176 | std::vector<VideoStream> streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1177 | VideoQualityTest::DefaultVideoStream(video_params_low, 0), |
| 1178 | VideoQualityTest::DefaultVideoStream(video_params_medium, 0), |
| 1179 | VideoQualityTest::DefaultVideoStream(video_params_high, 0)}; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1180 | simulcast.ss[0] = { |
| 1181 | streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 1182 | false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1183 | fixture->RunWithAnalyzer(simulcast); |
ilnik | 3dd5ad9 | 2017-02-09 04:58:53 -0800 | [diff] [blame] | 1184 | } |
| 1185 | |
Emircan Uysaler | 7c03bdc | 2019-01-16 15:07:56 -0500 | [diff] [blame] | 1186 | // This test assumes ideal network conditions with target bandwidth being |
| 1187 | // available and exercises WebRTC calls with a high target bitrate(100 Mbps). |
| 1188 | // Android32 bots can't handle this high bitrate, so disable test for those. |
| 1189 | #if defined(WEBRTC_ANDROID) |
Emircan Uysaler | 62f5532 | 2019-01-16 17:48:47 -0500 | [diff] [blame] | 1190 | #define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec |
Emircan Uysaler | 7c03bdc | 2019-01-16 15:07:56 -0500 | [diff] [blame] | 1191 | #else |
| 1192 | #define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec |
| 1193 | #endif // defined(WEBRTC_ANDROID) |
| 1194 | TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) { |
| 1195 | auto fixture = CreateVideoQualityTestFixture(); |
| 1196 | const int target_bitrate = 100000000; |
| 1197 | ParamsWithLogging generator; |
| 1198 | generator.call.send_side_bwe = true; |
| 1199 | generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate; |
| 1200 | generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate; |
| 1201 | generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate; |
| 1202 | generator.video[0] = {true, |
| 1203 | 360, |
| 1204 | 240, |
| 1205 | 30, |
| 1206 | target_bitrate / 2, |
| 1207 | target_bitrate, |
| 1208 | target_bitrate * 2, |
| 1209 | false, |
| 1210 | "FakeCodec", |
| 1211 | 1, |
| 1212 | 0, |
| 1213 | 0, |
| 1214 | false, |
| 1215 | false, |
| 1216 | false, |
| 1217 | "Generator"}; |
| 1218 | generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0, |
| 1219 | kFullStackTestDurationSecs}; |
| 1220 | fixture->RunWithAnalyzer(generator); |
| 1221 | } |
| 1222 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1223 | TEST(FullStackTest, LargeRoomVP8_5thumb) { |
| 1224 | auto fixture = CreateVideoQualityTestFixture(); |
| 1225 | ParamsWithLogging large_room; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1226 | large_room.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1227 | large_room.video[0] = kSimulcastVp8VideoHigh; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1228 | large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0, |
| 1229 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1230 | large_room.config->loss_percent = 0; |
| 1231 | large_room.config->queue_delay_ms = 100; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1232 | ParamsWithLogging video_params_high; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1233 | video_params_high.video[0] = kSimulcastVp8VideoHigh; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1234 | ParamsWithLogging video_params_medium; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1235 | video_params_medium.video[0] = kSimulcastVp8VideoMedium; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1236 | ParamsWithLogging video_params_low; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1237 | video_params_low.video[0] = kSimulcastVp8VideoLow; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1238 | |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1239 | std::vector<VideoStream> streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1240 | VideoQualityTest::DefaultVideoStream(video_params_low, 0), |
| 1241 | VideoQualityTest::DefaultVideoStream(video_params_medium, 0), |
| 1242 | VideoQualityTest::DefaultVideoStream(video_params_high, 0)}; |
ilnik | 9843695 | 2017-07-13 00:47:03 -0700 | [diff] [blame] | 1243 | large_room.call.num_thumbnails = 5; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1244 | large_room.ss[0] = { |
| 1245 | streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 1246 | false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1247 | fixture->RunWithAnalyzer(large_room); |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1248 | } |
| 1249 | |
oprypin | 743117f | 2017-09-15 05:24:24 -0700 | [diff] [blame] | 1250 | #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) |
| 1251 | // Fails on mobile devices: |
ilnik | f89a738 | 2017-03-07 06:15:27 -0800 | [diff] [blame] | 1252 | // https://bugs.chromium.org/p/webrtc/issues/detail?id=7301 |
| 1253 | #define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb |
ilnik | 3ae7c25 | 2017-03-08 01:17:35 -0800 | [diff] [blame] | 1254 | #define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb |
ilnik | f89a738 | 2017-03-07 06:15:27 -0800 | [diff] [blame] | 1255 | #else |
| 1256 | #define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb |
ilnik | 3ae7c25 | 2017-03-08 01:17:35 -0800 | [diff] [blame] | 1257 | #define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb |
ilnik | f89a738 | 2017-03-07 06:15:27 -0800 | [diff] [blame] | 1258 | #endif |
| 1259 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1260 | TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) { |
| 1261 | auto fixture = CreateVideoQualityTestFixture(); |
| 1262 | ParamsWithLogging large_room; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1263 | large_room.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1264 | large_room.video[0] = kSimulcastVp8VideoHigh; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1265 | large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0, |
| 1266 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1267 | large_room.config->loss_percent = 0; |
| 1268 | large_room.config->queue_delay_ms = 100; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1269 | ParamsWithLogging video_params_high; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1270 | video_params_high.video[0] = kSimulcastVp8VideoHigh; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1271 | ParamsWithLogging video_params_medium; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1272 | video_params_medium.video[0] = kSimulcastVp8VideoMedium; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1273 | ParamsWithLogging video_params_low; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1274 | video_params_low.video[0] = kSimulcastVp8VideoLow; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1275 | |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1276 | std::vector<VideoStream> streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1277 | VideoQualityTest::DefaultVideoStream(video_params_low, 0), |
| 1278 | VideoQualityTest::DefaultVideoStream(video_params_medium, 0), |
| 1279 | VideoQualityTest::DefaultVideoStream(video_params_high, 0)}; |
ilnik | 9843695 | 2017-07-13 00:47:03 -0700 | [diff] [blame] | 1280 | large_room.call.num_thumbnails = 15; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1281 | large_room.ss[0] = { |
| 1282 | streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 1283 | false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1284 | fixture->RunWithAnalyzer(large_room); |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1285 | } |
| 1286 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1287 | TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) { |
| 1288 | auto fixture = CreateVideoQualityTestFixture(); |
| 1289 | ParamsWithLogging large_room; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1290 | large_room.call.send_side_bwe = true; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1291 | large_room.video[0] = kSimulcastVp8VideoHigh; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1292 | large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0, |
| 1293 | kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1294 | large_room.config->loss_percent = 0; |
| 1295 | large_room.config->queue_delay_ms = 100; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1296 | ParamsWithLogging video_params_high; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1297 | video_params_high.video[0] = kSimulcastVp8VideoHigh; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1298 | ParamsWithLogging video_params_medium; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1299 | video_params_medium.video[0] = kSimulcastVp8VideoMedium; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1300 | ParamsWithLogging video_params_low; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1301 | video_params_low.video[0] = kSimulcastVp8VideoLow; |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1302 | |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1303 | std::vector<VideoStream> streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1304 | VideoQualityTest::DefaultVideoStream(video_params_low, 0), |
| 1305 | VideoQualityTest::DefaultVideoStream(video_params_medium, 0), |
| 1306 | VideoQualityTest::DefaultVideoStream(video_params_high, 0)}; |
ilnik | 9843695 | 2017-07-13 00:47:03 -0700 | [diff] [blame] | 1307 | large_room.call.num_thumbnails = 50; |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1308 | large_room.ss[0] = { |
| 1309 | streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 1310 | false}; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1311 | fixture->RunWithAnalyzer(large_room); |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1312 | } |
| 1313 | |
Mirko Bonadei | c84f661 | 2019-01-31 12:20:57 +0100 | [diff] [blame] | 1314 | INSTANTIATE_TEST_SUITE_P( |
| 1315 | FullStackTest, |
| 1316 | GenericDescriptorTest, |
| 1317 | ::testing::Values("WebRTC-GenericDescriptor/Disabled/", |
| 1318 | "WebRTC-GenericDescriptor/Enabled/")); |
philipel | dd8b0d8 | 2018-09-27 11:18:10 +0200 | [diff] [blame] | 1319 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1320 | class DualStreamsTest : public ::testing::TestWithParam<int> {}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1321 | |
| 1322 | // Disable dual video test on mobile device becuase it's too heavy. |
Ilya Nikolaevskiy | f08dd9d | 2018-10-09 17:22:15 +0200 | [diff] [blame] | 1323 | // TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC. |
| 1324 | #if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC) |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1325 | TEST_P(DualStreamsTest, |
Ilya Nikolaevskiy | dda5fdc | 2019-02-27 10:00:06 +0100 | [diff] [blame] | 1326 | ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) { |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1327 | test::ScopedFieldTrials field_trial( |
Erik Språng | b65aa01 | 2018-09-24 11:35:19 +0200 | [diff] [blame] | 1328 | AppendFieldTrials(std::string(kPacerPushBackExperiment) + |
| 1329 | std::string(kScreenshareSimulcastExperiment))); |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1330 | const int first_stream = GetParam(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1331 | ParamsWithLogging dual_streams; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1332 | |
| 1333 | // Screenshare Settings. |
| 1334 | dual_streams.screenshare[first_stream] = {true, false, 10}; |
Ilya Nikolaevskiy | aec663e | 2019-02-27 12:52:11 +0100 | [diff] [blame] | 1335 | dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000, |
| 1336 | 2500000, false, "VP8", 2, 1, 400000, |
| 1337 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1338 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1339 | ParamsWithLogging screenshare_params_high; |
Ilya Nikolaevskiy | dda5fdc | 2019-02-27 10:00:06 +0100 | [diff] [blame] | 1340 | screenshare_params_high.video[0] = { |
| 1341 | true, 1850, 1110, 60, 600000, 1250000, 1250000, false, |
| 1342 | "VP8", 2, 0, 400000, false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1343 | VideoQualityTest::Params screenshare_params_low; |
Ilya Nikolaevskiy | dda5fdc | 2019-02-27 10:00:06 +0100 | [diff] [blame] | 1344 | screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000, |
Erik Språng | 28bb391 | 2018-07-11 16:06:55 +0200 | [diff] [blame] | 1345 | 1000000, false, "VP8", 2, 0, 400000, |
| 1346 | false, false, false, ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1347 | std::vector<VideoStream> screenhsare_streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1348 | VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0), |
| 1349 | VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1350 | |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1351 | dual_streams.ss[first_stream] = { |
| 1352 | screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn, |
| 1353 | std::vector<SpatialLayer>(), false}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1354 | |
| 1355 | // Video settings. |
| 1356 | dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh; |
| 1357 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1358 | ParamsWithLogging video_params_high; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1359 | video_params_high.video[0] = kSimulcastVp8VideoHigh; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1360 | ParamsWithLogging video_params_medium; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1361 | video_params_medium.video[0] = kSimulcastVp8VideoMedium; |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1362 | ParamsWithLogging video_params_low; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1363 | video_params_low.video[0] = kSimulcastVp8VideoLow; |
| 1364 | std::vector<VideoStream> streams = { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1365 | VideoQualityTest::DefaultVideoStream(video_params_low, 0), |
| 1366 | VideoQualityTest::DefaultVideoStream(video_params_medium, 0), |
| 1367 | VideoQualityTest::DefaultVideoStream(video_params_high, 0)}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1368 | |
| 1369 | dual_streams.ss[1 - first_stream] = { |
Sergey Silkin | 5702736 | 2018-05-15 09:12:05 +0200 | [diff] [blame] | 1370 | streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(), |
| 1371 | false}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1372 | |
| 1373 | // Call settings. |
| 1374 | dual_streams.call.send_side_bwe = true; |
| 1375 | dual_streams.call.dual_video = true; |
Edward Lemur | 35d2b7e | 2017-12-27 18:54:47 +0100 | [diff] [blame] | 1376 | std::string test_label = "dualstreams_moderately_restricted_screenshare_" + |
| 1377 | std::to_string(first_stream); |
| 1378 | dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1379 | dual_streams.config->loss_percent = 1; |
| 1380 | dual_streams.config->link_capacity_kbps = 7500; |
| 1381 | dual_streams.config->queue_length_packets = 30; |
| 1382 | dual_streams.config->queue_delay_ms = 100; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1383 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1384 | auto fixture = CreateVideoQualityTestFixture(); |
| 1385 | fixture->RunWithAnalyzer(dual_streams); |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1386 | } |
Ilya Nikolaevskiy | f08dd9d | 2018-10-09 17:22:15 +0200 | [diff] [blame] | 1387 | #endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && |
| 1388 | // !defined(WEBRTC_MAC) |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1389 | |
| 1390 | TEST_P(DualStreamsTest, Conference_Restricted) { |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1391 | test::ScopedFieldTrials field_trial( |
Ilya Nikolaevskiy | cb96062 | 2018-09-04 09:07:31 +0000 | [diff] [blame] | 1392 | AppendFieldTrials(std::string(kPacerPushBackExperiment))); |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1393 | const int first_stream = GetParam(); |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1394 | ParamsWithLogging dual_streams; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1395 | |
| 1396 | // Screenshare Settings. |
| 1397 | dual_streams.screenshare[first_stream] = {true, false, 10}; |
| 1398 | dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, |
| 1399 | 2500000, 2500000, false, "VP8", 3, |
Niels Möller | 6aa415e | 2018-06-07 11:14:13 +0200 | [diff] [blame] | 1400 | 2, 400000, false, false, false, |
| 1401 | ""}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1402 | // Video settings. |
| 1403 | dual_streams.video[1 - first_stream] = { |
Yves Gerey | 3368721 | 2019-03-09 09:50:21 +0000 | [diff] [blame] | 1404 | true, 1280, 720, 30, 150000, |
| 1405 | 500000, 700000, false, "VP8", 3, |
| 1406 | 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"}; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1407 | |
| 1408 | // Call settings. |
| 1409 | dual_streams.call.send_side_bwe = true; |
| 1410 | dual_streams.call.dual_video = true; |
Edward Lemur | 35d2b7e | 2017-12-27 18:54:47 +0100 | [diff] [blame] | 1411 | std::string test_label = "dualstreams_conference_restricted_screenshare_" + |
| 1412 | std::to_string(first_stream); |
| 1413 | dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs}; |
Artem Titov | f18b352 | 2018-08-28 16:54:24 +0200 | [diff] [blame] | 1414 | dual_streams.config->loss_percent = 1; |
| 1415 | dual_streams.config->link_capacity_kbps = 5000; |
| 1416 | dual_streams.config->queue_length_packets = 30; |
| 1417 | dual_streams.config->queue_delay_ms = 100; |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1418 | |
Patrik Höglund | b6b29e0 | 2018-06-21 16:58:01 +0200 | [diff] [blame] | 1419 | auto fixture = CreateVideoQualityTestFixture(); |
| 1420 | fixture->RunWithAnalyzer(dual_streams); |
Ilya Nikolaevskiy | 255d1cd | 2017-12-21 18:02:59 +0100 | [diff] [blame] | 1421 | } |
| 1422 | |
Mirko Bonadei | c84f661 | 2019-01-31 12:20:57 +0100 | [diff] [blame] | 1423 | INSTANTIATE_TEST_SUITE_P(FullStackTest, |
| 1424 | DualStreamsTest, |
| 1425 | ::testing::Values(0, 1)); |
ilnik | a014cc5 | 2017-03-07 04:21:04 -0800 | [diff] [blame] | 1426 | |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 1427 | } // namespace webrtc |