OLD | NEW |
1 /*Copyright (c) 2003-2004, Mark Borgerding | 1 /*Copyright (c) 2003-2004, Mark Borgerding |
2 | 2 |
3 All rights reserved. | 3 All rights reserved. |
4 | 4 |
5 Redistribution and use in source and binary forms, with or without | 5 Redistribution and use in source and binary forms, with or without |
6 modification, are permitted provided that the following conditions are met: | 6 modification, are permitted provided that the following conditions are met: |
7 | 7 |
8 * Redistributions of source code must retain the above copyright notice, | 8 * Redistributions of source code must retain the above copyright notice, |
9 this list of conditions and the following disclaimer. | 9 this list of conditions and the following disclaimer. |
10 * Redistributions in binary form must reproduce the above copyright notice, | 10 * Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 do {(res).r=SUB32((a).r,(b).r); (res).i=SUB32((a).i,(b).i); \ | 87 do {(res).r=SUB32((a).r,(b).r); (res).i=SUB32((a).i,(b).i); \ |
88 }while(0) | 88 }while(0) |
89 #define C_ADDTO( res , a)\ | 89 #define C_ADDTO( res , a)\ |
90 do {(res).r = ADD32((res).r, (a).r); (res).i = ADD32((res).i,(a).i);\ | 90 do {(res).r = ADD32((res).r, (a).r); (res).i = ADD32((res).i,(a).i);\ |
91 }while(0) | 91 }while(0) |
92 | 92 |
93 #define C_SUBFROM( res , a)\ | 93 #define C_SUBFROM( res , a)\ |
94 do {(res).r = ADD32((res).r,(a).r); (res).i = SUB32((res).i,(a).i); \ | 94 do {(res).r = ADD32((res).r,(a).r); (res).i = SUB32((res).i,(a).i); \ |
95 }while(0) | 95 }while(0) |
96 | 96 |
| 97 #if defined(ARMv4_ASM) |
| 98 #include "arm/kiss_fft_armv4.h" |
| 99 #endif |
| 100 |
| 101 #if defined(ARMv5E_ASM) |
| 102 #include "arm/kiss_fft_armv5e.h" |
| 103 #endif |
| 104 |
97 #else /* not FIXED_POINT*/ | 105 #else /* not FIXED_POINT*/ |
98 | 106 |
99 # define S_MUL(a,b) ( (a)*(b) ) | 107 # define S_MUL(a,b) ( (a)*(b) ) |
100 #define C_MUL(m,a,b) \ | 108 #define C_MUL(m,a,b) \ |
101 do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ | 109 do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ |
102 (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) | 110 (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) |
103 #define C_MULC(m,a,b) \ | 111 #define C_MULC(m,a,b) \ |
104 do{ (m).r = (a).r*(b).r + (a).i*(b).i;\ | 112 do{ (m).r = (a).r*(b).r + (a).i*(b).i;\ |
105 (m).i = (a).i*(b).r - (a).r*(b).i; }while(0) | 113 (m).i = (a).i*(b).r - (a).r*(b).i; }while(0) |
106 | 114 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 (x)->i = KISS_FFT_SIN(phase);\ | 174 (x)->i = KISS_FFT_SIN(phase);\ |
167 }while(0) | 175 }while(0) |
168 | 176 |
169 #define kf_cexp2(x,phase) \ | 177 #define kf_cexp2(x,phase) \ |
170 do{ \ | 178 do{ \ |
171 (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\ | 179 (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\ |
172 (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\ | 180 (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\ |
173 }while(0) | 181 }while(0) |
174 | 182 |
175 #endif /* KISS_FFT_GUTS_H */ | 183 #endif /* KISS_FFT_GUTS_H */ |
OLD | NEW |