summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libopus/silk/MacroCount.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/MacroCount.h')
-rw-r--r--lib/rbcodec/codecs/libopus/silk/MacroCount.h162
1 files changed, 81 insertions, 81 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/MacroCount.h b/lib/rbcodec/codecs/libopus/silk/MacroCount.h
index 6395d250b2..834817d058 100644
--- a/lib/rbcodec/codecs/libopus/silk/MacroCount.h
+++ b/lib/rbcodec/codecs/libopus/silk/MacroCount.h
@@ -8,7 +8,7 @@ this list of conditions and the following disclaimer.
8- Redistributions in binary form must reproduce the above copyright 8- Redistributions in binary form must reproduce the above copyright
9notice, this list of conditions and the following disclaimer in the 9notice, this list of conditions and the following disclaimer in the
10documentation and/or other materials provided with the distribution. 10documentation and/or other materials provided with the distribution.
11- Neither the name of Internet Society, IETF or IETF Trust, nor the 11- Neither the name of Internet Society, IETF or IETF Trust, nor the
12names of specific contributors, may be used to endorse or promote 12names of specific contributors, may be used to endorse or promote
13products derived from this software without specific prior written 13products derived from this software without specific prior written
14permission. 14permission.
@@ -34,11 +34,11 @@ POSSIBILITY OF SUCH DAMAGE.
34 34
35extern opus_int64 ops_count; 35extern opus_int64 ops_count;
36 36
37static inline opus_int64 silk_SaveCount(){ 37static OPUS_INLINE opus_int64 silk_SaveCount(){
38 return(ops_count); 38 return(ops_count);
39} 39}
40 40
41static inline opus_int64 silk_SaveResetCount(){ 41static OPUS_INLINE opus_int64 silk_SaveResetCount(){
42 opus_int64 ret; 42 opus_int64 ret;
43 43
44 ret = ops_count; 44 ret = ops_count;
@@ -46,12 +46,12 @@ static inline opus_int64 silk_SaveResetCount(){
46 return(ret); 46 return(ret);
47} 47}
48 48
49static inline silk_PrintCount(){ 49static OPUS_INLINE silk_PrintCount(){
50 printf("ops_count = %d \n ", (opus_int32)ops_count); 50 printf("ops_count = %d \n ", (opus_int32)ops_count);
51} 51}
52 52
53#undef silk_MUL 53#undef silk_MUL
54static inline opus_int32 silk_MUL(opus_int32 a32, opus_int32 b32){ 54static OPUS_INLINE opus_int32 silk_MUL(opus_int32 a32, opus_int32 b32){
55 opus_int32 ret; 55 opus_int32 ret;
56 ops_count += 4; 56 ops_count += 4;
57 ret = a32 * b32; 57 ret = a32 * b32;
@@ -59,14 +59,14 @@ static inline opus_int32 silk_MUL(opus_int32 a32, opus_int32 b32){
59} 59}
60 60
61#undef silk_MUL_uint 61#undef silk_MUL_uint
62static inline opus_uint32 silk_MUL_uint(opus_uint32 a32, opus_uint32 b32){ 62static OPUS_INLINE opus_uint32 silk_MUL_uint(opus_uint32 a32, opus_uint32 b32){
63 opus_uint32 ret; 63 opus_uint32 ret;
64 ops_count += 4; 64 ops_count += 4;
65 ret = a32 * b32; 65 ret = a32 * b32;
66 return ret; 66 return ret;
67} 67}
68#undef silk_MLA 68#undef silk_MLA
69static inline opus_int32 silk_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){ 69static OPUS_INLINE opus_int32 silk_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){
70 opus_int32 ret; 70 opus_int32 ret;
71 ops_count += 4; 71 ops_count += 4;
72 ret = a32 + b32 * c32; 72 ret = a32 + b32 * c32;
@@ -74,7 +74,7 @@ static inline opus_int32 silk_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32
74} 74}
75 75
76#undef silk_MLA_uint 76#undef silk_MLA_uint
77static inline opus_int32 silk_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){ 77static OPUS_INLINE opus_int32 silk_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){
78 opus_uint32 ret; 78 opus_uint32 ret;
79 ops_count += 4; 79 ops_count += 4;
80 ret = a32 + b32 * c32; 80 ret = a32 + b32 * c32;
@@ -82,14 +82,14 @@ static inline opus_int32 silk_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_ui
82} 82}
83 83
84#undef silk_SMULWB 84#undef silk_SMULWB
85static inline opus_int32 silk_SMULWB(opus_int32 a32, opus_int32 b32){ 85static OPUS_INLINE opus_int32 silk_SMULWB(opus_int32 a32, opus_int32 b32){
86 opus_int32 ret; 86 opus_int32 ret;
87 ops_count += 5; 87 ops_count += 5;
88 ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16); 88 ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16);
89 return ret; 89 return ret;
90} 90}
91#undef silk_SMLAWB 91#undef silk_SMLAWB
92static inline opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ 92static OPUS_INLINE opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
93 opus_int32 ret; 93 opus_int32 ret;
94 ops_count += 5; 94 ops_count += 5;
95 ret = ((a32) + ((((b32) >> 16) * (opus_int32)((opus_int16)(c32))) + ((((b32) & 0x0000FFFF) * (opus_int32)((opus_int16)(c32))) >> 16))); 95 ret = ((a32) + ((((b32) >> 16) * (opus_int32)((opus_int16)(c32))) + ((((b32) & 0x0000FFFF) * (opus_int32)((opus_int16)(c32))) >> 16)));
@@ -97,14 +97,14 @@ static inline opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32
97} 97}
98 98
99#undef silk_SMULWT 99#undef silk_SMULWT
100static inline opus_int32 silk_SMULWT(opus_int32 a32, opus_int32 b32){ 100static OPUS_INLINE opus_int32 silk_SMULWT(opus_int32 a32, opus_int32 b32){
101 opus_int32 ret; 101 opus_int32 ret;
102 ops_count += 4; 102 ops_count += 4;
103 ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16); 103 ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16);
104 return ret; 104 return ret;
105} 105}
106#undef silk_SMLAWT 106#undef silk_SMLAWT
107static inline opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ 107static OPUS_INLINE opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
108 opus_int32 ret; 108 opus_int32 ret;
109 ops_count += 4; 109 ops_count += 4;
110 ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16)); 110 ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16));
@@ -112,14 +112,14 @@ static inline opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32
112} 112}
113 113
114#undef silk_SMULBB 114#undef silk_SMULBB
115static inline opus_int32 silk_SMULBB(opus_int32 a32, opus_int32 b32){ 115static OPUS_INLINE opus_int32 silk_SMULBB(opus_int32 a32, opus_int32 b32){
116 opus_int32 ret; 116 opus_int32 ret;
117 ops_count += 1; 117 ops_count += 1;
118 ret = (opus_int32)((opus_int16)a32) * (opus_int32)((opus_int16)b32); 118 ret = (opus_int32)((opus_int16)a32) * (opus_int32)((opus_int16)b32);
119 return ret; 119 return ret;
120} 120}
121#undef silk_SMLABB 121#undef silk_SMLABB
122static inline opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ 122static OPUS_INLINE opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
123 opus_int32 ret; 123 opus_int32 ret;
124 ops_count += 1; 124 ops_count += 1;
125 ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32); 125 ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32);
@@ -127,7 +127,7 @@ static inline opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32
127} 127}
128 128
129#undef silk_SMULBT 129#undef silk_SMULBT
130static inline opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){ 130static OPUS_INLINE opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){
131 opus_int32 ret; 131 opus_int32 ret;
132 ops_count += 4; 132 ops_count += 4;
133 ret = ((opus_int32)((opus_int16)a32)) * (b32 >> 16); 133 ret = ((opus_int32)((opus_int16)a32)) * (b32 >> 16);
@@ -135,7 +135,7 @@ static inline opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){
135} 135}
136 136
137#undef silk_SMLABT 137#undef silk_SMLABT
138static inline opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ 138static OPUS_INLINE opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
139 opus_int32 ret; 139 opus_int32 ret;
140 ops_count += 1; 140 ops_count += 1;
141 ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16); 141 ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16);
@@ -143,7 +143,7 @@ static inline opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32
143} 143}
144 144
145#undef silk_SMULTT 145#undef silk_SMULTT
146static inline opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){ 146static OPUS_INLINE opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){
147 opus_int32 ret; 147 opus_int32 ret;
148 ops_count += 1; 148 ops_count += 1;
149 ret = (a32 >> 16) * (b32 >> 16); 149 ret = (a32 >> 16) * (b32 >> 16);
@@ -151,7 +151,7 @@ static inline opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){
151} 151}
152 152
153#undef silk_SMLATT 153#undef silk_SMLATT
154static inline opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ 154static OPUS_INLINE opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
155 opus_int32 ret; 155 opus_int32 ret;
156 ops_count += 1; 156 ops_count += 1;
157 ret = a32 + (b32 >> 16) * (c32 >> 16); 157 ret = a32 + (b32 >> 16) * (c32 >> 16);
@@ -179,7 +179,7 @@ static inline opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32
179#define silk_SMLAWT_ovflw silk_SMLAWT 179#define silk_SMLAWT_ovflw silk_SMLAWT
180 180
181#undef silk_SMULL 181#undef silk_SMULL
182static inline opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){ 182static OPUS_INLINE opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){
183 opus_int64 ret; 183 opus_int64 ret;
184 ops_count += 8; 184 ops_count += 8;
185 ret = ((opus_int64)(a32) * /*(opus_int64)*/(b32)); 185 ret = ((opus_int64)(a32) * /*(opus_int64)*/(b32));
@@ -187,14 +187,14 @@ static inline opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){
187} 187}
188 188
189#undef silk_SMLAL 189#undef silk_SMLAL
190static inline opus_int64 silk_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){ 190static OPUS_INLINE opus_int64 silk_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){
191 opus_int64 ret; 191 opus_int64 ret;
192 ops_count += 8; 192 ops_count += 8;
193 ret = a64 + ((opus_int64)(b32) * /*(opus_int64)*/(c32)); 193 ret = a64 + ((opus_int64)(b32) * /*(opus_int64)*/(c32));
194 return ret; 194 return ret;
195} 195}
196#undef silk_SMLALBB 196#undef silk_SMLALBB
197static inline opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){ 197static OPUS_INLINE opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){
198 opus_int64 ret; 198 opus_int64 ret;
199 ops_count += 4; 199 ops_count += 4;
200 ret = a64 + ((opus_int64)(b16) * /*(opus_int64)*/(c16)); 200 ret = a64 + ((opus_int64)(b16) * /*(opus_int64)*/(c16));
@@ -202,7 +202,7 @@ static inline opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16
202} 202}
203 203
204#undef SigProcFIX_CLZ16 204#undef SigProcFIX_CLZ16
205static inline opus_int32 SigProcFIX_CLZ16(opus_int16 in16) 205static OPUS_INLINE opus_int32 SigProcFIX_CLZ16(opus_int16 in16)
206{ 206{
207 opus_int32 out32 = 0; 207 opus_int32 out32 = 0;
208 ops_count += 10; 208 ops_count += 10;
@@ -240,7 +240,7 @@ static inline opus_int32 SigProcFIX_CLZ16(opus_int16 in16)
240} 240}
241 241
242#undef SigProcFIX_CLZ32 242#undef SigProcFIX_CLZ32
243static inline opus_int32 SigProcFIX_CLZ32(opus_int32 in32) 243static OPUS_INLINE opus_int32 SigProcFIX_CLZ32(opus_int32 in32)
244{ 244{
245 /* test highest 16 bits and convert to opus_int16 */ 245 /* test highest 16 bits and convert to opus_int16 */
246 ops_count += 2; 246 ops_count += 2;
@@ -252,19 +252,19 @@ static inline opus_int32 SigProcFIX_CLZ32(opus_int32 in32)
252} 252}
253 253
254#undef silk_DIV32 254#undef silk_DIV32
255static inline opus_int32 silk_DIV32(opus_int32 a32, opus_int32 b32){ 255static OPUS_INLINE opus_int32 silk_DIV32(opus_int32 a32, opus_int32 b32){
256 ops_count += 64; 256 ops_count += 64;
257 return a32 / b32; 257 return a32 / b32;
258} 258}
259 259
260#undef silk_DIV32_16 260#undef silk_DIV32_16
261static inline opus_int32 silk_DIV32_16(opus_int32 a32, opus_int32 b32){ 261static OPUS_INLINE opus_int32 silk_DIV32_16(opus_int32 a32, opus_int32 b32){
262 ops_count += 32; 262 ops_count += 32;
263 return a32 / b32; 263 return a32 / b32;
264} 264}
265 265
266#undef silk_SAT8 266#undef silk_SAT8
267static inline opus_int8 silk_SAT8(opus_int64 a){ 267static OPUS_INLINE opus_int8 silk_SAT8(opus_int64 a){
268 opus_int8 tmp; 268 opus_int8 tmp;
269 ops_count += 1; 269 ops_count += 1;
270 tmp = (opus_int8)((a) > silk_int8_MAX ? silk_int8_MAX : \ 270 tmp = (opus_int8)((a) > silk_int8_MAX ? silk_int8_MAX : \
@@ -273,7 +273,7 @@ static inline opus_int8 silk_SAT8(opus_int64 a){
273} 273}
274 274
275#undef silk_SAT16 275#undef silk_SAT16
276static inline opus_int16 silk_SAT16(opus_int64 a){ 276static OPUS_INLINE opus_int16 silk_SAT16(opus_int64 a){
277 opus_int16 tmp; 277 opus_int16 tmp;
278 ops_count += 1; 278 ops_count += 1;
279 tmp = (opus_int16)((a) > silk_int16_MAX ? silk_int16_MAX : \ 279 tmp = (opus_int16)((a) > silk_int16_MAX ? silk_int16_MAX : \
@@ -281,7 +281,7 @@ static inline opus_int16 silk_SAT16(opus_int64 a){
281 return(tmp); 281 return(tmp);
282} 282}
283#undef silk_SAT32 283#undef silk_SAT32
284static inline opus_int32 silk_SAT32(opus_int64 a){ 284static OPUS_INLINE opus_int32 silk_SAT32(opus_int64 a){
285 opus_int32 tmp; 285 opus_int32 tmp;
286 ops_count += 1; 286 ops_count += 1;
287 tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : \ 287 tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : \
@@ -289,7 +289,7 @@ static inline opus_int32 silk_SAT32(opus_int64 a){
289 return(tmp); 289 return(tmp);
290} 290}
291#undef silk_POS_SAT32 291#undef silk_POS_SAT32
292static inline opus_int32 silk_POS_SAT32(opus_int64 a){ 292static OPUS_INLINE opus_int32 silk_POS_SAT32(opus_int64 a){
293 opus_int32 tmp; 293 opus_int32 tmp;
294 ops_count += 1; 294 ops_count += 1;
295 tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : (a)); 295 tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : (a));
@@ -297,14 +297,14 @@ static inline opus_int32 silk_POS_SAT32(opus_int64 a){
297} 297}
298 298
299#undef silk_ADD_POS_SAT8 299#undef silk_ADD_POS_SAT8
300static inline opus_int8 silk_ADD_POS_SAT8(opus_int64 a, opus_int64 b){ 300static OPUS_INLINE opus_int8 silk_ADD_POS_SAT8(opus_int64 a, opus_int64 b){
301 opus_int8 tmp; 301 opus_int8 tmp;
302 ops_count += 1; 302 ops_count += 1;
303 tmp = (opus_int8)((((a)+(b)) & 0x80) ? silk_int8_MAX : ((a)+(b))); 303 tmp = (opus_int8)((((a)+(b)) & 0x80) ? silk_int8_MAX : ((a)+(b)));
304 return(tmp); 304 return(tmp);
305} 305}
306#undef silk_ADD_POS_SAT16 306#undef silk_ADD_POS_SAT16
307static inline opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){ 307static OPUS_INLINE opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){
308 opus_int16 tmp; 308 opus_int16 tmp;
309 ops_count += 1; 309 ops_count += 1;
310 tmp = (opus_int16)((((a)+(b)) & 0x8000) ? silk_int16_MAX : ((a)+(b))); 310 tmp = (opus_int16)((((a)+(b)) & 0x8000) ? silk_int16_MAX : ((a)+(b)));
@@ -312,7 +312,7 @@ static inline opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){
312} 312}
313 313
314#undef silk_ADD_POS_SAT32 314#undef silk_ADD_POS_SAT32
315static inline opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){ 315static OPUS_INLINE opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){
316 opus_int32 tmp; 316 opus_int32 tmp;
317 ops_count += 1; 317 ops_count += 1;
318 tmp = (opus_int32)((((a)+(b)) & 0x80000000) ? silk_int32_MAX : ((a)+(b))); 318 tmp = (opus_int32)((((a)+(b)) & 0x80000000) ? silk_int32_MAX : ((a)+(b)));
@@ -320,7 +320,7 @@ static inline opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){
320} 320}
321 321
322#undef silk_ADD_POS_SAT64 322#undef silk_ADD_POS_SAT64
323static inline opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){ 323static OPUS_INLINE opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){
324 opus_int64 tmp; 324 opus_int64 tmp;
325 ops_count += 1; 325 ops_count += 1;
326 tmp = ((((a)+(b)) & 0x8000000000000000LL) ? silk_int64_MAX : ((a)+(b))); 326 tmp = ((((a)+(b)) & 0x8000000000000000LL) ? silk_int64_MAX : ((a)+(b)));
@@ -328,40 +328,40 @@ static inline opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){
328} 328}
329 329
330#undef silk_LSHIFT8 330#undef silk_LSHIFT8
331static inline opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){ 331static OPUS_INLINE opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){
332 opus_int8 ret; 332 opus_int8 ret;
333 ops_count += 1; 333 ops_count += 1;
334 ret = a << shift; 334 ret = a << shift;
335 return ret; 335 return ret;
336} 336}
337#undef silk_LSHIFT16 337#undef silk_LSHIFT16
338static inline opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){ 338static OPUS_INLINE opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){
339 opus_int16 ret; 339 opus_int16 ret;
340 ops_count += 1; 340 ops_count += 1;
341 ret = a << shift; 341 ret = a << shift;
342 return ret; 342 return ret;
343} 343}
344#undef silk_LSHIFT32 344#undef silk_LSHIFT32
345static inline opus_int32 silk_LSHIFT32(opus_int32 a, opus_int32 shift){ 345static OPUS_INLINE opus_int32 silk_LSHIFT32(opus_int32 a, opus_int32 shift){
346 opus_int32 ret; 346 opus_int32 ret;
347 ops_count += 1; 347 ops_count += 1;
348 ret = a << shift; 348 ret = a << shift;
349 return ret; 349 return ret;
350} 350}
351#undef silk_LSHIFT64 351#undef silk_LSHIFT64
352static inline opus_int64 silk_LSHIFT64(opus_int64 a, opus_int shift){ 352static OPUS_INLINE opus_int64 silk_LSHIFT64(opus_int64 a, opus_int shift){
353 ops_count += 1; 353 ops_count += 1;
354 return a << shift; 354 return a << shift;
355} 355}
356 356
357#undef silk_LSHIFT_ovflw 357#undef silk_LSHIFT_ovflw
358static inline opus_int32 silk_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){ 358static OPUS_INLINE opus_int32 silk_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){
359 ops_count += 1; 359 ops_count += 1;
360 return a << shift; 360 return a << shift;
361} 361}
362 362
363#undef silk_LSHIFT_uint 363#undef silk_LSHIFT_uint
364static inline opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){ 364static OPUS_INLINE opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){
365 opus_uint32 ret; 365 opus_uint32 ret;
366 ops_count += 1; 366 ops_count += 1;
367 ret = a << shift; 367 ret = a << shift;
@@ -369,83 +369,83 @@ static inline opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){
369} 369}
370 370
371#undef silk_RSHIFT8 371#undef silk_RSHIFT8
372static inline opus_int8 silk_RSHIFT8(opus_int8 a, opus_int32 shift){ 372static OPUS_INLINE opus_int8 silk_RSHIFT8(opus_int8 a, opus_int32 shift){
373 ops_count += 1; 373 ops_count += 1;
374 return a >> shift; 374 return a >> shift;
375} 375}
376#undef silk_RSHIFT16 376#undef silk_RSHIFT16
377static inline opus_int16 silk_RSHIFT16(opus_int16 a, opus_int32 shift){ 377static OPUS_INLINE opus_int16 silk_RSHIFT16(opus_int16 a, opus_int32 shift){
378 ops_count += 1; 378 ops_count += 1;
379 return a >> shift; 379 return a >> shift;
380} 380}
381#undef silk_RSHIFT32 381#undef silk_RSHIFT32
382static inline opus_int32 silk_RSHIFT32(opus_int32 a, opus_int32 shift){ 382static OPUS_INLINE opus_int32 silk_RSHIFT32(opus_int32 a, opus_int32 shift){
383 ops_count += 1; 383 ops_count += 1;
384 return a >> shift; 384 return a >> shift;
385} 385}
386#undef silk_RSHIFT64 386#undef silk_RSHIFT64
387static inline opus_int64 silk_RSHIFT64(opus_int64 a, opus_int64 shift){ 387static OPUS_INLINE opus_int64 silk_RSHIFT64(opus_int64 a, opus_int64 shift){
388 ops_count += 1; 388 ops_count += 1;
389 return a >> shift; 389 return a >> shift;
390} 390}
391 391
392#undef silk_RSHIFT_uint 392#undef silk_RSHIFT_uint
393static inline opus_uint32 silk_RSHIFT_uint(opus_uint32 a, opus_int32 shift){ 393static OPUS_INLINE opus_uint32 silk_RSHIFT_uint(opus_uint32 a, opus_int32 shift){
394 ops_count += 1; 394 ops_count += 1;
395 return a >> shift; 395 return a >> shift;
396} 396}
397 397
398#undef silk_ADD_LSHIFT 398#undef silk_ADD_LSHIFT
399static inline opus_int32 silk_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ 399static OPUS_INLINE opus_int32 silk_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
400 opus_int32 ret; 400 opus_int32 ret;
401 ops_count += 1; 401 ops_count += 1;
402 ret = a + (b << shift); 402 ret = a + (b << shift);
403 return ret; /* shift >= 0*/ 403 return ret; /* shift >= 0*/
404} 404}
405#undef silk_ADD_LSHIFT32 405#undef silk_ADD_LSHIFT32
406static inline opus_int32 silk_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ 406static OPUS_INLINE opus_int32 silk_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
407 opus_int32 ret; 407 opus_int32 ret;
408 ops_count += 1; 408 ops_count += 1;
409 ret = a + (b << shift); 409 ret = a + (b << shift);
410 return ret; /* shift >= 0*/ 410 return ret; /* shift >= 0*/
411} 411}
412#undef silk_ADD_LSHIFT_uint 412#undef silk_ADD_LSHIFT_uint
413static inline opus_uint32 silk_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ 413static OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
414 opus_uint32 ret; 414 opus_uint32 ret;
415 ops_count += 1; 415 ops_count += 1;
416 ret = a + (b << shift); 416 ret = a + (b << shift);
417 return ret; /* shift >= 0*/ 417 return ret; /* shift >= 0*/
418} 418}
419#undef silk_ADD_RSHIFT 419#undef silk_ADD_RSHIFT
420static inline opus_int32 silk_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ 420static OPUS_INLINE opus_int32 silk_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
421 opus_int32 ret; 421 opus_int32 ret;
422 ops_count += 1; 422 ops_count += 1;
423 ret = a + (b >> shift); 423 ret = a + (b >> shift);
424 return ret; /* shift > 0*/ 424 return ret; /* shift > 0*/
425} 425}
426#undef silk_ADD_RSHIFT32 426#undef silk_ADD_RSHIFT32
427static inline opus_int32 silk_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ 427static OPUS_INLINE opus_int32 silk_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
428 opus_int32 ret; 428 opus_int32 ret;
429 ops_count += 1; 429 ops_count += 1;
430 ret = a + (b >> shift); 430 ret = a + (b >> shift);
431 return ret; /* shift > 0*/ 431 return ret; /* shift > 0*/
432} 432}
433#undef silk_ADD_RSHIFT_uint 433#undef silk_ADD_RSHIFT_uint
434static inline opus_uint32 silk_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ 434static OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
435 opus_uint32 ret; 435 opus_uint32 ret;
436 ops_count += 1; 436 ops_count += 1;
437 ret = a + (b >> shift); 437 ret = a + (b >> shift);
438 return ret; /* shift > 0*/ 438 return ret; /* shift > 0*/
439} 439}
440#undef silk_SUB_LSHIFT32 440#undef silk_SUB_LSHIFT32
441static inline opus_int32 silk_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ 441static OPUS_INLINE opus_int32 silk_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
442 opus_int32 ret; 442 opus_int32 ret;
443 ops_count += 1; 443 ops_count += 1;
444 ret = a - (b << shift); 444 ret = a - (b << shift);
445 return ret; /* shift >= 0*/ 445 return ret; /* shift >= 0*/
446} 446}
447#undef silk_SUB_RSHIFT32 447#undef silk_SUB_RSHIFT32
448static inline opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ 448static OPUS_INLINE opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
449 opus_int32 ret; 449 opus_int32 ret;
450 ops_count += 1; 450 ops_count += 1;
451 ret = a - (b >> shift); 451 ret = a - (b >> shift);
@@ -453,7 +453,7 @@ static inline opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int3
453} 453}
454 454
455#undef silk_RSHIFT_ROUND 455#undef silk_RSHIFT_ROUND
456static inline opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){ 456static OPUS_INLINE opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){
457 opus_int32 ret; 457 opus_int32 ret;
458 ops_count += 3; 458 ops_count += 3;
459 ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; 459 ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;
@@ -461,7 +461,7 @@ static inline opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){
461} 461}
462 462
463#undef silk_RSHIFT_ROUND64 463#undef silk_RSHIFT_ROUND64
464static inline opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){ 464static OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){
465 opus_int64 ret; 465 opus_int64 ret;
466 ops_count += 6; 466 ops_count += 6;
467 ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; 467 ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;
@@ -469,13 +469,13 @@ static inline opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){
469} 469}
470 470
471#undef silk_abs_int64 471#undef silk_abs_int64
472static inline opus_int64 silk_abs_int64(opus_int64 a){ 472static OPUS_INLINE opus_int64 silk_abs_int64(opus_int64 a){
473 ops_count += 1; 473 ops_count += 1;
474 return (((a) > 0) ? (a) : -(a)); /* Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN*/ 474 return (((a) > 0) ? (a) : -(a)); /* Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN*/
475} 475}
476 476
477#undef silk_abs_int32 477#undef silk_abs_int32
478static inline opus_int32 silk_abs_int32(opus_int32 a){ 478static OPUS_INLINE opus_int32 silk_abs_int32(opus_int32 a){
479 ops_count += 1; 479 ops_count += 1;
480 return silk_abs(a); 480 return silk_abs(a);
481} 481}
@@ -498,7 +498,7 @@ static silk_sign(a){
498} 498}
499 499
500#undef silk_ADD16 500#undef silk_ADD16
501static inline opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){ 501static OPUS_INLINE opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){
502 opus_int16 ret; 502 opus_int16 ret;
503 ops_count += 1; 503 ops_count += 1;
504 ret = a + b; 504 ret = a + b;
@@ -506,7 +506,7 @@ static inline opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){
506} 506}
507 507
508#undef silk_ADD32 508#undef silk_ADD32
509static inline opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){ 509static OPUS_INLINE opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){
510 opus_int32 ret; 510 opus_int32 ret;
511 ops_count += 1; 511 ops_count += 1;
512 ret = a + b; 512 ret = a + b;
@@ -514,7 +514,7 @@ static inline opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){
514} 514}
515 515
516#undef silk_ADD64 516#undef silk_ADD64
517static inline opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){ 517static OPUS_INLINE opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){
518 opus_int64 ret; 518 opus_int64 ret;
519 ops_count += 2; 519 ops_count += 2;
520 ret = a + b; 520 ret = a + b;
@@ -522,7 +522,7 @@ static inline opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){
522} 522}
523 523
524#undef silk_SUB16 524#undef silk_SUB16
525static inline opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){ 525static OPUS_INLINE opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){
526 opus_int16 ret; 526 opus_int16 ret;
527 ops_count += 1; 527 ops_count += 1;
528 ret = a - b; 528 ret = a - b;
@@ -530,7 +530,7 @@ static inline opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){
530} 530}
531 531
532#undef silk_SUB32 532#undef silk_SUB32
533static inline opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){ 533static OPUS_INLINE opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){
534 opus_int32 ret; 534 opus_int32 ret;
535 ops_count += 1; 535 ops_count += 1;
536 ret = a - b; 536 ret = a - b;
@@ -538,7 +538,7 @@ static inline opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){
538} 538}
539 539
540#undef silk_SUB64 540#undef silk_SUB64
541static inline opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){ 541static OPUS_INLINE opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){
542 opus_int64 ret; 542 opus_int64 ret;
543 ops_count += 2; 543 ops_count += 2;
544 ret = a - b; 544 ret = a - b;
@@ -546,7 +546,7 @@ static inline opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){
546} 546}
547 547
548#undef silk_ADD_SAT16 548#undef silk_ADD_SAT16
549static inline opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) { 549static OPUS_INLINE opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) {
550 opus_int16 res; 550 opus_int16 res;
551 /* Nb will be counted in AKP_add32 and silk_SAT16*/ 551 /* Nb will be counted in AKP_add32 and silk_SAT16*/
552 res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) ); 552 res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) );
@@ -554,7 +554,7 @@ static inline opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) {
554} 554}
555 555
556#undef silk_ADD_SAT32 556#undef silk_ADD_SAT32
557static inline opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){ 557static OPUS_INLINE opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){
558 opus_int32 res; 558 opus_int32 res;
559 ops_count += 1; 559 ops_count += 1;
560 res = ((((a32) + (b32)) & 0x80000000) == 0 ? \ 560 res = ((((a32) + (b32)) & 0x80000000) == 0 ? \
@@ -564,7 +564,7 @@ static inline opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){
564} 564}
565 565
566#undef silk_ADD_SAT64 566#undef silk_ADD_SAT64
567static inline opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) { 567static OPUS_INLINE opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) {
568 opus_int64 res; 568 opus_int64 res;
569 ops_count += 1; 569 ops_count += 1;
570 res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \ 570 res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \
@@ -574,7 +574,7 @@ static inline opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) {
574} 574}
575 575
576#undef silk_SUB_SAT16 576#undef silk_SUB_SAT16
577static inline opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) { 577static OPUS_INLINE opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) {
578 opus_int16 res; 578 opus_int16 res;
579 silk_assert(0); 579 silk_assert(0);
580 /* Nb will be counted in sub-macros*/ 580 /* Nb will be counted in sub-macros*/
@@ -583,7 +583,7 @@ static inline opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) {
583} 583}
584 584
585#undef silk_SUB_SAT32 585#undef silk_SUB_SAT32
586static inline opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) { 586static OPUS_INLINE opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) {
587 opus_int32 res; 587 opus_int32 res;
588 ops_count += 1; 588 ops_count += 1;
589 res = ((((a32)-(b32)) & 0x80000000) == 0 ? \ 589 res = ((((a32)-(b32)) & 0x80000000) == 0 ? \
@@ -593,7 +593,7 @@ static inline opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) {
593} 593}
594 594
595#undef silk_SUB_SAT64 595#undef silk_SUB_SAT64
596static inline opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) { 596static OPUS_INLINE opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) {
597 opus_int64 res; 597 opus_int64 res;
598 ops_count += 1; 598 ops_count += 1;
599 res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \ 599 res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \
@@ -604,7 +604,7 @@ static inline opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) {
604} 604}
605 605
606#undef silk_SMULWW 606#undef silk_SMULWW
607static inline opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){ 607static OPUS_INLINE opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){
608 opus_int32 ret; 608 opus_int32 ret;
609 /* Nb will be counted in sub-macros*/ 609 /* Nb will be counted in sub-macros*/
610 ret = silk_MLA(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16)); 610 ret = silk_MLA(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16));
@@ -612,7 +612,7 @@ static inline opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){
612} 612}
613 613
614#undef silk_SMLAWW 614#undef silk_SMLAWW
615static inline opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){ 615static OPUS_INLINE opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){
616 opus_int32 ret; 616 opus_int32 ret;
617 /* Nb will be counted in sub-macros*/ 617 /* Nb will be counted in sub-macros*/
618 ret = silk_MLA(silk_SMLAWB((a32), (b32), (c32)), (b32), silk_RSHIFT_ROUND((c32), 16)); 618 ret = silk_MLA(silk_SMLAWB((a32), (b32), (c32)), (b32), silk_RSHIFT_ROUND((c32), 16));
@@ -620,26 +620,26 @@ static inline opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32
620} 620}
621 621
622#undef silk_min_int 622#undef silk_min_int
623static inline opus_int silk_min_int(opus_int a, opus_int b) 623static OPUS_INLINE opus_int silk_min_int(opus_int a, opus_int b)
624{ 624{
625 ops_count += 1; 625 ops_count += 1;
626 return (((a) < (b)) ? (a) : (b)); 626 return (((a) < (b)) ? (a) : (b));
627} 627}
628 628
629#undef silk_min_16 629#undef silk_min_16
630static inline opus_int16 silk_min_16(opus_int16 a, opus_int16 b) 630static OPUS_INLINE opus_int16 silk_min_16(opus_int16 a, opus_int16 b)
631{ 631{
632 ops_count += 1; 632 ops_count += 1;
633 return (((a) < (b)) ? (a) : (b)); 633 return (((a) < (b)) ? (a) : (b));
634} 634}
635#undef silk_min_32 635#undef silk_min_32
636static inline opus_int32 silk_min_32(opus_int32 a, opus_int32 b) 636static OPUS_INLINE opus_int32 silk_min_32(opus_int32 a, opus_int32 b)
637{ 637{
638 ops_count += 1; 638 ops_count += 1;
639 return (((a) < (b)) ? (a) : (b)); 639 return (((a) < (b)) ? (a) : (b));
640} 640}
641#undef silk_min_64 641#undef silk_min_64
642static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b) 642static OPUS_INLINE opus_int64 silk_min_64(opus_int64 a, opus_int64 b)
643{ 643{
644 ops_count += 1; 644 ops_count += 1;
645 return (((a) < (b)) ? (a) : (b)); 645 return (((a) < (b)) ? (a) : (b));
@@ -647,26 +647,26 @@ static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b)
647 647
648/* silk_min() versions with typecast in the function call */ 648/* silk_min() versions with typecast in the function call */
649#undef silk_max_int 649#undef silk_max_int
650static inline opus_int silk_max_int(opus_int a, opus_int b) 650static OPUS_INLINE opus_int silk_max_int(opus_int a, opus_int b)
651{ 651{
652 ops_count += 1; 652 ops_count += 1;
653 return (((a) > (b)) ? (a) : (b)); 653 return (((a) > (b)) ? (a) : (b));
654} 654}
655#undef silk_max_16 655#undef silk_max_16
656static inline opus_int16 silk_max_16(opus_int16 a, opus_int16 b) 656static OPUS_INLINE opus_int16 silk_max_16(opus_int16 a, opus_int16 b)
657{ 657{
658 ops_count += 1; 658 ops_count += 1;
659 return (((a) > (b)) ? (a) : (b)); 659 return (((a) > (b)) ? (a) : (b));
660} 660}
661#undef silk_max_32 661#undef silk_max_32
662static inline opus_int32 silk_max_32(opus_int32 a, opus_int32 b) 662static OPUS_INLINE opus_int32 silk_max_32(opus_int32 a, opus_int32 b)
663{ 663{
664 ops_count += 1; 664 ops_count += 1;
665 return (((a) > (b)) ? (a) : (b)); 665 return (((a) > (b)) ? (a) : (b));
666} 666}
667 667
668#undef silk_max_64 668#undef silk_max_64
669static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) 669static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b)
670{ 670{
671 ops_count += 1; 671 ops_count += 1;
672 return (((a) > (b)) ? (a) : (b)); 672 return (((a) > (b)) ? (a) : (b));
@@ -674,7 +674,7 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b)
674 674
675 675
676#undef silk_LIMIT_int 676#undef silk_LIMIT_int
677static inline opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2) 677static OPUS_INLINE opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2)
678{ 678{
679 opus_int ret; 679 opus_int ret;
680 ops_count += 6; 680 ops_count += 6;
@@ -686,7 +686,7 @@ static inline opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limi
686} 686}
687 687
688#undef silk_LIMIT_16 688#undef silk_LIMIT_16
689static inline opus_int16 silk_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2) 689static OPUS_INLINE opus_int16 silk_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2)
690{ 690{
691 opus_int16 ret; 691 opus_int16 ret;
692 ops_count += 6; 692 ops_count += 6;
@@ -699,7 +699,7 @@ return(ret);
699 699
700 700
701#undef silk_LIMIT_32 701#undef silk_LIMIT_32
702static inline opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2) 702static OPUS_INLINE opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2)
703{ 703{
704 opus_int32 ret; 704 opus_int32 ret;
705 ops_count += 6; 705 ops_count += 6;