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

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

Issue 1456123003: Ducking fix #3: Removed the state as an input to the FilterAdaptation function (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@Aec_Code_Cleanup2_CL
Patch Set: Various refactoring, among other things simplification of the EchoSubtraction function Created 5 years, 1 month 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 b059e84fcc84a2c0b991f4f2576ddf6c35767a4e..684b1c56b33c76e15b284b95c6b529f7f1df1f2e 100644
--- a/webrtc/modules/audio_processing/aec/aec_core_mips.c
+++ b/webrtc/modules/audio_processing/aec/aec_core_mips.c
@@ -437,21 +437,25 @@ void WebRtcAec_FilterFar_mips(
}
}
-void WebRtcAec_FilterAdaptation_mips(AecCore* aec,
- float* fft,
- float ef[2][PART_LEN1]) {
+void WebRtcAec_FilterAdaptation_mips(
+ int num_partitions,
+ int xfBufBlockPos,
hlundin-webrtc 2015/11/20 11:55:20 Naming format.
peah-webrtc 2015/11/24 13:03:01 Done.
+ float xfBuf[2][kExtendedNumPartitions * PART_LEN1],
hlundin-webrtc 2015/11/20 11:55:20 Any const arrays?
peah-webrtc 2015/11/24 13:03:01 Done.
+ float ef[2][PART_LEN1],
+ float wfBuf[2][kExtendedNumPartitions * PART_LEN1]) {
+ float fft[PART_LEN2];
int i;
- for (i = 0; i < aec->num_partitions; i++) {
- int xPos = (i + aec->xfBufBlockPos)*(PART_LEN1);
+ for (i = 0; i < num_partitions; i++) {
+ int xPos = (i + xfBufBlockPos)*(PART_LEN1);
int pos;
// Check for wrap
- if (i + aec->xfBufBlockPos >= aec->num_partitions) {
- xPos -= aec->num_partitions * PART_LEN1;
+ if (i + xfBufBlockPos >= num_partitions) {
+ xPos -= num_partitions * PART_LEN1;
}
pos = i * PART_LEN1;
- float* aRe = aec->xfBuf[0] + xPos;
- float* aIm = aec->xfBuf[1] + xPos;
+ float* aRe = xfBuf[0] + xPos;
+ float* aIm = xfBuf[1] + xPos;
float* bRe = ef[0];
float* bIm = ef[1];
float* fft_tmp;
@@ -578,8 +582,8 @@ void WebRtcAec_FilterAdaptation_mips(AecCore* aec,
);
}
aec_rdft_forward_128(fft);
- aRe = aec->wfBuf[0] + pos;
- aIm = aec->wfBuf[1] + pos;
+ aRe = wfBuf[0] + pos;
+ aIm = wfBuf[1] + pos;
__asm __volatile (
".set push \n\t"
".set noreorder \n\t"
@@ -707,7 +711,7 @@ void WebRtcAec_OverdriveAndSuppress_mips(AecCore* aec,
void WebRtcAec_ScaleErrorSignal_mips(int extended_filter_enabled,
float normal_mu,
float normal_error_threshold,
- float *xPow,
+ float xPow[PART_LEN1],
float ef[2][PART_LEN1]) {
const float mu = extended_filter_enabled ? kExtendedMu : normal_mu;
const float error_threshold = extended_filter_enabled

Powered by Google App Engine
This is Rietveld 408576698