ref: 4dc0b3970568ff4cd484954333d3f800d8e4eeec
parent: 0b75940c0ad27dec38e7fd17cc312770d5c420e0
author: Jean-Marc Valin <[email protected]>
date: Mon Aug 15 07:24:37 EDT 2011
Replacing SPK_INLINE by static inline The config.h will take care of compat issues with "inline"
--- a/silk/fixed/silk_noise_shape_analysis_FIX.c
+++ b/silk/fixed/silk_noise_shape_analysis_FIX.c
@@ -34,7 +34,7 @@
/* Compute gain to make warped filter coefficients have a zero mean log frequency response on a */
/* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */
-SKP_INLINE opus_int32 warped_gain( // gain in Q16
+static inline opus_int32 warped_gain( // gain in Q16
const opus_int32 *coefs_Q24,
opus_int lambda_Q16,
opus_int order
@@ -53,7 +53,7 @@
/* Convert warped filter coefficients to monic pseudo-warped coefficients and limit maximum */
/* amplitude of monic warped coefficients by using bandwidth expansion on the true coefficients */
-SKP_INLINE void limit_warped_coefs(
+static inline void limit_warped_coefs(
opus_int32 *coefs_syn_Q24,
opus_int32 *coefs_ana_Q24,
opus_int lambda_Q16,
--- a/silk/fixed/silk_prefilter_FIX.c
+++ b/silk/fixed/silk_prefilter_FIX.c
@@ -33,7 +33,7 @@
#include "silk_tuning_parameters.h"
/* silk_prefilter. Prefilter for finding Quantizer input signal */
-SKP_INLINE void silk_prefilt_FIX(
+static inline void silk_prefilt_FIX(
silk_prefilter_state_FIX *P, /* I/O state */
opus_int32 st_res_Q12[], /* I short term residual signal */
opus_int16 xw[], /* O prefiltered signal */
@@ -152,7 +152,7 @@
}
/* silk_prefilter. Prefilter for finding Quantizer input signal */
-SKP_INLINE void silk_prefilt_FIX(
+static inline void silk_prefilt_FIX(
silk_prefilter_state_FIX *P, /* I/O state */
opus_int32 st_res_Q12[], /* I short term residual signal */
opus_int16 xw[], /* O prefiltered signal */
--- a/silk/fixed/silk_solve_LS_FIX.c
+++ b/silk/fixed/silk_solve_LS_FIX.c
@@ -42,7 +42,7 @@
} inv_D_t;
/* Factorize square matrix A into LDL form */
-SKP_INLINE void silk_LDL_factorize_FIX(
+static inline void silk_LDL_factorize_FIX(
opus_int32 *A, /* I/O Pointer to Symetric Square Matrix */
opus_int M, /* I Size of Matrix */
opus_int32 *L_Q16, /* I/O Pointer to Square Upper triangular Matrix */
@@ -50,7 +50,7 @@
);
/* Solve Lx = b, when L is lower triangular and has ones on the diagonal */
-SKP_INLINE void silk_LS_SolveFirst_FIX(
+static inline void silk_LS_SolveFirst_FIX(
const opus_int32 *L_Q16, /* I Pointer to Lower Triangular Matrix */
opus_int M, /* I Dim of Matrix equation */
const opus_int32 *b, /* I b Vector */
@@ -58,7 +58,7 @@
);
/* Solve L^t*x = b, where L is lower triangular with ones on the diagonal */
-SKP_INLINE void silk_LS_SolveLast_FIX(
+static inline void silk_LS_SolveLast_FIX(
const opus_int32 *L_Q16, /* I Pointer to Lower Triangular Matrix */
const opus_int M, /* I Dim of Matrix equation */
const opus_int32 *b, /* I b Vector */
@@ -65,7 +65,7 @@
opus_int32 *x_Q16 /* O x Vector */
);
-SKP_INLINE void silk_LS_divide_Q16_FIX(
+static inline void silk_LS_divide_Q16_FIX(
opus_int32 T[], /* I/O Numenator vector */
inv_D_t *inv_D, /* I 1 / D vector */
opus_int M /* I dimension */
@@ -109,7 +109,7 @@
silk_LS_SolveLast_FIX( L_Q16, M, Y, x_Q16 );
}
-SKP_INLINE void silk_LDL_factorize_FIX(
+static inline void silk_LDL_factorize_FIX(
opus_int32 *A, /* I Pointer to Symetric Square Matrix */
opus_int M, /* I Size of Matrix */
opus_int32 *L_Q16, /* I/O Pointer to Square Upper triangular Matrix */
@@ -181,7 +181,7 @@
SKP_assert( status == 0 );
}
-SKP_INLINE void silk_LS_divide_Q16_FIX(
+static inline void silk_LS_divide_Q16_FIX(
opus_int32 T[], /* I/O Numenator vector */
inv_D_t *inv_D, /* I 1 / D vector */
opus_int M /* I Order */
@@ -201,7 +201,7 @@
}
/* Solve Lx = b, when L is lower triangular and has ones on the diagonal */
-SKP_INLINE void silk_LS_SolveFirst_FIX(
+static inline void silk_LS_SolveFirst_FIX(
const opus_int32 *L_Q16, /* I Pointer to Lower Triangular Matrix */
opus_int M, /* I Dim of Matrix equation */
const opus_int32 *b, /* I b Vector */
@@ -223,7 +223,7 @@
}
/* Solve L^t*x = b, where L is lower triangular with ones on the diagonal */
-SKP_INLINE void silk_LS_SolveLast_FIX(
+static inline void silk_LS_SolveLast_FIX(
const opus_int32 *L_Q16, /* I Pointer to Lower Triangular Matrix */
const opus_int M, /* I Dim of Matrix equation */
const opus_int32 *b, /* I b Vector */
--- a/silk/float/silk_SigProc_FLP.h
+++ b/silk/float/silk_SigProc_FLP.h
@@ -161,13 +161,13 @@
: ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))))
/* sigmoid function */
-SKP_INLINE SKP_float SKP_sigmoid(SKP_float x)
+static inline SKP_float SKP_sigmoid(SKP_float x)
{
return (SKP_float)(1.0 / (1.0 + exp(-x)));
}
/* floating-point to integer conversion (rounding) */
-SKP_INLINE opus_int32 SKP_float2int(double x)
+static inline opus_int32 SKP_float2int(double x)
{
#ifdef _WIN32
double t = x + 6755399441055744.0;
@@ -178,7 +178,7 @@
}
/* floating-point to integer conversion (rounding) */
-SKP_INLINE void SKP_float2short_array(
+static inline void SKP_float2short_array(
opus_int16 *out,
const SKP_float *in,
opus_int32 length
@@ -197,7 +197,7 @@
}
/* integer to floating-point conversion */
-SKP_INLINE void SKP_short2float_array(
+static inline void SKP_short2float_array(
SKP_float *out,
const opus_int16 *in,
opus_int32 length
@@ -210,7 +210,7 @@
}
/* using log2() helps the fixed-point conversion */
-SKP_INLINE SKP_float silk_log2( double x ) { return ( SKP_float )( 3.32192809488736 * log10( x ) ); }
+static inline SKP_float silk_log2( double x ) { return ( SKP_float )( 3.32192809488736 * log10( x ) ); }
#ifdef __cplusplus
}
--- a/silk/float/silk_noise_shape_analysis_FLP.c
+++ b/silk/float/silk_noise_shape_analysis_FLP.c
@@ -34,7 +34,7 @@
/* Compute gain to make warped filter coefficients have a zero mean log frequency response on a */
/* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */
-SKP_INLINE SKP_float warped_gain(
+static inline SKP_float warped_gain(
const SKP_float *coefs,
SKP_float lambda,
opus_int order
@@ -52,7 +52,7 @@
/* Convert warped filter coefficients to monic pseudo-warped coefficients and limit maximum */
/* amplitude of monic warped coefficients by using bandwidth expansion on the true coefficients */
-SKP_INLINE void warped_true2monic_coefs(
+static inline void warped_true2monic_coefs(
SKP_float *coefs_syn,
SKP_float *coefs_ana,
SKP_float lambda,
--- a/silk/float/silk_prefilter_FLP.c
+++ b/silk/float/silk_prefilter_FLP.c
@@ -35,7 +35,7 @@
/*
* silk_prefilter. Prefilter for finding Quantizer input signal
*/
-SKP_INLINE void silk_prefilt_FLP(
+static inline void silk_prefilt_FLP(
silk_prefilter_state_FLP *P,/* I/O state */
SKP_float st_res[], /* I */
SKP_float xw[], /* O */
@@ -153,7 +153,7 @@
/*
* Prefilter for finding Quantizer input signal
*/
-SKP_INLINE void silk_prefilt_FLP(
+static inline void silk_prefilt_FLP(
silk_prefilter_state_FLP *P,/* I/O state */
SKP_float st_res[], /* I */
SKP_float xw[], /* O */
--- a/silk/silk_A2NLSF.c
+++ b/silk/silk_A2NLSF.c
@@ -48,7 +48,7 @@
/* Helper function for A2NLSF(..) */
/* Transforms polynomials from cos(n*f) to cos(f)^n */
-SKP_INLINE void silk_A2NLSF_trans_poly(
+static inline void silk_A2NLSF_trans_poly(
opus_int32 *p, /* I/O Polynomial */
const opus_int dd /* I Polynomial order (= filter order / 2 ) */
)
@@ -64,7 +64,7 @@
}
/* Helper function for A2NLSF(..) */
/* Polynomial evaluation */
-SKP_INLINE opus_int32 silk_A2NLSF_eval_poly( /* return the polynomial evaluation, in QPoly */
+static inline opus_int32 silk_A2NLSF_eval_poly( /* return the polynomial evaluation, in QPoly */
opus_int32 *p, /* I Polynomial, QPoly */
const opus_int32 x, /* I Evaluation point, Q12 */
const opus_int dd /* I Order */
@@ -81,7 +81,7 @@
return y32;
}
-SKP_INLINE void silk_A2NLSF_init(
+static inline void silk_A2NLSF_init(
const opus_int32 *a_Q16,
opus_int32 *P,
opus_int32 *Q,
--- a/silk/silk_CNG.c
+++ b/silk/silk_CNG.c
@@ -32,7 +32,7 @@
#include "silk_main.h"
/* Generates excitation for CNG LPC synthesis */
-SKP_INLINE void silk_CNG_exc(
+static inline void silk_CNG_exc(
opus_int32 residual_Q10[], /* O CNG residual signal Q10 */
opus_int32 exc_buf_Q10[], /* I Random samples buffer Q10 */
opus_int32 Gain_Q16, /* I Gain to apply */
--- a/silk/silk_Inlines.h
+++ b/silk/silk_Inlines.h
@@ -38,7 +38,7 @@
#endif
/* count leading zeros of opus_int64 */
-SKP_INLINE opus_int32 silk_CLZ64(opus_int64 in)
+static inline opus_int32 silk_CLZ64(opus_int64 in)
{
opus_int32 in_upper;
@@ -53,7 +53,7 @@
}
/* get number of leading zeros and fractional part (the bits right after the leading one */
-SKP_INLINE void silk_CLZ_FRAC(opus_int32 in, /* I: input */
+static inline void silk_CLZ_FRAC(opus_int32 in, /* I: input */
opus_int32 *lz, /* O: number of leading zeros */
opus_int32 *frac_Q7) /* O: the 7 bits right after the leading one */
{
@@ -66,7 +66,7 @@
/* Approximation of square root */
/* Accuracy: < +/- 10% for output values > 15 */
/* < +/- 2.5% for output values > 120 */
-SKP_INLINE opus_int32 silk_SQRT_APPROX(opus_int32 x)
+static inline opus_int32 silk_SQRT_APPROX(opus_int32 x)
{
opus_int32 y, lz, frac_Q7;
@@ -92,7 +92,7 @@
}
/* Divide two int32 values and return result as int32 in a given Q-domain */
-SKP_INLINE opus_int32 silk_DIV32_varQ( /* O returns a good approximation of "(a32 << Qres) / b32" */
+static inline opus_int32 silk_DIV32_varQ( /* O returns a good approximation of "(a32 << Qres) / b32" */
const opus_int32 a32, /* I numerator (Q0) */
const opus_int32 b32, /* I denominator (Q0) */
const opus_int Qres /* I Q-domain of result (>= 0) */
@@ -137,7 +137,7 @@
}
/* Invert int32 value and return result as int32 in a given Q-domain */
-SKP_INLINE opus_int32 silk_INVERSE32_varQ( /* O returns a good approximation of "(1 << Qres) / b32" */
+static inline opus_int32 silk_INVERSE32_varQ( /* O returns a good approximation of "(1 << Qres) / b32" */
const opus_int32 b32, /* I denominator (Q0) */
const opus_int Qres /* I Q-domain of result (> 0) */
)
--- a/silk/silk_LP_variable_cutoff.c
+++ b/silk/silk_LP_variable_cutoff.c
@@ -39,7 +39,7 @@
#include "silk_main.h"
/* Helper function, interpolates the filter taps */
-SKP_INLINE void silk_LP_interpolate_filter_taps(
+static inline void silk_LP_interpolate_filter_taps(
opus_int32 B_Q28[ TRANSITION_NB ],
opus_int32 A_Q28[ TRANSITION_NA ],
const opus_int ind,
--- a/silk/silk_MacroCount.h
+++ b/silk/silk_MacroCount.h
@@ -34,11 +34,11 @@
extern opus_int64 ops_count;
-SKP_INLINE opus_int64 SKP_SaveCount(){
+static inline opus_int64 SKP_SaveCount(){
return(ops_count);
}
-SKP_INLINE opus_int64 SKP_SaveResetCount(){
+static inline opus_int64 SKP_SaveResetCount(){
opus_int64 ret;
ret = ops_count;
@@ -46,12 +46,12 @@
return(ret);
}
-SKP_INLINE SKP_PrintCount(){
+static inline SKP_PrintCount(){
printf("ops_count = %d \n ", (opus_int32)ops_count);
}
#undef SKP_MUL
-SKP_INLINE opus_int32 SKP_MUL(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_MUL(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
ops_count += 4;
ret = a32 * b32;
@@ -59,7 +59,7 @@
}
#undef SKP_MUL_uint
-SKP_INLINE opus_uint32 SKP_MUL_uint(opus_uint32 a32, opus_uint32 b32){
+static inline opus_uint32 SKP_MUL_uint(opus_uint32 a32, opus_uint32 b32){
opus_uint32 ret;
ops_count += 4;
ret = a32 * b32;
@@ -66,7 +66,7 @@
return ret;
}
#undef SKP_MLA
-SKP_INLINE opus_int32 SKP_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ops_count += 4;
ret = a32 + b32 * c32;
@@ -74,7 +74,7 @@
}
#undef SKP_MLA_uint
-SKP_INLINE opus_int32 SKP_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){
+static inline opus_int32 SKP_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){
opus_uint32 ret;
ops_count += 4;
ret = a32 + b32 * c32;
@@ -82,7 +82,7 @@
}
#undef SKP_SMULWB
-SKP_INLINE opus_int32 SKP_SMULWB(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_SMULWB(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
ops_count += 5;
ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16);
@@ -89,7 +89,7 @@
return ret;
}
#undef SKP_SMLAWB
-SKP_INLINE opus_int32 SKP_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ops_count += 5;
ret = ((a32) + ((((b32) >> 16) * (opus_int32)((opus_int16)(c32))) + ((((b32) & 0x0000FFFF) * (opus_int32)((opus_int16)(c32))) >> 16)));
@@ -97,7 +97,7 @@
}
#undef SKP_SMULWT
-SKP_INLINE opus_int32 SKP_SMULWT(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_SMULWT(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
ops_count += 4;
ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16);
@@ -104,7 +104,7 @@
return ret;
}
#undef SKP_SMLAWT
-SKP_INLINE opus_int32 SKP_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ops_count += 4;
ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16));
@@ -112,7 +112,7 @@
}
#undef SKP_SMULBB
-SKP_INLINE opus_int32 SKP_SMULBB(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_SMULBB(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
ops_count += 1;
ret = (opus_int32)((opus_int16)a32) * (opus_int32)((opus_int16)b32);
@@ -119,7 +119,7 @@
return ret;
}
#undef SKP_SMLABB
-SKP_INLINE opus_int32 SKP_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ops_count += 1;
ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32);
@@ -127,7 +127,7 @@
}
#undef SKP_SMULBT
-SKP_INLINE opus_int32 SKP_SMULBT(opus_int32 a32, opus_int32 b32 ){
+static inline opus_int32 SKP_SMULBT(opus_int32 a32, opus_int32 b32 ){
opus_int32 ret;
ops_count += 4;
ret = ((opus_int32)((opus_int16)a32)) * (b32 >> 16);
@@ -135,7 +135,7 @@
}
#undef SKP_SMLABT
-SKP_INLINE opus_int32 SKP_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ops_count += 1;
ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16);
@@ -143,7 +143,7 @@
}
#undef SKP_SMULTT
-SKP_INLINE opus_int32 SKP_SMULTT(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_SMULTT(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
ops_count += 1;
ret = (a32 >> 16) * (b32 >> 16);
@@ -151,7 +151,7 @@
}
#undef SKP_SMLATT
-SKP_INLINE opus_int32 SKP_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ops_count += 1;
ret = a32 + (b32 >> 16) * (c32 >> 16);
@@ -179,7 +179,7 @@
#define SKP_SMLAWT_ovflw SKP_SMLAWT
#undef SKP_SMULL
-SKP_INLINE opus_int64 SKP_SMULL(opus_int32 a32, opus_int32 b32){
+static inline opus_int64 SKP_SMULL(opus_int32 a32, opus_int32 b32){
opus_int64 ret;
ops_count += 8;
ret = ((opus_int64)(a32) * /*(opus_int64)*/(b32));
@@ -187,7 +187,7 @@
}
#undef SKP_SMLAL
-SKP_INLINE opus_int64 SKP_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){
+static inline opus_int64 SKP_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){
opus_int64 ret;
ops_count += 8;
ret = a64 + ((opus_int64)(b32) * /*(opus_int64)*/(c32));
@@ -194,7 +194,7 @@
return ret;
}
#undef SKP_SMLALBB
-SKP_INLINE opus_int64 SKP_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){
+static inline opus_int64 SKP_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){
opus_int64 ret;
ops_count += 4;
ret = a64 + ((opus_int64)(b16) * /*(opus_int64)*/(c16));
@@ -202,7 +202,7 @@
}
#undef SigProcFIX_CLZ16
-SKP_INLINE opus_int32 SigProcFIX_CLZ16(opus_int16 in16)
+static inline opus_int32 SigProcFIX_CLZ16(opus_int16 in16)
{
opus_int32 out32 = 0;
ops_count += 10;
@@ -240,7 +240,7 @@
}
#undef SigProcFIX_CLZ32
-SKP_INLINE opus_int32 SigProcFIX_CLZ32(opus_int32 in32)
+static inline opus_int32 SigProcFIX_CLZ32(opus_int32 in32)
{
/* test highest 16 bits and convert to opus_int16 */
ops_count += 2;
@@ -252,19 +252,19 @@
}
#undef SKP_DIV32
-SKP_INLINE opus_int32 SKP_DIV32(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_DIV32(opus_int32 a32, opus_int32 b32){
ops_count += 64;
return a32 / b32;
}
#undef SKP_DIV32_16
-SKP_INLINE opus_int32 SKP_DIV32_16(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_DIV32_16(opus_int32 a32, opus_int32 b32){
ops_count += 32;
return a32 / b32;
}
#undef SKP_SAT8
-SKP_INLINE opus_int8 SKP_SAT8(opus_int64 a){
+static inline opus_int8 SKP_SAT8(opus_int64 a){
opus_int8 tmp;
ops_count += 1;
tmp = (opus_int8)((a) > SKP_int8_MAX ? SKP_int8_MAX : \
@@ -273,7 +273,7 @@
}
#undef SKP_SAT16
-SKP_INLINE opus_int16 SKP_SAT16(opus_int64 a){
+static inline opus_int16 SKP_SAT16(opus_int64 a){
opus_int16 tmp;
ops_count += 1;
tmp = (opus_int16)((a) > SKP_int16_MAX ? SKP_int16_MAX : \
@@ -281,7 +281,7 @@
return(tmp);
}
#undef SKP_SAT32
-SKP_INLINE opus_int32 SKP_SAT32(opus_int64 a){
+static inline opus_int32 SKP_SAT32(opus_int64 a){
opus_int32 tmp;
ops_count += 1;
tmp = (opus_int32)((a) > SKP_int32_MAX ? SKP_int32_MAX : \
@@ -289,7 +289,7 @@
return(tmp);
}
#undef SKP_POS_SAT32
-SKP_INLINE opus_int32 SKP_POS_SAT32(opus_int64 a){
+static inline opus_int32 SKP_POS_SAT32(opus_int64 a){
opus_int32 tmp;
ops_count += 1;
tmp = (opus_int32)((a) > SKP_int32_MAX ? SKP_int32_MAX : (a));
@@ -297,7 +297,7 @@
}
#undef SKP_ADD_POS_SAT8
-SKP_INLINE opus_int8 SKP_ADD_POS_SAT8(opus_int64 a, opus_int64 b){
+static inline opus_int8 SKP_ADD_POS_SAT8(opus_int64 a, opus_int64 b){
opus_int8 tmp;
ops_count += 1;
tmp = (opus_int8)((((a)+(b)) & 0x80) ? SKP_int8_MAX : ((a)+(b)));
@@ -304,7 +304,7 @@
return(tmp);
}
#undef SKP_ADD_POS_SAT16
-SKP_INLINE opus_int16 SKP_ADD_POS_SAT16(opus_int64 a, opus_int64 b){
+static inline opus_int16 SKP_ADD_POS_SAT16(opus_int64 a, opus_int64 b){
opus_int16 tmp;
ops_count += 1;
tmp = (opus_int16)((((a)+(b)) & 0x8000) ? SKP_int16_MAX : ((a)+(b)));
@@ -312,7 +312,7 @@
}
#undef SKP_ADD_POS_SAT32
-SKP_INLINE opus_int32 SKP_ADD_POS_SAT32(opus_int64 a, opus_int64 b){
+static inline opus_int32 SKP_ADD_POS_SAT32(opus_int64 a, opus_int64 b){
opus_int32 tmp;
ops_count += 1;
tmp = (opus_int32)((((a)+(b)) & 0x80000000) ? SKP_int32_MAX : ((a)+(b)));
@@ -320,7 +320,7 @@
}
#undef SKP_ADD_POS_SAT64
-SKP_INLINE opus_int64 SKP_ADD_POS_SAT64(opus_int64 a, opus_int64 b){
+static inline opus_int64 SKP_ADD_POS_SAT64(opus_int64 a, opus_int64 b){
opus_int64 tmp;
ops_count += 1;
tmp = ((((a)+(b)) & 0x8000000000000000LL) ? SKP_int64_MAX : ((a)+(b)));
@@ -328,7 +328,7 @@
}
#undef SKP_LSHIFT8
-SKP_INLINE opus_int8 SKP_LSHIFT8(opus_int8 a, opus_int32 shift){
+static inline opus_int8 SKP_LSHIFT8(opus_int8 a, opus_int32 shift){
opus_int8 ret;
ops_count += 1;
ret = a << shift;
@@ -335,7 +335,7 @@
return ret;
}
#undef SKP_LSHIFT16
-SKP_INLINE opus_int16 SKP_LSHIFT16(opus_int16 a, opus_int32 shift){
+static inline opus_int16 SKP_LSHIFT16(opus_int16 a, opus_int32 shift){
opus_int16 ret;
ops_count += 1;
ret = a << shift;
@@ -342,7 +342,7 @@
return ret;
}
#undef SKP_LSHIFT32
-SKP_INLINE opus_int32 SKP_LSHIFT32(opus_int32 a, opus_int32 shift){
+static inline opus_int32 SKP_LSHIFT32(opus_int32 a, opus_int32 shift){
opus_int32 ret;
ops_count += 1;
ret = a << shift;
@@ -349,19 +349,19 @@
return ret;
}
#undef SKP_LSHIFT64
-SKP_INLINE opus_int64 SKP_LSHIFT64(opus_int64 a, opus_int shift){
+static inline opus_int64 SKP_LSHIFT64(opus_int64 a, opus_int shift){
ops_count += 1;
return a << shift;
}
#undef SKP_LSHIFT_ovflw
-SKP_INLINE opus_int32 SKP_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){
+static inline opus_int32 SKP_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){
ops_count += 1;
return a << shift;
}
#undef SKP_LSHIFT_uint
-SKP_INLINE opus_uint32 SKP_LSHIFT_uint(opus_uint32 a, opus_int32 shift){
+static inline opus_uint32 SKP_LSHIFT_uint(opus_uint32 a, opus_int32 shift){
opus_uint32 ret;
ops_count += 1;
ret = a << shift;
@@ -369,34 +369,34 @@
}
#undef SKP_RSHIFT8
-SKP_INLINE opus_int8 SKP_RSHIFT8(opus_int8 a, opus_int32 shift){
+static inline opus_int8 SKP_RSHIFT8(opus_int8 a, opus_int32 shift){
ops_count += 1;
return a >> shift;
}
#undef SKP_RSHIFT16
-SKP_INLINE opus_int16 SKP_RSHIFT16(opus_int16 a, opus_int32 shift){
+static inline opus_int16 SKP_RSHIFT16(opus_int16 a, opus_int32 shift){
ops_count += 1;
return a >> shift;
}
#undef SKP_RSHIFT32
-SKP_INLINE opus_int32 SKP_RSHIFT32(opus_int32 a, opus_int32 shift){
+static inline opus_int32 SKP_RSHIFT32(opus_int32 a, opus_int32 shift){
ops_count += 1;
return a >> shift;
}
#undef SKP_RSHIFT64
-SKP_INLINE opus_int64 SKP_RSHIFT64(opus_int64 a, opus_int64 shift){
+static inline opus_int64 SKP_RSHIFT64(opus_int64 a, opus_int64 shift){
ops_count += 1;
return a >> shift;
}
#undef SKP_RSHIFT_uint
-SKP_INLINE opus_uint32 SKP_RSHIFT_uint(opus_uint32 a, opus_int32 shift){
+static inline opus_uint32 SKP_RSHIFT_uint(opus_uint32 a, opus_int32 shift){
ops_count += 1;
return a >> shift;
}
#undef SKP_ADD_LSHIFT
-SKP_INLINE opus_int32 SKP_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
ops_count += 1;
ret = a + (b << shift);
@@ -403,7 +403,7 @@
return ret; // shift >= 0
}
#undef SKP_ADD_LSHIFT32
-SKP_INLINE opus_int32 SKP_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
ops_count += 1;
ret = a + (b << shift);
@@ -410,7 +410,7 @@
return ret; // shift >= 0
}
#undef SKP_ADD_LSHIFT_uint
-SKP_INLINE opus_uint32 SKP_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
+static inline opus_uint32 SKP_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
opus_uint32 ret;
ops_count += 1;
ret = a + (b << shift);
@@ -417,7 +417,7 @@
return ret; // shift >= 0
}
#undef SKP_ADD_RSHIFT
-SKP_INLINE opus_int32 SKP_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
ops_count += 1;
ret = a + (b >> shift);
@@ -424,7 +424,7 @@
return ret; // shift > 0
}
#undef SKP_ADD_RSHIFT32
-SKP_INLINE opus_int32 SKP_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
ops_count += 1;
ret = a + (b >> shift);
@@ -431,7 +431,7 @@
return ret; // shift > 0
}
#undef SKP_ADD_RSHIFT_uint
-SKP_INLINE opus_uint32 SKP_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
+static inline opus_uint32 SKP_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
opus_uint32 ret;
ops_count += 1;
ret = a + (b >> shift);
@@ -438,7 +438,7 @@
return ret; // shift > 0
}
#undef SKP_SUB_LSHIFT32
-SKP_INLINE opus_int32 SKP_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
ops_count += 1;
ret = a - (b << shift);
@@ -445,7 +445,7 @@
return ret; // shift >= 0
}
#undef SKP_SUB_RSHIFT32
-SKP_INLINE opus_int32 SKP_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
ops_count += 1;
ret = a - (b >> shift);
@@ -453,7 +453,7 @@
}
#undef SKP_RSHIFT_ROUND
-SKP_INLINE opus_int32 SKP_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){
+static inline opus_int32 SKP_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){
opus_int32 ret;
ops_count += 3;
ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;
@@ -461,7 +461,7 @@
}
#undef SKP_RSHIFT_ROUND64
-SKP_INLINE opus_int64 SKP_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){
+static inline opus_int64 SKP_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){
opus_int64 ret;
ops_count += 6;
ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1;
@@ -469,13 +469,13 @@
}
#undef SKP_abs_int64
-SKP_INLINE opus_int64 SKP_abs_int64(opus_int64 a){
+static inline opus_int64 SKP_abs_int64(opus_int64 a){
ops_count += 1;
return (((a) > 0) ? (a) : -(a)); // Be careful, SKP_abs returns wrong when input equals to SKP_intXX_MIN
}
#undef SKP_abs_int32
-SKP_INLINE opus_int32 SKP_abs_int32(opus_int32 a){
+static inline opus_int32 SKP_abs_int32(opus_int32 a){
ops_count += 1;
return abs(a);
}
@@ -498,7 +498,7 @@
}
#undef SKP_ADD16
-SKP_INLINE opus_int16 SKP_ADD16(opus_int16 a, opus_int16 b){
+static inline opus_int16 SKP_ADD16(opus_int16 a, opus_int16 b){
opus_int16 ret;
ops_count += 1;
ret = a + b;
@@ -506,7 +506,7 @@
}
#undef SKP_ADD32
-SKP_INLINE opus_int32 SKP_ADD32(opus_int32 a, opus_int32 b){
+static inline opus_int32 SKP_ADD32(opus_int32 a, opus_int32 b){
opus_int32 ret;
ops_count += 1;
ret = a + b;
@@ -514,7 +514,7 @@
}
#undef SKP_ADD64
-SKP_INLINE opus_int64 SKP_ADD64(opus_int64 a, opus_int64 b){
+static inline opus_int64 SKP_ADD64(opus_int64 a, opus_int64 b){
opus_int64 ret;
ops_count += 2;
ret = a + b;
@@ -522,7 +522,7 @@
}
#undef SKP_SUB16
-SKP_INLINE opus_int16 SKP_SUB16(opus_int16 a, opus_int16 b){
+static inline opus_int16 SKP_SUB16(opus_int16 a, opus_int16 b){
opus_int16 ret;
ops_count += 1;
ret = a - b;
@@ -530,7 +530,7 @@
}
#undef SKP_SUB32
-SKP_INLINE opus_int32 SKP_SUB32(opus_int32 a, opus_int32 b){
+static inline opus_int32 SKP_SUB32(opus_int32 a, opus_int32 b){
opus_int32 ret;
ops_count += 1;
ret = a - b;
@@ -538,7 +538,7 @@
}
#undef SKP_SUB64
-SKP_INLINE opus_int64 SKP_SUB64(opus_int64 a, opus_int64 b){
+static inline opus_int64 SKP_SUB64(opus_int64 a, opus_int64 b){
opus_int64 ret;
ops_count += 2;
ret = a - b;
@@ -546,7 +546,7 @@
}
#undef SKP_ADD_SAT16
-SKP_INLINE opus_int16 SKP_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) {
+static inline opus_int16 SKP_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) {
opus_int16 res;
// Nb will be counted in AKP_add32 and SKP_SAT16
res = (opus_int16)SKP_SAT16( SKP_ADD32( (opus_int32)(a16), (b16) ) );
@@ -554,7 +554,7 @@
}
#undef SKP_ADD_SAT32
-SKP_INLINE opus_int32 SKP_ADD_SAT32(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_ADD_SAT32(opus_int32 a32, opus_int32 b32){
opus_int32 res;
ops_count += 1;
res = ((((a32) + (b32)) & 0x80000000) == 0 ? \
@@ -564,7 +564,7 @@
}
#undef SKP_ADD_SAT64
-SKP_INLINE opus_int64 SKP_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) {
+static inline opus_int64 SKP_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) {
opus_int64 res;
ops_count += 1;
res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \
@@ -574,7 +574,7 @@
}
#undef SKP_SUB_SAT16
-SKP_INLINE opus_int16 SKP_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) {
+static inline opus_int16 SKP_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) {
opus_int16 res;
SKP_assert(0);
// Nb will be counted in sub-macros
@@ -583,7 +583,7 @@
}
#undef SKP_SUB_SAT32
-SKP_INLINE opus_int32 SKP_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) {
+static inline opus_int32 SKP_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) {
opus_int32 res;
ops_count += 1;
res = ((((a32)-(b32)) & 0x80000000) == 0 ? \
@@ -593,7 +593,7 @@
}
#undef SKP_SUB_SAT64
-SKP_INLINE opus_int64 SKP_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) {
+static inline opus_int64 SKP_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) {
opus_int64 res;
ops_count += 1;
res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \
@@ -604,7 +604,7 @@
}
#undef SKP_SMULWW
-SKP_INLINE opus_int32 SKP_SMULWW(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_SMULWW(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
// Nb will be counted in sub-macros
ret = SKP_MLA(SKP_SMULWB((a32), (b32)), (a32), SKP_RSHIFT_ROUND((b32), 16));
@@ -612,7 +612,7 @@
}
#undef SKP_SMLAWW
-SKP_INLINE opus_int32 SKP_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
// Nb will be counted in sub-macros
ret = SKP_MLA(SKP_SMLAWB((a32), (b32), (c32)), (b32), SKP_RSHIFT_ROUND((c32), 16));
@@ -620,7 +620,7 @@
}
#undef SKP_min_int
-SKP_INLINE opus_int SKP_min_int(opus_int a, opus_int b)
+static inline opus_int SKP_min_int(opus_int a, opus_int b)
{
ops_count += 1;
return (((a) < (b)) ? (a) : (b));
@@ -627,19 +627,19 @@
}
#undef SKP_min_16
-SKP_INLINE opus_int16 SKP_min_16(opus_int16 a, opus_int16 b)
+static inline opus_int16 SKP_min_16(opus_int16 a, opus_int16 b)
{
ops_count += 1;
return (((a) < (b)) ? (a) : (b));
}
#undef SKP_min_32
-SKP_INLINE opus_int32 SKP_min_32(opus_int32 a, opus_int32 b)
+static inline opus_int32 SKP_min_32(opus_int32 a, opus_int32 b)
{
ops_count += 1;
return (((a) < (b)) ? (a) : (b));
}
#undef SKP_min_64
-SKP_INLINE opus_int64 SKP_min_64(opus_int64 a, opus_int64 b)
+static inline opus_int64 SKP_min_64(opus_int64 a, opus_int64 b)
{
ops_count += 1;
return (((a) < (b)) ? (a) : (b));
@@ -647,19 +647,19 @@
/* SKP_min() versions with typecast in the function call */
#undef SKP_max_int
-SKP_INLINE opus_int SKP_max_int(opus_int a, opus_int b)
+static inline opus_int SKP_max_int(opus_int a, opus_int b)
{
ops_count += 1;
return (((a) > (b)) ? (a) : (b));
}
#undef SKP_max_16
-SKP_INLINE opus_int16 SKP_max_16(opus_int16 a, opus_int16 b)
+static inline opus_int16 SKP_max_16(opus_int16 a, opus_int16 b)
{
ops_count += 1;
return (((a) > (b)) ? (a) : (b));
}
#undef SKP_max_32
-SKP_INLINE opus_int32 SKP_max_32(opus_int32 a, opus_int32 b)
+static inline opus_int32 SKP_max_32(opus_int32 a, opus_int32 b)
{
ops_count += 1;
return (((a) > (b)) ? (a) : (b));
@@ -666,7 +666,7 @@
}
#undef SKP_max_64
-SKP_INLINE opus_int64 SKP_max_64(opus_int64 a, opus_int64 b)
+static inline opus_int64 SKP_max_64(opus_int64 a, opus_int64 b)
{
ops_count += 1;
return (((a) > (b)) ? (a) : (b));
@@ -674,7 +674,7 @@
#undef SKP_LIMIT_int
-SKP_INLINE opus_int SKP_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2)
+static inline opus_int SKP_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2)
{
opus_int ret;
ops_count += 6;
@@ -686,7 +686,7 @@
}
#undef SKP_LIMIT_16
-SKP_INLINE opus_int16 SKP_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2)
+static inline opus_int16 SKP_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2)
{
opus_int16 ret;
ops_count += 6;
@@ -699,7 +699,7 @@
#undef SKP_LIMIT_32
-SKP_INLINE opus_int SKP_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2)
+static inline opus_int SKP_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2)
{
opus_int32 ret;
ops_count += 6;
--- a/silk/silk_MacroDebug.h
+++ b/silk/silk_MacroDebug.h
@@ -34,7 +34,7 @@
#if 0 && defined (_WIN32) && defined (_DEBUG) && !defined (SKP_MACRO_COUNT)
#undef SKP_ADD16
-SKP_INLINE opus_int16 SKP_ADD16(opus_int16 a, opus_int16 b){
+static inline opus_int16 SKP_ADD16(opus_int16 a, opus_int16 b){
opus_int16 ret;
ret = a + b;
@@ -43,7 +43,7 @@
}
#undef SKP_ADD32
-SKP_INLINE opus_int32 SKP_ADD32(opus_int32 a, opus_int32 b){
+static inline opus_int32 SKP_ADD32(opus_int32 a, opus_int32 b){
opus_int32 ret;
ret = a + b;
@@ -52,7 +52,7 @@
}
#undef SKP_ADD64
-SKP_INLINE opus_int64 SKP_ADD64(opus_int64 a, opus_int64 b){
+static inline opus_int64 SKP_ADD64(opus_int64 a, opus_int64 b){
opus_int64 ret;
ret = a + b;
@@ -61,7 +61,7 @@
}
#undef SKP_SUB16
-SKP_INLINE opus_int16 SKP_SUB16(opus_int16 a, opus_int16 b){
+static inline opus_int16 SKP_SUB16(opus_int16 a, opus_int16 b){
opus_int16 ret;
ret = a - b;
@@ -70,7 +70,7 @@
}
#undef SKP_SUB32
-SKP_INLINE opus_int32 SKP_SUB32(opus_int32 a, opus_int32 b){
+static inline opus_int32 SKP_SUB32(opus_int32 a, opus_int32 b){
opus_int32 ret;
ret = a - b;
@@ -79,7 +79,7 @@
}
#undef SKP_SUB64
-SKP_INLINE opus_int64 SKP_SUB64(opus_int64 a, opus_int64 b){
+static inline opus_int64 SKP_SUB64(opus_int64 a, opus_int64 b){
opus_int64 ret;
ret = a - b;
@@ -88,7 +88,7 @@
}
#undef SKP_ADD_SAT16
-SKP_INLINE opus_int16 SKP_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) {
+static inline opus_int16 SKP_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) {
opus_int16 res;
res = (opus_int16)SKP_SAT16( SKP_ADD32( (opus_int32)(a16), (b16) ) );
SKP_assert( res == SKP_SAT16( ( opus_int32 )a16 + ( opus_int32 )b16 ) );
@@ -96,7 +96,7 @@
}
#undef SKP_ADD_SAT32
-SKP_INLINE opus_int32 SKP_ADD_SAT32(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_ADD_SAT32(opus_int32 a32, opus_int32 b32){
opus_int32 res;
res = ((((a32) + (b32)) & 0x80000000) == 0 ? \
((((a32) & (b32)) & 0x80000000) != 0 ? SKP_int32_MIN : (a32)+(b32)) : \
@@ -106,7 +106,7 @@
}
#undef SKP_ADD_SAT64
-SKP_INLINE opus_int64 SKP_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) {
+static inline opus_int64 SKP_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) {
opus_int64 res;
res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \
((((a64) & (b64)) & 0x8000000000000000LL) != 0 ? SKP_int64_MIN : (a64)+(b64)) : \
@@ -123,7 +123,7 @@
}
#undef SKP_SUB_SAT16
-SKP_INLINE opus_int16 SKP_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) {
+static inline opus_int16 SKP_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) {
opus_int16 res;
res = (opus_int16)SKP_SAT16( SKP_SUB32( (opus_int32)(a16), (b16) ) );
SKP_assert( res == SKP_SAT16( ( opus_int32 )a16 - ( opus_int32 )b16 ) );
@@ -131,7 +131,7 @@
}
#undef SKP_SUB_SAT32
-SKP_INLINE opus_int32 SKP_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) {
+static inline opus_int32 SKP_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) {
opus_int32 res;
res = ((((a32)-(b32)) & 0x80000000) == 0 ? \
(( (a32) & ((b32)^0x80000000) & 0x80000000) ? SKP_int32_MIN : (a32)-(b32)) : \
@@ -141,7 +141,7 @@
}
#undef SKP_SUB_SAT64
-SKP_INLINE opus_int64 SKP_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) {
+static inline opus_int64 SKP_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) {
opus_int64 res;
res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \
(( (a64) & ((b64)^0x8000000000000000LL) & 0x8000000000000000LL) ? SKP_int64_MIN : (a64)-(b64)) : \
@@ -159,7 +159,7 @@
}
#undef SKP_MUL
-SKP_INLINE opus_int32 SKP_MUL(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_MUL(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
opus_int64 ret64; // Will easily show how many bits that are needed
ret = a32 * b32;
@@ -169,7 +169,7 @@
}
#undef SKP_MUL_uint
-SKP_INLINE opus_uint32 SKP_MUL_uint(opus_uint32 a32, opus_uint32 b32){
+static inline opus_uint32 SKP_MUL_uint(opus_uint32 a32, opus_uint32 b32){
opus_uint32 ret;
ret = a32 * b32;
SKP_assert((opus_uint64)ret == (opus_uint64)a32 * (opus_uint64)b32); //Check output overflow
@@ -176,7 +176,7 @@
return ret;
}
#undef SKP_MLA
-SKP_INLINE opus_int32 SKP_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ret = a32 + b32 * c32;
SKP_assert((opus_int64)ret == (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32); //Check output overflow
@@ -184,7 +184,7 @@
}
#undef SKP_MLA_uint
-SKP_INLINE opus_int32 SKP_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){
+static inline opus_int32 SKP_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){
opus_uint32 ret;
ret = a32 + b32 * c32;
SKP_assert((opus_int64)ret == (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32); //Check output overflow
@@ -192,7 +192,7 @@
}
#undef SKP_SMULWB
-SKP_INLINE opus_int32 SKP_SMULWB(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_SMULWB(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16);
SKP_assert((opus_int64)ret == ((opus_int64)a32 * (opus_int16)b32) >> 16);
@@ -199,7 +199,7 @@
return ret;
}
#undef SKP_SMLAWB
-SKP_INLINE opus_int32 SKP_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ret = SKP_ADD32( a32, SKP_SMULWB( b32, c32 ) );
SKP_assert(SKP_ADD32( a32, SKP_SMULWB( b32, c32 ) ) == SKP_ADD_SAT32( a32, SKP_SMULWB( b32, c32 ) ));
@@ -207,7 +207,7 @@
}
#undef SKP_SMULWT
-SKP_INLINE opus_int32 SKP_SMULWT(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_SMULWT(opus_int32 a32, opus_int32 b32){
opus_int32 ret;
ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16);
SKP_assert((opus_int64)ret == ((opus_int64)a32 * (b32 >> 16)) >> 16);
@@ -214,7 +214,7 @@
return ret;
}
#undef SKP_SMLAWT
-SKP_INLINE opus_int32 SKP_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16));
SKP_assert((opus_int64)ret == (opus_int64)a32 + (((opus_int64)b32 * (c32 >> 16)) >> 16));
@@ -222,7 +222,7 @@
}
#undef SKP_SMULL
-SKP_INLINE opus_int64 SKP_SMULL(opus_int64 a64, opus_int64 b64){
+static inline opus_int64 SKP_SMULL(opus_int64 a64, opus_int64 b64){
opus_int64 ret64;
ret64 = a64 * b64;
if( b64 != 0 ) {
@@ -235,7 +235,7 @@
// no checking needed for SKP_SMULBB
#undef SKP_SMLABB
-SKP_INLINE opus_int32 SKP_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32);
SKP_assert((opus_int64)ret == (opus_int64)a32 + (opus_int64)b32 * (opus_int16)c32);
@@ -244,7 +244,7 @@
// no checking needed for SKP_SMULBT
#undef SKP_SMLABT
-SKP_INLINE opus_int32 SKP_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16);
SKP_assert((opus_int64)ret == (opus_int64)a32 + (opus_int64)b32 * (c32 >> 16));
@@ -253,7 +253,7 @@
// no checking needed for SKP_SMULTT
#undef SKP_SMLATT
-SKP_INLINE opus_int32 SKP_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret;
ret = a32 + (b32 >> 16) * (c32 >> 16);
SKP_assert((opus_int64)ret == (opus_int64)a32 + (b32 >> 16) * (c32 >> 16));
@@ -261,7 +261,7 @@
}
#undef SKP_SMULWW
-SKP_INLINE opus_int32 SKP_SMULWW(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_SMULWW(opus_int32 a32, opus_int32 b32){
opus_int32 ret, tmp1, tmp2;
opus_int64 ret64;
@@ -282,7 +282,7 @@
}
#undef SKP_SMLAWW
-SKP_INLINE opus_int32 SKP_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){
+static inline opus_int32 SKP_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){
opus_int32 ret, tmp;
tmp = SKP_SMULWW( b32, c32 );
@@ -312,13 +312,13 @@
// no checking needed for SigProcFIX_CLZ32
#undef SKP_DIV32
-SKP_INLINE opus_int32 SKP_DIV32(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_DIV32(opus_int32 a32, opus_int32 b32){
SKP_assert( b32 != 0 );
return a32 / b32;
}
#undef SKP_DIV32_16
-SKP_INLINE opus_int32 SKP_DIV32_16(opus_int32 a32, opus_int32 b32){
+static inline opus_int32 SKP_DIV32_16(opus_int32 a32, opus_int32 b32){
SKP_assert( b32 != 0 );
SKP_assert( b32 <= SKP_int16_MAX );
SKP_assert( b32 >= SKP_int16_MIN );
@@ -334,7 +334,7 @@
// no checking needed for SKP_ADD_POS_SAT32
// no checking needed for SKP_ADD_POS_SAT64
#undef SKP_LSHIFT8
-SKP_INLINE opus_int8 SKP_LSHIFT8(opus_int8 a, opus_int32 shift){
+static inline opus_int8 SKP_LSHIFT8(opus_int8 a, opus_int32 shift){
opus_int8 ret;
ret = a << shift;
SKP_assert(shift >= 0);
@@ -343,7 +343,7 @@
return ret;
}
#undef SKP_LSHIFT16
-SKP_INLINE opus_int16 SKP_LSHIFT16(opus_int16 a, opus_int32 shift){
+static inline opus_int16 SKP_LSHIFT16(opus_int16 a, opus_int32 shift){
opus_int16 ret;
ret = a << shift;
SKP_assert(shift >= 0);
@@ -352,7 +352,7 @@
return ret;
}
#undef SKP_LSHIFT32
-SKP_INLINE opus_int32 SKP_LSHIFT32(opus_int32 a, opus_int32 shift){
+static inline opus_int32 SKP_LSHIFT32(opus_int32 a, opus_int32 shift){
opus_int32 ret;
ret = a << shift;
SKP_assert(shift >= 0);
@@ -361,7 +361,7 @@
return ret;
}
#undef SKP_LSHIFT64
-SKP_INLINE opus_int64 SKP_LSHIFT64(opus_int64 a, opus_int shift){
+static inline opus_int64 SKP_LSHIFT64(opus_int64 a, opus_int shift){
SKP_assert(shift >= 0);
SKP_assert(shift < 64);
return a << shift;
@@ -368,13 +368,13 @@
}
#undef SKP_LSHIFT_ovflw
-SKP_INLINE opus_int32 SKP_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){
+static inline opus_int32 SKP_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){
SKP_assert(shift >= 0); /* no check for overflow */
return a << shift;
}
#undef SKP_LSHIFT_uint
-SKP_INLINE opus_uint32 SKP_LSHIFT_uint(opus_uint32 a, opus_int32 shift){
+static inline opus_uint32 SKP_LSHIFT_uint(opus_uint32 a, opus_int32 shift){
opus_uint32 ret;
ret = a << shift;
SKP_assert(shift >= 0);
@@ -383,25 +383,25 @@
}
#undef SKP_RSHIFT8
-SKP_INLINE opus_int8 SKP_RSHIFT8(opus_int8 a, opus_int32 shift){
+static inline opus_int8 SKP_RSHIFT8(opus_int8 a, opus_int32 shift){
SKP_assert(shift >= 0);
SKP_assert(shift < 8);
return a >> shift;
}
#undef SKP_RSHIFT16
-SKP_INLINE opus_int16 SKP_RSHIFT16(opus_int16 a, opus_int32 shift){
+static inline opus_int16 SKP_RSHIFT16(opus_int16 a, opus_int32 shift){
SKP_assert(shift >= 0);
SKP_assert(shift < 16);
return a >> shift;
}
#undef SKP_RSHIFT32
-SKP_INLINE opus_int32 SKP_RSHIFT32(opus_int32 a, opus_int32 shift){
+static inline opus_int32 SKP_RSHIFT32(opus_int32 a, opus_int32 shift){
SKP_assert(shift >= 0);
SKP_assert(shift < 32);
return a >> shift;
}
#undef SKP_RSHIFT64
-SKP_INLINE opus_int64 SKP_RSHIFT64(opus_int64 a, opus_int64 shift){
+static inline opus_int64 SKP_RSHIFT64(opus_int64 a, opus_int64 shift){
SKP_assert(shift >= 0);
SKP_assert(shift <= 63);
return a >> shift;
@@ -408,7 +408,7 @@
}
#undef SKP_RSHIFT_uint
-SKP_INLINE opus_uint32 SKP_RSHIFT_uint(opus_uint32 a, opus_int32 shift){
+static inline opus_uint32 SKP_RSHIFT_uint(opus_uint32 a, opus_int32 shift){
SKP_assert(shift >= 0);
SKP_assert(shift <= 32);
return a >> shift;
@@ -415,7 +415,7 @@
}
#undef SKP_ADD_LSHIFT
-SKP_INLINE opus_int32 SKP_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
SKP_assert(shift >= 0);
SKP_assert(shift <= 31);
@@ -424,7 +424,7 @@
return ret; // shift >= 0
}
#undef SKP_ADD_LSHIFT32
-SKP_INLINE opus_int32 SKP_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
SKP_assert(shift >= 0);
SKP_assert(shift <= 31);
@@ -433,7 +433,7 @@
return ret; // shift >= 0
}
#undef SKP_ADD_LSHIFT_uint
-SKP_INLINE opus_uint32 SKP_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
+static inline opus_uint32 SKP_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
opus_uint32 ret;
SKP_assert(shift >= 0);
SKP_assert(shift <= 32);
@@ -442,7 +442,7 @@
return ret; // shift >= 0
}
#undef SKP_ADD_RSHIFT
-SKP_INLINE opus_int32 SKP_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
SKP_assert(shift >= 0);
SKP_assert(shift <= 31);
@@ -451,7 +451,7 @@
return ret; // shift > 0
}
#undef SKP_ADD_RSHIFT32
-SKP_INLINE opus_int32 SKP_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
SKP_assert(shift >= 0);
SKP_assert(shift <= 31);
@@ -460,7 +460,7 @@
return ret; // shift > 0
}
#undef SKP_ADD_RSHIFT_uint
-SKP_INLINE opus_uint32 SKP_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
+static inline opus_uint32 SKP_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){
opus_uint32 ret;
SKP_assert(shift >= 0);
SKP_assert(shift <= 32);
@@ -469,7 +469,7 @@
return ret; // shift > 0
}
#undef SKP_SUB_LSHIFT32
-SKP_INLINE opus_int32 SKP_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
SKP_assert(shift >= 0);
SKP_assert(shift <= 31);
@@ -478,7 +478,7 @@
return ret; // shift >= 0
}
#undef SKP_SUB_RSHIFT32
-SKP_INLINE opus_int32 SKP_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
+static inline opus_int32 SKP_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){
opus_int32 ret;
SKP_assert(shift >= 0);
SKP_assert(shift <= 31);
@@ -488,7 +488,7 @@
}
#undef SKP_RSHIFT_ROUND
-SKP_INLINE opus_int32 SKP_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){
+static inline opus_int32 SKP_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){
opus_int32 ret;
SKP_assert(shift > 0); /* the marco definition can't handle a shift of zero */
SKP_assert(shift < 32);
@@ -498,7 +498,7 @@
}
#undef SKP_RSHIFT_ROUND64
-SKP_INLINE opus_int64 SKP_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){
+static inline opus_int64 SKP_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){
opus_int64 ret;
SKP_assert(shift > 0); /* the marco definition can't handle a shift of zero */
SKP_assert(shift < 64);
@@ -508,25 +508,25 @@
// SKP_abs is used on floats also, so doesn't work...
//#undef SKP_abs
-//SKP_INLINE opus_int32 SKP_abs(opus_int32 a){
+//static inline opus_int32 SKP_abs(opus_int32 a){
// SKP_assert(a != 0x80000000);
// return (((a) > 0) ? (a) : -(a)); // Be careful, SKP_abs returns wrong when input equals to SKP_intXX_MIN
//}
#undef SKP_abs_int64
-SKP_INLINE opus_int64 SKP_abs_int64(opus_int64 a){
+static inline opus_int64 SKP_abs_int64(opus_int64 a){
SKP_assert(a != 0x8000000000000000);
return (((a) > 0) ? (a) : -(a)); // Be careful, SKP_abs returns wrong when input equals to SKP_intXX_MIN
}
#undef SKP_abs_int32
-SKP_INLINE opus_int32 SKP_abs_int32(opus_int32 a){
+static inline opus_int32 SKP_abs_int32(opus_int32 a){
SKP_assert(a != 0x80000000);
return abs(a);
}
#undef SKP_CHECK_FIT8
-SKP_INLINE opus_int8 SKP_CHECK_FIT8( opus_int64 a ){
+static inline opus_int8 SKP_CHECK_FIT8( opus_int64 a ){
opus_int8 ret;
ret = (opus_int8)a;
SKP_assert( (opus_int64)ret == a );
@@ -534,7 +534,7 @@
}
#undef SKP_CHECK_FIT16
-SKP_INLINE opus_int16 SKP_CHECK_FIT16( opus_int64 a ){
+static inline opus_int16 SKP_CHECK_FIT16( opus_int64 a ){
opus_int16 ret;
ret = (opus_int16)a;
SKP_assert( (opus_int64)ret == a );
@@ -542,7 +542,7 @@
}
#undef SKP_CHECK_FIT32
-SKP_INLINE opus_int32 SKP_CHECK_FIT32( opus_int64 a ){
+static inline opus_int32 SKP_CHECK_FIT32( opus_int64 a ){
opus_int32 ret;
ret = (opus_int32)a;
SKP_assert( (opus_int64)ret == a );
--- a/silk/silk_NLSF2A.c
+++ b/silk/silk_NLSF2A.c
@@ -41,7 +41,7 @@
#define QA 16
/* helper function for NLSF2A(..) */
-SKP_INLINE void silk_NLSF2A_find_poly(
+static inline void silk_NLSF2A_find_poly(
opus_int32 *out, /* O intermediate polynomial, QA [dd+1] */
const opus_int32 *cLSF, /* I vector of interleaved 2*cos(LSFs), QA [d] */
opus_int dd /* I polynomial order (= 1/2 * filter order) */
--- a/silk/silk_NSQ.c
+++ b/silk/silk_NSQ.c
@@ -31,7 +31,7 @@
#include "silk_main.h"
-SKP_INLINE void silk_nsq_scale_states(
+static inline void silk_nsq_scale_states(
const silk_encoder_state *psEncC, /* I Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
const opus_int16 x[], /* I input in Q0 */
@@ -44,7 +44,7 @@
const opus_int pitchL[ MAX_NB_SUBFR ] /* I */
);
-SKP_INLINE void silk_noise_shape_quantizer(
+static inline void silk_noise_shape_quantizer(
silk_nsq_state *NSQ, /* I/O NSQ state */
opus_int signalType, /* I Signal type */
const opus_int32 x_sc_Q10[], /* I */
@@ -169,7 +169,7 @@
/***********************************/
/* silk_noise_shape_quantizer */
/***********************************/
-SKP_INLINE void silk_noise_shape_quantizer(
+static inline void silk_noise_shape_quantizer(
silk_nsq_state *NSQ, /* I/O NSQ state */
opus_int signalType, /* I Signal type */
const opus_int32 x_sc_Q10[], /* I */
@@ -360,7 +360,7 @@
SKP_memcpy( NSQ->sLPC_Q14, &NSQ->sLPC_Q14[ length ], NSQ_LPC_BUF_LENGTH * sizeof( opus_int32 ) );
}
-SKP_INLINE void silk_nsq_scale_states(
+static inline void silk_nsq_scale_states(
const silk_encoder_state *psEncC, /* I Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
const opus_int16 x[], /* I input in Q0 */
--- a/silk/silk_NSQ_del_dec.c
+++ b/silk/silk_NSQ_del_dec.c
@@ -54,7 +54,7 @@
opus_int32 LPC_exc_Q16;
} NSQ_sample_struct;
-SKP_INLINE void silk_nsq_del_dec_scale_states(
+static inline void silk_nsq_del_dec_scale_states(
const silk_encoder_state *psEncC, /* I Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
NSQ_del_dec_struct psDelDec[], /* I/O Delayed decision states */
@@ -73,7 +73,7 @@
/******************************************/
/* Noise shape quantizer for one subframe */
/******************************************/
-SKP_INLINE void silk_noise_shape_quantizer_del_dec(
+static inline void silk_noise_shape_quantizer_del_dec(
silk_nsq_state *NSQ, /* I/O NSQ state */
NSQ_del_dec_struct psDelDec[], /* I/O Delayed decision states */
opus_int signalType, /* I Signal type */
@@ -296,7 +296,7 @@
/******************************************/
/* Noise shape quantizer for one subframe */
/******************************************/
-SKP_INLINE void silk_noise_shape_quantizer_del_dec(
+static inline void silk_noise_shape_quantizer_del_dec(
silk_nsq_state *NSQ, /* I/O NSQ state */
NSQ_del_dec_struct psDelDec[], /* I/O Delayed decision states */
opus_int signalType, /* I Signal type */
@@ -600,7 +600,7 @@
}
}
-SKP_INLINE void silk_nsq_del_dec_scale_states(
+static inline void silk_nsq_del_dec_scale_states(
const silk_encoder_state *psEncC, /* I Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
NSQ_del_dec_struct psDelDec[], /* I/O Delayed decision states */
--- a/silk/silk_SigProc_FIX.h
+++ b/silk/silk_SigProc_FIX.h
@@ -392,7 +392,7 @@
left. Output is 32bit int.
Note: contemporary compilers recognize the C expression below and
compile it into a 'ror' instruction if available. No need for inline ASM! */
-SKP_INLINE opus_int32 silk_ROR32( opus_int32 a32, opus_int rot )
+static inline opus_int32 silk_ROR32( opus_int32 a32, opus_int rot )
{
opus_uint32 x = (opus_uint32) a32;
opus_uint32 r = (opus_uint32) rot;
@@ -538,37 +538,37 @@
#define SILK_FIX_CONST( C, Q ) ((opus_int32)((C) * ((opus_int64)1 << (Q)) + 0.5))
/* SKP_min() versions with typecast in the function call */
-SKP_INLINE opus_int SKP_min_int(opus_int a, opus_int b)
+static inline opus_int SKP_min_int(opus_int a, opus_int b)
{
return (((a) < (b)) ? (a) : (b));
}
-SKP_INLINE opus_int16 SKP_min_16(opus_int16 a, opus_int16 b)
+static inline opus_int16 SKP_min_16(opus_int16 a, opus_int16 b)
{
return (((a) < (b)) ? (a) : (b));
}
-SKP_INLINE opus_int32 SKP_min_32(opus_int32 a, opus_int32 b)
+static inline opus_int32 SKP_min_32(opus_int32 a, opus_int32 b)
{
return (((a) < (b)) ? (a) : (b));
}
-SKP_INLINE opus_int64 SKP_min_64(opus_int64 a, opus_int64 b)
+static inline opus_int64 SKP_min_64(opus_int64 a, opus_int64 b)
{
return (((a) < (b)) ? (a) : (b));
}
/* SKP_min() versions with typecast in the function call */
-SKP_INLINE opus_int SKP_max_int(opus_int a, opus_int b)
+static inline opus_int SKP_max_int(opus_int a, opus_int b)
{
return (((a) > (b)) ? (a) : (b));
}
-SKP_INLINE opus_int16 SKP_max_16(opus_int16 a, opus_int16 b)
+static inline opus_int16 SKP_max_16(opus_int16 a, opus_int16 b)
{
return (((a) > (b)) ? (a) : (b));
}
-SKP_INLINE opus_int32 SKP_max_32(opus_int32 a, opus_int32 b)
+static inline opus_int32 SKP_max_32(opus_int32 a, opus_int32 b)
{
return (((a) > (b)) ? (a) : (b));
}
-SKP_INLINE opus_int64 SKP_max_64(opus_int64 a, opus_int64 b)
+static inline opus_int64 SKP_max_64(opus_int64 a, opus_int64 b)
{
return (((a) > (b)) ? (a) : (b));
}
--- a/silk/silk_control_codec.c
+++ b/silk/silk_control_codec.c
@@ -53,7 +53,7 @@
opus_int Complexity /* I */
);
-SKP_INLINE opus_int silk_setup_LBRR(
+static inline opus_int silk_setup_LBRR(
silk_encoder_state *psEncC, /* I/O */
const opus_int32 TargetRate_bps /* I */
);
@@ -393,7 +393,7 @@
return ret;
}
-SKP_INLINE opus_int silk_setup_LBRR(
+static inline opus_int silk_setup_LBRR(
silk_encoder_state *psEncC, /* I/O */
const opus_int32 TargetRate_bps /* I */
)
--- a/silk/silk_encode_pulses.c
+++ b/silk/silk_encode_pulses.c
@@ -35,7 +35,7 @@
/* Encode quantization indices of excitation */
/*********************************************/
-SKP_INLINE opus_int combine_and_check( /* return ok */
+static inline opus_int combine_and_check( /* return ok */
opus_int *pulses_comb, /* O */
const opus_int *pulses_in, /* I */
opus_int max_pulses, /* I max value for sum of pulses */
--- a/silk/silk_macros.h
+++ b/silk/silk_macros.h
@@ -72,7 +72,7 @@
(( (a) & ((b)^0x80000000) & 0x80000000) ? SKP_int32_MIN : (a)-(b)) : \
((((a)^0x80000000) & (b) & 0x80000000) ? SKP_int32_MAX : (a)-(b)) )
-SKP_INLINE opus_int32 silk_CLZ16(opus_int16 in16)
+static inline opus_int32 silk_CLZ16(opus_int16 in16)
{
opus_int32 out32 = 0;
if( in16 == 0 ) {
@@ -108,7 +108,7 @@
}
}
-SKP_INLINE opus_int32 silk_CLZ32(opus_int32 in32)
+static inline opus_int32 silk_CLZ32(opus_int32 in32)
{
/* test highest 16 bits and convert to opus_int16 */
if( in32 & 0xFFFF0000 ) {
--- a/silk/silk_resampler_private_IIR_FIR.c
+++ b/silk/silk_resampler_private_IIR_FIR.c
@@ -32,7 +32,7 @@
#include "silk_SigProc_FIX.h"
#include "silk_resampler_private.h"
-SKP_INLINE opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL(
+static inline opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL(
opus_int16 * out, opus_int16 * buf, opus_int32 max_index_Q16 , opus_int32 index_increment_Q16 ){
opus_int32 index_Q16, res_Q15;
opus_int16 *buf_ptr;
--- a/silk/silk_resampler_private_down_FIR.c
+++ b/silk/silk_resampler_private_down_FIR.c
@@ -32,7 +32,7 @@
#include "silk_SigProc_FIX.h"
#include "silk_resampler_private.h"
-SKP_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL0(
+static inline opus_int16 *silk_resampler_private_down_FIR_INTERPOL0(
opus_int16 *out, opus_int32 *buf2, const opus_int16 *FIR_Coefs, opus_int32 max_index_Q16, opus_int32 index_increment_Q16){
opus_int32 index_Q16, res_Q6;
@@ -57,7 +57,7 @@
return out;
}
-SKP_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL1(
+static inline opus_int16 *silk_resampler_private_down_FIR_INTERPOL1(
opus_int16 *out, opus_int32 *buf2, const opus_int16 *FIR_Coefs, opus_int32 max_index_Q16, opus_int32 index_increment_Q16, opus_int32 FIR_Fracs){
opus_int32 index_Q16, res_Q6;
--- a/silk/silk_shell_coder.c
+++ b/silk/silk_shell_coder.c
@@ -33,7 +33,7 @@
/* shell coder; pulse-subframe length is hardcoded */
-SKP_INLINE void combine_pulses(
+static inline void combine_pulses(
opus_int *out, /* O: combined pulses vector [len] */
const opus_int *in, /* I: input vector [2 * len] */
const opus_int len /* I: number of OUTPUT samples */
@@ -45,7 +45,7 @@
}
}
-SKP_INLINE void encode_split(
+static inline void encode_split(
ec_enc *psRangeEnc, /* I/O compressor data structure */
const opus_int p_child1, /* I: pulse amplitude of first child subframe */
const opus_int p, /* I: pulse amplitude of current subframe */
@@ -57,7 +57,7 @@
}
}
-SKP_INLINE void decode_split(
+static inline void decode_split(
opus_int *p_child1, /* O: pulse amplitude of first child subframe */
opus_int *p_child2, /* O: pulse amplitude of second child subframe */
ec_dec *psRangeDec, /* I/O Compressor data structure */
--- a/silk/silk_typedef.h
+++ b/silk/silk_typedef.h
@@ -49,8 +49,6 @@
# define SKP_float_MAX FLT_MAX
#endif
-#define SKP_INLINE static __inline
-
#ifdef _WIN32
# define SKP_STR_CASEINSENSITIVE_COMPARE(x, y) _stricmp(x, y)
#else