mirror of
https://github.com/mborgerding/kissfft.git
synced 2025-05-27 13:10:26 -04:00
changed from static function that wasn't inlining very well to a macro
'make test' output: ### testing SNR for 1024 point FFTs #### DOUBLE snr_t2f = 295.70 snr_f2t = 308.53 #### FLOAT snr_t2f = 146.91 snr_f2t = 143.58 #### SHORT snr_t2f = 54.677 snr_f2t = 24.668 #### timing 10000 x 1024 point FFTs #### DOUBLE Elapsed:0:11.38 user:9.15 sys:0.24 #### FLOAT Elapsed:0:04.18 user:3.39 sys:0.14 #### SHORT Elapsed:0:06.03 user:4.75 sys:0.15
This commit is contained in:
parent
11983e5056
commit
911d29d139
@ -37,10 +37,6 @@ typedef struct {
|
||||
kiss_fft_cpx * scratch;
|
||||
}kiss_fft_state;
|
||||
|
||||
#define C_ADD(x,a,b) \
|
||||
do{ (x).r = (a).r+(b).r;\
|
||||
(x).i = (a).i+(b).i;}while(0)
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
/* We don't have to worry about overflow from multiplying by twiddle factors since they
|
||||
* all have unity magnitude. Still need to shift away fractional bits after adding 1/2 for
|
||||
@ -121,7 +117,7 @@ void fft_work(
|
||||
twidx += fstride * k;
|
||||
if (twidx>=Norig)
|
||||
twidx-=Norig;
|
||||
t = cmul(scratch[q] , twiddles[twidx] );
|
||||
C_MUL(t,scratch[q] , twiddles[twidx] );
|
||||
Fout[ k ].r += t.r;
|
||||
Fout[ k ].i += t.i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user