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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 SetRateProfile(&rate_profile, 0, 500, 30, 0); | 63 SetRateProfile(&rate_profile, 0, 500, 30, 0); |
64 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; | 64 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; |
65 rate_profile.num_frames = kNumFramesShort; | 65 rate_profile.num_frames = kNumFramesShort; |
66 | 66 |
67 std::vector<RateControlThresholds> rc_thresholds; | 67 std::vector<RateControlThresholds> rc_thresholds; |
68 AddRateControlThresholds(0, 40, 20, 10, 20, 0, 1, &rc_thresholds); | 68 AddRateControlThresholds(0, 40, 20, 10, 20, 0, 1, &rc_thresholds); |
69 | 69 |
70 QualityThresholds quality_thresholds(37.0, 36.0, 0.93, 0.92); | 70 QualityThresholds quality_thresholds(37.0, 36.0, 0.93, 0.92); |
71 | 71 |
72 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 72 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
73 kNoVisualizationParams); | 73 nullptr, kNoVisualizationParams); |
74 } | 74 } |
75 | 75 |
76 // VP9: Run with 5% packet loss and fixed bitrate. Quality should be a bit | 76 // VP9: Run with 5% packet loss and fixed bitrate. Quality should be a bit |
77 // lower. One key frame (first frame only) in sequence. | 77 // lower. One key frame (first frame only) in sequence. |
78 TEST_F(VideoProcessorIntegrationTestLibvpx, Process5PercentPacketLossVP9) { | 78 TEST_F(VideoProcessorIntegrationTestLibvpx, Process5PercentPacketLossVP9) { |
79 config_.networking_config.packet_loss_probability = 0.05f; | 79 config_.networking_config.packet_loss_probability = 0.05f; |
80 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, false, true, false, | 80 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, false, true, false, |
81 kResilienceOn, kCifWidth, kCifHeight); | 81 kResilienceOn, kCifWidth, kCifHeight); |
82 | 82 |
83 RateProfile rate_profile; | 83 RateProfile rate_profile; |
84 SetRateProfile(&rate_profile, 0, 500, 30, 0); | 84 SetRateProfile(&rate_profile, 0, 500, 30, 0); |
85 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; | 85 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; |
86 rate_profile.num_frames = kNumFramesShort; | 86 rate_profile.num_frames = kNumFramesShort; |
87 | 87 |
88 std::vector<RateControlThresholds> rc_thresholds; | 88 std::vector<RateControlThresholds> rc_thresholds; |
89 AddRateControlThresholds(0, 40, 20, 10, 20, 0, 1, &rc_thresholds); | 89 AddRateControlThresholds(0, 40, 20, 10, 20, 0, 1, &rc_thresholds); |
90 | 90 |
91 QualityThresholds quality_thresholds(17.0, 14.0, 0.45, 0.36); | 91 QualityThresholds quality_thresholds(17.0, 14.0, 0.45, 0.36); |
92 | 92 |
93 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 93 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
94 kNoVisualizationParams); | 94 nullptr, kNoVisualizationParams); |
95 } | 95 } |
96 | 96 |
97 // VP9: Run with no packet loss, with varying bitrate (3 rate updates): | 97 // VP9: Run with no packet loss, with varying bitrate (3 rate updates): |
98 // low to high to medium. Check that quality and encoder response to the new | 98 // low to high to medium. Check that quality and encoder response to the new |
99 // target rate/per-frame bandwidth (for each rate update) is within limits. | 99 // target rate/per-frame bandwidth (for each rate update) is within limits. |
100 // One key frame (first frame only) in sequence. | 100 // One key frame (first frame only) in sequence. |
101 TEST_F(VideoProcessorIntegrationTestLibvpx, ProcessNoLossChangeBitRateVP9) { | 101 TEST_F(VideoProcessorIntegrationTestLibvpx, ProcessNoLossChangeBitRateVP9) { |
102 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, false, true, false, | 102 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, false, true, false, |
103 kResilienceOn, kCifWidth, kCifHeight); | 103 kResilienceOn, kCifWidth, kCifHeight); |
104 | 104 |
105 RateProfile rate_profile; | 105 RateProfile rate_profile; |
106 SetRateProfile(&rate_profile, 0, 200, 30, 0); | 106 SetRateProfile(&rate_profile, 0, 200, 30, 0); |
107 SetRateProfile(&rate_profile, 1, 700, 30, 100); | 107 SetRateProfile(&rate_profile, 1, 700, 30, 100); |
108 SetRateProfile(&rate_profile, 2, 500, 30, 200); | 108 SetRateProfile(&rate_profile, 2, 500, 30, 200); |
109 rate_profile.frame_index_rate_update[3] = kNumFramesLong + 1; | 109 rate_profile.frame_index_rate_update[3] = kNumFramesLong + 1; |
110 rate_profile.num_frames = kNumFramesLong; | 110 rate_profile.num_frames = kNumFramesLong; |
111 | 111 |
112 std::vector<RateControlThresholds> rc_thresholds; | 112 std::vector<RateControlThresholds> rc_thresholds; |
113 AddRateControlThresholds(0, 30, 20, 20, 35, 0, 1, &rc_thresholds); | 113 AddRateControlThresholds(0, 30, 20, 20, 35, 0, 1, &rc_thresholds); |
114 AddRateControlThresholds(2, 0, 20, 20, 60, 0, 0, &rc_thresholds); | 114 AddRateControlThresholds(2, 0, 20, 20, 60, 0, 0, &rc_thresholds); |
115 AddRateControlThresholds(0, 0, 25, 20, 40, 0, 0, &rc_thresholds); | 115 AddRateControlThresholds(0, 0, 25, 20, 40, 0, 0, &rc_thresholds); |
116 | 116 |
117 QualityThresholds quality_thresholds(35.5, 30.0, 0.90, 0.85); | 117 QualityThresholds quality_thresholds(35.5, 30.0, 0.90, 0.85); |
118 | 118 |
119 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 119 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
120 kNoVisualizationParams); | 120 nullptr, kNoVisualizationParams); |
121 } | 121 } |
122 | 122 |
123 // VP9: Run with no packet loss, with an update (decrease) in frame rate. | 123 // VP9: Run with no packet loss, with an update (decrease) in frame rate. |
124 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. | 124 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. |
125 // At the low bitrate in this test, this means better rate control after the | 125 // At the low bitrate in this test, this means better rate control after the |
126 // update(s) to lower frame rate. So expect less frame drops, and max values | 126 // update(s) to lower frame rate. So expect less frame drops, and max values |
127 // for the rate control metrics can be lower. One key frame (first frame only). | 127 // for the rate control metrics can be lower. One key frame (first frame only). |
128 // Note: quality after update should be higher but we currently compute quality | 128 // Note: quality after update should be higher but we currently compute quality |
129 // metrics averaged over whole sequence run. | 129 // metrics averaged over whole sequence run. |
130 TEST_F(VideoProcessorIntegrationTestLibvpx, | 130 TEST_F(VideoProcessorIntegrationTestLibvpx, |
131 ProcessNoLossChangeFrameRateFrameDropVP9) { | 131 ProcessNoLossChangeFrameRateFrameDropVP9) { |
132 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, false, true, false, | 132 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, false, true, false, |
133 kResilienceOn, kCifWidth, kCifHeight); | 133 kResilienceOn, kCifWidth, kCifHeight); |
134 | 134 |
135 RateProfile rate_profile; | 135 RateProfile rate_profile; |
136 SetRateProfile(&rate_profile, 0, 100, 24, 0); | 136 SetRateProfile(&rate_profile, 0, 100, 24, 0); |
137 SetRateProfile(&rate_profile, 1, 100, 15, 100); | 137 SetRateProfile(&rate_profile, 1, 100, 15, 100); |
138 SetRateProfile(&rate_profile, 2, 100, 10, 200); | 138 SetRateProfile(&rate_profile, 2, 100, 10, 200); |
139 rate_profile.frame_index_rate_update[3] = kNumFramesLong + 1; | 139 rate_profile.frame_index_rate_update[3] = kNumFramesLong + 1; |
140 rate_profile.num_frames = kNumFramesLong; | 140 rate_profile.num_frames = kNumFramesLong; |
141 | 141 |
142 std::vector<RateControlThresholds> rc_thresholds; | 142 std::vector<RateControlThresholds> rc_thresholds; |
143 AddRateControlThresholds(45, 50, 95, 15, 45, 0, 1, &rc_thresholds); | 143 AddRateControlThresholds(45, 50, 95, 15, 45, 0, 1, &rc_thresholds); |
144 AddRateControlThresholds(20, 0, 50, 10, 30, 0, 0, &rc_thresholds); | 144 AddRateControlThresholds(20, 0, 50, 10, 30, 0, 0, &rc_thresholds); |
145 AddRateControlThresholds(5, 0, 30, 5, 25, 0, 0, &rc_thresholds); | 145 AddRateControlThresholds(5, 0, 30, 5, 25, 0, 0, &rc_thresholds); |
146 | 146 |
147 QualityThresholds quality_thresholds(31.5, 18.0, 0.80, 0.43); | 147 QualityThresholds quality_thresholds(31.5, 18.0, 0.80, 0.43); |
148 | 148 |
149 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 149 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
150 kNoVisualizationParams); | 150 nullptr, kNoVisualizationParams); |
151 } | 151 } |
152 | 152 |
153 // VP9: Run with no packet loss and denoiser on. One key frame (first frame). | 153 // VP9: Run with no packet loss and denoiser on. One key frame (first frame). |
154 TEST_F(VideoProcessorIntegrationTestLibvpx, ProcessNoLossDenoiserOnVP9) { | 154 TEST_F(VideoProcessorIntegrationTestLibvpx, ProcessNoLossDenoiserOnVP9) { |
155 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, true, true, false, | 155 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, true, true, false, |
156 kResilienceOn, kCifWidth, kCifHeight); | 156 kResilienceOn, kCifWidth, kCifHeight); |
157 | 157 |
158 RateProfile rate_profile; | 158 RateProfile rate_profile; |
159 SetRateProfile(&rate_profile, 0, 500, 30, 0); | 159 SetRateProfile(&rate_profile, 0, 500, 30, 0); |
160 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; | 160 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; |
161 rate_profile.num_frames = kNumFramesShort; | 161 rate_profile.num_frames = kNumFramesShort; |
162 | 162 |
163 std::vector<RateControlThresholds> rc_thresholds; | 163 std::vector<RateControlThresholds> rc_thresholds; |
164 AddRateControlThresholds(0, 40, 20, 10, 20, 0, 1, &rc_thresholds); | 164 AddRateControlThresholds(0, 40, 20, 10, 20, 0, 1, &rc_thresholds); |
165 | 165 |
166 QualityThresholds quality_thresholds(36.8, 35.8, 0.92, 0.91); | 166 QualityThresholds quality_thresholds(36.8, 35.8, 0.92, 0.91); |
167 | 167 |
168 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 168 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
169 kNoVisualizationParams); | 169 nullptr, kNoVisualizationParams); |
170 } | 170 } |
171 | 171 |
172 // Run with no packet loss, at low bitrate. | 172 // Run with no packet loss, at low bitrate. |
173 // spatial_resize is on, for this low bitrate expect one resize in sequence. | 173 // spatial_resize is on, for this low bitrate expect one resize in sequence. |
174 // Resize happens on delta frame. Expect only one key frame (first frame). | 174 // Resize happens on delta frame. Expect only one key frame (first frame). |
175 TEST_F(VideoProcessorIntegrationTestLibvpx, | 175 TEST_F(VideoProcessorIntegrationTestLibvpx, |
176 DISABLED_ProcessNoLossSpatialResizeFrameDropVP9) { | 176 DISABLED_ProcessNoLossSpatialResizeFrameDropVP9) { |
177 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, false, true, true, | 177 SetCodecSettings(&config_, kVideoCodecVP9, 1, false, false, true, true, |
178 kResilienceOn, kCifWidth, kCifHeight); | 178 kResilienceOn, kCifWidth, kCifHeight); |
179 | 179 |
180 RateProfile rate_profile; | 180 RateProfile rate_profile; |
181 SetRateProfile(&rate_profile, 0, 50, 30, 0); | 181 SetRateProfile(&rate_profile, 0, 50, 30, 0); |
182 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; | 182 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; |
183 rate_profile.num_frames = kNumFramesLong; | 183 rate_profile.num_frames = kNumFramesLong; |
184 | 184 |
185 std::vector<RateControlThresholds> rc_thresholds; | 185 std::vector<RateControlThresholds> rc_thresholds; |
186 AddRateControlThresholds(228, 70, 160, 15, 80, 1, 1, &rc_thresholds); | 186 AddRateControlThresholds(228, 70, 160, 15, 80, 1, 1, &rc_thresholds); |
187 | 187 |
188 QualityThresholds quality_thresholds(24.0, 13.0, 0.65, 0.37); | 188 QualityThresholds quality_thresholds(24.0, 13.0, 0.65, 0.37); |
189 | 189 |
190 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 190 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
191 kNoVisualizationParams); | 191 nullptr, kNoVisualizationParams); |
192 } | 192 } |
193 | 193 |
194 // TODO(marpan): Add temporal layer test for VP9, once changes are in | 194 // TODO(marpan): Add temporal layer test for VP9, once changes are in |
195 // vp9 wrapper for this. | 195 // vp9 wrapper for this. |
196 | 196 |
197 #endif // !defined(RTC_DISABLE_VP9) | 197 #endif // !defined(RTC_DISABLE_VP9) |
198 | 198 |
199 // VP8: Run with no packet loss and fixed bitrate. Quality should be very high. | 199 // VP8: Run with no packet loss and fixed bitrate. Quality should be very high. |
200 // One key frame (first frame only) in sequence. Setting |key_frame_interval| | 200 // One key frame (first frame only) in sequence. Setting |key_frame_interval| |
201 // to -1 below means no periodic key frames in test. | 201 // to -1 below means no periodic key frames in test. |
202 TEST_F(VideoProcessorIntegrationTestLibvpx, ProcessZeroPacketLoss) { | 202 TEST_F(VideoProcessorIntegrationTestLibvpx, ProcessZeroPacketLoss) { |
203 SetCodecSettings(&config_, kVideoCodecVP8, 1, false, true, true, false, | 203 SetCodecSettings(&config_, kVideoCodecVP8, 1, false, true, true, false, |
204 kResilienceOn, kCifWidth, kCifHeight); | 204 kResilienceOn, kCifWidth, kCifHeight); |
205 | 205 |
206 RateProfile rate_profile; | 206 RateProfile rate_profile; |
207 SetRateProfile(&rate_profile, 0, 500, 30, 0); | 207 SetRateProfile(&rate_profile, 0, 500, 30, 0); |
208 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; | 208 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; |
209 rate_profile.num_frames = kNumFramesShort; | 209 rate_profile.num_frames = kNumFramesShort; |
210 | 210 |
211 std::vector<RateControlThresholds> rc_thresholds; | 211 std::vector<RateControlThresholds> rc_thresholds; |
212 AddRateControlThresholds(0, 40, 20, 10, 15, 0, 1, &rc_thresholds); | 212 AddRateControlThresholds(0, 40, 20, 10, 15, 0, 1, &rc_thresholds); |
213 | 213 |
214 QualityThresholds quality_thresholds(34.95, 33.0, 0.90, 0.89); | 214 QualityThresholds quality_thresholds(34.95, 33.0, 0.90, 0.89); |
215 | 215 |
216 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 216 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
217 kNoVisualizationParams); | 217 nullptr, kNoVisualizationParams); |
218 } | 218 } |
219 | 219 |
220 // VP8: Run with 5% packet loss and fixed bitrate. Quality should be a bit | 220 // VP8: Run with 5% packet loss and fixed bitrate. Quality should be a bit |
221 // lower. One key frame (first frame only) in sequence. | 221 // lower. One key frame (first frame only) in sequence. |
222 TEST_F(VideoProcessorIntegrationTestLibvpx, Process5PercentPacketLoss) { | 222 TEST_F(VideoProcessorIntegrationTestLibvpx, Process5PercentPacketLoss) { |
223 config_.networking_config.packet_loss_probability = 0.05f; | 223 config_.networking_config.packet_loss_probability = 0.05f; |
224 SetCodecSettings(&config_, kVideoCodecVP8, 1, false, true, true, false, | 224 SetCodecSettings(&config_, kVideoCodecVP8, 1, false, true, true, false, |
225 kResilienceOn, kCifWidth, kCifHeight); | 225 kResilienceOn, kCifWidth, kCifHeight); |
226 | 226 |
227 RateProfile rate_profile; | 227 RateProfile rate_profile; |
228 SetRateProfile(&rate_profile, 0, 500, 30, 0); | 228 SetRateProfile(&rate_profile, 0, 500, 30, 0); |
229 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; | 229 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; |
230 rate_profile.num_frames = kNumFramesShort; | 230 rate_profile.num_frames = kNumFramesShort; |
231 | 231 |
232 std::vector<RateControlThresholds> rc_thresholds; | 232 std::vector<RateControlThresholds> rc_thresholds; |
233 AddRateControlThresholds(0, 40, 20, 10, 15, 0, 1, &rc_thresholds); | 233 AddRateControlThresholds(0, 40, 20, 10, 15, 0, 1, &rc_thresholds); |
234 | 234 |
235 QualityThresholds quality_thresholds(20.0, 16.0, 0.60, 0.40); | 235 QualityThresholds quality_thresholds(20.0, 16.0, 0.60, 0.40); |
236 | 236 |
237 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 237 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
238 kNoVisualizationParams); | 238 nullptr, kNoVisualizationParams); |
239 } | 239 } |
240 | 240 |
241 // VP8: Run with 10% packet loss and fixed bitrate. Quality should be lower. | 241 // VP8: Run with 10% packet loss and fixed bitrate. Quality should be lower. |
242 // One key frame (first frame only) in sequence. | 242 // One key frame (first frame only) in sequence. |
243 TEST_F(VideoProcessorIntegrationTestLibvpx, Process10PercentPacketLoss) { | 243 TEST_F(VideoProcessorIntegrationTestLibvpx, Process10PercentPacketLoss) { |
244 config_.networking_config.packet_loss_probability = 0.1f; | 244 config_.networking_config.packet_loss_probability = 0.1f; |
245 SetCodecSettings(&config_, kVideoCodecVP8, 1, false, true, true, false, | 245 SetCodecSettings(&config_, kVideoCodecVP8, 1, false, true, true, false, |
246 kResilienceOn, kCifWidth, kCifHeight); | 246 kResilienceOn, kCifWidth, kCifHeight); |
247 | 247 |
248 RateProfile rate_profile; | 248 RateProfile rate_profile; |
249 SetRateProfile(&rate_profile, 0, 500, 30, 0); | 249 SetRateProfile(&rate_profile, 0, 500, 30, 0); |
250 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; | 250 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; |
251 rate_profile.num_frames = kNumFramesShort; | 251 rate_profile.num_frames = kNumFramesShort; |
252 | 252 |
253 std::vector<RateControlThresholds> rc_thresholds; | 253 std::vector<RateControlThresholds> rc_thresholds; |
254 AddRateControlThresholds(0, 40, 20, 10, 15, 0, 1, &rc_thresholds); | 254 AddRateControlThresholds(0, 40, 20, 10, 15, 0, 1, &rc_thresholds); |
255 | 255 |
256 QualityThresholds quality_thresholds(19.0, 16.0, 0.50, 0.35); | 256 QualityThresholds quality_thresholds(19.0, 16.0, 0.50, 0.35); |
257 | 257 |
258 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 258 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
259 kNoVisualizationParams); | 259 nullptr, kNoVisualizationParams); |
260 } | 260 } |
261 | 261 |
262 #endif // !defined(WEBRTC_IOS) | 262 #endif // !defined(WEBRTC_IOS) |
263 | 263 |
264 // The tests below are currently disabled for Android. For ARM, the encoder | 264 // The tests below are currently disabled for Android. For ARM, the encoder |
265 // uses |cpu_speed| = 12, as opposed to default |cpu_speed| <= 6 for x86, | 265 // uses |cpu_speed| = 12, as opposed to default |cpu_speed| <= 6 for x86, |
266 // which leads to significantly different quality. The quality and rate control | 266 // which leads to significantly different quality. The quality and rate control |
267 // settings in the tests below are defined for encoder speed setting | 267 // settings in the tests below are defined for encoder speed setting |
268 // |cpu_speed| <= ~6. A number of settings would need to be significantly | 268 // |cpu_speed| <= ~6. A number of settings would need to be significantly |
269 // modified for the |cpu_speed| = 12 case. For now, keep the tests below | 269 // modified for the |cpu_speed| = 12 case. For now, keep the tests below |
(...skipping 24 matching lines...) Expand all Loading... |
294 rate_profile.num_frames = kNumFramesLong; | 294 rate_profile.num_frames = kNumFramesLong; |
295 | 295 |
296 std::vector<RateControlThresholds> rc_thresholds; | 296 std::vector<RateControlThresholds> rc_thresholds; |
297 AddRateControlThresholds(0, 45, 20, 10, 15, 0, 1, &rc_thresholds); | 297 AddRateControlThresholds(0, 45, 20, 10, 15, 0, 1, &rc_thresholds); |
298 AddRateControlThresholds(0, 0, 25, 20, 10, 0, 0, &rc_thresholds); | 298 AddRateControlThresholds(0, 0, 25, 20, 10, 0, 0, &rc_thresholds); |
299 AddRateControlThresholds(0, 0, 25, 15, 10, 0, 0, &rc_thresholds); | 299 AddRateControlThresholds(0, 0, 25, 15, 10, 0, 0, &rc_thresholds); |
300 | 300 |
301 QualityThresholds quality_thresholds(34.0, 32.0, 0.85, 0.80); | 301 QualityThresholds quality_thresholds(34.0, 32.0, 0.85, 0.80); |
302 | 302 |
303 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 303 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
304 kNoVisualizationParams); | 304 nullptr, kNoVisualizationParams); |
305 } | 305 } |
306 | 306 |
307 // VP8: Run with no packet loss, with an update (decrease) in frame rate. | 307 // VP8: Run with no packet loss, with an update (decrease) in frame rate. |
308 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. | 308 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. |
309 // At the bitrate in this test, this means better rate control after the | 309 // At the bitrate in this test, this means better rate control after the |
310 // update(s) to lower frame rate. So expect less frame drops, and max values | 310 // update(s) to lower frame rate. So expect less frame drops, and max values |
311 // for the rate control metrics can be lower. One key frame (first frame only). | 311 // for the rate control metrics can be lower. One key frame (first frame only). |
312 // Note: quality after update should be higher but we currently compute quality | 312 // Note: quality after update should be higher but we currently compute quality |
313 // metrics averaged over whole sequence run. | 313 // metrics averaged over whole sequence run. |
314 // Too slow to finish before timeout on iOS. See webrtc:4755. | 314 // Too slow to finish before timeout on iOS. See webrtc:4755. |
(...skipping 17 matching lines...) Expand all Loading... |
332 rate_profile.num_frames = kNumFramesLong; | 332 rate_profile.num_frames = kNumFramesLong; |
333 | 333 |
334 std::vector<RateControlThresholds> rc_thresholds; | 334 std::vector<RateControlThresholds> rc_thresholds; |
335 AddRateControlThresholds(40, 20, 75, 15, 60, 0, 1, &rc_thresholds); | 335 AddRateControlThresholds(40, 20, 75, 15, 60, 0, 1, &rc_thresholds); |
336 AddRateControlThresholds(10, 0, 25, 10, 35, 0, 0, &rc_thresholds); | 336 AddRateControlThresholds(10, 0, 25, 10, 35, 0, 0, &rc_thresholds); |
337 AddRateControlThresholds(0, 0, 20, 10, 15, 0, 0, &rc_thresholds); | 337 AddRateControlThresholds(0, 0, 20, 10, 15, 0, 0, &rc_thresholds); |
338 | 338 |
339 QualityThresholds quality_thresholds(31.0, 22.0, 0.80, 0.65); | 339 QualityThresholds quality_thresholds(31.0, 22.0, 0.80, 0.65); |
340 | 340 |
341 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 341 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
342 kNoVisualizationParams); | 342 nullptr, kNoVisualizationParams); |
343 } | 343 } |
344 | 344 |
345 // VP8: Run with no packet loss, with 3 temporal layers, with a rate update in | 345 // VP8: Run with no packet loss, with 3 temporal layers, with a rate update in |
346 // the middle of the sequence. The max values for the frame size mismatch and | 346 // the middle of the sequence. The max values for the frame size mismatch and |
347 // encoding rate mismatch are applied to each layer. | 347 // encoding rate mismatch are applied to each layer. |
348 // No dropped frames in this test, and internal spatial resizer is off. | 348 // No dropped frames in this test, and internal spatial resizer is off. |
349 // One key frame (first frame only) in sequence, so no spatial resizing. | 349 // One key frame (first frame only) in sequence, so no spatial resizing. |
350 // Too slow to finish before timeout on iOS. See webrtc:4755. | 350 // Too slow to finish before timeout on iOS. See webrtc:4755. |
351 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) | 351 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) |
352 #define MAYBE_ProcessNoLossTemporalLayersVP8 \ | 352 #define MAYBE_ProcessNoLossTemporalLayersVP8 \ |
(...skipping 12 matching lines...) Expand all Loading... |
365 rate_profile.frame_index_rate_update[2] = kNumFramesLong + 1; | 365 rate_profile.frame_index_rate_update[2] = kNumFramesLong + 1; |
366 rate_profile.num_frames = kNumFramesLong; | 366 rate_profile.num_frames = kNumFramesLong; |
367 | 367 |
368 std::vector<RateControlThresholds> rc_thresholds; | 368 std::vector<RateControlThresholds> rc_thresholds; |
369 AddRateControlThresholds(0, 20, 30, 10, 10, 0, 1, &rc_thresholds); | 369 AddRateControlThresholds(0, 20, 30, 10, 10, 0, 1, &rc_thresholds); |
370 AddRateControlThresholds(0, 0, 30, 15, 10, 0, 0, &rc_thresholds); | 370 AddRateControlThresholds(0, 0, 30, 15, 10, 0, 0, &rc_thresholds); |
371 | 371 |
372 QualityThresholds quality_thresholds(32.5, 30.0, 0.85, 0.80); | 372 QualityThresholds quality_thresholds(32.5, 30.0, 0.85, 0.80); |
373 | 373 |
374 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, | 374 ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds, |
375 kNoVisualizationParams); | 375 nullptr, kNoVisualizationParams); |
376 } | 376 } |
377 | 377 |
378 } // namespace test | 378 } // namespace test |
379 } // namespace webrtc | 379 } // namespace webrtc |
OLD | NEW |