| 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..8c6b32cbff4a159ff8c6c7e5ad4921f440f599fe 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 *const extreme_filter_divergence) {
|
| // 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 *const extreme_filter_divergence) {
|
| 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);
|
|
|