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) | 97 #if defined(OPUS_ARM_INLINE_ASM) |
98 #include "arm/kiss_fft_armv4.h" | 98 #include "arm/kiss_fft_armv4.h" |
99 #endif | 99 #endif |
100 | 100 |
101 #if defined(ARMv5E_ASM) | 101 #if defined(OPUS_ARM_INLINE_EDSP) |
102 #include "arm/kiss_fft_armv5e.h" | 102 #include "arm/kiss_fft_armv5e.h" |
103 #endif | 103 #endif |
104 | 104 |
105 #else /* not FIXED_POINT*/ | 105 #else /* not FIXED_POINT*/ |
106 | 106 |
107 # define S_MUL(a,b) ( (a)*(b) ) | 107 # define S_MUL(a,b) ( (a)*(b) ) |
108 #define C_MUL(m,a,b) \ | 108 #define C_MUL(m,a,b) \ |
109 do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ | 109 do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ |
110 (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) |
111 #define C_MULC(m,a,b) \ | 111 #define C_MULC(m,a,b) \ |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 (x)->i = KISS_FFT_SIN(phase);\ | 174 (x)->i = KISS_FFT_SIN(phase);\ |
175 }while(0) | 175 }while(0) |
176 | 176 |
177 #define kf_cexp2(x,phase) \ | 177 #define kf_cexp2(x,phase) \ |
178 do{ \ | 178 do{ \ |
179 (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\ | 179 (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\ |
180 (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\ | 180 (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\ |
181 }while(0) | 181 }while(0) |
182 | 182 |
183 #endif /* KISS_FFT_GUTS_H */ | 183 #endif /* KISS_FFT_GUTS_H */ |
OLD | NEW |