| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 u[PART_LEN][1] = 0; | 313 u[PART_LEN][1] = 0; |
| 314 | 314 |
| 315 for (i = 0; i < PART_LEN1; i++) { | 315 for (i = 0; i < PART_LEN1; i++) { |
| 316 // Use average NLP weight for H band | 316 // Use average NLP weight for H band |
| 317 comfortNoiseHband[i][0] = tmpAvg * u[i][0]; | 317 comfortNoiseHband[i][0] = tmpAvg * u[i][0]; |
| 318 comfortNoiseHband[i][1] = tmpAvg * u[i][1]; | 318 comfortNoiseHband[i][1] = tmpAvg * u[i][1]; |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 } | 321 } |
| 322 | 322 |
| 323 void WebRtcAec_FilterFar_mips(AecCore* aec, float yf[2][PART_LEN1]) { | 323 void WebRtcAec_FilterFar_mips( |
| 324 int num_partitions, |
| 325 int xfBufBlockPos, |
| 326 float xfBuf[2][kExtendedNumPartitions * PART_LEN1], |
| 327 float wfBuf[2][kExtendedNumPartitions * PART_LEN1], |
| 328 float yf[2][PART_LEN1]) { |
| 324 int i; | 329 int i; |
| 325 for (i = 0; i < aec->num_partitions; i++) { | 330 for (i = 0; i < num_partitions; i++) { |
| 326 int xPos = (i + aec->xfBufBlockPos) * PART_LEN1; | 331 int xPos = (i + xfBufBlockPos) * PART_LEN1; |
| 327 int pos = i * PART_LEN1; | 332 int pos = i * PART_LEN1; |
| 328 // Check for wrap | 333 // Check for wrap |
| 329 if (i + aec->xfBufBlockPos >= aec->num_partitions) { | 334 if (i + xfBufBlockPos >= num_partitions) { |
| 330 xPos -= aec->num_partitions * (PART_LEN1); | 335 xPos -= num_partitions * (PART_LEN1); |
| 331 } | 336 } |
| 332 float* yf0 = yf[0]; | 337 float* yf0 = yf[0]; |
| 333 float* yf1 = yf[1]; | 338 float* yf1 = yf[1]; |
| 334 float* aRe = aec->xfBuf[0] + xPos; | 339 float* aRe = xfBuf[0] + xPos; |
| 335 float* aIm = aec->xfBuf[1] + xPos; | 340 float* aIm = xfBuf[1] + xPos; |
| 336 float* bRe = aec->wfBuf[0] + pos; | 341 float* bRe = wfBuf[0] + pos; |
| 337 float* bIm = aec->wfBuf[1] + pos; | 342 float* bIm = wfBuf[1] + pos; |
| 338 float f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13; | 343 float f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13; |
| 339 int len = PART_LEN1 >> 1; | 344 int len = PART_LEN1 >> 1; |
| 340 | 345 |
| 341 __asm __volatile ( | 346 __asm __volatile ( |
| 342 ".set push \n\t" | 347 ".set push \n\t" |
| 343 ".set noreorder \n\t" | 348 ".set noreorder \n\t" |
| 344 "1: \n\t" | 349 "1: \n\t" |
| 345 "lwc1 %[f0], 0(%[aRe]) \n\t" | 350 "lwc1 %[f0], 0(%[aRe]) \n\t" |
| 346 "lwc1 %[f1], 0(%[bRe]) \n\t" | 351 "lwc1 %[f1], 0(%[bRe]) \n\t" |
| 347 "lwc1 %[f2], 0(%[bIm]) \n\t" | 352 "lwc1 %[f2], 0(%[bIm]) \n\t" |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 ); | 772 ); |
| 768 } | 773 } |
| 769 | 774 |
| 770 void WebRtcAec_InitAec_mips(void) { | 775 void WebRtcAec_InitAec_mips(void) { |
| 771 WebRtcAec_FilterFar = WebRtcAec_FilterFar_mips; | 776 WebRtcAec_FilterFar = WebRtcAec_FilterFar_mips; |
| 772 WebRtcAec_FilterAdaptation = WebRtcAec_FilterAdaptation_mips; | 777 WebRtcAec_FilterAdaptation = WebRtcAec_FilterAdaptation_mips; |
| 773 WebRtcAec_ScaleErrorSignal = WebRtcAec_ScaleErrorSignal_mips; | 778 WebRtcAec_ScaleErrorSignal = WebRtcAec_ScaleErrorSignal_mips; |
| 774 WebRtcAec_ComfortNoise = WebRtcAec_ComfortNoise_mips; | 779 WebRtcAec_ComfortNoise = WebRtcAec_ComfortNoise_mips; |
| 775 WebRtcAec_OverdriveAndSuppress = WebRtcAec_OverdriveAndSuppress_mips; | 780 WebRtcAec_OverdriveAndSuppress = WebRtcAec_OverdriveAndSuppress_mips; |
| 776 } | 781 } |
| OLD | NEW |