Renamed SKP_[u]int* to opus_[u]int*
[opus.git] / silk / silk_NLSF_del_dec_quant.c
index 8361fd6..aeb66dc 100644 (file)
@@ -28,29 +28,29 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "silk_main.h"\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
-    SKP_int         i, j, nStates, ind_tmp, ind_min_max, ind_max_min, in_Q10, res_Q10;\r
-    SKP_int         pred_Q10, diff_Q10, out0_Q10, out1_Q10, rate0_Q5, rate1_Q5;\r
-    SKP_int32       RD_tmp_Q25, min_Q25, min_max_Q25, max_min_Q25, pred_coef_Q16;\r
-    SKP_int         ind_sort[         NLSF_QUANT_DEL_DEC_STATES ];\r
-    SKP_int8        ind[              NLSF_QUANT_DEL_DEC_STATES ][ MAX_LPC_ORDER ];\r
-    SKP_int16       prev_out_Q10[ 2 * NLSF_QUANT_DEL_DEC_STATES ];\r
-    SKP_int32       RD_Q25[       2 * NLSF_QUANT_DEL_DEC_STATES ];\r
-    SKP_int32       RD_min_Q25[       NLSF_QUANT_DEL_DEC_STATES ];\r
-    SKP_int32       RD_max_Q25[       NLSF_QUANT_DEL_DEC_STATES ];\r
-    const SKP_uint8 *rates_Q5;\r
+    opus_int         i, j, nStates, ind_tmp, ind_min_max, ind_max_min, in_Q10, res_Q10;\r
+    opus_int         pred_Q10, diff_Q10, out0_Q10, out1_Q10, rate0_Q5, rate1_Q5;\r
+    opus_int32       RD_tmp_Q25, min_Q25, min_max_Q25, max_min_Q25, pred_coef_Q16;\r
+    opus_int         ind_sort[         NLSF_QUANT_DEL_DEC_STATES ];\r
+    opus_int8        ind[              NLSF_QUANT_DEL_DEC_STATES ][ MAX_LPC_ORDER ];\r
+    opus_int16       prev_out_Q10[ 2 * NLSF_QUANT_DEL_DEC_STATES ];\r
+    opus_int32       RD_Q25[       2 * NLSF_QUANT_DEL_DEC_STATES ];\r
+    opus_int32       RD_min_Q25[       NLSF_QUANT_DEL_DEC_STATES ];\r
+    opus_int32       RD_max_Q25[       NLSF_QUANT_DEL_DEC_STATES ];\r
+    const opus_uint8 *rates_Q5;\r
     \r
     SKP_assert( (NLSF_QUANT_DEL_DEC_STATES & (NLSF_QUANT_DEL_DEC_STATES-1)) == 0 );     /* must be power of two */\r
 \r
@@ -59,14 +59,14 @@ SKP_int32 silk_NLSF_del_dec_quant(                      /* O    Returns RD value
     prev_out_Q10[ 0 ] = 0;\r
     for( i = order - 1; ; i-- ) {\r
         rates_Q5 = &ec_rates_Q5[ ec_ix[ i ] ];\r
-        pred_coef_Q16 = SKP_LSHIFT( (SKP_int32)pred_coef_Q8[ i ], 8 );\r
+        pred_coef_Q16 = SKP_LSHIFT( (opus_int32)pred_coef_Q8[ i ], 8 );\r
         in_Q10 = x_Q10[ i ];\r
         for( j = 0; j < nStates; j++ ) {\r
             pred_Q10 = SKP_SMULWB( pred_coef_Q16, prev_out_Q10[ j ] );\r
             res_Q10  = SKP_SUB16( in_Q10, pred_Q10 );\r
             ind_tmp  = SKP_SMULWB( inv_quant_step_size_Q6, res_Q10 );\r
             ind_tmp  = SKP_LIMIT( ind_tmp, -NLSF_QUANT_MAX_AMPLITUDE_EXT, NLSF_QUANT_MAX_AMPLITUDE_EXT-1 );\r
-            ind[ j ][ i ] = (SKP_int8)ind_tmp;\r
+            ind[ j ][ i ] = (opus_int8)ind_tmp;\r
 \r
             /* compute outputs for ind_tmp and ind_tmp + 1 */\r
             out0_Q10 = SKP_LSHIFT( ind_tmp, 10 );\r
@@ -171,7 +171,7 @@ SKP_int32 silk_NLSF_del_dec_quant(                      /* O    Returns RD value
                 prev_out_Q10[ ind_max_min ] = prev_out_Q10[ ind_min_max + NLSF_QUANT_DEL_DEC_STATES ];\r
                 RD_min_Q25[   ind_max_min ] = 0;\r
                 RD_max_Q25[   ind_min_max ] = SKP_int32_MAX;\r
-                SKP_memcpy( ind[ ind_max_min ], ind[ ind_min_max ], MAX_LPC_ORDER * sizeof( SKP_int8 ) );\r
+                SKP_memcpy( ind[ ind_max_min ], ind[ ind_min_max ], MAX_LPC_ORDER * sizeof( opus_int8 ) );\r
             }\r
             /* increment index if it comes from the upper half */\r
             for( j = 0; j < NLSF_QUANT_DEL_DEC_STATES; j++ ) {\r