| 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> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 int stream_drift_samples, | 43 int stream_drift_samples, |
| 44 AudioBuffer* render_audio_buffer, | 44 AudioBuffer* render_audio_buffer, |
| 45 AudioBuffer* capture_audio_buffer, | 45 AudioBuffer* capture_audio_buffer, |
| 46 EchoCancellationImpl* echo_canceller) { | 46 EchoCancellationImpl* echo_canceller) { |
| 47 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { | 47 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { |
| 48 render_audio_buffer->SplitIntoFrequencyBands(); | 48 render_audio_buffer->SplitIntoFrequencyBands(); |
| 49 capture_audio_buffer->SplitIntoFrequencyBands(); | 49 capture_audio_buffer->SplitIntoFrequencyBands(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 echo_canceller->ProcessRenderAudio(render_audio_buffer); | 52 echo_canceller->ProcessRenderAudio(render_audio_buffer); |
| 53 echo_canceller->ReadQueuedRenderData(); |
| 53 | 54 |
| 54 if (drift_compensation_enabled) { | 55 if (drift_compensation_enabled) { |
| 55 static_cast<EchoCancellation*>(echo_canceller) | 56 static_cast<EchoCancellation*>(echo_canceller) |
| 56 ->set_stream_drift_samples(stream_drift_samples); | 57 ->set_stream_drift_samples(stream_drift_samples); |
| 57 } | 58 } |
| 58 | 59 |
| 59 echo_canceller->ProcessCaptureAudio(capture_audio_buffer, stream_delay_ms); | 60 echo_canceller->ProcessCaptureAudio(capture_audio_buffer, stream_delay_ms); |
| 60 | 61 |
| 61 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { | 62 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { |
| 62 capture_audio_buffer->MergeFrequencyBands(); | 63 capture_audio_buffer->MergeFrequencyBands(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // from last frame processed are compared in order not having to specify all | 122 // from last frame processed are compared in order not having to specify all |
| 122 // preceeding frames as testvectors. As the algorithm being tested has a | 123 // preceeding frames as testvectors. As the algorithm being tested has a |
| 123 // memory, testing only the last frame implicitly also tests the preceeding | 124 // memory, testing only the last frame implicitly also tests the preceeding |
| 124 // frames. | 125 // frames. |
| 125 const float kElementErrorBound = 1.0f / 32768.0f; | 126 const float kElementErrorBound = 1.0f / 32768.0f; |
| 126 EXPECT_TRUE(test::VerifyDeinterleavedArray( | 127 EXPECT_TRUE(test::VerifyDeinterleavedArray( |
| 127 capture_config.num_frames(), capture_config.num_channels(), | 128 capture_config.num_frames(), capture_config.num_channels(), |
| 128 output_reference, capture_output, kElementErrorBound)); | 129 output_reference, capture_output, kElementErrorBound)); |
| 129 } | 130 } |
| 130 | 131 |
| 131 const bool kStreamHasEchoReference = false; | 132 const bool kStreamHasEchoReference = true; |
| 132 | 133 |
| 133 } // namespace | 134 } // namespace |
| 134 | 135 |
| 135 // TODO(peah): Activate all these tests for ARM and ARM64 once the issue on the | 136 // TODO(peah): Activate all these tests for ARM and ARM64 once the issue on the |
| 136 // Chromium ARM and ARM64 boths have been identified. This is tracked in the | 137 // Chromium ARM and ARM64 boths have been identified. This is tracked in the |
| 137 // issue https://bugs.chromium.org/p/webrtc/issues/detail?id=5711. | 138 // issue https://bugs.chromium.org/p/webrtc/issues/detail?id=5711. |
| 138 | 139 |
| 139 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 140 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 140 defined(WEBRTC_ANDROID)) | 141 defined(WEBRTC_ANDROID)) |
| 141 TEST(EchoCancellationBitExactnessTest, | 142 TEST(EchoCancellationBitExactnessTest, |
| 142 Mono8kHz_HighLevel_NoDrift_StreamDelay0) { | 143 Mono8kHz_HighLevel_NoDrift_StreamDelay0) { |
| 143 #else | 144 #else |
| 144 TEST(EchoCancellationBitExactnessTest, | 145 TEST(EchoCancellationBitExactnessTest, |
| 145 DISABLED_Mono8kHz_HighLevel_NoDrift_StreamDelay0) { | 146 DISABLED_Mono8kHz_HighLevel_NoDrift_StreamDelay0) { |
| 146 #endif | 147 #endif |
| 147 const float kOutputReference[] = {-0.006622f, -0.002747f, 0.001587f}; | 148 const float kOutputReference[] = {-0.000646f, -0.001525f, 0.002688f}; |
| 148 RunBitexactnessTest(8000, 1, 0, false, 0, | 149 RunBitexactnessTest(8000, 1, 0, false, 0, |
| 149 EchoCancellation::SuppressionLevel::kHighSuppression, | 150 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 150 kStreamHasEchoReference, kOutputReference); | 151 kStreamHasEchoReference, kOutputReference); |
| 151 } | 152 } |
| 152 | 153 |
| 153 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 154 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 154 defined(WEBRTC_ANDROID)) | 155 defined(WEBRTC_ANDROID)) |
| 155 TEST(EchoCancellationBitExactnessTest, | 156 TEST(EchoCancellationBitExactnessTest, |
| 156 Mono16kHz_HighLevel_NoDrift_StreamDelay0) { | 157 Mono16kHz_HighLevel_NoDrift_StreamDelay0) { |
| 157 #else | 158 #else |
| 158 TEST(EchoCancellationBitExactnessTest, | 159 TEST(EchoCancellationBitExactnessTest, |
| 159 DISABLED_Mono16kHz_HighLevel_NoDrift_StreamDelay0) { | 160 DISABLED_Mono16kHz_HighLevel_NoDrift_StreamDelay0) { |
| 160 #endif | 161 #endif |
| 161 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 162 const float kOutputReference[] = {0.000055f, 0.000421f, 0.001149f}; |
| 162 RunBitexactnessTest(16000, 1, 0, false, 0, | 163 RunBitexactnessTest(16000, 1, 0, false, 0, |
| 163 EchoCancellation::SuppressionLevel::kHighSuppression, | 164 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 164 kStreamHasEchoReference, kOutputReference); | 165 kStreamHasEchoReference, kOutputReference); |
| 165 } | 166 } |
| 166 | 167 |
| 167 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 168 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 168 defined(WEBRTC_ANDROID)) | 169 defined(WEBRTC_ANDROID)) |
| 169 TEST(EchoCancellationBitExactnessTest, | 170 TEST(EchoCancellationBitExactnessTest, |
| 170 Mono32kHz_HighLevel_NoDrift_StreamDelay0) { | 171 Mono32kHz_HighLevel_NoDrift_StreamDelay0) { |
| 171 #else | 172 #else |
| 172 TEST(EchoCancellationBitExactnessTest, | 173 TEST(EchoCancellationBitExactnessTest, |
| 173 DISABLED_Mono32kHz_HighLevel_NoDrift_StreamDelay0) { | 174 DISABLED_Mono32kHz_HighLevel_NoDrift_StreamDelay0) { |
| 174 #endif | 175 #endif |
| 175 const float kOutputReference[] = {-0.010162f, -0.009155f, -0.008301f}; | 176 const float kOutputReference[] = {-0.000671f, 0.000061f, -0.000031f}; |
| 176 RunBitexactnessTest(32000, 1, 0, false, 0, | 177 RunBitexactnessTest(32000, 1, 0, false, 0, |
| 177 EchoCancellation::SuppressionLevel::kHighSuppression, | 178 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 178 kStreamHasEchoReference, kOutputReference); | 179 kStreamHasEchoReference, kOutputReference); |
| 179 } | 180 } |
| 180 | 181 |
| 181 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 182 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 182 defined(WEBRTC_ANDROID)) | 183 defined(WEBRTC_ANDROID)) |
| 183 TEST(EchoCancellationBitExactnessTest, | 184 TEST(EchoCancellationBitExactnessTest, |
| 184 Mono48kHz_HighLevel_NoDrift_StreamDelay0) { | 185 Mono48kHz_HighLevel_NoDrift_StreamDelay0) { |
| 185 #else | 186 #else |
| 186 TEST(EchoCancellationBitExactnessTest, | 187 TEST(EchoCancellationBitExactnessTest, |
| 187 DISABLED_Mono48kHz_HighLevel_NoDrift_StreamDelay0) { | 188 DISABLED_Mono48kHz_HighLevel_NoDrift_StreamDelay0) { |
| 188 #endif | 189 #endif |
| 189 const float kOutputReference[] = {-0.009554f, -0.009857f, -0.009868f}; | 190 const float kOutputReference[] = {-0.001403f, -0.001411f, -0.000755f}; |
| 190 RunBitexactnessTest(48000, 1, 0, false, 0, | 191 RunBitexactnessTest(48000, 1, 0, false, 0, |
| 191 EchoCancellation::SuppressionLevel::kHighSuppression, | 192 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 192 kStreamHasEchoReference, kOutputReference); | 193 kStreamHasEchoReference, kOutputReference); |
| 193 } | 194 } |
| 194 | 195 |
| 195 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 196 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 196 defined(WEBRTC_ANDROID)) | 197 defined(WEBRTC_ANDROID)) |
| 197 TEST(EchoCancellationBitExactnessTest, | 198 TEST(EchoCancellationBitExactnessTest, |
| 198 Mono16kHz_LowLevel_NoDrift_StreamDelay0) { | 199 Mono16kHz_LowLevel_NoDrift_StreamDelay0) { |
| 199 #else | 200 #else |
| 200 TEST(EchoCancellationBitExactnessTest, | 201 TEST(EchoCancellationBitExactnessTest, |
| 201 DISABLED_Mono16kHz_LowLevel_NoDrift_StreamDelay0) { | 202 DISABLED_Mono16kHz_LowLevel_NoDrift_StreamDelay0) { |
| 202 #endif | 203 #endif |
| 203 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 204 #if defined(WEBRTC_MAC) |
| 205 const float kOutputReference[] = {-0.000145f, 0.000179f, 0.000917f}; |
| 206 #else |
| 207 const float kOutputReference[] = {-0.000009f, 0.000363f, 0.001094f}; |
| 208 #endif |
| 204 RunBitexactnessTest(16000, 1, 0, false, 0, | 209 RunBitexactnessTest(16000, 1, 0, false, 0, |
| 205 EchoCancellation::SuppressionLevel::kLowSuppression, | 210 EchoCancellation::SuppressionLevel::kLowSuppression, |
| 206 kStreamHasEchoReference, kOutputReference); | 211 kStreamHasEchoReference, kOutputReference); |
| 207 } | 212 } |
| 208 | 213 |
| 209 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 214 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 210 defined(WEBRTC_ANDROID)) | 215 defined(WEBRTC_ANDROID)) |
| 211 TEST(EchoCancellationBitExactnessTest, | 216 TEST(EchoCancellationBitExactnessTest, |
| 212 Mono16kHz_ModerateLevel_NoDrift_StreamDelay0) { | 217 Mono16kHz_ModerateLevel_NoDrift_StreamDelay0) { |
| 213 #else | 218 #else |
| 214 TEST(EchoCancellationBitExactnessTest, | 219 TEST(EchoCancellationBitExactnessTest, |
| 215 DISABLED_Mono16kHz_ModerateLevel_NoDrift_StreamDelay0) { | 220 DISABLED_Mono16kHz_ModerateLevel_NoDrift_StreamDelay0) { |
| 216 #endif | 221 #endif |
| 217 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 222 const float kOutputReference[] = {0.000055f, 0.000421f, 0.001149f}; |
| 218 RunBitexactnessTest(16000, 1, 0, false, 0, | 223 RunBitexactnessTest(16000, 1, 0, false, 0, |
| 219 EchoCancellation::SuppressionLevel::kModerateSuppression, | 224 EchoCancellation::SuppressionLevel::kModerateSuppression, |
| 220 kStreamHasEchoReference, kOutputReference); | 225 kStreamHasEchoReference, kOutputReference); |
| 221 } | 226 } |
| 222 | 227 |
| 223 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 228 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 224 defined(WEBRTC_ANDROID)) | 229 defined(WEBRTC_ANDROID)) |
| 225 TEST(EchoCancellationBitExactnessTest, | 230 TEST(EchoCancellationBitExactnessTest, |
| 226 Mono16kHz_HighLevel_NoDrift_StreamDelay10) { | 231 Mono16kHz_HighLevel_NoDrift_StreamDelay10) { |
| 227 #else | 232 #else |
| 228 TEST(EchoCancellationBitExactnessTest, | 233 TEST(EchoCancellationBitExactnessTest, |
| 229 DISABLED_Mono16kHz_HighLevel_NoDrift_StreamDelay10) { | 234 DISABLED_Mono16kHz_HighLevel_NoDrift_StreamDelay10) { |
| 230 #endif | 235 #endif |
| 231 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 236 const float kOutputReference[] = {0.000055f, 0.000421f, 0.001149f}; |
| 232 RunBitexactnessTest(16000, 1, 10, false, 0, | 237 RunBitexactnessTest(16000, 1, 10, false, 0, |
| 233 EchoCancellation::SuppressionLevel::kHighSuppression, | 238 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 234 kStreamHasEchoReference, kOutputReference); | 239 kStreamHasEchoReference, kOutputReference); |
| 235 } | 240 } |
| 236 | 241 |
| 237 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 242 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 238 defined(WEBRTC_ANDROID)) | 243 defined(WEBRTC_ANDROID)) |
| 239 TEST(EchoCancellationBitExactnessTest, | 244 TEST(EchoCancellationBitExactnessTest, |
| 240 Mono16kHz_HighLevel_NoDrift_StreamDelay20) { | 245 Mono16kHz_HighLevel_NoDrift_StreamDelay20) { |
| 241 #else | 246 #else |
| 242 TEST(EchoCancellationBitExactnessTest, | 247 TEST(EchoCancellationBitExactnessTest, |
| 243 DISABLED_Mono16kHz_HighLevel_NoDrift_StreamDelay20) { | 248 DISABLED_Mono16kHz_HighLevel_NoDrift_StreamDelay20) { |
| 244 #endif | 249 #endif |
| 245 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 250 const float kOutputReference[] = {0.000055f, 0.000421f, 0.001149f}; |
| 246 RunBitexactnessTest(16000, 1, 20, false, 0, | 251 RunBitexactnessTest(16000, 1, 20, false, 0, |
| 247 EchoCancellation::SuppressionLevel::kHighSuppression, | 252 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 248 kStreamHasEchoReference, kOutputReference); | 253 kStreamHasEchoReference, kOutputReference); |
| 249 } | 254 } |
| 250 | 255 |
| 251 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 256 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 252 defined(WEBRTC_ANDROID)) | 257 defined(WEBRTC_ANDROID)) |
| 253 TEST(EchoCancellationBitExactnessTest, | 258 TEST(EchoCancellationBitExactnessTest, |
| 254 Mono16kHz_HighLevel_Drift0_StreamDelay0) { | 259 Mono16kHz_HighLevel_Drift0_StreamDelay0) { |
| 255 #else | 260 #else |
| 256 TEST(EchoCancellationBitExactnessTest, | 261 TEST(EchoCancellationBitExactnessTest, |
| 257 DISABLED_Mono16kHz_HighLevel_Drift0_StreamDelay0) { | 262 DISABLED_Mono16kHz_HighLevel_Drift0_StreamDelay0) { |
| 258 #endif | 263 #endif |
| 259 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 264 const float kOutputReference[] = {0.000055f, 0.000421f, 0.001149f}; |
| 260 RunBitexactnessTest(16000, 1, 0, true, 0, | 265 RunBitexactnessTest(16000, 1, 0, true, 0, |
| 261 EchoCancellation::SuppressionLevel::kHighSuppression, | 266 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 262 kStreamHasEchoReference, kOutputReference); | 267 kStreamHasEchoReference, kOutputReference); |
| 263 } | 268 } |
| 264 | 269 |
| 265 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 270 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 266 defined(WEBRTC_ANDROID)) | 271 defined(WEBRTC_ANDROID)) |
| 267 TEST(EchoCancellationBitExactnessTest, | 272 TEST(EchoCancellationBitExactnessTest, |
| 268 Mono16kHz_HighLevel_Drift5_StreamDelay0) { | 273 Mono16kHz_HighLevel_Drift5_StreamDelay0) { |
| 269 #else | 274 #else |
| 270 TEST(EchoCancellationBitExactnessTest, | 275 TEST(EchoCancellationBitExactnessTest, |
| 271 DISABLED_Mono16kHz_HighLevel_Drift5_StreamDelay0) { | 276 DISABLED_Mono16kHz_HighLevel_Drift5_StreamDelay0) { |
| 272 #endif | 277 #endif |
| 273 const float kOutputReference[] = {-0.006561f, -0.004608f, -0.002899f}; | 278 const float kOutputReference[] = {0.000055f, 0.000421f, 0.001149f}; |
| 274 RunBitexactnessTest(16000, 1, 0, true, 5, | 279 RunBitexactnessTest(16000, 1, 0, true, 5, |
| 275 EchoCancellation::SuppressionLevel::kHighSuppression, | 280 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 276 kStreamHasEchoReference, kOutputReference); | 281 kStreamHasEchoReference, kOutputReference); |
| 277 } | 282 } |
| 278 | 283 |
| 279 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 284 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 280 defined(WEBRTC_ANDROID)) | 285 defined(WEBRTC_ANDROID)) |
| 281 TEST(EchoCancellationBitExactnessTest, | 286 TEST(EchoCancellationBitExactnessTest, |
| 282 Stereo8kHz_HighLevel_NoDrift_StreamDelay0) { | 287 Stereo8kHz_HighLevel_NoDrift_StreamDelay0) { |
| 283 #else | 288 #else |
| 284 TEST(EchoCancellationBitExactnessTest, | 289 TEST(EchoCancellationBitExactnessTest, |
| 285 DISABLED_Stereo8kHz_HighLevel_NoDrift_StreamDelay0) { | 290 DISABLED_Stereo8kHz_HighLevel_NoDrift_StreamDelay0) { |
| 286 #endif | 291 #endif |
| 287 const float kOutputReference[] = {-0.027359f, -0.015823f, -0.028488f, | 292 #if defined(WEBRTC_MAC) |
| 288 -0.027359f, -0.015823f, -0.028488f}; | 293 const float kOutputReference[] = {-0.000392f, -0.001449f, 0.003004f, |
| 294 -0.000392f, -0.001449f, 0.003004f}; |
| 295 #else |
| 296 const float kOutputReference[] = {-0.000464f, -0.001525f, 0.002933f, |
| 297 -0.000464f, -0.001525f, 0.002933f}; |
| 298 #endif |
| 289 RunBitexactnessTest(8000, 2, 0, false, 0, | 299 RunBitexactnessTest(8000, 2, 0, false, 0, |
| 290 EchoCancellation::SuppressionLevel::kHighSuppression, | 300 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 291 kStreamHasEchoReference, kOutputReference); | 301 kStreamHasEchoReference, kOutputReference); |
| 292 } | 302 } |
| 293 | 303 |
| 294 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 304 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 295 defined(WEBRTC_ANDROID)) | 305 defined(WEBRTC_ANDROID)) |
| 296 TEST(EchoCancellationBitExactnessTest, | 306 TEST(EchoCancellationBitExactnessTest, |
| 297 Stereo16kHz_HighLevel_NoDrift_StreamDelay0) { | 307 Stereo16kHz_HighLevel_NoDrift_StreamDelay0) { |
| 298 #else | 308 #else |
| 299 TEST(EchoCancellationBitExactnessTest, | 309 TEST(EchoCancellationBitExactnessTest, |
| 300 DISABLED_Stereo16kHz_HighLevel_NoDrift_StreamDelay0) { | 310 DISABLED_Stereo16kHz_HighLevel_NoDrift_StreamDelay0) { |
| 301 #endif | 311 #endif |
| 302 const float kOutputReference[] = {-0.027298f, -0.015900f, -0.028107f, | 312 const float kOutputReference[] = {0.000166f, 0.000735f, 0.000841f, |
| 303 -0.027298f, -0.015900f, -0.028107f}; | 313 0.000166f, 0.000735f, 0.000841f}; |
| 304 RunBitexactnessTest(16000, 2, 0, false, 0, | 314 RunBitexactnessTest(16000, 2, 0, false, 0, |
| 305 EchoCancellation::SuppressionLevel::kHighSuppression, | 315 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 306 kStreamHasEchoReference, kOutputReference); | 316 kStreamHasEchoReference, kOutputReference); |
| 307 } | 317 } |
| 308 | 318 |
| 309 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 319 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 310 defined(WEBRTC_ANDROID)) | 320 defined(WEBRTC_ANDROID)) |
| 311 TEST(EchoCancellationBitExactnessTest, | 321 TEST(EchoCancellationBitExactnessTest, |
| 312 Stereo32kHz_HighLevel_NoDrift_StreamDelay0) { | 322 Stereo32kHz_HighLevel_NoDrift_StreamDelay0) { |
| 313 #else | 323 #else |
| 314 TEST(EchoCancellationBitExactnessTest, | 324 TEST(EchoCancellationBitExactnessTest, |
| 315 DISABLED_Stereo32kHz_HighLevel_NoDrift_StreamDelay0) { | 325 DISABLED_Stereo32kHz_HighLevel_NoDrift_StreamDelay0) { |
| 316 #endif | 326 #endif |
| 317 const float kOutputReference[] = {0.004547f, -0.004456f, -0.000946f, | 327 #if defined(WEBRTC_MAC) |
| 318 0.004547f, -0.004456f, -0.000946f}; | 328 const float kOutputReference[] = {-0.000458f, 0.000244f, 0.000153f, |
| 329 -0.000458f, 0.000244f, 0.000153f}; |
| 330 #else |
| 331 const float kOutputReference[] = {-0.000427f, 0.000183f, 0.000183f, |
| 332 -0.000427f, 0.000183f, 0.000183f}; |
| 333 #endif |
| 319 RunBitexactnessTest(32000, 2, 0, false, 0, | 334 RunBitexactnessTest(32000, 2, 0, false, 0, |
| 320 EchoCancellation::SuppressionLevel::kHighSuppression, | 335 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 321 kStreamHasEchoReference, kOutputReference); | 336 kStreamHasEchoReference, kOutputReference); |
| 322 } | 337 } |
| 323 | 338 |
| 324 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ | 339 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ |
| 325 defined(WEBRTC_ANDROID)) | 340 defined(WEBRTC_ANDROID)) |
| 326 TEST(EchoCancellationBitExactnessTest, | 341 TEST(EchoCancellationBitExactnessTest, |
| 327 Stereo48kHz_HighLevel_NoDrift_StreamDelay0) { | 342 Stereo48kHz_HighLevel_NoDrift_StreamDelay0) { |
| 328 #else | 343 #else |
| 329 TEST(EchoCancellationBitExactnessTest, | 344 TEST(EchoCancellationBitExactnessTest, |
| 330 DISABLED_Stereo48kHz_HighLevel_NoDrift_StreamDelay0) { | 345 DISABLED_Stereo48kHz_HighLevel_NoDrift_StreamDelay0) { |
| 331 #endif | 346 #endif |
| 332 const float kOutputReference[] = {-0.003500f, -0.001894f, -0.003176f, | 347 const float kOutputReference[] = {-0.001101f, -0.001101f, -0.000449f, |
| 333 -0.003500f, -0.001894f, -0.003176f}; | 348 -0.001101f, -0.001101f, -0.000449f}; |
| 334 RunBitexactnessTest(48000, 2, 0, false, 0, | 349 RunBitexactnessTest(48000, 2, 0, false, 0, |
| 335 EchoCancellation::SuppressionLevel::kHighSuppression, | 350 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 336 kStreamHasEchoReference, kOutputReference); | 351 kStreamHasEchoReference, kOutputReference); |
| 337 } | 352 } |
| 338 | 353 |
| 339 } // namespace webrtc | 354 } // namespace webrtc |
| OLD | NEW |