Chromium Code Reviews| 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 |