NaNs in Echo Canceller.
A coherence vector cohxd is computed in WebRtcAec_ComputeCoherence. The coherence values should theoretically be 0 <= x <= 1. Due to the way they are computed that is not always the case. The coherence values are used to update an error signal estimate hNl in webrtc::EchoSuppression. 'hNl[i]' should contain an error magnitude for frequency 'i'. The error magnitudes are used as a basis for exponentiation. If a magnitude is negative, the result is NaN. The NaNs will then spread to the output signal. This change caps the hNl values at 0. I considered capping the coherence values at 1. The coherence values are calculated differently for MIPS, NEON and SSE. Therefore it's simpler to cap the hNl values instead. The issue was found by the AudioProcessing fuzzer. Bug: chromium:804634 Change-Id: I8ebaa441d77c3f79d9c194a850cb2b9eed1c2024 Reviewed-on: https://webrtc-review.googlesource.com/43740 Commit-Queue: Alex Loiko <aleloi@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21761}
This commit is contained in:
parent
600bdb4adc
commit
e994058eb1
@ -1095,6 +1095,7 @@ static void FormSuppressionGain(AecCore* aec,
|
||||
} else {
|
||||
for (int i = 0; i < PART_LEN1; ++i) {
|
||||
hNl[i] = 1 - cohxd[i];
|
||||
hNl[i] = std::max(hNl[i], 0.f);
|
||||
}
|
||||
hNlFb = hNlXdAvg;
|
||||
hNlFbLow = hNlXdAvg;
|
||||
@ -1109,6 +1110,7 @@ static void FormSuppressionGain(AecCore* aec,
|
||||
aec->echoState = 1;
|
||||
for (int i = 0; i < PART_LEN1; ++i) {
|
||||
hNl[i] = WEBRTC_SPL_MIN(cohde[i], 1 - cohxd[i]);
|
||||
hNl[i] = std::max(hNl[i], 0.f);
|
||||
}
|
||||
|
||||
// Select an order statistic from the preferred bands.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user