Add IntelligibilityEnhancer support to audioproc_float
R=peah@webrtc.org Review URL: https://codereview.webrtc.org/1800413002 . Cr-Commit-Position: refs/heads/master@{#12147}
This commit is contained in:
@ -177,17 +177,15 @@ std::vector<float> NoiseSuppressionImpl::NoiseEstimate() {
|
||||
rtc::CritScope cs(crit_);
|
||||
std::vector<float> noise_estimate;
|
||||
#if defined(WEBRTC_NS_FLOAT)
|
||||
const float kNormalizationFactor = 1.f / (1 << 15);
|
||||
noise_estimate.assign(WebRtcNs_num_freq(), 0.f);
|
||||
for (auto& suppressor : suppressors_) {
|
||||
const float* noise = WebRtcNs_noise_estimate(suppressor->state());
|
||||
for (size_t i = 0; i < noise_estimate.size(); ++i) {
|
||||
noise_estimate[i] +=
|
||||
kNormalizationFactor * noise[i] / suppressors_.size();
|
||||
noise_estimate[i] += noise[i] / suppressors_.size();
|
||||
}
|
||||
}
|
||||
#elif defined(WEBRTC_NS_FIXED)
|
||||
const float kNormalizationFactor = 1.f / (1 << 23);
|
||||
const float kNormalizationFactor = 1.f / (1 << 9);
|
||||
noise_estimate.assign(WebRtcNsx_num_freq(), 0.f);
|
||||
for (auto& suppressor : suppressors_) {
|
||||
const uint32_t* noise = WebRtcNsx_noise_estimate(suppressor->state());
|
||||
|
||||
Reference in New Issue
Block a user