Chromium Code Reviews| Index: webrtc/modules/audio_processing/aec/aec_core_neon.c |
| diff --git a/webrtc/modules/audio_processing/aec/aec_core_neon.c b/webrtc/modules/audio_processing/aec/aec_core_neon.c |
| index 698fe04cc999965722e98a7fbf3789a9b93f2c2c..2af0fa899c5759512caf3700dee1092cd8c67f7a 100644 |
| --- a/webrtc/modules/audio_processing/aec/aec_core_neon.c |
| +++ b/webrtc/modules/audio_processing/aec/aec_core_neon.c |
| @@ -510,7 +510,8 @@ static int PartitionDelayNEON(const AecCore* aec) { |
| static void SmoothedPSD(AecCore* aec, |
| float efw[2][PART_LEN1], |
| float dfw[2][PART_LEN1], |
| - float xfw[2][PART_LEN1]) { |
| + float xfw[2][PART_LEN1], |
| + int *extreme_filter_divergence) { |
|
hlundin-webrtc
2015/12/08 11:51:11
int* extreme...
|
| // Power estimate smoothing coefficients. |
| const float* ptrGCoh = aec->extended_filter_enabled |
| ? WebRtcAec_kExtendedSmoothingCoefficients[aec->mult - 1] |
| @@ -626,15 +627,12 @@ static void SmoothedPSD(AecCore* aec, |
| seSum += aec->se[i]; |
| } |
| - // Divergent filter safeguard. |
| + // Divergent filter safeguard update. |
| aec->divergeState = (aec->divergeState ? 1.05f : 1.0f) * seSum > sdSum; |
| - if (aec->divergeState) |
| - memcpy(efw, dfw, sizeof(efw[0][0]) * 2 * PART_LEN1); |
| - |
| - // Reset if error is significantly larger than nearend (13 dB). |
| - if (!aec->extended_filter_enabled && seSum > (19.95f * sdSum)) |
| - memset(aec->wfBuf, 0, sizeof(aec->wfBuf)); |
| + // Signal extreme filter divergence if the error is significantly larger |
| + // than the nearend (13 dB). |
| + *extreme_filter_divergence = (seSum > (19.95f * sdSum)); |
| } |
| // Window time domain data to be used by the fft. |
| @@ -680,10 +678,11 @@ static void SubbandCoherenceNEON(AecCore* aec, |
| float xfw[2][PART_LEN1], |
| float* fft, |
| float* cohde, |
| - float* cohxd) { |
| + float* cohxd, |
| + int *extreme_filter_divergence) { |
|
hlundin-webrtc
2015/12/08 11:51:11
int* extreme...
|
| int i; |
| - SmoothedPSD(aec, efw, dfw, xfw); |
| + SmoothedPSD(aec, efw, dfw, xfw, extreme_filter_divergence); |
| { |
| const float32x4_t vec_1eminus10 = vdupq_n_f32(1e-10f); |