diff options
author | Gregory Maxwell <greg@xiph.org> | 2013-10-18 02:56:52 +0400 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2013-10-28 21:18:54 +0400 |
commit | 7830cf1bd2c71bad9aa296254cf5c5f9842e8b8e (patch) | |
tree | 53f28e34554bee867a239849b96283bec549a607 /silk/float | |
parent | 2891d852a38b3acb1810fad9f26ba7e0b181cfb2 (diff) |
Replace "inline" with OPUS_INLINE.
Newer versions of MSVC are unhappy with the strategy of the build
environment redefining "inline" (even though they don't support the
actual keyword). Instead we define OPUS_INLINE to the right thing
in opus_defines.h.
This is the same approach we use for restrict.
Diffstat (limited to 'silk/float')
-rw-r--r-- | silk/float/LPC_analysis_filter_FLP.c | 10 | ||||
-rw-r--r-- | silk/float/SigProc_FLP.h | 10 | ||||
-rw-r--r-- | silk/float/encode_frame_FLP.c | 4 | ||||
-rw-r--r-- | silk/float/noise_shape_analysis_FLP.c | 4 | ||||
-rw-r--r-- | silk/float/prefilter_FLP.c | 4 | ||||
-rw-r--r-- | silk/float/solve_LS_FLP.c | 12 |
6 files changed, 22 insertions, 22 deletions
diff --git a/silk/float/LPC_analysis_filter_FLP.c b/silk/float/LPC_analysis_filter_FLP.c index 3bb9244b..cae89a0a 100644 --- a/silk/float/LPC_analysis_filter_FLP.c +++ b/silk/float/LPC_analysis_filter_FLP.c @@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE. /************************************************/ /* 16th order LPC analysis filter, does not write first 16 samples */ -static inline void silk_LPC_analysis_filter16_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter16_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ @@ -78,7 +78,7 @@ static inline void silk_LPC_analysis_filter16_FLP( } /* 12th order LPC analysis filter, does not write first 12 samples */ -static inline void silk_LPC_analysis_filter12_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter12_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ @@ -112,7 +112,7 @@ static inline void silk_LPC_analysis_filter12_FLP( } /* 10th order LPC analysis filter, does not write first 10 samples */ -static inline void silk_LPC_analysis_filter10_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter10_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ @@ -144,7 +144,7 @@ static inline void silk_LPC_analysis_filter10_FLP( } /* 8th order LPC analysis filter, does not write first 8 samples */ -static inline void silk_LPC_analysis_filter8_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter8_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ @@ -174,7 +174,7 @@ static inline void silk_LPC_analysis_filter8_FLP( } /* 6th order LPC analysis filter, does not write first 6 samples */ -static inline void silk_LPC_analysis_filter6_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter6_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ diff --git a/silk/float/SigProc_FLP.h b/silk/float/SigProc_FLP.h index 2f5bb4cb..e7131f14 100644 --- a/silk/float/SigProc_FLP.h +++ b/silk/float/SigProc_FLP.h @@ -153,19 +153,19 @@ double silk_energy_FLP( #define silk_abs_float( a ) ((silk_float)fabs(a)) /* sigmoid function */ -static inline silk_float silk_sigmoid( silk_float x ) +static OPUS_INLINE silk_float silk_sigmoid( silk_float x ) { return (silk_float)(1.0 / (1.0 + exp(-x))); } /* floating-point to integer conversion (rounding) */ -static inline opus_int32 silk_float2int( silk_float x ) +static OPUS_INLINE opus_int32 silk_float2int( silk_float x ) { return (opus_int32)float2int( x ); } /* floating-point to integer conversion (rounding) */ -static inline void silk_float2short_array( +static OPUS_INLINE void silk_float2short_array( opus_int16 *out, const silk_float *in, opus_int32 length @@ -178,7 +178,7 @@ static inline void silk_float2short_array( } /* integer to floating-point conversion */ -static inline void silk_short2float_array( +static OPUS_INLINE void silk_short2float_array( silk_float *out, const opus_int16 *in, opus_int32 length @@ -191,7 +191,7 @@ static inline void silk_short2float_array( } /* using log2() helps the fixed-point conversion */ -static inline silk_float silk_log2( double x ) +static OPUS_INLINE silk_float silk_log2( double x ) { return ( silk_float )( 3.32192809488736 * log10( x ) ); } diff --git a/silk/float/encode_frame_FLP.c b/silk/float/encode_frame_FLP.c index 32216866..29bdc542 100644 --- a/silk/float/encode_frame_FLP.c +++ b/silk/float/encode_frame_FLP.c @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "tuning_parameters.h" /* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */ -static inline void silk_LBRR_encode_FLP( +static OPUS_INLINE void silk_LBRR_encode_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */ const silk_float xfw[], /* I Input signal */ @@ -316,7 +316,7 @@ opus_int silk_encode_frame_FLP( } /* Low-Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode excitation at lower bitrate */ -static inline void silk_LBRR_encode_FLP( +static OPUS_INLINE void silk_LBRR_encode_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */ const silk_float xfw[], /* I Input signal */ diff --git a/silk/float/noise_shape_analysis_FLP.c b/silk/float/noise_shape_analysis_FLP.c index e7c26fc0..65f6ea58 100644 --- a/silk/float/noise_shape_analysis_FLP.c +++ b/silk/float/noise_shape_analysis_FLP.c @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. /* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */ /* Note: A monic filter is one with the first coefficient equal to 1.0. In Silk we omit the first */ /* coefficient in an array of coefficients, for monic filters. */ -static inline silk_float warped_gain( +static OPUS_INLINE silk_float warped_gain( const silk_float *coefs, silk_float lambda, opus_int order @@ -54,7 +54,7 @@ static inline silk_float warped_gain( /* 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 */ -static inline void warped_true2monic_coefs( +static OPUS_INLINE void warped_true2monic_coefs( silk_float *coefs_syn, silk_float *coefs_ana, silk_float lambda, diff --git a/silk/float/prefilter_FLP.c b/silk/float/prefilter_FLP.c index a3f81c95..8bc32fb4 100644 --- a/silk/float/prefilter_FLP.c +++ b/silk/float/prefilter_FLP.c @@ -35,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. /* * Prefilter for finding Quantizer input signal */ -static inline void silk_prefilt_FLP( +static OPUS_INLINE void silk_prefilt_FLP( silk_prefilter_state_FLP *P, /* I/O state */ silk_float st_res[], /* I */ silk_float xw[], /* O */ @@ -153,7 +153,7 @@ void silk_prefilter_FLP( /* * Prefilter for finding Quantizer input signal */ -static inline void silk_prefilt_FLP( +static OPUS_INLINE void silk_prefilt_FLP( silk_prefilter_state_FLP *P, /* I/O state */ silk_float st_res[], /* I */ silk_float xw[], /* O */ diff --git a/silk/float/solve_LS_FLP.c b/silk/float/solve_LS_FLP.c index 0eda65a4..7c90d665 100644 --- a/silk/float/solve_LS_FLP.c +++ b/silk/float/solve_LS_FLP.c @@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE. * Matrix D (only the diagonal elements returned in a vector)such that * the symmetric matric A is given by A = L*D*L'. **********************************************************************/ -static inline void silk_LDL_FLP( +static OPUS_INLINE void silk_LDL_FLP( silk_float *A, /* I/O Pointer to Symetric Square Matrix */ opus_int M, /* I Size of Matrix */ silk_float *L, /* I/O Pointer to Square Upper triangular Matrix */ @@ -48,7 +48,7 @@ static inline void silk_LDL_FLP( * Function to solve linear equation Ax = b, when A is a MxM lower * triangular matrix, with ones on the diagonal. **********************************************************************/ -static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP( +static OPUS_INLINE void silk_SolveWithLowerTriangularWdiagOnes_FLP( const silk_float *L, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const silk_float *b, /* I b Vector */ @@ -59,7 +59,7 @@ static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP( * Function to solve linear equation (A^T)x = b, when A is a MxM lower * triangular, with ones on the diagonal. (ie then A^T is upper triangular) **********************************************************************/ -static inline void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( +static OPUS_INLINE void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( const silk_float *L, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const silk_float *b, /* I b Vector */ @@ -109,7 +109,7 @@ void silk_solve_LDL_FLP( silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( &L[ 0 ][ 0 ], M, T, x ); } -static inline void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( +static OPUS_INLINE void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( const silk_float *L, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const silk_float *b, /* I b Vector */ @@ -131,7 +131,7 @@ static inline void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( } } -static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP( +static OPUS_INLINE void silk_SolveWithLowerTriangularWdiagOnes_FLP( const silk_float *L, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const silk_float *b, /* I b Vector */ @@ -153,7 +153,7 @@ static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP( } } -static inline void silk_LDL_FLP( +static OPUS_INLINE void silk_LDL_FLP( silk_float *A, /* I/O Pointer to Symetric Square Matrix */ opus_int M, /* I Size of Matrix */ silk_float *L, /* I/O Pointer to Square Upper triangular Matrix */ |