OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "webrtc/base/array_view.h" | 13 #include "webrtc/base/array_view.h" |
14 #include "webrtc/modules/audio_processing/audio_buffer.h" | 14 #include "webrtc/modules/audio_processing/audio_buffer.h" |
15 #include "webrtc/modules/audio_processing/gain_control_impl.h" | 15 #include "webrtc/modules/audio_processing/gain_control_impl.h" |
16 #include "webrtc/modules/audio_processing/test/audio_buffer_tools.h" | 16 #include "webrtc/modules/audio_processing/test/audio_buffer_tools.h" |
17 #include "webrtc/modules/audio_processing/test/bitexactness_tools.h" | 17 #include "webrtc/modules/audio_processing/test/bitexactness_tools.h" |
18 | 18 |
19 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | |
20 defined(WEBRTC_ANDROID)) | |
21 | |
22 namespace webrtc { | 19 namespace webrtc { |
23 namespace { | 20 namespace { |
24 | 21 |
25 const int kNumFramesToProcess = 100; | 22 const int kNumFramesToProcess = 100; |
26 | 23 |
27 void ProcessOneFrame(int sample_rate_hz, | 24 void ProcessOneFrame(int sample_rate_hz, |
28 AudioBuffer* render_audio_buffer, | 25 AudioBuffer* render_audio_buffer, |
29 AudioBuffer* capture_audio_buffer, | 26 AudioBuffer* capture_audio_buffer, |
30 GainControlImpl* gain_controller) { | 27 GainControlImpl* gain_controller) { |
31 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { | 28 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // memory, testing only the last frame implicitly also tests the preceeding | 122 // memory, testing only the last frame implicitly also tests the preceeding |
126 // frames. | 123 // frames. |
127 const float kTolerance = 1.0f / 32768.0f; | 124 const float kTolerance = 1.0f / 32768.0f; |
128 EXPECT_TRUE(test::BitExactFrame( | 125 EXPECT_TRUE(test::BitExactFrame( |
129 capture_config.num_frames(), capture_config.num_channels(), | 126 capture_config.num_frames(), capture_config.num_channels(), |
130 output_reference, capture_output, kTolerance)); | 127 output_reference, capture_output, kTolerance)); |
131 } | 128 } |
132 | 129 |
133 } // namespace | 130 } // namespace |
134 | 131 |
| 132 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 133 defined(WEBRTC_ANDROID)) |
135 TEST(GainControlBitExactnessTest, | 134 TEST(GainControlBitExactnessTest, |
136 Mono8kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { | 135 Mono8kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 136 #else |
| 137 TEST(GainControlBitExactnessTest, |
| 138 DISABLED_Mono8kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 139 #endif |
137 const int kStreamAnalogLevelReference = 50; | 140 const int kStreamAnalogLevelReference = 50; |
138 const float kOutputReference[] = {-0.006622f, -0.002747f, 0.001587f}; | 141 const float kOutputReference[] = {-0.006622f, -0.002747f, 0.001587f}; |
139 RunBitExactnessTest(8000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, | 142 RunBitExactnessTest(8000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, |
140 true, 0, 100, kStreamAnalogLevelReference, | 143 true, 0, 100, kStreamAnalogLevelReference, |
141 kOutputReference); | 144 kOutputReference); |
142 } | 145 } |
143 | 146 |
| 147 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 148 defined(WEBRTC_ANDROID)) |
144 TEST(GainControlBitExactnessTest, | 149 TEST(GainControlBitExactnessTest, |
145 Mono16kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { | 150 Mono16kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 151 #else |
| 152 TEST(GainControlBitExactnessTest, |
| 153 DISABLED_Mono16kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 154 #endif |
146 const int kStreamAnalogLevelReference = 50; | 155 const int kStreamAnalogLevelReference = 50; |
147 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 156 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; |
148 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, | 157 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, |
149 true, 0, 100, kStreamAnalogLevelReference, | 158 true, 0, 100, kStreamAnalogLevelReference, |
150 kOutputReference); | 159 kOutputReference); |
151 } | 160 } |
152 | 161 |
| 162 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 163 defined(WEBRTC_ANDROID)) |
153 TEST(GainControlBitExactnessTest, | 164 TEST(GainControlBitExactnessTest, |
154 Stereo16kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { | 165 Stereo16kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 166 #else |
| 167 TEST(GainControlBitExactnessTest, |
| 168 DISABLED_Stereo16kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 169 #endif |
155 const int kStreamAnalogLevelReference = 50; | 170 const int kStreamAnalogLevelReference = 50; |
156 const float kOutputReference[] = {-0.027313f, -0.015900f, -0.028107f, | 171 const float kOutputReference[] = {-0.027313f, -0.015900f, -0.028107f, |
157 -0.027313f, -0.015900f, -0.028107f}; | 172 -0.027313f, -0.015900f, -0.028107f}; |
158 RunBitExactnessTest(16000, 2, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, | 173 RunBitExactnessTest(16000, 2, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, |
159 true, 0, 100, kStreamAnalogLevelReference, | 174 true, 0, 100, kStreamAnalogLevelReference, |
160 kOutputReference); | 175 kOutputReference); |
161 } | 176 } |
162 | 177 |
| 178 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 179 defined(WEBRTC_ANDROID)) |
163 TEST(GainControlBitExactnessTest, | 180 TEST(GainControlBitExactnessTest, |
164 Mono32kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { | 181 Mono32kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 182 #else |
| 183 TEST(GainControlBitExactnessTest, |
| 184 DISABLED_Mono32kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 185 #endif |
165 const int kStreamAnalogLevelReference = 50; | 186 const int kStreamAnalogLevelReference = 50; |
166 const float kOutputReference[] = {-0.010162f, -0.009155f, -0.008301f}; | 187 const float kOutputReference[] = {-0.010162f, -0.009155f, -0.008301f}; |
167 RunBitExactnessTest(32000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, | 188 RunBitExactnessTest(32000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, |
168 true, 0, 100, kStreamAnalogLevelReference, | 189 true, 0, 100, kStreamAnalogLevelReference, |
169 kOutputReference); | 190 kOutputReference); |
170 } | 191 } |
171 | 192 |
| 193 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 194 defined(WEBRTC_ANDROID)) |
172 TEST(GainControlBitExactnessTest, | 195 TEST(GainControlBitExactnessTest, |
173 Mono48kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { | 196 Mono48kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 197 #else |
| 198 TEST(GainControlBitExactnessTest, |
| 199 DISABLED_Mono48kHz_AdaptiveAnalog_Tl10_SL50_CG5_Lim_AL0_100) { |
| 200 #endif |
174 const int kStreamAnalogLevelReference = 50; | 201 const int kStreamAnalogLevelReference = 50; |
175 const float kOutputReference[] = {-0.010162f, -0.009155f, -0.008301f}; | 202 const float kOutputReference[] = {-0.010162f, -0.009155f, -0.008301f}; |
176 RunBitExactnessTest(32000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, | 203 RunBitExactnessTest(32000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 50, 5, |
177 true, 0, 100, kStreamAnalogLevelReference, | 204 true, 0, 100, kStreamAnalogLevelReference, |
178 kOutputReference); | 205 kOutputReference); |
179 } | 206 } |
180 | 207 |
| 208 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 209 defined(WEBRTC_ANDROID)) |
181 TEST(GainControlBitExactnessTest, | 210 TEST(GainControlBitExactnessTest, |
182 Mono8kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 211 Mono8kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 212 #else |
| 213 TEST(GainControlBitExactnessTest, |
| 214 DISABLED_Mono8kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 215 #endif |
183 const int kStreamAnalogLevelReference = 50; | 216 const int kStreamAnalogLevelReference = 50; |
184 const float kOutputReference[] = {-0.006317f, -0.002625f, 0.001495f}; | 217 const float kOutputReference[] = {-0.006317f, -0.002625f, 0.001495f}; |
185 RunBitExactnessTest(8000, 1, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, | 218 RunBitExactnessTest(8000, 1, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, |
186 true, 0, 100, kStreamAnalogLevelReference, | 219 true, 0, 100, kStreamAnalogLevelReference, |
187 kOutputReference); | 220 kOutputReference); |
188 } | 221 } |
189 | 222 |
| 223 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 224 defined(WEBRTC_ANDROID)) |
190 TEST(GainControlBitExactnessTest, | 225 TEST(GainControlBitExactnessTest, |
191 Mono16kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 226 Mono16kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 227 #else |
| 228 TEST(GainControlBitExactnessTest, |
| 229 DISABLED_Mono16kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 230 #endif |
192 const int kStreamAnalogLevelReference = 50; | 231 const int kStreamAnalogLevelReference = 50; |
193 const float kOutputReference[] = {-0.006256f, -0.004395f, -0.002777f}; | 232 const float kOutputReference[] = {-0.006256f, -0.004395f, -0.002777f}; |
194 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, | 233 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, |
195 true, 0, 100, kStreamAnalogLevelReference, | 234 true, 0, 100, kStreamAnalogLevelReference, |
196 kOutputReference); | 235 kOutputReference); |
197 } | 236 } |
198 | 237 |
| 238 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 239 defined(WEBRTC_ANDROID)) |
199 TEST(GainControlBitExactnessTest, | 240 TEST(GainControlBitExactnessTest, |
200 Stereo16kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 241 Stereo16kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 242 #else |
| 243 TEST(GainControlBitExactnessTest, |
| 244 DISABLED_Stereo16kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 245 #endif |
201 const int kStreamAnalogLevelReference = 50; | 246 const int kStreamAnalogLevelReference = 50; |
202 const float kOutputReference[] = {-0.023956f, -0.013947f, -0.024597f, | 247 const float kOutputReference[] = {-0.023956f, -0.013947f, -0.024597f, |
203 -0.023956f, -0.013947f, -0.024597f}; | 248 -0.023956f, -0.013947f, -0.024597f}; |
204 RunBitExactnessTest(16000, 2, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, | 249 RunBitExactnessTest(16000, 2, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, |
205 true, 0, 100, kStreamAnalogLevelReference, | 250 true, 0, 100, kStreamAnalogLevelReference, |
206 kOutputReference); | 251 kOutputReference); |
207 } | 252 } |
208 | 253 |
| 254 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 255 defined(WEBRTC_ANDROID)) |
209 TEST(GainControlBitExactnessTest, | 256 TEST(GainControlBitExactnessTest, |
210 Mono32kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 257 Mono32kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 258 #else |
| 259 TEST(GainControlBitExactnessTest, |
| 260 DISABLED_Mono32kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 261 #endif |
211 const int kStreamAnalogLevelReference = 50; | 262 const int kStreamAnalogLevelReference = 50; |
212 const float kOutputReference[] = {-0.009644f, -0.008728f, -0.007904f}; | 263 const float kOutputReference[] = {-0.009644f, -0.008728f, -0.007904f}; |
213 RunBitExactnessTest(32000, 1, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, | 264 RunBitExactnessTest(32000, 1, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, |
214 true, 0, 100, kStreamAnalogLevelReference, | 265 true, 0, 100, kStreamAnalogLevelReference, |
215 kOutputReference); | 266 kOutputReference); |
216 } | 267 } |
217 | 268 |
| 269 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 270 defined(WEBRTC_ANDROID)) |
218 TEST(GainControlBitExactnessTest, | 271 TEST(GainControlBitExactnessTest, |
219 Mono48kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 272 Mono48kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 273 #else |
| 274 TEST(GainControlBitExactnessTest, |
| 275 DISABLED_Mono48kHz_AdaptiveDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 276 #endif |
220 const int kStreamAnalogLevelReference = 50; | 277 const int kStreamAnalogLevelReference = 50; |
221 const float kOutputReference[] = {-0.009644f, -0.008728f, -0.007904f}; | 278 const float kOutputReference[] = {-0.009644f, -0.008728f, -0.007904f}; |
222 RunBitExactnessTest(32000, 1, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, | 279 RunBitExactnessTest(32000, 1, GainControl::Mode::kAdaptiveDigital, 10, 50, 5, |
223 true, 0, 100, kStreamAnalogLevelReference, | 280 true, 0, 100, kStreamAnalogLevelReference, |
224 kOutputReference); | 281 kOutputReference); |
225 } | 282 } |
226 | 283 |
| 284 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 285 defined(WEBRTC_ANDROID)) |
227 TEST(GainControlBitExactnessTest, | 286 TEST(GainControlBitExactnessTest, |
228 Mono8kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 287 Mono8kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 288 #else |
| 289 TEST(GainControlBitExactnessTest, |
| 290 DISABLED_Mono8kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 291 #endif |
229 const int kStreamAnalogLevelReference = 50; | 292 const int kStreamAnalogLevelReference = 50; |
230 const float kOutputReference[] = {-0.011871f, -0.004944f, 0.002838f}; | 293 const float kOutputReference[] = {-0.011871f, -0.004944f, 0.002838f}; |
231 RunBitExactnessTest(8000, 1, GainControl::Mode::kFixedDigital, 10, 50, 5, | 294 RunBitExactnessTest(8000, 1, GainControl::Mode::kFixedDigital, 10, 50, 5, |
232 true, 0, 100, kStreamAnalogLevelReference, | 295 true, 0, 100, kStreamAnalogLevelReference, |
233 kOutputReference); | 296 kOutputReference); |
234 } | 297 } |
235 | 298 |
| 299 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 300 defined(WEBRTC_ANDROID)) |
236 TEST(GainControlBitExactnessTest, | 301 TEST(GainControlBitExactnessTest, |
237 Mono16kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 302 Mono16kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 303 #else |
| 304 TEST(GainControlBitExactnessTest, |
| 305 DISABLED_Mono16kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 306 #endif |
238 const int kStreamAnalogLevelReference = 50; | 307 const int kStreamAnalogLevelReference = 50; |
239 const float kOutputReference[] = {-0.011780f, -0.008270f, -0.005219f}; | 308 const float kOutputReference[] = {-0.011780f, -0.008270f, -0.005219f}; |
240 RunBitExactnessTest(16000, 1, GainControl::Mode::kFixedDigital, 10, 50, 5, | 309 RunBitExactnessTest(16000, 1, GainControl::Mode::kFixedDigital, 10, 50, 5, |
241 true, 0, 100, kStreamAnalogLevelReference, | 310 true, 0, 100, kStreamAnalogLevelReference, |
242 kOutputReference); | 311 kOutputReference); |
243 } | 312 } |
244 | 313 |
| 314 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 315 defined(WEBRTC_ANDROID)) |
245 TEST(GainControlBitExactnessTest, | 316 TEST(GainControlBitExactnessTest, |
246 Stereo16kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 317 Stereo16kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 318 #else |
| 319 TEST(GainControlBitExactnessTest, |
| 320 DISABLED_Stereo16kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 321 #endif |
247 const int kStreamAnalogLevelReference = 50; | 322 const int kStreamAnalogLevelReference = 50; |
248 const float kOutputReference[] = {-0.048950f, -0.028503f, -0.050354f, | 323 const float kOutputReference[] = {-0.048950f, -0.028503f, -0.050354f, |
249 -0.048950f, -0.028503f, -0.050354f}; | 324 -0.048950f, -0.028503f, -0.050354f}; |
250 RunBitExactnessTest(16000, 2, GainControl::Mode::kFixedDigital, 10, 50, 5, | 325 RunBitExactnessTest(16000, 2, GainControl::Mode::kFixedDigital, 10, 50, 5, |
251 true, 0, 100, kStreamAnalogLevelReference, | 326 true, 0, 100, kStreamAnalogLevelReference, |
252 kOutputReference); | 327 kOutputReference); |
253 } | 328 } |
254 | 329 |
| 330 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 331 defined(WEBRTC_ANDROID)) |
255 TEST(GainControlBitExactnessTest, | 332 TEST(GainControlBitExactnessTest, |
256 Mono32kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 333 Mono32kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 334 #else |
| 335 TEST(GainControlBitExactnessTest, |
| 336 DISABLED_Mono32kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 337 #endif |
257 const int kStreamAnalogLevelReference = 50; | 338 const int kStreamAnalogLevelReference = 50; |
258 const float kOutputReference[] = {-0.018188f, -0.016418f, -0.014862f}; | 339 const float kOutputReference[] = {-0.018188f, -0.016418f, -0.014862f}; |
259 RunBitExactnessTest(32000, 1, GainControl::Mode::kFixedDigital, 10, 50, 5, | 340 RunBitExactnessTest(32000, 1, GainControl::Mode::kFixedDigital, 10, 50, 5, |
260 true, 0, 100, kStreamAnalogLevelReference, | 341 true, 0, 100, kStreamAnalogLevelReference, |
261 kOutputReference); | 342 kOutputReference); |
262 } | 343 } |
263 | 344 |
| 345 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 346 defined(WEBRTC_ANDROID)) |
264 TEST(GainControlBitExactnessTest, | 347 TEST(GainControlBitExactnessTest, |
265 Mono48kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { | 348 Mono48kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 349 #else |
| 350 TEST(GainControlBitExactnessTest, |
| 351 DISABLED_Mono48kHz_FixedDigital_Tl10_SL50_CG5_Lim_AL0_100) { |
| 352 #endif |
266 const int kStreamAnalogLevelReference = 50; | 353 const int kStreamAnalogLevelReference = 50; |
267 const float kOutputReference[] = {-0.018188f, -0.016418f, -0.014862f}; | 354 const float kOutputReference[] = {-0.018188f, -0.016418f, -0.014862f}; |
268 RunBitExactnessTest(32000, 1, GainControl::Mode::kFixedDigital, 10, 50, 5, | 355 RunBitExactnessTest(32000, 1, GainControl::Mode::kFixedDigital, 10, 50, 5, |
269 true, 0, 100, kStreamAnalogLevelReference, | 356 true, 0, 100, kStreamAnalogLevelReference, |
270 kOutputReference); | 357 kOutputReference); |
271 } | 358 } |
272 | 359 |
| 360 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 361 defined(WEBRTC_ANDROID)) |
273 TEST(GainControlBitExactnessTest, | 362 TEST(GainControlBitExactnessTest, |
274 Mono16kHz_AdaptiveAnalog_Tl10_SL10_CG5_Lim_AL0_100) { | 363 Mono16kHz_AdaptiveAnalog_Tl10_SL10_CG5_Lim_AL0_100) { |
| 364 #else |
| 365 TEST(GainControlBitExactnessTest, |
| 366 DISABLED_Mono16kHz_AdaptiveAnalog_Tl10_SL10_CG5_Lim_AL0_100) { |
| 367 #endif |
275 const int kStreamAnalogLevelReference = 12; | 368 const int kStreamAnalogLevelReference = 12; |
276 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 369 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; |
277 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 10, 5, | 370 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 10, 5, |
278 true, 0, 100, kStreamAnalogLevelReference, | 371 true, 0, 100, kStreamAnalogLevelReference, |
279 kOutputReference); | 372 kOutputReference); |
280 } | 373 } |
281 | 374 |
| 375 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 376 defined(WEBRTC_ANDROID)) |
282 TEST(GainControlBitExactnessTest, | 377 TEST(GainControlBitExactnessTest, |
283 Mono16kHz_AdaptiveAnalog_Tl10_SL100_CG5_Lim_AL70_80) { | 378 Mono16kHz_AdaptiveAnalog_Tl10_SL100_CG5_Lim_AL70_80) { |
| 379 #else |
| 380 TEST(GainControlBitExactnessTest, |
| 381 DISABLED_Mono16kHz_AdaptiveAnalog_Tl10_SL100_CG5_Lim_AL70_80) { |
| 382 #endif |
284 const int kStreamAnalogLevelReference = 100; | 383 const int kStreamAnalogLevelReference = 100; |
285 const float kOutputReference[] = {-0.006348f, -0.004456f, -0.002808f}; | 384 const float kOutputReference[] = {-0.006348f, -0.004456f, -0.002808f}; |
286 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 100, 5, | 385 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveAnalog, 10, 100, 5, |
287 true, 70, 80, kStreamAnalogLevelReference, | 386 true, 70, 80, kStreamAnalogLevelReference, |
288 kOutputReference); | 387 kOutputReference); |
289 } | 388 } |
290 | 389 |
| 390 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 391 defined(WEBRTC_ANDROID)) |
291 TEST(GainControlBitExactnessTest, | 392 TEST(GainControlBitExactnessTest, |
292 Mono16kHz_AdaptiveDigital_Tl10_SL100_CG5_NoLim_AL0_100) { | 393 Mono16kHz_AdaptiveDigital_Tl10_SL100_CG5_NoLim_AL0_100) { |
| 394 #else |
| 395 TEST(GainControlBitExactnessTest, |
| 396 DISABLED_Mono16kHz_AdaptiveDigital_Tl10_SL100_CG5_NoLim_AL0_100) { |
| 397 #endif |
293 const int kStreamAnalogLevelReference = 100; | 398 const int kStreamAnalogLevelReference = 100; |
294 const float kOutputReference[] = {-0.006592f, -0.004639f, -0.002930f}; | 399 const float kOutputReference[] = {-0.006592f, -0.004639f, -0.002930f}; |
295 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveDigital, 10, 100, 5, | 400 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveDigital, 10, 100, 5, |
296 false, 0, 100, kStreamAnalogLevelReference, | 401 false, 0, 100, kStreamAnalogLevelReference, |
297 kOutputReference); | 402 kOutputReference); |
298 } | 403 } |
299 | 404 |
| 405 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 406 defined(WEBRTC_ANDROID)) |
300 TEST(GainControlBitExactnessTest, | 407 TEST(GainControlBitExactnessTest, |
301 Mono16kHz_AdaptiveDigital_Tl40_SL100_CG5_Lim_AL0_100) { | 408 Mono16kHz_AdaptiveDigital_Tl40_SL100_CG5_Lim_AL0_100) { |
| 409 #else |
| 410 TEST(GainControlBitExactnessTest, |
| 411 DISABLED_Mono16kHz_AdaptiveDigital_Tl40_SL100_CG5_Lim_AL0_100) { |
| 412 #endif |
302 const int kStreamAnalogLevelReference = 100; | 413 const int kStreamAnalogLevelReference = 100; |
303 const float kOutputReference[] = {-0.008759f, -0.006134f, -0.003876f}; | 414 const float kOutputReference[] = {-0.008759f, -0.006134f, -0.003876f}; |
304 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveDigital, 40, 100, 5, | 415 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveDigital, 40, 100, 5, |
305 true, 0, 100, kStreamAnalogLevelReference, | 416 true, 0, 100, kStreamAnalogLevelReference, |
306 kOutputReference); | 417 kOutputReference); |
307 } | 418 } |
308 | 419 |
| 420 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 421 defined(WEBRTC_ANDROID)) |
309 TEST(GainControlBitExactnessTest, | 422 TEST(GainControlBitExactnessTest, |
310 Mono16kHz_AdaptiveDigital_Tl10_SL100_CG30_Lim_AL0_100) { | 423 Mono16kHz_AdaptiveDigital_Tl10_SL100_CG30_Lim_AL0_100) { |
| 424 #else |
| 425 TEST(GainControlBitExactnessTest, |
| 426 DISABLED_Mono16kHz_AdaptiveDigital_Tl10_SL100_CG30_Lim_AL0_100) { |
| 427 #endif |
311 const int kStreamAnalogLevelReference = 100; | 428 const int kStreamAnalogLevelReference = 100; |
312 const float kOutputReference[] = {-0.006134f, -0.004303f, -0.002716f}; | 429 const float kOutputReference[] = {-0.006134f, -0.004303f, -0.002716f}; |
313 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveDigital, 10, 100, | 430 RunBitExactnessTest(16000, 1, GainControl::Mode::kAdaptiveDigital, 10, 100, |
314 30, true, 0, 100, kStreamAnalogLevelReference, | 431 30, true, 0, 100, kStreamAnalogLevelReference, |
315 kOutputReference); | 432 kOutputReference); |
316 } | 433 } |
317 | 434 |
318 } // namespace webrtc | 435 } // namespace webrtc |
319 | |
320 #endif | |
OLD | NEW |