summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libopus/silk/MacroDebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/MacroDebug.h')
-rw-r--r--lib/rbcodec/codecs/libopus/silk/MacroDebug.h112
1 files changed, 56 insertions, 56 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/MacroDebug.h b/lib/rbcodec/codecs/libopus/silk/MacroDebug.h
index d3d84b6caa..35aedc5c5f 100644
--- a/lib/rbcodec/codecs/libopus/silk/MacroDebug.h
+++ b/lib/rbcodec/codecs/libopus/silk/MacroDebug.h
@@ -9,7 +9,7 @@ this list of conditions and the following disclaimer.
9- Redistributions in binary form must reproduce the above copyright 9- Redistributions in binary form must reproduce the above copyright
10notice, this list of conditions and the following disclaimer in the 10notice, this list of conditions and the following disclaimer in the
11documentation and/or other materials provided with the distribution. 11documentation and/or other materials provided with the distribution.
12- Neither the name of Internet Society, IETF or IETF Trust, nor the 12- Neither the name of Internet Society, IETF or IETF Trust, nor the
13names of specific contributors, may be used to endorse or promote 13names of specific contributors, may be used to endorse or promote
14products derived from this software without specific prior written 14products derived from this software without specific prior written
15permission. 15permission.
@@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
36 36
37#undef silk_ADD16 37#undef silk_ADD16
38#define silk_ADD16(a,b) silk_ADD16_((a), (b), __FILE__, __LINE__) 38#define silk_ADD16(a,b) silk_ADD16_((a), (b), __FILE__, __LINE__)
39static inline opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int line){ 39static OPUS_INLINE opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int line){
40 opus_int16 ret; 40 opus_int16 ret;
41 41
42 ret = a + b; 42 ret = a + b;
@@ -52,7 +52,7 @@ static inline opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int
52 52
53#undef silk_ADD32 53#undef silk_ADD32
54#define silk_ADD32(a,b) silk_ADD32_((a), (b), __FILE__, __LINE__) 54#define silk_ADD32(a,b) silk_ADD32_((a), (b), __FILE__, __LINE__)
55static inline opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int line){ 55static OPUS_INLINE opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int line){
56 opus_int32 ret; 56 opus_int32 ret;
57 57
58 ret = a + b; 58 ret = a + b;
@@ -68,7 +68,7 @@ static inline opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int
68 68
69#undef silk_ADD64 69#undef silk_ADD64
70#define silk_ADD64(a,b) silk_ADD64_((a), (b), __FILE__, __LINE__) 70#define silk_ADD64(a,b) silk_ADD64_((a), (b), __FILE__, __LINE__)
71static inline opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int line){ 71static OPUS_INLINE opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int line){
72 opus_int64 ret; 72 opus_int64 ret;
73 73
74 ret = a + b; 74 ret = a + b;
@@ -84,7 +84,7 @@ static inline opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int
84 84
85#undef silk_SUB16 85#undef silk_SUB16
86#define silk_SUB16(a,b) silk_SUB16_((a), (b), __FILE__, __LINE__) 86#define silk_SUB16(a,b) silk_SUB16_((a), (b), __FILE__, __LINE__)
87static inline opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int line){ 87static OPUS_INLINE opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int line){
88 opus_int16 ret; 88 opus_int16 ret;
89 89
90 ret = a - b; 90 ret = a - b;
@@ -100,7 +100,7 @@ static inline opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int
100 100
101#undef silk_SUB32 101#undef silk_SUB32
102#define silk_SUB32(a,b) silk_SUB32_((a), (b), __FILE__, __LINE__) 102#define silk_SUB32(a,b) silk_SUB32_((a), (b), __FILE__, __LINE__)
103static inline opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int line){ 103static OPUS_INLINE opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int line){
104 opus_int32 ret; 104 opus_int32 ret;
105 105
106 ret = a - b; 106 ret = a - b;
@@ -116,7 +116,7 @@ static inline opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int
116 116
117#undef silk_SUB64 117#undef silk_SUB64
118#define silk_SUB64(a,b) silk_SUB64_((a), (b), __FILE__, __LINE__) 118#define silk_SUB64(a,b) silk_SUB64_((a), (b), __FILE__, __LINE__)
119static inline opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int line){ 119static OPUS_INLINE opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int line){
120 opus_int64 ret; 120 opus_int64 ret;
121 121
122 ret = a - b; 122 ret = a - b;
@@ -132,7 +132,7 @@ static inline opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int
132 132
133#undef silk_ADD_SAT16 133#undef silk_ADD_SAT16
134#define silk_ADD_SAT16(a,b) silk_ADD_SAT16_((a), (b), __FILE__, __LINE__) 134#define silk_ADD_SAT16(a,b) silk_ADD_SAT16_((a), (b), __FILE__, __LINE__)
135static inline opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line) { 135static OPUS_INLINE opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line) {
136 opus_int16 res; 136 opus_int16 res;
137 res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) ); 137 res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) );
138 if ( res != silk_SAT16( (opus_int32)a16 + (opus_int32)b16 ) ) 138 if ( res != silk_SAT16( (opus_int32)a16 + (opus_int32)b16 ) )
@@ -147,7 +147,7 @@ static inline opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char *
147 147
148#undef silk_ADD_SAT32 148#undef silk_ADD_SAT32
149#define silk_ADD_SAT32(a,b) silk_ADD_SAT32_((a), (b), __FILE__, __LINE__) 149#define silk_ADD_SAT32(a,b) silk_ADD_SAT32_((a), (b), __FILE__, __LINE__)
150static inline opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *file, int line){ 150static OPUS_INLINE opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *file, int line){
151 opus_int32 res; 151 opus_int32 res;
152 res = ((((opus_uint32)(a32) + (opus_uint32)(b32)) & 0x80000000) == 0 ? \ 152 res = ((((opus_uint32)(a32) + (opus_uint32)(b32)) & 0x80000000) == 0 ? \
153 ((((a32) & (b32)) & 0x80000000) != 0 ? silk_int32_MIN : (a32)+(b32)) : \ 153 ((((a32) & (b32)) & 0x80000000) != 0 ? silk_int32_MIN : (a32)+(b32)) : \
@@ -164,7 +164,7 @@ static inline opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *f
164 164
165#undef silk_ADD_SAT64 165#undef silk_ADD_SAT64
166#define silk_ADD_SAT64(a,b) silk_ADD_SAT64_((a), (b), __FILE__, __LINE__) 166#define silk_ADD_SAT64(a,b) silk_ADD_SAT64_((a), (b), __FILE__, __LINE__)
167static inline opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line) { 167static OPUS_INLINE opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line) {
168 opus_int64 res; 168 opus_int64 res;
169 int fail = 0; 169 int fail = 0;
170 res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \ 170 res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \
@@ -193,7 +193,7 @@ static inline opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char *
193 193
194#undef silk_SUB_SAT16 194#undef silk_SUB_SAT16
195#define silk_SUB_SAT16(a,b) silk_SUB_SAT16_((a), (b), __FILE__, __LINE__) 195#define silk_SUB_SAT16(a,b) silk_SUB_SAT16_((a), (b), __FILE__, __LINE__)
196static inline opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line ) { 196static OPUS_INLINE opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line ) {
197 opus_int16 res; 197 opus_int16 res;
198 res = (opus_int16)silk_SAT16( silk_SUB32( (opus_int32)(a16), (b16) ) ); 198 res = (opus_int16)silk_SAT16( silk_SUB32( (opus_int32)(a16), (b16) ) );
199 if ( res != silk_SAT16( (opus_int32)a16 - (opus_int32)b16 ) ) 199 if ( res != silk_SAT16( (opus_int32)a16 - (opus_int32)b16 ) )
@@ -208,7 +208,7 @@ static inline opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char *
208 208
209#undef silk_SUB_SAT32 209#undef silk_SUB_SAT32
210#define silk_SUB_SAT32(a,b) silk_SUB_SAT32_((a), (b), __FILE__, __LINE__) 210#define silk_SUB_SAT32(a,b) silk_SUB_SAT32_((a), (b), __FILE__, __LINE__)
211static inline opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char *file, int line ) { 211static OPUS_INLINE opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char *file, int line ) {
212 opus_int32 res; 212 opus_int32 res;
213 res = ((((opus_uint32)(a32)-(opus_uint32)(b32)) & 0x80000000) == 0 ? \ 213 res = ((((opus_uint32)(a32)-(opus_uint32)(b32)) & 0x80000000) == 0 ? \
214 (( (a32) & ((b32)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a32)-(b32)) : \ 214 (( (a32) & ((b32)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a32)-(b32)) : \
@@ -225,7 +225,7 @@ static inline opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char *
225 225
226#undef silk_SUB_SAT64 226#undef silk_SUB_SAT64
227#define silk_SUB_SAT64(a,b) silk_SUB_SAT64_((a), (b), __FILE__, __LINE__) 227#define silk_SUB_SAT64(a,b) silk_SUB_SAT64_((a), (b), __FILE__, __LINE__)
228static inline opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line ) { 228static OPUS_INLINE opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line ) {
229 opus_int64 res; 229 opus_int64 res;
230 int fail = 0; 230 int fail = 0;
231 res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \ 231 res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \
@@ -254,7 +254,7 @@ static inline opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char *
254 254
255#undef silk_MUL 255#undef silk_MUL
256#define silk_MUL(a,b) silk_MUL_((a), (b), __FILE__, __LINE__) 256#define silk_MUL(a,b) silk_MUL_((a), (b), __FILE__, __LINE__)
257static inline opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, int line){ 257static OPUS_INLINE opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, int line){
258 opus_int32 ret; 258 opus_int32 ret;
259 opus_int64 ret64; 259 opus_int64 ret64;
260 ret = a32 * b32; 260 ret = a32 * b32;
@@ -271,7 +271,7 @@ static inline opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, i
271 271
272#undef silk_MUL_uint 272#undef silk_MUL_uint
273#define silk_MUL_uint(a,b) silk_MUL_uint_((a), (b), __FILE__, __LINE__) 273#define silk_MUL_uint(a,b) silk_MUL_uint_((a), (b), __FILE__, __LINE__)
274static inline opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char *file, int line){ 274static OPUS_INLINE opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char *file, int line){
275 opus_uint32 ret; 275 opus_uint32 ret;
276 ret = a32 * b32; 276 ret = a32 * b32;
277 if ( (opus_uint64)ret != (opus_uint64)a32 * (opus_uint64)b32 ) 277 if ( (opus_uint64)ret != (opus_uint64)a32 * (opus_uint64)b32 )
@@ -286,7 +286,7 @@ static inline opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char
286 286
287#undef silk_MLA 287#undef silk_MLA
288#define silk_MLA(a,b,c) silk_MLA_((a), (b), (c), __FILE__, __LINE__) 288#define silk_MLA(a,b,c) silk_MLA_((a), (b), (c), __FILE__, __LINE__)
289static inline opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ 289static OPUS_INLINE opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){
290 opus_int32 ret; 290 opus_int32 ret;
291 ret = a32 + b32 * c32; 291 ret = a32 + b32 * c32;
292 if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 ) 292 if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 )
@@ -301,7 +301,7 @@ static inline opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c3
301 301
302#undef silk_MLA_uint 302#undef silk_MLA_uint
303#define silk_MLA_uint(a,b,c) silk_MLA_uint_((a), (b), (c), __FILE__, __LINE__) 303#define silk_MLA_uint(a,b,c) silk_MLA_uint_((a), (b), (c), __FILE__, __LINE__)
304static inline opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32, char *file, int line){ 304static OPUS_INLINE opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32, char *file, int line){
305 opus_uint32 ret; 305 opus_uint32 ret;
306 ret = a32 + b32 * c32; 306 ret = a32 + b32 * c32;
307 if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 ) 307 if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 )
@@ -316,7 +316,7 @@ static inline opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_u
316 316
317#undef silk_SMULWB 317#undef silk_SMULWB
318#define silk_SMULWB(a,b) silk_SMULWB_((a), (b), __FILE__, __LINE__) 318#define silk_SMULWB(a,b) silk_SMULWB_((a), (b), __FILE__, __LINE__)
319static inline opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file, int line){ 319static OPUS_INLINE opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file, int line){
320 opus_int32 ret; 320 opus_int32 ret;
321 ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16); 321 ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16);
322 if ( (opus_int64)ret != ((opus_int64)a32 * (opus_int16)b32) >> 16 ) 322 if ( (opus_int64)ret != ((opus_int64)a32 * (opus_int16)b32) >> 16 )
@@ -331,7 +331,7 @@ static inline opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file
331 331
332#undef silk_SMLAWB 332#undef silk_SMLAWB
333#define silk_SMLAWB(a,b,c) silk_SMLAWB_((a), (b), (c), __FILE__, __LINE__) 333#define silk_SMLAWB(a,b,c) silk_SMLAWB_((a), (b), (c), __FILE__, __LINE__)
334static inline opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ 334static OPUS_INLINE opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){
335 opus_int32 ret; 335 opus_int32 ret;
336 ret = silk_ADD32( a32, silk_SMULWB( b32, c32 ) ); 336 ret = silk_ADD32( a32, silk_SMULWB( b32, c32 ) );
337 if ( silk_ADD32( a32, silk_SMULWB( b32, c32 ) ) != silk_ADD_SAT32( a32, silk_SMULWB( b32, c32 ) ) ) 337 if ( silk_ADD32( a32, silk_SMULWB( b32, c32 ) ) != silk_ADD_SAT32( a32, silk_SMULWB( b32, c32 ) ) )
@@ -346,7 +346,7 @@ static inline opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32
346 346
347#undef silk_SMULWT 347#undef silk_SMULWT
348#define silk_SMULWT(a,b) silk_SMULWT_((a), (b), __FILE__, __LINE__) 348#define silk_SMULWT(a,b) silk_SMULWT_((a), (b), __FILE__, __LINE__)
349static inline opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file, int line){ 349static OPUS_INLINE opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file, int line){
350 opus_int32 ret; 350 opus_int32 ret;
351 ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16); 351 ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16);
352 if ( (opus_int64)ret != ((opus_int64)a32 * (b32 >> 16)) >> 16 ) 352 if ( (opus_int64)ret != ((opus_int64)a32 * (b32 >> 16)) >> 16 )
@@ -361,7 +361,7 @@ static inline opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file
361 361
362#undef silk_SMLAWT 362#undef silk_SMLAWT
363#define silk_SMLAWT(a,b,c) silk_SMLAWT_((a), (b), (c), __FILE__, __LINE__) 363#define silk_SMLAWT(a,b,c) silk_SMLAWT_((a), (b), (c), __FILE__, __LINE__)
364static inline opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ 364static OPUS_INLINE opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){
365 opus_int32 ret; 365 opus_int32 ret;
366 ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16)); 366 ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16));
367 if ( (opus_int64)ret != (opus_int64)a32 + (((opus_int64)b32 * (c32 >> 16)) >> 16) ) 367 if ( (opus_int64)ret != (opus_int64)a32 + (((opus_int64)b32 * (c32 >> 16)) >> 16) )
@@ -376,7 +376,7 @@ static inline opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32
376 376
377#undef silk_SMULL 377#undef silk_SMULL
378#define silk_SMULL(a,b) silk_SMULL_((a), (b), __FILE__, __LINE__) 378#define silk_SMULL(a,b) silk_SMULL_((a), (b), __FILE__, __LINE__)
379static inline opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, int line){ 379static OPUS_INLINE opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, int line){
380 opus_int64 ret64; 380 opus_int64 ret64;
381 int fail = 0; 381 int fail = 0;
382 ret64 = a64 * b64; 382 ret64 = a64 * b64;
@@ -398,7 +398,7 @@ static inline opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file,
398/* no checking needed for silk_SMULBB */ 398/* no checking needed for silk_SMULBB */
399#undef silk_SMLABB 399#undef silk_SMLABB
400#define silk_SMLABB(a,b,c) silk_SMLABB_((a), (b), (c), __FILE__, __LINE__) 400#define silk_SMLABB(a,b,c) silk_SMLABB_((a), (b), (c), __FILE__, __LINE__)
401static inline opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ 401static OPUS_INLINE opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){
402 opus_int32 ret; 402 opus_int32 ret;
403 ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32); 403 ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32);
404 if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int16)c32 ) 404 if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int16)c32 )
@@ -414,7 +414,7 @@ static inline opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32
414/* no checking needed for silk_SMULBT */ 414/* no checking needed for silk_SMULBT */
415#undef silk_SMLABT 415#undef silk_SMLABT
416#define silk_SMLABT(a,b,c) silk_SMLABT_((a), (b), (c), __FILE__, __LINE__) 416#define silk_SMLABT(a,b,c) silk_SMLABT_((a), (b), (c), __FILE__, __LINE__)
417static inline opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ 417static OPUS_INLINE opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){
418 opus_int32 ret; 418 opus_int32 ret;
419 ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16); 419 ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16);
420 if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (c32 >> 16) ) 420 if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (c32 >> 16) )
@@ -430,7 +430,7 @@ static inline opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32
430/* no checking needed for silk_SMULTT */ 430/* no checking needed for silk_SMULTT */
431#undef silk_SMLATT 431#undef silk_SMLATT
432#define silk_SMLATT(a,b,c) silk_SMLATT_((a), (b), (c), __FILE__, __LINE__) 432#define silk_SMLATT(a,b,c) silk_SMLATT_((a), (b), (c), __FILE__, __LINE__)
433static inline opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ 433static OPUS_INLINE opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){
434 opus_int32 ret; 434 opus_int32 ret;
435 ret = a32 + (b32 >> 16) * (c32 >> 16); 435 ret = a32 + (b32 >> 16) * (c32 >> 16);
436 if ( (opus_int64)ret != (opus_int64)a32 + (b32 >> 16) * (c32 >> 16) ) 436 if ( (opus_int64)ret != (opus_int64)a32 + (b32 >> 16) * (c32 >> 16) )
@@ -445,7 +445,7 @@ static inline opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32
445 445
446#undef silk_SMULWW 446#undef silk_SMULWW
447#define silk_SMULWW(a,b) silk_SMULWW_((a), (b), __FILE__, __LINE__) 447#define silk_SMULWW(a,b) silk_SMULWW_((a), (b), __FILE__, __LINE__)
448static inline opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file, int line){ 448static OPUS_INLINE opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file, int line){
449 opus_int32 ret, tmp1, tmp2; 449 opus_int32 ret, tmp1, tmp2;
450 opus_int64 ret64; 450 opus_int64 ret64;
451 int fail = 0; 451 int fail = 0;
@@ -476,7 +476,7 @@ static inline opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file
476 476
477#undef silk_SMLAWW 477#undef silk_SMLAWW
478#define silk_SMLAWW(a,b,c) silk_SMLAWW_((a), (b), (c), __FILE__, __LINE__) 478#define silk_SMLAWW(a,b,c) silk_SMLAWW_((a), (b), (c), __FILE__, __LINE__)
479static inline opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ 479static OPUS_INLINE opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){
480 opus_int32 ret, tmp; 480 opus_int32 ret, tmp;
481 481
482 tmp = silk_SMULWW( b32, c32 ); 482 tmp = silk_SMULWW( b32, c32 );
@@ -505,7 +505,7 @@ static inline opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32
505 505
506#undef silk_DIV32 506#undef silk_DIV32
507#define silk_DIV32(a,b) silk_DIV32_((a), (b), __FILE__, __LINE__) 507#define silk_DIV32(a,b) silk_DIV32_((a), (b), __FILE__, __LINE__)
508static inline opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, int line){ 508static OPUS_INLINE opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, int line){
509 if ( b32 == 0 ) 509 if ( b32 == 0 )
510 { 510 {
511 fprintf (stderr, "silk_DIV32(%d, %d) in %s: line %d\n", a32, b32, file, line); 511 fprintf (stderr, "silk_DIV32(%d, %d) in %s: line %d\n", a32, b32, file, line);
@@ -518,7 +518,7 @@ static inline opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file,
518 518
519#undef silk_DIV32_16 519#undef silk_DIV32_16
520#define silk_DIV32_16(a,b) silk_DIV32_16_((a), (b), __FILE__, __LINE__) 520#define silk_DIV32_16(a,b) silk_DIV32_16_((a), (b), __FILE__, __LINE__)
521static inline opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *file, int line){ 521static OPUS_INLINE opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *file, int line){
522 int fail = 0; 522 int fail = 0;
523 fail |= b32 == 0; 523 fail |= b32 == 0;
524 fail |= b32 > silk_int16_MAX; 524 fail |= b32 > silk_int16_MAX;
@@ -544,7 +544,7 @@ static inline opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *fi
544 544
545#undef silk_LSHIFT8 545#undef silk_LSHIFT8
546#define silk_LSHIFT8(a,b) silk_LSHIFT8_((a), (b), __FILE__, __LINE__) 546#define silk_LSHIFT8(a,b) silk_LSHIFT8_((a), (b), __FILE__, __LINE__)
547static inline opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ 547static OPUS_INLINE opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){
548 opus_int8 ret; 548 opus_int8 ret;
549 int fail = 0; 549 int fail = 0;
550 ret = a << shift; 550 ret = a << shift;
@@ -563,7 +563,7 @@ static inline opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file,
563 563
564#undef silk_LSHIFT16 564#undef silk_LSHIFT16
565#define silk_LSHIFT16(a,b) silk_LSHIFT16_((a), (b), __FILE__, __LINE__) 565#define silk_LSHIFT16(a,b) silk_LSHIFT16_((a), (b), __FILE__, __LINE__)
566static inline opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ 566static OPUS_INLINE opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){
567 opus_int16 ret; 567 opus_int16 ret;
568 int fail = 0; 568 int fail = 0;
569 ret = a << shift; 569 ret = a << shift;
@@ -582,7 +582,7 @@ static inline opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *fi
582 582
583#undef silk_LSHIFT32 583#undef silk_LSHIFT32
584#define silk_LSHIFT32(a,b) silk_LSHIFT32_((a), (b), __FILE__, __LINE__) 584#define silk_LSHIFT32(a,b) silk_LSHIFT32_((a), (b), __FILE__, __LINE__)
585static inline opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ 585static OPUS_INLINE opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){
586 opus_int32 ret; 586 opus_int32 ret;
587 int fail = 0; 587 int fail = 0;
588 ret = a << shift; 588 ret = a << shift;
@@ -601,7 +601,7 @@ static inline opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *fi
601 601
602#undef silk_LSHIFT64 602#undef silk_LSHIFT64
603#define silk_LSHIFT64(a,b) silk_LSHIFT64_((a), (b), __FILE__, __LINE__) 603#define silk_LSHIFT64(a,b) silk_LSHIFT64_((a), (b), __FILE__, __LINE__)
604static inline opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file, int line){ 604static OPUS_INLINE opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file, int line){
605 opus_int64 ret; 605 opus_int64 ret;
606 int fail = 0; 606 int fail = 0;
607 ret = a << shift; 607 ret = a << shift;
@@ -620,7 +620,7 @@ static inline opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file
620 620
621#undef silk_LSHIFT_ovflw 621#undef silk_LSHIFT_ovflw
622#define silk_LSHIFT_ovflw(a,b) silk_LSHIFT_ovflw_((a), (b), __FILE__, __LINE__) 622#define silk_LSHIFT_ovflw(a,b) silk_LSHIFT_ovflw_((a), (b), __FILE__, __LINE__)
623static inline opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char *file, int line){ 623static OPUS_INLINE opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char *file, int line){
624 if ( (shift < 0) || (shift >= 32) ) /* no check for overflow */ 624 if ( (shift < 0) || (shift >= 32) ) /* no check for overflow */
625 { 625 {
626 fprintf (stderr, "silk_LSHIFT_ovflw(%d, %d) in %s: line %d\n", a, shift, file, line); 626 fprintf (stderr, "silk_LSHIFT_ovflw(%d, %d) in %s: line %d\n", a, shift, file, line);
@@ -633,7 +633,7 @@ static inline opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char
633 633
634#undef silk_LSHIFT_uint 634#undef silk_LSHIFT_uint
635#define silk_LSHIFT_uint(a,b) silk_LSHIFT_uint_((a), (b), __FILE__, __LINE__) 635#define silk_LSHIFT_uint(a,b) silk_LSHIFT_uint_((a), (b), __FILE__, __LINE__)
636static inline opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ 636static OPUS_INLINE opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){
637 opus_uint32 ret; 637 opus_uint32 ret;
638 ret = a << shift; 638 ret = a << shift;
639 if ( (shift < 0) || ((opus_int64)ret != ((opus_int64)a) << shift)) 639 if ( (shift < 0) || ((opus_int64)ret != ((opus_int64)a) << shift))
@@ -648,7 +648,7 @@ static inline opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, cha
648 648
649#undef silk_RSHIFT8 649#undef silk_RSHIFT8
650#define silk_RSHITF8(a,b) silk_RSHIFT8_((a), (b), __FILE__, __LINE__) 650#define silk_RSHITF8(a,b) silk_RSHIFT8_((a), (b), __FILE__, __LINE__)
651static inline opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ 651static OPUS_INLINE opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){
652 if ( (shift < 0) || (shift>=8) ) 652 if ( (shift < 0) || (shift>=8) )
653 { 653 {
654 fprintf (stderr, "silk_RSHITF8(%d, %d) in %s: line %d\n", a, shift, file, line); 654 fprintf (stderr, "silk_RSHITF8(%d, %d) in %s: line %d\n", a, shift, file, line);
@@ -661,7 +661,7 @@ static inline opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file,
661 661
662#undef silk_RSHIFT16 662#undef silk_RSHIFT16
663#define silk_RSHITF16(a,b) silk_RSHIFT16_((a), (b), __FILE__, __LINE__) 663#define silk_RSHITF16(a,b) silk_RSHIFT16_((a), (b), __FILE__, __LINE__)
664static inline opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ 664static OPUS_INLINE opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){
665 if ( (shift < 0) || (shift>=16) ) 665 if ( (shift < 0) || (shift>=16) )
666 { 666 {
667 fprintf (stderr, "silk_RSHITF16(%d, %d) in %s: line %d\n", a, shift, file, line); 667 fprintf (stderr, "silk_RSHITF16(%d, %d) in %s: line %d\n", a, shift, file, line);
@@ -674,7 +674,7 @@ static inline opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *fi
674 674
675#undef silk_RSHIFT32 675#undef silk_RSHIFT32
676#define silk_RSHIFT32(a,b) silk_RSHIFT32_((a), (b), __FILE__, __LINE__) 676#define silk_RSHIFT32(a,b) silk_RSHIFT32_((a), (b), __FILE__, __LINE__)
677static inline opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ 677static OPUS_INLINE opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){
678 if ( (shift < 0) || (shift>=32) ) 678 if ( (shift < 0) || (shift>=32) )
679 { 679 {
680 fprintf (stderr, "silk_RSHITF32(%d, %d) in %s: line %d\n", a, shift, file, line); 680 fprintf (stderr, "silk_RSHITF32(%d, %d) in %s: line %d\n", a, shift, file, line);
@@ -687,7 +687,7 @@ static inline opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *fi
687 687
688#undef silk_RSHIFT64 688#undef silk_RSHIFT64
689#define silk_RSHIFT64(a,b) silk_RSHIFT64_((a), (b), __FILE__, __LINE__) 689#define silk_RSHIFT64(a,b) silk_RSHIFT64_((a), (b), __FILE__, __LINE__)
690static inline opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *file, int line){ 690static OPUS_INLINE opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *file, int line){
691 if ( (shift < 0) || (shift>=64) ) 691 if ( (shift < 0) || (shift>=64) )
692 { 692 {
693 fprintf (stderr, "silk_RSHITF64(%lld, %lld) in %s: line %d\n", (long long)a, (long long)shift, file, line); 693 fprintf (stderr, "silk_RSHITF64(%lld, %lld) in %s: line %d\n", (long long)a, (long long)shift, file, line);
@@ -700,7 +700,7 @@ static inline opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *fi
700 700
701#undef silk_RSHIFT_uint 701#undef silk_RSHIFT_uint
702#define silk_RSHIFT_uint(a,b) silk_RSHIFT_uint_((a), (b), __FILE__, __LINE__) 702#define silk_RSHIFT_uint(a,b) silk_RSHIFT_uint_((a), (b), __FILE__, __LINE__)
703static inline opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ 703static OPUS_INLINE opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){
704 if ( (shift < 0) || (shift>32) ) 704 if ( (shift < 0) || (shift>32) )
705 { 705 {
706 fprintf (stderr, "silk_RSHIFT_uint(%u, %d) in %s: line %d\n", a, shift, file, line); 706 fprintf (stderr, "silk_RSHIFT_uint(%u, %d) in %s: line %d\n", a, shift, file, line);
@@ -713,7 +713,7 @@ static inline opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, cha
713 713
714#undef silk_ADD_LSHIFT 714#undef silk_ADD_LSHIFT
715#define silk_ADD_LSHIFT(a,b,c) silk_ADD_LSHIFT_((a), (b), (c), __FILE__, __LINE__) 715#define silk_ADD_LSHIFT(a,b,c) silk_ADD_LSHIFT_((a), (b), (c), __FILE__, __LINE__)
716static inline int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line){ 716static OPUS_INLINE int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line){
717 opus_int16 ret; 717 opus_int16 ret;
718 ret = a + (b << shift); 718 ret = a + (b << shift);
719 if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) 719 if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) )
@@ -728,7 +728,7 @@ static inline int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line
728 728
729#undef silk_ADD_LSHIFT32 729#undef silk_ADD_LSHIFT32
730#define silk_ADD_LSHIFT32(a,b,c) silk_ADD_LSHIFT32_((a), (b), (c), __FILE__, __LINE__) 730#define silk_ADD_LSHIFT32(a,b,c) silk_ADD_LSHIFT32_((a), (b), (c), __FILE__, __LINE__)
731static inline opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ 731static OPUS_INLINE opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){
732 opus_int32 ret; 732 opus_int32 ret;
733 ret = a + (b << shift); 733 ret = a + (b << shift);
734 if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) 734 if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) )
@@ -743,7 +743,7 @@ static inline opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int
743 743
744#undef silk_ADD_LSHIFT_uint 744#undef silk_ADD_LSHIFT_uint
745#define silk_ADD_LSHIFT_uint(a,b,c) silk_ADD_LSHIFT_uint_((a), (b), (c), __FILE__, __LINE__) 745#define silk_ADD_LSHIFT_uint(a,b,c) silk_ADD_LSHIFT_uint_((a), (b), (c), __FILE__, __LINE__)
746static inline opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ 746static OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){
747 opus_uint32 ret; 747 opus_uint32 ret;
748 ret = a + (b << shift); 748 ret = a + (b << shift);
749 if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) 749 if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) )
@@ -758,7 +758,7 @@ static inline opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, op
758 758
759#undef silk_ADD_RSHIFT 759#undef silk_ADD_RSHIFT
760#define silk_ADD_RSHIFT(a,b,c) silk_ADD_RSHIFT_((a), (b), (c), __FILE__, __LINE__) 760#define silk_ADD_RSHIFT(a,b,c) silk_ADD_RSHIFT_((a), (b), (c), __FILE__, __LINE__)
761static inline int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line){ 761static OPUS_INLINE int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line){
762 opus_int16 ret; 762 opus_int16 ret;
763 ret = a + (b >> shift); 763 ret = a + (b >> shift);
764 if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) 764 if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) )
@@ -773,7 +773,7 @@ static inline int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line
773 773
774#undef silk_ADD_RSHIFT32 774#undef silk_ADD_RSHIFT32
775#define silk_ADD_RSHIFT32(a,b,c) silk_ADD_RSHIFT32_((a), (b), (c), __FILE__, __LINE__) 775#define silk_ADD_RSHIFT32(a,b,c) silk_ADD_RSHIFT32_((a), (b), (c), __FILE__, __LINE__)
776static inline opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ 776static OPUS_INLINE opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){
777 opus_int32 ret; 777 opus_int32 ret;
778 ret = a + (b >> shift); 778 ret = a + (b >> shift);
779 if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) 779 if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) )
@@ -788,7 +788,7 @@ static inline opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int
788 788
789#undef silk_ADD_RSHIFT_uint 789#undef silk_ADD_RSHIFT_uint
790#define silk_ADD_RSHIFT_uint(a,b,c) silk_ADD_RSHIFT_uint_((a), (b), (c), __FILE__, __LINE__) 790#define silk_ADD_RSHIFT_uint(a,b,c) silk_ADD_RSHIFT_uint_((a), (b), (c), __FILE__, __LINE__)
791static inline opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ 791static OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){
792 opus_uint32 ret; 792 opus_uint32 ret;
793 ret = a + (b >> shift); 793 ret = a + (b >> shift);
794 if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) 794 if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) )
@@ -803,7 +803,7 @@ static inline opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, op
803 803
804#undef silk_SUB_LSHIFT32 804#undef silk_SUB_LSHIFT32
805#define silk_SUB_LSHIFT32(a,b,c) silk_SUB_LSHIFT32_((a), (b), (c), __FILE__, __LINE__) 805#define silk_SUB_LSHIFT32(a,b,c) silk_SUB_LSHIFT32_((a), (b), (c), __FILE__, __LINE__)
806static inline opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ 806static OPUS_INLINE opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){
807 opus_int32 ret; 807 opus_int32 ret;
808 ret = a - (b << shift); 808 ret = a - (b << shift);
809 if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) << shift)) ) 809 if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) << shift)) )
@@ -818,7 +818,7 @@ static inline opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int
818 818
819#undef silk_SUB_RSHIFT32 819#undef silk_SUB_RSHIFT32
820#define silk_SUB_RSHIFT32(a,b,c) silk_SUB_RSHIFT32_((a), (b), (c), __FILE__, __LINE__) 820#define silk_SUB_RSHIFT32(a,b,c) silk_SUB_RSHIFT32_((a), (b), (c), __FILE__, __LINE__)
821static inline opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ 821static OPUS_INLINE opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){
822 opus_int32 ret; 822 opus_int32 ret;
823 ret = a - (b >> shift); 823 ret = a - (b >> shift);
824 if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) >> shift)) ) 824 if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) >> shift)) )
@@ -833,7 +833,7 @@ static inline opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int
833 833
834#undef silk_RSHIFT_ROUND 834#undef silk_RSHIFT_ROUND
835#define silk_RSHIFT_ROUND(a,b) silk_RSHIFT_ROUND_((a), (b), __FILE__, __LINE__) 835#define silk_RSHIFT_ROUND(a,b) silk_RSHIFT_ROUND_((a), (b), __FILE__, __LINE__)
836static inline opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char *file, int line){ 836static OPUS_INLINE opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char *file, int line){
837 opus_int32 ret; 837 opus_int32 ret;
838 ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; 838 ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;
839 /* the marco definition can't handle a shift of zero */ 839 /* the marco definition can't handle a shift of zero */
@@ -849,7 +849,7 @@ static inline opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char
849 849
850#undef silk_RSHIFT_ROUND64 850#undef silk_RSHIFT_ROUND64
851#define silk_RSHIFT_ROUND64(a,b) silk_RSHIFT_ROUND64_((a), (b), __FILE__, __LINE__) 851#define silk_RSHIFT_ROUND64(a,b) silk_RSHIFT_ROUND64_((a), (b), __FILE__, __LINE__)
852static inline opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, char *file, int line){ 852static OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, char *file, int line){
853 opus_int64 ret; 853 opus_int64 ret;
854 /* the marco definition can't handle a shift of zero */ 854 /* the marco definition can't handle a shift of zero */
855 if ( (shift <= 0) || (shift>=64) ) 855 if ( (shift <= 0) || (shift>=64) )
@@ -865,14 +865,14 @@ static inline opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, ch
865 865
866/* silk_abs is used on floats also, so doesn't work... */ 866/* silk_abs is used on floats also, so doesn't work... */
867/*#undef silk_abs 867/*#undef silk_abs
868static inline opus_int32 silk_abs(opus_int32 a){ 868static OPUS_INLINE opus_int32 silk_abs(opus_int32 a){
869 silk_assert(a != 0x80000000); 869 silk_assert(a != 0x80000000);
870 return (((a) > 0) ? (a) : -(a)); // Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN 870 return (((a) > 0) ? (a) : -(a)); // Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN
871}*/ 871}*/
872 872
873#undef silk_abs_int64 873#undef silk_abs_int64
874#define silk_abs_int64(a) silk_abs_int64_((a), __FILE__, __LINE__) 874#define silk_abs_int64(a) silk_abs_int64_((a), __FILE__, __LINE__)
875static inline opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){ 875static OPUS_INLINE opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){
876 if ( a == silk_int64_MIN ) 876 if ( a == silk_int64_MIN )
877 { 877 {
878 fprintf (stderr, "silk_abs_int64(%lld) in %s: line %d\n", (long long)a, file, line); 878 fprintf (stderr, "silk_abs_int64(%lld) in %s: line %d\n", (long long)a, file, line);
@@ -885,7 +885,7 @@ static inline opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){
885 885
886#undef silk_abs_int32 886#undef silk_abs_int32
887#define silk_abs_int32(a) silk_abs_int32_((a), __FILE__, __LINE__) 887#define silk_abs_int32(a) silk_abs_int32_((a), __FILE__, __LINE__)
888static inline opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){ 888static OPUS_INLINE opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){
889 if ( a == silk_int32_MIN ) 889 if ( a == silk_int32_MIN )
890 { 890 {
891 fprintf (stderr, "silk_abs_int32(%d) in %s: line %d\n", a, file, line); 891 fprintf (stderr, "silk_abs_int32(%d) in %s: line %d\n", a, file, line);
@@ -898,7 +898,7 @@ static inline opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){
898 898
899#undef silk_CHECK_FIT8 899#undef silk_CHECK_FIT8
900#define silk_CHECK_FIT8(a) silk_CHECK_FIT8_((a), __FILE__, __LINE__) 900#define silk_CHECK_FIT8(a) silk_CHECK_FIT8_((a), __FILE__, __LINE__)
901static inline opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){ 901static OPUS_INLINE opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){
902 opus_int8 ret; 902 opus_int8 ret;
903 ret = (opus_int8)a; 903 ret = (opus_int8)a;
904 if ( (opus_int64)ret != a ) 904 if ( (opus_int64)ret != a )
@@ -913,7 +913,7 @@ static inline opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){
913 913
914#undef silk_CHECK_FIT16 914#undef silk_CHECK_FIT16
915#define silk_CHECK_FIT16(a) silk_CHECK_FIT16_((a), __FILE__, __LINE__) 915#define silk_CHECK_FIT16(a) silk_CHECK_FIT16_((a), __FILE__, __LINE__)
916static inline opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ){ 916static OPUS_INLINE opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ){
917 opus_int16 ret; 917 opus_int16 ret;
918 ret = (opus_int16)a; 918 ret = (opus_int16)a;
919 if ( (opus_int64)ret != a ) 919 if ( (opus_int64)ret != a )
@@ -928,7 +928,7 @@ static inline opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line )
928 928
929#undef silk_CHECK_FIT32 929#undef silk_CHECK_FIT32
930#define silk_CHECK_FIT32(a) silk_CHECK_FIT32_((a), __FILE__, __LINE__) 930#define silk_CHECK_FIT32(a) silk_CHECK_FIT32_((a), __FILE__, __LINE__)
931static inline opus_int32 silk_CHECK_FIT32_( opus_int64 a, char *file, int line ){ 931static OPUS_INLINE opus_int32 silk_CHECK_FIT32_( opus_int64 a, char *file, int line ){
932 opus_int32 ret; 932 opus_int32 ret;
933 ret = (opus_int32)a; 933 ret = (opus_int32)a;
934 if ( (opus_int64)ret != a ) 934 if ( (opus_int64)ret != a )