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

Unified Diff: webrtc/modules/audio_processing/aec/aec_core_mips.c

Issue 1494133002: Retyped the frequency estimate of the comfort noise for the higher band to harmonize the AEC code(#4 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@ESUP_refactoring3_CL
Patch Set: Created 5 years 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/aec/aec_core_mips.c
diff --git a/webrtc/modules/audio_processing/aec/aec_core_mips.c b/webrtc/modules/audio_processing/aec/aec_core_mips.c
index dfd4dc606a009853450809d3a60333ed59ae58c3..7d64c2a836d10774f6075e5d92487ec0d994bfc1 100644
--- a/webrtc/modules/audio_processing/aec/aec_core_mips.c
+++ b/webrtc/modules/audio_processing/aec/aec_core_mips.c
@@ -26,7 +26,7 @@ extern const float WebRtcAec_overDriveCurve[65];
void WebRtcAec_ComfortNoise_mips(AecCore* aec,
float efw[2][PART_LEN1],
- complex_t* comfortNoiseHband,
+ float comfortNoiseHband[2][PART_LEN1],
const float* noisePow,
const float* lambda) {
int i, num;
@@ -274,7 +274,7 @@ void WebRtcAec_ComfortNoise_mips(AecCore* aec,
noiseAvg = 0.0;
tmpAvg = 0.0;
num = 0;
- if ((aec->sampFreq == 32000 || aec->sampFreq == 48000) && flagHbandCn == 1) {
+ if (aec->num_bands > 1 && flagHbandCn == 1) {
minyue-webrtc 2015/12/04 09:49:44 Interesting, MIPS was different here, was there a
peah-webrtc 2015/12/04 23:02:48 I think it is just an error. As far as I know, num
for (i = 0; i < PART_LEN; i++) {
rand[i] = ((float)randW16[i]) / 32768;
}
@@ -314,10 +314,14 @@ void WebRtcAec_ComfortNoise_mips(AecCore* aec,
for (i = 0; i < PART_LEN1; i++) {
// Use average NLP weight for H band
- comfortNoiseHband[i][0] = tmpAvg * u[i][0];
- comfortNoiseHband[i][1] = tmpAvg * u[i][1];
+ comfortNoiseHband[0][i] = tmpAvg * u[i][0];
+ comfortNoiseHband[1][i] = tmpAvg * u[i][1];
}
}
+ else {
minyue-webrtc 2015/12/04 09:49:44 321 to 320
peah-webrtc 2015/12/04 23:02:48 Done.
+ memset(comfortNoiseHband, 0,
+ 2 * PART_LEN1 * sizeof(comfortNoiseHband[0][0]));
hlundin-webrtc 2015/12/04 11:01:39 ... and sizeof(comfortNoiseHband)
peah-webrtc 2015/12/04 23:02:48 As stated in the other place for this, that does n
hlundin-webrtc 2015/12/08 11:52:52 Acknowledged.
+ }
}
void WebRtcAec_FilterFar_mips(

Powered by Google App Engine
This is Rietveld 408576698