Renamed SKP_[u]int* to opus_[u]int*
[opus.git] / silk / fixed / silk_prefilter_FIX.c
index 44e6034..368aeda 100644 (file)
@@ -31,27 +31,27 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 /* silk_prefilter. Prefilter for finding Quantizer input signal */\r
 SKP_INLINE void silk_prefilt_FIX(\r
     silk_prefilter_state_FIX *P,                    /* I/O state                          */\r
-    SKP_int32   st_res_Q12[],                           /* I short term residual signal       */\r
-    SKP_int16   xw[],                                   /* O prefiltered signal               */\r
-    SKP_int32   HarmShapeFIRPacked_Q12,                 /* I Harmonic shaping coeficients     */\r
-    SKP_int     Tilt_Q14,                               /* I Tilt shaping coeficient          */\r
-    SKP_int32   LF_shp_Q14,                             /* I Low-frequancy shaping coeficients*/\r
-    SKP_int     lag,                                    /* I Lag for harmonic shaping         */\r
-    SKP_int     length                                  /* I Length of signals                */\r
+    opus_int32   st_res_Q12[],                           /* I short term residual signal       */\r
+    opus_int16   xw[],                                   /* O prefiltered signal               */\r
+    opus_int32   HarmShapeFIRPacked_Q12,                 /* I Harmonic shaping coeficients     */\r
+    opus_int     Tilt_Q14,                               /* I Tilt shaping coeficient          */\r
+    opus_int32   LF_shp_Q14,                             /* I Low-frequancy shaping coeficients*/\r
+    opus_int     lag,                                    /* I Lag for harmonic shaping         */\r
+    opus_int     length                                  /* I Length of signals                */\r
 );\r
 \r
 void silk_warped_LPC_analysis_filter_FIX(\r
-          SKP_int32                 state[],            /* I/O  State [order + 1]                       */\r
-          SKP_int16                 res[],              /* O    Residual signal [length]                */\r
-    const SKP_int16                 coef_Q13[],         /* I    Coefficients [order]                    */\r
-    const SKP_int16                 input[],            /* I    Input signal [length]                   */\r
-    const SKP_int16                 lambda_Q16,         /* I    Warping factor                          */\r
-    const SKP_int                   length,             /* I    Length of input signal                  */\r
-    const SKP_int                   order               /* I    Filter order (even)                     */\r
+          opus_int32                 state[],            /* I/O  State [order + 1]                       */\r
+          opus_int16                 res[],              /* O    Residual signal [length]                */\r
+    const opus_int16                 coef_Q13[],         /* I    Coefficients [order]                    */\r
+    const opus_int16                 input[],            /* I    Input signal [length]                   */\r
+    const opus_int16                 lambda_Q16,         /* I    Warping factor                          */\r
+    const opus_int                   length,             /* I    Length of input signal                  */\r
+    const opus_int                   order               /* I    Filter order (even)                     */\r
 )\r
 {\r
-    SKP_int     n, i;\r
-    SKP_int32   acc_Q11, tmp1, tmp2;\r
+    opus_int     n, i;\r
+    opus_int32   acc_Q11, tmp1, tmp2;\r
 \r
     /* Order must be even */\r
     SKP_assert( ( order & 1 ) == 0 );\r
@@ -77,28 +77,28 @@ void silk_warped_LPC_analysis_filter_FIX(
         }\r
         state[ order ] = tmp1;\r
         acc_Q11 = SKP_SMLAWB( acc_Q11, tmp1, coef_Q13[ order - 1 ] );\r
-        res[ n ] = ( SKP_int16 )SKP_SAT16( ( SKP_int32 )input[ n ] - SKP_RSHIFT_ROUND( acc_Q11, 11 ) );\r
+        res[ n ] = ( opus_int16 )SKP_SAT16( ( opus_int32 )input[ n ] - SKP_RSHIFT_ROUND( acc_Q11, 11 ) );\r
     }\r
 }\r
 \r
 void silk_prefilter_FIX(\r
     silk_encoder_state_FIX              *psEnc,         /* I/O  Encoder state FIX                           */\r
     const silk_encoder_control_FIX      *psEncCtrl,     /* I    Encoder control FIX                         */\r
-    SKP_int16                           xw[],           /* O    Weighted signal                             */\r
-    const SKP_int16                     x[]             /* I    Speech signal                               */\r
+    opus_int16                           xw[],           /* O    Weighted signal                             */\r
+    const opus_int16                     x[]             /* I    Speech signal                               */\r
 )\r
 {\r
     silk_prefilter_state_FIX *P = &psEnc->sPrefilt;\r
-    SKP_int   j, k, lag;\r
-    SKP_int32 tmp_32;\r
-    const SKP_int16 *AR1_shp_Q13;\r
-    const SKP_int16 *px;\r
-    SKP_int16 *pxw;\r
-    SKP_int   HarmShapeGain_Q12, Tilt_Q14;\r
-    SKP_int32 HarmShapeFIRPacked_Q12, LF_shp_Q14;\r
-    SKP_int32 x_filt_Q12[ MAX_FRAME_LENGTH / MAX_NB_SUBFR ];\r
-    SKP_int16 st_res[ ( MAX_FRAME_LENGTH / MAX_NB_SUBFR ) + MAX_LPC_ORDER ];\r
-    SKP_int16 B_Q12[ 2 ];\r
+    opus_int   j, k, lag;\r
+    opus_int32 tmp_32;\r
+    const opus_int16 *AR1_shp_Q13;\r
+    const opus_int16 *px;\r
+    opus_int16 *pxw;\r
+    opus_int   HarmShapeGain_Q12, Tilt_Q14;\r
+    opus_int32 HarmShapeFIRPacked_Q12, LF_shp_Q14;\r
+    opus_int32 x_filt_Q12[ MAX_FRAME_LENGTH / MAX_NB_SUBFR ];\r
+    opus_int16 st_res[ ( MAX_FRAME_LENGTH / MAX_NB_SUBFR ) + MAX_LPC_ORDER ];\r
+    opus_int16 B_Q12[ 2 ];\r
 \r
     /* Setup pointers */\r
     px  = x;\r
@@ -114,7 +114,7 @@ void silk_prefilter_FIX(
         HarmShapeGain_Q12 = SKP_SMULWB( psEncCtrl->HarmShapeGain_Q14[ k ], 16384 - psEncCtrl->HarmBoost_Q14[ k ] );\r
         SKP_assert( HarmShapeGain_Q12 >= 0 );\r
         HarmShapeFIRPacked_Q12  =                          SKP_RSHIFT( HarmShapeGain_Q12, 2 );\r
-        HarmShapeFIRPacked_Q12 |= SKP_LSHIFT( ( SKP_int32 )SKP_RSHIFT( HarmShapeGain_Q12, 1 ), 16 );\r
+        HarmShapeFIRPacked_Q12 |= SKP_LSHIFT( ( opus_int32 )SKP_RSHIFT( HarmShapeGain_Q12, 1 ), 16 );\r
         Tilt_Q14    = psEncCtrl->Tilt_Q14[   k ];\r
         LF_shp_Q14  = psEncCtrl->LF_shp_Q14[ k ];\r
         AR1_shp_Q13 = &psEncCtrl->AR1_Q13[   k * MAX_SHAPE_LPC_ORDER ];\r
@@ -150,19 +150,19 @@ void silk_prefilter_FIX(
 /* silk_prefilter. Prefilter for finding Quantizer input signal                           */\r
 SKP_INLINE void silk_prefilt_FIX(\r
     silk_prefilter_state_FIX *P,                    /* I/O state                          */\r
-    SKP_int32   st_res_Q12[],                           /* I short term residual signal       */\r
-    SKP_int16   xw[],                                   /* O prefiltered signal               */\r
-    SKP_int32   HarmShapeFIRPacked_Q12,                 /* I Harmonic shaping coeficients     */\r
-    SKP_int     Tilt_Q14,                               /* I Tilt shaping coeficient          */\r
-    SKP_int32   LF_shp_Q14,                             /* I Low-frequancy shaping coeficients*/\r
-    SKP_int     lag,                                    /* I Lag for harmonic shaping         */\r
-    SKP_int     length                                  /* I Length of signals                */\r
+    opus_int32   st_res_Q12[],                           /* I short term residual signal       */\r
+    opus_int16   xw[],                                   /* O prefiltered signal               */\r
+    opus_int32   HarmShapeFIRPacked_Q12,                 /* I Harmonic shaping coeficients     */\r
+    opus_int     Tilt_Q14,                               /* I Tilt shaping coeficient          */\r
+    opus_int32   LF_shp_Q14,                             /* I Low-frequancy shaping coeficients*/\r
+    opus_int     lag,                                    /* I Lag for harmonic shaping         */\r
+    opus_int     length                                  /* I Length of signals                */\r
 )\r
 {\r
-    SKP_int   i, idx, LTP_shp_buf_idx;\r
-    SKP_int32 n_LTP_Q12, n_Tilt_Q10, n_LF_Q10;\r
-    SKP_int32 sLF_MA_shp_Q12, sLF_AR_shp_Q12;\r
-    SKP_int16 *LTP_shp_buf;\r
+    opus_int   i, idx, LTP_shp_buf_idx;\r
+    opus_int32 n_LTP_Q12, n_Tilt_Q10, n_LF_Q10;\r
+    opus_int32 sLF_MA_shp_Q12, sLF_AR_shp_Q12;\r
+    opus_int16 *LTP_shp_buf;\r
 \r
     /* To speed up use temp variables instead of using the struct */\r
     LTP_shp_buf     = P->sLTP_shp;\r
@@ -189,9 +189,9 @@ SKP_INLINE void silk_prefilt_FIX(
         sLF_MA_shp_Q12 = SKP_SUB32( sLF_AR_shp_Q12,  SKP_LSHIFT( n_LF_Q10,   2 ) );\r
 \r
         LTP_shp_buf_idx = ( LTP_shp_buf_idx - 1 ) & LTP_MASK;\r
-        LTP_shp_buf[ LTP_shp_buf_idx ] = ( SKP_int16 )SKP_SAT16( SKP_RSHIFT_ROUND( sLF_MA_shp_Q12, 12 ) );\r
+        LTP_shp_buf[ LTP_shp_buf_idx ] = ( opus_int16 )SKP_SAT16( SKP_RSHIFT_ROUND( sLF_MA_shp_Q12, 12 ) );\r
 \r
-        xw[i] = ( SKP_int16 )SKP_SAT16( SKP_RSHIFT_ROUND( SKP_SUB32( sLF_MA_shp_Q12, n_LTP_Q12 ), 12 ) );\r
+        xw[i] = ( opus_int16 )SKP_SAT16( SKP_RSHIFT_ROUND( SKP_SUB32( sLF_MA_shp_Q12, n_LTP_Q12 ), 12 ) );\r
     }\r
 \r
     /* Copy temp variable back to state */\r