Home | History | Annotate | Download | only in source

Lines Matching defs:fft

258 static void FilterAdaptation(aec_t *aec, float *fft, float ef[2][PART_LEN1]) {
282 fft[2 * j] = MulRe(aec->xfBuf[0][xPos + j],
285 fft[2 * j + 1] = MulIm(aec->xfBuf[0][xPos + j],
289 fft[1] = MulRe(aec->xfBuf[0][xPos + PART_LEN],
293 aec_rdft_inverse_128(fft);
294 memset(fft + PART_LEN, 0, sizeof(float) * PART_LEN);
296 // fft scaling
300 fft[j] *= scale;
303 aec_rdft_forward_128(fft);
305 aec->wfBuf[0][pos] += fft[0];
306 aec->wfBuf[0][pos + PART_LEN] += fft[1];
309 aec->wfBuf[0][pos + j] += fft[2 * j];
310 aec->wfBuf[1][pos + j] += fft[2 * j + 1];
332 // Ooura fft returns incorrect sign on imaginary component. It matters here
572 float fft[PART_LEN2];
591 // ---------- Ooura fft ----------
605 memcpy(fft, aec->xBuf, sizeof(float) * PART_LEN2);
612 aec_rdft_forward_128(fft);
614 // Far fft
617 xf[0][0] = fft[0];
618 xf[0][PART_LEN] = fft[1];
621 xf[0][i] = fft[2 * i];
622 xf[1][i] = fft[2 * i + 1];
625 // Near fft
626 memcpy(fft, aec->dBuf, sizeof(float) * PART_LEN2);
627 aec_rdft_forward_128(fft);
630 df[0][0] = fft[0];
631 df[PART_LEN][0] = fft[1];
634 df[i][0] = fft[2 * i];
635 df[i][1] = fft[2 * i + 1];
696 // Inverse fft to obtain echo estimate and error.
697 fft[0] = yf[0][0];
698 fft[1] = yf[0][PART_LEN];
700 fft[2 * i] = yf[0][i];
701 fft[2 * i + 1] = yf[1][i];
703 aec_rdft_inverse_128(fft);
707 y[i] = fft[PART_LEN + i] * scale; // fft scaling
714 // Error fft
716 memset(fft, 0, sizeof(float) * PART_LEN);
717 memcpy(fft + PART_LEN, e, sizeof(float) * PART_LEN);
718 aec_rdft_forward_128(fft);
722 ef[0][0] = fft[0];
723 ef[0][PART_LEN] = fft[1];
725 ef[0][i] = fft[2 * i];
726 ef[1][i] = fft[2 * i + 1];
735 WebRtcAec_FilterAdaptation(aec, fft, ef);
779 float fft[PART_LEN2];
836 // Windowed far fft
838 fft[i] = aec->xBuf[i] * sqrtHanning[i];
839 fft[PART_LEN + i] = aec->xBuf[PART_LEN + i] * sqrtHanning[PART_LEN - i];
841 aec_rdft_forward_128(fft);
845 xfw[0][0] = fft[0];
846 xfw[PART_LEN][0] = fft[1];
848 xfw[i][0] = fft[2 * i];
849 xfw[i][1] = fft[2 * i + 1];
858 // Windowed near fft
860 fft[i] = aec->dBuf[i] * sqrtHanning[i];
861 fft[PART_LEN + i] = aec->dBuf[PART_LEN + i] * sqrtHanning[PART_LEN - i];
863 aec_rdft_forward_128(fft);
867 dfw[0][0] = fft[0];
868 dfw[0][PART_LEN] = fft[1];
870 dfw[0][i] = fft[2 * i];
871 dfw[1][i] = fft[2 * i + 1];
874 // Windowed error fft
876 fft[i] = aec->eBuf[i] * sqrtHanning[i];
877 fft[PART_LEN + i] = aec->eBuf[PART_LEN + i] * sqrtHanning[PART_LEN - i];
879 aec_rdft_forward_128(fft);
882 efw[0][0] = fft[0];
883 efw[0][PART_LEN] = fft[1];
885 efw[0][i] = fft[2 * i];
886 efw[1][i] = fft[2 * i + 1];
1048 // Inverse error fft.
1049 fft[0] = efw[0][0];
1050 fft[1] = efw[0][PART_LEN];
1052 fft[2*i] = efw[0][i];
1053 // Sign change required by Ooura fft.
1054 fft[2*i + 1] = -efw[1][i];
1056 aec_rdft_inverse_128(fft);
1061 fft[i] *= scale; // fft
1062 fft[i] = fft[i]*sqrtHanning[i] + aec->outBuf[i];
1065 output[i] = (short)WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, fft[i],
1068 fft[PART_LEN + i] *= scale; // fft scaling
1069 aec->outBuf[i] = fft[PART_LEN + i] * sqrtHanning[PART_LEN - i];
1082 fft[0] = comfortNoiseHband[0][0];
1083 fft[1] = comfortNoiseHband[PART_LEN][0];
1085 fft[2*i] = comfortNoiseHband[i][0];
1086 fft[2*i + 1] = comfortNoiseHband[i][1];
1088 aec_rdft_inverse_128(fft);
1099 fft[i] *= scale; // fft scaling
1100 dtmp += cnScaleHband * fft[i];