diff --git a/fft-org.c b/fft-org.c index 544dcb9..e33de5b 100644 --- a/fft-org.c +++ b/fft-org.c @@ -117,8 +117,8 @@ int fix_fft_org(fixed fr[], fixed fi[], int m, int inverse) { j = m << k; /* 0 <= j < N_WAVE/2 */ - wr = Sinewave[j+N_WAVE/4]; - wi = -Sinewave[j]; + wr = Sinewave_org[j+N_WAVE/4]; + wi = -Sinewave_org[j]; if(inverse) wi = -wi; if(shift) @@ -130,8 +130,8 @@ int fix_fft_org(fixed fr[], fixed fi[], int m, int inverse) { j = i + l; - tr = fix_mpy(wr,fr[j]) - fix_mpy(wi,fi[j]); - ti = fix_mpy(wr,fi[j]) + fix_mpy(wi,fr[j]); + tr = fix_mpy_org(wr,fr[j]) - fix_mpy_org(wi,fi[j]); + ti = fix_mpy_org(wr,fi[j]) + fix_mpy_org(wi,fr[j]); qr = fr[i]; qi = fi[i]; diff --git a/fft-org.h b/fft-org.h index b93e0da..f91e75b 100644 --- a/fft-org.h +++ b/fft-org.h @@ -21,4 +21,4 @@ extern fixed Sinewave_org[N_WAVE]; fixed fix_mpy_org(fixed a, fixed b); int fix_fft_org(fixed *fr, fixed *fi, int m, int inverse); -#endif //FFT_H +#endif //FFT_H