Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: webrtc/modules/audio_processing/ns/ns_core.c

Issue 1168753002: Match existing type usage better. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/ns/ns_core.c
diff --git a/webrtc/modules/audio_processing/ns/ns_core.c b/webrtc/modules/audio_processing/ns/ns_core.c
index 9e230dd140df025211472d7b38eefbb11ce6a02e..1bd7af4adf78e33622247d60e3a6e7f2edb729e9 100644
--- a/webrtc/modules/audio_processing/ns/ns_core.c
+++ b/webrtc/modules/audio_processing/ns/ns_core.c
@@ -898,10 +898,10 @@ static void FFT(NoiseSuppressionC* self,
imag[0] = 0;
real[0] = time_data[0];
- magn[0] = fabs(real[0]) + 1.f;
+ magn[0] = fabsf(real[0]) + 1.f;
imag[magnitude_length - 1] = 0;
real[magnitude_length - 1] = time_data[1];
- magn[magnitude_length - 1] = fabs(real[magnitude_length - 1]) + 1.f;
+ magn[magnitude_length - 1] = fabsf(real[magnitude_length - 1]) + 1.f;
for (i = 1; i < magnitude_length - 1; ++i) {
real[i] = time_data[2 * i];
imag[i] = time_data[2 * i + 1];
@@ -1090,10 +1090,10 @@ void WebRtcNs_AnalyzeCore(NoiseSuppressionC* self, const float* speechFrame) {
sumMagn += magn[i];
if (self->blockInd < END_STARTUP_SHORT) {
if (i >= kStartBand) {
- tmpFloat2 = log((float)i);
+ tmpFloat2 = logf((float)i);
sum_log_i += tmpFloat2;
sum_log_i_square += tmpFloat2 * tmpFloat2;
- tmpFloat1 = log(magn[i]);
+ tmpFloat1 = logf(magn[i]);
sum_log_magn += tmpFloat1;
sum_log_i_log_magn += tmpFloat2 * tmpFloat1;
}
@@ -1136,7 +1136,7 @@ void WebRtcNs_AnalyzeCore(NoiseSuppressionC* self, const float* speechFrame) {
if (self->pinkNoiseExp > 0.f) {
// Use pink noise estimate.
parametric_num =
- exp(self->pinkNoiseNumerator / (float)(self->blockInd + 1));
+ expf(self->pinkNoiseNumerator / (float)(self->blockInd + 1));
parametric_num *= (float)(self->blockInd + 1);
parametric_exp = self->pinkNoiseExp / (float)(self->blockInd + 1);
}
@@ -1150,7 +1150,7 @@ void WebRtcNs_AnalyzeCore(NoiseSuppressionC* self, const float* speechFrame) {
// Use pink noise estimate.
float use_band = (float)(i < kStartBand ? kStartBand : i);
self->parametricNoise[i] =
- parametric_num / pow(use_band, parametric_exp);
+ parametric_num / powf(use_band, parametric_exp);
}
// Weight quantile noise with modeled noise.
noise[i] *= (self->blockInd);
« no previous file with comments | « webrtc/modules/audio_device/dummy/file_audio_device.cc ('k') | webrtc/modules/audio_processing/ns/nsx_core_mips.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698