OLD | NEW |
1 /*Copyright (c) 2003-2004, Mark Borgerding | 1 /*Copyright (c) 2003-2004, Mark Borgerding |
2 Lots of modifications by Jean-Marc Valin | 2 Lots of modifications by Jean-Marc Valin |
3 Copyright (c) 2005-2007, Xiph.Org Foundation | 3 Copyright (c) 2005-2007, Xiph.Org Foundation |
4 Copyright (c) 2008, Xiph.Org Foundation, CSIRO | 4 Copyright (c) 2008, Xiph.Org Foundation, CSIRO |
5 | 5 |
6 All rights reserved. | 6 All rights reserved. |
7 | 7 |
8 Redistribution and use in source and binary forms, with or without | 8 Redistribution and use in source and binary forms, with or without |
9 modification, are permitted provided that the following conditions are met: | 9 modification, are permitted provided that the following conditions are met: |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 # ifdef HAVE_CONFIG_H | 33 # ifdef HAVE_CONFIG_H |
34 # include "config.h" | 34 # include "config.h" |
35 # endif | 35 # endif |
36 #endif | 36 #endif |
37 | 37 |
38 #include "_kiss_fft_guts.h" | 38 #include "_kiss_fft_guts.h" |
39 #include "arch.h" | 39 #include "arch.h" |
40 #include "os_support.h" | 40 #include "os_support.h" |
41 #include "mathops.h" | 41 #include "mathops.h" |
42 #include "stack_alloc.h" | 42 #include "stack_alloc.h" |
43 #include "os_support.h" | |
44 | 43 |
45 /* The guts header contains all the multiplication and addition macros that are
defined for | 44 /* The guts header contains all the multiplication and addition macros that are
defined for |
46 complex numbers. It also delares the kf_ internal functions. | 45 complex numbers. It also delares the kf_ internal functions. |
47 */ | 46 */ |
48 | 47 |
49 static void kf_bfly2( | 48 static void kf_bfly2( |
50 kiss_fft_cpx * Fout, | 49 kiss_fft_cpx * Fout, |
51 const size_t fstride, | 50 const size_t fstride, |
52 const kiss_fft_state *st, | 51 const kiss_fft_state *st, |
53 int m, | 52 int m, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 C_MUL4(scratch[0],Fout[m] , *tw1 ); | 134 C_MUL4(scratch[0],Fout[m] , *tw1 ); |
136 C_MUL4(scratch[1],Fout[m2] , *tw2 ); | 135 C_MUL4(scratch[1],Fout[m2] , *tw2 ); |
137 C_MUL4(scratch[2],Fout[m3] , *tw3 ); | 136 C_MUL4(scratch[2],Fout[m3] , *tw3 ); |
138 | 137 |
139 Fout->r = PSHR32(Fout->r, 2); | 138 Fout->r = PSHR32(Fout->r, 2); |
140 Fout->i = PSHR32(Fout->i, 2); | 139 Fout->i = PSHR32(Fout->i, 2); |
141 C_SUB( scratch[5] , *Fout, scratch[1] ); | 140 C_SUB( scratch[5] , *Fout, scratch[1] ); |
142 C_ADDTO(*Fout, scratch[1]); | 141 C_ADDTO(*Fout, scratch[1]); |
143 C_ADD( scratch[3] , scratch[0] , scratch[2] ); | 142 C_ADD( scratch[3] , scratch[0] , scratch[2] ); |
144 C_SUB( scratch[4] , scratch[0] , scratch[2] ); | 143 C_SUB( scratch[4] , scratch[0] , scratch[2] ); |
145 Fout[m2].r = PSHR32(Fout[m2].r, 2); | |
146 Fout[m2].i = PSHR32(Fout[m2].i, 2); | |
147 C_SUB( Fout[m2], *Fout, scratch[3] ); | 144 C_SUB( Fout[m2], *Fout, scratch[3] ); |
148 tw1 += fstride; | 145 tw1 += fstride; |
149 tw2 += fstride*2; | 146 tw2 += fstride*2; |
150 tw3 += fstride*3; | 147 tw3 += fstride*3; |
151 C_ADDTO( *Fout , scratch[3] ); | 148 C_ADDTO( *Fout , scratch[3] ); |
152 | 149 |
153 Fout[m].r = scratch[5].r + scratch[4].i; | 150 Fout[m].r = scratch[5].r + scratch[4].i; |
154 Fout[m].i = scratch[5].i - scratch[4].r; | 151 Fout[m].i = scratch[5].i - scratch[4].r; |
155 Fout[m3].r = scratch[5].r - scratch[4].i; | 152 Fout[m3].r = scratch[5].r - scratch[4].i; |
156 Fout[m3].i = scratch[5].i + scratch[4].r; | 153 Fout[m3].i = scratch[5].i + scratch[4].r; |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 break; | 710 break; |
714 case 5: | 711 case 5: |
715 ki_bfly5(fout,fstride[i]<<shift,st,m, fstride[i], m2); | 712 ki_bfly5(fout,fstride[i]<<shift,st,m, fstride[i], m2); |
716 break; | 713 break; |
717 #endif | 714 #endif |
718 } | 715 } |
719 m = m2; | 716 m = m2; |
720 } | 717 } |
721 } | 718 } |
722 | 719 |
OLD | NEW |