OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 rate_profile.num_frames = kNumFramesLong; | 115 rate_profile.num_frames = kNumFramesLong; |
116 // Codec/network settings. | 116 // Codec/network settings. |
117 CodecParams process_settings; | 117 CodecParams process_settings; |
118 SetCodecParams(&process_settings, kVideoCodecVP9, kHwCodec, kUseSingleCore, | 118 SetCodecParams(&process_settings, kVideoCodecVP9, kHwCodec, kUseSingleCore, |
119 0.0f, -1, 1, false, false, true, false); | 119 0.0f, -1, 1, false, false, true, false); |
120 // Thresholds for expected quality. | 120 // Thresholds for expected quality. |
121 QualityThresholds quality_thresholds; | 121 QualityThresholds quality_thresholds; |
122 SetQualityThresholds(&quality_thresholds, 35.5, 30.0, 0.90, 0.85); | 122 SetQualityThresholds(&quality_thresholds, 35.5, 30.0, 0.90, 0.85); |
123 // Thresholds for rate control. | 123 // Thresholds for rate control. |
124 RateControlThresholds rc_thresholds[3]; | 124 RateControlThresholds rc_thresholds[3]; |
125 SetRateControlThresholds(rc_thresholds, 0, 0, 30, 20, 20, 30, 0, 1); | 125 SetRateControlThresholds(rc_thresholds, 0, 0, 30, 20, 20, 35, 0, 1); |
126 SetRateControlThresholds(rc_thresholds, 1, 2, 0, 20, 20, 60, 0, 0); | 126 SetRateControlThresholds(rc_thresholds, 1, 2, 0, 20, 20, 60, 0, 0); |
127 SetRateControlThresholds(rc_thresholds, 2, 0, 0, 25, 20, 40, 0, 0); | 127 SetRateControlThresholds(rc_thresholds, 2, 0, 0, 25, 20, 40, 0, 0); |
128 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, | 128 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, |
129 rc_thresholds, nullptr /* visualization_params */); | 129 rc_thresholds, nullptr /* visualization_params */); |
130 } | 130 } |
131 | 131 |
132 // VP9: Run with no packet loss, with an update (decrease) in frame rate. | 132 // VP9: Run with no packet loss, with an update (decrease) in frame rate. |
133 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. | 133 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. |
134 // At the low bitrate in this test, this means better rate control after the | 134 // At the low bitrate in this test, this means better rate control after the |
135 // update(s) to lower frame rate. So expect less frame drops, and max values | 135 // update(s) to lower frame rate. So expect less frame drops, and max values |
(...skipping 12 matching lines...) Expand all Loading... |
148 rate_profile.num_frames = kNumFramesLong; | 148 rate_profile.num_frames = kNumFramesLong; |
149 // Codec/network settings. | 149 // Codec/network settings. |
150 CodecParams process_settings; | 150 CodecParams process_settings; |
151 SetCodecParams(&process_settings, kVideoCodecVP9, kHwCodec, kUseSingleCore, | 151 SetCodecParams(&process_settings, kVideoCodecVP9, kHwCodec, kUseSingleCore, |
152 0.0f, -1, 1, false, false, true, false); | 152 0.0f, -1, 1, false, false, true, false); |
153 // Thresholds for expected quality. | 153 // Thresholds for expected quality. |
154 QualityThresholds quality_thresholds; | 154 QualityThresholds quality_thresholds; |
155 SetQualityThresholds(&quality_thresholds, 31.5, 18.0, 0.80, 0.43); | 155 SetQualityThresholds(&quality_thresholds, 31.5, 18.0, 0.80, 0.43); |
156 // Thresholds for rate control. | 156 // Thresholds for rate control. |
157 RateControlThresholds rc_thresholds[3]; | 157 RateControlThresholds rc_thresholds[3]; |
158 SetRateControlThresholds(rc_thresholds, 0, 38, 50, 75, 15, 45, 0, 1); | 158 SetRateControlThresholds(rc_thresholds, 0, 45, 50, 95, 15, 45, 0, 1); |
159 SetRateControlThresholds(rc_thresholds, 1, 10, 0, 40, 10, 30, 0, 0); | 159 SetRateControlThresholds(rc_thresholds, 1, 20, 0, 50, 10, 30, 0, 0); |
160 SetRateControlThresholds(rc_thresholds, 2, 5, 0, 30, 5, 25, 0, 0); | 160 SetRateControlThresholds(rc_thresholds, 2, 5, 0, 30, 5, 25, 0, 0); |
161 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, | 161 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, |
162 rc_thresholds, nullptr /* visualization_params */); | 162 rc_thresholds, nullptr /* visualization_params */); |
163 } | 163 } |
164 | 164 |
165 // VP9: Run with no packet loss and denoiser on. One key frame (first frame). | 165 // VP9: Run with no packet loss and denoiser on. One key frame (first frame). |
166 TEST_F(VideoProcessorIntegrationTest, ProcessNoLossDenoiserOnVP9) { | 166 TEST_F(VideoProcessorIntegrationTest, ProcessNoLossDenoiserOnVP9) { |
167 // Bit rate and frame rate profile. | 167 // Bit rate and frame rate profile. |
168 RateProfile rate_profile; | 168 RateProfile rate_profile; |
169 SetRateProfile(&rate_profile, 0, 500, 30, 0); | 169 SetRateProfile(&rate_profile, 0, 500, 30, 0); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 SetQualityThresholds(&quality_thresholds, 32.5, 30.0, 0.85, 0.80); | 421 SetQualityThresholds(&quality_thresholds, 32.5, 30.0, 0.85, 0.80); |
422 // Thresholds for rate control. | 422 // Thresholds for rate control. |
423 RateControlThresholds rc_thresholds[2]; | 423 RateControlThresholds rc_thresholds[2]; |
424 SetRateControlThresholds(rc_thresholds, 0, 0, 20, 30, 10, 10, 0, 1); | 424 SetRateControlThresholds(rc_thresholds, 0, 0, 20, 30, 10, 10, 0, 1); |
425 SetRateControlThresholds(rc_thresholds, 1, 0, 0, 30, 15, 10, 0, 0); | 425 SetRateControlThresholds(rc_thresholds, 1, 0, 0, 30, 15, 10, 0, 0); |
426 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, | 426 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, |
427 rc_thresholds, nullptr /* visualization_params */); | 427 rc_thresholds, nullptr /* visualization_params */); |
428 } | 428 } |
429 } // namespace test | 429 } // namespace test |
430 } // namespace webrtc | 430 } // namespace webrtc |
OLD | NEW |