RNN VAD: LP residual optimized (part 3)
Use hard-coded constants previously computed at runtime within a loop in `DenoiseAutoCorrelation`. Note that the `RnnVadTest.LpResidualPipelineBitExactness` unit test is still passing. Bug: webrtc:10480 Change-Id: I02c2fff7dc7153ea2ab8a27cad8a479a0f029996 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189963 Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32489}
This commit is contained in:

committed by
Commit Bot

parent
ae2e8647aa
commit
1925402ed8
@ -40,9 +40,13 @@ void DenoiseAutoCorrelation(
|
||||
rtc::ArrayView<float, kNumLpcCoefficients> auto_corr) {
|
||||
// Assume -40 dB white noise floor.
|
||||
auto_corr[0] *= 1.0001f;
|
||||
for (size_t i = 1; i < kNumLpcCoefficients; ++i) {
|
||||
auto_corr[i] -= auto_corr[i] * (0.008f * i) * (0.008f * i);
|
||||
}
|
||||
// Hard-coded values obtained as
|
||||
// [np.float32((0.008*0.008*i*i)) for i in range(1,5)].
|
||||
auto_corr[1] -= auto_corr[1] * 0.000064f;
|
||||
auto_corr[2] -= auto_corr[2] * 0.000256f;
|
||||
auto_corr[3] -= auto_corr[3] * 0.000576f;
|
||||
auto_corr[4] -= auto_corr[4] * 0.001024f;
|
||||
static_assert(kNumLpcCoefficients == 5, "Update `auto_corr`.");
|
||||
}
|
||||
|
||||
// Computes the initial inverse filter coefficients given the auto-correlation
|
||||
|
Reference in New Issue
Block a user