Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1116)

Side by Side Diff: celt/_kiss_fft_guts.h

Issue 882843002: Update to opus-HEAD-66611f1. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/opus.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 # define S_MUL(a,b) MULT16_32_Q15(b, a) 58 # define S_MUL(a,b) MULT16_32_Q15(b, a)
59 59
60 # define C_MUL(m,a,b) \ 60 # define C_MUL(m,a,b) \
61 do{ (m).r = SUB32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \ 61 do{ (m).r = SUB32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \
62 (m).i = ADD32(S_MUL((a).r,(b).i) , S_MUL((a).i,(b).r)); }while(0) 62 (m).i = ADD32(S_MUL((a).r,(b).i) , S_MUL((a).i,(b).r)); }while(0)
63 63
64 # define C_MULC(m,a,b) \ 64 # define C_MULC(m,a,b) \
65 do{ (m).r = ADD32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \ 65 do{ (m).r = ADD32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \
66 (m).i = SUB32(S_MUL((a).i,(b).r) , S_MUL((a).r,(b).i)); }while(0) 66 (m).i = SUB32(S_MUL((a).i,(b).r) , S_MUL((a).r,(b).i)); }while(0)
67 67
68 # define C_MUL4(m,a,b) \
69 do{ (m).r = SHR32(SUB32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)),2); \
70 (m).i = SHR32(ADD32(S_MUL((a).r,(b).i) , S_MUL((a).i,(b).r)),2); }whil e(0)
71
72 # define C_MULBYSCALAR( c, s ) \ 68 # define C_MULBYSCALAR( c, s ) \
73 do{ (c).r = S_MUL( (c).r , s ) ;\ 69 do{ (c).r = S_MUL( (c).r , s ) ;\
74 (c).i = S_MUL( (c).i , s ) ; }while(0) 70 (c).i = S_MUL( (c).i , s ) ; }while(0)
75 71
76 # define DIVSCALAR(x,k) \ 72 # define DIVSCALAR(x,k) \
77 (x) = S_MUL( x, (TWID_MAX-((k)>>1))/(k)+1 ) 73 (x) = S_MUL( x, (TWID_MAX-((k)>>1))/(k)+1 )
78 74
79 # define C_FIXDIV(c,div) \ 75 # define C_FIXDIV(c,div) \
80 do { DIVSCALAR( (c).r , div); \ 76 do { DIVSCALAR( (c).r , div); \
81 DIVSCALAR( (c).i , div); }while (0) 77 DIVSCALAR( (c).i , div); }while (0)
(...skipping 12 matching lines...) Expand all
94 do {(res).r = ADD32((res).r,(a).r); (res).i = SUB32((res).i,(a).i); \ 90 do {(res).r = ADD32((res).r,(a).r); (res).i = SUB32((res).i,(a).i); \
95 }while(0) 91 }while(0)
96 92
97 #if defined(OPUS_ARM_INLINE_ASM) 93 #if defined(OPUS_ARM_INLINE_ASM)
98 #include "arm/kiss_fft_armv4.h" 94 #include "arm/kiss_fft_armv4.h"
99 #endif 95 #endif
100 96
101 #if defined(OPUS_ARM_INLINE_EDSP) 97 #if defined(OPUS_ARM_INLINE_EDSP)
102 #include "arm/kiss_fft_armv5e.h" 98 #include "arm/kiss_fft_armv5e.h"
103 #endif 99 #endif
100 #if defined(MIPSr1_ASM)
101 #include "mips/kiss_fft_mipsr1.h"
102 #endif
104 103
105 #else /* not FIXED_POINT*/ 104 #else /* not FIXED_POINT*/
106 105
107 # define S_MUL(a,b) ( (a)*(b) ) 106 # define S_MUL(a,b) ( (a)*(b) )
108 #define C_MUL(m,a,b) \ 107 #define C_MUL(m,a,b) \
109 do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ 108 do{ (m).r = (a).r*(b).r - (a).i*(b).i;\
110 (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) 109 (m).i = (a).r*(b).i + (a).i*(b).r; }while(0)
111 #define C_MULC(m,a,b) \ 110 #define C_MULC(m,a,b) \
112 do{ (m).r = (a).r*(b).r + (a).i*(b).i;\ 111 do{ (m).r = (a).r*(b).r + (a).i*(b).i;\
113 (m).i = (a).i*(b).r - (a).r*(b).i; }while(0) 112 (m).i = (a).i*(b).r - (a).r*(b).i; }while(0)
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 (x)->i = KISS_FFT_SIN(phase);\ 173 (x)->i = KISS_FFT_SIN(phase);\
175 }while(0) 174 }while(0)
176 175
177 #define kf_cexp2(x,phase) \ 176 #define kf_cexp2(x,phase) \
178 do{ \ 177 do{ \
179 (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\ 178 (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\
180 (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\ 179 (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\
181 }while(0) 180 }while(0)
182 181
183 #endif /* KISS_FFT_GUTS_H */ 182 #endif /* KISS_FFT_GUTS_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698