Renamed SKP_[u]int* to opus_[u]int*
[opus.git] / silk / silk_main.h
index fde1361..68a79be 100644 (file)
@@ -53,90 +53,90 @@ extern "C"
 /* Convert Left/Right stereo signal to adaptive Mid/Side representation */\r
 void silk_stereo_LR_to_MS( \r
     stereo_enc_state    *state,                         /* I/O  State                                       */\r
-    SKP_int16           x1[],                           /* I/O  Left input signal, becomes mid signal       */\r
-    SKP_int16           x2[],                           /* I/O  Right input signal, becomes side signal     */\r
-    SKP_int8            ix[ 2 ][ 4 ],                   /* O    Quantization indices                        */\r
-    SKP_int32           mid_side_rates_bps[],           /* O    Bitrates for mid and side signals           */\r
-    SKP_int32           total_rate_bps,                 /* I    Total bitrate                               */\r
-    SKP_int             prev_speech_act_Q8,             /* I    Speech activity level in previous frame     */\r
-    SKP_int             fs_kHz,                         /* I    Sample rate (kHz)                           */\r
-    SKP_int             frame_length                    /* I    Number of samples                           */\r
+    opus_int16           x1[],                           /* I/O  Left input signal, becomes mid signal       */\r
+    opus_int16           x2[],                           /* I/O  Right input signal, becomes side signal     */\r
+    opus_int8            ix[ 2 ][ 4 ],                   /* O    Quantization indices                        */\r
+    opus_int32           mid_side_rates_bps[],           /* O    Bitrates for mid and side signals           */\r
+    opus_int32           total_rate_bps,                 /* I    Total bitrate                               */\r
+    opus_int             prev_speech_act_Q8,             /* I    Speech activity level in previous frame     */\r
+    opus_int             fs_kHz,                         /* I    Sample rate (kHz)                           */\r
+    opus_int             frame_length                    /* I    Number of samples                           */\r
 );\r
 \r
 /* Convert adaptive Mid/Side representation to Left/Right stereo signal */\r
 void silk_stereo_MS_to_LR( \r
     stereo_dec_state    *state,                         /* I/O  State                                       */\r
-    SKP_int16           x1[],                           /* I/O  Left input signal, becomes mid signal       */\r
-    SKP_int16           x2[],                           /* I/O  Right input signal, becomes side signal     */\r
-    const SKP_int32     pred_Q13[],                     /* I    Predictors                                  */\r
-    SKP_int             fs_kHz,                         /* I    Samples rate (kHz)                          */\r
-    SKP_int             frame_length                    /* I    Number of samples                           */\r
+    opus_int16           x1[],                           /* I/O  Left input signal, becomes mid signal       */\r
+    opus_int16           x2[],                           /* I/O  Right input signal, becomes side signal     */\r
+    const opus_int32     pred_Q13[],                     /* I    Predictors                                  */\r
+    opus_int             fs_kHz,                         /* I    Samples rate (kHz)                          */\r
+    opus_int             frame_length                    /* I    Number of samples                           */\r
 );\r
 \r
 /* Find least-squares prediction gain for one signal based on another and quantize it */\r
-SKP_int32 silk_stereo_find_predictor(                   /* O    Returns predictor in Q13                    */\r
-    SKP_int32           *ratio_Q14,                     /* O    Ratio of residual and mid energies          */\r
-    const SKP_int16     x[],                            /* I    Basis signal                                */\r
-    const SKP_int16     y[],                            /* I    Target signal                               */\r
-    SKP_int32           mid_res_amp_Q0[],               /* I/O  Smoothed mid, residual norms                */\r
-    SKP_int             length,                         /* I    Number of samples                           */\r
-    SKP_int             smooth_coef_Q16                 /* I    Smoothing coefficient                       */\r
+opus_int32 silk_stereo_find_predictor(                   /* O    Returns predictor in Q13                    */\r
+    opus_int32           *ratio_Q14,                     /* O    Ratio of residual and mid energies          */\r
+    const opus_int16     x[],                            /* I    Basis signal                                */\r
+    const opus_int16     y[],                            /* I    Target signal                               */\r
+    opus_int32           mid_res_amp_Q0[],               /* I/O  Smoothed mid, residual norms                */\r
+    opus_int             length,                         /* I    Number of samples                           */\r
+    opus_int             smooth_coef_Q16                 /* I    Smoothing coefficient                       */\r
 );\r
 \r
 /* Quantize mid/side predictors */\r
 void silk_stereo_quant_pred(\r
     stereo_enc_state    *state,                         /* I/O  State                                       */\r
-    SKP_int32           pred_Q13[],                     /* I/O  Predictors (out: quantized)                 */\r
-    SKP_int8            ix[ 2 ][ 4 ]                    /* O    Quantization indices                        */\r
+    opus_int32           pred_Q13[],                     /* I/O  Predictors (out: quantized)                 */\r
+    opus_int8            ix[ 2 ][ 4 ]                    /* O    Quantization indices                        */\r
 );\r
 \r
 /* Entropy code the mid/side quantization indices */\r
 void silk_stereo_encode_pred(\r
     ec_enc              *psRangeEnc,                    /* I/O  Compressor data structure                   */\r
-    SKP_int8            ix[ 2 ][ 4 ]                    /* I    Quantization indices                        */\r
+    opus_int8            ix[ 2 ][ 4 ]                    /* I    Quantization indices                        */\r
 );\r
 \r
 /* Decode mid/side predictors */\r
 void silk_stereo_decode_pred(\r
     ec_dec              *psRangeDec,                    /* I/O  Compressor data structure                   */\r
-    SKP_int             *decode_only_mid,               /* O    Flag that only mid channel has been coded   */\r
-    SKP_int32           pred_Q13[]                      /* O    Predictors                                  */\r
+    opus_int             *decode_only_mid,               /* O    Flag that only mid channel has been coded   */\r
+    opus_int32           pred_Q13[]                      /* O    Predictors                                  */\r
 );\r
 \r
 /* Encodes signs of excitation */\r
 void silk_encode_signs(\r
     ec_enc                      *psRangeEnc,                        /* I/O  Compressor data structure                   */\r
-    const SKP_int8              pulses[],                           /* I    pulse signal                                */\r
-    SKP_int                     length,                             /* I    length of input                             */\r
-    const SKP_int               signalType,                         /* I    Signal type                                 */\r
-    const SKP_int               quantOffsetType,                    /* I    Quantization offset type                    */\r
-    const SKP_int               sum_pulses[ MAX_NB_SHELL_BLOCKS ]   /* I    Sum of absolute pulses per block            */\r
+    const opus_int8              pulses[],                           /* I    pulse signal                                */\r
+    opus_int                     length,                             /* I    length of input                             */\r
+    const opus_int               signalType,                         /* I    Signal type                                 */\r
+    const opus_int               quantOffsetType,                    /* I    Quantization offset type                    */\r
+    const opus_int               sum_pulses[ MAX_NB_SHELL_BLOCKS ]   /* I    Sum of absolute pulses per block            */\r
 );\r
 \r
 /* Decodes signs of excitation */\r
 void silk_decode_signs(\r
     ec_dec                      *psRangeDec,                        /* I/O  Compressor data structure                   */\r
-    SKP_int                     pulses[],                           /* I/O  pulse signal                                */\r
-    SKP_int                     length,                             /* I    length of input                             */\r
-    const SKP_int               signalType,                         /* I    Signal type                                 */\r
-    const SKP_int               quantOffsetType,                    /* I    Quantization offset type                    */\r
-    const SKP_int               sum_pulses[ MAX_NB_SHELL_BLOCKS ]   /* I    Sum of absolute pulses per block            */\r
+    opus_int                     pulses[],                           /* I/O  pulse signal                                */\r
+    opus_int                     length,                             /* I    length of input                             */\r
+    const opus_int               signalType,                         /* I    Signal type                                 */\r
+    const opus_int               quantOffsetType,                    /* I    Quantization offset type                    */\r
+    const opus_int               sum_pulses[ MAX_NB_SHELL_BLOCKS ]   /* I    Sum of absolute pulses per block            */\r
 );\r
 \r
 /* Check encoder control struct */\r
-SKP_int check_control_input( \r
+opus_int check_control_input( \r
     silk_EncControlStruct        *encControl     /* I:   Control structure                               */\r
 );\r
 \r
 /* Control internal sampling rate */\r
-SKP_int silk_control_audio_bandwidth(\r
+opus_int silk_control_audio_bandwidth(\r
     silk_encoder_state          *psEncC             /* I/O  Pointer to Silk encoder state               */\r
 );\r
 \r
 /* Control SNR of redidual quantizer */\r
-SKP_int silk_control_SNR(\r
+opus_int silk_control_SNR(\r
     silk_encoder_state          *psEncC,            /* I/O  Pointer to Silk encoder state               */\r
-    SKP_int32                   TargetRate_bps      /* I    Target max bitrate (bps)                    */\r
+    opus_int32                   TargetRate_bps      /* I    Target max bitrate (bps)                    */\r
 );\r
 \r
 /***************/\r
@@ -146,73 +146,73 @@ SKP_int silk_control_SNR(
 /* Encode quantization indices of excitation */\r
 void silk_encode_pulses(\r
     ec_enc                      *psRangeEnc,        /* I/O  compressor data structure                   */\r
-    const SKP_int               signalType,         /* I    Signal type                                 */\r
-    const SKP_int               quantOffsetType,    /* I    quantOffsetType                             */\r
-    SKP_int8                    pulses[],           /* I    quantization indices                        */\r
-    const SKP_int               frame_length        /* I    Frame length                                */\r
+    const opus_int               signalType,         /* I    Signal type                                 */\r
+    const opus_int               quantOffsetType,    /* I    quantOffsetType                             */\r
+    opus_int8                    pulses[],           /* I    quantization indices                        */\r
+    const opus_int               frame_length        /* I    Frame length                                */\r
 );\r
 \r
 /* Shell encoder, operates on one shell code frame of 16 pulses */\r
 void silk_shell_encoder(\r
     ec_enc                      *psRangeEnc,        /* I/O  compressor data structure                   */\r
-    const SKP_int               *pulses0            /* I    data: nonnegative pulse amplitudes          */\r
+    const opus_int               *pulses0            /* I    data: nonnegative pulse amplitudes          */\r
 );\r
 \r
 /* Shell decoder, operates on one shell code frame of 16 pulses */\r
 void silk_shell_decoder(\r
-    SKP_int                     *pulses0,           /* O    data: nonnegative pulse amplitudes          */\r
+    opus_int                     *pulses0,           /* O    data: nonnegative pulse amplitudes          */\r
     ec_dec                      *psRangeDec,        /* I/O  Compressor data structure                   */\r
-    const SKP_int               pulses4             /* I    number of pulses per pulse-subframe         */\r
+    const opus_int               pulses4             /* I    number of pulses per pulse-subframe         */\r
 );\r
 \r
 /* Gain scalar quantization with hysteresis, uniform on log scale */\r
 void silk_gains_quant(\r
-    SKP_int8                        ind[ MAX_NB_SUBFR ],        /* O    gain indices                            */\r
-    SKP_int32                       gain_Q16[ MAX_NB_SUBFR ],   /* I/O  gains (quantized out)                   */\r
-    SKP_int8                        *prev_ind,                  /* I/O  last index in previous frame            */\r
-    const SKP_int                   conditional,                /* I    first gain is delta coded if 1          */\r
-    const SKP_int                   nb_subfr                    /* I    number of subframes                     */\r
+    opus_int8                        ind[ MAX_NB_SUBFR ],        /* O    gain indices                            */\r
+    opus_int32                       gain_Q16[ MAX_NB_SUBFR ],   /* I/O  gains (quantized out)                   */\r
+    opus_int8                        *prev_ind,                  /* I/O  last index in previous frame            */\r
+    const opus_int                   conditional,                /* I    first gain is delta coded if 1          */\r
+    const opus_int                   nb_subfr                    /* I    number of subframes                     */\r
 );\r
 \r
 /* Gains scalar dequantization, uniform on log scale */\r
 void silk_gains_dequant(\r
-    SKP_int32                       gain_Q16[ MAX_NB_SUBFR ],   /* O    quantized gains                         */\r
-    const SKP_int8                  ind[ MAX_NB_SUBFR ],        /* I    gain indices                            */\r
-    SKP_int8                        *prev_ind,                  /* I/O  last index in previous frame            */\r
-    const SKP_int                   conditional,                /* I    first gain is delta coded if 1          */\r
-    const SKP_int                   nb_subfr                    /* I    number of subframes                     */\r
+    opus_int32                       gain_Q16[ MAX_NB_SUBFR ],   /* O    quantized gains                         */\r
+    const opus_int8                  ind[ MAX_NB_SUBFR ],        /* I    gain indices                            */\r
+    opus_int8                        *prev_ind,                  /* I/O  last index in previous frame            */\r
+    const opus_int                   conditional,                /* I    first gain is delta coded if 1          */\r
+    const opus_int                   nb_subfr                    /* I    number of subframes                     */\r
 );\r
 \r
 /* Interpolate two vectors */\r
 void silk_interpolate(\r
-    SKP_int16                       xi[ MAX_LPC_ORDER ],    /* O    interpolated vector                     */\r
-    const SKP_int16                 x0[ MAX_LPC_ORDER ],    /* I    first vector                            */\r
-    const SKP_int16                 x1[ MAX_LPC_ORDER ],    /* I    second vector                           */\r
-    const SKP_int                   ifact_Q2,               /* I    interp. factor, weight on 2nd vector    */\r
-    const SKP_int                   d                       /* I    number of parameters                    */\r
+    opus_int16                       xi[ MAX_LPC_ORDER ],    /* O    interpolated vector                     */\r
+    const opus_int16                 x0[ MAX_LPC_ORDER ],    /* I    first vector                            */\r
+    const opus_int16                 x1[ MAX_LPC_ORDER ],    /* I    second vector                           */\r
+    const opus_int                   ifact_Q2,               /* I    interp. factor, weight on 2nd vector    */\r
+    const opus_int                   d                       /* I    number of parameters                    */\r
 );\r
 \r
 /* LTP tap quantizer */\r
 void silk_quant_LTP_gains(\r
-    SKP_int16           B_Q14[ MAX_NB_SUBFR * LTP_ORDER ],              /* I/O  (un)quantized LTP gains     */\r
-    SKP_int8            cbk_index[ MAX_NB_SUBFR ],                      /* O    Codebook Index              */\r
-    SKP_int8            *periodicity_index,                             /* O    Periodicity Index           */\r
-    const SKP_int32     W_Q18[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ],      /* I    Error Weights in Q18        */\r
-    SKP_int             mu_Q9,                                          /* I    Mu value (R/D tradeoff)     */\r
-    SKP_int             lowComplexity,                                  /* I    Flag for low complexity     */\r
-    const SKP_int       nb_subfr                                        /* I    number of subframes         */\r
+    opus_int16           B_Q14[ MAX_NB_SUBFR * LTP_ORDER ],              /* I/O  (un)quantized LTP gains     */\r
+    opus_int8            cbk_index[ MAX_NB_SUBFR ],                      /* O    Codebook Index              */\r
+    opus_int8            *periodicity_index,                             /* O    Periodicity Index           */\r
+    const opus_int32     W_Q18[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ],      /* I    Error Weights in Q18        */\r
+    opus_int             mu_Q9,                                          /* I    Mu value (R/D tradeoff)     */\r
+    opus_int             lowComplexity,                                  /* I    Flag for low complexity     */\r
+    const opus_int       nb_subfr                                        /* I    number of subframes         */\r
 );\r
 \r
 /* Entropy constrained matrix-weighted VQ, for a single input data vector */\r
 void silk_VQ_WMat_EC(\r
-    SKP_int8                        *ind,               /* O    index of best codebook vector               */\r
-    SKP_int32                       *rate_dist_Q14,     /* O    best weighted quantization error + mu * rate*/\r
-    const SKP_int16                 *in_Q14,            /* I    input vector to be quantized                */\r
-    const SKP_int32                 *W_Q18,             /* I    weighting matrix                            */\r
-    const SKP_int8                  *cb_Q7,             /* I    codebook                                    */\r
-    const SKP_uint8                 *cl_Q5,             /* I    code length for each codebook vector        */\r
-    const SKP_int                   mu_Q9,              /* I    tradeoff between weighted error and rate    */\r
-    SKP_int                         L                   /* I    number of vectors in codebook               */\r
+    opus_int8                        *ind,               /* O    index of best codebook vector               */\r
+    opus_int32                       *rate_dist_Q14,     /* O    best weighted quantization error + mu * rate*/\r
+    const opus_int16                 *in_Q14,            /* I    input vector to be quantized                */\r
+    const opus_int32                 *W_Q18,             /* I    weighting matrix                            */\r
+    const opus_int8                  *cb_Q7,             /* I    codebook                                    */\r
+    const opus_uint8                 *cl_Q5,             /* I    code length for each codebook vector        */\r
+    const opus_int                   mu_Q9,              /* I    tradeoff between weighted error and rate    */\r
+    opus_int                         L                   /* I    number of vectors in codebook               */\r
 );\r
 \r
 /***********************************/\r
@@ -222,18 +222,18 @@ void silk_NSQ(
     const silk_encoder_state        *psEncC,                                    /* I/O  Encoder State                       */\r
     silk_nsq_state                  *NSQ,                                       /* I/O  NSQ state                           */\r
     SideInfoIndices                 *psIndices,                                 /* I/O  Quantization Indices                */\r
-    const SKP_int16                 x[],                                        /* I    prefiltered input signal            */\r
-    SKP_int8                        pulses[],                                   /* O    quantized qulse signal              */\r
-    const SKP_int16                 PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Short term prediction coefficients  */\r
-    const SKP_int16                 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],    /* I    Long term prediction coefficients   */\r
-    const SKP_int16                 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I                                     */\r
-    const SKP_int                   HarmShapeGain_Q14[ MAX_NB_SUBFR ],          /* I                                        */\r
-    const SKP_int                   Tilt_Q14[ MAX_NB_SUBFR ],                   /* I    Spectral tilt                       */\r
-    const SKP_int32                 LF_shp_Q14[ MAX_NB_SUBFR ],                 /* I                                        */\r
-    const SKP_int32                 Gains_Q16[ MAX_NB_SUBFR ],                  /* I                                        */\r
-    const SKP_int                   pitchL[ MAX_NB_SUBFR ],                     /* I                                        */\r
-    const SKP_int                   Lambda_Q10,                                 /* I                                        */\r
-    const SKP_int                   LTP_scale_Q14                               /* I    LTP state scaling                   */\r
+    const opus_int16                 x[],                                        /* I    prefiltered input signal            */\r
+    opus_int8                        pulses[],                                   /* O    quantized qulse signal              */\r
+    const opus_int16                 PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Short term prediction coefficients  */\r
+    const opus_int16                 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],    /* I    Long term prediction coefficients   */\r
+    const opus_int16                 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I                                     */\r
+    const opus_int                   HarmShapeGain_Q14[ MAX_NB_SUBFR ],          /* I                                        */\r
+    const opus_int                   Tilt_Q14[ MAX_NB_SUBFR ],                   /* I    Spectral tilt                       */\r
+    const opus_int32                 LF_shp_Q14[ MAX_NB_SUBFR ],                 /* I                                        */\r
+    const opus_int32                 Gains_Q16[ MAX_NB_SUBFR ],                  /* I                                        */\r
+    const opus_int                   pitchL[ MAX_NB_SUBFR ],                     /* I                                        */\r
+    const opus_int                   Lambda_Q10,                                 /* I                                        */\r
+    const opus_int                   LTP_scale_Q14                               /* I    LTP state scaling                   */\r
 );\r
 \r
 /* Noise shaping using delayed decision */\r
@@ -241,38 +241,38 @@ void silk_NSQ_del_dec(
     const silk_encoder_state        *psEncC,                                    /* I/O  Encoder State                       */\r
     silk_nsq_state                  *NSQ,                                       /* I/O  NSQ state                           */\r
     SideInfoIndices                 *psIndices,                                 /* I/O  Quantization Indices                */\r
-    const SKP_int16                 x[],                                        /* I    Prefiltered input signal            */\r
-    SKP_int8                        pulses[],                                   /* O    Quantized pulse signal              */\r
-    const SKP_int16                 PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Prediction coefs                    */\r
-    const SKP_int16                 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],    /* I    LT prediction coefs                 */\r
-    const SKP_int16                 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I                                     */\r
-    const SKP_int                   HarmShapeGain_Q14[ MAX_NB_SUBFR ],          /* I                                        */\r
-    const SKP_int                   Tilt_Q14[ MAX_NB_SUBFR ],                   /* I    Spectral tilt                       */\r
-    const SKP_int32                 LF_shp_Q14[ MAX_NB_SUBFR ],                 /* I                                        */\r
-    const SKP_int32                 Gains_Q16[ MAX_NB_SUBFR ],                  /* I                                        */\r
-    const SKP_int                   pitchL[ MAX_NB_SUBFR ],                     /* I                                        */\r
-    const SKP_int                   Lambda_Q10,                                 /* I                                        */\r
-    const SKP_int                   LTP_scale_Q14                               /* I    LTP state scaling                   */\r
+    const opus_int16                 x[],                                        /* I    Prefiltered input signal            */\r
+    opus_int8                        pulses[],                                   /* O    Quantized pulse signal              */\r
+    const opus_int16                 PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Prediction coefs                    */\r
+    const opus_int16                 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],    /* I    LT prediction coefs                 */\r
+    const opus_int16                 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /* I                                     */\r
+    const opus_int                   HarmShapeGain_Q14[ MAX_NB_SUBFR ],          /* I                                        */\r
+    const opus_int                   Tilt_Q14[ MAX_NB_SUBFR ],                   /* I    Spectral tilt                       */\r
+    const opus_int32                 LF_shp_Q14[ MAX_NB_SUBFR ],                 /* I                                        */\r
+    const opus_int32                 Gains_Q16[ MAX_NB_SUBFR ],                  /* I                                        */\r
+    const opus_int                   pitchL[ MAX_NB_SUBFR ],                     /* I                                        */\r
+    const opus_int                   Lambda_Q10,                                 /* I                                        */\r
+    const opus_int                   LTP_scale_Q14                               /* I    LTP state scaling                   */\r
 );\r
 \r
 /************/\r
 /* Silk VAD */\r
 /************/\r
 /* Initialize the Silk VAD */\r
-SKP_int silk_VAD_Init(                              /* O    Return value, 0 if success                  */ \r
+opus_int silk_VAD_Init(                              /* O    Return value, 0 if success                  */ \r
     silk_VAD_state              *psSilk_VAD         /* I/O  Pointer to Silk VAD state                   */ \r
 ); \r
 \r
 /* Silk VAD noise level estimation */\r
 void silk_VAD_GetNoiseLevels(\r
-    const SKP_int32             pX[ VAD_N_BANDS ],  /* I    subband energies                            */\r
+    const opus_int32             pX[ VAD_N_BANDS ],  /* I    subband energies                            */\r
     silk_VAD_state              *psSilk_VAD         /* I/O  Pointer to Silk VAD state                   */ \r
 );\r
 \r
 /* Get speech activity level in Q8 */\r
-SKP_int silk_VAD_GetSA_Q8(                          /* O    Return value, 0 if success                  */\r
+opus_int silk_VAD_GetSA_Q8(                          /* O    Return value, 0 if success                  */\r
     silk_encoder_state          *psEncC,            /* I/O  Encoder state                               */\r
-    const SKP_int16             pIn[]               /* I    PCM input                                   */\r
+    const opus_int16             pIn[]               /* I    PCM input                                   */\r
 );\r
 \r
 /* Low-pass filter with variable cutoff frequency based on  */\r
@@ -280,8 +280,8 @@ SKP_int silk_VAD_GetSA_Q8(                          /* O    Return value, 0 if s
 /* Start by setting transition_frame_no = 1;                */\r
 void silk_LP_variable_cutoff(\r
     silk_LP_state               *psLP,              /* I/O  LP filter state                             */\r
-    SKP_int16                   *signal,            /* I/O  Low-pass filtered output signal             */\r
-    const SKP_int               frame_length        /* I    Frame length                                */\r
+    opus_int16                   *signal,            /* I/O  Low-pass filtered output signal             */\r
+    const opus_int               frame_length        /* I    Frame length                                */\r
 );\r
 \r
 /******************/\r
@@ -290,91 +290,91 @@ void silk_LP_variable_cutoff(
 /* Limit, stabilize, convert and quantize NLSFs */ \r
 void silk_process_NLSFs(\r
     silk_encoder_state              *psEncC,                                /* I/O  Encoder state                               */\r
-    SKP_int16                       PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ],     /* O    Prediction coefficients                     */\r
-    SKP_int16                       pNLSF_Q15[         MAX_LPC_ORDER ],     /* I/O  Normalized LSFs (quant out) (0 - (2^15-1))  */\r
-    const SKP_int16                 prev_NLSFq_Q15[    MAX_LPC_ORDER ]      /* I    Previous Normalized LSFs (0 - (2^15-1))     */\r
+    opus_int16                       PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ],     /* O    Prediction coefficients                     */\r
+    opus_int16                       pNLSF_Q15[         MAX_LPC_ORDER ],     /* I/O  Normalized LSFs (quant out) (0 - (2^15-1))  */\r
+    const opus_int16                 prev_NLSFq_Q15[    MAX_LPC_ORDER ]      /* I    Previous Normalized LSFs (0 - (2^15-1))     */\r
 );\r
 \r
-SKP_int32 silk_NLSF_encode(                                 /* O    Returns RD value in Q25                 */\r
-          SKP_int8                  *NLSFIndices,           /* I    Codebook path vector [ LPC_ORDER + 1 ]  */\r
-          SKP_int16                 *pNLSF_Q15,             /* I/O  Quantized NLSF vector [ LPC_ORDER ]     */\r
+opus_int32 silk_NLSF_encode(                                 /* O    Returns RD value in Q25                 */\r
+          opus_int8                  *NLSFIndices,           /* I    Codebook path vector [ LPC_ORDER + 1 ]  */\r
+          opus_int16                 *pNLSF_Q15,             /* I/O  Quantized NLSF vector [ LPC_ORDER ]     */\r
     const silk_NLSF_CB_struct       *psNLSF_CB,             /* I    Codebook object                         */\r
-    const SKP_int16                 *pW_QW,                 /* I    NLSF weight vector [ LPC_ORDER ]        */\r
-    const SKP_int                   NLSF_mu_Q20,            /* I    Rate weight for the RD optimization     */\r
-    const SKP_int                   nSurvivors,             /* I    Max survivors after first stage         */\r
-    const SKP_int                   signalType              /* I    Signal type: 0/1/2                      */\r
+    const opus_int16                 *pW_QW,                 /* I    NLSF weight vector [ LPC_ORDER ]        */\r
+    const opus_int                   NLSF_mu_Q20,            /* I    Rate weight for the RD optimization     */\r
+    const opus_int                   nSurvivors,             /* I    Max survivors after first stage         */\r
+    const opus_int                   signalType              /* I    Signal type: 0/1/2                      */\r
 );\r
 \r
 /* Compute quantization errors for an LPC_order element input vector for a VQ codebook */\r
 void silk_NLSF_VQ(\r
-    SKP_int32                   err_Q26[],              /* O    Quantization errors [K]                     */\r
-    const SKP_int16             in_Q15[],               /* I    Input vectors to be quantized [LPC_order]   */\r
-    const SKP_uint8             pCB_Q8[],               /* I    Codebook vectors [K*LPC_order]              */\r
-    const SKP_int               K,                      /* I    Number of codebook vectors                  */\r
-    const SKP_int               LPC_order               /* I    Number of LPCs                              */\r
+    opus_int32                   err_Q26[],              /* O    Quantization errors [K]                     */\r
+    const opus_int16             in_Q15[],               /* I    Input vectors to be quantized [LPC_order]   */\r
+    const opus_uint8             pCB_Q8[],               /* I    Codebook vectors [K*LPC_order]              */\r
+    const opus_int               K,                      /* I    Number of codebook vectors                  */\r
+    const opus_int               LPC_order               /* I    Number of LPCs                              */\r
 );\r
 \r
 /* Delayed-decision quantizer for NLSF residuals */\r
-SKP_int32 silk_NLSF_del_dec_quant(                      /* O    Returns RD value in Q25                     */\r
-    SKP_int8                    indices[],              /* O    Quantization indices [ order ]              */\r
-    const SKP_int16             x_Q10[],                /* I    Input [ order ]                             */\r
-    const SKP_int16             w_Q5[],                 /* I    Weights [ order ]                           */\r
-    const SKP_uint8             pred_coef_Q8[],         /* I    Backward predictor coefs [ order ]          */\r
-    const SKP_int16             ec_ix[],                /* I    Indices to entropy coding tables [ order ]  */\r
-    const SKP_uint8             ec_rates_Q5[],          /* I    Rates []                                    */\r
-    const SKP_int               quant_step_size_Q16,    /* I    Quantization step size                      */\r
-    const SKP_int16             inv_quant_step_size_Q6, /* I    Inverse quantization step size              */\r
-    const SKP_int32             mu_Q20,                 /* I    R/D tradeoff                                */\r
-    const SKP_int16             order                   /* I    Number of input values                      */\r
+opus_int32 silk_NLSF_del_dec_quant(                      /* O    Returns RD value in Q25                     */\r
+    opus_int8                    indices[],              /* O    Quantization indices [ order ]              */\r
+    const opus_int16             x_Q10[],                /* I    Input [ order ]                             */\r
+    const opus_int16             w_Q5[],                 /* I    Weights [ order ]                           */\r
+    const opus_uint8             pred_coef_Q8[],         /* I    Backward predictor coefs [ order ]          */\r
+    const opus_int16             ec_ix[],                /* I    Indices to entropy coding tables [ order ]  */\r
+    const opus_uint8             ec_rates_Q5[],          /* I    Rates []                                    */\r
+    const opus_int               quant_step_size_Q16,    /* I    Quantization step size                      */\r
+    const opus_int16             inv_quant_step_size_Q6, /* I    Inverse quantization step size              */\r
+    const opus_int32             mu_Q20,                 /* I    R/D tradeoff                                */\r
+    const opus_int16             order                   /* I    Number of input values                      */\r
 );\r
 \r
 /* Unpack predictor values and indices for entropy coding tables */\r
 void silk_NLSF_unpack(\r
-          SKP_int16                 ec_ix[],                /* O    Indices to entropy tales [ LPC_ORDER ]  */\r
-          SKP_uint8                 pred_Q8[],              /* O    LSF predictor [ LPC_ORDER ]             */\r
+          opus_int16                 ec_ix[],                /* O    Indices to entropy tales [ LPC_ORDER ]  */\r
+          opus_uint8                 pred_Q8[],              /* O    LSF predictor [ LPC_ORDER ]             */\r
     const silk_NLSF_CB_struct       *psNLSF_CB,             /* I    Codebook object                         */\r
-    const SKP_int                   CB1_index               /* I    Index of vector in first LSF codebook   */\r
+    const opus_int                   CB1_index               /* I    Index of vector in first LSF codebook   */\r
 );\r
 \r
 /***********************/\r
 /* NLSF vector decoder */\r
 /***********************/\r
 void silk_NLSF_decode(\r
-          SKP_int16                 *pNLSF_Q15,             /* O    Quantized NLSF vector [ LPC_ORDER ]     */\r
-          SKP_int8                  *NLSFIndices,           /* I    Codebook path vector [ LPC_ORDER + 1 ]  */\r
+          opus_int16                 *pNLSF_Q15,             /* O    Quantized NLSF vector [ LPC_ORDER ]     */\r
+          opus_int8                  *NLSFIndices,           /* I    Codebook path vector [ LPC_ORDER + 1 ]  */\r
     const silk_NLSF_CB_struct       *psNLSF_CB              /* I    Codebook object                         */\r
 );\r
 \r
 /****************************************************/\r
 /* Decoder Functions                                */\r
 /****************************************************/\r
-SKP_int silk_create_decoder(\r
+opus_int silk_create_decoder(\r
     silk_decoder_state              **ppsDec            /* I/O  Decoder state pointer pointer               */\r
 );\r
 \r
-SKP_int silk_free_decoder(\r
+opus_int silk_free_decoder(\r
     silk_decoder_state              *psDec              /* I/O  Decoder state pointer                       */\r
 );\r
 \r
-SKP_int silk_init_decoder(\r
+opus_int silk_init_decoder(\r
     silk_decoder_state              *psDec              /* I/O  Decoder state pointer                       */\r
 );\r
 \r
 /* Set decoder sampling rate */\r
 void silk_decoder_set_fs(\r
     silk_decoder_state              *psDec,             /* I/O  Decoder state pointer                       */\r
-    SKP_int                         fs_kHz              /* I    Sampling frequency (kHz)                    */\r
+    opus_int                         fs_kHz              /* I    Sampling frequency (kHz)                    */\r
 );\r
 \r
 /****************/\r
 /* Decode frame */\r
 /****************/\r
-SKP_int silk_decode_frame(\r
+opus_int silk_decode_frame(\r
     silk_decoder_state          *psDec,             /* I/O  Pointer to Silk decoder state               */\r
     ec_dec                      *psRangeDec,        /* I/O  Compressor data structure                   */\r
-    SKP_int16                   pOut[],             /* O    Pointer to output speech frame              */\r
-    SKP_int32                   *pN,                /* O    Pointer to size of output frame             */\r
-    SKP_int                     lostFlag            /* I    0: no loss, 1 loss, 2 decode fec            */\r
+    opus_int16                   pOut[],             /* O    Pointer to output speech frame              */\r
+    opus_int32                   *pN,                /* O    Pointer to size of output frame             */\r
+    opus_int                     lostFlag            /* I    0: no loss, 1 loss, 2 decode fec            */\r
 );\r
 \r
 /* Decode LBRR side info and excitation */\r
@@ -387,8 +387,8 @@ void silk_LBRR_extract(
 void silk_decode_indices(\r
     silk_decoder_state          *psDec,             /* I/O  State                                       */\r
     ec_dec                      *psRangeDec,        /* I/O  Compressor data structure                   */\r
-    SKP_int                     FrameIndex,         /* I    Frame number                                */\r
-    SKP_int                     decode_LBRR         /* I    Flag indicating LBRR data is being decoded  */\r
+    opus_int                     FrameIndex,         /* I    Frame number                                */\r
+    opus_int                     decode_LBRR         /* I    Flag indicating LBRR data is being decoded  */\r
 );\r
 \r
 /* Decode parameters from payload */\r
@@ -401,17 +401,17 @@ void silk_decode_parameters(
 void silk_decode_core(\r
     silk_decoder_state          *psDec,                             /* I/O  Decoder state               */\r
     silk_decoder_control        *psDecCtrl,                         /* I    Decoder control             */\r
-    SKP_int16                   xq[],                               /* O    Decoded speech              */\r
-    const SKP_int               pulses[ MAX_FRAME_LENGTH ]          /* I    Pulse signal                */\r
+    opus_int16                   xq[],                               /* O    Decoded speech              */\r
+    const opus_int               pulses[ MAX_FRAME_LENGTH ]          /* I    Pulse signal                */\r
 );\r
 \r
 /* Decode quantization indices of excitation (Shell coding) */\r
 void silk_decode_pulses(\r
     ec_dec                          *psRangeDec,        /* I/O  Compressor data structure                   */\r
-    SKP_int                         pulses[],           /* O    Excitation signal                           */\r
-    const SKP_int                   signalType,         /* I    Sigtype                                     */\r
-    const SKP_int                   quantOffsetType,    /* I    quantOffsetType                             */\r
-    const SKP_int                   frame_length        /* I    Frame length                                */\r
+    opus_int                         pulses[],           /* O    Excitation signal                           */\r
+    const opus_int                   signalType,         /* I    Sigtype                                     */\r
+    const opus_int                   quantOffsetType,    /* I    quantOffsetType                             */\r
+    const opus_int                   frame_length        /* I    Frame length                                */\r
 );\r
 \r
 /******************/\r
@@ -427,16 +427,16 @@ void silk_CNG_Reset(
 void silk_CNG(\r
     silk_decoder_state          *psDec,             /* I/O  Decoder state                               */\r
     silk_decoder_control        *psDecCtrl,         /* I/O  Decoder control                             */\r
-    SKP_int16                   signal[],           /* I/O  Signal                                      */\r
-    SKP_int                     length              /* I    Length of residual                          */\r
+    opus_int16                   signal[],           /* I/O  Signal                                      */\r
+    opus_int                     length              /* I    Length of residual                          */\r
 );\r
 \r
 /* Encoding of various parameters */\r
 void silk_encode_indices(\r
     silk_encoder_state          *psEncC,            /* I/O  Encoder state                               */\r
     ec_enc                      *psRangeEnc,        /* I/O  Compressor data structure                   */\r
-    SKP_int                     FrameIndex,         /* I    Frame number                                */\r
-    SKP_int                     encode_LBRR         /* I    Flag indicating LBRR data is being encoded  */\r
+    opus_int                     FrameIndex,         /* I    Frame number                                */\r
+    opus_int                     encode_LBRR         /* I    Flag indicating LBRR data is being encoded  */\r
 );\r
 \r
 #ifdef __cplusplus\r