shithub: opus

Download patch

ref: d513d743fb5d9802e2d39d74a13f5628c1553059
parent: 6c98e344f395b3d1a285885a8be88c0685a346b2
author: Koen Vos <[email protected]>
date: Wed Nov 10 08:36:21 EST 2010

SILK update

--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,7 @@
 src_common/SKP_Silk_decode_parameters.c \
 src_common/SKP_Silk_decode_pulses.c \
 src_common/SKP_Silk_decoder_set_fs.c \
-src_common/SKP_Silk_dec_SDK_API.c \
+src_common/SKP_Silk_dec_API.c \
 src_common/SKP_Silk_detect_SWB_input.c \
 src_common/SKP_Silk_enc_API.c \
 src_common/SKP_Silk_encode_parameters.c \
@@ -58,6 +58,7 @@
 src_common/SKP_Silk_tables_sign.c \
 src_common/SKP_Silk_tables_type_offset.c \
 src_common/SKP_Silk_VAD.c \
+src_common/SKP_Silk_control_audio_bandwidth.c \
 src_FLP/SKP_Silk_apply_sine_window_FLP.c \
 src_FLP/SKP_Silk_control_codec_FLP.c \
 src_FLP/SKP_Silk_corrMatrix_FLP.c \
--- a/interface/SKP_Silk_SDK_API.h
+++ b/interface/SKP_Silk_SDK_API.h
@@ -83,11 +83,11 @@
 /**************************/
 SKP_int SKP_Silk_SDK_Encode(                            /* O:   Returns error code                              */
     void                                *encState,      /* I/O: State                                           */
-    const SKP_SILK_SDK_EncControlStruct *encControl,    /* I:   Control status                                  */
+    SKP_SILK_SDK_EncControlStruct       *encControl,    /* I:   Control status                                  */
     const SKP_int16                     *samplesIn,     /* I:   Speech sample input vector                      */
     SKP_int                             nSamplesIn,     /* I:   Number of samples in input vector               */
     ec_enc                              *psRangeEnc,    /* I/O  Compressor data structure                       */
-    SKP_int16                           *nBytesOut      /* I/O: Number of bytes in payload (input: Max bytes)   */
+    SKP_int32                           *nBytesOut      /* I/O: Number of bytes in payload (input: Max bytes)   */
 );
 
 /****************************************/
@@ -118,7 +118,7 @@
     ec_dec                              *psRangeDec,    /* I/O  Compressor data structure                       */
     const SKP_int                       nBytesIn,       /* I:   Number of input bytes                           */
     SKP_int16                           *samplesOut,    /* O:   Decoded output speech vector                    */
-    SKP_int16                           *nSamplesOut    /* I/O: Number of samples (vector/decoded)              */
+    SKP_int32                           *nSamplesOut    /* I/O: Number of samples (vector/decoded)              */
 );
 
 /***************************************************************/
@@ -129,7 +129,7 @@
     const SKP_int16                     nBytesIn,       /* I:   Number of input bytes                           */
     SKP_int                             lost_offset,    /* I:   Offset from lost packet                         */
     SKP_uint8                           *LBRRData,      /* O:   LBRR payload                                    */
-    SKP_int16                           *nLBRRBytes     /* O:   Number of LBRR Bytes                            */
+    SKP_int32                           *nLBRRBytes     /* O:   Number of LBRR Bytes                            */
 );
 
 /**************************************/
--- a/interface/SKP_Silk_control.h
+++ b/interface/SKP_Silk_control.h
@@ -39,15 +39,18 @@
 /* Structure for controlling encoder operation */
 /***********************************************/
 typedef struct {
-    /* I:   Input signal sampling rate in Hertz; 8000/12000/16000/24000                     */
+    /* I:   Input signal sampling rate in Hertz; 8000/12000/16000/24000/32000/44100/48000   */
     SKP_int32 API_sampleRate;
 
     /* I:   Maximum internal sampling rate in Hertz; 8000/12000/16000/24000                 */
     SKP_int32 maxInternalSampleRate;
 
-    /* I:   Number of samples per packet; must be equivalent of 20, 40, 60, 80 or 100 ms    */
-    SKP_int packetSize;
+    /* I:   Minimum internal sampling rate in Hertz; 8000/12000/16000/24000                 */
+    SKP_int32 minInternalSampleRate;
 
+    /* I:   Number of samples per packet in milliseconds; 10/20/40/60                       */
+    SKP_int payloadSize_ms;
+
     /* I:   Bitrate during active speech in bits/second; internally limited                 */
     SKP_int32 bitRate;                        
 
@@ -62,6 +65,12 @@
 
     /* I:   Flag to enable discontinuous transmission (DTX); 0/1                            */
     SKP_int useDTX;
+
+    /* I:   Flag to use constant bitrate                                                    */
+    SKP_int useCBR;
+
+    /* O:   Internal sampling rate used, in Hertz; 8000/12000/16000/24000                   */
+    SKP_int32 internalSampleRate;
 } SKP_SILK_SDK_EncControlStruct;
 
 /**************************************************************************/
@@ -68,14 +77,20 @@
 /* Structure for controlling decoder operation and reading decoder status */
 /**************************************************************************/
 typedef struct {
-    /* I:   Output signal sampling rate in Hertz; 8000/12000/16000/24000                    */
+    /* I:   Output signal sampling rate in Hertz; 8000/12000/16000/24000/32000/44100/48000  */
     SKP_int32 API_sampleRate;
 
+    /* I:   Number of samples per packet in milliseconds; 10/20/40/60                       */
+    SKP_int payloadSize_ms;
+
+    /* I:   Internal sampling rate used, in Hertz; 8000/12000/16000/24000                   */
+    SKP_int32 internalSampleRate;
+
     /* O:   Number of samples per frame                                                     */
     SKP_int frameSize;
 
-    /* O:   Frames per packet 1, 2, 3, 4, 5                                                 */
-    SKP_int framesPerPacket;
+    /* O:   Frames per payload 1, 2, 3                                                      */
+    SKP_int framesPerPayload;
 
     /* O:   Flag to indicate that the decoder has remaining payloads internally             */
     SKP_int moreInternalDecoderFrames;
--- a/interface/SKP_Silk_errors.h
+++ b/interface/SKP_Silk_errors.h
@@ -43,31 +43,34 @@
 /**************************/
 
 /* Input length is not a multiplum of 10 ms, or length is longer than the packet length */
-#define SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES        -1
+#define SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES        -101
 
 /* Sampling frequency not 8000, 12000, 16000 or 24000 Hertz */
-#define SKP_SILK_ENC_FS_NOT_SUPPORTED                   -2
+#define SKP_SILK_ENC_FS_NOT_SUPPORTED                   -102
 
 /* Packet size not 20, 40, 60, 80 or 100 ms */
-#define SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED          -3
+#define SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED          -103
 
 /* Allocated payload buffer too short */
-#define SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT              -4
+#define SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT              -104
 
 /* Loss rate not between 0 and 100 percent */
-#define SKP_SILK_ENC_INVALID_LOSS_RATE                  -5
+#define SKP_SILK_ENC_INVALID_LOSS_RATE                  -105
 
 /* Complexity setting not valid, use 0, 1 or 2 */
-#define SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING         -6
+#define SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING         -106
 
 /* Inband FEC setting not valid, use 0 or 1 */
-#define SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING         -7
+#define SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING         -107
 
 /* DTX setting not valid, use 0 or 1 */
-#define SKP_SILK_ENC_INVALID_DTX_SETTING                -8
+#define SKP_SILK_ENC_INVALID_DTX_SETTING                -108
 
+/* CBR setting not valid, use 0 or 1 */
+#define SKP_SILK_ENC_INVALID_CBR_SETTING                -109
+
 /* Internal encoder error */
-#define SKP_SILK_ENC_INTERNAL_ERROR                     -9
+#define SKP_SILK_ENC_INTERNAL_ERROR                     -110
 
 /**************************/
 /* Decoder error messages */
@@ -74,13 +77,16 @@
 /**************************/
 
 /* Output sampling frequency lower than internal decoded sampling frequency */
-#define SKP_SILK_DEC_INVALID_SAMPLING_FREQUENCY         -10
+#define SKP_SILK_DEC_INVALID_SAMPLING_FREQUENCY         -200
 
 /* Payload size exceeded the maximum allowed 1024 bytes */
-#define SKP_SILK_DEC_PAYLOAD_TOO_LARGE                  -11
+#define SKP_SILK_DEC_PAYLOAD_TOO_LARGE                  -201
 
 /* Payload has bit errors */
-#define SKP_SILK_DEC_PAYLOAD_ERROR                      -12
+#define SKP_SILK_DEC_PAYLOAD_ERROR                      -202
+
+/* Payload has bit errors */
+#define SKP_SILK_DEC_INVALID_FRAME_SIZE                 -203
 
 #ifdef __cplusplus
 }
--- a/src_FIX/SKP_Silk_HP_variable_cutoff_FIX.c
+++ b/src_FIX/SKP_Silk_HP_variable_cutoff_FIX.c
@@ -26,6 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 #if HIGH_PASS_INPUT
 
@@ -57,7 +58,7 @@
         quality_Q15 = psEncCtrl->input_quality_bands_Q15[ 0 ];
         pitch_freq_log_Q7 = SKP_SUB32( pitch_freq_log_Q7, SKP_SMULWB( SKP_SMULWB( SKP_LSHIFT( quality_Q15, 2 ), quality_Q15 ), 
             pitch_freq_log_Q7 - SKP_LOG2_VARIABLE_HP_MIN_FREQ_Q7 ) );
-        pitch_freq_log_Q7 = SKP_ADD32( pitch_freq_log_Q7, SKP_RSHIFT( 19661 - quality_Q15, 9 ) ); // 19661_Q15 = 0.6_Q0
+        pitch_freq_log_Q7 = SKP_ADD32( pitch_freq_log_Q7, SKP_RSHIFT( SKP_FIX_CONST( 0.6, 15 ) - quality_Q15, 9 ) );
 
         //delta_freq = pitch_freq_log - psEnc->variable_HP_smth1;
         delta_freq_Q7 = pitch_freq_log_Q7 - SKP_RSHIFT( psEnc->variable_HP_smth1_Q15, 8 );
@@ -67,21 +68,22 @@
         }
 
         /* limit delta, to reduce impact of outliers */
-        delta_freq_Q7 = SKP_LIMIT_32( delta_freq_Q7, -VARIABLE_HP_MAX_DELTA_FREQ_Q7, VARIABLE_HP_MAX_DELTA_FREQ_Q7 );
+        delta_freq_Q7 = SKP_LIMIT_32( delta_freq_Q7, -SKP_FIX_CONST( VARIABLE_HP_MAX_DELTA_FREQ, 7 ), SKP_FIX_CONST( VARIABLE_HP_MAX_DELTA_FREQ, 7 ) );
 
         /* update smoother */
         psEnc->variable_HP_smth1_Q15 = SKP_SMLAWB( psEnc->variable_HP_smth1_Q15, 
-            SKP_MUL( SKP_LSHIFT( psEnc->speech_activity_Q8, 1 ), delta_freq_Q7 ), VARIABLE_HP_SMTH_COEF1_Q16 );
+            SKP_MUL( SKP_LSHIFT( psEnc->speech_activity_Q8, 1 ), delta_freq_Q7 ), SKP_FIX_CONST( VARIABLE_HP_SMTH_COEF1, 16 ) );
     }
     /* second smoother */
     psEnc->variable_HP_smth2_Q15 = SKP_SMLAWB( psEnc->variable_HP_smth2_Q15, 
-        psEnc->variable_HP_smth1_Q15 - psEnc->variable_HP_smth2_Q15, VARIABLE_HP_SMTH_COEF2_Q16 );
+        psEnc->variable_HP_smth1_Q15 - psEnc->variable_HP_smth2_Q15, SKP_FIX_CONST( VARIABLE_HP_SMTH_COEF2, 16 ) );
 
     /* convert from log scale to Hertz */
-    psEncCtrl->pitch_freq_low_Hz = SKP_Silk_log2lin( SKP_RSHIFT( psEnc->variable_HP_smth2_Q15, 8 ) ); //pow( 2.0, psEnc->variable_HP_smth2 );
+    psEncCtrl->pitch_freq_low_Hz = SKP_Silk_log2lin( SKP_RSHIFT( psEnc->variable_HP_smth2_Q15, 8 ) );
 
     /* limit frequency range */
-    psEncCtrl->pitch_freq_low_Hz = SKP_LIMIT_32( psEncCtrl->pitch_freq_low_Hz, VARIABLE_HP_MIN_FREQ_Q0, VARIABLE_HP_MAX_FREQ_Q0 );
+    psEncCtrl->pitch_freq_low_Hz = SKP_LIMIT_32( psEncCtrl->pitch_freq_low_Hz, 
+        SKP_FIX_CONST( VARIABLE_HP_MIN_FREQ, 0 ), SKP_FIX_CONST( VARIABLE_HP_MAX_FREQ, 0 ) );
 
     /********************************/
     /* Compute Filter Coefficients  */
@@ -94,7 +96,7 @@
     SKP_assert( Fc_Q19 >=  3704 );
     SKP_assert( Fc_Q19 <= 27787 );
 
-    r_Q28 = ( 1 << 28 ) - SKP_MUL( 471, Fc_Q19 ); // 471_Q9 = 0.92_Q0, range: 255347779 to 266690872, 27-28 bits
+    r_Q28 = SKP_FIX_CONST( 1.0, 28 ) - SKP_MUL( SKP_FIX_CONST( 0.92, 9 ), Fc_Q19 );
     SKP_assert( r_Q28 >= 255347779 );
     SKP_assert( r_Q28 <= 266690872 );
 
@@ -106,7 +108,7 @@
     
     // -r * ( 2 - Fc * Fc );
     r_Q22  = SKP_RSHIFT( r_Q28, 6 );
-    A_Q28[ 0 ] = SKP_SMULWW( r_Q22, SKP_SMULWW( Fc_Q19, Fc_Q19 ) - ( 2 << 22 ) );
+    A_Q28[ 0 ] = SKP_SMULWW( r_Q22, SKP_SMULWW( Fc_Q19, Fc_Q19 ) - SKP_FIX_CONST( 2.0,  22 ) );
     A_Q28[ 1 ] = SKP_SMULWW( r_Q22, r_Q22 );
 
     /********************************/
--- a/src_FIX/SKP_Silk_LTP_scale_ctrl_FIX.c
+++ b/src_FIX/SKP_Silk_LTP_scale_ctrl_FIX.c
@@ -52,7 +52,7 @@
 
     /* combine input and filtered input */
     g_out_Q5    = SKP_RSHIFT_ROUND( SKP_RSHIFT( psEncCtrl->LTPredCodGain_Q7, 1 ) + SKP_RSHIFT( psEnc->HPLTPredCodGain_Q7, 1 ), 3 );
-    g_limit_Q15 = SKP_Silk_sigm_Q15( g_out_Q5 - ( 3 << 5 ) ); /* mulitplid with 0.5 */
+    g_limit_Q15 = SKP_Silk_sigm_Q15( g_out_Q5 - ( 3 << 5 ) );
             
     /* Default is minimum scaling */
     psEncCtrl->sCmn.LTP_scaleIndex = 0;
--- a/src_FIX/SKP_Silk_NLSF_MSVQ_encode_FIX.c
+++ b/src_FIX/SKP_Silk_NLSF_MSVQ_encode_FIX.c
@@ -43,9 +43,8 @@
     const SKP_int                   deactivate_fluc_red     /* I    Deactivate fluctuation reduction        */
 )
 {
-    SKP_int     i, s, k, cur_survivors = 0, prev_survivors, input_index, cb_index, bestIndex;
+    SKP_int     i, s, k, cur_survivors = 0, prev_survivors, min_survivors, input_index, cb_index, bestIndex;
     SKP_int32   rateDistThreshold_Q18;
-    SKP_int     pNLSF_in_Q15[ MAX_LPC_ORDER ];
 #if( NLSF_MSVQ_FLUCTUATION_REDUCTION == 1 )
     SKP_int32   se_Q15, wsse_Q20, bestRateDist_Q20;
 #endif
@@ -72,7 +71,7 @@
 
     const SKP_int   *pConstInt;
           SKP_int   *pInt;
-    const SKP_int16 *pCB_element;
+    const SKP_int8  *pCB_element;
     const SKP_Silk_NLSF_CBS *pCurrentCBStage;
 
     SKP_assert( NLSF_MSVQ_Survivors <= MAX_NLSF_MSVQ_SURVIVORS );
@@ -85,10 +84,6 @@
     DEBUG_STORE_DATA( NLSF_mu.dat, &NLSF_mu_Q15,             sizeof( SKP_int32 ) );
 #endif
 
-
-    /* Copy the input vector */
-    SKP_memcpy( pNLSF_in_Q15, pNLSF_Q15, LPC_order * sizeof( SKP_int ) );
-
     /****************************************************/
     /* Tree search for the multi-stage vector quantizer */
     /****************************************************/
@@ -95,15 +90,18 @@
 
     /* Clear accumulated rates */
     SKP_memset( pRate_Q5, 0, NLSF_MSVQ_Survivors * sizeof( SKP_int32 ) );
-    
-    /* Copy NLSFs into residual signal vector */
+
+    /* Subtract 1/2 from NLSF input vector to create initial residual */
     for( i = 0; i < LPC_order; i++ ) {
-        pRes_Q15[ i ] = pNLSF_Q15[ i ];
+        pRes_Q15[ i ] = pNLSF_Q15[ i ] - SKP_FIX_CONST( 0.5f, 15 );
     }
 
     /* Set first stage values */
     prev_survivors = 1;
 
+    /* Minimum number of survivors */
+    min_survivors = NLSF_MSVQ_Survivors / 2;
+
     /* Loop over all stages */
     for( s = 0; s < psNLSF_CB->nStages; s++ ) {
 
@@ -130,9 +128,10 @@
             prev_survivors * pCurrentCBStage->nVectors, cur_survivors );
 
         /* Discard survivors with rate-distortion values too far above the best one */
-        if( pRateDist_Q18[ 0 ] < SKP_int32_MAX / NLSF_MSVQ_SURV_MAX_REL_RD ) {
-            rateDistThreshold_Q18 = SKP_MUL( NLSF_MSVQ_SURV_MAX_REL_RD, pRateDist_Q18[ 0 ] );
-            while( pRateDist_Q18[ cur_survivors - 1 ] > rateDistThreshold_Q18 && cur_survivors > 1 ) {
+        if( pRateDist_Q18[ 0 ] < SKP_int32_MAX / MAX_NLSF_MSVQ_SURVIVORS ) {
+            rateDistThreshold_Q18 = SKP_SMLAWB( pRateDist_Q18[ 0 ], 
+                SKP_MUL( NLSF_MSVQ_Survivors, pRateDist_Q18[ 0 ] ), SKP_FIX_CONST( NLSF_MSVQ_SURV_MAX_REL_RD, 16 ) );
+            while( pRateDist_Q18[ cur_survivors - 1 ] > rateDistThreshold_Q18 && cur_survivors > min_survivors ) {
                 cur_survivors--;
             }
         }
@@ -155,14 +154,14 @@
 
             /* Subtract new contribution from the previous residual vector for each of 'cur_survivors' */
             pConstInt   = &pRes_Q15[ SKP_SMULBB( input_index, LPC_order ) ];
-            pCB_element = &pCurrentCBStage->CB_NLSF_Q15[ SKP_SMULBB( cb_index, LPC_order ) ];
+            pCB_element = &pCurrentCBStage->CB_NLSF_Q8[ SKP_SMULBB( cb_index, LPC_order ) ];
             pInt        = &pRes_new_Q15[ SKP_SMULBB( k, LPC_order ) ];
             for( i = 0; i < LPC_order; i++ ) {
-                pInt[ i ] = pConstInt[ i ] - ( SKP_int )pCB_element[ i ];
+                pInt[ i ] = pConstInt[ i ] - SKP_LSHIFT16( ( SKP_int )pCB_element[ i ], 7 );
             }
 
             /* Update accumulated rate for stage 1 to the current */
-            pRate_new_Q5[ k ] = pRate_Q5[ input_index ] + pCurrentCBStage->Rates_Q5[ cb_index ];
+            pRate_new_Q5[ k ] = pRate_Q5[ input_index ] + SKP_LSHIFT32( ( SKP_int32 )pCurrentCBStage->Rates_Q4[ cb_index ], 1 );
 
             /* Copy paths from previous matrix, starting with the best path */
             pConstInt = &pPath[ SKP_SMULBB( input_index, psNLSF_CB->nStages ) ];
--- a/src_FIX/SKP_Silk_NLSF_VQ_rate_distortion_FIX.c
+++ b/src_FIX/SKP_Silk_NLSF_VQ_rate_distortion_FIX.c
@@ -43,7 +43,7 @@
     SKP_int32 *pRD_vec_Q20;
 
     /* Compute weighted quantization errors for all input vectors over one codebook stage */
-    SKP_Silk_NLSF_VQ_sum_error_FIX( pRD_Q20, in_Q15, w_Q6, psNLSF_CBS->CB_NLSF_Q15, 
+    SKP_Silk_NLSF_VQ_sum_error_FIX( pRD_Q20, in_Q15, w_Q6, psNLSF_CBS->CB_NLSF_Q8, 
         N, psNLSF_CBS->nVectors, LPC_order );
 
     /* Loop over input vectors */
@@ -51,9 +51,9 @@
     for( n = 0; n < N; n++ ) {
         /* Add rate cost to error for each codebook vector */
         for( i = 0; i < psNLSF_CBS->nVectors; i++ ) {
-            SKP_assert( rate_acc_Q5[ n ] + psNLSF_CBS->Rates_Q5[ i ] >= 0 );
-            SKP_assert( rate_acc_Q5[ n ] + psNLSF_CBS->Rates_Q5[ i ] <= SKP_int16_MAX );
-            pRD_vec_Q20[ i ] = SKP_SMLABB( pRD_vec_Q20[ i ], rate_acc_Q5[ n ] + psNLSF_CBS->Rates_Q5[ i ], mu_Q15 );
+            SKP_assert( rate_acc_Q5[ n ] + SKP_LSHIFT32( ( SKP_int32 )psNLSF_CBS->Rates_Q4[ i ], 1 ) >= 0 );
+            SKP_assert( rate_acc_Q5[ n ] + SKP_LSHIFT32( ( SKP_int32 )psNLSF_CBS->Rates_Q4[ i ], 1 ) <= SKP_int16_MAX );
+            pRD_vec_Q20[ i ] = SKP_SMLABB( pRD_vec_Q20[ i ], rate_acc_Q5[ n ] + SKP_LSHIFT32( ( SKP_int32 )psNLSF_CBS->Rates_Q4[ i ], 1 ), mu_Q15 );
             SKP_assert( pRD_vec_Q20[ i ] >= 0 );
         }
         pRD_vec_Q20 += psNLSF_CBS->nVectors;
--- a/src_FIX/SKP_Silk_NLSF_VQ_sum_error_FIX.c
+++ b/src_FIX/SKP_Silk_NLSF_VQ_sum_error_FIX.c
@@ -32,16 +32,16 @@
     SKP_int32                       *err_Q20,           /* O    Weighted quantization errors  [N*K]         */
     const SKP_int                   *in_Q15,            /* I    Input vectors to be quantized [N*LPC_order] */
     const SKP_int                   *w_Q6,              /* I    Weighting vectors             [N*LPC_order] */
-    const SKP_int16                 *pCB_Q15,           /* I    Codebook vectors              [K*LPC_order] */
+    const SKP_int8                  *pCB_Q8,            /* I    Codebook vectors              [K*LPC_order] */
     const SKP_int                   N,                  /* I    Number of input vectors                     */
     const SKP_int                   K,                  /* I    Number of codebook vectors                  */
     const SKP_int                   LPC_order           /* I    Number of LPCs                              */
 )
 {
-    SKP_int         i, n, m;
-    SKP_int32       diff_Q15, sum_error, Wtmp_Q6;
-    SKP_int32       Wcpy_Q6[ MAX_LPC_ORDER / 2 ];
-    const SKP_int16 *cb_vec_Q15;
+    SKP_int        i, n, m;
+    SKP_int32      diff_Q15, sum_error, Wtmp_Q6;
+    SKP_int32      Wcpy_Q6[ MAX_LPC_ORDER / 2 ];
+    const SKP_int8 *cb_vec_Q8;
 
     SKP_assert( LPC_order <= 16 );
     SKP_assert( ( LPC_order & 1 ) == 0 );
@@ -54,7 +54,7 @@
     /* Loop over input vectors */
     for( n = 0; n < N; n++ ) {
         /* Loop over codebook */
-        cb_vec_Q15 = pCB_Q15;
+        cb_vec_Q8 = pCB_Q8;
         for( i = 0; i < K; i++ ) {
             sum_error = 0;
             for( m = 0; m < LPC_order; m += 2 ) {
@@ -62,11 +62,11 @@
                 Wtmp_Q6 = Wcpy_Q6[ SKP_RSHIFT( m, 1 ) ];
 
                 /* Compute weighted squared quantization error for index m */
-                diff_Q15 = in_Q15[ m ] - *cb_vec_Q15++; // range: [ -32767 : 32767 ]
+                diff_Q15 = in_Q15[ m ] - SKP_LSHIFT16( ( SKP_int )( *cb_vec_Q8++ ), 7 ); // range: [ -32767 : 32767 ]
                 sum_error = SKP_SMLAWB( sum_error, SKP_SMULBB( diff_Q15, diff_Q15 ), Wtmp_Q6 );
 
                 /* Compute weighted squared quantization error for index m + 1 */
-                diff_Q15 = in_Q15[m + 1] - *cb_vec_Q15++; // range: [ -32767 : 32767 ]
+                diff_Q15 = in_Q15[m + 1] - SKP_LSHIFT16( ( SKP_int )( *cb_vec_Q8++ ), 7 ); // range: [ -32767 : 32767 ]
                 sum_error = SKP_SMLAWT( sum_error, SKP_SMULBB( diff_Q15, diff_Q15 ), Wtmp_Q6 );
             }
             SKP_assert( sum_error >= 0 );
--- a/src_FIX/SKP_Silk_control_codec_FIX.c
+++ b/src_FIX/SKP_Silk_control_codec_FIX.c
@@ -26,30 +26,25 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
+#include "SKP_Silk_setup_complexity.h"
 
 /* ToDo: Move the functions belowto common to be able to use them in FLP control codec also */
 SKP_INLINE SKP_int SKP_Silk_setup_resamplers(
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         API_fs_Hz,          /* I                        */
     SKP_int                         fs_kHz              /* I                        */
 );
 
 SKP_INLINE SKP_int SKP_Silk_setup_packetsize(
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         PacketSize_ms,      /* I                        */
-    SKP_int                         fs_kHz              /* I                        */
+    SKP_int                         PacketSize_ms       /* I                        */
 );
 
 SKP_INLINE SKP_int SKP_Silk_setup_fs(
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         fs_kHz              /* I                        */
+    SKP_int                         fs_kHz,             /* I                        */
+    SKP_int                         PacketSize_ms       /* I                        */
 );
 
-SKP_INLINE SKP_int SKP_Silk_setup_complexity(
-    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         Complexity          /* I                        */
-);
-
 SKP_INLINE SKP_int SKP_Silk_setup_rate(
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
     SKP_int                         TargetRate_bps      /* I                        */
@@ -56,142 +51,49 @@
 );
 
 SKP_INLINE SKP_int SKP_Silk_setup_LBRR(
-    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         INBandFEC_enabled   /* I                        */
+    SKP_Silk_encoder_state_FIX      *psEnc              /* I/O                      */
 );
 
 /* Control encoder SNR */
 SKP_int SKP_Silk_control_encoder_FIX( 
-    SKP_Silk_encoder_state_FIX  *psEnc,             /* I/O  Pointer to Silk encoder state                   */
-    const SKP_int32             API_fs_Hz,          /* I    External (API) sampling rate (Hz)               */
-    const SKP_int               max_internal_fs_kHz,/* I    Maximum internal sampling rate (kHz)            */
-    const SKP_int               PacketSize_ms,      /* I    Packet length (ms)                              */
-    SKP_int32                   TargetRate_bps,     /* I    Target max bitrate (bps) (used if SNR_dB == 0)  */
-    const SKP_int               PacketLoss_perc,    /* I    Packet loss rate (in percent)                   */
-    const SKP_int               INBandFEC_enabled,  /* I    Enable (1) / disable (0) inband FEC             */
-    const SKP_int               DTX_enabled,        /* I    Enable / disable DTX                            */
-    const SKP_int               InputFramesize_ms,  /* I    Inputframe in ms                                */
-    const SKP_int               Complexity          /* I    Complexity (0->low; 1->medium; 2->high)         */
+    SKP_Silk_encoder_state_FIX  *psEnc,                 /* I/O  Pointer to Silk encoder state           */
+    const SKP_int               PacketSize_ms,          /* I    Packet length (ms)                      */
+    const SKP_int32             TargetRate_bps,         /* I    Target max bitrate (bps)                */
+    const SKP_int               PacketLoss_perc,        /* I    Packet loss rate (in percent)           */
+    const SKP_int               Complexity              /* I    Complexity (0->low; 1->medium; 2->high) */
 )
 {
     SKP_int   fs_kHz, ret = 0;
 
-    /* State machine for the SWB/WB switching */
-    fs_kHz = psEnc->sCmn.fs_kHz;
-    
-    /* Only switch during low speech activity, when no frames are sitting in the payload buffer */
-    if( API_fs_Hz == 8000 || fs_kHz == 0 || API_fs_Hz < SKP_SMULBB( fs_kHz, 1000 ) || fs_kHz > max_internal_fs_kHz ) {
-        /* Switching is not possible, encoder just initialized, internal mode higher than external, */
-        /* or internal mode higher than maximum allowed internal mode                               */
-        fs_kHz = SKP_min( SKP_DIV32_16( API_fs_Hz, 1000 ), max_internal_fs_kHz );
-    } else {
-        /* Accumulate the difference between the target rate and limit for switching down */
-        psEnc->sCmn.bitrateDiff += SKP_MUL( InputFramesize_ms, TargetRate_bps - psEnc->sCmn.bitrate_threshold_down );
-        psEnc->sCmn.bitrateDiff  = SKP_min( psEnc->sCmn.bitrateDiff, 0 );
-
-        if( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) { /* Low speech activity and payload buffer empty */
-            /* Check if we should switch down */
-#if SWITCH_TRANSITION_FILTERING 
-            if( ( psEnc->sCmn.sLP.transition_frame_no == 0 ) &&                         /* Transition phase not active */
-                ( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ||              /* Bitrate threshold is met */
-                ( psEnc->sCmn.sSWBdetect.WB_detected * psEnc->sCmn.fs_kHz == 24 ) ) ) { /* Forced down-switching due to WB input */
-                psEnc->sCmn.sLP.transition_frame_no = 1;                                /* Begin transition phase */
-                psEnc->sCmn.sLP.mode                = 0;                                /* Switch down */
-            } else if( 
-                ( psEnc->sCmn.sLP.transition_frame_no >= TRANSITION_FRAMES_DOWN ) &&    /* Transition phase complete */
-                ( psEnc->sCmn.sLP.mode == 0 ) ) {                                       /* Ready to switch down */
-                psEnc->sCmn.sLP.transition_frame_no = 0;                                /* Ready for new transition phase */
-#else
-            if( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ) {               /* Bitrate threshold is met */ 
-#endif            
-                psEnc->sCmn.bitrateDiff = 0;
-
-                /* Switch to a lower sample frequency */
-                if( psEnc->sCmn.fs_kHz == 24 ) {
-                    fs_kHz = 16;
-                } else if( psEnc->sCmn.fs_kHz == 16 ) {
-                    fs_kHz = 12;
-                } else {
-                    SKP_assert( psEnc->sCmn.fs_kHz == 12 );
-                    fs_kHz = 8;
-                }
-            }
-
-            /* Check if we should switch up */
-            if( ( ( SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 ) < API_fs_Hz ) &&
-                ( TargetRate_bps >= psEnc->sCmn.bitrate_threshold_up ) && 
-                ( psEnc->sCmn.sSWBdetect.WB_detected * psEnc->sCmn.fs_kHz != 16 ) ) && 
-                ( ( psEnc->sCmn.fs_kHz == 16 ) && ( max_internal_fs_kHz >= 24 ) || 
-                  ( psEnc->sCmn.fs_kHz == 12 ) && ( max_internal_fs_kHz >= 16 ) ||
-                  ( psEnc->sCmn.fs_kHz ==  8 ) && ( max_internal_fs_kHz >= 12 ) ) 
-#if SWITCH_TRANSITION_FILTERING
-                  && ( psEnc->sCmn.sLP.transition_frame_no == 0 ) ) { /* No transition phase running, ready to switch */
-                    psEnc->sCmn.sLP.mode = 1; /* Switch up */
-#else
-                ) {
-#endif
-                psEnc->sCmn.bitrateDiff = 0;
-
-                /* Switch to a higher sample frequency */
-                if( psEnc->sCmn.fs_kHz == 8 ) {
-                    fs_kHz = 12;
-                } else if( psEnc->sCmn.fs_kHz == 12 ) {
-                    fs_kHz = 16;
-                } else {
-                    SKP_assert( psEnc->sCmn.fs_kHz == 16 );
-                    fs_kHz = 24;
-                } 
-            }
+    if( psEnc->sCmn.controlled_since_last_payload != 0 ) {
+        if( psEnc->sCmn.API_fs_Hz != psEnc->sCmn.prev_API_fs_Hz && psEnc->sCmn.fs_kHz > 0 ) {
+            /* Change in API sampling rate in the middle of encoding a packet */
+            ret += SKP_Silk_setup_resamplers( psEnc, psEnc->sCmn.fs_kHz );
         }
-    }
-
-#if SWITCH_TRANSITION_FILTERING
-    /* After switching up, stop transition filter during speech inactivity */
-    if( ( psEnc->sCmn.sLP.mode == 1 ) &&
-        ( psEnc->sCmn.sLP.transition_frame_no >= TRANSITION_FRAMES_UP ) && 
-        ( psEnc->speech_activity_Q8 < 128 ) && 
-        ( psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {
-        
-        psEnc->sCmn.sLP.transition_frame_no = 0;
-
-        /* Reset transition filter state */
-        SKP_memset( psEnc->sCmn.sLP.In_LP_State, 0, 2 * sizeof( SKP_int32 ) );
+        return ret;
     }
-#endif
 
-#ifdef FORCE_FS_KHZ
-    SKP_assert( FORCE_FS_KHZ == 8 || FORCE_FS_KHZ == 12 || FORCE_FS_KHZ == 16 || FORCE_FS_KHZ == 24 );
-    if( psEnc->sCmn.fs_kHz != 0 ) {
-        /* Force except during init */
-        fs_kHz = FORCE_FS_KHZ;
-    }
-#endif
+    /* Beyond this point we know that there are no previously coded frames in the payload buffer */
 
-#ifdef SAVE_ALL_INTERNAL_DATA
-    DEBUG_STORE_DATA( bitrate.dat,  &TargetRate_bps,          1 * sizeof( SKP_int32 ) ); 
-    DEBUG_STORE_DATA( fs.dat,       &fs_kHz,                  1 * sizeof( SKP_int32 ) ); 
-    DEBUG_STORE_DATA( diff.dat,     &psEnc->sCmn.bitrateDiff, 1 * sizeof( SKP_int32 ) ); 
-    DEBUG_STORE_DATA( lashape.dat,  &psEnc->sCmn.la_shape,    1 * sizeof( SKP_int32 ) ); 
-#endif
     /********************************************/
-    /* Prepare resampler and buffered data      */    
+    /* Determine internal sampling rate         */
     /********************************************/
-    SKP_Silk_setup_resamplers( psEnc, API_fs_Hz, fs_kHz );
+    fs_kHz = SKP_Silk_control_audio_bandwidth( &psEnc->sCmn, TargetRate_bps );
 
     /********************************************/
-    /* Set packet size                          */
+    /* Prepare resampler and buffered data      */
     /********************************************/
-    ret += SKP_Silk_setup_packetsize( psEnc, PacketSize_ms, fs_kHz );
+    ret += SKP_Silk_setup_resamplers( psEnc, fs_kHz );
 
     /********************************************/
     /* Set internal sampling frequency          */
     /********************************************/
-    ret += SKP_Silk_setup_fs( psEnc, fs_kHz );
+    ret += SKP_Silk_setup_fs( psEnc, fs_kHz, PacketSize_ms );
 
     /********************************************/
     /* Set encoding complexity                  */
     /********************************************/
-    ret += SKP_Silk_setup_complexity( psEnc, Complexity );
+    ret += SKP_Silk_setup_complexity( &psEnc->sCmn, Complexity );
 
     /********************************************/
     /* Set bitrate/coding quality               */
@@ -209,15 +111,9 @@
     /********************************************/
     /* Set LBRR usage                           */
     /********************************************/
-    ret += SKP_Silk_setup_LBRR( psEnc, INBandFEC_enabled );
+    ret += SKP_Silk_setup_LBRR( psEnc );
 
-    /********************************************/
-    /* Set DTX mode                             */
-    /********************************************/
-    if( DTX_enabled < 0 || DTX_enabled > 1 ) {
-        ret = SKP_SILK_ENC_INVALID_DTX_SETTING;
-    }
-    psEnc->sCmn.useDTX = DTX_enabled;
+    psEnc->sCmn.controlled_since_last_payload = 1;
 
     return ret;
 }
@@ -225,7 +121,7 @@
 /* Control low bitrate redundancy usage */
 void SKP_Silk_LBRR_ctrl_FIX(
     SKP_Silk_encoder_state_FIX      *psEnc,     /* I/O  encoder state                               */
-    SKP_Silk_encoder_control_FIX    *psEncCtrl  /* I/O  encoder control                             */
+    SKP_Silk_encoder_control        *psEncCtrlC /* I/O  encoder control                             */
 )
 {
     SKP_int LBRR_usage;
@@ -236,19 +132,18 @@
         /* Usage Control based on sensitivity and packet loss caracteristics */
         /* For now only enable adding to next for active frames. Make more complex later */
         LBRR_usage = SKP_SILK_NO_LBRR;
-        if( psEnc->speech_activity_Q8 > LBRR_SPEECH_ACTIVITY_THRES_Q8 && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) { // nb! maybe multiply loss prob and speech activity 
-            LBRR_usage = SKP_SILK_ADD_LBRR_TO_PLUS1;
+        if( psEnc->speech_activity_Q8 > SKP_FIX_CONST( LBRR_SPEECH_ACTIVITY_THRES, 8 ) && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) {
+            LBRR_usage = SKP_SILK_LBRR;
         }
-        psEncCtrl->sCmn.LBRR_usage = LBRR_usage;
+        psEncCtrlC->LBRR_usage = LBRR_usage;
     } else {
-        psEncCtrl->sCmn.LBRR_usage = SKP_SILK_NO_LBRR;
+        psEncCtrlC->LBRR_usage = SKP_SILK_NO_LBRR;
     }
 }
 
 SKP_INLINE SKP_int SKP_Silk_setup_packetsize(
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         PacketSize_ms,      /* I                        */
-    SKP_int                         fs_kHz              /* I                        */
+    SKP_int                         PacketSize_ms       /* I                        */
 )
 {
     SKP_int ret = SKP_SILK_NO_ERROR;
@@ -255,89 +150,92 @@
     if( ( PacketSize_ms !=  10 ) &&
         ( PacketSize_ms !=  20 ) &&
         ( PacketSize_ms !=  40 ) && 
-        ( PacketSize_ms !=  60 ) && 
-        ( PacketSize_ms !=  80 ) && 
-        ( PacketSize_ms != 100 ) ) {
+        ( PacketSize_ms !=  60 ) ) {
         ret = SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;
     } else {
         if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) {
             if( PacketSize_ms == 10 ) {
-                if( psEnc->sCmn.nFramesInPayloadBuf == 0 ) {
-                    /* Only allowed when the payload buffer is empty */
-                    psEnc->sCmn.nb_subfr      = MAX_NB_SUBFR >> 1;
-                    psEnc->sCmn.frame_length  = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
-                    psEnc->sCmn.PacketSize_ms = PacketSize_ms;
-                    psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz );
-                    /* Packet length changes. Reset LBRR buffer */
-                    SKP_Silk_LBRR_reset( &psEnc->sCmn );
-                }
+                /* Only allowed when the payload buffer is empty */
+                psEnc->sCmn.nb_subfr = MAX_NB_SUBFR >> 1;
+                psEnc->sCmn.PacketSize_ms = PacketSize_ms;
+                psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, psEnc->sCmn.fs_kHz );
+                /* Packet length changes. Reset LBRR buffer */
+                SKP_Silk_LBRR_reset( &psEnc->sCmn );
             } else{
-                psEnc->sCmn.nb_subfr      = MAX_NB_SUBFR;
-                psEnc->sCmn.frame_length  = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
+                psEnc->sCmn.nb_subfr = MAX_NB_SUBFR;
                 psEnc->sCmn.PacketSize_ms = PacketSize_ms;
-                psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz );
+                psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, psEnc->sCmn.fs_kHz );
                 /* Packet length changes. Reset LBRR buffer */
                 SKP_Silk_LBRR_reset( &psEnc->sCmn );
             }
         }
+        psEnc->sCmn.frame_length = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
     }
+
     return(ret);
 }
 
 SKP_INLINE SKP_int SKP_Silk_setup_resamplers(
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         API_fs_Hz,          /* I                        */
     SKP_int                         fs_kHz              /* I                        */
 )
 {
     SKP_int ret = SKP_SILK_NO_ERROR;
     
-    if( psEnc->sCmn.fs_kHz != fs_kHz || psEnc->sCmn.prev_API_fs_Hz != API_fs_Hz ) {
+    if( psEnc->sCmn.fs_kHz != fs_kHz || psEnc->sCmn.prev_API_fs_Hz != psEnc->sCmn.API_fs_Hz ) {
 
-        /* Allocate space for worst case temporary upsampling, 8 to 48 kHz, so a factor 6 */
-        SKP_int16 x_buf_API_fs_Hz[ ( MAX_API_FS_KHZ / 8 ) * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ];
+        if( psEnc->sCmn.fs_kHz == 0 ) {
+            /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */
+            ret += SKP_Silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, fs_kHz * 1000 );
+        } else {
+            /* Allocate space for worst case temporary upsampling, 8 to 48 kHz, so a factor 6 */
+            SKP_int16 x_buf_API_fs_Hz[ ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * ( MAX_API_FS_KHZ / 8 ) ];
 
-        SKP_int32 nSamples_temp = SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape;
+            SKP_int32 nSamples_temp = SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + LA_SHAPE_MS * psEnc->sCmn.fs_kHz;
 
-        if( SKP_SMULBB( fs_kHz, 1000 ) < API_fs_Hz && psEnc->sCmn.fs_kHz != 0 ) {
-            /* Resample buffered data in x_buf to API_fs_Hz */
+            if( SKP_SMULBB( fs_kHz, 1000 ) < psEnc->sCmn.API_fs_Hz && psEnc->sCmn.fs_kHz != 0 ) {
+                /* Resample buffered data in x_buf to API_fs_Hz */
 
-            SKP_Silk_resampler_state_struct  temp_resampler_state;
+                SKP_Silk_resampler_state_struct  temp_resampler_state;
 
-            /* Initialize resampler for temporary resampling of x_buf data to API_fs_Hz */
-            ret += SKP_Silk_resampler_init( &temp_resampler_state, SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 ), API_fs_Hz );
+                /* Initialize resampler for temporary resampling of x_buf data to API_fs_Hz */
+                ret += SKP_Silk_resampler_init( &temp_resampler_state, SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 ), psEnc->sCmn.API_fs_Hz );
 
-            /* Temporary resampling of x_buf data to API_fs_Hz */
-            ret += SKP_Silk_resampler( &temp_resampler_state, x_buf_API_fs_Hz, psEnc->x_buf, nSamples_temp );
+                /* Temporary resampling of x_buf data to API_fs_Hz */
+                ret += SKP_Silk_resampler( &temp_resampler_state, x_buf_API_fs_Hz, psEnc->x_buf, nSamples_temp );
 
-            /* Calculate number of samples that has been temporarily upsampled */
-            nSamples_temp = SKP_DIV32_16( nSamples_temp * API_fs_Hz, SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 ) );
+                /* Calculate number of samples that has been temporarily upsampled */
+                nSamples_temp = SKP_DIV32_16( nSamples_temp * psEnc->sCmn.API_fs_Hz, SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 ) );
 
-            /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */
-            ret += SKP_Silk_resampler_init( &psEnc->sCmn.resampler_state, API_fs_Hz, SKP_SMULBB( fs_kHz, 1000 ) );
+                /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */
+                ret += SKP_Silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, SKP_SMULBB( fs_kHz, 1000 ) );
 
-        } else {
-            /* Copy data */
-            SKP_memcpy( x_buf_API_fs_Hz, psEnc->x_buf, nSamples_temp * sizeof( SKP_int16 ) );
-        }
+            } else {
+                /* Copy data */
+                SKP_memcpy( x_buf_API_fs_Hz, psEnc->x_buf, nSamples_temp * sizeof( SKP_int16 ) );
+            }
 
-        if( 1000 * fs_kHz != API_fs_Hz ) {
-            /* Correct resampler state (unless resampling by a factor 1) by resampling buffered data from API_fs_Hz to fs_kHz */
-            ret += SKP_Silk_resampler( &psEnc->sCmn.resampler_state, psEnc->x_buf, x_buf_API_fs_Hz, nSamples_temp );
+            if( 1000 * fs_kHz != psEnc->sCmn.API_fs_Hz ) {
+                /* Correct resampler state (unless resampling by a factor 1) by resampling buffered data from API_fs_Hz to fs_kHz */
+                ret += SKP_Silk_resampler( &psEnc->sCmn.resampler_state, psEnc->x_buf, x_buf_API_fs_Hz, nSamples_temp );
+            }
         }
     }
-    psEnc->sCmn.prev_API_fs_Hz = API_fs_Hz;
- 
+
+    psEnc->sCmn.prev_API_fs_Hz = psEnc->sCmn.API_fs_Hz;
+
     return(ret);
 }
 
 SKP_INLINE SKP_int SKP_Silk_setup_fs(
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         fs_kHz              /* I                        */
+    SKP_int                         fs_kHz,             /* I                        */
+    SKP_int                         PacketSize_ms       /* I                        */
 )
 {
-    SKP_int ret = 0;
+    SKP_int ret = SKP_SILK_NO_ERROR;
 
+    /* Set internal sampling frequency */
     if( psEnc->sCmn.fs_kHz != fs_kHz ) {
         /* reset part of the state */
         SKP_memset( &psEnc->sShape,          0,                            sizeof( SKP_Silk_shape_state_FIX ) );
@@ -374,6 +272,7 @@
         psEnc->sNSQ.lagPrev                 = 100;
         psEnc->sNSQ.prev_inv_gain_Q16       = 65536;
         psEnc->sNSQ_LBRR.prev_inv_gain_Q16  = 65536;
+
         psEnc->sCmn.fs_kHz = fs_kHz;
         if( psEnc->sCmn.fs_kHz == 8 ) {
             psEnc->sCmn.predictLPCOrder = MIN_LPC_ORDER;
@@ -385,10 +284,8 @@
             psEnc->sCmn.psNLSF_CB[ 1 ]  = &SKP_Silk_NLSF_CB1_16;
         }
         psEnc->sCmn.subfr_length   = SKP_SMULBB( SUB_FRAME_LENGTH_MS, fs_kHz );
-        psEnc->sCmn.frame_length   = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
         psEnc->sCmn.ltp_mem_length = SKP_SMULBB( LTP_MEM_LENGTH_MS, fs_kHz ); 
         psEnc->sCmn.la_pitch       = SKP_SMULBB( LA_PITCH_MS, fs_kHz );
-        psEnc->sCmn.la_shape       = SKP_SMULBB( LA_SHAPE_MS, fs_kHz );
         psEnc->sPred.min_pitch_lag = SKP_SMULBB(  3, fs_kHz );
         psEnc->sPred.max_pitch_lag = SKP_SMULBB( 18, fs_kHz );
         if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ){
@@ -397,87 +294,33 @@
             psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz );
         }
         if( psEnc->sCmn.fs_kHz == 24 ) {
-            psEnc->mu_LTP_Q8 = MU_LTP_QUANT_SWB_Q8;
+            psEnc->mu_LTP_Q8 = SKP_FIX_CONST( MU_LTP_QUANT_SWB, 8 );
             psEnc->sCmn.bitrate_threshold_up   = SKP_int32_MAX;
             psEnc->sCmn.bitrate_threshold_down = SWB2WB_BITRATE_BPS; 
         } else if( psEnc->sCmn.fs_kHz == 16 ) {
-            psEnc->mu_LTP_Q8 = MU_LTP_QUANT_WB_Q8;
+            psEnc->mu_LTP_Q8 = SKP_FIX_CONST( MU_LTP_QUANT_WB, 8 );
             psEnc->sCmn.bitrate_threshold_up   = WB2SWB_BITRATE_BPS;
             psEnc->sCmn.bitrate_threshold_down = WB2MB_BITRATE_BPS; 
         } else if( psEnc->sCmn.fs_kHz == 12 ) {
-            psEnc->mu_LTP_Q8 = MU_LTP_QUANT_MB_Q8;
+            psEnc->mu_LTP_Q8 = SKP_FIX_CONST( MU_LTP_QUANT_MB, 8 );
             psEnc->sCmn.bitrate_threshold_up   = MB2WB_BITRATE_BPS;
             psEnc->sCmn.bitrate_threshold_down = MB2NB_BITRATE_BPS;
         } else {
-            psEnc->mu_LTP_Q8 = MU_LTP_QUANT_NB_Q8;
+            psEnc->mu_LTP_Q8 = SKP_FIX_CONST( MU_LTP_QUANT_NB, 8 );
             psEnc->sCmn.bitrate_threshold_up   = NB2MB_BITRATE_BPS;
             psEnc->sCmn.bitrate_threshold_down = 0;
         }
         psEnc->sCmn.fs_kHz_changed = 1;
-
-        /* Check that settings are valid */
-        SKP_assert( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length );
     }
-    return( ret );
-}
 
-SKP_INLINE SKP_int SKP_Silk_setup_complexity(
-    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         Complexity          /* I                        */
-)
-{
-    SKP_int ret = 0;
+    /********************************************/
+    /* Set packet size                          */
+    /********************************************/
+    ret += SKP_Silk_setup_packetsize( psEnc, PacketSize_ms );
 
     /* Check that settings are valid */
-    if( LOW_COMPLEXITY_ONLY && Complexity != 0 ) { 
-        ret = SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING;
-    }
-
-    /* Set encoding complexity */
-    if( Complexity == 0 || LOW_COMPLEXITY_ONLY ) {
-        /* Low complexity */
-        psEnc->sCmn.Complexity                  = 0;
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_LC_MODE;
-        psEnc->pitchEstimationThreshold_Q16     = FIND_PITCH_CORRELATION_THRESHOLD_Q16_LC_MODE;
-        psEnc->sCmn.pitchEstimationLPCOrder     = 8;
-        psEnc->sCmn.shapingLPCOrder             = 8;
-        psEnc->sCmn.nStatesDelayedDecision      = 1;
-        psEnc->sCmn.useInterpolatedNLSFs        = 0;
-        psEnc->sCmn.LTPQuantLowComplexity       = 1;
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS_LC_MODE;
-    } else if( Complexity == 1 ) {
-        /* Medium complexity */
-        psEnc->sCmn.Complexity                  = 1;
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_MC_MODE;
-        psEnc->pitchEstimationThreshold_Q16     = FIND_PITCH_CORRELATION_THRESHOLD_Q16_MC_MODE;
-        psEnc->sCmn.pitchEstimationLPCOrder     = 12;
-        psEnc->sCmn.shapingLPCOrder             = 12;
-        psEnc->sCmn.nStatesDelayedDecision      = 2;
-        psEnc->sCmn.useInterpolatedNLSFs        = 0;
-        psEnc->sCmn.LTPQuantLowComplexity       = 0;
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS_MC_MODE;
-    } else if( Complexity == 2 ) {
-        /* High complexity */
-        psEnc->sCmn.Complexity                  = 2;
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_HC_MODE;
-        psEnc->pitchEstimationThreshold_Q16     = FIND_PITCH_CORRELATION_THRESHOLD_Q16_HC_MODE;
-        psEnc->sCmn.pitchEstimationLPCOrder     = 16;
-        psEnc->sCmn.shapingLPCOrder             = 16;
-        psEnc->sCmn.nStatesDelayedDecision      = 4;
-        psEnc->sCmn.useInterpolatedNLSFs        = 1;
-        psEnc->sCmn.LTPQuantLowComplexity       = 0;
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS;
-    } else {
-        ret = SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING;
-    }
-
-    /* Do not allow higher pitch estimation LPC order than predict LPC order */
-    psEnc->sCmn.pitchEstimationLPCOrder = SKP_min_int( psEnc->sCmn.pitchEstimationLPCOrder, psEnc->sCmn.predictLPCOrder );
-
-    SKP_assert( psEnc->sCmn.pitchEstimationLPCOrder <= MAX_FIND_PITCH_LPC_ORDER );
-    SKP_assert( psEnc->sCmn.shapingLPCOrder         <= MAX_SHAPE_LPC_ORDER      );
-    SKP_assert( psEnc->sCmn.nStatesDelayedDecision  <= MAX_DEL_DEC_STATES       );
-
+    SKP_assert( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length );
+ 
     return( ret );
 }
 
@@ -490,16 +333,7 @@
     SKP_int32 frac_Q6;
     const SKP_int32 *rateTable;
 
-    TargetRate_bps = SKP_min( TargetRate_bps, 100000 );
-    if( psEnc->sCmn.fs_kHz == 8 ) {
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_NB_BPS );
-    } else if( psEnc->sCmn.fs_kHz == 12 ) {
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_MB_BPS );
-    } else if( psEnc->sCmn.fs_kHz == 16 ) {
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_WB_BPS );
-    } else {
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_SWB_BPS );
-    }
+    /* Set bitrate/coding quality */
     if( TargetRate_bps != psEnc->sCmn.TargetRate_bps ) {
         psEnc->sCmn.TargetRate_bps = TargetRate_bps;
 
@@ -527,57 +361,53 @@
 }
 
 SKP_INLINE SKP_int SKP_Silk_setup_LBRR(
-    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */
-    SKP_int                         INBandFEC_enabled   /* I                        */
+    SKP_Silk_encoder_state_FIX      *psEnc             /* I/O                      */
 )
 {
-    SKP_int   ret = 0;
-    SKP_int32 LBRRRate_thres_bps;
+    SKP_int   ret = SKP_SILK_NO_ERROR;
 
 #if USE_LBRR
-    if( INBandFEC_enabled < 0 || INBandFEC_enabled > 1 ) {
+    SKP_int32 LBRRRate_thres_bps;
+
+    if( psEnc->sCmn.useInBandFEC < 0 || psEnc->sCmn.useInBandFEC > 1 ) {
         ret = SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING;
     }
     
-    /* Only change settings if first frame in packet */
-    if( psEnc->sCmn.nFramesInPayloadBuf == 0 ) {
-        
-        psEnc->sCmn.LBRR_enabled = INBandFEC_enabled;
-        if( psEnc->sCmn.fs_kHz == 8 ) {
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 9000;
-        } else if( psEnc->sCmn.fs_kHz == 12 ) {
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 6000;;
-        } else if( psEnc->sCmn.fs_kHz == 16 ) {
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 3000;
-        } else {
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS;
-        }
+    psEnc->sCmn.LBRR_enabled = psEnc->sCmn.useInBandFEC;
+    if( psEnc->sCmn.fs_kHz == 8 ) {
+        LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 9000;
+    } else if( psEnc->sCmn.fs_kHz == 12 ) {
+        LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 6000;;
+    } else if( psEnc->sCmn.fs_kHz == 16 ) {
+        LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 3000;
+    } else {
+        LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS;
+    }
 
-        if( psEnc->sCmn.TargetRate_bps >= LBRRRate_thres_bps ) {
-            /* Set gain increase / rate reduction for LBRR usage */
-            /* Coarsely tuned with PESQ for now. */
-            /* Linear regression coefs G = 8 - 0.5 * loss */
-            /* Meaning that at 16% loss main rate and redundant rate is the same, -> G = 0 */
-            psEnc->sCmn.LBRR_GainIncreases = SKP_max_int( 8 - SKP_RSHIFT( psEnc->sCmn.PacketLoss_perc, 1 ), 0 );
+    if( psEnc->sCmn.TargetRate_bps >= LBRRRate_thres_bps ) {
+        /* Set gain increase / rate reduction for LBRR usage */
+        /* Coarsely tuned with PESQ for now. */
+        /* Linear regression coefs G = 8 - 0.5 * loss */
+        /* Meaning that at 16% loss main rate and redundant rate is the same, -> G = 0 */
+        psEnc->sCmn.LBRR_GainIncreases = SKP_max_int( 8 - SKP_RSHIFT( psEnc->sCmn.PacketLoss_perc, 1 ), 0 );
 
-            /* Set main stream rate compensation */
-            if( psEnc->sCmn.LBRR_enabled && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) {
-                /* Tuned to give aprox same mean / weighted bitrate as no inband FEC */
-                psEnc->inBandFEC_SNR_comp_Q8 = ( 6 << 8 ) - SKP_LSHIFT( psEnc->sCmn.LBRR_GainIncreases, 7 );
-            } else {
-                psEnc->inBandFEC_SNR_comp_Q8 = 0;
-                psEnc->sCmn.LBRR_enabled     = 0;
-            }
+        /* Set main stream rate compensation */
+        if( psEnc->sCmn.LBRR_enabled && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) {
+            /* Tuned to give approx same mean / weighted bitrate as no inband FEC */
+            psEnc->inBandFEC_SNR_comp_Q8 = SKP_FIX_CONST( 6.0f, 8 ) - SKP_LSHIFT( psEnc->sCmn.LBRR_GainIncreases, 7 );
         } else {
-            psEnc->inBandFEC_SNR_comp_Q8     = 0;
-            psEnc->sCmn.LBRR_enabled         = 0;
+            psEnc->inBandFEC_SNR_comp_Q8 = 0;
+            psEnc->sCmn.LBRR_enabled     = 0;
         }
+    } else {
+        psEnc->inBandFEC_SNR_comp_Q8     = 0;
+        psEnc->sCmn.LBRR_enabled         = 0;
     }
 #else
-    if( INBandFEC_enabled != 0 ) {
+    if( psEnc->sCmn.LBRR_enabled != 0 ) {
         ret = SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING;
+        psEnc->sCmn.LBRR_enabled = 0;
     }
-    psEnc->sCmn.LBRR_enabled = 0;
 #endif
-    return( ret );
-}
\ No newline at end of file
+    return ret;
+}
--- a/src_FIX/SKP_Silk_corrMatrix_FIX.c
+++ b/src_FIX/SKP_Silk_corrMatrix_FIX.c
@@ -72,6 +72,7 @@
     const SKP_int16                 *x,         /* I    x vector [L + order - 1] used to form data matrix X */
     const SKP_int                   L,          /* I    Length of vectors                                   */
     const SKP_int                   order,      /* I    Max lag for correlation                             */
+    const SKP_int                   head_room,  /* I    Desired headroom                                    */
     SKP_int32                       *XX,        /* O    Pointer to X'*X correlation matrix [ order x order ]*/
     SKP_int                         *rshifts    /* I/O  Right shifts of correlations                        */
 )
@@ -82,9 +83,8 @@
 
     /* Calculate energy to find shift used to fit in 32 bits */
     SKP_Silk_sum_sqr_shift( &energy, &rshifts_local, x, L + order - 1 );
-    /* Add shifts to get the wanted head room */
-
-    head_room_rshifts = SKP_max( LTP_CORRS_HEAD_ROOM - SKP_Silk_CLZ32( energy ), 0 );
+    /* Add shifts to get the desired head room */
+    head_room_rshifts = SKP_max( head_room - SKP_Silk_CLZ32( energy ), 0 );
     
     energy = SKP_RSHIFT32( energy, head_room_rshifts );
     rshifts_local += head_room_rshifts;
--- a/src_FIX/SKP_Silk_encode_frame_FIX.c
+++ b/src_FIX/SKP_Silk_encode_frame_FIX.c
@@ -26,16 +26,17 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /****************/
 /* Encode frame */
 /****************/
 SKP_int SKP_Silk_encode_frame_FIX( 
-    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O  Pointer to Silk FIX encoder state           */
-    SKP_uint8                       *pCode,             /* O    Pointer to payload                          */
-    SKP_int16                       *pnBytesOut,        /* I/O  Pointer to number of payload bytes          */
-                                                        /*      input: max length; output: used             */
-    const SKP_int16                 *pIn                /* I    Pointer to input speech frame               */
+    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O  Encoder state FIX                       */
+    SKP_int32                       *pnBytesOut,        /* I/O  Number of payload bytes                 */
+                                                        /*      input: max length; output: used         */
+    ec_enc                          *psRangeEnc,        /* I/O  compressor data structure               */
+    const SKP_int16                 *pIn                /* I    Input speech frame                      */
 )
 {
     SKP_Silk_encoder_control_FIX sEncCtrl;
@@ -44,29 +45,28 @@
     SKP_int16   xfw[ MAX_FRAME_LENGTH ];
     SKP_int16   pIn_HP[ MAX_FRAME_LENGTH ];
     SKP_int16   res_pitch[ 2 * MAX_FRAME_LENGTH + LA_PITCH_MAX ];
-    SKP_int     LBRR_idx, frame_terminator;
+    SKP_int     LBRR_idx, frame_terminator, SNR_dB_Q7;
     const SKP_uint16 *FrameTermination_CDF;
 
     /* Low bitrate redundancy parameters */
     SKP_uint8   LBRRpayload[ MAX_ARITHM_BYTES ];
-    SKP_int16   nBytesLBRR;
-    ec_byte_buffer range_enc_celt_buf;
+    SKP_int32   nBytesLBRR;
 
-    sEncCtrl.sCmn.Seed = psEnc->sCmn.frameCounter++ & 3;
-
 TIC(ENCODE_FRAME)
 
+    sEncCtrl.sCmn.Seed = psEnc->sCmn.frameCounter++ & 3;
     /**************************************************************/
     /* Setup Input Pointers, and insert frame in input buffer    */
     /*************************************************************/
-    x_frame         = psEnc->x_buf + psEnc->sCmn.ltp_mem_length; /* start of frame to encode */
-    res_pitch_frame = res_pitch    + psEnc->sCmn.ltp_mem_length; /* start of pitch LPC residual frame */
+    /* pointers aligned with start of frame to encode */
+    x_frame         = psEnc->x_buf + psEnc->sCmn.ltp_mem_length;    /* start of frame to encode */
+    res_pitch_frame = res_pitch    + psEnc->sCmn.ltp_mem_length;    /* start of pitch LPC residual frame */
 
     /****************************/
     /* Voice Activity Detection */
     /****************************/
 TIC(VAD)
-    ret = SKP_Silk_VAD_GetSA_Q8( &psEnc->sCmn.sVAD, &psEnc->speech_activity_Q8, 
+    ret = SKP_Silk_VAD_GetSA_Q8( &psEnc->sCmn.sVAD, &psEnc->speech_activity_Q8, &SNR_dB_Q7, 
                                  sEncCtrl.input_quality_bands_Q15, &sEncCtrl.input_tilt_Q15,
                                  pIn, psEnc->sCmn.frame_length, psEnc->sCmn.fs_kHz );
 TOC(VAD)
@@ -79,15 +79,15 @@
     /* Variable high-pass filter */
     SKP_Silk_HP_variable_cutoff_FIX( psEnc, &sEncCtrl, pIn_HP, pIn );
 #else
-    SKP_memcpy( pIn_HP, pIn,psEnc->sCmn.frame_length * sizeof( SKP_int16 ) );
+    SKP_memcpy( pIn_HP, pIn, psEnc->sCmn.frame_length * sizeof( SKP_int16 ) );
 #endif
 TOC(HP_IN)
 
 #if SWITCH_TRANSITION_FILTERING
     /* Ensure smooth bandwidth transitions */
-    SKP_Silk_LP_variable_cutoff( &psEnc->sCmn.sLP, x_frame + psEnc->sCmn.la_shape, pIn_HP, psEnc->sCmn.frame_length );
+    SKP_Silk_LP_variable_cutoff( &psEnc->sCmn.sLP, x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, pIn_HP, psEnc->sCmn.frame_length );
 #else
-    SKP_memcpy( x_frame + psEnc->sCmn.la_shape, pIn_HP,psEnc->sCmn.frame_length * sizeof( SKP_int16 ) );
+    SKP_memcpy( x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, pIn_HP,psEnc->sCmn.frame_length * sizeof( SKP_int16 ) );
 #endif
     
     /*****************************************/
@@ -124,7 +124,7 @@
 TIC(PROCESS_GAINS)
     SKP_Silk_process_gains_FIX( psEnc, &sEncCtrl );
 TOC(PROCESS_GAINS)
- 
+    
     psEnc->sCmn.sigtype[         psEnc->sCmn.nFramesInPayloadBuf ] = sEncCtrl.sCmn.sigtype;
     psEnc->sCmn.QuantOffsetType[ psEnc->sCmn.nFramesInPayloadBuf ] = sEncCtrl.sCmn.QuantOffsetType;
 
@@ -140,17 +140,17 @@
     /* Noise shaping quantization            */
     /*****************************************/
 TIC(NSQ)
-    if( psEnc->sCmn.nStatesDelayedDecision > 1 ) {
+    if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) {
         SKP_Silk_NSQ_del_dec( &psEnc->sCmn, &sEncCtrl.sCmn, &psEnc->sNSQ, xfw,
-            &psEnc->sCmn.q[ psEnc->sCmn.nFramesInPayloadBuf *psEnc->sCmn.frame_length ], sEncCtrl.sCmn.NLSFInterpCoef_Q2, 
+            psEnc->sCmn.q, sEncCtrl.sCmn.NLSFInterpCoef_Q2, 
             sEncCtrl.PredCoef_Q12[ 0 ], sEncCtrl.LTPCoef_Q14, sEncCtrl.AR2_Q13, sEncCtrl.HarmShapeGain_Q14, 
             sEncCtrl.Tilt_Q14, sEncCtrl.LF_shp_Q14, sEncCtrl.Gains_Q16, sEncCtrl.Lambda_Q10, 
             sEncCtrl.LTP_scale_Q14 );
     } else {
         SKP_Silk_NSQ( &psEnc->sCmn, &sEncCtrl.sCmn, &psEnc->sNSQ, xfw, 
-	        &psEnc->sCmn.q[ psEnc->sCmn.nFramesInPayloadBuf *psEnc->sCmn.frame_length ], sEncCtrl.sCmn.NLSFInterpCoef_Q2, 
-	        sEncCtrl.PredCoef_Q12[ 0 ], sEncCtrl.LTPCoef_Q14, sEncCtrl.AR2_Q13, sEncCtrl.HarmShapeGain_Q14, 
-	        sEncCtrl.Tilt_Q14, sEncCtrl.LF_shp_Q14, sEncCtrl.Gains_Q16, sEncCtrl.Lambda_Q10, 
+            psEnc->sCmn.q, sEncCtrl.sCmn.NLSFInterpCoef_Q2, 
+            sEncCtrl.PredCoef_Q12[ 0 ], sEncCtrl.LTPCoef_Q14, sEncCtrl.AR2_Q13, sEncCtrl.HarmShapeGain_Q14, 
+            sEncCtrl.Tilt_Q14, sEncCtrl.LF_shp_Q14, sEncCtrl.Gains_Q16, sEncCtrl.Lambda_Q10, 
             sEncCtrl.LTP_scale_Q14 );
     }
 TOC(NSQ)
@@ -158,7 +158,7 @@
     /**************************************************/
     /* Convert speech activity into VAD and DTX flags */
     /**************************************************/
-    if( psEnc->speech_activity_Q8 < SPEECH_ACTIVITY_DTX_THRES_Q8 ) {
+    if( psEnc->speech_activity_Q8 < SKP_FIX_CONST( SPEECH_ACTIVITY_DTX_THRES, 8 ) ) {
         psEnc->sCmn.vadFlag = NO_VOICE_ACTIVITY;
         psEnc->sCmn.noSpeechCounter++;
         if( psEnc->sCmn.noSpeechCounter > NO_SPEECH_FRAMES_BEFORE_DTX ) {
@@ -175,13 +175,9 @@
     }
 
     /****************************************/
-    /* Initialize arithmetic coder          */
+    /* Initialize range coder               */
     /****************************************/
     if( psEnc->sCmn.nFramesInPayloadBuf == 0 ) {
-        ec_byte_writeinit_buffer( &range_enc_celt_buf, psEnc->sCmn.sRC.buffer, MAX_ARITHM_BYTES );
-        ec_enc_init( &psEnc->sCmn.sRC.range_enc_celt_state, &range_enc_celt_buf );
-
-        SKP_Silk_range_enc_init( &psEnc->sCmn.sRC );
         psEnc->sCmn.nBytesInPayloadBuf = 0;
     }
 
@@ -189,23 +185,24 @@
     /* Encode Parameters                    */
     /****************************************/
 TIC(ENCODE_PARAMS)
-    SKP_Silk_encode_parameters_v4( &psEnc->sCmn, &sEncCtrl.sCmn, &psEnc->sCmn.sRC );
-    FrameTermination_CDF = SKP_Silk_FrameTermination_v4_CDF;
+    SKP_Silk_encode_parameters( &psEnc->sCmn, &sEncCtrl.sCmn, psRangeEnc );
+    FrameTermination_CDF = SKP_Silk_FrameTermination_CDF;
 TOC(ENCODE_PARAMS)
 
     /****************************************/
     /* Update Buffers and State             */
     /****************************************/
-    /* Update Input buffer */
-    SKP_memmove( psEnc->x_buf, &psEnc->x_buf[ psEnc->sCmn.frame_length ], ( psEnc->sCmn.ltp_mem_length + psEnc->sCmn.la_shape ) * sizeof( SKP_int16 ) );
+    /* Update input buffer */
+    SKP_memmove( psEnc->x_buf, &psEnc->x_buf[ psEnc->sCmn.frame_length ], 
+        ( psEnc->sCmn.ltp_mem_length + LA_SHAPE_MS * psEnc->sCmn.fs_kHz ) * sizeof( SKP_int16 ) );
     
-    /* parameters needed for next frame */
+    /* Parameters needed for next frame */
     psEnc->sCmn.prev_sigtype            = sEncCtrl.sCmn.sigtype;
-    psEnc->sCmn.prevLag                 = sEncCtrl.sCmn.pitchL[  psEnc->sCmn.nb_subfr - 1 ];
+    psEnc->sCmn.prevLag                 = sEncCtrl.sCmn.pitchL[ psEnc->sCmn.nb_subfr - 1 ];
     psEnc->sCmn.first_frame_after_reset = 0;
 
-    if( psEnc->sCmn.sRC.error ) {
-        /* encoder returned error: clear payload buffer */
+    if( 0 ) { //psEnc->sCmn.sRC.error ) {
+        /* Encoder returned error: clear payload buffer */
         psEnc->sCmn.nFramesInPayloadBuf = 0;
     } else {
         psEnc->sCmn.nFramesInPayloadBuf++;
@@ -212,7 +209,7 @@
     }
 
     /****************************************/
-    /* finalize payload and copy to output  */
+    /* Finalize payload and copy to output  */
     /****************************************/
     if( psEnc->sCmn.nFramesInPayloadBuf * SUB_FRAME_LENGTH_MS * psEnc->sCmn.nb_subfr >= psEnc->sCmn.PacketSize_ms ) {
 
@@ -219,32 +216,29 @@
         LBRR_idx = ( psEnc->sCmn.oldest_LBRR_idx + 1 ) & LBRR_IDX_MASK;
 
         /* Check if FEC information should be added */
-        frame_terminator = SKP_SILK_LAST_FRAME;
-        if( psEnc->sCmn.LBRR_buffer[ LBRR_idx ].usage == SKP_SILK_ADD_LBRR_TO_PLUS1 ) {
-            frame_terminator = SKP_SILK_LBRR_VER1;
-        }
-        if( psEnc->sCmn.LBRR_buffer[ psEnc->sCmn.oldest_LBRR_idx ].usage == SKP_SILK_ADD_LBRR_TO_PLUS2 ) {
-            frame_terminator = SKP_SILK_LBRR_VER2;
-            LBRR_idx = psEnc->sCmn.oldest_LBRR_idx;
-        }
+        //frame_terminator = psEnc->sCmn.LBRR_buffer[ LBRR_idx ].usage;
+        frame_terminator = SKP_SILK_NO_LBRR;
 
         /* Add the frame termination info to stream */
-        SKP_Silk_range_encoder( &psEnc->sCmn.sRC, frame_terminator, FrameTermination_CDF );
+        ec_encode_bin( psRangeEnc, FrameTermination_CDF[ frame_terminator ], 
+            FrameTermination_CDF[ frame_terminator + 1 ], 16 );
 
         /* Code excitation signal */
-        for( i = 0; i <psEnc->sCmn.nFramesInPayloadBuf; i++ ) {
-            SKP_Silk_encode_pulses( &psEnc->sCmn.sRC, psEnc->sCmn.sigtype[ i ],psEnc->sCmn.QuantOffsetType[ i ], 
-                &psEnc->sCmn.q[ i * psEnc->sCmn.frame_length],psEnc->sCmn.frame_length );
+        for( i = 0; i < psEnc->sCmn.nFramesInPayloadBuf; i++ ) {
+            SKP_Silk_encode_pulses( psRangeEnc, psEnc->sCmn.sigtype[ i ], psEnc->sCmn.QuantOffsetType[ i ], 
+                &psEnc->sCmn.q[ i * psEnc->sCmn.frame_length ], psEnc->sCmn.frame_length );
         }
-        /* payload length so far */
-        SKP_Silk_range_encoder_get_length( &psEnc->sCmn.sRC, &nBytes );
 
-        /* check that there is enough space in external output buffer, and move data */
+        /* Payload length so far */
+        nBytes = SKP_RSHIFT( ec_enc_tell( psRangeEnc, 0 ) + 7, 3 );
+
+        /* Check that there is enough space in external output buffer, and move data */
         if( *pnBytesOut >= nBytes ) {
-            SKP_int bits_in_stream, mask;
-            bits_in_stream = ec_enc_tell( &psEnc->sCmn.sRC.range_enc_celt_state, 0 );
-            ec_enc_done( &psEnc->sCmn.sRC.range_enc_celt_state );
+            //SKP_int bits_in_stream, mask;
+            //bits_in_stream = ec_enc_tell( psRangeEnc, 0 );
+            //ec_enc_done( psRangeEnc );
             
+#if 0
             /* Fill up any remaining bits in the last byte with 1s */
             if( bits_in_stream & 7 ) {
                 mask = SKP_RSHIFT( 0xFF, bits_in_stream & 7 );
@@ -253,7 +247,9 @@
                 }
             }
             SKP_memcpy( pCode, psEnc->sCmn.sRC.range_enc_celt_state.buf->buf, nBytes * sizeof( SKP_uint8 ) );
+#endif
 
+#if 0
             if( frame_terminator > SKP_SILK_MORE_FRAMES && 
                     *pnBytesOut >= nBytes + psEnc->sCmn.LBRR_buffer[ LBRR_idx ].nBytes ) {
                 /* Get old packet and add to payload. */
@@ -262,57 +258,53 @@
                     psEnc->sCmn.LBRR_buffer[ LBRR_idx ].nBytes * sizeof( SKP_uint8 ) );
                 nBytes += psEnc->sCmn.LBRR_buffer[ LBRR_idx ].nBytes;
             }
-                        
+#endif
             *pnBytesOut = nBytes;
-        
+
             /* Update FEC buffer */
             SKP_memcpy( psEnc->sCmn.LBRR_buffer[ psEnc->sCmn.oldest_LBRR_idx ].payload, LBRRpayload, 
                 nBytesLBRR * sizeof( SKP_uint8 ) );
             psEnc->sCmn.LBRR_buffer[ psEnc->sCmn.oldest_LBRR_idx ].nBytes = nBytesLBRR;
-            /* This line tells describes how FEC should be used */
+            /* The line below describes how FEC should be used */
             psEnc->sCmn.LBRR_buffer[ psEnc->sCmn.oldest_LBRR_idx ].usage = sEncCtrl.sCmn.LBRR_usage;
             psEnc->sCmn.oldest_LBRR_idx = ( psEnc->sCmn.oldest_LBRR_idx + 1 ) & LBRR_IDX_MASK;
 
-            /* Reset number of frames in payload buffer */
-            psEnc->sCmn.nFramesInPayloadBuf = 0;
         } else {
             /* Not enough space: Payload will be discarded */
             *pnBytesOut = 0;
             nBytes      = 0;
-            psEnc->sCmn.nFramesInPayloadBuf = 0;
             ret = SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT;
         }
+
+        /* Reset the number of frames in payload buffer */
+        psEnc->sCmn.nFramesInPayloadBuf = 0;
     } else {
-        /* no payload for you this time */
+        /* No payload this time */
         *pnBytesOut = 0;
 
-        /* Encode that more frames follows */
-        frame_terminator = SKP_SILK_MORE_FRAMES;
-        SKP_Silk_range_encoder( &psEnc->sCmn.sRC, frame_terminator, FrameTermination_CDF );
+        /* Payload length so far */
+        nBytes = SKP_RSHIFT( ec_enc_tell( psRangeEnc, 0 ) + 7, 3 );
 
-        /* payload length so far */
-        SKP_Silk_range_encoder_get_length( &psEnc->sCmn.sRC, &nBytes );
-
-        /* Take into account the q signal that isnt in the bitstream yet */
-        nBytes +=  SKP_Silk_pulses_to_bytes( &psEnc->sCmn, 
-            &psEnc->sCmn.q[ (psEnc->sCmn.nFramesInPayloadBuf - 1) * psEnc->sCmn.frame_length ] );
+        /* Take into account the q signal that isn't in the bitstream yet */
+        nBytes += SKP_Silk_pulses_to_bytes( &psEnc->sCmn, 
+            &psEnc->sCmn.q[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ] );
     }
 
     /* Check for arithmetic coder errors */
-    if( psEnc->sCmn.sRC.error ) {
+    if( 0 ) { //psEnc->sCmn.sRC.error ) {
         ret = SKP_SILK_ENC_INTERNAL_ERROR;
     }
 
-    /* simulate number of ms buffered in channel because of exceeding TargetRate */
+    /* Simulate number of ms buffered in channel because of exceeding TargetRate */
     SKP_assert(  ( 8 * 1000 * ( (SKP_int64)nBytes - (SKP_int64)psEnc->sCmn.nBytesInPayloadBuf ) ) == 
         SKP_SAT32( 8 * 1000 * ( (SKP_int64)nBytes - (SKP_int64)psEnc->sCmn.nBytesInPayloadBuf ) ) );
     SKP_assert( psEnc->sCmn.TargetRate_bps > 0 );
-    psEnc->BufferedInChannel_ms   += SKP_DIV32( 8 * 1000 * ( nBytes -psEnc->sCmn.nBytesInPayloadBuf ),psEnc->sCmn.TargetRate_bps );
+    psEnc->BufferedInChannel_ms   += SKP_DIV32( 8 * 1000 * ( nBytes - psEnc->sCmn.nBytesInPayloadBuf ), psEnc->sCmn.TargetRate_bps );
     psEnc->BufferedInChannel_ms   -= SKP_SMULBB( SUB_FRAME_LENGTH_MS, psEnc->sCmn.nb_subfr );
     psEnc->BufferedInChannel_ms    = SKP_LIMIT_int( psEnc->BufferedInChannel_ms, 0, 100 );
     psEnc->sCmn.nBytesInPayloadBuf = nBytes;
 
-    if( psEnc->speech_activity_Q8 > WB_DETECT_ACTIVE_SPEECH_LEVEL_THRES_Q8 ) {
+    if( psEnc->speech_activity_Q8 > SKP_FIX_CONST( WB_DETECT_ACTIVE_SPEECH_LEVEL_THRES, 8 ) ) {
         psEnc->sCmn.sSWBdetect.ActiveSpeech_ms = SKP_ADD_POS_SAT32( psEnc->sCmn.sSWBdetect.ActiveSpeech_ms, SKP_SMULBB( SUB_FRAME_LENGTH_MS, psEnc->sCmn.nb_subfr ) ); 
     }
 
@@ -322,7 +314,7 @@
     {
         SKP_float tmp[ MAX_NB_SUBFR * LTP_ORDER ];
         int i;
-        DEBUG_STORE_DATA( xf.dat,                   x_frame +psEnc->sCmn.la_shape,  psEnc->sCmn.frame_length    * sizeof( SKP_int16 ) );
+        DEBUG_STORE_DATA( xf.dat,                   x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, psEnc->sCmn.frame_length    * sizeof( SKP_int16 ) );
         DEBUG_STORE_DATA( xfw.dat,                  xfw,                            psEnc->sCmn.frame_length    * sizeof( SKP_int16 ) );
         //	DEBUG_STORE_DATA( q.dat,                    &psEnc->sCmn.q[ ( psEnc->sCmn.nFramesInPayloadBuf - 1)*psEnc->sCmn.frame_length ],  psEnc->sCmn.frame_length    * sizeof( SKP_int8 ) );
         DEBUG_STORE_DATA( pitchL.dat,               sEncCtrl.sCmn.pitchL,           psEnc->sCmn.nb_subfr            * sizeof( SKP_int ) );
@@ -368,6 +360,7 @@
     return( ret );
 }
 
+#if 0  //tmp
 /* Low BitRate Redundancy encoding functionality. Reuse all parameters but encode residual with lower bitrate */
 void SKP_Silk_LBRR_encode_FIX(
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  Pointer to Silk encoder state           */
@@ -386,10 +379,10 @@
     /*******************************************/
     /* Control use of inband LBRR              */
     /*******************************************/
-    SKP_Silk_LBRR_ctrl_FIX( psEnc, psEncCtrl );
+    SKP_Silk_LBRR_ctrl_FIX( psEnc, &psEncCtrl->sCmn );
 
     if( psEnc->sCmn.LBRR_enabled ) {
-        /* Save original Gains */
+        /* Save original gains */
         SKP_memcpy( TempGainsIndices, psEncCtrl->sCmn.GainsIndices, MAX_NB_SUBFR * sizeof( SKP_int   ) );
         SKP_memcpy( TempGains_Q16,    psEncCtrl->Gains_Q16,         MAX_NB_SUBFR * sizeof( SKP_int32 ) );
 
@@ -411,37 +404,35 @@
 
         if( psEnc->sCmn.Complexity > 0 && psEnc->sCmn.TargetRate_bps > Rate_only_parameters ) {
             if( psEnc->sCmn.nFramesInPayloadBuf == 0 ) {
-                /* First frame in packet copy Everything */
+                /* First frame in packet; copy everything */
                 SKP_memcpy( &psEnc->sNSQ_LBRR, &psEnc->sNSQ, sizeof( SKP_Silk_nsq_state ) );
-            
+
                 psEnc->sCmn.LBRRprevLastGainIndex = psEnc->sShape.LastGainIndex;
                 /* Increase Gains to get target LBRR rate */
                 psEncCtrl->sCmn.GainsIndices[ 0 ] = psEncCtrl->sCmn.GainsIndices[ 0 ] + psEnc->sCmn.LBRR_GainIncreases;
                 psEncCtrl->sCmn.GainsIndices[ 0 ] = SKP_LIMIT_int( psEncCtrl->sCmn.GainsIndices[ 0 ], 0, N_LEVELS_QGAIN - 1 );
             }
-            /* Decode to get Gains in sync with decoder         */
+            /* Decode to get gains in sync with decoder         */
             /* Overwrite unquantized gains with quantized gains */
             SKP_Silk_gains_dequant( psEncCtrl->Gains_Q16, psEncCtrl->sCmn.GainsIndices, 
                 &psEnc->sCmn.LBRRprevLastGainIndex, psEnc->sCmn.nFramesInPayloadBuf, psEnc->sCmn.nb_subfr );
+
             /*****************************************/
             /* Noise shaping quantization            */
             /*****************************************/
-            if( psEnc->sCmn.nStatesDelayedDecision > 1 ) {
-                SKP_Silk_NSQ_del_dec( &psEnc->sCmn, &psEncCtrl->sCmn,
-                    &psEnc->sNSQ_LBRR, xfw, &psEnc->sCmn.q_LBRR[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ], 
+            if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) {
+                SKP_Silk_NSQ_del_dec( &psEnc->sCmn, &psEncCtrl->sCmn, &psEnc->sNSQ_LBRR, xfw, psEnc->sCmn.q_LBRR, 
                     psEncCtrl->sCmn.NLSFInterpCoef_Q2, psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LTPCoef_Q14, 
                     psEncCtrl->AR2_Q13, psEncCtrl->HarmShapeGain_Q14, psEncCtrl->Tilt_Q14, psEncCtrl->LF_shp_Q14, 
                     psEncCtrl->Gains_Q16, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14 );
             } else {
-                SKP_Silk_NSQ( &psEnc->sCmn, &psEncCtrl->sCmn,
-                    &psEnc->sNSQ_LBRR, xfw, &psEnc->sCmn.q_LBRR[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ], 
+                SKP_Silk_NSQ( &psEnc->sCmn, &psEncCtrl->sCmn, &psEnc->sNSQ_LBRR, xfw, psEnc->sCmn.q_LBRR, 
                     psEncCtrl->sCmn.NLSFInterpCoef_Q2, psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LTPCoef_Q14, 
                     psEncCtrl->AR2_Q13, psEncCtrl->HarmShapeGain_Q14, psEncCtrl->Tilt_Q14, psEncCtrl->LF_shp_Q14, 
                     psEncCtrl->Gains_Q16, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14 );
             }
         } else {
-            SKP_memset( &psEnc->sCmn.q_LBRR[ psEnc->sCmn.nFramesInPayloadBuf *psEnc->sCmn.frame_length ], 0,
-                psEnc->sCmn.frame_length * sizeof( SKP_int ) );
+            SKP_memset( psEnc->sCmn.q_LBRR, 0, psEnc->sCmn.frame_length * sizeof( SKP_int8 ) );
             psEncCtrl->sCmn.LTP_scaleIndex = 0;
         }
         /****************************************/
@@ -458,10 +449,14 @@
         /****************************************/
         /* Encode Parameters                    */
         /****************************************/
-        SKP_Silk_encode_parameters_v4( &psEnc->sCmn, &psEncCtrl->sCmn, &psEnc->sCmn.sRC_LBRR );
+        SKP_Silk_encode_parameters( &psEnc->sCmn, &psEncCtrl->sCmn, 
+            &psEnc->sCmn.sRC_LBRR );
 
+        /****************************************/
+        /* Encode Parameters                    */
+        /****************************************/
         if( psEnc->sCmn.sRC_LBRR.error ) {
-            /* encoder returned error: clear payload buffer */
+            /* Encoder returned error: clear payload buffer */
             nFramesInPayloadBuf = 0;
         } else {
             nFramesInPayloadBuf = psEnc->sCmn.nFramesInPayloadBuf + 1;
@@ -468,7 +463,7 @@
         }
 
         /****************************************/
-        /* finalize payload and copy to output  */
+        /* Finalize payload and copy to output  */
         /****************************************/
         if( SKP_SMULBB( nFramesInPayloadBuf, SKP_SMULBB( SUB_FRAME_LENGTH_MS, psEnc->sCmn.nb_subfr ) ) >= psEnc->sCmn.PacketSize_ms ) {
 
@@ -476,8 +471,9 @@
             frame_terminator = SKP_SILK_LAST_FRAME;
 
             /* Add the frame termination info to stream */
-            SKP_Silk_range_encoder( &psEnc->sCmn.sRC_LBRR, frame_terminator, SKP_Silk_FrameTermination_v4_CDF );
-            
+            ec_encode_bin( psRangeEnc_LBRR, FrameTermination_CDF[ frame_terminator ], 
+                FrameTermination_CDF[ frame_terminator + 1 ], 16 );
+
             /*********************************************/
             /* Encode quantization indices of excitation */
             /*********************************************/
@@ -485,10 +481,11 @@
                 SKP_Silk_encode_pulses( &psEnc->sCmn.sRC_LBRR, psEnc->sCmn.sigtype[ i ], psEnc->sCmn.QuantOffsetType[ i ],
                     &psEnc->sCmn.q_LBRR[ i * psEnc->sCmn.frame_length ], psEnc->sCmn.frame_length );
             }
-            /* payload length so far */
-            SKP_Silk_range_encoder_get_length( &psEnc->sCmn.sRC_LBRR, &nBytes );
 
-            /* check that there is enough space in external output buffer, and move data */
+            /* Payload length so far */
+            nBytes = SKP_RSHIFT( ec_enc_tell( psRangeEnc_LBRR, 0 ) + 7, 3 );
+
+            /* Check that there is enough space in external output buffer and move data */
             if( *pnBytesOut >= nBytes ) {
                 SKP_int bits_in_stream, mask;
                 bits_in_stream = ec_enc_tell( &psEnc->sCmn.sRC_LBRR.range_enc_celt_state, 0 );
@@ -502,28 +499,30 @@
                     }
                 }
                 SKP_memcpy( pCode, psEnc->sCmn.sRC_LBRR.range_enc_celt_state.buf->buf, nBytes * sizeof( SKP_uint8 ) );
-//#endif
+
                 *pnBytesOut = nBytes;
             } else {
-                /* not enough space: payload will be discarded */
+                /* Not enough space: payload will be discarded */
                 *pnBytesOut = 0;
                 SKP_assert( 0 );
             }
         } else {
-            /* no payload for you this time */
+            /* No payload this time */
             *pnBytesOut = 0;
 
             /* Encode that more frames follows */
             frame_terminator = SKP_SILK_MORE_FRAMES;
-            SKP_Silk_range_encoder( &psEnc->sCmn.sRC_LBRR, frame_terminator, SKP_Silk_FrameTermination_v4_CDF );
+            ec_encode_bin( psRangeEnc_LBRR, FrameTermination_CDF[ frame_terminator ], 
+                FrameTermination_CDF[ frame_terminator + 1 ], 16 );
         }
 
         /* Restore original Gains */
-        SKP_memcpy( psEncCtrl->sCmn.GainsIndices, TempGainsIndices, MAX_NB_SUBFR * sizeof( SKP_int   ) );
-        SKP_memcpy( psEncCtrl->Gains_Q16,         TempGains_Q16,    MAX_NB_SUBFR * sizeof( SKP_int32 ) );
+        SKP_memcpy( psEncCtrl->sCmn.GainsIndices, TempGainsIndices, psEnc->sCmn.nb_subfr * sizeof( SKP_int   ) );
+        SKP_memcpy( psEncCtrl->Gains_Q16,         TempGains_Q16,    psEnc->sCmn.nb_subfr * sizeof( SKP_int32 ) );
     
         /* Restore LTP scale index and typeoffset */
         psEncCtrl->sCmn.LTP_scaleIndex = LTP_scaleIndex;
-        psEnc->sCmn.typeOffsetPrev = typeOffset;
+        psEnc->sCmn.typeOffsetPrev     = typeOffset;
     }
 }
+#endif
--- a/src_FIX/SKP_Silk_find_LPC_FIX.c
+++ b/src_FIX/SKP_Silk_find_LPC_FIX.c
@@ -26,6 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /* Finds LPC vector from correlations, and converts to NLSF */
 void SKP_Silk_find_LPC_FIX(
@@ -41,7 +42,6 @@
 {
     SKP_int     k;
     SKP_int32   a_Q16[ MAX_LPC_ORDER ];
-
     SKP_int     isInterpLower, shift;
     SKP_int16   S[ MAX_LPC_ORDER ];
     SKP_int32   res_nrg0, res_nrg1;
@@ -58,13 +58,17 @@
     *interpIndex = 4;
 
     /* Burg AR analysis for the full frame */
-    SKP_Silk_burg_modified( &res_nrg, &res_nrg_Q, a_Q16, x, subfr_length, nb_subfr, FIND_LPC_COND_FAC_Q32, LPC_order );
+    SKP_Silk_burg_modified( &res_nrg, &res_nrg_Q, a_Q16, x, subfr_length, nb_subfr, SKP_FIX_CONST( FIND_LPC_COND_FAC, 32 ), LPC_order );
 
+    SKP_Silk_bwexpander_32( a_Q16, LPC_order, SKP_FIX_CONST( FIND_LPC_CHIRP, 16 ) );
+
     if( useInterpolatedNLSFs == 1 && nb_subfr == MAX_NB_SUBFR ) {
 
         /* Optimal solution for last 10 ms */
         SKP_Silk_burg_modified( &res_tmp_nrg, &res_tmp_nrg_Q, a_tmp_Q16, x + ( MAX_NB_SUBFR >> 1 ) * subfr_length, 
-            subfr_length, ( MAX_NB_SUBFR >> 1 ), FIND_LPC_COND_FAC_Q32, LPC_order );
+            subfr_length, ( MAX_NB_SUBFR >> 1 ), SKP_FIX_CONST( FIND_LPC_COND_FAC, 32 ), LPC_order );
+
+        SKP_Silk_bwexpander_32( a_tmp_Q16, LPC_order, SKP_FIX_CONST( FIND_LPC_CHIRP, 16 ) );
 
         /* subtract residual energy here, as that's easier than adding it to the    */
         /* residual energy of the first 10 ms in each iteration of the search below */
--- a/src_FIX/SKP_Silk_find_LTP_FIX.c
+++ b/src_FIX/SKP_Silk_find_LTP_FIX.c
@@ -26,7 +26,11 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
+#include "SKP_Silk_tuning_parameters.h"
 
+/* Head room for correlations                           */
+#define LTP_CORRS_HEAD_ROOM                             2
+
 void SKP_Silk_fit_LTP(
     SKP_int32 LTP_coefs_Q16[ LTP_ORDER ],
     SKP_int16 LTP_coefs_Q14[ LTP_ORDER ]
@@ -68,22 +72,24 @@
         lag_ptr = r_ptr - ( lag[ k ] + LTP_ORDER / 2 );
 
         SKP_Silk_sum_sqr_shift( &rr[ k ], &rr_shifts, r_ptr, subfr_length ); /* rr[ k ] in Q( -rr_shifts ) */
+
         /* Assure headroom */
         LZs = SKP_Silk_CLZ32( rr[k] );
         if( LZs < LTP_CORRS_HEAD_ROOM ) {
             rr[ k ] = SKP_RSHIFT_ROUND( rr[ k ], LTP_CORRS_HEAD_ROOM - LZs );
-            rr_shifts += (LTP_CORRS_HEAD_ROOM - LZs);
+            rr_shifts += ( LTP_CORRS_HEAD_ROOM - LZs );
         }
         corr_rshifts[ k ] = rr_shifts;
-        SKP_Silk_corrMatrix_FIX( lag_ptr, subfr_length, LTP_ORDER, WLTP_ptr, &corr_rshifts[ k ] );     /* WLTP_fix_ptr in Q( -corr_rshifts[ k ] ) */
-        /* The correlation vector always have lower max abs value than rr and/or RR so head room is assured */
-        SKP_Silk_corrVector_FIX( lag_ptr, r_ptr, subfr_length, LTP_ORDER, Rr, corr_rshifts[ k ] ); /* Rr_fix_ptr   in Q( -corr_rshifts[ k ] ) */
+        SKP_Silk_corrMatrix_FIX( lag_ptr, subfr_length, LTP_ORDER, LTP_CORRS_HEAD_ROOM, WLTP_ptr, &corr_rshifts[ k ] );  /* WLTP_fix_ptr in Q( -corr_rshifts[ k ] ) */
+
+        /* The correlation vector always has lower max abs value than rr and/or RR so head room is assured */
+        SKP_Silk_corrVector_FIX( lag_ptr, r_ptr, subfr_length, LTP_ORDER, Rr, corr_rshifts[ k ] );  /* Rr_fix_ptr   in Q( -corr_rshifts[ k ] ) */
         if( corr_rshifts[ k ] > rr_shifts ) {
             rr[ k ] = SKP_RSHIFT( rr[ k ], corr_rshifts[ k ] - rr_shifts ); /* rr[ k ] in Q( -corr_rshifts[ k ] ) */
         }
         SKP_assert( rr[ k ] >= 0 );
 
-        regu = SKP_SMULWB( rr[ k ] + 1, LTP_DAMPING_Q16 );
+        regu = SKP_SMULWB( rr[ k ] + 1, SKP_FIX_CONST( LTP_DAMPING, 16 ) );
         SKP_Silk_regularize_correlations_FIX( WLTP_ptr, &rr[k], regu, LTP_ORDER );
 
         SKP_Silk_solve_LDL_FIX( WLTP_ptr, LTP_ORDER, Rr, b_Q16 ); /* WLTP_fix_ptr and Rr_fix_ptr both in Q(-corr_rshifts[k]) */
@@ -96,12 +102,12 @@
 
         /* temp = Wght[ k ] / ( nrg[ k ] * Wght[ k ] + 0.01f * subfr_length ); */
         extra_shifts = SKP_min_int( corr_rshifts[ k ], LTP_CORRS_HEAD_ROOM );
-        denom32 = SKP_LSHIFT_SAT32( SKP_SMULWB( nrg[ k ], Wght_Q15[ k ] ), 1 + extra_shifts ) +  /* Q( -corr_rshifts[ k ] + extra_shifts ) */
-            SKP_RSHIFT( SKP_SMULWB( subfr_length, 655 ), corr_rshifts[ k ] - extra_shifts );     /* Q( -corr_rshifts[ k ] + extra_shifts ) */
+        denom32 = SKP_LSHIFT_SAT32( SKP_SMULWB( nrg[ k ], Wght_Q15[ k ] ), 1 + extra_shifts ) + /* Q( -corr_rshifts[ k ] + extra_shifts ) */
+            SKP_RSHIFT( SKP_SMULWB( subfr_length, 655 ), corr_rshifts[ k ] - extra_shifts );    /* Q( -corr_rshifts[ k ] + extra_shifts ) */
         denom32 = SKP_max( denom32, 1 );
-        SKP_assert( ((SKP_int64)Wght_Q15[ k ] << 16 ) < SKP_int32_MAX ); /* Wght always < 0.5 in Q0 */
-        temp32 = SKP_DIV32( SKP_LSHIFT( ( SKP_int32 )Wght_Q15[ k ], 16 ), denom32 );  /* Q( 15 + 16 + corr_rshifts[k] - extra_shifts ) */
-        temp32 = SKP_RSHIFT( temp32, 31 + corr_rshifts[ k ] - extra_shifts - 26 );  /* Q26 */
+        SKP_assert( ((SKP_int64)Wght_Q15[ k ] << 16 ) < SKP_int32_MAX );                        /* Wght always < 0.5 in Q0 */
+        temp32 = SKP_DIV32( SKP_LSHIFT( ( SKP_int32 )Wght_Q15[ k ], 16 ), denom32 );            /* Q( 15 + 16 + corr_rshifts[k] - extra_shifts ) */
+        temp32 = SKP_RSHIFT( temp32, 31 + corr_rshifts[ k ] - extra_shifts - 26 );              /* Q26 */
         
         /* Limit temp such that the below scaling never wraps around */
         WLTP_max = 0;
@@ -129,7 +135,7 @@
         maxRshifts = SKP_max_int( corr_rshifts[ k ], maxRshifts );
     }
 
-    /* compute LTP coding gain */
+    /* Compute LTP coding gain */
     if( LTPredCodGain_Q7 != NULL ) {
         LPC_LTP_res_nrg = 0;
         LPC_res_nrg     = 0;
@@ -201,8 +207,8 @@
 
         g_Q26 = SKP_MUL( 
             SKP_DIV32( 
-                LTP_SMOOTHING_Q26, 
-                SKP_RSHIFT( LTP_SMOOTHING_Q26, 10 ) + temp32 ),                                       /* Q10 */ 
+                SKP_FIX_CONST( LTP_SMOOTHING, 26 ), 
+                SKP_RSHIFT( SKP_FIX_CONST( LTP_SMOOTHING, 26 ), 10 ) + temp32 ),                                       /* Q10 */ 
             SKP_LSHIFT_SAT32( SKP_SUB_SAT32( ( SKP_int32 )m_Q12, SKP_RSHIFT( d_Q14[ k ], 2 ) ), 4 ) );  /* Q16 */
 
         temp32 = 0;
--- a/src_FIX/SKP_Silk_find_pitch_lags_FIX.c
+++ b/src_FIX/SKP_Silk_find_pitch_lags_FIX.c
@@ -26,7 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
-#include "SKP_Silk_common_pitch_est_defines.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /* Find pitch lags */
 void SKP_Silk_find_pitch_lags_FIX(
@@ -38,7 +38,7 @@
 {
     SKP_Silk_predict_state_FIX *psPredSt = &psEnc->sPred;
     SKP_int   buf_len, i, scale;
-    SKP_int32 thrhld_Q15;
+    SKP_int32 thrhld_Q15, res_nrg;
     const SKP_int16 *x_buf, *x_buf_ptr;
     SKP_int16 Wsig[      FIND_PITCH_LPC_WIN_MAX ], *Wsig_ptr;
     SKP_int32 auto_corr[ MAX_FIND_PITCH_LPC_ORDER + 1 ];
@@ -81,13 +81,16 @@
     /* Calculate autocorrelation sequence */
     SKP_Silk_autocorr( auto_corr, &scale, Wsig, psPredSt->pitch_LPC_win_length, psEnc->sCmn.pitchEstimationLPCOrder + 1 ); 
         
-    /* add white noise, as fraction of energy */
-    auto_corr[ 0 ] = SKP_SMLAWB( auto_corr[ 0 ], auto_corr[ 0 ], FIND_PITCH_WHITE_NOISE_FRACTION_Q16 );
+    /* Add white noise, as fraction of energy */
+    auto_corr[ 0 ] = SKP_SMLAWB( auto_corr[ 0 ], auto_corr[ 0 ], SKP_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTION, 16 ) );
 
-    /* calculate the reflection coefficients using schur */
-    SKP_Silk_schur( rc_Q15, auto_corr, psEnc->sCmn.pitchEstimationLPCOrder );
+    /* Calculate the reflection coefficients using schur */
+    res_nrg = SKP_Silk_schur( rc_Q15, auto_corr, psEnc->sCmn.pitchEstimationLPCOrder );
 
-    /* convert reflection coefficients to prediction coefficients */
+    /* Prediction gain */
+    psEncCtrl->predGain_Q16 = SKP_DIV32_varQ( auto_corr[ 0 ], SKP_max_int( res_nrg, 1 ), 16 );
+
+    /* Convert reflection coefficients to prediction coefficients */
     SKP_Silk_k2a( A_Q24, rc_Q15, psEnc->sCmn.pitchEstimationLPCOrder );
     
     /* Convert From 32 bit Q24 to 16 bit Q12 coefs */
@@ -96,7 +99,7 @@
     }
 
     /* Do BWE */
-    SKP_Silk_bwexpander( A_Q12, psEnc->sCmn.pitchEstimationLPCOrder, FIND_PITCH_BANDWITH_EXPANSION_Q16 );
+    SKP_Silk_bwexpander( A_Q12, psEnc->sCmn.pitchEstimationLPCOrder, SKP_FIX_CONST( FIND_PITCH_BANDWITH_EXPANSION, 16 ) );
     
     /*****************************************/
     /* LPC analysis filtering                */
@@ -106,11 +109,11 @@
     SKP_memset( res, 0, psEnc->sCmn.pitchEstimationLPCOrder * sizeof( SKP_int16 ) );
 
     /* Threshold for pitch estimator */
-    thrhld_Q15 = ( 1 << 14 ); // 0.5f in Q15
-    thrhld_Q15 = SKP_SMLABB( thrhld_Q15, -131, psEnc->sCmn.pitchEstimationLPCOrder );
-    thrhld_Q15 = SKP_SMLABB( thrhld_Q15,  -13, ( SKP_int16 )SKP_Silk_SQRT_APPROX( SKP_LSHIFT( ( SKP_int32 )psEnc->speech_activity_Q8, 8 ) ) );
-    thrhld_Q15 = SKP_SMLABB( thrhld_Q15, 4587, psEnc->sCmn.prev_sigtype );
-    thrhld_Q15 = SKP_MLA(    thrhld_Q15,  -31, SKP_RSHIFT( psEncCtrl->input_tilt_Q15, 8 ) );
+    thrhld_Q15 = SKP_FIX_CONST( 0.45, 15 );
+    thrhld_Q15 = SKP_SMLABB( thrhld_Q15, SKP_FIX_CONST( -0.004, 15 ), psEnc->sCmn.pitchEstimationLPCOrder );
+    thrhld_Q15 = SKP_SMLABB( thrhld_Q15, SKP_FIX_CONST( -0.1,   7  ), psEnc->speech_activity_Q8 );
+    thrhld_Q15 = SKP_SMLABB( thrhld_Q15, SKP_FIX_CONST(  0.15,  15 ), psEnc->sCmn.prev_sigtype );
+    thrhld_Q15 = SKP_SMLAWB( thrhld_Q15, SKP_FIX_CONST( -0.1,   16 ), psEncCtrl->input_tilt_Q15 );
     thrhld_Q15 = SKP_SAT16(  thrhld_Q15 );
 
     /*****************************************/
@@ -118,7 +121,7 @@
     /*****************************************/
 TIC(pitch_analysis_core_FIX)
     psEncCtrl->sCmn.sigtype = SKP_Silk_pitch_analysis_core( res, psEncCtrl->sCmn.pitchL, &psEncCtrl->sCmn.lagIndex, 
-        &psEncCtrl->sCmn.contourIndex, &psEnc->LTPCorr_Q15, psEnc->sCmn.prevLag, psEnc->pitchEstimationThreshold_Q16, 
+        &psEncCtrl->sCmn.contourIndex, &psEnc->LTPCorr_Q15, psEnc->sCmn.prevLag, psEnc->sCmn.pitchEstimationThreshold_Q16, 
         ( SKP_int16 )thrhld_Q15, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, psEnc->sCmn.nb_subfr );
 TOC(pitch_analysis_core_FIX)
 }
--- a/src_FIX/SKP_Silk_find_pred_coefs_FIX.c
+++ b/src_FIX/SKP_Silk_find_pred_coefs_FIX.c
@@ -228,8 +228,8 @@
 
         /* Weighted input energy */
         in_ptr = &x_flp[ psEnc->sCmn.ltp_mem_length ];
-        DEBUG_STORE_DATA( x_flp.dat, x_flp, psEnc->sCmn.frame_length * sizeof(SKP_float));
-        DEBUG_STORE_DATA( in_ptr.dat, in_ptr, psEnc->sCmn.frame_length * sizeof(SKP_float));
+        DEBUG_STORE_DATA( x_flp.dat,  x_flp,  psEnc->sCmn.frame_length * sizeof( SKP_float ) );
+        DEBUG_STORE_DATA( in_ptr.dat, in_ptr, psEnc->sCmn.frame_length * sizeof( SKP_float ) );
         in_nrg = 0.0f;
         for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
             in_nrg += (SKP_float)SKP_Silk_energy_FLP( in_ptr, psEnc->sCmn.subfr_length ) * Wght[ k ];
@@ -241,15 +241,15 @@
         }
 
         DEBUG_STORE_DATA( uq_PredCoef.dat, uq_PredCoef[0], psEnc->sCmn.predictLPCOrder * sizeof( SKP_float ) );
-        DEBUG_STORE_DATA( PredCoef.dat, PredCoef[0], psEnc->sCmn.predictLPCOrder * sizeof( SKP_float ) );
+        DEBUG_STORE_DATA( PredCoef.dat,    PredCoef[0],    psEnc->sCmn.predictLPCOrder * sizeof( SKP_float ) );
 
         LPC_res_nrg  = 0.0f;
         LTP_res_nrg  = 0.0f;
         qLPC_res_nrg = 0.0f;
         qLTP_res_nrg = 0.0f;
-        for( j = 0; j < psEnc->sCmn.nb_subfr; j+=2 ) {
+        for( j = 0; j < psEnc->sCmn.nb_subfr; j += 2 ) {
             /* Calculate LPC residual with unquantized LPC */
-            SKP_Silk_LPC_analysis_filter_FLP( LPC_res, uq_PredCoef[ j >> 1 ], &x_flp[ j * psEnc->sCmn.subfr_length ],
+            SKP_Silk_LPC_analysis_filter_FLP( LPC_res, uq_PredCoef[ j >> 1 ], x_flp + j * psEnc->sCmn.subfr_length,
                 ( psEnc->sCmn.ltp_mem_length + ( psEnc->sCmn.subfr_length << 1 ) ), psEnc->sCmn.predictLPCOrder );
 
             /* Weighted energy */
@@ -273,7 +273,7 @@
             }
 
             /* Calculate LPC residual with quantized LPC */
-            SKP_Silk_LPC_analysis_filter_FLP( LPC_res, PredCoef[ j >> 1 ], &x_flp[ j * psEnc->sCmn.subfr_length ],
+            SKP_Silk_LPC_analysis_filter_FLP( LPC_res, PredCoef[ j >> 1 ], x_flp + j * psEnc->sCmn.subfr_length,
                 ( psEnc->sCmn.ltp_mem_length + ( psEnc->sCmn.subfr_length << 1 ) ), psEnc->sCmn.predictLPCOrder );
 
             /* Weighted energy */
@@ -300,8 +300,8 @@
                 SKP_memcpy( LTP_res, &LPC_res[ psEnc->sCmn.ltp_mem_length ], ( psEnc->sCmn.subfr_length << 1 ) * sizeof( SKP_float ) );
             }
             /* Save residual */
-            DEBUG_STORE_DATA( LPC_res.dat,          &LPC_res[ psEnc->sCmn.ltp_mem_length ], (psEnc->sCmn.subfr_length << 1) * sizeof( SKP_float ) );
-            DEBUG_STORE_DATA( res.dat,              LTP_res,                              ( psEnc->sCmn.subfr_length << 1 ) * sizeof( SKP_float ) );
+            DEBUG_STORE_DATA( LPC_res.dat, &LPC_res[ psEnc->sCmn.ltp_mem_length ], ( psEnc->sCmn.subfr_length << 1 ) * sizeof( SKP_float ) );
+            DEBUG_STORE_DATA( res.dat,     LTP_res,                                ( psEnc->sCmn.subfr_length << 1 ) * sizeof( SKP_float ) );
         }
         if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
             LPC_predCodGain  = 3.0f * SKP_Silk_log2( in_nrg       / LPC_res_nrg  );
@@ -321,7 +321,7 @@
         DEBUG_STORE_DATA( LPC_predCodGain.dat,  &LPC_predCodGain,                                      sizeof( SKP_float ) );
         DEBUG_STORE_DATA( QLPC_predCodGain.dat, &QLPC_predCodGain,                                     sizeof( SKP_float ) );
         DEBUG_STORE_DATA( predCodGain.dat,      &predCodGain,                                          sizeof( SKP_float ) ); 
-        DEBUG_STORE_DATA( ResNrg.dat,           SF_resNrg,                                  psEnc->sCmn.nb_subfr * sizeof( SKP_float ) );
+        DEBUG_STORE_DATA( ResNrg.dat,           SF_resNrg,                      psEnc->sCmn.nb_subfr * sizeof( SKP_float ) );
     }
 #endif
 }
@@ -425,18 +425,4 @@
     SKP_assert( result >= 0.0 );
     return result;
 }
-
-/* integer to floating-point conversion */
-SKP_INLINE void SKP_short2float_array(
-	SKP_float		*out, 
-	const SKP_int16 *in, 
-	SKP_int32		length
-) 
-{
-	SKP_int32 k;
-	for (k = length-1; k >= 0; k--) {
-		out[k] = (SKP_float)in[k];
-	}
-}
-
 #endif
--- a/src_FIX/SKP_Silk_init_encoder_FIX.c
+++ b/src_FIX/SKP_Silk_init_encoder_FIX.c
@@ -37,9 +37,6 @@
     /* Clear the entire encoder state */
     SKP_memset( psEnc, 0, sizeof( SKP_Silk_encoder_state_FIX ) );
 
-    /* Initialize to 24 kHz API sampling, 24 kHz max internal sampling, 20 ms packets, 25 kbps, 0% packet loss, and init non-zero values */
-    ret = SKP_Silk_control_encoder_FIX( psEnc, 24000, 24, 20, 25, 0, 0, 0, 10, 0 );
-
 #if HIGH_PASS_INPUT
     psEnc->variable_HP_smth1_Q15 = 200844; /* = SKP_Silk_log2(70)_Q0; */
     psEnc->variable_HP_smth2_Q15 = 200844; /* = SKP_Silk_log2(70)_Q0; */
@@ -47,8 +44,6 @@
 
     /* Used to deactivate e.g. LSF interpolation and fluctuation reduction */
     psEnc->sCmn.first_frame_after_reset = 1;
-    psEnc->sCmn.fs_kHz_changed          = 0;
-    psEnc->sCmn.LBRR_enabled            = 0;
 
     /* Initialize Silk VAD */
     ret += SKP_Silk_VAD_Init( &psEnc->sCmn.sVAD );
--- a/src_FIX/SKP_Silk_main_FIX.h
+++ b/src_FIX/SKP_Silk_main_FIX.h
@@ -28,11 +28,9 @@
 #ifndef SKP_SILK_MAIN_FIX_H
 #define SKP_SILK_MAIN_FIX_H
 
-#include <stdlib.h>
 #include "SKP_Silk_SigProc_FIX.h"
 #include "SKP_Silk_structs_FIX.h"
 #include "SKP_Silk_main.h"
-#include "SKP_Silk_define_FIX.h"
 #include "SKP_Silk_PLC.h"
 #include "SKP_debug.h"
 #include "entenc.h"
@@ -48,51 +46,46 @@
 /* Encoder Functions */
 /*********************/
 
-/* Initializes the Silk encoder state */
-SKP_int SKP_Silk_init_encoder_FIX(
-    SKP_Silk_encoder_state_FIX  *psEnc              /* I/O  Pointer to Silk FIX encoder state           */
+/* High-pass filter with cutoff frequency adaptation based on pitch lag statistics */
+void SKP_Silk_HP_variable_cutoff_FIX(
+    SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  Encoder state                               */
+    SKP_Silk_encoder_control_FIX    *psEncCtrl,     /* I/O  Encoder control                             */
+    SKP_int16                       *out,           /* O    high-pass filtered output signal            */
+    const SKP_int16                 *in             /* I    input signal                                */
 );
 
-/* Control the Silk encoder */
-SKP_int SKP_Silk_control_encoder_FIX( 
-    SKP_Silk_encoder_state_FIX  *psEnc,             /* I/O  Pointer to Silk encoder state                   */
-    const SKP_int32             API_fs_Hz,          /* I    External (API) sampling rate (Hz)               */
-    const SKP_int               max_internal_fs_kHz,/* I    Maximum internal sampling rate (kHz)            */
-    const SKP_int               PacketSize_ms,      /* I    Packet length (ms)                              */
-    SKP_int32                   TargetRate_bps,     /* I    Target max bitrate (bps) (used if SNR_dB == 0)  */
-    const SKP_int               PacketLoss_perc,    /* I    Packet loss rate (in percent)                   */
-    const SKP_int               INBandFEC_enabled,  /* I    Enable (1) / disable (0) inband FEC             */
-    const SKP_int               DTX_enabled,        /* I    Enable / disable DTX                            */
-    const SKP_int               InputFramesize_ms,  /* I    Inputframe in ms                                */
-    const SKP_int               Complexity          /* I    Complexity (0->low; 1->medium; 2->high)         */
-);
-
 /* Encoder main function */
 SKP_int SKP_Silk_encode_frame_FIX( 
-    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O  Pointer to Silk FIX encoder state           */
-    SKP_uint8                       *pCode,             /* O    Pointer to payload                          */
-    SKP_int16                       *pnBytesOut,        /* I/O  Pointer to number of payload bytes;         */
-                                                        /*      input: max length; output: used             */
-    const SKP_int16                 *pIn                /* I    Pointer to input speech frame               */
+    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O  Pointer to Silk FIX encoder state       */
+    SKP_int32                       *pnBytesOut,        /* I/O  Pointer to number of payload bytes;     */
+                                                        /*      input: max length; output: used         */
+    ec_enc                          *psRangeEnc,        /* I/O  compressor data structure               */
+    const SKP_int16                 *pIn                /* I    Pointer to input speech frame           */
 );
 
-/* Low BitRate Redundancy encoding functionality. Reuse all parameters but encode with lower bitrate */
+/* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate           */
 void SKP_Silk_LBRR_encode_FIX(
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  Pointer to Silk FIX encoder state           */
     SKP_Silk_encoder_control_FIX    *psEncCtrl,     /* I/O  Pointer to Silk FIX encoder control struct  */
     SKP_uint8                       *pCode,         /* O    Pointer to payload                          */
-    SKP_int16                       *pnBytesOut,    /* I/O  Pointer to number of payload bytes          */
+    SKP_int32                       *pnBytesOut,    /* I/O  Pointer to number of payload bytes          */
     SKP_int16                       xfw[]           /* I    Input signal                                */
 );
 
-/* High-pass filter with cutoff frequency adaptation based on pitch lag statistics */
-void SKP_Silk_HP_variable_cutoff_FIX(
-    SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  Encoder state                               */
-    SKP_Silk_encoder_control_FIX    *psEncCtrl,     /* I/O  Encoder control                             */
-    SKP_int16                       *out,           /* O    high-pass filtered output signal            */
-    const SKP_int16                 *in             /* I    input signal                                */
+/* Initializes the Silk encoder state */
+SKP_int SKP_Silk_init_encoder_FIX(
+    SKP_Silk_encoder_state_FIX  *psEnc              /* I/O  Pointer to Silk FIX encoder state           */
 );
 
+/* Control the Silk encoder */
+SKP_int SKP_Silk_control_encoder_FIX( 
+    SKP_Silk_encoder_state_FIX  *psEnc,                 /* I/O  Pointer to Silk encoder state           */
+    const SKP_int               PacketSize_ms,          /* I    Packet length (ms)                      */
+    const SKP_int32             TargetRate_bps,         /* I    Target max bitrate (bps)                */
+    const SKP_int               PacketLoss_perc,        /* I    Packet loss rate (in percent)           */
+    const SKP_int               Complexity              /* I    Complexity (0->low; 1->medium; 2->high) */
+);
+
 /****************/
 /* Prefiltering */
 /****************/
@@ -103,9 +96,10 @@
     const SKP_int16                     x[]             /* I    Speech signal                               */
 );
 
-/**************************************************************/
+/**************************/
+/* Noise shaping analysis */
+/**************************/
 /* Compute noise shaping coefficients and initial gain values */
-/**************************************************************/
 void SKP_Silk_noise_shape_analysis_FIX(
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  Encoder state FIX                           */
     SKP_Silk_encoder_control_FIX    *psEncCtrl,     /* I/O  Encoder control FIX                         */
@@ -118,21 +112,15 @@
           SKP_int32                 *corr,              /* O    Result [order + 1]                      */
           SKP_int                   *scale,             /* O    Scaling of the correlation vector       */
     const SKP_int16                 *input,             /* I    Input data to correlate                 */
-    const SKP_int16                 warping_Q16,        /* I    Warping coefficient                     */
+    const SKP_int                   warping_Q16,        /* I    Warping coefficient                     */
     const SKP_int                   length,             /* I    Length of input                         */
     const SKP_int                   order               /* I    Correlation order (even)                */
 );
 
-/* Processing of gains */
-void SKP_Silk_process_gains_FIX(
-    SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  Encoder state                               */
-    SKP_Silk_encoder_control_FIX    *psEncCtrl      /* I/O  Encoder control                             */
-);
-
 /* Control low bitrate redundancy usage */
 void SKP_Silk_LBRR_ctrl_FIX(
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  encoder state                               */
-    SKP_Silk_encoder_control_FIX    *psEncCtrl      /* I/O  encoder control                             */
+    SKP_Silk_encoder_control        *psEncCtrlC     /* I/O  encoder control                             */
 );
 
 /* Calculation of LTP state scaling */
@@ -144,7 +132,6 @@
 /**********************************************/
 /* Prediction Analysis                        */
 /**********************************************/
-
 /* Find pitch lags */
 void SKP_Silk_find_pitch_lags_FIX(
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  encoder state                               */
@@ -153,6 +140,7 @@
     const SKP_int16                 x[]             /* I    Speech signal                               */
 );
 
+/* Find LPC and LTP coefficients */
 void SKP_Silk_find_pred_coefs_FIX(
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  encoder state                               */
     SKP_Silk_encoder_control_FIX    *psEncCtrl,     /* I/O  encoder control                             */
@@ -159,6 +147,7 @@
     const SKP_int16                 res_pitch[]     /* I    Residual from pitch analysis                */
 );
 
+/* LPC analysis */
 void SKP_Silk_find_LPC_FIX(
     SKP_int             NLSF_Q15[],                 /* O    NLSFs                                                                       */
     SKP_int             *interpIndex,               /* O    NLSF interpolation index, only used for NLSF interpolation                  */
@@ -170,18 +159,7 @@
     const SKP_int       nb_subfr                    /* I:   Number of subframes                                                         */
 );
 
-void SKP_Silk_LTP_analysis_filter_FIX(
-    SKP_int16           *LTP_res,                               /* O:   LTP residual signal of length MAX_NB_SUBFR * ( pre_length + subfr_length )  */
-    const SKP_int16     *x,                                     /* I:   Pointer to input signal with at least max( pitchL ) preceeding samples      */
-    const SKP_int16     LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],/* I:   LTP_ORDER LTP coefficients for each MAX_NB_SUBFR subframe                   */
-    const SKP_int       pitchL[ MAX_NB_SUBFR ],                 /* I:   Pitch lag, one for each subframe                                            */
-    const SKP_int32     invGains_Q16[ MAX_NB_SUBFR ],           /* I:   Inverse quantization gains, one for each subframe                           */
-    const SKP_int       subfr_length,                           /* I:   Length of each subframe                                                     */
-    const SKP_int       nb_subfr,                               /* I:   Number of subframes                                                         */
-    const SKP_int       pre_length                              /* I:   Length of the preceeding samples starting at &x[0] for each subframe        */
-);
-
-/* Finds LTP vector from correlations */
+/* LTP analysis */
 void SKP_Silk_find_LTP_FIX(
     SKP_int16           b_Q14[ MAX_NB_SUBFR * LTP_ORDER ],              /* O    LTP coefs                                                   */
     SKP_int32           WLTP[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ],   /* O    Weight for LTP quantization                                 */
@@ -195,6 +173,30 @@
     SKP_int             corr_rshifts[ MAX_NB_SUBFR ]                    /* O    right shifts applied to correlations                        */
 );
 
+void SKP_Silk_LTP_analysis_filter_FIX(
+    SKP_int16           *LTP_res,                               /* O:   LTP residual signal of length MAX_NB_SUBFR * ( pre_length + subfr_length )  */
+    const SKP_int16     *x,                                     /* I:   Pointer to input signal with at least max( pitchL ) preceeding samples      */
+    const SKP_int16     LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ],/* I:   LTP_ORDER LTP coefficients for each MAX_NB_SUBFR subframe                   */
+    const SKP_int       pitchL[ MAX_NB_SUBFR ],                 /* I:   Pitch lag, one for each subframe                                            */
+    const SKP_int32     invGains_Q16[ MAX_NB_SUBFR ],           /* I:   Inverse quantization gains, one for each subframe                           */
+    const SKP_int       subfr_length,                           /* I:   Length of each subframe                                                     */
+    const SKP_int       nb_subfr,                               /* I:   Number of subframes                                                         */
+    const SKP_int       pre_length                              /* I:   Length of the preceeding samples starting at &x[0] for each subframe        */
+);
+
+/* Calculates residual energies of input subframes where all subframes have LPC_order   */
+/* of preceeding samples                                                                */
+void SKP_Silk_residual_energy_FIX(
+          SKP_int32 nrgs[ MAX_NB_SUBFR ],           /* O    Residual energy per subframe    */
+          SKP_int   nrgsQ[ MAX_NB_SUBFR ],          /* O    Q value per subframe            */
+    const SKP_int16 x[],                            /* I    Input signal                    */
+    const SKP_int16 a_Q12[ 2 ][ MAX_LPC_ORDER ],    /* I    AR coefs for each frame half    */
+    const SKP_int32 gains[ MAX_NB_SUBFR ],          /* I    Quantization gains              */
+    const SKP_int   subfr_length,                   /* I    Subframe length                 */
+    const SKP_int   nb_subfr,                       /* I    Number of subframes             */
+    const SKP_int   LPC_order                       /* I    LPC order                       */
+);
+
 /* LTP tap quantizer */
 void SKP_Silk_quant_LTP_gains_FIX(
     SKP_int16           B_Q14[],                /* I/O  (un)quantized LTP gains     */
@@ -209,7 +211,6 @@
 /******************/
 /* NLSF Quantizer */
 /******************/
-
 /* Limit, stabilize, convert and quantize NLSFs.    */ 
 void SKP_Silk_process_NLSFs_FIX(
     SKP_Silk_encoder_state_FIX      *psEnc,     /* I/O  encoder state                               */
@@ -217,7 +218,7 @@
     SKP_int                         *pNLSF_Q15  /* I/O  Normalized LSFs (quant out) (0 - (2^15-1))  */
 );
 
-/* LSF vector encoder */
+/* NLSF vector encoder */
 void SKP_Silk_NLSF_MSVQ_encode_FIX(
           SKP_int                   *NLSFIndices,           /* O    Codebook path vector [ CB_STAGES ]      */
           SKP_int                   *pNLSF_Q15,             /* I/O  Quantized NLSF vector [ LPC_ORDER ]     */
@@ -248,12 +249,22 @@
     SKP_int32                       *err_Q20,           /* O    Weighted quantization errors  [N*K]         */
     const SKP_int                   *in_Q15,            /* I    Input vectors to be quantized [N*LPC_order] */
     const SKP_int                   *w_Q6,              /* I    Weighting vectors             [N*LPC_order] */
-    const SKP_int16                 *pCB_Q15,           /* I    Codebook vectors              [K*LPC_order] */
+    const SKP_int8                  *pCB_Q9,            /* I    Codebook vectors              [K*LPC_order] */
     const SKP_int                   N,                  /* I    Number of input vectors                     */
     const SKP_int                   K,                  /* I    Number of codebook vectors                  */
     const SKP_int                   LPC_order           /* I    Number of LPCs                              */
 );
 
+/* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */
+SKP_int32 SKP_Silk_residual_energy16_covar_FIX(
+    const SKP_int16                 *c,                 /* I    Prediction vector                           */
+    const SKP_int32                 *wXX,               /* I    Correlation matrix                          */
+    const SKP_int32                 *wXx,               /* I    Correlation vector                          */
+    SKP_int32                       wxx,                /* I    Signal energy                               */
+    SKP_int                         D,                  /* I    Dimension                                   */
+    SKP_int                         cQ                  /* I    Q value for c vector 0 - 15                 */
+);
+
 /* Entropy constrained MATRIX-weighted VQ, for a single input data vector */
 void SKP_Silk_VQ_WMat_EC_FIX(
     SKP_int                         *ind,               /* O    index of best codebook vector               */
@@ -266,15 +277,21 @@
     SKP_int                         L                   /* I    number of vectors in codebook               */
 );
 
+/* Processing of gains */
+void SKP_Silk_process_gains_FIX(
+    SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  Encoder state                               */
+    SKP_Silk_encoder_control_FIX    *psEncCtrl      /* I/O  Encoder control                             */
+);
+
 /******************/
 /* Linear Algebra */
 /******************/
-
 /* Calculates correlation matrix X'*X */
 void SKP_Silk_corrMatrix_FIX(
     const SKP_int16                 *x,         /* I    x vector [L + order - 1] used to form data matrix X */
     const SKP_int                   L,          /* I    Length of vectors                                   */
     const SKP_int                   order,      /* I    Max lag for correlation                             */
+    const SKP_int                   head_room,  /* I    Desired headroom                                    */
     SKP_int32                       *XX,        /* O    Pointer to X'*X correlation matrix [ order x order ]*/
     SKP_int                         *rshifts    /* I/O  Right shifts of correlations                        */
 );
@@ -303,29 +320,6 @@
     SKP_int                         M,                  /* I    Size of matrix                              */
     const SKP_int32                 *b,                 /* I    Pointer to b vector                         */
     SKP_int32                       *x_Q16              /* O    Pointer to x solution vector                */
-);
-
-/* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */
-SKP_int32 SKP_Silk_residual_energy16_covar_FIX(
-    const SKP_int16                 *c,                 /* I    Prediction vector                           */
-    const SKP_int32                 *wXX,               /* I    Correlation matrix                          */
-    const SKP_int32                 *wXx,               /* I    Correlation vector                          */
-    SKP_int32                       wxx,                /* I    Signal energy                               */
-    SKP_int                         D,                  /* I    Dimension                                   */
-    SKP_int                         cQ                  /* I    Q value for c vector 0 - 15                 */
-);
-
-/* Calculates residual energies of input subframes where all subframes have LPC_order   */
-/* of preceeding samples                                                                */
-void SKP_Silk_residual_energy_FIX(
-          SKP_int32 nrgs[ MAX_NB_SUBFR ],           /* O    Residual energy per subframe    */
-          SKP_int   nrgsQ[ MAX_NB_SUBFR ],          /* O    Q value per subframe            */
-    const SKP_int16 x[],                            /* I    Input signal                    */
-    const SKP_int16 a_Q12[ 2 ][ MAX_LPC_ORDER ],    /* I    AR coefs for each frame half    */
-    const SKP_int32 gains[ MAX_NB_SUBFR ],          /* I    Quantization gains              */
-    const SKP_int   subfr_length,                   /* I    Subframe length                 */
-    const SKP_int   nb_subfr,                       /* I    Number of subframes             */
-    const SKP_int   LPC_order                       /* I    LPC order                       */
 );
 
 #ifndef FORCE_CPP_BUILD
--- a/src_FIX/SKP_Silk_noise_shape_analysis_FIX.c
+++ b/src_FIX/SKP_Silk_noise_shape_analysis_FIX.c
@@ -26,7 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
-#include "SKP_Silk_perceptual_parameters_FIX.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /* 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.)   */
@@ -43,48 +43,45 @@
     for( i = order - 2; i >= 0; i-- ) {
         gain_Q24 = SKP_SMLAWB( coefs_Q24[ i ], gain_Q24, lambda_Q16 );
     }
-    gain_Q24  = SKP_SMLAWB( 1 << 24, gain_Q24, -lambda_Q16 );
+    gain_Q24  = SKP_SMLAWB( SKP_FIX_CONST( 1.0, 24 ), gain_Q24, -lambda_Q16 );
     return SKP_INVERSE32_varQ( gain_Q24, 40 );
 }
 
-/* Convert warped filter coefficients to monic pseudo-warped coefficients */
-SKP_INLINE void warped_true2monic_coefs( 
-    SKP_int32           *coefs_Q24,
+/* 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( 
+    SKP_int32           *coefs_syn_Q24,
+    SKP_int32           *coefs_ana_Q24,
     SKP_int             lambda_Q16,
-    SKP_int             order 
+    SKP_int32           limit_Q24,
+    SKP_int             order
 ) {
-    SKP_int   i;
-    SKP_int32 gain_Q16, nom_Q16, den_Q24;
+    SKP_int   i, iter, ind = 0;
+    SKP_int32 tmp, maxabs_Q24, chirp_Q16, gain_syn_Q16, gain_ana_Q16;
+    SKP_int32 nom_Q16, den_Q24;
 
+    /* Convert to monic coefficients */
     lambda_Q16 = -lambda_Q16;
     for( i = order - 1; i > 0; i-- ) {
-        coefs_Q24[ i - 1 ] = SKP_SMLAWB( coefs_Q24[ i - 1 ], coefs_Q24[ i ], lambda_Q16 );
+        coefs_syn_Q24[ i - 1 ] = SKP_SMLAWB( coefs_syn_Q24[ i - 1 ], coefs_syn_Q24[ i ], lambda_Q16 );
+        coefs_ana_Q24[ i - 1 ] = SKP_SMLAWB( coefs_ana_Q24[ i - 1 ], coefs_ana_Q24[ i ], lambda_Q16 );
     }
-    nom_Q16  = SKP_SMLAWB( 1 << 16, lambda_Q16,     -lambda_Q16 );
-    den_Q24  = SKP_SMLAWB( 1 << 24, coefs_Q24[ 0 ], -lambda_Q16 );
-    gain_Q16 = SKP_DIV32_varQ( nom_Q16, den_Q24, 24 );
+    lambda_Q16 = -lambda_Q16;
+    nom_Q16  = SKP_SMLAWB( SKP_FIX_CONST( 1.0, 16 ), -lambda_Q16,        lambda_Q16 );
+    den_Q24  = SKP_SMLAWB( SKP_FIX_CONST( 1.0, 24 ), coefs_syn_Q24[ 0 ], lambda_Q16 );
+    gain_syn_Q16 = SKP_DIV32_varQ( nom_Q16, den_Q24, 24 );
+    den_Q24  = SKP_SMLAWB( SKP_FIX_CONST( 1.0, 24 ), coefs_ana_Q24[ 0 ], lambda_Q16 );
+    gain_ana_Q16 = SKP_DIV32_varQ( nom_Q16, den_Q24, 24 );
     for( i = 0; i < order; i++ ) {
-        coefs_Q24[ i ] = SKP_SMULWW( gain_Q16, coefs_Q24[ i ] );
+        coefs_syn_Q24[ i ] = SKP_SMULWW( gain_syn_Q16, coefs_syn_Q24[ i ] );
+        coefs_ana_Q24[ i ] = SKP_SMULWW( gain_ana_Q16, coefs_ana_Q24[ i ] );
     }
-}
 
-/* Limit max amplitude of monic warped coefficients by using bandwidth expansion on the true coefficients */
-SKP_INLINE void limit_warped_coefs( 
-    SKP_int32           *coefs_syn_Q24,
-    SKP_int32           *coefs_ana_Q24,
-    SKP_int             lambda_Q16,
-    SKP_int32           limit_Q24,
-    SKP_int             order
-) {
-    SKP_int   i, iter, ind;
-    SKP_int32 tmp, maxabs_Q24, chirp_Q16;
-
     for( iter = 0; iter < 10; iter++ ) {
         /* Find maximum absolute value */
-        ind = 1;
-        maxabs_Q24 = SKP_abs( coefs_syn_Q24[ ind ] );
-        for( i = 2; i < order - 1; i++ ) {
-            tmp = SKP_abs( coefs_syn_Q24[ i ] );
+        maxabs_Q24 = -1;
+        for( i = 0; i < order; i++ ) {
+            tmp = SKP_max( SKP_abs_int32( coefs_syn_Q24[ i ] ), SKP_abs_int32( coefs_ana_Q24[ i ] ) );
             if( tmp > maxabs_Q24 ) {
                 maxabs_Q24 = tmp;
                 ind = i;
@@ -91,14 +88,21 @@
             }
         }
         if( maxabs_Q24 <= limit_Q24 ) {
+            /* Coefficients are within range - done */
             return;
         }
 
-        /* Convert to true warped coefficients */
+        /* Convert back to true warped coefficients */
         for( i = 1; i < order; i++ ) {
             coefs_syn_Q24[ i - 1 ] = SKP_SMLAWB( coefs_syn_Q24[ i - 1 ], coefs_syn_Q24[ i ], lambda_Q16 );
             coefs_ana_Q24[ i - 1 ] = SKP_SMLAWB( coefs_ana_Q24[ i - 1 ], coefs_ana_Q24[ i ], lambda_Q16 );
         }
+        gain_syn_Q16 = SKP_INVERSE32_varQ( gain_syn_Q16, 32 );
+        gain_ana_Q16 = SKP_INVERSE32_varQ( gain_ana_Q16, 32 );
+        for( i = 0; i < order; i++ ) {
+            coefs_syn_Q24[ i ] = SKP_SMULWW( gain_syn_Q16, coefs_syn_Q24[ i ] );
+            coefs_ana_Q24[ i ] = SKP_SMULWW( gain_ana_Q16, coefs_ana_Q24[ i ] );
+        }
 
         /* Apply bandwidth expansion */
         chirp_Q16 = SKP_FIX_CONST( 0.99, 16 ) - SKP_DIV32_varQ(
@@ -107,7 +111,7 @@
         SKP_Silk_bwexpander_32( coefs_syn_Q24, order, chirp_Q16 );
         SKP_Silk_bwexpander_32( coefs_ana_Q24, order, chirp_Q16 );
 
-        /* Convert back to monic warped coefficients */
+        /* Convert to monic warped coefficients */
         lambda_Q16 = -lambda_Q16;
         for( i = order - 1; i > 0; i-- ) {
             coefs_syn_Q24[ i - 1 ] = SKP_SMLAWB( coefs_syn_Q24[ i - 1 ], coefs_syn_Q24[ i ], lambda_Q16 );
@@ -114,7 +118,17 @@
             coefs_ana_Q24[ i - 1 ] = SKP_SMLAWB( coefs_ana_Q24[ i - 1 ], coefs_ana_Q24[ i ], lambda_Q16 );
         }
         lambda_Q16 = -lambda_Q16;
+        nom_Q16  = SKP_SMLAWB( SKP_FIX_CONST( 1.0, 16 ), -lambda_Q16,        lambda_Q16 );
+        den_Q24  = SKP_SMLAWB( SKP_FIX_CONST( 1.0, 24 ), coefs_syn_Q24[ 0 ], lambda_Q16 );
+        gain_syn_Q16 = SKP_DIV32_varQ( nom_Q16, den_Q24, 24 );
+        den_Q24  = SKP_SMLAWB( SKP_FIX_CONST( 1.0, 24 ), coefs_ana_Q24[ 0 ], lambda_Q16 );
+        gain_ana_Q16 = SKP_DIV32_varQ( nom_Q16, den_Q24, 24 );
+        for( i = 0; i < order; i++ ) {
+            coefs_syn_Q24[ i ] = SKP_SMULWW( gain_syn_Q16, coefs_syn_Q24[ i ] );
+            coefs_ana_Q24[ i ] = SKP_SMULWW( gain_ana_Q16, coefs_ana_Q24[ i ] );
+        }
     }
+	SKP_assert( 0 );
 }
 
 /**************************************************************/
@@ -128,7 +142,7 @@
 )
 {
     SKP_Silk_shape_state_FIX *psShapeSt = &psEnc->sShape;
-    SKP_int     k, i, nSamples, Qnrg, b_Q14, scale = 0, sz;
+    SKP_int     k, i, nSamples, Qnrg, b_Q14, warping_Q16, scale = 0;
     SKP_int32   SNR_adj_dB_Q7, HarmBoost_Q16, HarmShapeGain_Q16, Tilt_Q16, tmp32;
     SKP_int32   nrg, pre_nrg_Q30, log_energy_Q7, log_energy_prev_Q7, energy_variation_Q7;
     SKP_int32   delta_Q16, BWExp1_Q16, BWExp2_Q16, gain_mult_Q16, gain_add_Q16, strength_Q16, b_Q8;
@@ -142,7 +156,7 @@
     SKP_int32   sqrt_nrg[ MAX_NB_SUBFR ], Qnrg_vec[ MAX_NB_SUBFR ];
 
     /* Point to start of first LPC analysis block */
-    x_ptr = x + psEnc->sCmn.la_shape - SKP_SMULBB( SHAPE_LPC_WIN_MS, psEnc->sCmn.fs_kHz ) + psEnc->sCmn.subfr_length;
+    x_ptr = x - psEnc->sCmn.la_shape;
 
     /****************/
     /* CONTROL SNR  */
@@ -151,11 +165,12 @@
     psEncCtrl->current_SNR_dB_Q7 = psEnc->SNR_dB_Q7;
 #else
     /* Reduce SNR_dB values if recent bitstream has exceeded TargetRate */
-    psEncCtrl->current_SNR_dB_Q7 = psEnc->SNR_dB_Q7 - SKP_SMULWB( SKP_LSHIFT( ( SKP_int32 )psEnc->BufferedInChannel_ms, 7 ), 3277 );
+    psEncCtrl->current_SNR_dB_Q7 = psEnc->SNR_dB_Q7 - SKP_SMULWB( SKP_LSHIFT( ( SKP_int32 )psEnc->BufferedInChannel_ms, 7 ), 
+        SKP_FIX_CONST( 0.05, 16 ) );
 #endif
 
     /* Reduce SNR_dB if inband FEC used */
-    if( psEnc->speech_activity_Q8 > LBRR_SPEECH_ACTIVITY_THRES_Q8 ) {
+    if( psEnc->speech_activity_Q8 > SKP_FIX_CONST( LBRR_SPEECH_ACTIVITY_THRES, 8 ) ) {
         psEncCtrl->current_SNR_dB_Q7 -= SKP_RSHIFT( psEnc->inBandFEC_SNR_comp_Q8, 1 );
     }
 
@@ -167,23 +182,24 @@
         + psEncCtrl->input_quality_bands_Q15[ 1 ], 2 );
 
     /* Coding quality level, between 0.0_Q0 and 1.0_Q0, but in Q14 */
-    psEncCtrl->coding_quality_Q14 = SKP_RSHIFT( SKP_Silk_sigm_Q15( SKP_RSHIFT_ROUND( psEncCtrl->current_SNR_dB_Q7 - ( 17 << 7 ), 4 ) ), 1 );
+    psEncCtrl->coding_quality_Q14 = SKP_RSHIFT( SKP_Silk_sigm_Q15( SKP_RSHIFT_ROUND( psEncCtrl->current_SNR_dB_Q7 - 
+        SKP_FIX_CONST( 18.0, 7 ), 4 ) ), 1 );
 
     /* Reduce coding SNR during low speech activity */
-    b_Q8 = ( 1 << 8 ) - psEnc->speech_activity_Q8;
+    b_Q8 = SKP_FIX_CONST( 1.0, 8 ) - psEnc->speech_activity_Q8;
     b_Q8 = SKP_SMULWB( SKP_LSHIFT( b_Q8, 8 ), b_Q8 );
     SNR_adj_dB_Q7 = SKP_SMLAWB( psEncCtrl->current_SNR_dB_Q7,
-        SKP_SMULBB( -BG_SNR_DECR_dB_Q7 >> ( 4 + 1 ), b_Q8 ),                                            // Q11
-        SKP_SMULWB( ( 1 << 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q14 ) );      // Q12
+        SKP_SMULBB( SKP_FIX_CONST( -BG_SNR_DECR_dB, 7 ) >> ( 4 + 1 ), b_Q8 ),                                       // Q11
+        SKP_SMULWB( SKP_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q14 ) );     // Q12
 
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
         /* Reduce gains for periodic signals */
-        SNR_adj_dB_Q7 = SKP_SMLAWB( SNR_adj_dB_Q7, HARM_SNR_INCR_dB_Q7 << 1, psEnc->LTPCorr_Q15 );
+        SNR_adj_dB_Q7 = SKP_SMLAWB( SNR_adj_dB_Q7, SKP_FIX_CONST( HARM_SNR_INCR_dB, 8 ), psEnc->LTPCorr_Q15 );
     } else { 
         /* For unvoiced signals and low-quality input, adjust the quality slower than SNR_dB setting */
         SNR_adj_dB_Q7 = SKP_SMLAWB( SNR_adj_dB_Q7, 
-            SKP_SMLAWB( 6 << ( 7 + 2 ), -104856, psEncCtrl->current_SNR_dB_Q7 ),    //-104856_Q18 = -0.4_Q0, Q9
-            ( 1 << 14 ) - psEncCtrl->input_quality_Q14 );                           // Q14
+            SKP_SMLAWB( SKP_FIX_CONST( 6.0, 9 ), -SKP_FIX_CONST( 0.4, 18 ), psEncCtrl->current_SNR_dB_Q7 ),
+            SKP_FIX_CONST( 1.0, 14 ) - psEncCtrl->input_quality_Q14 );
     }
 
     /*************************/
@@ -212,10 +228,11 @@
             pitch_res_ptr += nSamples;
         }
 
-        psEncCtrl->sparseness_Q8 = SKP_RSHIFT( SKP_Silk_sigm_Q15( SKP_SMULWB( energy_variation_Q7 - ( 5 << 7 ), 6554 ) ), 7 ); // 6554_Q16 = 0.1_Q0
+        psEncCtrl->sparseness_Q8 = SKP_RSHIFT( SKP_Silk_sigm_Q15( SKP_SMULWB( energy_variation_Q7 - 
+            SKP_FIX_CONST( 5.0, 7 ), SKP_FIX_CONST( 0.1, 16 ) ) ), 7 );
 
         /* Set quantization offset depending on sparseness measure */
-        if( psEncCtrl->sparseness_Q8 > SPARSENESS_THRESHOLD_QNT_OFFSET_Q8 ) {
+        if( psEncCtrl->sparseness_Q8 > SKP_FIX_CONST( SPARSENESS_THRESHOLD_QNT_OFFSET, 8 ) ) {
             psEncCtrl->sCmn.QuantOffsetType = 0;
         } else {
             psEncCtrl->sCmn.QuantOffsetType = 1;
@@ -222,43 +239,59 @@
         }
         
         /* Increase coding SNR for sparse signals */
-        SNR_adj_dB_Q7 = SKP_SMLAWB( SNR_adj_dB_Q7, SPARSE_SNR_INCR_dB_Q7 << 8, psEncCtrl->sparseness_Q8 - ( 1 << 7 ) );
+        SNR_adj_dB_Q7 = SKP_SMLAWB( SNR_adj_dB_Q7, SKP_FIX_CONST( SPARSE_SNR_INCR_dB, 15 ), psEncCtrl->sparseness_Q8 - SKP_FIX_CONST( 0.5, 8 ) );
     }
 
     /*******************************/
     /* Control bandwidth expansion */
     /*******************************/
-    delta_Q16  = SKP_SMULWB( ( 1 << 16 ) - SKP_SMULBB( 3, psEncCtrl->coding_quality_Q14 ), LOW_RATE_BANDWIDTH_EXPANSION_DELTA_Q16 );
-    BWExp1_Q16 = BANDWIDTH_EXPANSION_Q16 - delta_Q16;
-    BWExp2_Q16 = BANDWIDTH_EXPANSION_Q16 + delta_Q16;
-    if( psEnc->sCmn.fs_kHz == 24 ) {
-        /* Less bandwidth expansion for super wideband */
-        BWExp1_Q16 = ( 1 << 16 ) - SKP_SMULWB( SWB_BANDWIDTH_EXPANSION_REDUCTION_Q16, ( 1 << 16 ) - BWExp1_Q16 );
-        BWExp2_Q16 = ( 1 << 16 ) - SKP_SMULWB( SWB_BANDWIDTH_EXPANSION_REDUCTION_Q16, ( 1 << 16 ) - BWExp2_Q16 );
-    }
+    /* More BWE for signals with high prediction gain */
+    strength_Q16 = SKP_SMULWB( psEncCtrl->predGain_Q16, SKP_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTION, 16 ) );
+    BWExp1_Q16 = BWExp2_Q16 = SKP_DIV32_varQ( SKP_FIX_CONST( BANDWIDTH_EXPANSION, 16 ), 
+        SKP_SMLAWW( SKP_FIX_CONST( 1.0, 16 ), strength_Q16, strength_Q16 ), 16 );
+    delta_Q16  = SKP_SMULWB( SKP_FIX_CONST( 1.0, 16 ) - SKP_SMULBB( 3, psEncCtrl->coding_quality_Q14 ), 
+        SKP_FIX_CONST( LOW_RATE_BANDWIDTH_EXPANSION_DELTA, 16 ) );
+    BWExp1_Q16 = SKP_SUB32( BWExp1_Q16, delta_Q16 );
+    BWExp2_Q16 = SKP_ADD32( BWExp2_Q16, delta_Q16 );
     /* BWExp1 will be applied after BWExp2, so make it relative */
     BWExp1_Q16 = SKP_DIV32_16( SKP_LSHIFT( BWExp1_Q16, 14 ), SKP_RSHIFT( BWExp2_Q16, 2 ) );
 
-    /* Warping coefficient */
-    psEncCtrl->sCmn.warping_Q16 = psEnc->sCmn.fs_kHz * WARPING_MULTIPLIER_Q16;
-    psEncCtrl->sCmn.warping_Q16 = SKP_min( psEncCtrl->sCmn.warping_Q16, 32767 );
+    if( psEnc->sCmn.warping_Q16 > 0 ) {
+        /* Slightly more warping in analysis will move quantization noise up in frequency, where it's better masked */
+        warping_Q16 = SKP_SMLAWB( psEnc->sCmn.warping_Q16, psEncCtrl->coding_quality_Q14, SKP_FIX_CONST( 0.01, 18 ) );
+    } else {
+        warping_Q16 = 0;
+    }
 
     /********************************************/
     /* Compute noise shaping AR coefs and gains */
     /********************************************/
-    sz = ( SKP_int )SKP_SMULBB( SHAPE_LPC_WIN_MS, psEnc->sCmn.fs_kHz );
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
-        /* Apply window */
-        SKP_Silk_apply_sine_window( x_windowed, x_ptr, 0, SHAPE_LPC_WIN_MS * psEnc->sCmn.fs_kHz );
+        /* Apply window: sine slope followed by flat part followed by cosine slope */
+        SKP_int shift, slope_part, flat_part;
+        flat_part = psEnc->sCmn.fs_kHz * 3;
+        slope_part = SKP_RSHIFT( psEnc->sCmn.shapeWinLength - flat_part, 1 );
 
+        SKP_Silk_apply_sine_window( x_windowed, x_ptr, 1, slope_part );
+        shift = slope_part;
+        SKP_memcpy( x_windowed + shift, x_ptr + shift, flat_part * sizeof(SKP_int16) );
+        shift += flat_part;
+        SKP_Silk_apply_sine_window( x_windowed + shift, x_ptr + shift, 2, slope_part );
+
         /* Update pointer: next LPC analysis block */
         x_ptr += psEnc->sCmn.subfr_length;
 
-        /* Calculate warped auto correlation */
-        SKP_Silk_warped_autocorrelation_FIX( auto_corr, &scale, x_windowed, psEncCtrl->sCmn.warping_Q16, sz, psEnc->sCmn.shapingLPCOrder ); 
+        if( psEnc->sCmn.warping_Q16 > 0 ) {
+            /* Calculate warped auto correlation */
+            SKP_Silk_warped_autocorrelation_FIX( auto_corr, &scale, x_windowed, warping_Q16, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder ); 
+        } else {
+            /* Calculate regular auto correlation */
+            SKP_Silk_autocorr( auto_corr, &scale, x_windowed, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder + 1 );
+        }
 
         /* Add white noise, as a fraction of energy */
-        auto_corr[0] = SKP_ADD32( auto_corr[0], SKP_max_32( SKP_SMULWB( SKP_RSHIFT( auto_corr[ 0 ], 4 ), SHAPE_WHITE_NOISE_FRACTION_Q20 ), 1 ) ); 
+        auto_corr[0] = SKP_ADD32( auto_corr[0], SKP_max_32( SKP_SMULWB( SKP_RSHIFT( auto_corr[ 0 ], 4 ), 
+            SKP_FIX_CONST( SHAPE_WHITE_NOISE_FRACTION, 20 ) ), 1 ) ); 
 
         /* Calculate the reflection coefficients using schur */
         nrg = SKP_Silk_schur64( refl_coef_Q16, auto_corr, psEnc->sCmn.shapingLPCOrder );
@@ -267,26 +300,6 @@
         /* Convert reflection coefficients to prediction coefficients */
         SKP_Silk_k2a_Q16( AR2_Q24, refl_coef_Q16, psEnc->sCmn.shapingLPCOrder );
 
-        /* Convert residual energy to non-warped scale */
-        gain_mult_Q16 = warped_gain( AR2_Q24, psEncCtrl->sCmn.warping_Q16, psEnc->sCmn.shapingLPCOrder );
-        gain_mult_Q16 = SKP_SMULWW( gain_mult_Q16, gain_mult_Q16 );
-        SKP_assert( gain_mult_Q16 >= 0 ); // If breaking, add dynamic scaling
-        nrg = SKP_SMULWW( nrg, gain_mult_Q16 );
-        SKP_assert( nrg >= 0 ); // If breaking, add dynamic scaling
-
-        /* Bandwidth expansion for synthesis filter shaping */
-        SKP_Silk_bwexpander_32( AR2_Q24, psEnc->sCmn.shapingLPCOrder, BWExp2_Q16 );
-
-        /* Compute noise shaping filter coefficients */
-        SKP_memcpy( AR1_Q24, AR2_Q24, psEnc->sCmn.shapingLPCOrder * sizeof( SKP_int32 ) );
-
-        /* Bandwidth expansion for analysis filter shaping */
-        SKP_assert( BWExp1_Q16 <= ( 1 << 16 ) ); // If ever breaking, use LPC_stabilize() in these cases to stay within range
-        SKP_Silk_bwexpander_32( AR1_Q24, psEnc->sCmn.shapingLPCOrder, BWExp1_Q16 );
-
-        /* Increase residual energy */
-        nrg = SKP_SMLAWB( nrg, SKP_RSHIFT( auto_corr[ 0 ], 8 ), SHAPE_MIN_ENERGY_RATIO_Q24 );
-
         Qnrg = -scale;          // range: -12...30
         SKP_assert( Qnrg >= -12 );
         SKP_assert( Qnrg <=  30 );
@@ -305,6 +318,22 @@
 
         psEncCtrl->Gains_Q16[ k ] = SKP_LSHIFT_SAT32( tmp32, 16 - Qnrg );
 
+        if( psEnc->sCmn.warping_Q16 > 0 ) {
+            /* Adjust gain for warping */
+            gain_mult_Q16 = warped_gain( AR2_Q24, warping_Q16, psEnc->sCmn.shapingLPCOrder );
+            psEncCtrl->Gains_Q16[ k ] = SKP_SMULWW( psEncCtrl->Gains_Q16[ k ], gain_mult_Q16 );
+        }
+
+        /* Bandwidth expansion for synthesis filter shaping */
+        SKP_Silk_bwexpander_32( AR2_Q24, psEnc->sCmn.shapingLPCOrder, BWExp2_Q16 );
+
+        /* Compute noise shaping filter coefficients */
+        SKP_memcpy( AR1_Q24, AR2_Q24, psEnc->sCmn.shapingLPCOrder * sizeof( SKP_int32 ) );
+
+        /* Bandwidth expansion for analysis filter shaping */
+        SKP_assert( BWExp1_Q16 <= SKP_FIX_CONST( 1.0, 16 ) );
+        SKP_Silk_bwexpander_32( AR1_Q24, psEnc->sCmn.shapingLPCOrder, BWExp1_Q16 );
+
         /* Ratio of prediction gains, in energy domain */
         SKP_Silk_LPC_inverse_pred_gain_Q24( &pre_nrg_Q30, AR2_Q24, psEnc->sCmn.shapingLPCOrder );
         SKP_Silk_LPC_inverse_pred_gain_Q24( &nrg,         AR1_Q24, psEnc->sCmn.shapingLPCOrder );
@@ -313,13 +342,9 @@
         pre_nrg_Q30 = SKP_LSHIFT32( SKP_SMULWB( pre_nrg_Q30, SKP_FIX_CONST( 0.7, 15 ) ), 1 );
         psEncCtrl->GainsPre_Q14[ k ] = ( SKP_int ) SKP_FIX_CONST( 0.3, 14 ) + SKP_DIV32_varQ( pre_nrg_Q30, nrg, 14 );
 
-        /* Convert to monic warped prediction coefficients */
-        warped_true2monic_coefs( AR1_Q24, psEncCtrl->sCmn.warping_Q16, psEnc->sCmn.shapingLPCOrder );
-        warped_true2monic_coefs( AR2_Q24, psEncCtrl->sCmn.warping_Q16, psEnc->sCmn.shapingLPCOrder );
+        /* Convert to monic warped prediction coefficients and limit absolute values */
+        limit_warped_coefs( AR2_Q24, AR1_Q24, warping_Q16, SKP_FIX_CONST( 3.999, 24 ), psEnc->sCmn.shapingLPCOrder );
 
-        /* Limit absolute values */
-        limit_warped_coefs( AR2_Q24, AR1_Q24, psEncCtrl->sCmn.warping_Q16, SKP_FIX_CONST( 3.999, 24 ), psEnc->sCmn.shapingLPCOrder );
-
         /* Convert from Q24 to Q13 and store in int16 */
         for( i = 0; i < psEnc->sCmn.shapingLPCOrder; i++ ) {
             psEncCtrl->AR1_Q13[ k * MAX_SHAPE_LPC_ORDER + i ] = (SKP_int16)SKP_SAT16( SKP_RSHIFT_ROUND( AR1_Q24[ i ], 11 ) );
@@ -331,9 +356,9 @@
     /* Gain tweaking */
     /*****************/
     /* Increase gains during low speech activity and put lower limit on gains */
-    gain_mult_Q16 = SKP_Silk_log2lin( -SKP_SMLAWB( -16 << 7, SNR_adj_dB_Q7,           10486 ) ); // 10486_Q16 = 0.16_Q0
-    gain_add_Q16  = SKP_Silk_log2lin(  SKP_SMLAWB(  16 << 7, NOISE_FLOOR_dB_Q7,       10486 ) ); // 10486_Q16 = 0.16_Q0
-    tmp32         = SKP_Silk_log2lin(  SKP_SMLAWB(  16 << 7, RELATIVE_MIN_GAIN_dB_Q7, 10486 ) ); // 10486_Q16 = 0.16_Q0
+    gain_mult_Q16 = SKP_Silk_log2lin( -SKP_SMLAWB( -SKP_FIX_CONST( 16.0, 7 ), SNR_adj_dB_Q7,                            SKP_FIX_CONST( 0.16, 16 ) ) );
+    gain_add_Q16  = SKP_Silk_log2lin(  SKP_SMLAWB(  SKP_FIX_CONST( 16.0, 7 ), SKP_FIX_CONST( NOISE_FLOOR_dB, 7 ),       SKP_FIX_CONST( 0.16, 16 ) ) );
+    tmp32         = SKP_Silk_log2lin(  SKP_SMLAWB(  SKP_FIX_CONST( 16.0, 7 ), SKP_FIX_CONST( RELATIVE_MIN_GAIN_dB, 7 ), SKP_FIX_CONST( 0.16, 16 ) ) );
     tmp32 = SKP_SMULWW( psEnc->avgGain_Q16, tmp32 );
     gain_add_Q16 = SKP_ADD_SAT32( gain_add_Q16, tmp32 );
     SKP_assert( gain_mult_Q16 >= 0 );
@@ -349,33 +374,13 @@
             psEnc->avgGain_Q16, 
             SKP_SMULWB(
                 psEncCtrl->Gains_Q16[ k ] - psEnc->avgGain_Q16, 
-                SKP_RSHIFT_ROUND( SKP_SMULBB( psEnc->speech_activity_Q8, GAIN_SMOOTHING_COEF_Q10 ), 2 ) 
+                SKP_RSHIFT_ROUND( SKP_SMULBB( psEnc->speech_activity_Q8, SKP_FIX_CONST( GAIN_SMOOTHING_COEF, 10 ) ), 2 ) 
             ) );
     }
 
-    /************************************************/
-    /* Decrease level during fricatives (de-essing) */
-    /************************************************/
-    gain_mult_Q16 = ( 1 << 16 ) + SKP_RSHIFT_ROUND( SKP_MLA( INPUT_TILT_Q26, psEncCtrl->coding_quality_Q14, HIGH_RATE_INPUT_TILT_Q12 ), 10 );
+    gain_mult_Q16 = SKP_FIX_CONST( 1.0, 16 ) + SKP_RSHIFT_ROUND( SKP_MLA( SKP_FIX_CONST( INPUT_TILT, 26 ), 
+        psEncCtrl->coding_quality_Q14, SKP_FIX_CONST( HIGH_RATE_INPUT_TILT, 12 ) ), 10 );
 
-    if( psEncCtrl->input_tilt_Q15 <= 0 && psEncCtrl->sCmn.sigtype == SIG_TYPE_UNVOICED ) {
-        if( psEnc->sCmn.fs_kHz == 24 ) {
-            SKP_int32 essStrength_Q15 = SKP_SMULWW( -psEncCtrl->input_tilt_Q15, 
-                SKP_SMULBB( psEnc->speech_activity_Q8, ( 1 << 8 ) - psEncCtrl->sparseness_Q8 ) );
-            tmp32 = SKP_Silk_log2lin( ( 16 << 7 ) - SKP_SMULWB( essStrength_Q15, 
-                SKP_SMULWB( DE_ESSER_COEF_SWB_dB_Q7, 20972 ) ) ); // 20972_Q17 = 0.16_Q0
-            gain_mult_Q16 = SKP_SMULWW( gain_mult_Q16, tmp32 );
-        } else if( psEnc->sCmn.fs_kHz == 16 ) {
-            SKP_int32 essStrength_Q15 = SKP_SMULWW(-psEncCtrl->input_tilt_Q15, 
-                SKP_SMULBB( psEnc->speech_activity_Q8, ( 1 << 8 ) - psEncCtrl->sparseness_Q8 ));
-            tmp32 = SKP_Silk_log2lin( ( 16 << 7 ) - SKP_SMULWB( essStrength_Q15, 
-                SKP_SMULWB( DE_ESSER_COEF_WB_dB_Q7, 20972 ) ) ); // 20972_Q17 = 0.16_Q0
-            gain_mult_Q16 = SKP_SMULWW( gain_mult_Q16, tmp32 );
-        } else {
-            SKP_assert( psEnc->sCmn.fs_kHz == 12 || psEnc->sCmn.fs_kHz == 8 );
-        }
-    }
-
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
         psEncCtrl->GainsPre_Q14[ k ] = SKP_SMULWB( gain_mult_Q16, psEncCtrl->GainsPre_Q14[ k ] );
     }
@@ -384,29 +389,32 @@
     /* Control low-frequency shaping and noise tilt */
     /************************************************/
     /* Less low frequency shaping for noisy inputs */
-    strength_Q16 = SKP_MUL( LOW_FREQ_SHAPING_Q0, ( 1 << 16 ) + SKP_SMULBB( LOW_QUALITY_LOW_FREQ_SHAPING_DECR_Q1, psEncCtrl->input_quality_bands_Q15[ 0 ] - ( 1 << 15 ) ) );
+    strength_Q16 = SKP_MUL( SKP_FIX_CONST( LOW_FREQ_SHAPING, 0 ), SKP_FIX_CONST( 1.0, 16 ) + 
+        SKP_SMULBB( SKP_FIX_CONST( LOW_QUALITY_LOW_FREQ_SHAPING_DECR, 1 ), psEncCtrl->input_quality_bands_Q15[ 0 ] - SKP_FIX_CONST( 1.0, 15 ) ) );
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
         /* Reduce low frequencies quantization noise for periodic signals, depending on pitch lag */
         /*f = 400; freqz([1, -0.98 + 2e-4 * f], [1, -0.97 + 7e-4 * f], 2^12, Fs); axis([0, 1000, -10, 1])*/
-        SKP_int fs_kHz_inv = SKP_DIV32_16( 3277, psEnc->sCmn.fs_kHz );      // 0.2_Q0 = 3277_Q14
+        SKP_int fs_kHz_inv = SKP_DIV32_16( SKP_FIX_CONST( 0.2, 14 ), psEnc->sCmn.fs_kHz );
         for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
-            b_Q14 = fs_kHz_inv + SKP_DIV32_16( ( 3 << 14 ), psEncCtrl->sCmn.pitchL[ k ] ); 
+            b_Q14 = fs_kHz_inv + SKP_DIV32_16( SKP_FIX_CONST( 3.0, 14 ), psEncCtrl->sCmn.pitchL[ k ] ); 
             /* Pack two coefficients in one int32 */
-            psEncCtrl->LF_shp_Q14[ k ]  = SKP_LSHIFT( ( 1 << 14 ) - b_Q14 - SKP_SMULWB( strength_Q16, b_Q14 ), 16 );
-            psEncCtrl->LF_shp_Q14[ k ] |= (SKP_uint16)( b_Q14 - ( 1 << 14 ) );
+            psEncCtrl->LF_shp_Q14[ k ]  = SKP_LSHIFT( SKP_FIX_CONST( 1.0, 14 ) - b_Q14 - SKP_SMULWB( strength_Q16, b_Q14 ), 16 );
+            psEncCtrl->LF_shp_Q14[ k ] |= (SKP_uint16)( b_Q14 - SKP_FIX_CONST( 1.0, 14 ) );
         }
-        SKP_assert( HARM_HP_NOISE_COEF_Q24 < ( 1 << 23 ) ); // Guarantees that second argument to SMULWB() is within range of an SKP_int16
-        Tilt_Q16 = - HP_NOISE_COEF_Q16 - 
-            SKP_SMULWB( ( 1 << 16 ) - HP_NOISE_COEF_Q16, SKP_SMULWB( HARM_HP_NOISE_COEF_Q24, psEnc->speech_activity_Q8 ) );
+        SKP_assert( SKP_FIX_CONST( HARM_HP_NOISE_COEF, 24 ) < SKP_FIX_CONST( 0.5, 24 ) ); // Guarantees that second argument to SMULWB() is within range of an SKP_int16
+        Tilt_Q16 = - SKP_FIX_CONST( HP_NOISE_COEF, 16 ) - 
+            SKP_SMULWB( SKP_FIX_CONST( 1.0, 16 ) - SKP_FIX_CONST( HP_NOISE_COEF, 16 ), 
+                SKP_SMULWB( SKP_FIX_CONST( HARM_HP_NOISE_COEF, 24 ), psEnc->speech_activity_Q8 ) );
     } else {
         b_Q14 = SKP_DIV32_16( 21299, psEnc->sCmn.fs_kHz ); // 1.3_Q0 = 21299_Q14
         /* Pack two coefficients in one int32 */
-        psEncCtrl->LF_shp_Q14[ 0 ]  = SKP_LSHIFT( ( 1 << 14 ) - b_Q14 - SKP_SMULWB( strength_Q16, SKP_SMULWB( 39322, b_Q14 ) ), 16 ); // 0.6_Q0 = 39322_Q16
-        psEncCtrl->LF_shp_Q14[ 0 ] |= (SKP_uint16)( b_Q14 - ( 1 << 14 ) );
+        psEncCtrl->LF_shp_Q14[ 0 ]  = SKP_LSHIFT( SKP_FIX_CONST( 1.0, 14 ) - b_Q14 - 
+            SKP_SMULWB( strength_Q16, SKP_SMULWB( SKP_FIX_CONST( 0.6, 16 ), b_Q14 ) ), 16 );
+        psEncCtrl->LF_shp_Q14[ 0 ] |= (SKP_uint16)( b_Q14 - SKP_FIX_CONST( 1.0, 14 ) );
         for( k = 1; k < psEnc->sCmn.nb_subfr; k++ ) {
-            psEncCtrl->LF_shp_Q14[ k ] = psEncCtrl->LF_shp_Q14[ k - 1 ];
+            psEncCtrl->LF_shp_Q14[ k ] = psEncCtrl->LF_shp_Q14[ 0 ];
         }
-        Tilt_Q16 = -HP_NOISE_COEF_Q16;
+        Tilt_Q16 = -SKP_FIX_CONST( HP_NOISE_COEF, 16 );
     }
 
     /****************************/
@@ -413,18 +421,18 @@
     /* HARMONIC SHAPING CONTROL */
     /****************************/
     /* Control boosting of harmonic frequencies */
-    HarmBoost_Q16 = SKP_SMULWB( SKP_SMULWB( ( 1 << 17 ) - SKP_LSHIFT( psEncCtrl->coding_quality_Q14, 3 ), 
-        psEnc->LTPCorr_Q15 ), LOW_RATE_HARMONIC_BOOST_Q16 );
+    HarmBoost_Q16 = SKP_SMULWB( SKP_SMULWB( SKP_FIX_CONST( 1.0, 17 ) - SKP_LSHIFT( psEncCtrl->coding_quality_Q14, 3 ), 
+        psEnc->LTPCorr_Q15 ), SKP_FIX_CONST( LOW_RATE_HARMONIC_BOOST, 16 ) );
 
     /* More harmonic boost for noisy input signals */
     HarmBoost_Q16 = SKP_SMLAWB( HarmBoost_Q16, 
-        ( 1 << 16 ) - SKP_LSHIFT( psEncCtrl->input_quality_Q14, 2 ), LOW_INPUT_QUALITY_HARMONIC_BOOST_Q16 );
+        SKP_FIX_CONST( 1.0, 16 ) - SKP_LSHIFT( psEncCtrl->input_quality_Q14, 2 ), SKP_FIX_CONST( LOW_INPUT_QUALITY_HARMONIC_BOOST, 16 ) );
 
     if( USE_HARM_SHAPING && psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
         /* More harmonic noise shaping for high bitrates or noisy input */
-        HarmShapeGain_Q16 = SKP_SMLAWB( HARMONIC_SHAPING_Q16, 
-                ( 1 << 16 ) - SKP_SMULWB( ( 1 << 18 ) - SKP_LSHIFT( psEncCtrl->coding_quality_Q14, 4 ),
-                psEncCtrl->input_quality_Q14 ), HIGH_RATE_OR_LOW_QUALITY_HARMONIC_SHAPING_Q16 );
+        HarmShapeGain_Q16 = SKP_SMLAWB( SKP_FIX_CONST( HARMONIC_SHAPING, 16 ), 
+                SKP_FIX_CONST( 1.0, 16 ) - SKP_SMULWB( SKP_FIX_CONST( 1.0, 18 ) - SKP_LSHIFT( psEncCtrl->coding_quality_Q14, 4 ),
+                psEncCtrl->input_quality_Q14 ), SKP_FIX_CONST( HIGH_RATE_OR_LOW_QUALITY_HARMONIC_SHAPING, 16 ) );
 
         /* Less harmonic noise shaping for less periodic signals */
         HarmShapeGain_Q16 = SKP_SMULWB( SKP_LSHIFT( HarmShapeGain_Q16, 1 ), 
@@ -438,11 +446,11 @@
     /*************************/
     for( k = 0; k < MAX_NB_SUBFR; k++ ) {
         psShapeSt->HarmBoost_smth_Q16 =
-            SKP_SMLAWB( psShapeSt->HarmBoost_smth_Q16,     HarmBoost_Q16     - psShapeSt->HarmBoost_smth_Q16,     SUBFR_SMTH_COEF_Q16 );
+            SKP_SMLAWB( psShapeSt->HarmBoost_smth_Q16,     HarmBoost_Q16     - psShapeSt->HarmBoost_smth_Q16,     SKP_FIX_CONST( SUBFR_SMTH_COEF, 16 ) );
         psShapeSt->HarmShapeGain_smth_Q16 =
-            SKP_SMLAWB( psShapeSt->HarmShapeGain_smth_Q16, HarmShapeGain_Q16 - psShapeSt->HarmShapeGain_smth_Q16, SUBFR_SMTH_COEF_Q16 );
+            SKP_SMLAWB( psShapeSt->HarmShapeGain_smth_Q16, HarmShapeGain_Q16 - psShapeSt->HarmShapeGain_smth_Q16, SKP_FIX_CONST( SUBFR_SMTH_COEF, 16 ) );
         psShapeSt->Tilt_smth_Q16 =
-            SKP_SMLAWB( psShapeSt->Tilt_smth_Q16,          Tilt_Q16          - psShapeSt->Tilt_smth_Q16,          SUBFR_SMTH_COEF_Q16 );
+            SKP_SMLAWB( psShapeSt->Tilt_smth_Q16,          Tilt_Q16          - psShapeSt->Tilt_smth_Q16,          SKP_FIX_CONST( SUBFR_SMTH_COEF, 16 ) );
 
         psEncCtrl->HarmBoost_Q14[ k ]     = ( SKP_int )SKP_RSHIFT_ROUND( psShapeSt->HarmBoost_smth_Q16,     2 );
         psEncCtrl->HarmShapeGain_Q14[ k ] = ( SKP_int )SKP_RSHIFT_ROUND( psShapeSt->HarmShapeGain_smth_Q16, 2 );
--- a/src_FIX/SKP_Silk_prefilter_FIX.c
+++ b/src_FIX/SKP_Silk_prefilter_FIX.c
@@ -26,7 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
-#include "SKP_Silk_perceptual_parameters_FIX.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /* SKP_Silk_prefilter. Prefilter for finding Quantizer input signal */
 SKP_INLINE void SKP_Silk_prefilt_FIX(
@@ -120,15 +120,15 @@
         AR1_shp_Q13 = &psEncCtrl->AR1_Q13[   k * MAX_SHAPE_LPC_ORDER ];
 
         /* Short term FIR filtering*/
-        SKP_Silk_warped_LPC_analysis_filter_FIX( P->sAR_shp1, st_res, AR1_shp_Q13, px, 
-            psEncCtrl->sCmn.warping_Q16, psEnc->sCmn.subfr_length, psEnc->sCmn.shapingLPCOrder );
+        SKP_Silk_warped_LPC_analysis_filter_FIX( P->sAR_shp, st_res, AR1_shp_Q13, px, 
+            psEnc->sCmn.warping_Q16, psEnc->sCmn.subfr_length, psEnc->sCmn.shapingLPCOrder );
 
         /* reduce (mainly) low frequencies during harmonic emphasis */
         B_Q12[ 0 ] = SKP_RSHIFT_ROUND( psEncCtrl->GainsPre_Q14[ k ], 2 );
-        tmp_32 = SKP_SMLABB( INPUT_TILT_Q26, psEncCtrl->HarmBoost_Q14[ k ], HarmShapeGain_Q12 ); /* Q26 */
-        tmp_32 = SKP_SMLABB( tmp_32, psEncCtrl->coding_quality_Q14, HIGH_RATE_INPUT_TILT_Q12 );  /* Q26 */
-        tmp_32 = SKP_SMULWB( tmp_32, -psEncCtrl->GainsPre_Q14[ k ] );                            /* Q24 */
-        tmp_32 = SKP_RSHIFT_ROUND( tmp_32, 12 );                                                 /* Q12 */
+        tmp_32 = SKP_SMLABB( SKP_FIX_CONST( INPUT_TILT, 26 ), psEncCtrl->HarmBoost_Q14[ k ], HarmShapeGain_Q12 );   /* Q26 */
+        tmp_32 = SKP_SMLABB( tmp_32, psEncCtrl->coding_quality_Q14, SKP_FIX_CONST( HIGH_RATE_INPUT_TILT, 12 ) );    /* Q26 */
+        tmp_32 = SKP_SMULWB( tmp_32, -psEncCtrl->GainsPre_Q14[ k ] );                                               /* Q24 */
+        tmp_32 = SKP_RSHIFT_ROUND( tmp_32, 12 );                                                                    /* Q12 */
         B_Q12[ 1 ]= SKP_SAT16( tmp_32 );
 
         x_filt_Q12[ 0 ] = SKP_SMLABB( SKP_SMULBB( st_res[ 0 ], B_Q12[ 0 ] ), P->sHarmHP, B_Q12[ 1 ] );
@@ -165,10 +165,10 @@
     SKP_int16 *LTP_shp_buf;
 
     /* To speed up use temp variables instead of using the struct */
-    LTP_shp_buf     = P->sLTP_shp1;
-    LTP_shp_buf_idx = P->sLTP_shp_buf_idx1;
-    sLF_AR_shp_Q12  = P->sLF_AR_shp1_Q12;
-    sLF_MA_shp_Q12  = P->sLF_MA_shp1_Q12;
+    LTP_shp_buf     = P->sLTP_shp;
+    LTP_shp_buf_idx = P->sLTP_shp_buf_idx;
+    sLF_AR_shp_Q12  = P->sLF_AR_shp_Q12;
+    sLF_MA_shp_Q12  = P->sLF_MA_shp_Q12;
 
     for( i = 0; i < length; i++ ) {
         if( lag > 0 ) {
@@ -195,7 +195,7 @@
     }
 
     /* Copy temp variable back to state */
-    P->sLF_AR_shp1_Q12   = sLF_AR_shp_Q12;
-    P->sLF_MA_shp1_Q12   = sLF_MA_shp_Q12;
-    P->sLTP_shp_buf_idx1 = LTP_shp_buf_idx;
+    P->sLF_AR_shp_Q12   = sLF_AR_shp_Q12;
+    P->sLF_MA_shp_Q12   = sLF_MA_shp_Q12;
+    P->sLTP_shp_buf_idx = LTP_shp_buf_idx;
 }
--- a/src_FIX/SKP_Silk_process_gains_FIX.c
+++ b/src_FIX/SKP_Silk_process_gains_FIX.c
@@ -26,6 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /* Processing of gains */
 void SKP_Silk_process_gains_FIX(
@@ -35,12 +36,12 @@
 {
     SKP_Silk_shape_state_FIX    *psShapeSt = &psEnc->sShape;
     SKP_int     k;
-    SKP_int32   s_Q16, InvMaxSqrVal_Q16, gain, gain_squared, ResNrg, ResNrgPart;
+    SKP_int32   s_Q16, InvMaxSqrVal_Q16, gain, gain_squared, ResNrg, ResNrgPart, quant_offset_Q10;
 
     /* Gain reduction when LTP coding gain is high */
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
         /*s = -0.5f * SKP_sigmoid( 0.25f * ( psEncCtrl->LTPredCodGain - 12.0f ) ); */
-        s_Q16 = -SKP_Silk_sigm_Q15( SKP_RSHIFT_ROUND( psEncCtrl->LTPredCodGain_Q7 - (12 << 7), 4 ) );
+        s_Q16 = -SKP_Silk_sigm_Q15( SKP_RSHIFT_ROUND( psEncCtrl->LTPredCodGain_Q7 - SKP_FIX_CONST( 12.0, 7 ), 4 ) );
         for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
             psEncCtrl->Gains_Q16[ k ] = SKP_SMLAWB( psEncCtrl->Gains_Q16[ k ], psEncCtrl->Gains_Q16[ k ], s_Q16 );
         }
@@ -47,9 +48,8 @@
     }
 
     /* Limit the quantized signal */
-    /*  69 = 21.0f + 16/0.33    */
     InvMaxSqrVal_Q16 = SKP_DIV32_16( SKP_Silk_log2lin( 
-        SKP_SMULWB( (69 << 7) - psEncCtrl->current_SNR_dB_Q7, SKP_FIX_CONST( 0.33, 16 )) ), psEnc->sCmn.subfr_length );
+        SKP_SMULWB( SKP_FIX_CONST( 70.0, 7 ) - psEncCtrl->current_SNR_dB_Q7, SKP_FIX_CONST( 0.33, 16 ) ) ), psEnc->sCmn.subfr_length );
 
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
         /* Soft limit on ratio residual energy and squared gains */
@@ -74,10 +74,10 @@
             /* recalculate with higher precision */
             gain_squared = SKP_SMLAWW( SKP_LSHIFT( ResNrgPart, 16 ), gain, gain );
             SKP_assert( gain_squared > 0 );
-            gain = SKP_Silk_SQRT_APPROX( gain_squared );                  /* Q8   */
+            gain = SKP_Silk_SQRT_APPROX( gain_squared );                    /* Q8   */
             psEncCtrl->Gains_Q16[ k ] = SKP_LSHIFT_SAT32( gain, 8 );        /* Q16  */
         } else {
-            gain = SKP_Silk_SQRT_APPROX( gain_squared );                  /* Q0   */
+            gain = SKP_Silk_SQRT_APPROX( gain_squared );                    /* Q0   */
             psEncCtrl->Gains_Q16[ k ] = SKP_LSHIFT_SAT32( gain, 16 );       /* Q16  */
         }
     }
@@ -87,7 +87,7 @@
         &psShapeSt->LastGainIndex, psEnc->sCmn.nFramesInPayloadBuf, psEnc->sCmn.nb_subfr );
     /* Set quantizer offset for voiced signals. Larger offset when LTP coding gain is low or tilt is high (ie low-pass) */
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
-        if( psEncCtrl->LTPredCodGain_Q7 + SKP_RSHIFT( psEncCtrl->input_tilt_Q15, 8 ) > ( 1 << 7 ) ) {
+        if( psEncCtrl->LTPredCodGain_Q7 + SKP_RSHIFT( psEncCtrl->input_tilt_Q15, 8 ) > SKP_FIX_CONST( 1.0, 7 ) ) {
             psEncCtrl->sCmn.QuantOffsetType = 0;
         } else {
             psEncCtrl->sCmn.QuantOffsetType = 1;
@@ -95,19 +95,14 @@
     }
 
     /* Quantizer boundary adjustment */
-    if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
-        psEncCtrl->Lambda_Q10 = SKP_FIX_CONST( 1.2, 10 )
-                  - SKP_SMULWB( SKP_FIX_CONST( 0.4, 18 ), psEnc->speech_activity_Q8       )
-                  - SKP_SMULWB( SKP_FIX_CONST( 0.3, 12 ), psEncCtrl->input_quality_Q14    )
-                  + SKP_SMULBB( SKP_FIX_CONST( 0.2, 10 ), psEncCtrl->sCmn.QuantOffsetType )
-                  - SKP_SMULWB( SKP_FIX_CONST( 0.1, 12 ), psEncCtrl->coding_quality_Q14   );
-    } else {
-        psEncCtrl->Lambda_Q10 = SKP_FIX_CONST( 1.2, 10 )
-                  - SKP_SMULWB( SKP_FIX_CONST( 0.4, 18 ), psEnc->speech_activity_Q8       )
-                  - SKP_SMULWB( SKP_FIX_CONST( 0.4, 12 ), psEncCtrl->input_quality_Q14    )
-                  + SKP_SMULBB( SKP_FIX_CONST( 0.4, 10 ), psEncCtrl->sCmn.QuantOffsetType )
-                  - SKP_SMULWB( SKP_FIX_CONST( 0.1, 12 ), psEncCtrl->coding_quality_Q14   );
-    }
-    SKP_assert( psEncCtrl->Lambda_Q10 >= 0 );
+    quant_offset_Q10 = SKP_Silk_Quantization_Offsets_Q10[ psEncCtrl->sCmn.sigtype ][ psEncCtrl->sCmn.QuantOffsetType ];
+    psEncCtrl->Lambda_Q10 = SKP_FIX_CONST( LAMBDA_OFFSET, 10 )
+                          + SKP_SMULBB( SKP_FIX_CONST( LAMBDA_DELAYED_DECISIONS, 10 ), psEnc->sCmn.nStatesDelayedDecision )
+                          + SKP_SMULWB( SKP_FIX_CONST( LAMBDA_SPEECH_ACT,        18 ), psEnc->speech_activity_Q8          )
+                          + SKP_SMULWB( SKP_FIX_CONST( LAMBDA_INPUT_QUALITY,     12 ), psEncCtrl->input_quality_Q14       )
+                          + SKP_SMULWB( SKP_FIX_CONST( LAMBDA_CODING_QUALITY,    12 ), psEncCtrl->coding_quality_Q14      )
+                          + SKP_SMULWB( SKP_FIX_CONST( LAMBDA_QUANT_OFFSET,      16 ), quant_offset_Q10                   );
+
+    SKP_assert( psEncCtrl->Lambda_Q10 > 0 );
     SKP_assert( psEncCtrl->Lambda_Q10 < SKP_FIX_CONST( 2, 10 ) );
 }
--- a/src_FIX/SKP_Silk_solve_LS_FIX.c
+++ b/src_FIX/SKP_Silk_solve_LS_FIX.c
@@ -26,6 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FIX.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /*****************************/
 /* Internal function headers */
@@ -120,7 +121,7 @@
     SKP_assert( M <= MAX_MATRIX_SIZE );
 
     status = 1;
-    diag_min_value = SKP_max_32( SKP_SMMUL( SKP_ADD_SAT32( A[ 0 ], A[ SKP_SMULBB( M, M ) - 1 ] ), FIND_LTP_COND_FAC_Q31 ), 1 << 9 );
+    diag_min_value = SKP_max_32( SKP_SMMUL( SKP_ADD_SAT32( A[ 0 ], A[ SKP_SMULBB( M, M ) - 1 ] ), SKP_FIX_CONST( FIND_LTP_COND_FAC, 31 ) ), 1 << 9 );
     for( loop_count = 0; loop_count < M && status == 1; loop_count++ ) {
         status = 0;
         for( j = 0; j < M; j++ ) {
--- a/src_FIX/SKP_Silk_structs_FIX.h
+++ b/src_FIX/SKP_Silk_structs_FIX.h
@@ -29,7 +29,6 @@
 #define SKP_SILK_STRUCTS_FIX_H
 
 #include "SKP_Silk_typedef.h"
-#include "SKP_Silk_define_FIX.h"
 #include "SKP_Silk_main.h"
 #include "SKP_Silk_structs.h"
 
@@ -52,17 +51,11 @@
 /* Prefilter state              */
 /********************************/
 typedef struct {
-    SKP_int16   sLTP_shp1[ LTP_BUF_LENGTH ];
-    SKP_int32   sAR_shp1[ MAX_SHAPE_LPC_ORDER + 1 ];
-    SKP_int32   sAR_shp2_Q14[ MAX_SHAPE_LPC_ORDER ];
-    SKP_int16   sLTP_shp2_FIX[ LTP_BUF_LENGTH ];
-    SKP_int     sLTP_shp_buf_idx1;
-    SKP_int     sAR_shp_buf_idx2;
-    SKP_int     sLTP_shp_buf_idx2;
-    SKP_int32   sLF_AR_shp1_Q12;
-    SKP_int32   sLF_MA_shp1_Q12;
-    SKP_int32   sLF_AR_shp2_Q12;
-    SKP_int32   sLF_MA_shp2_Q12;
+    SKP_int16   sLTP_shp[ LTP_BUF_LENGTH ];
+    SKP_int32   sAR_shp[ MAX_SHAPE_LPC_ORDER + 1 ];
+    SKP_int     sLTP_shp_buf_idx;
+    SKP_int32   sLF_AR_shp_Q12;
+    SKP_int32   sLF_MA_shp_Q12;
     SKP_int     sHarmHP;
     SKP_int32   rand_seed;
     SKP_int     lagPrev;
@@ -96,7 +89,7 @@
     SKP_Silk_nsq_state              sNSQ_LBRR;                      /* Noise Shape Quantizer State ( for low bitrate redundancy )           */
 
     /* Buffer for find pitch and noise shape analysis */
-    SKP_array_of_int16_4_byte_aligned( x_buf, 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX );    
+    SKP_DWORD_ALIGN SKP_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ];
     SKP_int                         LTPCorr_Q15;                    /* Normalized correlation from pitch lag estimator                      */
     SKP_int                         mu_LTP_Q8;                      /* Rate-distortion tradeoff in LTP quantization                         */
     SKP_int32                       SNR_dB_Q7;                      /* Quality setting                                                      */
@@ -104,7 +97,6 @@
     SKP_int32                       avgGain_Q16_one_bit_per_sample; /* average gain during active speech                                    */
     SKP_int                         BufferedInChannel_ms;           /* Simulated number of ms buffer because of exceeded TargetRate_bps     */
     SKP_int                         speech_activity_Q8;             /* Speech activity in Q8                                                */
-    SKP_int32                       pitchEstimationThreshold_Q16;   /* Threshold for pitch estimator                                        */
 
     /* Parameters For LTP scaling Control */
     SKP_int                         prevLTPredCodGain_Q7;
@@ -122,14 +114,14 @@
 
     /* Prediction and coding parameters */
     SKP_int32                   Gains_Q16[ MAX_NB_SUBFR ];
-    SKP_array_of_int16_4_byte_aligned( PredCoef_Q12[ 2 ], MAX_LPC_ORDER );
+    SKP_DWORD_ALIGN SKP_int16   PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ];
     SKP_int16                   LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ];
     SKP_int                     LTP_scale_Q14;
 
     /* Noise shaping parameters */
     /* Testing */
-    SKP_array_of_int16_4_byte_aligned( AR1_Q13, MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER );
-    SKP_array_of_int16_4_byte_aligned( AR2_Q13, MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER );
+    SKP_DWORD_ALIGN SKP_int16 AR1_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ];
+    SKP_DWORD_ALIGN SKP_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ];
     SKP_int32   LF_shp_Q14[        MAX_NB_SUBFR ];          /* Packs two int16 coefficients per int32 value             */
     SKP_int     GainsPre_Q14[      MAX_NB_SUBFR ];
     SKP_int     HarmBoost_Q14[     MAX_NB_SUBFR ];
@@ -143,6 +135,7 @@
 
     /* measures */
     SKP_int     sparseness_Q8;
+    SKP_int32   predGain_Q16;
     SKP_int     LTPredCodGain_Q7;
     SKP_int     input_quality_bands_Q15[ VAD_N_BANDS ];
     SKP_int     input_tilt_Q15;
--- a/src_FIX/SKP_Silk_warped_autocorrelation_FIX.c
+++ b/src_FIX/SKP_Silk_warped_autocorrelation_FIX.c
@@ -28,6 +28,7 @@
 #include "SKP_Silk_main_FIX.h"
 
 #define QC  10
+#define QS  14
 
 /* Autocorrelations for a warped frequency axis */
 void SKP_Silk_warped_autocorrelation_FIX(
@@ -34,35 +35,36 @@
           SKP_int32                 *corr,              /* O    Result [order + 1]                      */
           SKP_int                   *scale,             /* O    Scaling of the correlation vector       */
     const SKP_int16                 *input,             /* I    Input data to correlate                 */
-    const SKP_int16                 warping_Q16,        /* I    Warping coefficient                     */
+    const SKP_int                   warping_Q16,        /* I    Warping coefficient                     */
     const SKP_int                   length,             /* I    Length of input                         */
     const SKP_int                   order               /* I    Correlation order (even)                */
 )
 {
     SKP_int   n, i, lsh;
-    SKP_int32 tmp1_Q16, tmp2_Q16;
-    SKP_int32 state_Q16[ MAX_SHAPE_LPC_ORDER + 1 ] = { 0 };
-    SKP_int64 corr_QC[   MAX_SHAPE_LPC_ORDER + 1 ] = { 0 };
+    SKP_int32 tmp1_QS, tmp2_QS;
+    SKP_int32 state_QS[ MAX_SHAPE_LPC_ORDER + 1 ] = { 0 };
+    SKP_int64 corr_QC[  MAX_SHAPE_LPC_ORDER + 1 ] = { 0 };
 
     /* Order must be even */
     SKP_assert( ( order & 1 ) == 0 );
+    SKP_assert( 2 * QS - QC >= 0 );
 
     /* Loop over samples */
     for( n = 0; n < length; n++ ) {
-        tmp1_Q16 = SKP_LSHIFT32( ( SKP_int32 )input[ n ], 16 );
+        tmp1_QS = SKP_LSHIFT32( ( SKP_int32 )input[ n ], QS );
         /* Loop over allpass sections */
         for( i = 0; i < order; i += 2 ) {
             /* Output of allpass section */
-            tmp2_Q16 = SKP_SMLAWB( state_Q16[ i ], state_Q16[ i + 1 ] - tmp1_Q16, warping_Q16 );
-            state_Q16[ i ] = tmp1_Q16;
-            corr_QC[ i ] += SKP_RSHIFT64( SKP_SMULL( tmp1_Q16, state_Q16[ 0 ] ), 32 - QC );
+            tmp2_QS = SKP_SMLAWB( state_QS[ i ], state_QS[ i + 1 ] - tmp1_QS, warping_Q16 );
+            state_QS[ i ]  = tmp1_QS;
+            corr_QC[  i ] += SKP_RSHIFT64( SKP_SMULL( tmp1_QS, state_QS[ 0 ] ), 2 * QS - QC );
             /* Output of allpass section */
-            tmp1_Q16 = SKP_SMLAWB( state_Q16[ i + 1 ], state_Q16[ i + 2 ] - tmp2_Q16, warping_Q16 );
-            state_Q16[ i + 1 ] = tmp2_Q16;
-            corr_QC[ i + 1 ] += SKP_RSHIFT64( SKP_SMULL( tmp2_Q16, state_Q16[ 0 ] ), 32 - QC );
+            tmp1_QS = SKP_SMLAWB( state_QS[ i + 1 ], state_QS[ i + 2 ] - tmp2_QS, warping_Q16 );
+            state_QS[ i + 1 ]  = tmp2_QS;
+            corr_QC[  i + 1 ] += SKP_RSHIFT64( SKP_SMULL( tmp2_QS, state_QS[ 0 ] ), 2 * QS - QC );
         }
-        state_Q16[ order ] = tmp1_Q16;
-        corr_QC[ order ] += SKP_RSHIFT64( SKP_SMULL( tmp1_Q16, state_Q16[ 0 ] ), 32 - QC );
+        state_QS[ order ] = tmp1_QS;
+        corr_QC[  order ] += SKP_RSHIFT64( SKP_SMULL( tmp1_QS, state_QS[ 0 ] ), 2 * QS - QC );
     }
 
     lsh = SKP_Silk_CLZ64( corr_QC[ 0 ] ) - 35;
--- a/src_FLP/SKP_Silk_HP_variable_cutoff_FLP.c
+++ b/src_FLP/SKP_Silk_HP_variable_cutoff_FLP.c
@@ -26,6 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FLP.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 #if HIGH_PASS_INPUT
 
@@ -72,7 +73,7 @@
     psEnc->variable_HP_smth2 += VARIABLE_HP_SMTH_COEF2 * ( psEnc->variable_HP_smth1 - psEnc->variable_HP_smth2 );
 
     /* Convert from log scale to Hertz */
-    psEncCtrl->pitch_freq_low_Hz = ( SKP_float )pow( 2.0, psEnc->variable_HP_smth2 );
+    psEncCtrl->pitch_freq_low_Hz = ( SKP_float )pow( 2.0f, psEnc->variable_HP_smth2 );
 
     /* Limit frequency range */
     psEncCtrl->pitch_freq_low_Hz = SKP_LIMIT_float( psEncCtrl->pitch_freq_low_Hz, VARIABLE_HP_MIN_FREQ, VARIABLE_HP_MAX_FREQ );
--- a/src_FLP/SKP_Silk_LPC_analysis_filter_FLP.c
+++ b/src_FLP/SKP_Silk_LPC_analysis_filter_FLP.c
@@ -46,6 +46,10 @@
     SKP_assert( Order <= length );
 
     switch( Order ) {
+        case 6:
+            SKP_Silk_LPC_analysis_filter6_FLP(  r_LPC, PredCoef, s, length );
+        break;
+
         case 8:
             SKP_Silk_LPC_analysis_filter8_FLP(  r_LPC, PredCoef, s, length );
         break;
@@ -199,6 +203,34 @@
                    s_ptr[ -5 ] * PredCoef[ 5 ]  +
                    s_ptr[ -6 ] * PredCoef[ 6 ]  +
                    s_ptr[ -7 ] * PredCoef[ 7 ];
+
+        /* prediction error */
+        r_LPC[ix] = s_ptr[ 1 ] - LPC_pred;
+    }
+}
+
+/* 6th order LPC analysis filter, does not write first 6 samples */
+void SKP_Silk_LPC_analysis_filter6_FLP(
+          SKP_float                 r_LPC[],            /* O    LPC residual signal                     */
+    const SKP_float                 PredCoef[],         /* I    LPC coefficients                        */
+    const SKP_float                 s[],                /* I    Input signal                            */
+    const SKP_int                   length              /* I    Length of input signal                  */
+)
+{
+    SKP_int   ix = 8;
+    SKP_float LPC_pred;
+    const SKP_float *s_ptr;
+
+    for ( ; ix < length; ix++) {
+        s_ptr = &s[ix - 1];
+
+        /* short-term prediction */
+        LPC_pred = s_ptr[  0 ] * PredCoef[ 0 ]  + 
+                   s_ptr[ -1 ] * PredCoef[ 1 ]  +
+                   s_ptr[ -2 ] * PredCoef[ 2 ]  +
+                   s_ptr[ -3 ] * PredCoef[ 3 ]  +
+                   s_ptr[ -4 ] * PredCoef[ 4 ]  +
+                   s_ptr[ -5 ] * PredCoef[ 5 ];
 
         /* prediction error */
         r_LPC[ix] = s_ptr[ 1 ] - LPC_pred;
--- a/src_FLP/SKP_Silk_LTP_analysis_filter_FLP.c
+++ b/src_FLP/SKP_Silk_LTP_analysis_filter_FLP.c
@@ -28,14 +28,14 @@
 #include "SKP_Silk_main_FLP.h"
 
 void SKP_Silk_LTP_analysis_filter_FLP(
-          SKP_float         *LTP_res,                   /* O    LTP res MAX_NB_SUBFR*(pre_lgth+subfr_lngth) */
-    const SKP_float         *x,                         /* I    Input signal, with preceeding samples       */
-    const SKP_float         B[ LTP_ORDER * MAX_NB_SUBFR ],  /* I    LTP coefficients for each subframe      */
-    const SKP_int           pitchL[   MAX_NB_SUBFR ],   /* I    Pitch lags                                  */
-    const SKP_float         invGains[ MAX_NB_SUBFR ],   /* I    Inverse quantization gains                  */
-    const SKP_int           subfr_length,               /* I    Length of each subframe                     */
-    const SKP_int           nb_subfr,                   /* I    number of subframes                         */
-    const SKP_int           pre_length                  /* I    Preceeding samples for each subframe        */
+          SKP_float         *LTP_res,                       /* O    LTP res MAX_NB_SUBFR*(pre_lgth+subfr_lngth) */
+    const SKP_float         *x,                             /* I    Input signal, with preceeding samples       */
+    const SKP_float         B[ LTP_ORDER * MAX_NB_SUBFR ],  /* I    LTP coefficients for each subframe          */
+    const SKP_int           pitchL[   MAX_NB_SUBFR ],       /* I    Pitch lags                                  */
+    const SKP_float         invGains[ MAX_NB_SUBFR ],       /* I    Inverse quantization gains                  */
+    const SKP_int           subfr_length,                   /* I    Length of each subframe                     */
+    const SKP_int           nb_subfr,                       /* I    number of subframes                         */
+    const SKP_int           pre_length                      /* I    Preceeding samples for each subframe        */
 )
 {
     const SKP_float *x_ptr, *x_lag_ptr;
--- a/src_FLP/SKP_Silk_LTP_scale_ctrl_FLP.c
+++ b/src_FLP/SKP_Silk_LTP_scale_ctrl_FLP.c
@@ -51,7 +51,7 @@
     
     psEnc->prevLTPredCodGain = psEncCtrl->LTPredCodGain;
 
-    /* combine input and filtered input */
+    /* Combine input and filtered input */
     g_out = 0.5f * psEncCtrl->LTPredCodGain + ( 1.0f - 0.5f ) * psEnc->HPLTPredCodGain;
     g_limit = SKP_sigmoid( 0.5f * ( g_out - 6 ) );
     
--- a/src_FLP/SKP_Silk_NLSF_MSVQ_decode_FLP.c
+++ b/src_FLP/SKP_Silk_NLSF_MSVQ_decode_FLP.c
@@ -39,7 +39,6 @@
           SKP_int    s;
           SKP_int    i;
 
-
     /* Check that each index is within valid range */
     SKP_assert( 0 <= NLSFIndices[ 0 ] && NLSFIndices[ 0 ] < psNLSF_CB_FLP->CBStages[ 0 ].nVectors );
 
@@ -83,6 +82,11 @@
                 pNLSF[ i ] += pCB_element[ i ];
             }
         }
+    }
+
+    /* Add 1/2 */
+    for( i = 0; i < LPC_order; i++ ) {
+        pNLSF[ i ] += 0.5f;
     }
 
     /* NLSF stabilization */
--- a/src_FLP/SKP_Silk_NLSF_MSVQ_encode_FLP.c
+++ b/src_FLP/SKP_Silk_NLSF_MSVQ_encode_FLP.c
@@ -43,9 +43,8 @@
     const SKP_int                   deactivate_fluc_red /* I    Deactivate fluctuation reduction        */
 )
 {
-    SKP_int     i, s, k, cur_survivors, prev_survivors, input_index, cb_index, bestIndex;
+    SKP_int     i, s, k, cur_survivors, prev_survivors, min_survivors, input_index, cb_index, bestIndex;
     SKP_float   se, wsse, rateDistThreshold, bestRateDist;
-    SKP_float   pNLSF_in[ MAX_LPC_ORDER ];
 
 #if( LOW_COMPLEXITY_ONLY == 1 )
     SKP_float   pRateDist[      NLSF_MSVQ_TREE_SEARCH_MAX_VECTORS_EVALUATED_LC_MODE ];
@@ -79,11 +78,6 @@
 
     cur_survivors = NLSF_MSVQ_Survivors;
 
-
-
-    /* Copy the input vector */
-    SKP_memcpy( pNLSF_in, pNLSF, LPC_order * sizeof(SKP_float) );
-
     /****************************************************/
     /* Tree search for the multi-stage vector quantizer */
     /****************************************************/
@@ -90,13 +84,18 @@
 
     /* Clear accumulated rates */
     SKP_memset( pRate, 0, NLSF_MSVQ_Survivors * sizeof( SKP_float ) );
-    
-    /* Copy NLSFs into residual signal vector */
-    SKP_memcpy( pRes, pNLSF, LPC_order * sizeof( SKP_float ) );
 
+    /* Subtract 1/2 from NLSF input vector to create initial residual */
+    for( i = 0; i < LPC_order; i++ ) {
+        pRes[ i ] = pNLSF[ i ] - 0.5f;
+    }
+
     /* Set first stage values */
     prev_survivors = 1;
 
+    /* Minimum number of survivors */
+    min_survivors = NLSF_MSVQ_Survivors / 2;
+
     /* Loop over all stages */
     for( s = 0; s < psNLSF_CB_FLP->nStages; s++ ) {
 
@@ -120,8 +119,8 @@
         SKP_Silk_insertion_sort_increasing_FLP( pRateDist, pTempIndices, prev_survivors * pCurrentCBStage->nVectors, cur_survivors );
 
         /* Discard survivors with rate-distortion values too far above the best one */
-        rateDistThreshold = NLSF_MSVQ_SURV_MAX_REL_RD * pRateDist[ 0 ];
-        while( pRateDist[ cur_survivors - 1 ] > rateDistThreshold && cur_survivors > 1 ) {
+        rateDistThreshold = ( 1.0f + NLSF_MSVQ_Survivors * NLSF_MSVQ_SURV_MAX_REL_RD ) * pRateDist[ 0 ];
+        while( pRateDist[ cur_survivors - 1 ] > rateDistThreshold && cur_survivors > min_survivors ) {
             cur_survivors--;
         }
 
--- a/src_FLP/SKP_Silk_VQ_nearest_neighbor_FLP.c
+++ b/src_FLP/SKP_Silk_VQ_nearest_neighbor_FLP.c
@@ -27,6 +27,8 @@
 
 #include "SKP_Silk_main_FLP.h"
 
+#define Q14_CONVERSION_FAC                              6.1035e-005f // 1 / 2^14
+
 /* entropy constrained MATRIX-weighted VQ, for a single input data vector */
 void SKP_Silk_VQ_WMat_EC_FLP(
           SKP_int                   *ind,               /* O    Index of best codebook vector           */
--- a/src_FLP/SKP_Silk_apply_sine_window_FLP.c
+++ b/src_FLP/SKP_Silk_apply_sine_window_FLP.c
@@ -29,7 +29,6 @@
 
 /* Apply sine window to signal vector.                                                                  */
 /* Window types:                                                                                        */
-/*  0 -> sine window from 0 to pi                                                                       */
 /*  1 -> sine window from 0 to pi/2                                                                     */
 /*  2 -> sine window from pi/2 to pi                                                                    */
 void SKP_Silk_apply_sine_window_FLP(
@@ -42,13 +41,12 @@
     SKP_int   k;
     SKP_float freq, c, S0, S1;
 
+    SKP_assert( win_type == 1 || win_type == 2 );
+
     /* Length must be multiple of 4 */
     SKP_assert( ( length & 3 ) == 0 );
 
     freq = PI / ( length + 1 );
-    if( win_type == 0 ) {
-        freq = 2.0f * freq;
-    }
 
     /* Approximation of 2 * cos(f) */
     c = 2.0f - freq * freq;
--- a/src_FLP/SKP_Silk_control_codec_FLP.c
+++ b/src_FLP/SKP_Silk_control_codec_FLP.c
@@ -26,157 +26,73 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FLP.h"
+#include "SKP_Silk_setup_complexity.h"
 
-/* ToDo: Move the functions below to common to be able to use them in FLP control codec also */
 SKP_INLINE SKP_int SKP_Silk_setup_resamplers(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         API_fs_Hz,          /* I                        */
-    SKP_int                         fs_kHz              /* I                        */
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Pointer to Silk encoder state FLP       */
+    SKP_int                         fs_kHz              /* I    Internal sampling rate (kHz)            */
 );
 
 SKP_INLINE SKP_int SKP_Silk_setup_packetsize(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         PacketSize_ms       /* I                        */
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Pointer to Silk encoder state FLP       */
+    SKP_int                         PacketSize_ms       /* I    Packet length (ms)                      */
 );
 
 SKP_INLINE SKP_int SKP_Silk_setup_fs(
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         fs_kHz              /* I                        */
+    SKP_int                         fs_kHz,             /* I                        */
+    SKP_int                         PacketSize_ms       /* I                        */
 );
 
-SKP_INLINE SKP_int SKP_Silk_setup_complexity(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         Complexity          /* I                        */
-);
-
 SKP_INLINE SKP_int SKP_Silk_setup_rate(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         TargetRate_bps      /* I                        */
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Pointer to Silk encoder state FLP       */
+    SKP_int                         TargetRate_bps      /* I    Target max bitrate                      */
 );
 
 SKP_INLINE SKP_int SKP_Silk_setup_LBRR(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         INBandFEC_enabled   /* I                        */
+    SKP_Silk_encoder_state_FLP      *psEnc              /* I/O  Pointer to Silk encoder state FLP       */
 );
 
-/* Control encoder SNR */
+/* Control encoder */
 SKP_int SKP_Silk_control_encoder_FLP( 
-    SKP_Silk_encoder_state_FLP  *psEnc,             /* I/O  Pointer to Silk encoder state FLP       */
-    const SKP_int32             API_fs_Hz,          /* I    External (API) sampling rate (Hz)       */
-    const SKP_int               max_internal_fs_kHz,/* I    Maximum internal sampling rate (kHz)    */
-    const SKP_int               PacketSize_ms,      /* I    Packet length (ms)                      */
-          SKP_int32             TargetRate_bps,     /* I    Target max bitrate (if SNR_dB == 0)     */
-    const SKP_int               PacketLoss_perc,    /* I    Packet loss rate (in percent)           */
-    const SKP_int               INBandFEC_enabled,  /* I    Enable (1) / disable (0) inband FEC     */
-    const SKP_int               DTX_enabled,        /* I    Enable / disable DTX                    */
-    const SKP_int               InputFramesize_ms,  /* I    Inputframe in ms                        */
-    const SKP_int               Complexity          /* I    Complexity (0->low; 1->medium; 2->high) */
+    SKP_Silk_encoder_state_FLP  *psEnc,                 /* I/O  Pointer to Silk encoder state FLP       */
+    const SKP_int               PacketSize_ms,          /* I    Packet length (ms)                      */
+    const SKP_int32             TargetRate_bps,         /* I    Target max bitrate (bps)                */
+    const SKP_int               PacketLoss_perc,        /* I    Packet loss rate (in percent)           */
+    const SKP_int               Complexity              /* I    Complexity (0->low; 1->medium; 2->high) */
 )
 {
     SKP_int   fs_kHz, ret = 0;
 
-    /* State machine for the SWB/WB switching */
-    fs_kHz = psEnc->sCmn.fs_kHz;
-    
-    /* Only switch during low speech activity, when no frames are sitting in the payload buffer */
-    if( API_fs_Hz == 8000 || fs_kHz == 0 || API_fs_Hz < fs_kHz * 1000 || fs_kHz > max_internal_fs_kHz ) {
-        /* Switching is not possible, encoder just initialized, internal mode higher than external, */
-        /* or internal mode higher than maximum allowed internal mode                               */
-        fs_kHz = SKP_min( SKP_DIV32_16( API_fs_Hz, 1000 ), max_internal_fs_kHz );
-    } else {
-        /* Accumulate the difference between the target rate and limit for switching down */
-        psEnc->sCmn.bitrateDiff += SKP_MUL( InputFramesize_ms, TargetRate_bps - psEnc->sCmn.bitrate_threshold_down );
-        psEnc->sCmn.bitrateDiff  = SKP_min( psEnc->sCmn.bitrateDiff, 0 );
-
-        if( psEnc->speech_activity < 0.5f && psEnc->sCmn.nFramesInPayloadBuf == 0 ) { /* Low speech activity and payload buffer empty */
-            /* Check if we should switch down */
-#if SWITCH_TRANSITION_FILTERING 
-            if( ( psEnc->sCmn.sLP.transition_frame_no == 0 ) &&                         /* Transition phase not active */
-                ( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ||              /* Bitrate threshold is met */
-                ( psEnc->sCmn.sSWBdetect.WB_detected * psEnc->sCmn.fs_kHz == 24 ) ) ) { /* Forced down-switching due to WB input */
-                psEnc->sCmn.sLP.transition_frame_no = 1;                                /* Begin transition phase */
-                psEnc->sCmn.sLP.mode                = 0;                                /* Switch down */
-            } else if( 
-                ( psEnc->sCmn.sLP.transition_frame_no >= TRANSITION_FRAMES_DOWN ) &&    /* Transition phase complete */
-                ( psEnc->sCmn.sLP.mode == 0 ) ) {                                       /* Ready to switch down */
-                psEnc->sCmn.sLP.transition_frame_no = 0;                                /* Ready for new transition phase */
-#else
-            if( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ) {               /* Bitrate threshold is met */ 
-#endif            
-                psEnc->sCmn.bitrateDiff = 0;
-
-                /* Switch to a lower sample frequency */
-                if( psEnc->sCmn.fs_kHz == 24 ) {
-                    fs_kHz = 16;
-                } else if( psEnc->sCmn.fs_kHz == 16 ) {
-                    fs_kHz = 12;
-                } else {
-                    SKP_assert( psEnc->sCmn.fs_kHz == 12 );
-                    fs_kHz = 8;
-                }
-            }
-
-            /* Check if we should switch up */
-            if( ( ( psEnc->sCmn.fs_kHz * 1000 < API_fs_Hz ) &&
-                ( TargetRate_bps >= psEnc->sCmn.bitrate_threshold_up ) && 
-                ( psEnc->sCmn.sSWBdetect.WB_detected * psEnc->sCmn.fs_kHz != 16 ) ) && 
-                ( ( psEnc->sCmn.fs_kHz == 16 ) && ( max_internal_fs_kHz >= 24 ) || 
-                  ( psEnc->sCmn.fs_kHz == 12 ) && ( max_internal_fs_kHz >= 16 ) ||
-                  ( psEnc->sCmn.fs_kHz ==  8 ) && ( max_internal_fs_kHz >= 12 ) ) 
-#if SWITCH_TRANSITION_FILTERING
-                  && ( psEnc->sCmn.sLP.transition_frame_no == 0 ) ) { /* No transition phase running, ready to switch */
-                    psEnc->sCmn.sLP.mode = 1; /* Switch up */
-#else
-                ) {
-#endif
-                psEnc->sCmn.bitrateDiff = 0;
-
-                /* Switch to a higher sample frequency */
-                if( psEnc->sCmn.fs_kHz == 8 ) {
-                    fs_kHz = 12;
-                } else if( psEnc->sCmn.fs_kHz == 12 ) {
-                    fs_kHz = 16;
-                } else {
-                    SKP_assert( psEnc->sCmn.fs_kHz == 16 );
-                    fs_kHz = 24;
-                } 
-            }
+    if( psEnc->sCmn.controlled_since_last_payload != 0 ) {
+        if( psEnc->sCmn.API_fs_Hz != psEnc->sCmn.prev_API_fs_Hz && psEnc->sCmn.fs_kHz > 0 ) {
+            /* Change in API sampling rate in the middle of encoding a packet */
+            ret += SKP_Silk_setup_resamplers( psEnc, psEnc->sCmn.fs_kHz );
         }
-    }
-
-#if SWITCH_TRANSITION_FILTERING
-    /* After switching up, stop transition filter during speech inactivity */
-    if( ( psEnc->sCmn.sLP.mode == 1 ) &&
-        ( psEnc->sCmn.sLP.transition_frame_no >= TRANSITION_FRAMES_UP ) && 
-        ( psEnc->speech_activity < 0.5f ) && 
-        ( psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {
-        
-        psEnc->sCmn.sLP.transition_frame_no = 0;
-
-        /* Reset transition filter state */
-        SKP_memset( psEnc->sCmn.sLP.In_LP_State, 0, 2 * sizeof( SKP_int32 ) );
+        return ret;
     }
-#endif
 
+    /* Beyond this point we know that there are no previously coded frames in the payload buffer */
+
     /********************************************/
-    /* Prepare resampler and buffered data      */    
+    /* Determine internal sampling rate         */
     /********************************************/
-    SKP_Silk_setup_resamplers( psEnc, API_fs_Hz, fs_kHz );
+    fs_kHz = SKP_Silk_control_audio_bandwidth( &psEnc->sCmn, TargetRate_bps );
 
     /********************************************/
-    /* Set packet size                          */
+    /* Prepare resampler and buffered data      */
     /********************************************/
-    ret += SKP_Silk_setup_packetsize( psEnc, PacketSize_ms );
+    ret += SKP_Silk_setup_resamplers( psEnc, fs_kHz );
 
     /********************************************/
     /* Set internal sampling frequency          */
     /********************************************/
-    ret += SKP_Silk_setup_fs( psEnc, fs_kHz );
+    ret += SKP_Silk_setup_fs( psEnc, fs_kHz, PacketSize_ms );
 
     /********************************************/
     /* Set encoding complexity                  */
     /********************************************/
-    ret += SKP_Silk_setup_complexity( psEnc, Complexity );
+    ret += SKP_Silk_setup_complexity( &psEnc->sCmn, Complexity );
 
     /********************************************/
     /* Set bitrate/coding quality               */
@@ -194,15 +110,9 @@
     /********************************************/
     /* Set LBRR usage                           */
     /********************************************/
-    ret += SKP_Silk_setup_LBRR( psEnc, INBandFEC_enabled );
+    ret += SKP_Silk_setup_LBRR( psEnc );
 
-    /********************************************/
-    /* Set DTX mode                             */
-    /********************************************/
-    if( DTX_enabled < 0 || DTX_enabled > 1 ) {
-        ret = SKP_SILK_ENC_INVALID_DTX_SETTING;
-    }
-    psEnc->sCmn.useDTX = DTX_enabled;
+    psEnc->sCmn.controlled_since_last_payload = 1;
 
     return ret;
 }
@@ -210,7 +120,7 @@
 /* Control low bitrate redundancy usage */
 void SKP_Silk_LBRR_ctrl_FLP(
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I    Encoder state FLP                       */
-    SKP_Silk_encoder_control        *psEncCtrl          /* I/O  Encoder control                         */
+    SKP_Silk_encoder_control        *psEncCtrlC         /* I/O  Encoder control                         */
 )
 {
     SKP_int LBRR_usage;
@@ -221,12 +131,12 @@
         /* Usage Control based on sensitivity and packet loss caracteristics */
         /* For now only enable adding to next for active frames. Make more complex later */
         LBRR_usage = SKP_SILK_NO_LBRR;
-        if( psEnc->speech_activity > LBRR_SPEECH_ACTIVITY_THRES && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) { // nb! maybe multiply loss prob and speech activity 
-            LBRR_usage = SKP_SILK_ADD_LBRR_TO_PLUS1;
+        if( psEnc->speech_activity > LBRR_SPEECH_ACTIVITY_THRES && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) {
+            LBRR_usage = SKP_SILK_LBRR;
         }
-        psEncCtrl->LBRR_usage = LBRR_usage;
+        psEncCtrlC->LBRR_usage = LBRR_usage;
     } else {
-        psEncCtrl->LBRR_usage = SKP_SILK_NO_LBRR;
+        psEncCtrlC->LBRR_usage = SKP_SILK_NO_LBRR;
     }
 }
 
@@ -239,25 +149,19 @@
     if( ( PacketSize_ms !=  10 ) &&
         ( PacketSize_ms !=  20 ) &&
         ( PacketSize_ms !=  40 ) && 
-        ( PacketSize_ms !=  60 ) && 
-        ( PacketSize_ms !=  80 ) && 
-        ( PacketSize_ms != 100 ) ) {
+        ( PacketSize_ms !=  60 ) ) {
         ret = SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;
     } else {
         if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) {
             if( PacketSize_ms == 10 ) {
-                if( psEnc->sCmn.nFramesInPayloadBuf == 0 ) {
-                    /* Only allowed when the payload buffer is empty */
-                    psEnc->sCmn.nb_subfr = MAX_NB_SUBFR >> 1;
-                    psEnc->sCmn.frame_length   = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
-                    psEnc->sCmn.PacketSize_ms = PacketSize_ms;
-                    psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, psEnc->sCmn.fs_kHz );
-                    /* Packet length changes. Reset LBRR buffer */
-                    SKP_Silk_LBRR_reset( &psEnc->sCmn );
-                }
+                /* Only allowed when the payload buffer is empty */
+                psEnc->sCmn.nb_subfr = MAX_NB_SUBFR >> 1;
+                psEnc->sCmn.PacketSize_ms = PacketSize_ms;
+                psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, psEnc->sCmn.fs_kHz );
+                /* Packet length changes. Reset LBRR buffer */
+                SKP_Silk_LBRR_reset( &psEnc->sCmn );
             } else{
                 psEnc->sCmn.nb_subfr = MAX_NB_SUBFR;
-                psEnc->sCmn.frame_length   = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
                 psEnc->sCmn.PacketSize_ms = PacketSize_ms;
                 psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, psEnc->sCmn.fs_kHz );
                 /* Packet length changes. Reset LBRR buffer */
@@ -264,58 +168,64 @@
                 SKP_Silk_LBRR_reset( &psEnc->sCmn );
             }
         }
+        psEnc->sCmn.frame_length = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
     }
+
     return(ret);
 }
 
 SKP_INLINE SKP_int SKP_Silk_setup_resamplers(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         API_fs_Hz,          /* I                        */
-    SKP_int                         fs_kHz              /* I                        */
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Pointer to Silk encoder state FLP       */
+    SKP_int                         fs_kHz              /* I    External (API) sampling rate (Hz)       */
 )
 {
     SKP_int ret = SKP_SILK_NO_ERROR;
     
-    if( psEnc->sCmn.fs_kHz != fs_kHz || psEnc->sCmn.prev_API_fs_Hz != API_fs_Hz ) {
+    if( psEnc->sCmn.fs_kHz != fs_kHz || psEnc->sCmn.prev_API_fs_Hz != psEnc->sCmn.API_fs_Hz ) {
 
-        /* Allocate space for worst case temporary upsampling, 8 to 48 kHz, so a factor 6 */
-        SKP_int16 x_buf_API_fs_Hz[ ( MAX_API_FS_KHZ / 8 ) * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ];
-        SKP_int16 x_bufFIX[               2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; 
+        if( psEnc->sCmn.fs_kHz == 0 ) {
+            /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */
+            ret += SKP_Silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, fs_kHz * 1000 );
+        } else {
+            /* Allocate space for worst case temporary upsampling, 8 to 48 kHz, so a factor 6 */
+            SKP_int16 x_buf_API_fs_Hz[ ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * ( MAX_API_FS_KHZ / 8 ) ];
+            SKP_int16 x_bufFIX[          2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; 
 
-        SKP_int32 nSamples_temp = 2 * psEnc->sCmn.frame_length + psEnc->sCmn.la_shape;
+            SKP_int32 nSamples_temp = 2 * psEnc->sCmn.frame_length + LA_SHAPE_MS * psEnc->sCmn.fs_kHz;
 
-        SKP_float2short_array( x_bufFIX, psEnc->x_buf, 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX );
+            SKP_float2short_array( x_bufFIX, psEnc->x_buf, nSamples_temp );
 
-        if( fs_kHz * 1000 < API_fs_Hz && psEnc->sCmn.fs_kHz != 0 ) {
-            /* Resample buffered data in x_buf to API_fs_Hz */
+            if( fs_kHz * 1000 < psEnc->sCmn.API_fs_Hz && psEnc->sCmn.fs_kHz != 0 ) {
+                /* Resample buffered data in x_buf to API_fs_Hz */
 
-            SKP_Silk_resampler_state_struct  temp_resampler_state;
+                SKP_Silk_resampler_state_struct  temp_resampler_state;
 
-            /* Initialize resampler for temporary resampling of x_buf data to API_fs_Hz */
-            ret += SKP_Silk_resampler_init( &temp_resampler_state, psEnc->sCmn.fs_kHz * 1000, API_fs_Hz );
+                /* Initialize resampler for temporary resampling of x_buf data to API_fs_Hz */
+                ret += SKP_Silk_resampler_init( &temp_resampler_state, psEnc->sCmn.fs_kHz * 1000, psEnc->sCmn.API_fs_Hz );
 
-            /* Temporary resampling of x_buf data to API_fs_Hz */
-            ret += SKP_Silk_resampler( &temp_resampler_state, x_buf_API_fs_Hz, x_bufFIX, nSamples_temp );
+                /* Temporary resampling of x_buf data to API_fs_Hz */
+                ret += SKP_Silk_resampler( &temp_resampler_state, x_buf_API_fs_Hz, x_bufFIX, nSamples_temp );
 
-            /* Calculate number of samples that has been temporarily upsampled */
-            nSamples_temp = SKP_DIV32_16( nSamples_temp * API_fs_Hz, psEnc->sCmn.fs_kHz * 1000 );
+                /* Calculate number of samples that has been temporarily upsampled */
+                nSamples_temp = SKP_DIV32_16( nSamples_temp * psEnc->sCmn.API_fs_Hz, psEnc->sCmn.fs_kHz * 1000 );
 
-            /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */
-            ret += SKP_Silk_resampler_init( &psEnc->sCmn.resampler_state, API_fs_Hz, fs_kHz * 1000 );
+                /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */
+                ret += SKP_Silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, fs_kHz * 1000 );
 
-        } else {
-            /* Copy data */
-            SKP_memcpy( x_buf_API_fs_Hz, x_bufFIX, nSamples_temp * sizeof( SKP_int16 ) );
-        }
+            } else {
+                /* Copy data */
+                SKP_memcpy( x_buf_API_fs_Hz, x_bufFIX, nSamples_temp * sizeof( SKP_int16 ) );
+            }
 
-        if( 1000 * fs_kHz != API_fs_Hz ) {
-            /* Correct resampler state (unless resampling by a factor 1) by resampling buffered data from API_fs_Hz to fs_kHz */
-            ret += SKP_Silk_resampler( &psEnc->sCmn.resampler_state, x_bufFIX, x_buf_API_fs_Hz, nSamples_temp );
+            if( 1000 * fs_kHz != psEnc->sCmn.API_fs_Hz ) {
+                /* Correct resampler state (unless resampling by a factor 1) by resampling buffered data from API_fs_Hz to fs_kHz */
+                ret += SKP_Silk_resampler( &psEnc->sCmn.resampler_state, x_bufFIX, x_buf_API_fs_Hz, nSamples_temp );
+            }
+            SKP_short2float_array( psEnc->x_buf, x_bufFIX, ( 2 * MAX_FRAME_LENGTH_MS + LA_SHAPE_MS ) * fs_kHz );
         }
-        SKP_short2float_array( psEnc->x_buf, x_bufFIX, 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX );
     }
 
-    psEnc->sCmn.prev_API_fs_Hz = API_fs_Hz;
+    psEnc->sCmn.prev_API_fs_Hz = psEnc->sCmn.API_fs_Hz;
 
     return(ret);
 }
@@ -322,7 +232,8 @@
 
 SKP_INLINE SKP_int SKP_Silk_setup_fs(
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         fs_kHz              /* I                        */
+    SKP_int                         fs_kHz,             /* I                        */
+    SKP_int                         PacketSize_ms       /* I                        */
 )
 {
     SKP_int ret = SKP_SILK_NO_ERROR;
@@ -380,10 +291,8 @@
             psEnc->psNLSF_CB_FLP[  1 ]  = &SKP_Silk_NLSF_CB1_16_FLP;
         }
         psEnc->sCmn.subfr_length   = SUB_FRAME_LENGTH_MS * fs_kHz;
-        psEnc->sCmn.frame_length   = psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr;
         psEnc->sCmn.ltp_mem_length = LTP_MEM_LENGTH_MS * fs_kHz; 
         psEnc->sCmn.la_pitch       = LA_PITCH_MS * fs_kHz;
-        psEnc->sCmn.la_shape       = LA_SHAPE_MS * fs_kHz;
         psEnc->sPred.min_pitch_lag =  3 * fs_kHz;
         psEnc->sPred.max_pitch_lag = 18 * fs_kHz;
         if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ){
@@ -409,75 +318,22 @@
             psEnc->sCmn.bitrate_threshold_down = 0;
         }
         psEnc->sCmn.fs_kHz_changed = 1;
-
-        /* Check that settings are valid */
-        SKP_assert( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length );
     }
-    return( ret );
-}
 
-SKP_INLINE SKP_int SKP_Silk_setup_complexity(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         Complexity          /* I                        */
-)
-{
-    SKP_int ret = SKP_SILK_NO_ERROR;
+    /********************************************/
+    /* Set packet size                          */
+    /********************************************/
+    ret += SKP_Silk_setup_packetsize( psEnc, PacketSize_ms );
 
     /* Check that settings are valid */
-    if( LOW_COMPLEXITY_ONLY && Complexity != 0 ) { 
-        ret = SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING;
-    }
-
-    /* Set encoding complexity */
-    if( Complexity == 0 || LOW_COMPLEXITY_ONLY ) {
-        /* Low complexity */
-        psEnc->sCmn.Complexity                  = 0;
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_LC_MODE;
-        psEnc->pitchEstimationThreshold         = FIND_PITCH_CORRELATION_THRESHOLD_LC_MODE;
-        psEnc->sCmn.pitchEstimationLPCOrder     = 8;
-        psEnc->sCmn.shapingLPCOrder             = 8;
-        psEnc->sCmn.nStatesDelayedDecision      = 1;
-        psEnc->sCmn.useInterpolatedNLSFs        = 0;
-        psEnc->sCmn.LTPQuantLowComplexity       = 1;
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS_LC_MODE;
-    } else if( Complexity == 1 ) {
-        /* Medium complexity */
-        psEnc->sCmn.Complexity                  = 1;
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_MC_MODE;
-        psEnc->pitchEstimationThreshold         = FIND_PITCH_CORRELATION_THRESHOLD_MC_MODE;
-        psEnc->sCmn.pitchEstimationLPCOrder     = 12;
-        psEnc->sCmn.shapingLPCOrder             = 12;
-        psEnc->sCmn.nStatesDelayedDecision      = 2;
-        psEnc->sCmn.useInterpolatedNLSFs        = 0;
-        psEnc->sCmn.LTPQuantLowComplexity       = 0;
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS_MC_MODE;
-    } else if( Complexity == 2 ) {
-        /* High complexity */
-        psEnc->sCmn.Complexity                  = 2;
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_HC_MODE;
-        psEnc->pitchEstimationThreshold         = FIND_PITCH_CORRELATION_THRESHOLD_HC_MODE;
-        psEnc->sCmn.pitchEstimationLPCOrder     = 16;
-        psEnc->sCmn.shapingLPCOrder             = 16;
-        psEnc->sCmn.nStatesDelayedDecision      = 4;
-        psEnc->sCmn.useInterpolatedNLSFs        = 1;
-        psEnc->sCmn.LTPQuantLowComplexity       = 0;
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS;
-    } else {
-        ret = SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING;
-    }
-
-    /* Do not allow higher pitch estimation LPC order than predict LPC order */
-    psEnc->sCmn.pitchEstimationLPCOrder = SKP_min_int( psEnc->sCmn.pitchEstimationLPCOrder, psEnc->sCmn.predictLPCOrder );
-
-    SKP_assert( psEnc->sCmn.pitchEstimationLPCOrder <= MAX_FIND_PITCH_LPC_ORDER );
-    SKP_assert( psEnc->sCmn.shapingLPCOrder         <= MAX_SHAPE_LPC_ORDER      );
-    SKP_assert( psEnc->sCmn.nStatesDelayedDecision  <= MAX_DEL_DEC_STATES       );
+    SKP_assert( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length );
+ 
     return( ret );
 }
 
 SKP_INLINE SKP_int SKP_Silk_setup_rate(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         TargetRate_bps      /* I                        */
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Pointer to Silk encoder state FLP       */
+    SKP_int                         TargetRate_bps      /* I    Target max bitrate                      */
 )
 {
     SKP_int k, ret = SKP_SILK_NO_ERROR;
@@ -485,16 +341,6 @@
     const SKP_int32 *rateTable;
 
     /* Set bitrate/coding quality */
-    TargetRate_bps = SKP_min( TargetRate_bps, 100000 );
-    if( psEnc->sCmn.fs_kHz == 8 ) {
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_NB_BPS );
-    } else if( psEnc->sCmn.fs_kHz == 12 ) {
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_MB_BPS );
-    } else if( psEnc->sCmn.fs_kHz == 16 ) {
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_WB_BPS );
-    } else {
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_SWB_BPS );
-    }
     if( TargetRate_bps != psEnc->sCmn.TargetRate_bps ) {
         psEnc->sCmn.TargetRate_bps = TargetRate_bps;
 
@@ -522,57 +368,53 @@
 }
 
 SKP_INLINE SKP_int SKP_Silk_setup_LBRR(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */
-    SKP_int                         INBandFEC_enabled   /* I                        */
+    SKP_Silk_encoder_state_FLP      *psEnc              /* I/O  Pointer to Silk encoder state FLP       */
 )
 {
     SKP_int   ret = SKP_SILK_NO_ERROR;
-    SKP_int32 LBRRRate_thres_bps;
 
 #if USE_LBRR
-    if( INBandFEC_enabled < 0 || INBandFEC_enabled > 1 ) {
+    SKP_int32 LBRRRate_thres_bps;
+
+    if( psEnc->sCmn.useInBandFEC < 0 || psEnc->sCmn.useInBandFEC > 1 ) {
         ret = SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING;
     }
     
-    /* Only change settings if first frame in packet */
-    if( psEnc->sCmn.nFramesInPayloadBuf == 0 ) {
-        
-        psEnc->sCmn.LBRR_enabled = INBandFEC_enabled;
-        if( psEnc->sCmn.fs_kHz == 8 ) {
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 9000;
-        } else if( psEnc->sCmn.fs_kHz == 12 ) {
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 6000;;
-        } else if( psEnc->sCmn.fs_kHz == 16 ) {
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 3000;
-        } else {
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS;
-        }
+    psEnc->sCmn.LBRR_enabled = psEnc->sCmn.useInBandFEC;
+    if( psEnc->sCmn.fs_kHz == 8 ) {
+        LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 9000;
+    } else if( psEnc->sCmn.fs_kHz == 12 ) {
+        LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 6000;;
+    } else if( psEnc->sCmn.fs_kHz == 16 ) {
+        LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 3000;
+    } else {
+        LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS;
+    }
 
-        if( psEnc->sCmn.TargetRate_bps >= LBRRRate_thres_bps ) {
-            /* Set gain increase / rate reduction for LBRR usage */
-            /* Coarsely tuned with PESQ for now. */
-            /* Linear regression coefs G = 8 - 0.5 * loss */
-            /* Meaning that at 16% loss main rate and redundant rate is the same, -> G = 0 */
-            psEnc->sCmn.LBRR_GainIncreases = SKP_max_int( 8 - SKP_RSHIFT( psEnc->sCmn.PacketLoss_perc, 1 ), 0 );
+    if( psEnc->sCmn.TargetRate_bps >= LBRRRate_thres_bps ) {
+        /* Set gain increase / rate reduction for LBRR usage */
+        /* Coarsely tuned with PESQ for now. */
+        /* Linear regression coefs G = 8 - 0.5 * loss */
+        /* Meaning that at 16% loss main rate and redundant rate is the same, -> G = 0 */
+        psEnc->sCmn.LBRR_GainIncreases = SKP_max_int( 8 - SKP_RSHIFT( psEnc->sCmn.PacketLoss_perc, 1 ), 0 );
 
-            /* Set main stream rate compensation */
-            if( psEnc->sCmn.LBRR_enabled && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) {
-                /* Tuned to give aprox same mean / weighted bitrate as no inband FEC */
-                psEnc->inBandFEC_SNR_comp = 6.0f - 0.5f * psEnc->sCmn.LBRR_GainIncreases;
-            } else {
-                psEnc->inBandFEC_SNR_comp = 0;
-                psEnc->sCmn.LBRR_enabled  = 0;
-            }
+        /* Set main stream rate compensation */
+        if( psEnc->sCmn.LBRR_enabled && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) {
+            /* Tuned to give approx same mean / weighted bitrate as no inband FEC */
+            psEnc->inBandFEC_SNR_comp = 6.0f - 0.5f * psEnc->sCmn.LBRR_GainIncreases;
         } else {
-            psEnc->inBandFEC_SNR_comp     = 0;
-            psEnc->sCmn.LBRR_enabled      = 0;
+            psEnc->inBandFEC_SNR_comp = 0;
+            psEnc->sCmn.LBRR_enabled  = 0;
         }
+    } else {
+        psEnc->inBandFEC_SNR_comp     = 0;
+        psEnc->sCmn.LBRR_enabled      = 0;
     }
 #else
-    if( INBandFEC_enabled != 0 ) {
+    if( psEnc->sCmn.LBRR_enabled != 0 ) {
         ret = SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING;
+        psEnc->sCmn.LBRR_enabled = 0;
     }
-    psEnc->sCmn.LBRR_enabled = 0;
 #endif
-    return( ret );
+    return ret;
 }
--- a/src_FLP/SKP_Silk_encode_frame_FLP.c
+++ b/src_FLP/SKP_Silk_encode_frame_FLP.c
@@ -1,5 +1,32 @@
-#include <stdlib.h>
+/***********************************************************************
+Copyright (c) 2006-2010, Skype Limited. All rights reserved. 
+Redistribution and use in source and binary forms, with or without 
+modification, (subject to the limitations in the disclaimer below) 
+are permitted provided that the following conditions are met:
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright 
+notice, this list of conditions and the following disclaimer in the 
+documentation and/or other materials provided with the distribution.
+- Neither the name of Skype Limited, nor the names of specific 
+contributors, may be used to endorse or promote products derived from 
+this software without specific prior written permission.
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED 
+BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+***********************************************************************/
+
 #include "SKP_Silk_main_FLP.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /****************/
 /* Encode frame */
@@ -6,9 +33,9 @@
 /****************/
 SKP_int SKP_Silk_encode_frame_FLP( 
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
-    SKP_int16                       *pnBytesOut,        /* I/O  Number of payload bytes;                */
+    SKP_int32                       *pnBytesOut,        /* I/O  Number of payload bytes                 */
                                                         /*      input: max length; output: used         */
-    ec_enc                          *psRangeEnc,        /* I/O  compressor data structure                */
+    ec_enc                          *psRangeEnc,        /* I/O  compressor data structure               */
     const SKP_int16                 *pIn                /* I    Input speech frame                      */
 )
 {
@@ -27,7 +54,6 @@
 
     const SKP_uint16 *FrameTermination_CDF;
 
-    sEncCtrl.sCmn.LBRR_usage = 0;
 TIC(ENCODE_FRAME)
 
     sEncCtrl.sCmn.Seed = psEnc->sCmn.frameCounter++ & 3;
@@ -67,11 +93,11 @@
     /*******************************************/
     /* Copy new frame to front of input buffer */
     /*******************************************/
-    SKP_short2float_array( x_frame + psEnc->sCmn.la_shape, pIn_HP_LP, psEnc->sCmn.frame_length );
+    SKP_short2float_array( x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, pIn_HP_LP, psEnc->sCmn.frame_length );
 
     /* Add tiny signal to avoid high CPU load from denormalized floating point numbers */
     for( k = 0; k < 8; k++ ) {
-        x_frame[ psEnc->sCmn.la_shape + k * ( psEnc->sCmn.frame_length >> 3 ) ] += ( 1 - ( k & 2 ) ) * 1e-6f;
+        x_frame[ LA_SHAPE_MS * psEnc->sCmn.fs_kHz + k * ( psEnc->sCmn.frame_length >> 3 ) ] += ( 1 - ( k & 2 ) ) * 1e-6f;
     }
 
     /*****************************************/
@@ -123,8 +149,7 @@
     /* Noise shaping quantization            */
     /*****************************************/
 TIC(NSQ)
-    SKP_Silk_NSQ_wrapper_FLP( psEnc, &sEncCtrl, xfw,
-        &psEnc->sCmn.q[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ], 0 );
+    SKP_Silk_NSQ_wrapper_FLP( psEnc, &sEncCtrl, xfw, &psEnc->sCmn.q[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ], 0 );
 TOC(NSQ)
 
     /**************************************************/
@@ -166,11 +191,11 @@
     /****************************************/
     /* Update input buffer */
     SKP_memmove( psEnc->x_buf, &psEnc->x_buf[ psEnc->sCmn.frame_length ], 
-        ( psEnc->sCmn.ltp_mem_length + psEnc->sCmn.la_shape ) * sizeof( SKP_float ) );
+        ( psEnc->sCmn.ltp_mem_length + LA_SHAPE_MS * psEnc->sCmn.fs_kHz ) * sizeof( SKP_float ) );
     
     /* Parameters needed for next frame */
-    psEnc->sCmn.prev_sigtype = sEncCtrl.sCmn.sigtype;
-    psEnc->sCmn.prevLag      = sEncCtrl.sCmn.pitchL[ psEnc->sCmn.nb_subfr - 1 ];
+    psEnc->sCmn.prev_sigtype            = sEncCtrl.sCmn.sigtype;
+    psEnc->sCmn.prevLag                 = sEncCtrl.sCmn.pitchL[ psEnc->sCmn.nb_subfr - 1 ];
     psEnc->sCmn.first_frame_after_reset = 0;
 
     if( 0 ) { //psEnc->sCmn.sRC.error ) {
@@ -188,18 +213,14 @@
         LBRR_idx = ( psEnc->sCmn.oldest_LBRR_idx + 1 ) & LBRR_IDX_MASK;
 
         /* Check if FEC information should be added */
-        frame_terminator = SKP_SILK_LAST_FRAME;
-        if( psEnc->sCmn.LBRR_buffer[ LBRR_idx ].usage == SKP_SILK_ADD_LBRR_TO_PLUS1 ) {
-            frame_terminator = SKP_SILK_LBRR_VER1;
-        }
-        if( psEnc->sCmn.LBRR_buffer[ psEnc->sCmn.oldest_LBRR_idx ].usage == SKP_SILK_ADD_LBRR_TO_PLUS2 ) {
-            frame_terminator = SKP_SILK_LBRR_VER2;
-            LBRR_idx = psEnc->sCmn.oldest_LBRR_idx;
-        }
+        //frame_terminator = psEnc->sCmn.LBRR_buffer[ LBRR_idx ].usage;
+        frame_terminator = SKP_SILK_NO_LBRR;
 
         /* Add the frame termination info to stream */
         ec_encode_bin( psRangeEnc, FrameTermination_CDF[ frame_terminator ], 
             FrameTermination_CDF[ frame_terminator + 1 ], 16 );
+
+        /* Code excitation signal */
         for( i = 0; i < psEnc->sCmn.nFramesInPayloadBuf; i++ ) {
             SKP_Silk_encode_pulses( psRangeEnc, psEnc->sCmn.sigtype[ i ], psEnc->sCmn.QuantOffsetType[ i ], 
                 &psEnc->sCmn.q[ i * psEnc->sCmn.frame_length ], psEnc->sCmn.frame_length );
@@ -241,9 +262,9 @@
             SKP_memcpy( psEnc->sCmn.LBRR_buffer[ psEnc->sCmn.oldest_LBRR_idx ].payload, LBRRpayload, 
                 nBytesLBRR * sizeof( SKP_uint8 ) );
             psEnc->sCmn.LBRR_buffer[ psEnc->sCmn.oldest_LBRR_idx ].nBytes = nBytesLBRR;
-            /* The below line describes how FEC should be used */ 
+            /* The line below describes how FEC should be used */
             psEnc->sCmn.LBRR_buffer[ psEnc->sCmn.oldest_LBRR_idx ].usage = sEncCtrl.sCmn.LBRR_usage;
-            psEnc->sCmn.oldest_LBRR_idx = ( ( psEnc->sCmn.oldest_LBRR_idx + 1 ) & LBRR_IDX_MASK );
+            psEnc->sCmn.oldest_LBRR_idx = ( psEnc->sCmn.oldest_LBRR_idx + 1 ) & LBRR_IDX_MASK;
 
         } else {
             /* Not enough space: Payload will be discarded */
@@ -252,17 +273,12 @@
             ret = SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT;
         }
 
-        /* Reset the number of frames in payload buffer */         
+        /* Reset the number of frames in payload buffer */
         psEnc->sCmn.nFramesInPayloadBuf = 0;
     } else {
-        /* No payload for you this time */
+        /* No payload this time */
         *pnBytesOut = 0;
 
-        /* Encode that more frames follows */
-        frame_terminator = SKP_SILK_MORE_FRAMES;
-        ec_encode_bin( psRangeEnc, FrameTermination_CDF[ frame_terminator ], 
-            FrameTermination_CDF[ frame_terminator + 1 ], 16 );
-
         /* Payload length so far */
         nBytes = SKP_RSHIFT( ec_enc_tell( psRangeEnc, 0 ) + 7, 3 );
 
@@ -271,9 +287,14 @@
             &psEnc->sCmn.q[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ] );
     }
 
-    /* simulate number of ms buffered in channel because of exceeding TargetRate */
+    /* Check for arithmetic coder errors */
+    if( 0 ) { //psEnc->sCmn.sRC.error ) {
+        ret = SKP_SILK_ENC_INTERNAL_ERROR;
+    }
+
+    /* Simulate number of ms buffered in channel because of exceeding TargetRate */
     psEnc->BufferedInChannel_ms   += ( 8.0f * 1000.0f * ( nBytes - psEnc->sCmn.nBytesInPayloadBuf ) ) / psEnc->sCmn.TargetRate_bps;
-    psEnc->BufferedInChannel_ms   -= SUB_FRAME_LENGTH_MS * psEnc->sCmn.nb_subfr;
+    psEnc->BufferedInChannel_ms   -= SKP_SMULBB( SUB_FRAME_LENGTH_MS, psEnc->sCmn.nb_subfr );
     psEnc->BufferedInChannel_ms    = SKP_LIMIT_float( psEnc->BufferedInChannel_ms, 0.0f, 100.0f );
     psEnc->sCmn.nBytesInPayloadBuf = nBytes;
 
@@ -327,7 +348,9 @@
     SKP_int     typeOffset, LTP_scaleIndex, Rate_only_parameters = 0;
     ec_byte_buffer range_enc_celt_buf;
 
-    /* Control use of inband LBRR */
+    /*******************************************/
+    /* Control use of inband LBRR              */
+    /*******************************************/
     SKP_Silk_LBRR_ctrl_FLP( psEnc, &psEncCtrl->sCmn );
 
     if( psEnc->sCmn.LBRR_enabled ) {
@@ -358,9 +381,9 @@
                 psEnc->sCmn.LBRRprevLastGainIndex = psEnc->sShape.LastGainIndex;
                 /* Increase Gains to get target LBRR rate */
                 psEncCtrl->sCmn.GainsIndices[ 0 ] += psEnc->sCmn.LBRR_GainIncreases;
-                psEncCtrl->sCmn.GainsIndices[ 0 ]  = SKP_LIMIT( psEncCtrl->sCmn.GainsIndices[ 0 ], 0, N_LEVELS_QGAIN - 1 );
+                psEncCtrl->sCmn.GainsIndices[ 0 ]  = SKP_LIMIT_int( psEncCtrl->sCmn.GainsIndices[ 0 ], 0, N_LEVELS_QGAIN - 1 );
             }
-            /* Decode to get Gains in sync with decoder */
+            /* Decode to get gains in sync with decoder */
             SKP_Silk_gains_dequant( Gains_Q16, psEncCtrl->sCmn.GainsIndices, 
                 &psEnc->sCmn.LBRRprevLastGainIndex, psEnc->sCmn.nFramesInPayloadBuf, psEnc->sCmn.nb_subfr );
 
@@ -372,12 +395,9 @@
             /*****************************************/
             /* Noise shaping quantization            */
             /*****************************************/
-            SKP_Silk_NSQ_wrapper_FLP( psEnc, psEncCtrl, xfw, 
-                &psEnc->sCmn.q_LBRR[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ], 1 );
+            SKP_Silk_NSQ_wrapper_FLP( psEnc, psEncCtrl, xfw, &psEnc->sCmn.q_LBRR[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ], 1 );
         } else {
-            SKP_memset( &psEnc->sCmn.q_LBRR[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ], 0, 
-                psEnc->sCmn.frame_length * sizeof( SKP_int ) );
-
+            SKP_memset( &psEnc->sCmn.q_LBRR[ psEnc->sCmn.nFramesInPayloadBuf * psEnc->sCmn.frame_length ], 0, psEnc->sCmn.frame_length * sizeof( SKP_int8 ) );
             psEncCtrl->sCmn.LTP_scaleIndex = 0;
         }
         /****************************************/
@@ -395,10 +415,7 @@
         /* Encode Parameters                    */
         /****************************************/
         SKP_Silk_encode_parameters( &psEnc->sCmn, &psEncCtrl->sCmn, &psEnc->sCmn.sRC_LBRR );
-        
-        /****************************************/
-        /* Encode Parameters                    */
-        /****************************************/
+
         if( psEnc->sCmn.sRC_LBRR.error ) {
             /* Encoder returned error: Clear payload buffer */
             nFramesInPayloadBuf = 0;
@@ -446,12 +463,12 @@
 
                 *pnBytesOut = nBytes;               
             } else {
-                /* Not enough space: Payload will be discarded */
+                /* Not enough space: payload will be discarded */
                 *pnBytesOut = 0;
                 SKP_assert( 0 );
             }
         } else {
-            /* No payload for you this time */
+            /* No payload this time */
             *pnBytesOut = 0;
 
             /* Encode that more frames follows */
@@ -461,8 +478,8 @@
         }
 
         /* Restore original Gains */
-        SKP_memcpy( psEncCtrl->sCmn.GainsIndices, TempGainsIndices,  psEnc->sCmn.nb_subfr * sizeof( SKP_int   ) );
-        SKP_memcpy( psEncCtrl->Gains,             TempGains,         psEnc->sCmn.nb_subfr * sizeof( SKP_float ) );
+        SKP_memcpy( psEncCtrl->sCmn.GainsIndices, TempGainsIndices, psEnc->sCmn.nb_subfr * sizeof( SKP_int   ) );
+        SKP_memcpy( psEncCtrl->Gains,             TempGains,        psEnc->sCmn.nb_subfr * sizeof( SKP_float ) );
     
         /* Restore LTP scale index and typeoffset */
         psEncCtrl->sCmn.LTP_scaleIndex = LTP_scaleIndex;
--- a/src_FLP/SKP_Silk_find_LPC_FLP.c
+++ b/src_FLP/SKP_Silk_find_LPC_FLP.c
@@ -26,6 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FLP.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 void SKP_Silk_find_LPC_FLP(
           SKP_float                 NLSF[],             /* O    NLSFs                                   */
@@ -57,6 +58,7 @@
         /* adding it to the residual energy of the first 10 ms in each iteration of the search below    */
         res_nrg -= SKP_Silk_burg_modified_FLP( a_tmp, x + ( MAX_NB_SUBFR / 2 ) * subfr_length, 
             subfr_length, MAX_NB_SUBFR / 2, FIND_LPC_COND_FAC, LPC_order );
+        SKP_Silk_bwexpander_FLP( a_tmp, LPC_order, FIND_LPC_CHIRP );
 
         /* Convert to NLSFs */
         SKP_Silk_A2NLSF_FLP( NLSF, a_tmp, LPC_order );
--- a/src_FLP/SKP_Silk_find_LTP_FLP.c
+++ b/src_FLP/SKP_Silk_find_LTP_FLP.c
@@ -26,6 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FLP.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 void SKP_Silk_find_LTP_FLP(
           SKP_float b[ MAX_NB_SUBFR * LTP_ORDER ],          /* O    LTP coefs                               */
--- a/src_FLP/SKP_Silk_find_pitch_lags_FLP.c
+++ b/src_FLP/SKP_Silk_find_pitch_lags_FLP.c
@@ -27,6 +27,7 @@
 
 #include <stdlib.h>
 #include "SKP_Silk_main_FLP.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 void SKP_Silk_find_pitch_lags_FLP(
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
@@ -36,13 +37,14 @@
 )
 {
     SKP_Silk_predict_state_FLP *psPredSt = &psEnc->sPred;
+    SKP_int   buf_len;
+    SKP_float thrhld, res_nrg;
     const SKP_float *x_buf_ptr, *x_buf;
     SKP_float auto_corr[ MAX_FIND_PITCH_LPC_ORDER + 1 ];
     SKP_float A[         MAX_FIND_PITCH_LPC_ORDER ];
     SKP_float refl_coef[ MAX_FIND_PITCH_LPC_ORDER ];
     SKP_float Wsig[      FIND_PITCH_LPC_WIN_MAX ];
-    SKP_float thrhld, *Wsig_ptr;
-    SKP_int   buf_len;
+    SKP_float *Wsig_ptr;
 
     /******************************************/
     /* Setup buffer lengths etc based on Fs   */
@@ -82,8 +84,11 @@
     auto_corr[ 0 ] += auto_corr[ 0 ] * FIND_PITCH_WHITE_NOISE_FRACTION;
 
     /* Calculate the reflection coefficients using Schur */
-    SKP_Silk_schur_FLP( refl_coef, auto_corr, psEnc->sCmn.pitchEstimationLPCOrder );
+    res_nrg = SKP_Silk_schur_FLP( refl_coef, auto_corr, psEnc->sCmn.pitchEstimationLPCOrder );
 
+    /* Prediction gain */
+    psEncCtrl->predGain = auto_corr[ 0 ] / SKP_max_float( res_nrg, 1.0f );
+
     /* Convert reflection coefficients to prediction coefficients */
     SKP_Silk_k2a_FLP( A, refl_coef, psEnc->sCmn.pitchEstimationLPCOrder );
 
@@ -97,16 +102,16 @@
     SKP_memset( res, 0, psEnc->sCmn.pitchEstimationLPCOrder * sizeof( SKP_float ) );
 
     /* Threshold for pitch estimator */
-    thrhld  = 0.5f;
+    thrhld  = 0.45f;
     thrhld -= 0.004f * psEnc->sCmn.pitchEstimationLPCOrder;
-    thrhld -= 0.1f  * ( SKP_float )sqrt( psEnc->speech_activity );
-    thrhld += 0.14f * psEnc->sCmn.prev_sigtype;
-    thrhld -= 0.12f * psEncCtrl->input_tilt;
+    thrhld -= 0.1f   * psEnc->speech_activity;
+    thrhld += 0.15f  * psEnc->sCmn.prev_sigtype;
+    thrhld -= 0.1f   * psEncCtrl->input_tilt;
 
     /*****************************************/
     /* Call Pitch estimator                  */
     /*****************************************/
     psEncCtrl->sCmn.sigtype = SKP_Silk_pitch_analysis_core_FLP( res, psEncCtrl->sCmn.pitchL, &psEncCtrl->sCmn.lagIndex, 
-        &psEncCtrl->sCmn.contourIndex, &psEnc->LTPCorr, psEnc->sCmn.prevLag, psEnc->pitchEstimationThreshold, 
+        &psEncCtrl->sCmn.contourIndex, &psEnc->LTPCorr, psEnc->sCmn.prevLag, psEnc->sCmn.pitchEstimationThreshold_Q16 / 65536.0f,
         thrhld, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, psEnc->sCmn.nb_subfr );
 }
--- a/src_FLP/SKP_Silk_init_encoder_FLP.c
+++ b/src_FLP/SKP_Silk_init_encoder_FLP.c
@@ -39,9 +39,6 @@
     /* Clear the entire encoder state */
     SKP_memset( psEnc, 0, sizeof( SKP_Silk_encoder_state_FLP ) );
 
-    /* Initialize to 24 kHz API sampling, 24 kHz max internal sampling, 20 ms packets, 25 kbps, 0% packet loss, and init non-zero values */
-    ret = SKP_Silk_control_encoder_FLP( psEnc, 24000, 24, 20, 25, 0, 0, 0, 10, 0 );
-
 #if HIGH_PASS_INPUT
     psEnc->variable_HP_smth1 = SKP_Silk_log2( 70.0 );
     psEnc->variable_HP_smth2 = SKP_Silk_log2( 70.0 );
@@ -49,8 +46,6 @@
 
     /* Used to deactivate e.g. LSF interpolation and fluctuation reduction */
     psEnc->sCmn.first_frame_after_reset = 1;
-    psEnc->sCmn.fs_kHz_changed          = 0;
-    psEnc->sCmn.LBRR_enabled            = 0;
 
     /* Initialize Silk VAD */
     ret += SKP_Silk_VAD_Init( &psEnc->sCmn.sVAD );
--- a/src_FLP/SKP_Silk_main_FLP.h
+++ b/src_FLP/SKP_Silk_main_FLP.h
@@ -33,7 +33,9 @@
 #include "SKP_Silk_structs_FLP.h"
 #include "SKP_Silk_tables_FLP.h"
 #include "SKP_Silk_main.h"
-#include "SKP_Silk_define_FLP.h"
+#include "SKP_Silk_define.h"
+#include "SKP_debug.h"
+#include "entenc.h"
 
 /* uncomment to compile without SSE optimizations */
 //#undef SKP_USE_SSE
@@ -43,26 +45,6 @@
 {
 #endif
 
-void SKP_Silk_LBRR_ctrl_FLP(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I    Encoder state FLP                       */
-    SKP_Silk_encoder_control        *psEncCtrl          /* I/O  Encoder control                         */
-);
-
-void SKP_Silk_LTP_scale_ctrl_FLP(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
-    SKP_Silk_encoder_control_FLP    *psEncCtrl          /* I/O  Encoder control FLP                     */
-);
-
-void SKP_Silk_quant_LTP_gains_FLP(
-          SKP_float B[ MAX_NB_SUBFR * LTP_ORDER ],          /* I/O  (Un-)quantized LTP gains                */
-          SKP_int   cbk_index[ MAX_NB_SUBFR ],              /* O    Codebook index                          */
-          SKP_int   *periodicity_index,                     /* O    Periodicity index                       */
-    const SKP_float W[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ],  /* I    Error weights                           */
-    const SKP_float mu,                                     /* I    Mu value (R/D tradeoff)                 */
-    const SKP_int   lowComplexity,                          /* I    Flag for low complexity                 */
-    const SKP_int   nb_subfr                                /* I    number of subframes                     */
-);
-
 /*********************/
 /* Encoder Functions */
 /*********************/
@@ -78,25 +60,18 @@
 /* Encoder main function */
 SKP_int SKP_Silk_encode_frame_FLP( 
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
-    SKP_int16                       *pnBytesOut,        /* I/O  Number of payload bytes;                */
+    SKP_int32                       *pnBytesOut,        /* I/O  Number of payload bytes;                */
                                                         /*      input: max length; output: used         */
     ec_enc                          *psRangeEnc,        /* I/O  compressor data structure                */
     const SKP_int16                 *pIn                /* I    Input speech frame                      */
 );
 
-/* Limit, stabilize, and quantize NLSFs */
-void SKP_Silk_process_NLSFs_FLP(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
-    SKP_Silk_encoder_control_FLP    *psEncCtrl,         /* I/O  Encoder control FLP                     */
-    SKP_float                       *pNLSF              /* I/O  NLSFs (quantized output)                */
-);
-
 /* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate           */
 void SKP_Silk_LBRR_encode_FLP(
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
     SKP_Silk_encoder_control_FLP    *psEncCtrl,         /* I/O  Encoder control FLP                     */
           SKP_uint8                 *pCode,             /* O    Payload                                 */
-          SKP_int16                 *pnBytesOut,        /* I/O  Payload bytes; in: max; out: used       */
+          SKP_int32                 *pnBytesOut,        /* I/O  Payload bytes; in: max; out: used       */
     const SKP_float                 xfw[]               /* I    Input signal                            */
 );
 
@@ -107,22 +82,16 @@
 
 /* Control the Silk encoder */
 SKP_int SKP_Silk_control_encoder_FLP( 
-    SKP_Silk_encoder_state_FLP  *psEnc,             /* I/O  Pointer to Silk encoder state FLP               */
-    const SKP_int32             API_fs_Hz,          /* I    External (API) sampling rate (Hz)               */
-    const SKP_int               max_internal_fs_kHz,/* I    Maximum internal sampling rate (kHz)            */
-    const SKP_int               PacketSize_ms,      /* I    Packet length (ms)                              */
-    SKP_int32                   TargetRate_bps,     /* I    Target max bitrate (bps) (used if SNR_dB == 0)  */
-    const SKP_int               PacketLoss_perc,    /* I    Packet loss rate (in percent)                   */
-    const SKP_int               INBandFEC_enabled,  /* I    Enable (1) / disable (0) inband FEC             */
-    const SKP_int               DTX_enabled,        /* I    Enable / disable DTX                            */
-    const SKP_int               InputFramesize_ms,  /* I    Inputframe in ms                                */
-    const SKP_int               Complexity          /* I    Complexity (0->low; 1->medium; 2->high)         */
+    SKP_Silk_encoder_state_FLP  *psEnc,                 /* I/O  Pointer to Silk encoder state FLP       */
+    const SKP_int               PacketSize_ms,          /* I    Packet length (ms)                      */
+    const SKP_int32             TargetRate_bps,         /* I    Target max bitrate (bps)                */
+    const SKP_int               PacketLoss_perc,        /* I    Packet loss rate (in percent)           */
+    const SKP_int               Complexity              /* I    Complexity (0->low; 1->medium; 2->high) */
 );
 
 /****************/
 /* Prefiltering */
 /****************/
-/* Main Prefilter Function */
 void SKP_Silk_prefilter_FLP(
     SKP_Silk_encoder_state_FLP          *psEnc,         /* I/O  Encoder state FLP                       */
     const SKP_Silk_encoder_control_FLP  *psEncCtrl,     /* I    Encoder control FLP                     */
@@ -150,9 +119,22 @@
     const SKP_int                   order               /* I    Correlation order (even)                */
 );
 
-/**************/
-/* Find pitch */
-/**************/
+/* Control low bitrate redundancy usage */
+void SKP_Silk_LBRR_ctrl_FLP(
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I    Encoder state FLP                       */
+    SKP_Silk_encoder_control        *psEncCtrlC         /* I/O  Encoder control                         */
+);
+
+/* Calculation of LTP state scaling */
+void SKP_Silk_LTP_scale_ctrl_FLP(
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
+    SKP_Silk_encoder_control_FLP    *psEncCtrl          /* I/O  Encoder control FLP                     */
+);
+
+/**********************************************/
+/* Prediction Analysis                        */
+/**********************************************/
+/* Find pitch lags */
 void SKP_Silk_find_pitch_lags_FLP(
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
     SKP_Silk_encoder_control_FLP    *psEncCtrl,         /* I/O  Encoder control FLP                     */
@@ -160,81 +142,26 @@
     const SKP_float                 x[]                 /* I    Speech signal                           */
 );
 
-/******************/
-/* NLSF Quantizer */
-/******************/
-/* NLSF vector encoder */
-void SKP_Silk_NLSF_MSVQ_encode_FLP(
-          SKP_int                   *NLSFIndices,       /* O    Codebook path vector [ CB_STAGES ]      */
-          SKP_float                 *pNLSF,             /* I/O  Quantized NLSF vector [ LPC_ORDER ]     */
-    const SKP_Silk_NLSF_CB_FLP      *psNLSF_CB_FLP,     /* I    Codebook object                         */
-    const SKP_float                 *pNLSF_q_prev,      /* I    Prev. quantized NLSF vector [LPC_ORDER] */
-    const SKP_float                 *pW,                /* I    NLSF weight vector [ LPC_ORDER ]        */
-    const SKP_float                 NLSF_mu,            /* I    Rate weight for the RD optimization     */
-    const SKP_float                 NLSF_mu_fluc_red,   /* I    Fluctuation reduction error weight      */
-    const SKP_int                   NLSF_MSVQ_Survivors,/* I    Max survivors from each stage           */
-    const SKP_int                   LPC_order,          /* I    LPC order                               */
-    const SKP_int                   deactivate_fluc_red /* I    Deactivate fluctuation reduction        */
+/* Find LPC and LTP coefficients */
+void SKP_Silk_find_pred_coefs_FLP(
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
+    SKP_Silk_encoder_control_FLP    *psEncCtrl,         /* I/O  Encoder control FLP                     */
+    const SKP_float                 res_pitch[]         /* I    Residual from pitch analysis            */
 );
 
-/* NLSF vector decoder */
-void SKP_Silk_NLSF_MSVQ_decode_FLP(
-          SKP_float                 *pNLSF,             /* O    Decoded output vector [ LPC_ORDER ]     */
-    const SKP_Silk_NLSF_CB_FLP      *psNLSF_CB_FLP,     /* I    NLSF codebook struct                    */
-    const SKP_int                   *NLSFIndices,       /* I    NLSF indices [ nStages ]                */
-    const SKP_int                   LPC_order           /* I    LPC order used                          */
+/* LPC analysis */
+void SKP_Silk_find_LPC_FLP(
+          SKP_float                 NLSF[],             /* O    NLSFs                                   */
+          SKP_int                   *interpIndex,       /* O    NLSF interp. index for NLSF interp.     */
+    const SKP_float                 prev_NLSFq[],       /* I    Previous NLSFs, for NLSF interpolation  */
+    const SKP_int                   useInterpNLSFs,     /* I    Flag                                    */
+    const SKP_int                   LPC_order,          /* I    LPC order                               */
+    const SKP_float                 x[],                /* I    Input signal                            */
+    const SKP_int                   subfr_length,       /* I    Subframe length incl preceeding samples */
+    const SKP_int                   nb_subfr            /* I:   Number of subframes                     */
 );
 
-/* Rate-Distortion calculations for multiple input data vectors */
-void SKP_Silk_NLSF_VQ_rate_distortion_FLP(
-          SKP_float             *pRD,               /* O   Rate-distortion values [psNLSF_CBS_FLP->nVectors*N] */
-    const SKP_Silk_NLSF_CBS_FLP *psNLSF_CBS_FLP,    /* I   NLSF codebook stage struct                          */
-    const SKP_float             *in,                /* I   Input vectors to be quantized                       */
-    const SKP_float             *w,                 /* I   Weight vector                                       */
-    const SKP_float             *rate_acc,          /* I   Accumulated rates from previous stage               */
-    const SKP_float             mu,                 /* I   Weight between weighted error and rate              */
-    const SKP_int               N,                  /* I   Number of input vectors to be quantized             */
-    const SKP_int               LPC_order           /* I   LPC order                                           */
-);
-
-/* compute weighted quantization errors for LPC_order element input vectors, over one codebook stage */
-void SKP_Silk_NLSF_VQ_sum_error_FLP(
-          SKP_float                 *err,               /* O    Weighted quantization errors [ N * K ]  */
-    const SKP_float                 *in,                /* I    Input vectors [ N * LPC_order ]         */
-    const SKP_float                 *w,                 /* I    Weighting vectors [ N * LPC_order ]     */
-    const SKP_float                 *pCB,               /* I    Codebook vectors [ K * LPC_order ]      */
-    const SKP_int                   N,                  /* I    Number of input vectors                 */
-    const SKP_int                   K,                  /* I    Number of codebook vectors              */
-    const SKP_int                   LPC_order           /* I    LPC order                               */
-);
-
-/* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */
-SKP_float SKP_Silk_residual_energy_covar_FLP(           /* O    Weighted residual energy                */
-    const SKP_float                 *c,                 /* I    Filter coefficients                     */
-          SKP_float                 *wXX,               /* I/O  Weighted correlation matrix, reg. out   */
-    const SKP_float                 *wXx,               /* I    Weighted correlation vector             */
-    const SKP_float                 wxx,                /* I    Weighted correlation value              */
-    const SKP_int                   D                   /* I    Dimension                               */
-);
-
-/* Entropy constrained MATRIX-weighted VQ, for a single input data vector */
-void SKP_Silk_VQ_WMat_EC_FLP(
-          SKP_int                   *ind,               /* O    Index of best codebook vector           */
-          SKP_float                 *rate_dist,         /* O    Best weighted quant. error + mu * rate  */
-    const SKP_float                 *in,                /* I    Input vector to be quantized            */
-    const SKP_float                 *W,                 /* I    Weighting matrix                        */
-    const SKP_int16                 *cb,                /* I    Codebook                                */
-    const SKP_int16                 *cl_Q6,             /* I    Code length for each codebook vector    */
-    const SKP_float                 mu,                 /* I    Tradeoff between WSSE and rate          */
-    const SKP_int                   L                   /* I    Number of vectors in codebook           */
-);
-
-/* Processing of gains */
-void SKP_Silk_process_gains_FLP(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
-    SKP_Silk_encoder_control_FLP    *psEncCtrl          /* I/O  Encoder control FLP                     */
-);
-
+/* LTP analysis */
 void SKP_Silk_find_LTP_FLP(
           SKP_float b[ MAX_NB_SUBFR * LTP_ORDER ],          /* O    LTP coefs                               */
           SKP_float WLTP[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O    Weight for LTP quantization       */
@@ -247,17 +174,6 @@
     const SKP_int   mem_offset                              /* I    Number of samples in LTP memory         */
 );
 
-void SKP_Silk_find_LPC_FLP(
-          SKP_float                 NLSF[],             /* O    NLSFs                                   */
-          SKP_int                   *interpIndex,       /* O    NLSF interp. index for NLSF interp.     */
-    const SKP_float                 prev_NLSFq[],       /* I    Previous NLSFs, for NLSF interpolation  */
-    const SKP_int                   useInterpNLSFs,     /* I    Flag                                    */
-    const SKP_int                   LPC_order,          /* I    LPC order                               */
-    const SKP_float                 x[],                /* I    Input signal                            */
-    const SKP_int                   subfr_length,       /* I    Subframe length incl preceeding samples */
-    const SKP_int                   nb_subfr            /* I:   Number of subframes                     */
-);
-
 void SKP_Silk_LTP_analysis_filter_FLP(
           SKP_float         *LTP_res,                   /* O    LTP res MAX_NB_SUBFR*(pre_lgth+subfr_lngth) */
     const SKP_float         *x,                         /* I    Input signal, with preceeding samples       */
@@ -269,6 +185,8 @@
     const SKP_int           pre_length                  /* I    Preceeding samples for each subframe        */
 );
 
+/* Calculates residual energies of input subframes where all subframes have LPC_order   */
+/* of preceeding samples                                                                */
 void SKP_Silk_residual_energy_FLP(  
           SKP_float             nrgs[ MAX_NB_SUBFR ],   /* O    Residual energy per subframe            */
     const SKP_float             x[],                    /* I    Input signal                            */
@@ -279,12 +197,6 @@
     const SKP_int               LPC_order               /* I    LPC order                               */
 );
 
-void SKP_Silk_find_pred_coefs_FLP(
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
-    SKP_Silk_encoder_control_FLP    *psEncCtrl,         /* I/O  Encoder control FLP                     */
-    const SKP_float                 res_pitch[]         /* I    Residual from pitch analysis            */
-);
-
 /* 16th order LPC analysis filter */
 void SKP_Silk_LPC_analysis_filter_FLP(
           SKP_float                 r_LPC[],            /* O    LPC residual signal                     */
@@ -326,7 +238,108 @@
     const SKP_int                   length              /* I    Length of input signal                  */
 );
 
+/* 6th order LPC analysis filter, does not write first 6 samples */
+void SKP_Silk_LPC_analysis_filter6_FLP(
+          SKP_float                 r_LPC[],            /* O    LPC residual signal                     */
+    const SKP_float                 PredCoef[],         /* I    LPC coefficients                        */
+    const SKP_float                 s[],                /* I    Input signal                            */
+    const SKP_int                   length              /* I    Length of input signal                  */
+);
+
+/* LTP tap quantizer */
+void SKP_Silk_quant_LTP_gains_FLP(
+          SKP_float B[ MAX_NB_SUBFR * LTP_ORDER ],          /* I/O  (Un-)quantized LTP gains                */
+          SKP_int   cbk_index[ MAX_NB_SUBFR ],              /* O    Codebook index                          */
+          SKP_int   *periodicity_index,                     /* O    Periodicity index                       */
+    const SKP_float W[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ],  /* I    Error weights                           */
+    const SKP_float mu,                                     /* I    Mu value (R/D tradeoff)                 */
+    const SKP_int   lowComplexity,                          /* I    Flag for low complexity                 */
+    const SKP_int   nb_subfr                                /* I    number of subframes                     */
+);
+
 /******************/
+/* NLSF Quantizer */
+/******************/
+/* Limit, stabilize, and quantize NLSFs */
+void SKP_Silk_process_NLSFs_FLP(
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
+    SKP_Silk_encoder_control_FLP    *psEncCtrl,         /* I/O  Encoder control FLP                     */
+    SKP_float                       *pNLSF              /* I/O  NLSFs (quantized output)                */
+);
+
+/* NLSF vector encoder */
+void SKP_Silk_NLSF_MSVQ_encode_FLP(
+          SKP_int                   *NLSFIndices,       /* O    Codebook path vector [ CB_STAGES ]      */
+          SKP_float                 *pNLSF,             /* I/O  Quantized NLSF vector [ LPC_ORDER ]     */
+    const SKP_Silk_NLSF_CB_FLP      *psNLSF_CB_FLP,     /* I    Codebook object                         */
+    const SKP_float                 *pNLSF_q_prev,      /* I    Prev. quantized NLSF vector [LPC_ORDER] */
+    const SKP_float                 *pW,                /* I    NLSF weight vector [ LPC_ORDER ]        */
+    const SKP_float                 NLSF_mu,            /* I    Rate weight for the RD optimization     */
+    const SKP_float                 NLSF_mu_fluc_red,   /* I    Fluctuation reduction error weight      */
+    const SKP_int                   NLSF_MSVQ_Survivors,/* I    Max survivors from each stage           */
+    const SKP_int                   LPC_order,          /* I    LPC order                               */
+    const SKP_int                   deactivate_fluc_red /* I    Deactivate fluctuation reduction        */
+);
+
+/* Rate-Distortion calculations for multiple input data vectors */
+void SKP_Silk_NLSF_VQ_rate_distortion_FLP(
+          SKP_float             *pRD,               /* O   Rate-distortion values [psNLSF_CBS_FLP->nVectors*N] */
+    const SKP_Silk_NLSF_CBS_FLP *psNLSF_CBS_FLP,    /* I   NLSF codebook stage struct                          */
+    const SKP_float             *in,                /* I   Input vectors to be quantized                       */
+    const SKP_float             *w,                 /* I   Weight vector                                       */
+    const SKP_float             *rate_acc,          /* I   Accumulated rates from previous stage               */
+    const SKP_float             mu,                 /* I   Weight between weighted error and rate              */
+    const SKP_int               N,                  /* I   Number of input vectors to be quantized             */
+    const SKP_int               LPC_order           /* I   LPC order                                           */
+);
+
+/* Compute weighted quantization errors for an LPC_order element input vector, over one codebook stage */
+void SKP_Silk_NLSF_VQ_sum_error_FLP(
+          SKP_float                 *err,               /* O    Weighted quantization errors [ N * K ]  */
+    const SKP_float                 *in,                /* I    Input vectors [ N * LPC_order ]         */
+    const SKP_float                 *w,                 /* I    Weighting vectors [ N * LPC_order ]     */
+    const SKP_float                 *pCB,               /* I    Codebook vectors [ K * LPC_order ]      */
+    const SKP_int                   N,                  /* I    Number of input vectors                 */
+    const SKP_int                   K,                  /* I    Number of codebook vectors              */
+    const SKP_int                   LPC_order           /* I    LPC order                               */
+);
+
+/* NLSF vector decoder */
+void SKP_Silk_NLSF_MSVQ_decode_FLP(
+          SKP_float                 *pNLSF,             /* O    Decoded output vector [ LPC_ORDER ]     */
+    const SKP_Silk_NLSF_CB_FLP      *psNLSF_CB_FLP,     /* I    NLSF codebook struct                    */  
+    const SKP_int                   *NLSFIndices,       /* I    NLSF indices [ nStages ]                */
+    const SKP_int                   LPC_order           /* I    LPC order used                          */
+);
+
+/* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */
+SKP_float SKP_Silk_residual_energy_covar_FLP(           /* O    Weighted residual energy                */
+    const SKP_float                 *c,                 /* I    Filter coefficients                     */
+          SKP_float                 *wXX,               /* I/O  Weighted correlation matrix, reg. out   */
+    const SKP_float                 *wXx,               /* I    Weighted correlation vector             */
+    const SKP_float                 wxx,                /* I    Weighted correlation value              */
+    const SKP_int                   D                   /* I    Dimension                               */
+);
+
+/* Entropy constrained MATRIX-weighted VQ, for a single input data vector */
+void SKP_Silk_VQ_WMat_EC_FLP(
+          SKP_int                   *ind,               /* O    Index of best codebook vector           */
+          SKP_float                 *rate_dist,         /* O    Best weighted quant. error + mu * rate  */
+    const SKP_float                 *in,                /* I    Input vector to be quantized            */
+    const SKP_float                 *W,                 /* I    Weighting matrix                        */
+    const SKP_int16                 *cb,                /* I    Codebook                                */
+    const SKP_int16                 *cl_Q6,             /* I    Code length for each codebook vector    */
+    const SKP_float                 mu,                 /* I    Tradeoff between WSSE and rate          */
+    const SKP_int                   L                   /* I    Number of vectors in codebook           */
+);
+
+/* Processing of gains */
+void SKP_Silk_process_gains_FLP(
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */
+    SKP_Silk_encoder_control_FLP    *psEncCtrl          /* I/O  Encoder control FLP                     */
+);
+
+/******************/
 /* Linear Algebra */
 /******************/
 /* Calculates correlation matrix X'*X */
@@ -346,6 +359,7 @@
           SKP_float                 *Xt                 /* O    X'*t correlation vector [order]         */
 );
 
+/* Add noise to matrix diagonal */
 void SKP_Silk_regularize_correlations_FLP(
           SKP_float                 *XX,                /* I/O  Correlation matrices                    */
           SKP_float                 *xx,                /* I/O  Correlation values                      */
@@ -353,7 +367,7 @@
     const SKP_int                   D                   /* I    Dimension of XX                         */
 );
 
-/* Function to solve linear equation Ax = b, when A is an MxM symmetric square matrix */
+/* Function to solve linear equation Ax = b, where A is an MxM symmetric matrix */
 void SKP_Silk_solve_LDL_FLP(
           SKP_float                 *A,                 /* I/O  Symmetric square matrix, out: reg.      */
     const SKP_int                   M,                  /* I    Size of matrix                          */
@@ -363,7 +377,6 @@
 
 /* Apply sine window to signal vector.                                                                  */
 /* Window types:                                                                                        */
-/*  0 -> sine window from 0 to pi                                                                       */
 /*  1 -> sine window from 0 to pi/2                                                                     */
 /*  2 -> sine window from pi/2 to pi                                                                    */
 void SKP_Silk_apply_sine_window_FLP(
--- a/src_FLP/SKP_Silk_noise_shape_analysis_FLP.c
+++ b/src_FLP/SKP_Silk_noise_shape_analysis_FLP.c
@@ -26,7 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FLP.h"
-#include "SKP_Silk_perceptual_parameters.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /* 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.)   */
@@ -46,27 +46,9 @@
     return (SKP_float)( 1.0f / ( 1.0f - lambda * gain ) );
 }
 
-/* Convert warped filter coefficients to monic pseudo-warped coefficients */
+/* 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( 
-    SKP_float           *coefs, 
-    SKP_float           lambda, 
-    SKP_int             order 
-) {
-    SKP_int   i;
-    SKP_float gain;
-
-    lambda = -lambda;
-    for( i = order - 1; i > 0; i-- ) {
-        coefs[ i - 1 ] += lambda * coefs[ i ];
-    }
-    gain = ( 1.0f - lambda * lambda ) / ( 1.0f - lambda * coefs[ 0 ] );
-    for( i = 0; i < order; i++ ) {
-        coefs[ i ] *= gain;
-    }
-}
-
-/* Limit max amplitude of monic warped coefficients by using bandwidth expansion on the true coefficients */
-SKP_INLINE void limit_warped_coefs( 
     SKP_float           *coefs_syn,
     SKP_float           *coefs_ana,
     SKP_float           lambda,
@@ -73,15 +55,27 @@
     SKP_float           limit,
     SKP_int             order
 ) {
-    SKP_int   i, iter, ind;
-    SKP_float tmp, maxabs, chirp;
+    SKP_int   i, iter, ind = 0;
+    SKP_float tmp, maxabs, chirp, gain_syn, gain_ana;
 
+    /* Convert to monic coefficients */
+    for( i = order - 1; i > 0; i-- ) {
+        coefs_syn[ i - 1 ] -= lambda * coefs_syn[ i ];
+        coefs_ana[ i - 1 ] -= lambda * coefs_ana[ i ];
+    } 
+    gain_syn = ( 1.0f - lambda * lambda ) / ( 1.0f + lambda * coefs_syn[ 0 ] );
+    gain_ana = ( 1.0f - lambda * lambda ) / ( 1.0f + lambda * coefs_ana[ 0 ] );
+    for( i = 0; i < order; i++ ) {
+        coefs_syn[ i ] *= gain_syn;
+        coefs_ana[ i ] *= gain_ana;
+    }
+
+    /* Limit */
     for( iter = 0; iter < 10; iter++ ) {
         /* Find maximum absolute value */
-        ind = 1;
-        maxabs = SKP_abs( coefs_syn[ ind ] );
-        for( i = 2; i < order - 1; i++ ) {
-            tmp = SKP_abs( coefs_syn[ i ] );
+        maxabs = -1.0f;
+        for( i = 0; i < order; i++ ) {
+            tmp = SKP_max( SKP_abs_float( coefs_syn[ i ] ), SKP_abs_float( coefs_ana[ i ] ) );
             if( tmp > maxabs ) {
                 maxabs = tmp;
                 ind = i;
@@ -88,14 +82,21 @@
             }
         }
         if( maxabs <= limit ) {
+            /* Coefficients are within range - done */
             return;
         }
 
-        /* Convert to true warped coefficients */
+        /* Convert back to true warped coefficients */
         for( i = 1; i < order; i++ ) {
             coefs_syn[ i - 1 ] += lambda * coefs_syn[ i ];
             coefs_ana[ i - 1 ] += lambda * coefs_ana[ i ];
         }
+        gain_syn = 1.0f / gain_syn;
+        gain_ana = 1.0f / gain_ana;
+        for( i = 0; i < order; i++ ) {
+            coefs_syn[ i ] *= gain_syn;
+            coefs_ana[ i ] *= gain_ana;
+        }
 
         /* Apply bandwidth expansion */
         chirp = 0.99f - ( 0.8f + 0.1f * iter ) * ( maxabs - limit ) / ( maxabs * ( ind + 1 ) );
@@ -102,12 +103,19 @@
         SKP_Silk_bwexpander_FLP( coefs_syn, order, chirp );
         SKP_Silk_bwexpander_FLP( coefs_ana, order, chirp );
 
-        /* Convert back to monic warped coefficients */
+        /* Convert to monic warped coefficients */
         for( i = order - 1; i > 0; i-- ) {
             coefs_syn[ i - 1 ] -= lambda * coefs_syn[ i ];
             coefs_ana[ i - 1 ] -= lambda * coefs_ana[ i ];
         }
+        gain_syn = ( 1.0f - lambda * lambda ) / ( 1.0f + lambda * coefs_syn[ 0 ] );
+        gain_ana = ( 1.0f - lambda * lambda ) / ( 1.0f + lambda * coefs_ana[ 0 ] );
+        for( i = 0; i < order; i++ ) {
+            coefs_syn[ i ] *= gain_syn;
+            coefs_ana[ i ] *= gain_ana;
+        }
     }
+	SKP_assert( 0 );
 }
 
 /* Compute noise shaping coefficients and initial gain values */
@@ -128,7 +136,7 @@
     const SKP_float *x_ptr, *pitch_res_ptr;
 
     /* Point to start of first LPC analysis block */
-    x_ptr = x + psEnc->sCmn.la_shape - SHAPE_LPC_WIN_MS * psEnc->sCmn.fs_kHz + psEnc->sCmn.subfr_length;
+    x_ptr = x - psEnc->sCmn.la_shape;
 
     /****************/
     /* CONTROL SNR  */
@@ -148,7 +156,7 @@
     psEncCtrl->input_quality = 0.5f * ( psEncCtrl->input_quality_bands[ 0 ] + psEncCtrl->input_quality_bands[ 1 ] );
 
     /* Coding quality level, between 0.0 and 1.0 */
-    psEncCtrl->coding_quality = SKP_sigmoid( 0.25f * ( psEncCtrl->current_SNR_dB - 17.0f ) );
+    psEncCtrl->coding_quality = SKP_sigmoid( 0.25f * ( psEncCtrl->current_SNR_dB - 18.0f ) );
 
     /* Reduce coding SNR during low speech activity */
     b = 1.0f - psEnc->speech_activity;
@@ -202,35 +210,48 @@
     /*******************************/
     /* Control bandwidth expansion */
     /*******************************/
+    /* More BWE for signals with high prediction gain */
+    strength = FIND_PITCH_WHITE_NOISE_FRACTION * psEncCtrl->predGain;           /* between 0.0 and 1.0 */
+    BWExp1 = BWExp2 = BANDWIDTH_EXPANSION / ( 1.0f + strength * strength );
     delta  = LOW_RATE_BANDWIDTH_EXPANSION_DELTA * ( 1.0f - 0.75f * psEncCtrl->coding_quality );
-    BWExp1 = BANDWIDTH_EXPANSION - delta;
-    BWExp2 = BANDWIDTH_EXPANSION + delta;
-    if( psEnc->sCmn.fs_kHz == 24 ) {
-        /* Less bandwidth expansion for super wideband */
-        BWExp1 = 1.0f - ( 1.0f - BWExp1 ) * SWB_BANDWIDTH_EXPANSION_REDUCTION;
-        BWExp2 = 1.0f - ( 1.0f - BWExp2 ) * SWB_BANDWIDTH_EXPANSION_REDUCTION;
-    }
+    BWExp1 -= delta;
+    BWExp2 += delta;
     /* BWExp1 will be applied after BWExp2, so make it relative */
     BWExp1 /= BWExp2;
 
-    /* Warping coefficient */
-    psEncCtrl->sCmn.warping_Q16 = psEnc->sCmn.fs_kHz * WARPING_MULTIPLIER_Q16;
-    psEncCtrl->sCmn.warping_Q16 = SKP_min( psEncCtrl->sCmn.warping_Q16, 32767 );
-    warping = (SKP_float)psEncCtrl->sCmn.warping_Q16 / 65536.0f;
+    if( psEnc->sCmn.warping_Q16 > 0 ) {
+        /* Slightly more warping in analysis will move quantization noise up in frequency, where it's better masked */
+        warping = (SKP_float)psEnc->sCmn.warping_Q16 / 65536.0f + 0.01f * psEncCtrl->coding_quality;
+    } else {
+        warping = 0.0f;
+    }
 
     /********************************************/
     /* Compute noise shaping AR coefs and gains */
     /********************************************/
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
-        /* Apply window */
-        SKP_Silk_apply_sine_window_FLP( x_windowed, x_ptr, 0, SHAPE_LPC_WIN_MS * psEnc->sCmn.fs_kHz );
+        /* Apply window: sine slope followed by flat part followed by cosine slope */
+        SKP_int shift, slope_part, flat_part;
+        flat_part = psEnc->sCmn.fs_kHz * 3;
+        slope_part = ( psEnc->sCmn.shapeWinLength - flat_part ) / 2;
 
+        SKP_Silk_apply_sine_window_FLP( x_windowed, x_ptr, 1, slope_part );
+        shift = slope_part;
+        SKP_memcpy( x_windowed + shift, x_ptr + shift, flat_part * sizeof(SKP_float) );
+        shift += flat_part;
+        SKP_Silk_apply_sine_window_FLP( x_windowed + shift, x_ptr + shift, 2, slope_part );
+
         /* Update pointer: next LPC analysis block */
         x_ptr += psEnc->sCmn.subfr_length;
 
-        /* Calculate warped auto correlation */
-        SKP_Silk_warped_autocorrelation_FLP( auto_corr, x_windowed, warping, 
-            SHAPE_LPC_WIN_MS * psEnc->sCmn.fs_kHz, psEnc->sCmn.shapingLPCOrder );
+        if( psEnc->sCmn.warping_Q16 > 0 ) {
+            /* Calculate warped auto correlation */
+            SKP_Silk_warped_autocorrelation_FLP( auto_corr, x_windowed, warping, 
+                psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder );
+        } else {
+            /* Calculate regular auto correlation */
+            SKP_Silk_autocorrelation_FLP( auto_corr, x_windowed, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder + 1 );
+        }
 
         /* Add white noise, as a fraction of energy */
         auto_corr[ 0 ] += auto_corr[ 0 ] * SHAPE_WHITE_NOISE_FRACTION; 
@@ -237,10 +258,12 @@
 
         /* Convert correlations to prediction coefficients, and compute residual energy */
         nrg = SKP_Silk_levinsondurbin_FLP( &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], auto_corr, psEnc->sCmn.shapingLPCOrder );
+        psEncCtrl->Gains[ k ] = ( SKP_float )sqrt( nrg );
 
-        /* Convert residual energy to non-warped scale */
-        gain_mult = warped_gain( &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], warping, psEnc->sCmn.shapingLPCOrder );
-        nrg *= gain_mult * gain_mult; 
+        if( psEnc->sCmn.warping_Q16 > 0 ) {
+            /* Adjust gain for warping */
+            psEncCtrl->Gains[ k ] *= warped_gain( &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], warping, psEnc->sCmn.shapingLPCOrder );
+        }
 
         /* Bandwidth expansion for synthesis filter shaping */
         SKP_Silk_bwexpander_FLP( &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], psEnc->sCmn.shapingLPCOrder, BWExp2 );
@@ -254,21 +277,13 @@
         /* Bandwidth expansion for analysis filter shaping */
         SKP_Silk_bwexpander_FLP( &psEncCtrl->AR1[ k * MAX_SHAPE_LPC_ORDER ], psEnc->sCmn.shapingLPCOrder, BWExp1 );
 
-        /* Increase residual energy */
-        nrg += SHAPE_MIN_ENERGY_RATIO * auto_corr[ 0 ];
-        psEncCtrl->Gains[ k ] = ( SKP_float )sqrt( nrg );
-        
         /* Ratio of prediction gains, in energy domain */
         SKP_Silk_LPC_inverse_pred_gain_FLP( &pre_nrg, &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], psEnc->sCmn.shapingLPCOrder );
         SKP_Silk_LPC_inverse_pred_gain_FLP( &nrg,     &psEncCtrl->AR1[ k * MAX_SHAPE_LPC_ORDER ], psEnc->sCmn.shapingLPCOrder );
         psEncCtrl->GainsPre[ k ] = 1.0f - 0.7f * ( 1.0f - pre_nrg / nrg );
 
-        /* Convert to monic warped prediction coefficients */
-        warped_true2monic_coefs( &psEncCtrl->AR1[ k * MAX_SHAPE_LPC_ORDER ], warping, psEnc->sCmn.shapingLPCOrder );
-        warped_true2monic_coefs( &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], warping, psEnc->sCmn.shapingLPCOrder );
-
-        /* Limit absolute values */
-        limit_warped_coefs( &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], &psEncCtrl->AR1[ k * MAX_SHAPE_LPC_ORDER ], 
+        /* Convert to monic warped prediction coefficients and limit absolute values */
+        warped_true2monic_coefs( &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], &psEncCtrl->AR1[ k * MAX_SHAPE_LPC_ORDER ], 
             warping, 3.999f, psEnc->sCmn.shapingLPCOrder );
     }
 
@@ -285,20 +300,7 @@
         psEnc->avgGain += psEnc->speech_activity * GAIN_SMOOTHING_COEF * ( psEncCtrl->Gains[ k ] - psEnc->avgGain );
     }
 
-    /************************************************/
-    /* Decrease level during fricatives (de-essing) */
-    /************************************************/
     gain_mult = 1.0f + INPUT_TILT + psEncCtrl->coding_quality * HIGH_RATE_INPUT_TILT;
-    if( psEncCtrl->input_tilt <= 0.0f && psEncCtrl->sCmn.sigtype == SIG_TYPE_UNVOICED ) {
-        SKP_float essStrength = -psEncCtrl->input_tilt * psEnc->speech_activity * ( 1.0f - psEncCtrl->sparseness );
-        if( psEnc->sCmn.fs_kHz == 24 ) {
-            gain_mult *= ( SKP_float )pow( 2.0f, -0.16f * DE_ESSER_COEF_SWB_dB * essStrength );
-        } else if( psEnc->sCmn.fs_kHz == 16 ) {
-            gain_mult *= (SKP_float)pow( 2.0f, -0.16f * DE_ESSER_COEF_WB_dB * essStrength );
-        } else {
-            SKP_assert( psEnc->sCmn.fs_kHz == 12 || psEnc->sCmn.fs_kHz == 8 );
-        }
-    }
 
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
         psEncCtrl->GainsPre[ k ] *= gain_mult;
@@ -324,8 +326,8 @@
         psEncCtrl->LF_MA_shp[ 0 ] = -1.0f + b;
         psEncCtrl->LF_AR_shp[ 0 ] =  1.0f - b - b * strength * 0.6f;
         for( k = 1; k < psEnc->sCmn.nb_subfr; k++ ) {
-            psEncCtrl->LF_MA_shp[ k ] = psEncCtrl->LF_MA_shp[ k - 1 ];
-            psEncCtrl->LF_AR_shp[ k ] = psEncCtrl->LF_AR_shp[ k - 1 ];
+            psEncCtrl->LF_MA_shp[ k ] = psEncCtrl->LF_MA_shp[ 0 ];
+            psEncCtrl->LF_AR_shp[ k ] = psEncCtrl->LF_AR_shp[ 0 ];
         }
         Tilt = -HP_NOISE_COEF;
     }
--- a/src_FLP/SKP_Silk_prefilter_FLP.c
+++ b/src_FLP/SKP_Silk_prefilter_FLP.c
@@ -26,7 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FLP.h"
-#include "SKP_Silk_perceptual_parameters.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /*
 * SKP_Silk_prefilter. Prefilter for finding Quantizer input signal  
@@ -124,11 +124,11 @@
         LF_AR_shp =  psEncCtrl->LF_AR_shp[ k ];
         AR1_shp   = &psEncCtrl->AR1[ k * MAX_SHAPE_LPC_ORDER ];
 
-        /* Short term FIR filtering*/
-        SKP_Silk_warped_LPC_analysis_filter_FLP( P->sAR_shp1, st_res, AR1_shp, px, 
-            (SKP_float)psEncCtrl->sCmn.warping_Q16 / 65536.0f, psEnc->sCmn.subfr_length, psEnc->sCmn.shapingLPCOrder );
+        /* Short term FIR filtering */
+        SKP_Silk_warped_LPC_analysis_filter_FLP( P->sAR_shp, st_res, AR1_shp, px, 
+            (SKP_float)psEnc->sCmn.warping_Q16 / 65536.0f, psEnc->sCmn.subfr_length, psEnc->sCmn.shapingLPCOrder );
 
-        /* reduce (mainly) low frequencies during harmonic emphasis */
+        /* Reduce (mainly) low frequencies during harmonic emphasis */
         B[ 0 ] =  psEncCtrl->GainsPre[ k ];
         B[ 1 ] = -psEncCtrl->GainsPre[ k ] * 
             ( psEncCtrl->HarmBoost[ k ] * HarmShapeGain + INPUT_TILT + psEncCtrl->coding_quality * HIGH_RATE_INPUT_TILT );
@@ -147,7 +147,7 @@
 }
 
 /*
-* SKP_Silk_prefilter_part1. Prefilter for finding Quantizer input signal    
+* Prefilter for finding Quantizer input signal    
 */
 SKP_INLINE void SKP_Silk_prefilt_FLP(
     SKP_Silk_prefilter_state_FLP *P,/* I/O state */
@@ -168,10 +168,10 @@
     SKP_float *LTP_shp_buf;
 
     /* To speed up use temp variables instead of using the struct */
-    LTP_shp_buf     = P->sLTP_shp1;
-    LTP_shp_buf_idx = P->sLTP_shp_buf_idx1;
-    sLF_AR_shp      = P->sLF_AR_shp1;
-    sLF_MA_shp      = P->sLF_MA_shp1;
+    LTP_shp_buf     = P->sLTP_shp;
+    LTP_shp_buf_idx = P->sLTP_shp_buf_idx;
+    sLF_AR_shp      = P->sLF_AR_shp;
+    sLF_MA_shp      = P->sLF_MA_shp;
 
     for( i = 0; i < length; i++ ) {
         if( lag > 0 ) {
@@ -196,7 +196,7 @@
         xw[ i ] = sLF_MA_shp - n_LTP;
     }
     /* Copy temp variable back to state */
-    P->sLF_AR_shp1       = sLF_AR_shp;
-    P->sLF_MA_shp1       = sLF_MA_shp;
-    P->sLTP_shp_buf_idx1 = LTP_shp_buf_idx;
+    P->sLF_AR_shp       = sLF_AR_shp;
+    P->sLF_MA_shp       = sLF_MA_shp;
+    P->sLTP_shp_buf_idx = LTP_shp_buf_idx;
 }
--- a/src_FLP/SKP_Silk_process_gains_FLP.c
+++ b/src_FLP/SKP_Silk_process_gains_FLP.c
@@ -26,6 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_main_FLP.h"
+#include "SKP_Silk_tuning_parameters.h"
 
 /* Processing of gains */
 void SKP_Silk_process_gains_FLP(
@@ -36,7 +37,7 @@
     SKP_Silk_shape_state_FLP *psShapeSt = &psEnc->sShape;
     SKP_int     k;
     SKP_int32   pGains_Q16[ MAX_NB_SUBFR ];
-    SKP_float   s, InvMaxSqrVal, gain;
+    SKP_float   s, InvMaxSqrVal, gain, quant_offset;
 
     /* Gain reduction when LTP coding gain is high */
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
@@ -79,18 +80,14 @@
     }
 
     /* Quantizer boundary adjustment */
-    if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {
-        psEncCtrl->Lambda = 1.2f - 0.4f * psEnc->speech_activity 
-                                 - 0.3f * psEncCtrl->input_quality   
-                                 + 0.2f * psEncCtrl->sCmn.QuantOffsetType
-                                 - 0.1f * psEncCtrl->coding_quality;
-    } else {
-        psEncCtrl->Lambda = 1.2f - 0.4f * psEnc->speech_activity 
-                                 - 0.4f * psEncCtrl->input_quality
-                                 + 0.4f * psEncCtrl->sCmn.QuantOffsetType
-                                 - 0.1f * psEncCtrl->coding_quality;
-    }
+    quant_offset = SKP_Silk_Quantization_Offsets_Q10[ psEncCtrl->sCmn.sigtype ][ psEncCtrl->sCmn.QuantOffsetType ] / 1024.0f;
+    psEncCtrl->Lambda = LAMBDA_OFFSET 
+                      + LAMBDA_DELAYED_DECISIONS * psEnc->sCmn.nStatesDelayedDecision
+                      + LAMBDA_SPEECH_ACT        * psEnc->speech_activity 
+                      + LAMBDA_INPUT_QUALITY     * psEncCtrl->input_quality   
+                      + LAMBDA_CODING_QUALITY    * psEncCtrl->coding_quality
+                      + LAMBDA_QUANT_OFFSET      * quant_offset;
 
-    SKP_assert( psEncCtrl->Lambda >= 0.0f );
-    SKP_assert( psEncCtrl->Lambda <  2.0f );
+    SKP_assert( psEncCtrl->Lambda > 0.0f );
+    SKP_assert( psEncCtrl->Lambda < 2.0f );
 }
--- a/src_FLP/SKP_Silk_quant_LTP_gains_FLP.c
+++ b/src_FLP/SKP_Silk_quant_LTP_gains_FLP.c
@@ -27,6 +27,8 @@
 
 #include "SKP_Silk_main_FLP.h"
 
+#define Q14_CONVERSION_FAC                              6.1035e-005f // 1 / 2^14
+
 void SKP_Silk_quant_LTP_gains_FLP(
           SKP_float B[ MAX_NB_SUBFR * LTP_ORDER ],          /* I/O  (Un-)quantized LTP gains                */
           SKP_int   cbk_index[ MAX_NB_SUBFR ],              /* O    Codebook index                          */
@@ -83,7 +85,7 @@
 
         if( rate_dist < min_rate_dist ) {
             min_rate_dist = rate_dist;
-            SKP_memcpy( cbk_index, temp_idx, nb_subfr    * sizeof( SKP_int ) );
+            SKP_memcpy( cbk_index, temp_idx, nb_subfr * sizeof( SKP_int ) );
             *periodicity_index = k;
         }
 
--- a/src_FLP/SKP_Silk_solve_LS_FLP.c
+++ b/src_FLP/SKP_Silk_solve_LS_FLP.c
@@ -25,8 +25,8 @@
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ***********************************************************************/
 
-
 #include "SKP_Silk_main_FLP.h" 
+#include "SKP_Silk_tuning_parameters.h"
 
 /**********************************************************************
  * LDL Factorisation. Finds the upper triangular matrix L and the diagonal
@@ -190,7 +190,7 @@
             ptr2 = matrix_adr( L, j + 1, 0, M);
             for( i = j + 1; i < M; i++ ) {
                 temp = 0.0;
-                for( k = 0; k < j; k++ ) {                
+                for( k = 0; k < j; k++ ) {
                     temp += ptr2[ k ] * v[ k ];
                 }
                 matrix_ptr( L, i, j, M ) = ( SKP_float )( ( ptr1[ i ] - temp ) * Dinv[ j ] );
--- a/src_FLP/SKP_Silk_structs_FLP.h
+++ b/src_FLP/SKP_Silk_structs_FLP.h
@@ -50,17 +50,11 @@
 /* Prefilter state              */
 /********************************/
 typedef struct {
-    SKP_float   sLTP_shp1[ LTP_BUF_LENGTH ];
-    SKP_float   sLTP_shp2[ LTP_BUF_LENGTH ];
-    SKP_float   sAR_shp1[ MAX_SHAPE_LPC_ORDER + 1 ];
-    SKP_float   sAR_shp2[ MAX_SHAPE_LPC_ORDER ];
-    SKP_int     sLTP_shp_buf_idx1;
-    SKP_int     sLTP_shp_buf_idx2;
-    SKP_int     sAR_shp_buf_idx2;
-    SKP_float   sLF_AR_shp1;
-    SKP_float   sLF_MA_shp1;
-    SKP_float   sLF_AR_shp2;
-    SKP_float   sLF_MA_shp2;
+    SKP_float   sLTP_shp[ LTP_BUF_LENGTH ];
+    SKP_float   sAR_shp[ MAX_SHAPE_LPC_ORDER + 1 ];
+    SKP_int     sLTP_shp_buf_idx;
+    SKP_float   sLF_AR_shp;
+    SKP_float   sLF_MA_shp;
     SKP_float   sHarmHP;
     SKP_int32   rand_seed;
     SKP_int     lagPrev;
@@ -122,7 +116,6 @@
     SKP_float                           avgGain;                    /* average gain during active speech */
     SKP_float                           BufferedInChannel_ms;       /* Simulated number of ms buffer in channel because of exceeded TargetRate_bps */
     SKP_float                           speech_activity;            /* Speech activity */
-    SKP_float                           pitchEstimationThreshold;   /* Threshold for pitch estimator */
 
     /* Parameters for LTP scaling control */
     SKP_float                           prevLTPredCodGain;
@@ -163,6 +156,7 @@
 
 	/* Measures */
 	SKP_float					sparseness;
+    SKP_float                   predGain;
 	SKP_float					LTPredCodGain;
 	SKP_float					input_quality_bands[ VAD_N_BANDS ];
 	SKP_float					input_tilt;
--- a/src_FLP/SKP_Silk_tables_FLP.h
+++ b/src_FLP/SKP_Silk_tables_FLP.h
@@ -30,6 +30,11 @@
 
 #include "SKP_Silk_structs_FLP.h"
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 /* filters */
 extern const SKP_float SKP_Silk_HarmShapeFIR_FLP[ HARM_SHAPE_FIR_TAPS ];
 
@@ -39,5 +44,9 @@
 /* NLSF codebooks */
 extern const SKP_Silk_NLSF_CB_FLP SKP_Silk_NLSF_CB0_16_FLP, SKP_Silk_NLSF_CB1_16_FLP;
 extern const SKP_Silk_NLSF_CB_FLP SKP_Silk_NLSF_CB0_10_FLP, SKP_Silk_NLSF_CB1_10_FLP;
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif
--- a/src_FLP/SKP_Silk_tables_NLSF_CB0_10_FLP.c
+++ b/src_FLP/SKP_Silk_tables_NLSF_CB0_10_FLP.c
@@ -28,7 +28,7 @@
 /**********************************************/
 /* This file has been automatically generated */
 /*                                            */
-/* ROM usage:  5.32 kB                        */
+/* ROM usage:  5.68 kB                        */
 /**********************************************/
 
 #include "SKP_Silk_tables_FLP.h"
@@ -36,685 +36,729 @@
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB0_10_rates[ NLSF_MSVQ_CB0_10_VECTORS ] =
 {
-      4.62500000000000000000f,      5.21875000000000000000f,
-      5.28125000000000000000f,      5.31250000000000000000f,
-      5.31250000000000000000f,      5.40625000000000000000f,
-      5.40625000000000000000f,      5.46875000000000000000f,
+      4.75000000000000000000f,      4.75000000000000000000f,
+      4.87500000000000000000f,      5.12500000000000000000f,
+      5.37500000000000000000f,      5.37500000000000000000f,
+      5.43750000000000000000f,      5.43750000000000000000f,
+      5.43750000000000000000f,      5.50000000000000000000f,
       5.50000000000000000000f,      5.50000000000000000000f,
-      5.50000000000000000000f,      5.53125000000000000000f,
-      5.59375000000000000000f,      5.65625000000000000000f,
-      5.65625000000000000000f,      5.65625000000000000000f,
-      5.71875000000000000000f,      5.71875000000000000000f,
-      5.71875000000000000000f,      5.75000000000000000000f,
-      5.78125000000000000000f,      5.78125000000000000000f,
-      5.78125000000000000000f,      5.78125000000000000000f,
-      5.81250000000000000000f,      5.90625000000000000000f,
-      5.90625000000000000000f,      5.90625000000000000000f,
-      5.96875000000000000000f,      5.96875000000000000000f,
-      5.96875000000000000000f,      6.06250000000000000000f,
+      5.56250000000000000000f,      5.56250000000000000000f,
+      5.62500000000000000000f,      5.62500000000000000000f,
+      5.62500000000000000000f,      5.68750000000000000000f,
+      5.75000000000000000000f,      5.75000000000000000000f,
+      5.75000000000000000000f,      5.87500000000000000000f,
+      5.87500000000000000000f,      5.87500000000000000000f,
+      5.93750000000000000000f,      5.93750000000000000000f,
+      6.00000000000000000000f,      6.00000000000000000000f,
+      6.00000000000000000000f,      6.06250000000000000000f,
       6.06250000000000000000f,      6.06250000000000000000f,
-      6.09375000000000000000f,      6.09375000000000000000f,
+      6.12500000000000000000f,      6.12500000000000000000f,
+      6.12500000000000000000f,      6.12500000000000000000f,
       6.12500000000000000000f,      6.18750000000000000000f,
-      6.21875000000000000000f,      6.25000000000000000000f,
-      6.28125000000000000000f,      6.28125000000000000000f,
-      6.31250000000000000000f,      6.34375000000000000000f,
+      6.18750000000000000000f,      6.25000000000000000000f,
+      6.25000000000000000000f,      6.25000000000000000000f,
+      6.31250000000000000000f,      6.31250000000000000000f,
+      6.31250000000000000000f,      6.37500000000000000000f,
       6.37500000000000000000f,      6.37500000000000000000f,
-      6.40625000000000000000f,      6.40625000000000000000f,
-      6.43750000000000000000f,      6.53125000000000000000f,
-      6.56250000000000000000f,      6.56250000000000000000f,
-      6.65625000000000000000f,      6.68750000000000000000f,
-      6.81250000000000000000f,      6.87500000000000000000f,
-      6.90625000000000000000f,      7.06250000000000000000f,
-      7.21875000000000000000f,      7.31250000000000000000f,
-      7.46875000000000000000f,      8.00000000000000000000f,
+      6.43750000000000000000f,      6.43750000000000000000f,
+      6.43750000000000000000f,      6.50000000000000000000f,
+      6.75000000000000000000f,      6.75000000000000000000f,
+      6.75000000000000000000f,      7.12500000000000000000f,
+      7.56250000000000000000f,      7.68750000000000000000f,
       8.00000000000000000000f,      8.00000000000000000000f,
-      3.71875000000000000000f,      3.84375000000000000000f,
-      3.84375000000000000000f,      3.84375000000000000000f,
-      3.90625000000000000000f,      3.93750000000000000000f,
+      8.00000000000000000000f,      8.00000000000000000000f,
+      8.00000000000000000000f,      8.00000000000000000000f,
+      3.68750000000000000000f,      3.68750000000000000000f,
+      3.75000000000000000000f,      3.81250000000000000000f,
       3.93750000000000000000f,      3.93750000000000000000f,
-      4.00000000000000000000f,      4.06250000000000000000f,
-      4.06250000000000000000f,      4.09375000000000000000f,
-      4.09375000000000000000f,      4.21875000000000000000f,
-      4.31250000000000000000f,      4.34375000000000000000f,
+      3.93750000000000000000f,      3.93750000000000000000f,
+      3.93750000000000000000f,      4.06250000000000000000f,
+      4.12500000000000000000f,      4.18750000000000000000f,
+      4.18750000000000000000f,      4.18750000000000000000f,
+      4.50000000000000000000f,      4.56250000000000000000f,
+      2.87500000000000000000f,      2.87500000000000000000f,
+      3.00000000000000000000f,      3.00000000000000000000f,
+      3.00000000000000000000f,      3.06250000000000000000f,
+      3.12500000000000000000f,      3.12500000000000000000f,
+      2.68750000000000000000f,      2.87500000000000000000f,
       2.93750000000000000000f,      2.93750000000000000000f,
-      2.96875000000000000000f,      2.96875000000000000000f,
       3.00000000000000000000f,      3.06250000000000000000f,
-      3.06250000000000000000f,      3.09375000000000000000f,
-      2.90625000000000000000f,      2.90625000000000000000f,
-      2.96875000000000000000f,      3.00000000000000000000f,
-      3.00000000000000000000f,      3.03125000000000000000f,
-      3.06250000000000000000f,      3.12500000000000000000f,
-      2.87500000000000000000f,      2.90625000000000000000f,
-      3.03125000000000000000f,      3.03125000000000000000f,
-      3.03125000000000000000f,      3.03125000000000000000f,
+      3.25000000000000000000f,      3.31250000000000000000f,
+      2.87500000000000000000f,      2.93750000000000000000f,
+      2.93750000000000000000f,      2.93750000000000000000f,
       3.06250000000000000000f,      3.06250000000000000000f,
-      3.90625000000000000000f,      3.93750000000000000000f,
-      3.93750000000000000000f,      3.96875000000000000000f,
-      3.96875000000000000000f,      4.00000000000000000000f,
+      3.06250000000000000000f,      3.06250000000000000000f,
+      2.87500000000000000000f,      2.93750000000000000000f,
+      3.00000000000000000000f,      3.00000000000000000000f,
+      3.00000000000000000000f,      3.06250000000000000000f,
+      3.06250000000000000000f,      3.12500000000000000000f,
+      3.75000000000000000000f,      3.75000000000000000000f,
+      3.81250000000000000000f,      3.81250000000000000000f,
+      3.81250000000000000000f,      3.81250000000000000000f,
+      3.87500000000000000000f,      3.93750000000000000000f,
       4.00000000000000000000f,      4.00000000000000000000f,
-      4.00000000000000000000f,      4.00000000000000000000f,
-      4.03125000000000000000f,      4.03125000000000000000f,
-      4.03125000000000000000f,      4.06250000000000000000f,
-      4.06250000000000000000f,      4.09375000000000000000f
+      4.06250000000000000000f,      4.18750000000000000000f,
+      4.18750000000000000000f,      4.31250000000000000000f,
+      4.31250000000000000000f,      4.75000000000000000000f
 };
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB0_10_ndelta_min[ 10 + 1 ] =
 {
-      0.01718139648437500000f,
-      0.00009155273437500000f,
+      0.01687622070312500000f,
+      0.00015258789062500000f,
       0.00067138671874999989f,
-      0.00061035156250000000f,
+      0.00057983398437500000f,
       0.00009155273437500000f,
       0.00009155273437500000f,
-      0.00402832031250000000f,
-      0.00363159179687500000f,
-      0.01092529296875000000f,
-      0.00262451171875000000f,
-      0.02941894531250000300f
+      0.00549316406250000000f,
+      0.00494384765625000000f,
+      0.00933837890625000000f,
+      0.00521850585937500000f,
+      0.03024291992187500000f
 };
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB0_10[ 10 * NLSF_MSVQ_CB0_10_VECTORS ] =
 {
-      0.06744384765625000000f,      0.12277221679687500000f,
-      0.21304321289062497000f,      0.28259277343750000000f,
-      0.38369750976562500000f,      0.47872924804687500000f,
-      0.58615112304687500000f,      0.68307495117187489000f,
-      0.79287719726562500000f,      0.88934326171875011000f,
-      0.10025024414062500000f,      0.12731933593750000000f,
-      0.18664550781250003000f,      0.33129882812500000000f,
-      0.46658325195312494000f,      0.51348876953125000000f,
-      0.60122680664062500000f,      0.67169189453125000000f,
-      0.75442504882812500000f,      0.89456176757812500000f,
-      0.04742431640624999300f,      0.07662963867187500000f,
-      0.20071411132812500000f,      0.31546020507812500000f,
-      0.42227172851562494000f,      0.50387573242187500000f,
-      0.61297607421875000000f,      0.70843505859375000000f,
-      0.80810546875000000000f,      0.89916992187500000000f,
-      0.09344482421875000000f,      0.12258911132812500000f,
-      0.17611694335937500000f,      0.30630493164062500000f,
-      0.40786743164062500000f,      0.45629882812500000000f,
-      0.61462402343750000000f,      0.69857788085937500000f,
-      0.76992797851562500000f,      0.90341186523437500000f,
-      0.06362915039062500000f,      0.10549926757812500000f,
-      0.18109130859375000000f,      0.26605224609375000000f,
-      0.35098266601562494000f,      0.41717529296875000000f,
-      0.54922485351562500000f,      0.66580200195312500000f,
-      0.76095581054687489000f,      0.87722778320312500000f,
-      0.08471679687500000000f,      0.12490844726562501000f,
-      0.19595336914062500000f,      0.31777954101562500000f,
-      0.46115112304687500000f,      0.51287841796875000000f,
-      0.63552856445312500000f,      0.72711181640625000000f,
-      0.80285644531250000000f,      0.89755249023437500000f,
-      0.08291625976562498600f,      0.12310791015625000000f,
-      0.17385864257812500000f,      0.25827026367187500000f,
-      0.43643188476562500000f,      0.49908447265625000000f,
-      0.58004760742187500000f,      0.71450805664062500000f,
-      0.78771972656249989000f,      0.86993408203125011000f,
-      0.08764648437500000000f,      0.11297607421875001000f,
-      0.17947387695312500000f,      0.33673095703124994000f,
-      0.52310180664062500000f,      0.57614135742187500000f,
-      0.64532470703125000000f,      0.71566772460937500000f,
-      0.78787231445312500000f,      0.90332031250000000000f,
-      0.09152221679687500000f,      0.12252807617187500000f,
-      0.22451782226562500000f,      0.34237670898437500000f,
-      0.39263916015625000000f,      0.52816772460937500000f,
-      0.61282348632812500000f,      0.69104003906250000000f,
-      0.81707763671875000000f,      0.88827514648437500000f,
-      0.08978271484375000000f,      0.11798095703125000000f,
-      0.18060302734375003000f,      0.36361694335937500000f,
-      0.42446899414062500000f,      0.49047851562500000000f,
-      0.62417602539062500000f,      0.67990112304687500000f,
-      0.83343505859375000000f,      0.91021728515625011000f,
-      0.06930541992187500000f,      0.10763549804687500000f,
-      0.20159912109375000000f,      0.29690551757812500000f,
-      0.39498901367187506000f,      0.53045654296875000000f,
-      0.61718750000000000000f,      0.68191528320312500000f,
-      0.75079345703125000000f,      0.86334228515624989000f,
-      0.06735229492187500000f,      0.10101318359375000000f,
-      0.17834472656250000000f,      0.28500366210937500000f,
-      0.33999633789062500000f,      0.47763061523437506000f,
-      0.56689453125000000000f,      0.64627075195312511000f,
-      0.77975463867187489000f,      0.86145019531250011000f,
-      0.12094116210937500000f,      0.15182495117187500000f,
-      0.21060180664062500000f,      0.35363769531250000000f,
-      0.41094970703125000000f,      0.47537231445312494000f,
-      0.58688354492187500000f,      0.65209960937500000000f,
-      0.77850341796875000000f,      0.84713745117187500000f,
-      0.08389282226562500000f,      0.10830688476562500000f,
-      0.21258544921875000000f,      0.42138671875000000000f,
-      0.47769165039062500000f,      0.53848266601562500000f,
-      0.61309814453125000000f,      0.68966674804687511000f,
-      0.80770874023437500000f,      0.87088012695312489000f,
-      0.06488037109375000000f,      0.10693359375000001000f,
-      0.15591430664062500000f,      0.30377197265625000000f,
-      0.38299560546875006000f,      0.44616699218750000000f,
-      0.60128784179687500000f,      0.66183471679687500000f,
-      0.80740356445312500000f,      0.88824462890625000000f,
-      0.12103271484375000000f,      0.17532348632812500000f,
-      0.22711181640625000000f,      0.29776000976562500000f,
-      0.44152832031250000000f,      0.50061035156250000000f,
-      0.58395385742187500000f,      0.70336914062500000000f,
-      0.77438354492187489000f,      0.86642456054687500000f,
-      0.09756469726562500000f,      0.14498901367187500000f,
-      0.19686889648437500000f,      0.28375244140625000000f,
-      0.39788818359374994000f,      0.45391845703125000000f,
-      0.54815673828125000000f,      0.62948608398437500000f,
-      0.72738647460937500000f,      0.86865234375000000000f,
-      0.09750366210937500000f,      0.12454223632812500000f,
-      0.19833374023437500000f,      0.37390136718750000000f,
-      0.43606567382812500000f,      0.48950195312500000000f,
-      0.56021118164062500000f,      0.63262939453125000000f,
-      0.82336425781250000000f,      0.89443969726562489000f,
-      0.04678344726562500000f,      0.07540893554687500000f,
-      0.13690185546875000000f,      0.23791503906250000000f,
-      0.37634277343750000000f,      0.48089599609375000000f,
-      0.59713745117187500000f,      0.68048095703124989000f,
-      0.78347778320312489000f,      0.88656616210937511000f,
-      0.06109619140625000000f,      0.09066772460937500000f,
-      0.15213012695312500000f,      0.24667358398437497000f,
-      0.40225219726562500000f,      0.47103881835937500000f,
-      0.55654907226562500000f,      0.65664672851562500000f,
-      0.75057983398437500000f,      0.86520385742187500000f,
-      0.11621093750000000000f,      0.15029907226562500000f,
-      0.20477294921875003000f,      0.31130981445312500000f,
-      0.36654663085937500000f,      0.43640136718750000000f,
-      0.56326293945312500000f,      0.62228393554687500000f,
-      0.80947875976562500000f,      0.88366699218750000000f,
-      0.06961059570312500000f,      0.10430908203125000000f,
-      0.15194702148437500000f,      0.26629638671875000000f,
-      0.48718261718750000000f,      0.55249023437500000000f,
-      0.61798095703125000000f,      0.69491577148437500000f,
-      0.77166748046875000000f,      0.88360595703125000000f,
-      0.09310913085937500000f,      0.16720581054687500000f,
-      0.22247314453125000000f,      0.30053710937500000000f,
-      0.38891601562500000000f,      0.44259643554687500000f,
-      0.56961059570312500000f,      0.72277832031250000000f,
-      0.79544067382812511000f,      0.88339233398437500000f,
-      0.07214355468750000000f,      0.10879516601562499000f,
-      0.16790771484375000000f,      0.29360961914062500000f,
-      0.45538330078125000000f,      0.50723266601562500000f,
-      0.57998657226562500000f,      0.64074707031250000000f,
-      0.80291748046875000000f,      0.89422607421875000000f,
-      0.12490844726562501000f,      0.15905761718750000000f,
-      0.20852661132812500000f,      0.30151367187500000000f,
-      0.49752807617187500000f,      0.55804443359375000000f,
-      0.62777709960937500000f,      0.72064208984375000000f,
-      0.79550170898437500000f,      0.88891601562500000000f,
-      0.08975219726562500000f,      0.12194824218750000000f,
-      0.18426513671875000000f,      0.32464599609374994000f,
-      0.38659667968750000000f,      0.44100952148437500000f,
-      0.51263427734375000000f,      0.59179687500000000000f,
-      0.79501342773437500000f,      0.87026977539062489000f,
-      0.11788940429687500000f,      0.15905761718750000000f,
-      0.21420288085937500000f,      0.28894042968750000000f,
-      0.33688354492187500000f,      0.40325927734374994000f,
-      0.60858154296875000000f,      0.68188476562500000000f,
-      0.76678466796875000000f,      0.90145874023437489000f,
-      0.14083862304687500000f,      0.18835449218749997000f,
-      0.23965454101562500000f,      0.31286621093750000000f,
-      0.38485717773437506000f,      0.44082641601562500000f,
-      0.60177612304687500000f,      0.68484497070312500000f,
-      0.76055908203125000000f,      0.89541625976562500000f,
-      0.10882568359375000000f,      0.13769531250000000000f,
-      0.21316528320312500000f,      0.26501464843750000000f,
-      0.32177734375000000000f,      0.49124145507812500000f,
-      0.55108642578125000000f,      0.68588256835937500000f,
-      0.79547119140625000000f,      0.85958862304687500000f,
-      0.13674926757812500000f,      0.16751098632812500000f,
-      0.22680664062500000000f,      0.34832763671875000000f,
-      0.40255737304687500000f,      0.46463012695312500000f,
-      0.61526489257812500000f,      0.67926025390625000000f,
-      0.80822753906250000000f,      0.90686035156250000000f,
-      0.10131835937500000000f,      0.13183593750000000000f,
-      0.20205688476562500000f,      0.30111694335937500000f,
-      0.35342407226562500000f,      0.42828369140625000000f,
-      0.64599609375000000000f,      0.70831298828125000000f,
-      0.81140136718750000000f,      0.91256713867187500000f,
-      0.11578369140625000000f,      0.14309692382812500000f,
-      0.21105957031250000000f,      0.26412963867187500000f,
-      0.30953979492187500000f,      0.49267578125000000000f,
-      0.59716796875000000000f,      0.65881347656250000000f,
-      0.84097290039062500000f,      0.90310668945312489000f,
-      0.07464599609375000000f,      0.09997558593750000000f,
-      0.18060302734375003000f,      0.38583374023437500000f,
-      0.50662231445312500000f,      0.54971313476562500000f,
-      0.64471435546875011000f,      0.70724487304687489000f,
-      0.83312988281250000000f,      0.90435791015625000000f,
-      0.07476806640625000000f,      0.10748291015625000000f,
-      0.16592407226562500000f,      0.26123046875000000000f,
-      0.46646118164062500000f,      0.60763549804687500000f,
-      0.66607666015625000000f,      0.73538208007812500000f,
-      0.81076049804687489000f,      0.88739013671875000000f,
-      0.07873535156250000000f,      0.11584472656249999000f,
-      0.17028808593750000000f,      0.25445556640625000000f,
-      0.30422973632812500000f,      0.38681030273437500000f,
-      0.57699584960937500000f,      0.69436645507812500000f,
-      0.77667236328125000000f,      0.89392089843749989000f,
-      0.10147094726562500000f,      0.13159179687500000000f,
-      0.19046020507812500000f,      0.23526000976562500000f,
-      0.27966308593750000000f,      0.44104003906250000000f,
-      0.66116333007812489000f,      0.72622680664062511000f,
-      0.82690429687500000000f,      0.91116333007812489000f,
-      0.10186767578125000000f,      0.12704467773437500000f,
-      0.23614501953125000000f,      0.33917236328125000000f,
-      0.38659667968750000000f,      0.45022583007812500000f,
-      0.51669311523437500000f,      0.69384765625000000000f,
-      0.78341674804687500000f,      0.85733032226562500000f,
-      0.11718749999999999000f,      0.14511108398437500000f,
-      0.23666381835937500000f,      0.41110229492187506000f,
-      0.46807861328125000000f,      0.52429199218750000000f,
-      0.61270141601562500000f,      0.68215942382812500000f,
-      0.82949829101562500000f,      0.90768432617187500000f,
-      0.07641601562500000000f,      0.12448120117187500000f,
-      0.25485229492187500000f,      0.36981201171875000000f,
-      0.45916748046875000000f,      0.56747436523437500000f,
-      0.66174316406250000000f,      0.75390625000000000000f,
-      0.83981323242187500000f,      0.91360473632812500000f,
-      0.15972900390625000000f,      0.19354248046875000000f,
-      0.25228881835937500000f,      0.36074829101562500000f,
-      0.46249389648437500000f,      0.51147460937500000000f,
-      0.63070678710937500000f,      0.71679687500000000000f,
-      0.79190063476562500000f,      0.89437866210937500000f,
-      0.08181762695312500000f,      0.10870361328125000000f,
-      0.18395996093750003000f,      0.33041381835937506000f,
-      0.56329345703125000000f,      0.62432861328125000000f,
-      0.68063354492187500000f,      0.75381469726562500000f,
-      0.82128906250000000000f,      0.91418457031250000000f,
-      0.10296630859375000000f,      0.13818359375000000000f,
-      0.19012451171875000000f,      0.25195312500000000000f,
-      0.29031372070312500000f,      0.38848876953124994000f,
-      0.56964111328125000000f,      0.63232421875000000000f,
-      0.79367065429687500000f,      0.86746215820312500000f,
-      0.08334350585937500000f,      0.11074829101562500000f,
-      0.25390625000000000000f,      0.37994384765625000000f,
-      0.43066406250000000000f,      0.50143432617187500000f,
-      0.56604003906250000000f,      0.67437744140625000000f,
-      0.77297973632812500000f,      0.84588623046875000000f,
-      0.10623168945312500000f,      0.13430786132812500000f,
-      0.22341918945312503000f,      0.28439331054687500000f,
-      0.33758544921875000000f,      0.39956665039062500000f,
-      0.46145629882812500000f,      0.68099975585937489000f,
-      0.80355834960937500000f,      0.87707519531250000000f,
-      0.10916137695312500000f,      0.15090942382812500000f,
-      0.20352172851562500000f,      0.26831054687500000000f,
-      0.31430053710937500000f,      0.38589477539062506000f,
-      0.59524536132812500000f,      0.75579833984375000000f,
-      0.82385253906250011000f,      0.90435791015625000000f,
-      0.12384033203125000000f,      0.15441894531250000000f,
-      0.22241210937500000000f,      0.31097412109375000000f,
-      0.35778808593750000000f,      0.42529296875000000000f,
-      0.48367309570312500000f,      0.56576538085937500000f,
-      0.81484985351562500000f,      0.91079711914062500000f,
-      0.13006591796875000000f,      0.16448974609374997000f,
-      0.21536254882812503000f,      0.27410888671875000000f,
-      0.31088256835937500000f,      0.46582031250000000000f,
-      0.62500000000000000000f,      0.68176269531250000000f,
-      0.79217529296875000000f,      0.85668945312500000000f,
-      0.10388183593750000000f,      0.13211059570312500000f,
-      0.20230102539062497000f,      0.24249267578125000000f,
-      0.30886840820312500000f,      0.52383422851562500000f,
-      0.59936523437500000000f,      0.67883300781249989000f,
-      0.76483154296875000000f,      0.83837890625000000000f,
-      0.09634399414062501400f,      0.12719726562500000000f,
-      0.18905639648437500000f,      0.28439331054687500000f,
-      0.32870483398437500000f,      0.40664672851562500000f,
-      0.47045898437500000000f,      0.60473632812500000000f,
-      0.75292968750000000000f,      0.84332275390625000000f,
-      0.07638549804687500000f,      0.10598754882812500000f,
-      0.15655517578125000000f,      0.20651245117187500000f,
-      0.26156616210937500000f,      0.45477294921875000000f,
-      0.58084106445312500000f,      0.66912841796874989000f,
-      0.79544067382812511000f,      0.87670898437500000000f,
-      0.12612915039062500000f,      0.15570068359375000000f,
-      0.23049926757812503000f,      0.30682373046875000000f,
-      0.35879516601562500000f,      0.45544433593750000000f,
-      0.53207397460937500000f,      0.61602783203125000000f,
-      0.73202514648437489000f,      0.80175781249999989000f,
-      0.15173339843750000000f,      0.18734741210937500000f,
-      0.24090576171875000000f,      0.29397583007812500000f,
-      0.34545898437500000000f,      0.43624877929687500000f,
-      0.66336059570312500000f,      0.74176025390625000000f,
-      0.82150268554687489000f,      0.91268920898437500000f,
-      0.09027099609375000000f,      0.11645507812500000000f,
-      0.20907592773437500000f,      0.28088378906250000000f,
-      0.33248901367187506000f,      0.55090332031250000000f,
-      0.63449096679687500000f,      0.71221923828125000000f,
-      0.84094238281250000000f,      0.90359497070312500000f,
-      0.15972900390625000000f,      0.18395996093750003000f,
-      0.24517822265625000000f,      0.30987548828125000000f,
-      0.34307861328125000000f,      0.45132446289062500000f,
-      0.57824707031250000000f,      0.63983154296875000000f,
-      0.81130981445312500000f,      0.88888549804687500000f,
-      0.15994262695312503000f,      0.20867919921875000000f,
-      0.32122802734375006000f,      0.39120483398437500000f,
-      0.44802856445312500000f,      0.52880859375000000000f,
-      0.60815429687500000000f,      0.68164062500000000000f,
-      0.79934692382812500000f,      0.87576293945312500000f,
-      0.10412597656250000000f,      0.12973022460937500000f,
-      0.18273925781250000000f,      0.21649169921875000000f,
-      0.30233764648437500000f,      0.55673217773437500000f,
-      0.66128540039062500000f,      0.72561645507812511000f,
-      0.82302856445312500000f,      0.88766479492187500000f,
-      0.07537841796875000000f,      0.09817504882812500000f,
-      0.23794555664062500000f,      0.46679687499999994000f,
-      0.52993774414062500000f,      0.58395385742187500000f,
-      0.67074584960937500000f,      0.74023437500000000000f,
-      0.83380126953124989000f,      0.89849853515625000000f,
-      0.15072631835937500000f,      0.17712402343750000000f,
-      0.24856567382812500000f,      0.36038208007812506000f,
-      0.42337036132812500000f,      0.47601318359375000000f,
-      0.52593994140625000000f,      0.59274291992187500000f,
-      0.80798339843750000000f,      0.90469360351562500000f,
-      0.15414428710937500000f,      0.18820190429687497000f,
-      0.25094604492187500000f,      0.29464721679687500000f,
-      0.37106323242187500000f,      0.54916381835937500000f,
-      0.62451171875000000000f,      0.69677734375000011000f,
-      0.81225585937500000000f,      0.86859130859375000000f,
-      0.15219116210937500000f,      0.18026733398437500000f,
-      0.28439331054687500000f,      0.34317016601562500000f,
-      0.40075683593750000000f,      0.45849609375000000000f,
-      0.53359985351562500000f,      0.69235229492187511000f,
-      0.79379272460937511000f,      0.86282348632812489000f,
-      0.15676879882812500000f,      0.21008300781250000000f,
-      0.33645629882812500000f,      0.45623779296875000000f,
-      0.52462768554687500000f,      0.59280395507812500000f,
-      0.66549682617187489000f,      0.74441528320312511000f,
-      0.82208251953125000000f,      0.89379882812500000000f,
-      0.21536254882812503000f,      0.24060058593750000000f,
-      0.29077148437500000000f,      0.31991577148437500000f,
-      0.33447265625000000000f,      0.45199584960937500000f,
-      0.58197021484375000000f,      0.66146850585937500000f,
-      0.78262329101562511000f,      0.85507202148437500000f,
-      0.20626831054687500000f,      0.21850585937500000000f,
-      0.26080322265625000000f,      0.35946655273437500000f,
-      0.37521362304687500000f,      0.39743041992187500000f,
-      0.50741577148437500000f,      0.64389038085937500000f,
-      0.75369262695312500000f,      0.86325073242187500000f,
-      0.11788940429687500000f,      0.29791259765625000000f,
-      0.33776855468749994000f,      0.34927368164062500000f,
-      0.36770629882812506000f,      0.42602539062500000000f,
-      0.55191040039062500000f,      0.65634155273437500000f,
-      0.76977539062500000000f,      0.88491821289062489000f,
-      0.01211547851562500000f,      0.01022338867187500000f,
-      0.01986694335937500000f,      0.03564453125000000000f,
-      0.01953125000000000000f,      0.02334594726562500000f,
-      0.01419067382812500000f,      0.01010131835937500000f,
-      0.00653076171875000000f,     -0.00592041015625000000f,
-     -0.01763916015625000000f,     -0.01974487304687500000f,
-     -0.02005004882812500000f,      0.02288818359375000000f,
-      0.01721191406250000000f,      0.01870727539062500000f,
-      0.01675415039062500000f,      0.01922607421875000000f,
-      0.00927734375000000000f,     -0.00158691406250000020f,
-      0.02526855468749999700f,      0.02813720703125000000f,
-      0.01351928710937500000f,      0.00338745117187500000f,
-      0.00421142578125000000f,      0.00378417968750000000f,
-      0.00515747070312500000f,      0.00042724609375000000f,
-      0.00439453125000000000f,      0.00253295898437500040f,
-      0.00402832031250000000f,      0.00177001953125000000f,
-     -0.01260375976562500000f,     -0.02294921875000000000f,
-      0.02651977539062500000f,      0.01025390625000000000f,
-      0.01174926757812500200f,      0.00210571289062500000f,
-      0.00170898437500000000f,      0.02532958984375000000f,
-     -0.00692749023437500000f,     -0.00811767578125000000f,
-     -0.01123046875000000000f,     -0.01342773437500000000f,
-     -0.03646850585937500000f,      0.00497436523437500000f,
-      0.00384521484375000000f,     -0.00695800781250000000f,
-      0.02447509765625000000f,      0.00476074218750000000f,
-      0.00573730468750000000f,      0.00366210937499999960f,
-      0.01147460937500000000f,      0.00180053710937500000f,
-     -0.01092529296875000000f,     -0.01702880859375000000f,
-     -0.04046630859375000000f,     -0.00775146484375000000f,
-     -0.00616455078125000000f,     -0.02407836914062500000f,
-      0.00903320312500000000f,      0.00280761718750000000f,
-     -0.00213623046875000000f,     -0.00393676757812500000f,
-     -0.02191162109375000000f,     -0.03463745117187500000f,
-      0.00891113281250000000f,     -0.00088500976562500000f,
-     -0.01925659179687500000f,      0.01486206054687500000f,
-     -0.00479125976562500000f,     -0.00466918945312500000f,
-     -0.00851440429687500000f,      0.00006103515625000000f,
-     -0.01278686523437500000f,     -0.01043701171875000000f,
-     -0.00103759765625000000f,     -0.01568603515625000000f,
-     -0.02438354492187499700f,     -0.04794311523437500000f,
-     -0.02096557617187500000f,     -0.01858520507812500000f,
-     -0.01666259765625000000f,     -0.00396728515625000000f,
-     -0.00656127929687500000f,     -0.00769042968750000000f,
-     -0.01361083984375000000f,     -0.01751708984375000000f,
-     -0.04080200195312500000f,      0.00631713867187499910f,
-     -0.00219726562500000000f,      0.00097656250000000000f,
-      0.00314331054687500000f,     -0.01959228515625000000f,
-      0.02874755859375000300f,      0.02236938476562499700f,
-      0.00570678710937500090f,      0.00088500976562500000f,
-     -0.00643920898437500000f,     -0.02484130859375000300f,
-      0.00436401367187500000f,      0.00686645507812500000f,
-      0.00061035156250000000f,      0.00073242187500000000f,
-     -0.00817871093750000000f,     -0.01150512695312500000f,
-      0.04953002929687499300f,      0.03457641601562500000f,
-      0.02035522460937500000f,      0.00500488281250000000f,
-      0.00936889648437500000f,      0.01116943359375000000f,
-      0.00570678710937500090f,      0.00103759765625000000f,
-      0.00189208984375000000f,     -0.00955200195312500000f,
-     -0.02539062500000000300f,     -0.04522705078125000000f,
-     -0.03604125976562500000f,      0.01473999023437500000f,
-     -0.00128173828125000000f,     -0.00119018554687500000f,
-     -0.01373291015625000000f,     -0.04290771484375000000f,
-     -0.01791381835937500000f,     -0.00158691406250000020f,
-     -0.02319335937500000000f,      0.01019287109375000000f,
-      0.00299072265625000000f,     -0.00183105468749999980f,
-     -0.01525878906249999800f,     -0.01489257812500000000f,
-     -0.03228759765625000000f,      0.00912475585937500000f,
-      0.00399780273437500000f,     -0.00762939453124999910f,
-     -0.00765991210937500090f,     -0.02145385742187500000f,
-      0.03164672851562500000f,      0.01733398437500000000f,
-     -0.01260375976562500000f,     -0.00808715820312500000f,
-      0.05148315429687500000f,      0.01748657226562500000f,
-      0.01052856445312500000f,      0.00985717773437500000f,
-      0.00299072265625000000f,      0.00186157226562500000f,
-     -0.00311279296875000000f,      0.00094604492187500000f,
-      0.00411987304687500000f,      0.00454711914062500000f,
-      0.01882934570312500000f,      0.01113891601562500000f,
-     -0.00119018554687500000f,      0.00103759765625000000f,
-     -0.01864624023437500000f,      0.03665161132812500000f,
-      0.04336547851562500000f,      0.02246093750000000000f,
-     -0.01263427734374999800f,     -0.01199340820312500000f,
-     -0.01501464843750000000f,     -0.01046752929687500200f,
-     -0.00964355468750000000f,     -0.01623535156250000000f,
-      0.01611328125000000000f,      0.00524902343750000000f,
-      0.00274658203125000000f,      0.00982666015625000000f,
-     -0.00897216796875000000f,     -0.00973510742187500000f,
-     -0.01651000976562500000f,      0.01535034179687500000f,
-      0.01950073242187500000f,      0.01223754882812500000f,
-      0.00003051757812500000f,     -0.00454711914062500000f,
-     -0.00222778320312500000f,     -0.00509643554687500000f,
-      0.00457763671875000000f,      0.00360107421875000000f,
-      0.00939941406250000000f,      0.00665283203124999910f,
-      0.00369262695312500000f,      0.00595092773437500000f,
-     -0.00436401367187500000f,     -0.00796508789062500000f,
-     -0.03091430664062500000f,     -0.02447509765625000000f,
-      0.01181030273437500000f,      0.01330566406249999800f,
-      0.00396728515625000000f,     -0.01303100585937500200f,
-     -0.01367187500000000000f,     -0.02078247070312500000f,
-      0.00375366210937500000f,     -0.00265502929687500000f,
-     -0.00765991210937500090f,     -0.00344848632812500000f,
-      0.00836181640625000000f,      0.00946044921875000000f,
-      0.01358032226562500000f,      0.01528930664062500000f,
-      0.01080322265625000200f,      0.00830078125000000000f,
-      0.00430297851562500000f,     -0.00869750976562500000f,
-      0.01736450195312500000f,      0.02001953125000000000f,
-      0.00112915039062500000f,     -0.00149536132812500000f,
-      0.00765991210937500090f,     -0.01177978515625000000f,
-     -0.00802612304687500000f,      0.03424072265625000000f,
-      0.01843261718750000000f,      0.01849365234375000000f,
-      0.01025390625000000000f,      0.00289916992187500000f,
-      0.00103759765625000000f,      0.00000000000000000000f,
-      0.00259399414062500000f,      0.00549316406250000000f,
-      0.00631713867187499910f,     -0.01119995117187500000f,
-     -0.01898193359375000000f,      0.03265380859375000000f,
-     -0.00018310546875000000f,     -0.00241088867187500000f,
-     -0.00488281250000000000f,     -0.00280761718750000000f,
-     -0.00418090820312500000f,     -0.00842285156250000000f,
-     -0.00985717773437500000f,     -0.01132202148437500000f,
-     -0.02124023437500000000f,     -0.03161621093750000000f,
-      0.01242065429687500200f,      0.00311279296875000000f,
-     -0.00262451171875000000f,     -0.00653076171875000000f,
-     -0.01470947265625000200f,     -0.01974487304687500000f,
-     -0.00085449218750000000f,     -0.00888061523437500000f,
-     -0.00296020507812500000f,     -0.00549316406250000000f,
-     -0.00762939453124999910f,     -0.01327514648437500000f,
-     -0.00054931640625000000f,     -0.00231933593750000000f,
-     -0.01013183593750000200f,      0.01251220703125000000f,
-      0.01242065429687500200f,      0.00512695312500000000f,
-      0.01644897460937500000f,      0.01254272460937500000f,
-      0.00775146484375000000f,      0.00338745117187500000f,
-      0.00177001953125000000f,     -0.00442504882812500000f,
-      0.00610351562500000000f,      0.00091552734374999989f,
-      0.00570678710937500090f,      0.00354003906250000000f,
-      0.00399780273437500000f,     -0.01119995117187500000f,
-     -0.01449584960937500000f,      0.02383422851562500300f,
-     -0.01705932617187500000f,      0.01712036132812500000f,
-      0.00595092773437500000f,     -0.00350952148437500040f,
-      0.00024414062500000000f,     -0.00512695312500000000f,
-      0.00091552734374999989f,      0.00167846679687500000f,
-     -0.00372314453125000000f,      0.00399780273437500000f,
-      0.00250244140625000000f,     -0.00015258789062500000f,
-     -0.00833129882812500000f,     -0.00152587890625000000f,
-     -0.01928710937500000000f,      0.02038574218750000000f,
-      0.00012207031250000000f,      0.00097656250000000000f,
-     -0.00079345703125000011f,     -0.00851440429687500000f,
-      0.00961303710937500000f,      0.00503540039062499910f,
-      0.00601196289062499910f,      0.01150512695312500000f,
-      0.00473022460937500000f,     -0.00125122070312500000f,
-     -0.00421142578125000000f,     -0.00988769531250000000f,
-     -0.00332641601562499960f,     -0.01882934570312500000f,
-      0.01098632812500000000f,      0.00299072265625000000f,
-     -0.00161743164062500000f,     -0.00973510742187500000f,
-     -0.00347900390625000000f,     -0.00747680664062500000f,
-     -0.00250244140625000000f,      0.01547241210937500000f,
-      0.01428222656250000000f,      0.00802612304687500000f,
-     -0.00418090820312500000f,     -0.01187133789062500000f,
-      0.01989746093750000000f,      0.01080322265625000200f,
-     -0.00054931640625000000f,     -0.00692749023437500000f,
-     -0.01409912109375000000f,     -0.00411987304687500000f,
-      0.00967407226562500000f,      0.00161743164062500000f,
-     -0.00048828125000000000f,      0.00201416015625000000f,
-     -0.00219726562500000000f,     -0.00384521484375000000f,
-     -0.01086425781250000000f,     -0.01058959960937500000f,
-     -0.01000976562500000000f,     -0.00219726562500000000f,
-     -0.01028442382812500000f,      0.00988769531250000000f,
-      0.00463867187500000000f,      0.01065063476562500000f,
-      0.00515747070312500000f,     -0.00598144531250000000f,
-      0.00546264648437500000f,      0.00775146484375000000f,
-      0.00793457031250000000f,      0.00991821289062500000f,
-     -0.00225830078125000000f,     -0.00244140625000000000f,
-      0.00228881835937500000f,     -0.00094604492187500000f,
-      0.00823974609375000000f,      0.00839233398437500000f,
-      0.00265502929687500000f,      0.00848388671875000000f,
-     -0.01361083984375000000f,     -0.00918579101562500000f,
-      0.00942993164062500000f,      0.00216674804687500000f,
-     -0.00076293945312500000f,     -0.00738525390625000000f,
-      0.01574707031250000000f,      0.00491333007812500000f,
-     -0.00494384765625000000f,     -0.00253295898437500040f,
-      0.01004028320312500000f,      0.00701904296875000090f,
-     -0.00949096679687500000f,     -0.00790405273437500000f,
-      0.00540161132812500090f,     -0.00079345703125000011f,
-     -0.01409912109375000000f,      0.00271606445312500000f,
-      0.00784301757812500000f,      0.00018310546875000000f,
-     -0.00396728515625000000f,     -0.00283813476562499960f,
-     -0.01391601562500000000f,     -0.00967407226562500000f,
-     -0.00674438476562500000f,     -0.00628662109375000000f,
-     -0.01272583007812500000f,     -0.00555419921875000000f,
-     -0.00225830078125000000f,      0.00714111328125000000f,
-      0.00146484375000000000f,      0.00796508789062500000f,
-      0.01095581054687500000f,      0.00704956054687500000f,
-      0.00787353515625000000f,      0.00259399414062500000f,
-     -0.00860595703125000000f,      0.00769042968750000000f,
-     -0.00448608398437500000f,     -0.00677490234375000000f,
-      0.00765991210937500090f,     -0.00631713867187499910f,
-      0.01351928710937500000f,      0.00375366210937500000f,
-     -0.01272583007812500000f,     -0.00109863281250000000f,
-      0.00833129882812500000f,     -0.00735473632812500090f,
-      0.00732421874999999910f,     -0.00341796875000000000f,
-      0.00134277343749999980f,     -0.00509643554687500000f,
-      0.00384521484375000000f,     -0.00378417968750000000f,
-     -0.00234985351562500000f,      0.00177001953125000000f,
-     -0.01223754882812500000f,      0.01016235351562500000f,
-     -0.00360107421875000000f,      0.00250244140625000000f,
-      0.00384521484375000000f,      0.00460815429687500000f,
-     -0.01321411132812500000f,      0.01095581054687500000f,
-     -0.00396728515625000000f,     -0.00311279296875000000f,
-      0.00399780273437500000f,     -0.00744628906250000000f,
-      0.00262451171875000000f,      0.00259399414062500000f,
-     -0.01409912109375000000f,      0.01263427734374999800f,
-     -0.00732421874999999910f,      0.00048828125000000000f,
-      0.00442504882812500000f,      0.00085449218750000000f,
-     -0.00625610351562500000f,     -0.01467895507812500000f,
-      0.01138305664062500000f,      0.00894165039062500000f,
-     -0.00219726562500000000f,     -0.00531005859375000000f,
-      0.00189208984375000000f,      0.00790405273437500000f,
-     -0.00024414062500000000f,     -0.00054931640625000000f,
-      0.01104736328125000000f,      0.00711059570312500000f,
-      0.00564575195312500000f,      0.00131225585937500000f,
-      0.00848388671875000000f,      0.00082397460937500000f,
-      0.00588989257812500000f,      0.01739501953125000000f,
-     -0.00756835937500000000f,      0.00576782226562500000f,
-      0.00280761718750000000f,      0.00094604492187500000f,
-     -0.00839233398437500000f,     -0.00009155273437500000f,
-      0.00741577148437500000f,      0.00537109374999999910f,
-      0.01336669921875000200f,      0.00637817382812500090f,
-      0.00628662109375000000f,     -0.00155639648437500000f,
-      0.00241088867187500000f,      0.00332641601562499960f,
-      0.00512695312500000000f,     -0.00564575195312500000f,
-     -0.00939941406250000000f,     -0.00207519531250000000f,
-     -0.01885986328125000000f,      0.01174926757812500200f,
-     -0.00946044921875000000f,     -0.00329589843750000000f,
-     -0.00500488281250000000f,      0.00503540039062499910f,
-      0.00186157226562500000f,     -0.00463867187500000000f,
-     -0.00308227539062500000f,     -0.01257324218750000000f,
-     -0.00817871093750000000f,     -0.00784301757812500000f,
-     -0.00122070312500000000f,     -0.00061035156250000000f,
-     -0.00085449218750000000f,     -0.00482177734375000000f,
-     -0.00918579101562500000f,      0.00827026367187500000f,
-      0.01159667968750000000f,     -0.01031494140625000000f,
-     -0.01119995117187500000f,     -0.00402832031250000000f,
-      0.00195312500000000000f,      0.00347900390625000000f,
-     -0.00399780273437500000f,     -0.00686645507812500000f,
-     -0.00476074218750000000f,     -0.00793457031250000000f,
-     -0.00192260742187500000f,     -0.00354003906250000000f,
-      0.00473022460937500000f,     -0.01788330078125000000f,
-     -0.00616455078125000000f,      0.00775146484375000000f,
-     -0.00875854492187500000f,      0.00543212890625000000f,
-      0.00692749023437500000f,     -0.00323486328125000000f,
-     -0.00897216796875000000f,      0.00500488281250000000f,
-      0.00909423828125000000f,     -0.00305175781250000000f,
-      0.00564575195312500000f,      0.00967407226562500000f,
-      0.00588989257812500000f,     -0.00137329101562500000f,
-      0.00085449218750000000f,      0.00244140625000000000f,
-     -0.00265502929687500000f,     -0.01321411132812500000f,
-      0.00067138671874999989f,     -0.00146484375000000000f,
-      0.00146484375000000000f,     -0.00723266601562500000f,
-     -0.00698852539062499910f,     -0.00424194335937500000f,
-      0.00366210937499999960f,     -0.01110839843750000000f,
-      0.00817871093750000000f,     -0.00415039062500000000f,
-      0.01208496093750000200f,      0.00381469726562499960f,
-      0.00396728515625000000f,     -0.00271606445312500000f,
-     -0.00830078125000000000f,      0.00360107421875000000f,
-     -0.00781250000000000000f,     -0.00207519531250000000f,
-     -0.01376342773437500000f,      0.01489257812500000000f,
-      0.00436401367187500000f,     -0.00503540039062499910f,
-     -0.00146484375000000000f,     -0.00579833984375000000f,
-      0.00323486328125000000f,      0.00668334960937500090f,
-      0.00143432617187500000f,      0.01327514648437500000f,
-      0.00747680664062500000f,      0.00296020507812500000f,
-      0.00228881835937500000f,     -0.01275634765625000200f,
-      0.00369262695312500000f,     -0.00570678710937500090f,
-      0.01739501953125000000f,     -0.00610351562500000000f,
-     -0.01071166992187500000f,      0.00686645507812500000f,
-     -0.00064086914062500000f,     -0.00662231445312500000f,
-      0.00714111328125000000f,     -0.00338745117187500000f,
-      0.00592041015625000000f,      0.00042724609375000000f,
-      0.00738525390625000000f,      0.00360107421875000000f,
-      0.00427246093750000000f,     -0.01211547851562500000f,
-      0.01083374023437500000f,      0.01101684570312499800f,
-     -0.00137329101562500000f,     -0.00595092773437500000f
+     -0.42187500000000000000f,     -0.35156250000000000000f,
+     -0.27734375000000000000f,     -0.19140625000000000000f,
+     -0.09375000000000000000f,     -0.01953125000000000000f,
+      0.08203125000000000000f,      0.18750000000000000000f,
+      0.29296875000000000000f,      0.38671875000000006000f,
+     -0.42187500000000000000f,     -0.38671875000000006000f,
+     -0.29687500000000000000f,     -0.22265625000000000000f,
+     -0.15234375000000000000f,     -0.02734375000000000000f,
+      0.07812500000000000000f,      0.19531250000000000000f,
+      0.29687500000000000000f,      0.38281250000000000000f,
+     -0.41015625000000000000f,     -0.37890625000000000000f,
+     -0.32421875000000006000f,     -0.19140625000000000000f,
+     -0.07421875000000000000f,     -0.02734375000000000000f,
+      0.10546875000000000000f,      0.18359375000000000000f,
+      0.26171875000000000000f,      0.39843750000000000000f,
+     -0.37890625000000000000f,     -0.35156250000000000000f,
+     -0.29296875000000000000f,     -0.19140625000000000000f,
+     -0.02343750000000000000f,      0.02343750000000000000f,
+      0.10546875000000000000f,      0.21484375000000000000f,
+      0.28515625000000000000f,      0.37109375000000000000f,
+     -0.37109375000000000000f,     -0.34765625000000000000f,
+     -0.28125000000000000000f,     -0.15625000000000000000f,
+     -0.10937500000000000000f,     -0.04296874999999999300f,
+      0.08203125000000000000f,      0.14453125000000000000f,
+      0.27343750000000000000f,      0.33593750000000000000f,
+     -0.40234375000000000000f,     -0.37890625000000000000f,
+     -0.32031250000000000000f,     -0.18750000000000000000f,
+      0.03125000000000000000f,      0.08203125000000000000f,
+      0.14062500000000000000f,      0.21875000000000000000f,
+      0.28906250000000000000f,      0.39453125000000000000f,
+     -0.40234375000000000000f,     -0.37500000000000000000f,
+     -0.31640625000000000000f,     -0.12890625000000000000f,
+     -0.07421875000000000000f,     -0.01171875000000000000f,
+      0.10937500000000000000f,      0.16015625000000000000f,
+      0.33593750000000000000f,      0.39843750000000000000f,
+     -0.43359375000000000000f,     -0.39843750000000000000f,
+     -0.33203125000000000000f,     -0.24218750000000000000f,
+     -0.14843750000000000000f,     -0.08203125000000000000f,
+      0.04296874999999999300f,      0.16015625000000000000f,
+      0.25781250000000000000f,      0.37109375000000000000f,
+     -0.34374999999999994000f,     -0.32031250000000000000f,
+     -0.24609375000000000000f,     -0.10937500000000000000f,
+     -0.03906250000000000000f,      0.00390625000000000000f,
+      0.13671875000000000000f,      0.20703125000000000000f,
+      0.28515625000000000000f,      0.40234375000000000000f,
+     -0.39453125000000000000f,     -0.37500000000000000000f,
+     -0.26171875000000000000f,     -0.06640625000000000000f,
+     -0.01562500000000000000f,      0.03906250000000000000f,
+      0.11718749999999999000f,      0.17578125000000000000f,
+      0.33593750000000000000f,      0.40234375000000000000f,
+     -0.36718750000000000000f,     -0.33984375000000000000f,
+     -0.27343750000000000000f,     -0.21484375000000000000f,
+     -0.17187499999999997000f,     -0.09765625000000000000f,
+      0.14453125000000000000f,      0.21484375000000000000f,
+      0.28515625000000000000f,      0.40625000000000006000f,
+     -0.38281250000000000000f,     -0.35937500000000000000f,
+     -0.27734375000000000000f,     -0.14453125000000000000f,
+     -0.08984375000000000000f,     -0.03906250000000000000f,
+      0.14453125000000000000f,      0.21093750000000000000f,
+      0.28515625000000000000f,      0.40625000000000006000f,
+     -0.44531250000000000000f,     -0.42187500000000000000f,
+     -0.30859375000000000000f,     -0.19140625000000000000f,
+     -0.07812500000000000000f,      0.00781250000000000000f,
+      0.11328125000000000000f,      0.21093750000000000000f,
+      0.31250000000000000000f,      0.40234375000000000000f,
+     -0.41796875000000000000f,     -0.38671875000000006000f,
+     -0.33593750000000000000f,     -0.23437499999999997000f,
+     -0.02734375000000000000f,      0.04296874999999999300f,
+      0.10546875000000000000f,      0.19140625000000000000f,
+      0.26171875000000000000f,      0.37109375000000000000f,
+     -0.39062500000000000000f,     -0.36718750000000000000f,
+     -0.29687500000000000000f,     -0.15625000000000000000f,
+     -0.01953125000000000000f,      0.02343750000000000000f,
+      0.10156250000000001000f,      0.16796875000000000000f,
+      0.24218750000000000000f,      0.39843750000000000000f,
+     -0.34374999999999994000f,     -0.30859375000000000000f,
+     -0.25000000000000000000f,     -0.17187499999999997000f,
+     -0.10937500000000000000f,     -0.05859374999999999300f,
+      0.10156250000000001000f,      0.16796875000000000000f,
+      0.25000000000000000000f,      0.40625000000000006000f,
+     -0.40234375000000000000f,     -0.38281250000000000000f,
+     -0.27734375000000000000f,     -0.10156250000000001000f,
+     -0.05468750000000000000f,      0.01562500000000000000f,
+      0.08984375000000000000f,      0.16796875000000000000f,
+      0.28125000000000000000f,      0.33984375000000000000f,
+     -0.42968750000000000000f,     -0.40234375000000000000f,
+     -0.32421875000000006000f,     -0.22656250000000000000f,
+     -0.10546875000000000000f,     -0.01953125000000000000f,
+      0.06250000000000000000f,      0.13671875000000000000f,
+      0.22656250000000000000f,      0.35937500000000000000f,
+     -0.40234375000000000000f,     -0.36718750000000000000f,
+     -0.30859375000000000000f,     -0.24218750000000000000f,
+     -0.08203125000000000000f,     -0.02734375000000000000f,
+      0.04687500000000000000f,      0.20312500000000003000f,
+      0.26953125000000000000f,      0.34374999999999994000f,
+     -0.41796875000000000000f,     -0.38281250000000000000f,
+     -0.32812500000000000000f,     -0.17187499999999997000f,
+     -0.11328125000000000000f,     -0.04687500000000000000f,
+      0.03515625000000000000f,      0.10937500000000000000f,
+      0.28515625000000000000f,      0.35156250000000000000f,
+     -0.38671875000000006000f,     -0.36328124999999994000f,
+     -0.26562500000000000000f,     -0.12500000000000000000f,
+     -0.07421875000000000000f,     -0.01953125000000000000f,
+      0.04687500000000000000f,      0.10937500000000000000f,
+      0.33593750000000000000f,      0.40625000000000006000f,
+     -0.39062500000000000000f,     -0.35546875000000000000f,
+     -0.29296875000000000000f,     -0.21484375000000000000f,
+     -0.15625000000000000000f,     -0.10156250000000001000f,
+      0.07812500000000000000f,      0.15625000000000000000f,
+      0.22656250000000000000f,      0.39453125000000000000f,
+     -0.39062500000000000000f,     -0.36718750000000000000f,
+     -0.28515625000000000000f,     -0.23437499999999997000f,
+     -0.19140625000000000000f,     -0.00390625000000000000f,
+      0.07031250000000000000f,      0.14062500000000000000f,
+      0.32421875000000006000f,      0.37500000000000000000f,
+     -0.41406250000000000000f,     -0.37890625000000000000f,
+     -0.26953125000000000000f,     -0.18359375000000000000f,
+     -0.09765625000000000000f,      0.04296874999999999300f,
+      0.12109375000000000000f,      0.17968750000000000000f,
+      0.25390625000000000000f,      0.34765625000000000000f,
+     -0.36328124999999994000f,     -0.33984375000000000000f,
+     -0.26953125000000000000f,     -0.17968750000000000000f,
+     -0.12500000000000000000f,     -0.07031250000000000000f,
+     -0.00781250000000000000f,      0.05468750000000000000f,
+      0.28906250000000000000f,      0.40234375000000000000f,
+     -0.36328124999999994000f,     -0.33984375000000000000f,
+     -0.25390625000000000000f,     -0.11328125000000000000f,
+      0.02343750000000000000f,      0.07031250000000000000f,
+      0.14843750000000000000f,      0.22265625000000000000f,
+      0.28906250000000000000f,      0.39843750000000000000f,
+     -0.35937500000000000000f,     -0.33203125000000000000f,
+     -0.25781250000000000000f,     -0.21093750000000000000f,
+     -0.16796875000000000000f,     -0.01562500000000000000f,
+      0.12500000000000000000f,      0.17578125000000000000f,
+      0.34374999999999994000f,      0.40625000000000006000f,
+     -0.42187500000000000000f,     -0.38671875000000006000f,
+     -0.33203125000000000000f,     -0.19531250000000000000f,
+     -0.13671875000000000000f,     -0.07421875000000000000f,
+      0.11328125000000000000f,      0.16015625000000000000f,
+      0.32812500000000000000f,      0.39843750000000000000f,
+     -0.37890625000000000000f,     -0.35156250000000000000f,
+     -0.28515625000000000000f,     -0.22265625000000000000f,
+     -0.18750000000000000000f,     -0.09375000000000000000f,
+      0.08203125000000000000f,      0.13671875000000000000f,
+      0.30859375000000000000f,      0.36718750000000000000f,
+     -0.32812500000000000000f,     -0.29687500000000000000f,
+     -0.22265625000000000000f,     -0.15625000000000000000f,
+     -0.11328125000000000000f,     -0.04296874999999999300f,
+      0.16015625000000000000f,      0.23437499999999997000f,
+      0.31250000000000000000f,      0.40625000000000006000f,
+     -0.39062500000000000000f,     -0.36718750000000000000f,
+     -0.29296875000000000000f,     -0.25000000000000000000f,
+     -0.19921875000000000000f,      0.00781250000000000000f,
+      0.07812500000000000000f,      0.17578125000000000000f,
+      0.26562500000000000000f,      0.33203125000000000000f,
+     -0.39062500000000000000f,     -0.36718750000000000000f,
+     -0.24218750000000000000f,     -0.16015625000000000000f,
+     -0.11718749999999999000f,      0.05078125000000000700f,
+      0.12109375000000000000f,      0.20312500000000003000f,
+      0.33203125000000000000f,      0.39453125000000000000f,
+     -0.37109375000000000000f,     -0.33593750000000000000f,
+     -0.27343750000000000000f,     -0.20312500000000003000f,
+     -0.14843750000000000000f,     -0.08984375000000000000f,
+      0.07031250000000000000f,      0.25000000000000000000f,
+      0.32421875000000006000f,      0.39453125000000000000f,
+     -0.44531250000000000000f,     -0.42187500000000000000f,
+     -0.36718750000000000000f,     -0.26953125000000000000f,
+     -0.12109375000000000000f,     -0.01953125000000000000f,
+      0.09375000000000000000f,      0.17968750000000000000f,
+      0.28125000000000000000f,      0.38671875000000006000f,
+     -0.39062500000000000000f,     -0.37109375000000000000f,
+     -0.21093750000000000000f,     -0.14843750000000000000f,
+     -0.10156250000000001000f,     -0.03906250000000000000f,
+      0.01171875000000000000f,      0.19921875000000000000f,
+      0.29296875000000000000f,      0.34765625000000000000f,
+     -0.40625000000000006000f,     -0.38281250000000000000f,
+     -0.28515625000000000000f,     -0.12109375000000000000f,
+      0.07031250000000000000f,      0.12109375000000000000f,
+      0.17968750000000000000f,      0.25390625000000000000f,
+      0.32031250000000000000f,      0.41015625000000000000f,
+     -0.35156250000000000000f,     -0.32812500000000000000f,
+     -0.24218750000000000000f,     -0.19921875000000000000f,
+     -0.14843750000000000000f,      0.01171875000000000000f,
+      0.09765625000000000000f,      0.17187499999999997000f,
+      0.28125000000000000000f,      0.33593750000000000000f,
+     -0.42578124999999994000f,     -0.40234375000000000000f,
+     -0.32421875000000006000f,     -0.11328125000000000000f,
+      0.00781250000000000000f,      0.04296874999999999300f,
+      0.14843750000000000000f,      0.20703125000000000000f,
+      0.32812500000000000000f,      0.39453125000000000000f,
+     -0.33593750000000000000f,     -0.29296875000000000000f,
+     -0.23828125000000000000f,     -0.17968750000000000000f,
+     -0.06640625000000000000f,     -0.01562500000000000000f,
+      0.07031250000000000000f,      0.20312500000000003000f,
+      0.26953125000000000000f,      0.35546875000000000000f,
+     -0.42578124999999994000f,     -0.39062500000000000000f,
+     -0.32421875000000006000f,     -0.21093750000000000000f,
+     -0.03906250000000000000f,      0.00390625000000000000f,
+      0.07421875000000000000f,      0.13671875000000000000f,
+      0.31640625000000000000f,      0.39062500000000000000f,
+     -0.39453125000000000000f,     -0.37109375000000000000f,
+     -0.30468750000000000000f,     -0.26562500000000000000f,
+     -0.22656250000000000000f,     -0.06250000000000000000f,
+      0.15234375000000000000f,      0.21875000000000000000f,
+      0.33203125000000000000f,      0.40234375000000000000f,
+     -0.33984375000000000000f,     -0.31250000000000000000f,
+     -0.22656250000000000000f,     -0.16015625000000000000f,
+     -0.11328125000000000000f,     -0.02734375000000000000f,
+      0.05468750000000000000f,      0.11718749999999999000f,
+      0.33593750000000000000f,      0.40625000000000006000f,
+     -0.41015625000000000000f,     -0.38671875000000006000f,
+     -0.23828125000000000000f,     -0.02734375000000000000f,
+      0.02343750000000000000f,      0.08203125000000000000f,
+      0.17187499999999997000f,      0.23828125000000000000f,
+      0.33984375000000000000f,      0.39843750000000000000f,
+     -0.33593750000000000000f,     -0.31250000000000000000f,
+     -0.18750000000000000000f,     -0.11718749999999999000f,
+     -0.07031250000000000000f,      0.01953125000000000000f,
+      0.09765625000000000000f,      0.16796875000000000000f,
+      0.32031250000000000000f,      0.37890625000000000000f,
+     -0.38281250000000000000f,     -0.35937500000000000000f,
+     -0.25781250000000000000f,     -0.19140625000000000000f,
+     -0.14062500000000000000f,     -0.05078125000000000700f,
+      0.00000000000000000000f,      0.13671875000000000000f,
+      0.23046875000000000000f,      0.30859375000000000000f,
+     -0.38281250000000000000f,     -0.36328124999999994000f,
+     -0.25781250000000000000f,     -0.20312500000000003000f,
+     -0.15625000000000000000f,     -0.09375000000000000000f,
+     -0.04687500000000000000f,      0.17968750000000000000f,
+      0.31640625000000000000f,      0.38281250000000000000f,
+     -0.41796875000000000000f,     -0.37109375000000000000f,
+     -0.25000000000000000000f,     -0.15234375000000000000f,
+     -0.05468750000000000000f,      0.05468750000000000000f,
+      0.16406250000000000000f,      0.25390625000000000000f,
+      0.34374999999999994000f,      0.41406250000000000000f,
+     -0.40625000000000006000f,     -0.37500000000000000000f,
+     -0.32031250000000000000f,     -0.25390625000000000000f,
+     -0.21093750000000000000f,     -0.13671875000000000000f,
+      0.08203125000000000000f,      0.19921875000000000000f,
+      0.28125000000000000000f,      0.38671875000000006000f,
+     -0.36718750000000000000f,     -0.33984375000000000000f,
+     -0.28906250000000000000f,     -0.23046875000000000000f,
+     -0.08203125000000000000f,     -0.03906250000000000000f,
+      0.05468750000000000000f,      0.13671875000000000000f,
+      0.22656250000000000000f,      0.37500000000000000000f,
+     -0.42187500000000000000f,     -0.39062500000000000000f,
+     -0.33593750000000000000f,     -0.27734375000000000000f,
+     -0.23046875000000000000f,     -0.06250000000000000000f,
+      0.07812500000000000000f,      0.16015625000000000000f,
+      0.28906250000000000000f,      0.37890625000000000000f,
+     -0.40234375000000000000f,     -0.37109375000000000000f,
+     -0.31250000000000000000f,     -0.22265625000000000000f,
+     -0.17578125000000000000f,     -0.09375000000000000000f,
+     -0.02343750000000000000f,      0.07421875000000000000f,
+      0.25781250000000000000f,      0.34765625000000000000f,
+     -0.38671875000000006000f,     -0.36328124999999994000f,
+     -0.28906250000000000000f,     -0.25390625000000000000f,
+     -0.19531250000000000000f,      0.07812500000000000000f,
+      0.15625000000000000000f,      0.22265625000000000000f,
+      0.33203125000000000000f,      0.38281250000000000000f,
+     -0.39843750000000000000f,     -0.37500000000000000000f,
+     -0.16015625000000000000f,     -0.08203125000000000000f,
+     -0.04296874999999999300f,      0.03515625000000000000f,
+      0.09765625000000000000f,      0.23046875000000000000f,
+      0.32421875000000006000f,      0.38281250000000000000f,
+     -0.36718750000000000000f,     -0.33984375000000000000f,
+     -0.27734375000000000000f,     -0.23046875000000000000f,
+     -0.18359375000000000000f,     -0.03125000000000000000f,
+      0.19531250000000000000f,      0.26562500000000000000f,
+      0.33593750000000000000f,      0.41015625000000000000f,
+     -0.42187500000000000000f,     -0.39453125000000000000f,
+     -0.32812500000000000000f,     -0.23046875000000000000f,
+     -0.04296874999999999300f,      0.11328125000000000000f,
+      0.17187499999999997000f,      0.23828125000000000000f,
+      0.32031250000000000000f,      0.38671875000000006000f,
+     -0.38281250000000000000f,     -0.36718750000000000000f,
+     -0.32031250000000000000f,     -0.28515625000000000000f,
+     -0.10156250000000001000f,      0.02343750000000000000f,
+      0.11718749999999999000f,      0.20703125000000000000f,
+      0.30859375000000000000f,      0.38281250000000000000f,
+     -0.33203125000000000000f,     -0.27734375000000000000f,
+     -0.14453125000000000000f,     -0.04687500000000000000f,
+      0.01171875000000000000f,      0.08593749999999998600f,
+      0.16015625000000000000f,      0.23828125000000000000f,
+      0.33203125000000000000f,      0.39062500000000000000f,
+     -0.33203125000000000000f,     -0.30859375000000000000f,
+     -0.25781250000000000000f,     -0.21484375000000000000f,
+     -0.07421875000000000000f,      0.06640625000000000000f,
+      0.12890625000000000000f,      0.21875000000000000000f,
+      0.32421875000000006000f,      0.37890625000000000000f,
+     -0.28125000000000000000f,     -0.25781250000000000000f,
+     -0.23437499999999997000f,     -0.22265625000000000000f,
+     -0.19531250000000000000f,      0.01562500000000000000f,
+      0.10156250000000001000f,      0.20312500000000003000f,
+      0.30859375000000000000f,      0.40234375000000000000f,
+     -0.37109375000000000000f,     -0.28906250000000000000f,
+     -0.12109375000000000000f,     -0.07031250000000000000f,
+     -0.04296874999999999300f,     -0.02343750000000000000f,
+      0.03515625000000000000f,      0.20312500000000003000f,
+      0.30078125000000000000f,      0.39062500000000000000f,
+     -0.30468750000000000000f,     -0.29296875000000000000f,
+     -0.26562500000000000000f,     -0.19921875000000000000f,
+     -0.16796875000000000000f,     -0.14843750000000000000f,
+      0.04687500000000000000f,      0.17578125000000000000f,
+      0.28906250000000000000f,      0.39062500000000000000f,
+     -0.38671875000000006000f,     -0.26562500000000000000f,
+     -0.15625000000000000000f,     -0.12890625000000000000f,
+     -0.09375000000000000000f,     -0.06250000000000000000f,
+      0.08984375000000000000f,      0.22656250000000000000f,
+      0.30859375000000000000f,      0.37890625000000000000f,
+     -0.38671875000000006000f,     -0.18750000000000000000f,
+     -0.16406250000000000000f,     -0.15625000000000000000f,
+     -0.14062500000000000000f,     -0.07421875000000000000f,
+      0.10156250000000001000f,      0.20312500000000003000f,
+      0.31250000000000000000f,      0.41015625000000000000f,
+     -0.28515625000000000000f,     -0.26953125000000000000f,
+     -0.24218750000000000000f,     -0.16796875000000000000f,
+     -0.12109375000000000000f,     -0.09765625000000000000f,
+      0.08203125000000000000f,      0.18750000000000000000f,
+      0.29687500000000000000f,      0.39453125000000000000f,
+      0.03125000000000000000f,      0.02734375000000000000f,
+      0.01953125000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+     -0.03125000000000000000f,     -0.04296874999999999300f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.02343750000000000000f,
+     -0.01562500000000000000f,     -0.02734375000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.02343750000000000000f,      0.01953125000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.03125000000000000000f,
+      0.01953125000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,     -0.00781250000000000000f,
+      0.03125000000000000000f,      0.01953125000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.03515625000000000000f,     -0.05078125000000000700f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01562500000000000000f,     -0.00390625000000000000f,
+      0.03515625000000000000f,      0.01562500000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+     -0.03515625000000000000f,      0.01562500000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+      0.04296874999999999300f,      0.02734375000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.04296874999999999300f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.01953125000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.04687500000000000000f,      0.03125000000000000000f,
+      0.01953125000000000000f,      0.01171875000000000000f,
+     -0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.01562500000000000000f,
+     -0.01953125000000000000f,     -0.02343750000000000000f,
+     -0.05078125000000000700f,      0.01953125000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01953125000000000000f,     -0.01953125000000000000f,
+     -0.03906250000000000000f,      0.03125000000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+     -0.01953125000000000000f,     -0.00781250000000000000f,
+     -0.01953125000000000000f,     -0.03125000000000000000f,
+      0.03906250000000000000f,      0.01953125000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01953125000000000000f,
+     -0.03515625000000000000f,      0.04687500000000000000f,
+      0.02343750000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.01953125000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.04687500000000000000f,
+      0.03125000000000000000f,      0.01562500000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01953125000000000000f,     -0.02734375000000000000f,
+      0.02343750000000000000f,      0.01171875000000000000f,
+     -0.00781250000000000000f,     -0.01171875000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.01562500000000000000f,
+     -0.03125000000000000000f,      0.02734375000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,      0.01953125000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,     -0.02734375000000000000f,
+      0.02343750000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.02343750000000000000f,
+      0.01171875000000000000f,      0.02343750000000000000f,
+      0.02343750000000000000f,      0.01171875000000000000f,
+      0.01562500000000000000f,      0.01953125000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.01953125000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.01562500000000000000f,
+     -0.01562500000000000000f,     -0.02734375000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.02734375000000000000f,
+     -0.00390625000000000000f,      0.02343750000000000000f,
+     -0.01562500000000000000f,     -0.01562500000000000000f,
+     -0.01953125000000000000f,     -0.01953125000000000000f,
+     -0.01562500000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.03906250000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.02734375000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.02343750000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.01562500000000000000f,     -0.01562500000000000000f,
+     -0.00390625000000000000f,     -0.01562500000000000000f,
+      0.01171875000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.01953125000000000000f,
+      0.01953125000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.01953125000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.01953125000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.02734375000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.01953125000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01171875000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+     -0.00781250000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.01953125000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.01953125000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.01171875000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,     -0.01171875000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.01171875000000000000f,
+     -0.01171875000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.01171875000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.01953125000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.01562500000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.01953125000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.01171875000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f
 };
 
 const SKP_Silk_NLSF_CBS_FLP SKP_Silk_NLSF_CB0_10_Stage_info_FLP[ NLSF_MSVQ_CB0_10_STAGES ] =
@@ -724,7 +768,8 @@
         {   8, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 *  80 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[  80 ] },
         {   8, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 *  88 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[  88 ] },
         {   8, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 *  96 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[  96 ] },
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 * 104 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[ 104 ] }
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 * 104 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[ 104 ] },
+        {  16, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 * 112 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[ 112 ] }
 };
 
 const SKP_Silk_NLSF_CB_FLP SKP_Silk_NLSF_CB0_10_FLP =
--- a/src_FLP/SKP_Silk_tables_NLSF_CB0_16_FLP.c
+++ b/src_FLP/SKP_Silk_tables_NLSF_CB0_16_FLP.c
@@ -28,7 +28,7 @@
 /**********************************************/
 /* This file has been automatically generated */
 /*                                            */
-/* ROM usage: 14.76 kB                        */
+/* ROM usage: 10.40 kB                        */
 /**********************************************/
 
 #include "SKP_Silk_tables_FLP.h"
@@ -36,1881 +36,1337 @@
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB0_16_rates[ NLSF_MSVQ_CB0_16_VECTORS ] =
 {
-      5.50000000000000000000f,      5.65625000000000000000f,
-      5.68750000000000000000f,      5.71875000000000000000f,
+      4.62500000000000000000f,      4.75000000000000000000f,
+      4.81250000000000000000f,      5.06250000000000000000f,
+      5.25000000000000000000f,      5.25000000000000000000f,
+      5.31250000000000000000f,      5.50000000000000000000f,
+      5.56250000000000000000f,      5.56250000000000000000f,
+      5.56250000000000000000f,      5.62500000000000000000f,
+      5.75000000000000000000f,      5.81250000000000000000f,
       5.81250000000000000000f,      5.81250000000000000000f,
-      5.96875000000000000000f,      5.96875000000000000000f,
-      5.96875000000000000000f,      6.12500000000000000000f,
-      6.15625000000000000000f,      6.28125000000000000000f,
-      6.34375000000000000000f,      6.43750000000000000000f,
-      6.43750000000000000000f,      6.43750000000000000000f,
-      6.46875000000000000000f,      6.46875000000000000000f,
-      6.53125000000000000000f,      6.53125000000000000000f,
-      6.53125000000000000000f,      6.53125000000000000000f,
-      6.56250000000000000000f,      6.56250000000000000000f,
-      6.56250000000000000000f,      6.59375000000000000000f,
-      6.59375000000000000000f,      6.59375000000000000000f,
+      5.87500000000000000000f,      5.87500000000000000000f,
+      5.87500000000000000000f,      5.87500000000000000000f,
+      5.93750000000000000000f,      5.93750000000000000000f,
+      5.93750000000000000000f,      6.00000000000000000000f,
+      6.00000000000000000000f,      6.00000000000000000000f,
+      6.00000000000000000000f,      6.06250000000000000000f,
+      6.06250000000000000000f,      6.12500000000000000000f,
+      6.12500000000000000000f,      6.12500000000000000000f,
+      6.12500000000000000000f,      6.18750000000000000000f,
+      6.18750000000000000000f,      6.18750000000000000000f,
+      6.25000000000000000000f,      6.25000000000000000000f,
+      6.25000000000000000000f,      6.25000000000000000000f,
+      6.25000000000000000000f,      6.31250000000000000000f,
+      6.31250000000000000000f,      6.31250000000000000000f,
+      6.37500000000000000000f,      6.37500000000000000000f,
+      6.43750000000000000000f,      6.50000000000000000000f,
+      6.50000000000000000000f,      6.56250000000000000000f,
       6.62500000000000000000f,      6.68750000000000000000f,
-      6.75000000000000000000f,      6.75000000000000000000f,
-      6.78125000000000000000f,      6.78125000000000000000f,
-      6.78125000000000000000f,      6.78125000000000000000f,
-      6.81250000000000000000f,      6.81250000000000000000f,
-      6.84375000000000000000f,      6.84375000000000000000f,
-      6.87500000000000000000f,      6.90625000000000000000f,
-      6.93750000000000000000f,      6.96875000000000000000f,
-      6.96875000000000000000f,      6.96875000000000000000f,
-      6.96875000000000000000f,      7.00000000000000000000f,
-      7.00000000000000000000f,      7.00000000000000000000f,
-      7.03125000000000000000f,      7.03125000000000000000f,
-      7.06250000000000000000f,      7.06250000000000000000f,
-      7.06250000000000000000f,      7.06250000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.12500000000000000000f,      7.12500000000000000000f,
-      7.12500000000000000000f,      7.12500000000000000000f,
-      7.15625000000000000000f,      7.15625000000000000000f,
-      7.15625000000000000000f,      7.18750000000000000000f,
-      7.18750000000000000000f,      7.18750000000000000000f,
-      7.21875000000000000000f,      7.21875000000000000000f,
-      7.21875000000000000000f,      7.21875000000000000000f,
-      7.25000000000000000000f,      7.25000000000000000000f,
-      7.25000000000000000000f,      7.25000000000000000000f,
-      7.28125000000000000000f,      7.31250000000000000000f,
-      7.34375000000000000000f,      7.34375000000000000000f,
-      7.34375000000000000000f,      7.37500000000000000000f,
-      7.37500000000000000000f,      7.37500000000000000000f,
-      7.37500000000000000000f,      7.40625000000000000000f,
-      7.40625000000000000000f,      7.40625000000000000000f,
-      7.40625000000000000000f,      7.50000000000000000000f,
-      7.50000000000000000000f,      7.50000000000000000000f,
-      7.50000000000000000000f,      7.53125000000000000000f,
-      7.56250000000000000000f,      7.59375000000000000000f,
-      7.62500000000000000000f,      7.62500000000000000000f,
-      7.71875000000000000000f,      7.71875000000000000000f,
-      7.75000000000000000000f,      7.75000000000000000000f,
-      7.75000000000000000000f,      7.78125000000000000000f,
-      7.84375000000000000000f,      7.96875000000000000000f,
-      7.96875000000000000000f,      8.00000000000000000000f,
-      8.12500000000000000000f,      8.12500000000000000000f,
-      8.15625000000000000000f,      8.25000000000000000000f,
-      8.25000000000000000000f,      8.31250000000000000000f,
-      8.31250000000000000000f,      8.37500000000000000000f,
-      8.46875000000000000000f,      8.56250000000000000000f,
-      8.62500000000000000000f,      8.71875000000000000000f,
-      9.00000000000000000000f,      9.00000000000000000000f,
-      9.00000000000000000000f,      9.00000000000000000000f,
-      3.68750000000000000000f,      3.75000000000000000000f,
-      3.78125000000000000000f,      3.78125000000000000000f,
-      3.81250000000000000000f,      3.90625000000000000000f,
-      3.90625000000000000000f,      4.03125000000000000000f,
-      4.03125000000000000000f,      4.06250000000000000000f,
-      4.09375000000000000000f,      4.12500000000000000000f,
-      4.25000000000000000000f,      4.28125000000000000000f,
-      4.31250000000000000000f,      4.53125000000000000000f,
-      2.71875000000000000000f,      2.75000000000000000000f,
-      2.84375000000000000000f,      3.03125000000000000000f,
-      3.06250000000000000000f,      3.12500000000000000000f,
-      3.28125000000000000000f,      3.31250000000000000000f,
-      2.87500000000000000000f,      2.96875000000000000000f,
-      2.96875000000000000000f,      3.00000000000000000000f,
-      3.03125000000000000000f,      3.03125000000000000000f,
-      3.06250000000000000000f,      3.09375000000000000000f,
-      2.75000000000000000000f,      2.87500000000000000000f,
-      2.96875000000000000000f,      2.96875000000000000000f,
-      3.00000000000000000000f,      3.03125000000000000000f,
-      3.06250000000000000000f,      3.40625000000000000000f,
-      2.90625000000000000000f,      2.90625000000000000000f,
-      2.90625000000000000000f,      3.00000000000000000000f,
-      3.03125000000000000000f,      3.03125000000000000000f,
-      3.09375000000000000000f,      3.15625000000000000000f,
-      2.90625000000000000000f,      2.93750000000000000000f,
-      2.93750000000000000000f,      2.96875000000000000000f,
-      2.96875000000000000000f,      3.09375000000000000000f,
-      3.09375000000000000000f,      3.09375000000000000000f,
-      2.90625000000000000000f,      2.90625000000000000000f,
-      2.90625000000000000000f,      3.00000000000000000000f,
-      3.00000000000000000000f,      3.03125000000000000000f,
-      3.12500000000000000000f,      3.18750000000000000000f,
-      2.90625000000000000000f,      2.96875000000000000000f,
-      2.96875000000000000000f,      3.00000000000000000000f,
+      6.68750000000000000000f,      6.68750000000000000000f,
+      6.68750000000000000000f,      6.75000000000000000000f,
+      6.75000000000000000000f,      6.81250000000000000000f,
+      6.81250000000000000000f,      6.93750000000000000000f,
+      6.93750000000000000000f,      7.12500000000000000000f,
+      7.37500000000000000000f,      7.75000000000000000000f,
+      3.56250000000000000000f,      3.62500000000000000000f,
+      3.62500000000000000000f,      3.75000000000000000000f,
+      3.81250000000000000000f,      3.93750000000000000000f,
+      4.06250000000000000000f,      4.06250000000000000000f,
+      4.12500000000000000000f,      4.12500000000000000000f,
+      4.18750000000000000000f,      4.18750000000000000000f,
+      4.25000000000000000000f,      4.31250000000000000000f,
+      4.37500000000000000000f,      4.37500000000000000000f,
+      2.62500000000000000000f,      2.93750000000000000000f,
+      2.93750000000000000000f,      3.00000000000000000000f,
+      3.00000000000000000000f,      3.18750000000000000000f,
+      3.18750000000000000000f,      3.25000000000000000000f,
+      2.87500000000000000000f,      2.87500000000000000000f,
+      2.93750000000000000000f,      2.93750000000000000000f,
       3.00000000000000000000f,      3.00000000000000000000f,
-      3.06250000000000000000f,      3.09375000000000000000f,
-      3.90625000000000000000f,      3.90625000000000000000f,
-      3.96875000000000000000f,      3.96875000000000000000f,
-      3.96875000000000000000f,      3.96875000000000000000f,
-      4.00000000000000000000f,      4.00000000000000000000f,
-      4.00000000000000000000f,      4.00000000000000000000f,
-      4.00000000000000000000f,      4.00000000000000000000f,
-      4.03125000000000000000f,      4.06250000000000000000f,
-      4.09375000000000000000f,      4.12500000000000000000f
+      3.06250000000000000000f,      3.31250000000000000000f,
+      2.75000000000000000000f,      2.75000000000000000000f,
+      3.00000000000000000000f,      3.00000000000000000000f,
+      3.06250000000000000000f,      3.06250000000000000000f,
+      3.18750000000000000000f,      3.25000000000000000000f,
+      2.81250000000000000000f,      2.81250000000000000000f,
+      2.87500000000000000000f,      2.87500000000000000000f,
+      3.06250000000000000000f,      3.06250000000000000000f,
+      3.25000000000000000000f,      3.31250000000000000000f,
+      2.81250000000000000000f,      2.93750000000000000000f,
+      2.93750000000000000000f,      2.93750000000000000000f,
+      3.00000000000000000000f,      3.06250000000000000000f,
+      3.12500000000000000000f,      3.25000000000000000000f,
+      2.87500000000000000000f,      2.87500000000000000000f,
+      2.87500000000000000000f,      2.93750000000000000000f,
+      3.00000000000000000000f,      3.12500000000000000000f,
+      3.18750000000000000000f,      3.18750000000000000000f,
+      2.87500000000000000000f,      2.93750000000000000000f,
+      3.00000000000000000000f,      3.00000000000000000000f,
+      3.00000000000000000000f,      3.00000000000000000000f,
+      3.00000000000000000000f,      3.18750000000000000000f,
+      3.75000000000000000000f,      3.75000000000000000000f,
+      3.81250000000000000000f,      3.87500000000000000000f,
+      3.93750000000000000000f,      3.93750000000000000000f,
+      3.93750000000000000000f,      4.00000000000000000000f,
+      4.00000000000000000000f,      4.06250000000000000000f,
+      4.06250000000000000000f,      4.12500000000000000000f,
+      4.12500000000000000000f,      4.12500000000000000000f,
+      4.31250000000000000000f,      4.37500000000000000000f
 };
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB0_16_ndelta_min[ 16 + 1 ] =
 {
-      0.00811767578125000000f,
+      0.00720214843750000000f,
+      0.00012207031250000000f,
+      0.00228881835937500000f,
       0.00009155273437500000f,
-      0.00122070312500000000f,
       0.00009155273437500000f,
-      0.00009155273437500000f,
-      0.00048828125000000000f,
-      0.00238037109375000000f,
-      0.00271606445312500000f,
-      0.00326538085937500000f,
-      0.00430297851562500000f,
-      0.00573730468750000000f,
-      0.00445556640625000000f,
-      0.00830078125000000000f,
-      0.00732421874999999910f,
-      0.00717163085937500000f,
-      0.00656127929687500000f,
-      0.01928710937500000000f
+      0.00015258789062500000f,
+      0.00350952148437500040f,
+      0.00289916992187500000f,
+      0.00344848632812500000f,
+      0.00421142578125000000f,
+      0.00537109374999999910f,
+      0.00515747070312500000f,
+      0.00759887695312500000f,
+      0.00781250000000000000f,
+      0.00827026367187500000f,
+      0.00802612304687500000f,
+      0.01922607421875000000f
 };
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * NLSF_MSVQ_CB0_16_VECTORS ] =
 {
-      0.03570556640625000000f,      0.06951904296875000000f,
-      0.11163330078125001000f,      0.16400146484375000000f,
-      0.23394775390625000000f,      0.27810668945312500000f,
-      0.34478759765624994000f,      0.40600585937500000000f,
-      0.46908569335937500000f,      0.53555297851562500000f,
-      0.59774780273437500000f,      0.65573120117187500000f,
-      0.72625732421875000000f,      0.79461669921875000000f,
-      0.86419677734375000000f,      0.92166137695312500000f,
-      0.04968261718750000700f,      0.07122802734375000000f,
-      0.12557983398437500000f,      0.18420410156250000000f,
-      0.23858642578125000000f,      0.29125976562500000000f,
-      0.35940551757812500000f,      0.42788696289062500000f,
-      0.48178100585937500000f,      0.53125000000000000000f,
-      0.59405517578125000000f,      0.64883422851562500000f,
-      0.69842529296875000000f,      0.74966430664062500000f,
-      0.81524658203125000000f,      0.85629272460937500000f,
-      0.05261230468750000000f,      0.08148193359375000000f,
-      0.12377929687500000000f,      0.19934082031250000000f,
-      0.25503540039062500000f,      0.30880737304687500000f,
-      0.36904907226562506000f,      0.42910766601562500000f,
-      0.50326538085937500000f,      0.57357788085937500000f,
-      0.62307739257812500000f,      0.68365478515625000000f,
-      0.74008178710937511000f,      0.80029296875000011000f,
-      0.86700439453125000000f,      0.91418457031250000000f,
-      0.04556274414062500000f,      0.10458374023437501000f,
-      0.14614868164062500000f,      0.19528198242187500000f,
-      0.25741577148437500000f,      0.31030273437500000000f,
-      0.36621093750000000000f,      0.42926025390625000000f,
-      0.49526977539062500000f,      0.55572509765625000000f,
-      0.61157226562500000000f,      0.67437744140625000000f,
-      0.73709106445312500000f,      0.79635620117187500000f,
-      0.86007690429687500000f,      0.91921997070312489000f,
-      0.03414916992187500000f,      0.06375122070312500000f,
-      0.13107299804687500000f,      0.19058227539062500000f,
-      0.26522827148437500000f,      0.32778930664062500000f,
-      0.38720703125000000000f,      0.45950317382812500000f,
-      0.51965332031250000000f,      0.57348632812500000000f,
-      0.63223266601562500000f,      0.68707275390625011000f,
-      0.74758911132812500000f,      0.81018066406250000000f,
-      0.87338256835937500000f,      0.93475341796875000000f,
-      0.04159545898437500000f,      0.07376098632812500000f,
-      0.11984252929687500000f,      0.16955566406249997000f,
-      0.22650146484375000000f,      0.28427124023437500000f,
-      0.36251831054687500000f,      0.42013549804687500000f,
-      0.49264526367187500000f,      0.56518554687500000000f,
-      0.62432861328125000000f,      0.68902587890625000000f,
-      0.74887084960937500000f,      0.80676269531250000000f,
-      0.86419677734375000000f,      0.92523193359375000000f,
-      0.03424072265625000000f,      0.07638549804687500000f,
-      0.15917968750000000000f,      0.21813964843750000000f,
-      0.28411865234375000000f,      0.33807373046874994000f,
-      0.40206909179687500000f,      0.45166015625000000000f,
-      0.51464843750000000000f,      0.57067871093750000000f,
-      0.62365722656250000000f,      0.68627929687499989000f,
-      0.74987792968750011000f,      0.81182861328125000000f,
-      0.87142944335937500000f,      0.92852783203125000000f,
-      0.01831054687500000000f,      0.04019165039062500700f,
-      0.09063720703125001400f,      0.17117309570312500000f,
-      0.23480224609375000000f,      0.29858398437500000000f,
-      0.37136840820312500000f,      0.42990112304687506000f,
-      0.49984741210937494000f,      0.56085205078125000000f,
-      0.62716674804687500000f,      0.69232177734375000000f,
-      0.75497436523437489000f,      0.81472778320312500000f,
-      0.87420654296875000000f,      0.92636108398437500000f,
-      0.02871704101562500000f,      0.05743408203125000000f,
-      0.13043212890625000000f,      0.16906738281250000000f,
-      0.25885009765625000000f,      0.30084228515625000000f,
-      0.36437988281250000000f,      0.43600463867187494000f,
-      0.49105834960937506000f,      0.56460571289062500000f,
-      0.62030029296875000000f,      0.69006347656250000000f,
-      0.75411987304687511000f,      0.81292724609374989000f,
-      0.87933349609375000000f,      0.92864990234375000000f,
-      0.01937866210937500000f,      0.05184936523437500000f,
-      0.13354492187500000000f,      0.18151855468750000000f,
-      0.24710083007812500000f,      0.30868530273437500000f,
-      0.37457275390625000000f,      0.43267822265625000000f,
-      0.49166870117187500000f,      0.54360961914062500000f,
-      0.60104370117187500000f,      0.66445922851562511000f,
-      0.73019409179687500000f,      0.78936767578124989000f,
-      0.85516357421875000000f,      0.91961669921875000000f,
-      0.04296874999999999300f,      0.06781005859375000000f,
-      0.10754394531250000000f,      0.17135620117187503000f,
-      0.22415161132812497000f,      0.27005004882812500000f,
-      0.33535766601562500000f,      0.38977050781250000000f,
-      0.46850585937500000000f,      0.51959228515625000000f,
-      0.57736206054687500000f,      0.64276123046875000000f,
-      0.71194458007812500000f,      0.76950073242187500000f,
-      0.83035278320312511000f,      0.88571166992187500000f,
-      0.02139282226562500000f,      0.03988647460937500000f,
-      0.10827636718750001000f,      0.19229125976562500000f,
-      0.23632812500000000000f,      0.29217529296875000000f,
-      0.34262084960937494000f,      0.39605712890625000000f,
-      0.46295166015625000000f,      0.53604125976562500000f,
-      0.60348510742187500000f,      0.67434692382812500000f,
-      0.73944091796875000000f,      0.80368041992187500000f,
-      0.86599731445312500000f,      0.92257690429687500000f,
-      0.05346679687500000700f,      0.07214355468750000000f,
-      0.14889526367187500000f,      0.20046997070312500000f,
-      0.23843383789062500000f,      0.29895019531250000000f,
-      0.34176635742187500000f,      0.43609619140625006000f,
-      0.48202514648437500000f,      0.54931640625000000000f,
-      0.62243652343750000000f,      0.68411254882812489000f,
-      0.74182128906250011000f,      0.79724121093750000000f,
-      0.86547851562500000000f,      0.93484497070312500000f,
-      0.02749633789062500000f,      0.04971313476562500000f,
-      0.10241699218749999000f,      0.14144897460937500000f,
-      0.22143554687500000000f,      0.26754760742187500000f,
-      0.30429077148437500000f,      0.35272216796875000000f,
-      0.46432495117187500000f,      0.53540039062500000000f,
-      0.59579467773437500000f,      0.66687011718750000000f,
-      0.72937011718750000000f,      0.79278564453125000000f,
-      0.85855102539062500000f,      0.92114257812500000000f,
-      0.02993774414062500000f,      0.05093383789062500000f,
-      0.10140991210937499000f,      0.14321899414062500000f,
-      0.18960571289062500000f,      0.26525878906250000000f,
-      0.32391357421875006000f,      0.39538574218750000000f,
-      0.46420288085937506000f,      0.54049682617187500000f,
-      0.60595703125000000000f,      0.67510986328124989000f,
-      0.74291992187500000000f,      0.81152343750000000000f,
-      0.87655639648437500000f,      0.93020629882812500000f,
-      0.04904174804687500000f,      0.07864379882812500000f,
-      0.12878417968750000000f,      0.16821289062499997000f,
-      0.26037597656250000000f,      0.31701660156250000000f,
-      0.35482788085937500000f,      0.41720581054687494000f,
-      0.48071289062500000000f,      0.52487182617187500000f,
-      0.60546875000000000000f,      0.66708374023437500000f,
-      0.71697998046875000000f,      0.78692626953125000000f,
-      0.85726928710937500000f,      0.91952514648437500000f,
-      0.02474975585937500000f,      0.04489135742187500000f,
-      0.09594726562500000000f,      0.15383911132812500000f,
-      0.22674560546875000000f,      0.28652954101562500000f,
-      0.34100341796875000000f,      0.40451049804687500000f,
-      0.46255493164062494000f,      0.51089477539062500000f,
-      0.59762573242187500000f,      0.67648315429687500000f,
-      0.73593139648437511000f,      0.79779052734375000000f,
-      0.86618041992187500000f,      0.92758178710937500000f,
-      0.04708862304687499300f,      0.06542968750000000000f,
-      0.11074829101562500000f,      0.19369506835937500000f,
-      0.22378540039062503000f,      0.28500366210937500000f,
-      0.32684326171875000000f,      0.41491699218750006000f,
-      0.46078491210937506000f,      0.52917480468750000000f,
-      0.61346435546875000000f,      0.66790771484375000000f,
-      0.72424316406250000000f,      0.78237915039062500000f,
-      0.84893798828125000000f,      0.91299438476562511000f,
-      0.01501464843750000000f,      0.03616333007812500000f,
-      0.08972167968750000000f,      0.16748046875000003000f,
-      0.21652221679687500000f,      0.26705932617187500000f,
-      0.35388183593749994000f,      0.41439819335937500000f,
-      0.48965454101562500000f,      0.54977416992187500000f,
-      0.61578369140625000000f,      0.67526245117187500000f,
-      0.74050903320312489000f,      0.80584716796875000000f,
-      0.86926269531250000000f,      0.92642211914062500000f,
-      0.04721069335937500000f,      0.06964111328125000000f,
-      0.11270141601562500000f,      0.19351196289062500000f,
-      0.23675537109374997000f,      0.29318237304687500000f,
-      0.36157226562500000000f,      0.40393066406250000000f,
-      0.50549316406250000000f,      0.55142211914062500000f,
-      0.60299682617187500000f,      0.65319824218750011000f,
-      0.73577880859375000000f,      0.81195068359375000000f,
-      0.87847900390625000000f,      0.93551635742187511000f,
-      0.02090454101562500000f,      0.04083251953125000000f,
-      0.10403442382812500000f,      0.16058349609375000000f,
-      0.21209716796875000000f,      0.28143310546875000000f,
-      0.34832763671875000000f,      0.44320678710937500000f,
-      0.49856567382812500000f,      0.54605102539062500000f,
-      0.59313964843750000000f,      0.64996337890625000000f,
-      0.71084594726562500000f,      0.76846313476562500000f,
-      0.85366821289062500000f,      0.93139648437500000000f,
-      0.02706909179687500300f,      0.04824829101562500000f,
-      0.09329223632812500000f,      0.13177490234375000000f,
-      0.21948242187500000000f,      0.26296997070312500000f,
-      0.30661010742187500000f,      0.39996337890625000000f,
-      0.49636840820312500000f,      0.54605102539062500000f,
-      0.61746215820312500000f,      0.68206787109375000000f,
-      0.74398803710937511000f,      0.80517578125000000000f,
-      0.86407470703125000000f,      0.92129516601562489000f,
-      0.06973266601562500000f,      0.11428833007812500000f,
-      0.17279052734375000000f,      0.23120117187500000000f,
-      0.28451538085937500000f,      0.34545898437500000000f,
-      0.40402221679687500000f,      0.46359252929687494000f,
-      0.52413940429687500000f,      0.58670043945312500000f,
-      0.64416503906250000000f,      0.70104980468750000000f,
-      0.75747680664062500000f,      0.81344604492187489000f,
-      0.87161254882812500000f,      0.92956542968750000000f,
-      0.04565429687500000700f,      0.06433105468750000000f,
-      0.10522460937500000000f,      0.21051025390625003000f,
-      0.25415039062500000000f,      0.29467773437500000000f,
-      0.34338378906250000000f,      0.39132690429687500000f,
-      0.45712280273437500000f,      0.50299072265625000000f,
-      0.55480957031250000000f,      0.61294555664062500000f,
-      0.70074462890624989000f,      0.76782226562500000000f,
-      0.84548950195312500000f,      0.90420532226562500000f,
-      0.01754760742187500000f,      0.03848266601562500000f,
-      0.11782836914062500000f,      0.20223999023437500000f,
-      0.25311279296875000000f,      0.32986450195312500000f,
-      0.38772583007812500000f,      0.45068359375000000000f,
-      0.52111816406250000000f,      0.58126831054687500000f,
-      0.64019775390624989000f,      0.70358276367187500000f,
-      0.76208496093750011000f,      0.81491088867187500000f,
-      0.87646484375000000000f,      0.92605590820312500000f,
-      0.05133056640625000000f,      0.06753540039062500000f,
-      0.11846923828125000000f,      0.19036865234374997000f,
-      0.21997070312500000000f,      0.29437255859375000000f,
-      0.33193969726562500000f,      0.40988159179687500000f,
-      0.45181274414062494000f,      0.49478149414062506000f,
-      0.54751586914062500000f,      0.63699340820312489000f,
-      0.71868896484375011000f,      0.78628540039062500000f,
-      0.84704589843750000000f,      0.89907836914062500000f,
-      0.02709960937500000000f,      0.04931640625000000000f,
-      0.11975097656250000000f,      0.15853881835937500000f,
-      0.21990966796875003000f,      0.26388549804687500000f,
-      0.30035400390625000000f,      0.35012817382812500000f,
-      0.49032592773437500000f,      0.55606079101562500000f,
-      0.62081909179687500000f,      0.69500732421875000000f,
-      0.74777221679687500000f,      0.80603027343750000000f,
-      0.85614013671875000000f,      0.90731811523437500000f,
-      0.02456665039062500000f,      0.04437255859375000000f,
-      0.08187866210937500000f,      0.13647460937500000000f,
-      0.24218750000000000000f,      0.28564453125000000000f,
-      0.34783935546875000000f,      0.43777465820312500000f,
-      0.49453735351562500000f,      0.54418945312500000000f,
-      0.59365844726562500000f,      0.66058349609375000000f,
-      0.72933959960937489000f,      0.79125976562500000000f,
-      0.86630249023437511000f,      0.92965698242187500000f,
-      0.05004882812500000000f,      0.07272338867187500000f,
-      0.10632324218750000000f,      0.15509033203125000000f,
-      0.18408203125000000000f,      0.26263427734375000000f,
-      0.35522460937499994000f,      0.39569091796875000000f,
-      0.48345947265625000000f,      0.53002929687500000000f,
-      0.59039306640625000000f,      0.64642333984375000000f,
-      0.72137451171875011000f,      0.79006958007812511000f,
-      0.86572265625000000000f,      0.92465209960937500000f,
-      0.04980468750000000000f,      0.06726074218750000000f,
-      0.13763427734375000000f,      0.23132324218750003000f,
-      0.26605224609375000000f,      0.32080078125000000000f,
-      0.36505126953125000000f,      0.43017578125000000000f,
-      0.47729492187500000000f,      0.52471923828125000000f,
-      0.58419799804687500000f,      0.67892456054687511000f,
-      0.74960327148437489000f,      0.81057739257812500000f,
-      0.87292480468750000000f,      0.93106079101562500000f,
-      0.06234741210937500000f,      0.07971191406250001400f,
-      0.12161254882812500000f,      0.20907592773437500000f,
-      0.24530029296875000000f,      0.29034423828125000000f,
-      0.33505249023437500000f,      0.39028930664062500000f,
-      0.47076416015625000000f,      0.51049804687500000000f,
-      0.57675170898437500000f,      0.61880493164062500000f,
-      0.69891357421875000000f,      0.79983520507812500000f,
-      0.87619018554687500000f,      0.93438720703125011000f,
-      0.06787109375000000000f,      0.08538818359375000000f,
-      0.13626098632812500000f,      0.16235351562500000000f,
-      0.21691894531249997000f,      0.28796386718750000000f,
-      0.33526611328125000000f,      0.40350341796875000000f,
-      0.44552612304687500000f,      0.55899047851562500000f,
-      0.61465454101562500000f,      0.66659545898437500000f,
-      0.72024536132812511000f,      0.78430175781250000000f,
-      0.86010742187500000000f,      0.93328857421875000000f,
-      0.02548217773437500000f,      0.04702758789062500000f,
-      0.12460327148437500000f,      0.17605590820312503000f,
-      0.22540283203125000000f,      0.28683471679687500000f,
-      0.33480834960937500000f,      0.38012695312500000000f,
-      0.45840454101562500000f,      0.56890869140625000000f,
-      0.63607788085937500000f,      0.70495605468750000000f,
-      0.77185058593750000000f,      0.82293701171875000000f,
-      0.88354492187500000000f,      0.92840576171875011000f,
-      0.05477905273437500000f,      0.07150268554687500000f,
-      0.14675903320312500000f,      0.17993164062500003000f,
-      0.21905517578125000000f,      0.26077270507812500000f,
-      0.31198120117187500000f,      0.40802001953125000000f,
-      0.44573974609375000000f,      0.50259399414062500000f,
-      0.55764770507812500000f,      0.63281250000000000000f,
-      0.72158813476562500000f,      0.80130004882812500000f,
-      0.86132812500000000000f,      0.92742919921875000000f,
-      0.05291748046875000000f,      0.06878662109375000000f,
-      0.12301635742187500000f,      0.15832519531250000000f,
-      0.19854736328125000000f,      0.24023437500000000000f,
-      0.29452514648437500000f,      0.39749145507812500000f,
-      0.44003295898437494000f,      0.52810668945312500000f,
-      0.59494018554687500000f,      0.67718505859374989000f,
-      0.74472045898437500000f,      0.80267333984375000000f,
-      0.86044311523437500000f,      0.92092895507812500000f,
-      0.05618286132812500000f,      0.07168579101562500000f,
-      0.12109375000000000000f,      0.14538574218750000000f,
-      0.19458007812500000000f,      0.29983520507812500000f,
-      0.33715820312500000000f,      0.40725708007812500000f,
-      0.44805908203125000000f,      0.49597167968750000000f,
-      0.55490112304687500000f,      0.65194702148437500000f,
-      0.72991943359375000000f,      0.79821777343750000000f,
-      0.85543823242187500000f,      0.91354370117187500000f,
-      0.04370117187500000000f,      0.06246948242187500000f,
-      0.17184448242187500000f,      0.21139526367187500000f,
-      0.25018310546875000000f,      0.29525756835937500000f,
-      0.34661865234375000000f,      0.41217041015625000000f,
-      0.45172119140625000000f,      0.50106811523437500000f,
-      0.55966186523437500000f,      0.67196655273437500000f,
-      0.73620605468750000000f,      0.79885864257812500000f,
-      0.85845947265625000000f,      0.93341064453125000000f,
-      0.05279541015625000700f,      0.07080078125000000000f,
-      0.11425781250000000000f,      0.14672851562500000000f,
-      0.18331909179687500000f,      0.29498291015625000000f,
-      0.33560180664062500000f,      0.41571044921875000000f,
-      0.46490478515625000000f,      0.53390502929687500000f,
-      0.61303710937500000000f,      0.67144775390625000000f,
-      0.72030639648437500000f,      0.77514648437500000000f,
-      0.83554077148437489000f,      0.89276123046875000000f,
-      0.03866577148437500000f,      0.05844116210937500000f,
-      0.16732788085937503000f,      0.20788574218750000000f,
-      0.25112915039062500000f,      0.30270385742187500000f,
-      0.35366821289062494000f,      0.40701293945312500000f,
-      0.45004272460937506000f,      0.54824829101562500000f,
-      0.62719726562500000000f,      0.67648315429687500000f,
-      0.74826049804687500000f,      0.81845092773437500000f,
-      0.88143920898437500000f,      0.93511962890625000000f,
-      0.04656982421875000000f,      0.06802368164062500000f,
-      0.12939453125000000000f,      0.22546386718750000000f,
-      0.27322387695312500000f,      0.31890869140625000000f,
-      0.36312866210937500000f,      0.41864013671875006000f,
-      0.51455688476562500000f,      0.55917358398437500000f,
-      0.62191772460937500000f,      0.69189453125000000000f,
-      0.75674438476562500000f,      0.82110595703125000000f,
-      0.88214111328124989000f,      0.93450927734375000000f,
-      0.06637573242187500000f,      0.08517456054687500000f,
-      0.12524414062500000000f,      0.20980834960937500000f,
-      0.26281738281250000000f,      0.29901123046875000000f,
-      0.37084960937500000000f,      0.41308593750000000000f,
-      0.47677612304687500000f,      0.53961181640625000000f,
-      0.58633422851562500000f,      0.64270019531250000000f,
-      0.74407958984375000000f,      0.81665039062499989000f,
-      0.87380981445312500000f,      0.92309570312500000000f,
-      0.01385498046875000000f,      0.03756713867187500000f,
-      0.13241577148437500000f,      0.17510986328125000000f,
-      0.23040771484375000000f,      0.27484130859375000000f,
-      0.31494140625000000000f,      0.41275024414062506000f,
-      0.48843383789062500000f,      0.54470825195312500000f,
-      0.61251831054687500000f,      0.67114257812500000000f,
-      0.73086547851562500000f,      0.79476928710937500000f,
-      0.86196899414062511000f,      0.92086791992187489000f,
-      0.06866455078125000000f,      0.08517456054687500000f,
-      0.12908935546875000000f,      0.16122436523437500000f,
-      0.20635986328125000000f,      0.32369995117187506000f,
-      0.36251831054687500000f,      0.42178344726562500000f,
-      0.48208618164062494000f,      0.52685546875000000000f,
-      0.61123657226562500000f,      0.67950439453125000000f,
-      0.75036621093750000000f,      0.80679321289062500000f,
-      0.86193847656250000000f,      0.92831420898437489000f,
-      0.05175781250000000000f,      0.06762695312500000000f,
-      0.13146972656250000000f,      0.25588989257812500000f,
-      0.29803466796875000000f,      0.33660888671875000000f,
-      0.38317871093750000000f,      0.43026733398437500000f,
-      0.49810791015625000000f,      0.53833007812500000000f,
-      0.58489990234375000000f,      0.62835693359375000000f,
-      0.73141479492187489000f,      0.81964111328125000000f,
-      0.87884521484375000000f,      0.93267822265625000000f,
-      0.07482910156250000000f,      0.09875488281250000000f,
-      0.13333129882812500000f,      0.18670654296875000000f,
-      0.21838378906250000000f,      0.27474975585937500000f,
-      0.35122680664062500000f,      0.39050292968750000000f,
-      0.48062133789062506000f,      0.52767944335937500000f,
-      0.59481811523437500000f,      0.67874145507812500000f,
-      0.74859619140625000000f,      0.80792236328125000000f,
-      0.86282348632812489000f,      0.91775512695312511000f,
-      0.05526733398437500000f,      0.07754516601562500000f,
-      0.10848999023437500000f,      0.16723632812500000000f,
-      0.27841186523437500000f,      0.32125854492187500000f,
-      0.36297607421875000000f,      0.41683959960937500000f,
-      0.46575927734374994000f,      0.51571655273437500000f,
-      0.59100341796875000000f,      0.64297485351562511000f,
-      0.69256591796875000000f,      0.74200439453125000000f,
-      0.83178710937500000000f,      0.91500854492187500000f,
-      0.04739379882812500000f,      0.06854248046875000000f,
-      0.13912963867187500000f,      0.16784667968749997000f,
-      0.20611572265625003000f,      0.24029541015625000000f,
-      0.35824584960937500000f,      0.41415405273437500000f,
-      0.46350097656250000000f,      0.54562377929687500000f,
-      0.61892700195312500000f,      0.68695068359375000000f,
-      0.75115966796875000000f,      0.81326293945312500000f,
-      0.87847900390625000000f,      0.93856811523437500000f,
-      0.06048583984375000000f,      0.08447265625000000000f,
-      0.11700439453125001000f,      0.18200683593750000000f,
-      0.26647949218750000000f,      0.30236816406250000000f,
-      0.36001586914062500000f,      0.45205688476562500000f,
-      0.49777221679687506000f,      0.54766845703125000000f,
-      0.64382934570312500000f,      0.69735717773437500000f,
-      0.74633789062500000000f,      0.80273437500000000000f,
-      0.85955810546875000000f,      0.90805053710937511000f,
-      0.05566406250000000000f,      0.07717895507812500000f,
-      0.11648559570312500000f,      0.16629028320312500000f,
-      0.20916748046875003000f,      0.26593017578125000000f,
-      0.31680297851562500000f,      0.37493896484375006000f,
-      0.43316650390625000000f,      0.48138427734375000000f,
-      0.59582519531250000000f,      0.65228271484375000000f,
-      0.72311401367187500000f,      0.79556274414062500000f,
-      0.85742187500000000000f,      0.92199707031250011000f,
-      0.06750488281250000000f,      0.08709716796875001400f,
-      0.12045288085937500000f,      0.17999267578125000000f,
-      0.30303955078125000000f,      0.35266113281250000000f,
-      0.39227294921875000000f,      0.45129394531249994000f,
-      0.49829101562500006000f,      0.54016113281250000000f,
-      0.62014770507812500000f,      0.67437744140625000000f,
-      0.72241210937500011000f,      0.77182006835937500000f,
-      0.82324218750000011000f,      0.87237548828125000000f,
-      0.06173706054687500000f,      0.07931518554687500000f,
-      0.12280273437500000000f,      0.15002441406250000000f,
-      0.20181274414062500000f,      0.34024047851562494000f,
-      0.38015747070312500000f,      0.44635009765625000000f,
-      0.49804687500000000000f,      0.54388427734375000000f,
-      0.60037231445312500000f,      0.64611816406250000000f,
-      0.70541381835937500000f,      0.79501342773437500000f,
-      0.87966918945312500000f,      0.93865966796875000000f,
-      0.04968261718750000700f,      0.06732177734375000000f,
-      0.10580444335937500000f,      0.13317871093750000000f,
-      0.26486206054687500000f,      0.31045532226562500000f,
-      0.36206054687500000000f,      0.41744995117187500000f,
-      0.45770263671874994000f,      0.51690673828125000000f,
-      0.58615112304687500000f,      0.65197753906249989000f,
-      0.72784423828125000000f,      0.79696655273437500000f,
-      0.85827636718750000000f,      0.92385864257812500000f,
-      0.06146240234375000000f,      0.07943725585937500000f,
-      0.12554931640625000000f,      0.22137451171875000000f,
-      0.25988769531250000000f,      0.30648803710937500000f,
-      0.36077880859375000000f,      0.41207885742187500000f,
-      0.49832153320312500000f,      0.54400634765625000000f,
-      0.60110473632812500000f,      0.64941406250000000000f,
-      0.70651245117187500000f,      0.75259399414062500000f,
-      0.81808471679687500000f,      0.92044067382812511000f,
-      0.07250976562500000000f,      0.09094238281250000000f,
-      0.13494873046875000000f,      0.17608642578125000000f,
-      0.21411132812500000000f,      0.29672241210937500000f,
-      0.33950805664062506000f,      0.41247558593750000000f,
-      0.47256469726562506000f,      0.51834106445312500000f,
-      0.58471679687500000000f,      0.62826538085937500000f,
-      0.74465942382812500000f,      0.82946777343750000000f,
-      0.88641357421875000000f,      0.93527221679687500000f,
-      0.07489013671875000000f,      0.10687255859375000000f,
-      0.14111328125000000000f,      0.18368530273437500000f,
-      0.23291015625000000000f,      0.27005004882812500000f,
-      0.32934570312500000000f,      0.42614746093750000000f,
-      0.47372436523437500000f,      0.52139282226562500000f,
-      0.59848022460937500000f,      0.64813232421875000000f,
-      0.69750976562500000000f,      0.76623535156249989000f,
-      0.85772705078125011000f,      0.91217041015625000000f,
-      0.04800415039062500700f,      0.06939697265625000000f,
-      0.10095214843750000000f,      0.18307495117187500000f,
-      0.27395629882812500000f,      0.30834960937500000000f,
-      0.38015747070312500000f,      0.43511962890625000000f,
-      0.48062133789062506000f,      0.55480957031250000000f,
-      0.60955810546875000000f,      0.64859008789062500000f,
-      0.70327758789062500000f,      0.76470947265625000000f,
-      0.84658813476562500000f,      0.92514038085937500000f,
-      0.05929565429687500000f,      0.08331298828125000000f,
-      0.12634277343750000000f,      0.18798828125000003000f,
-      0.22860717773437500000f,      0.27423095703125000000f,
-      0.34512329101562500000f,      0.38986206054687500000f,
-      0.45227050781250000000f,      0.50531005859375000000f,
-      0.54653930664062500000f,      0.60293579101562500000f,
-      0.65649414062500011000f,      0.72036743164062500000f,
-      0.83233642578124989000f,      0.90109252929687500000f,
-      0.06167602539062500000f,      0.07879638671875000000f,
-      0.13714599609375000000f,      0.17807006835937503000f,
-      0.21340942382812497000f,      0.25161743164062500000f,
-      0.29989624023437500000f,      0.44961547851562500000f,
-      0.50238037109375000000f,      0.54608154296875000000f,
-      0.59957885742187500000f,      0.64340209960937489000f,
-      0.72521972656250000000f,      0.81381225585937500000f,
-      0.88720703125000000000f,      0.94573974609375000000f,
-      0.03210449218750000000f,      0.05416870117187500000f,
-      0.09820556640624998600f,      0.13360595703125000000f,
-      0.23394775390625000000f,      0.28695678710937500000f,
-      0.34326171875000000000f,      0.40670776367187500000f,
-      0.45690917968750000000f,      0.54815673828125000000f,
-      0.63348388671875000000f,      0.68218994140625000000f,
-      0.76510620117187500000f,      0.83035278320312511000f,
-      0.88504028320312500000f,      0.93411254882812489000f,
-      0.06768798828125000000f,      0.08746337890624998600f,
-      0.12887573242187500000f,      0.16333007812500000000f,
-      0.20083618164062500000f,      0.30456542968750000000f,
-      0.35360717773437500000f,      0.40042114257812500000f,
-      0.46365356445312500000f,      0.50607299804687500000f,
-      0.56109619140625000000f,      0.61279296875000000000f,
-      0.67178344726562500000f,      0.77261352539062500000f,
-      0.85836791992187500000f,      0.91186523437500011000f,
-      0.06549072265625000000f,      0.08666992187500000000f,
-      0.13418579101562500000f,      0.17822265625000000000f,
-      0.22732543945312500000f,      0.26614379882812500000f,
-      0.32080078125000000000f,      0.36425781250000000000f,
-      0.41488647460937500000f,      0.52651977539062500000f,
-      0.58929443359375000000f,      0.63754272460937500000f,
-      0.71463012695312500000f,      0.78207397460937500000f,
-      0.84683227539062500000f,      0.92257690429687500000f,
-      0.06018066406250000000f,      0.07992553710937500000f,
-      0.11462402343750000000f,      0.19430541992187500000f,
-      0.23318481445312503000f,      0.26898193359375000000f,
-      0.37493896484375006000f,      0.42016601562500000000f,
-      0.46719360351562506000f,      0.55041503906250000000f,
-      0.59683227539062500000f,      0.63793945312500000000f,
-      0.68914794921875011000f,      0.75915527343750000000f,
-      0.84838867187500000000f,      0.92895507812500000000f,
-      0.06118774414062500000f,      0.07864379882812500000f,
-      0.13037109375000000000f,      0.22500610351562500000f,
-      0.26116943359375000000f,      0.31198120117187500000f,
-      0.35919189453125000000f,      0.40899658203125000000f,
-      0.50360107421875000000f,      0.54931640625000000000f,
-      0.59951782226562500000f,      0.64404296875000000000f,
-      0.70159912109375000000f,      0.81805419921875000000f,
-      0.90042114257812489000f,      0.94427490234375000000f,
-      0.03518676757812500000f,      0.05560302734375000000f,
-      0.11364746093750001000f,      0.16610717773437500000f,
-      0.21331787109375000000f,      0.26556396484375000000f,
-      0.31399536132812500000f,      0.36312866210937500000f,
-      0.42285156250000000000f,      0.46737670898437500000f,
-      0.53713989257812500000f,      0.64282226562500000000f,
-      0.72302246093750011000f,      0.79598999023437500000f,
-      0.87237548828125000000f,      0.93502807617187500000f,
-      0.03979492187500000000f,      0.05703735351562500000f,
-      0.10125732421875000000f,      0.21957397460937500000f,
-      0.29336547851562500000f,      0.32754516601562500000f,
-      0.37820434570312500000f,      0.41894531250000000000f,
-      0.48284912109375000000f,      0.53326416015625000000f,
-      0.57623291015625000000f,      0.63146972656250000000f,
-      0.70538330078125000000f,      0.77941894531250000000f,
-      0.84484863281250000000f,      0.89245605468750011000f,
-      0.06387329101562500000f,      0.08212280273437500000f,
-      0.12261962890625000000f,      0.20318603515625000000f,
-      0.24252319335937500000f,      0.27914428710937500000f,
-      0.32034301757812500000f,      0.36257934570312500000f,
-      0.48486328125000006000f,      0.54385375976562500000f,
-      0.58999633789062500000f,      0.64797973632812500000f,
-      0.71322631835937489000f,      0.77008056640625000000f,
-      0.84085083007812500000f,      0.91546630859375000000f,
-      0.01754760742187500000f,      0.04061889648437499300f,
-      0.16186523437500000000f,      0.21087646484374997000f,
-      0.25711059570312500000f,      0.30780029296875000000f,
-      0.35330200195312500000f,      0.41192626953125006000f,
-      0.50183105468750000000f,      0.56539916992187500000f,
-      0.62759399414062500000f,      0.69723510742187500000f,
-      0.76031494140625000000f,      0.81457519531249989000f,
-      0.87765502929687500000f,      0.92031860351562500000f,
-      0.04379272460937500000f,      0.06176757812500000000f,
-      0.10018920898437500000f,      0.12683105468750000000f,
-      0.23226928710937500000f,      0.32324218750000000000f,
-      0.36770629882812506000f,      0.42501831054687500000f,
-      0.47177124023437500000f,      0.56192016601562500000f,
-      0.62545776367187500000f,      0.67962646484375000000f,
-      0.73919677734375000000f,      0.79629516601562489000f,
-      0.85647583007812500000f,      0.91854858398437500000f,
-      0.04980468750000000000f,      0.06616210937500000000f,
-      0.16906738281250000000f,      0.22821044921875000000f,
-      0.26336669921875000000f,      0.31710815429687500000f,
-      0.35534667968750000000f,      0.43704223632812494000f,
-      0.48037719726562500000f,      0.52969360351562500000f,
-      0.57238769531250000000f,      0.62359619140625000000f,
-      0.69577026367187500000f,      0.79528808593750000000f,
-      0.87103271484375000000f,      0.93676757812500000000f,
-      0.04293823242187500000f,      0.06851196289062500000f,
-      0.10391235351562501000f,      0.17208862304687500000f,
-      0.28744506835937500000f,      0.32608032226562506000f,
-      0.36938476562500000000f,      0.41183471679687494000f,
-      0.47409057617187500000f,      0.56021118164062500000f,
-      0.61022949218750000000f,      0.66189575195312500000f,
-      0.74313354492187500000f,      0.81024169921874989000f,
-      0.88052368164062500000f,      0.93273925781250011000f,
-      0.05111694335937500700f,      0.06793212890625000000f,
-      0.12222290039062501000f,      0.25094604492187500000f,
-      0.30441284179687500000f,      0.34042358398437500000f,
-      0.39129638671875000000f,      0.43688964843750000000f,
-      0.50366210937500000000f,      0.55349731445312500000f,
-      0.59735107421875000000f,      0.64239501953125000000f,
-      0.69454956054687500000f,      0.76025390625000000000f,
-      0.86352539062500011000f,      0.93487548828125000000f,
-      0.03295898437500000000f,      0.04925537109375000000f,
-      0.11053466796875000000f,      0.23086547851562497000f,
-      0.26696777343750000000f,      0.31442260742187500000f,
-      0.35745239257812500000f,      0.42260742187500000000f,
-      0.47708129882812500000f,      0.53204345703125000000f,
-      0.60305786132812500000f,      0.66604614257812500000f,
-      0.71932983398437500000f,      0.77493286132812500000f,
-      0.83636474609375000000f,      0.88693237304687500000f,
-      0.05166625976562500000f,      0.06802368164062500000f,
-      0.10546875000000000000f,      0.13287353515625000000f,
-      0.17303466796875000000f,      0.33233642578125000000f,
-      0.38339233398437500000f,      0.43234252929687500000f,
-      0.48458862304687500000f,      0.53030395507812500000f,
-      0.60476684570312500000f,      0.67050170898437500000f,
-      0.73529052734375000000f,      0.79745483398437500000f,
-      0.86358642578125000000f,      0.91854858398437500000f,
-      0.06231689453125000000f,      0.09030151367187501400f,
-      0.12802124023437500000f,      0.17517089843750000000f,
-      0.21685791015625000000f,      0.25228881835937500000f,
-      0.33953857421875000000f,      0.45693969726562500000f,
-      0.51617431640625000000f,      0.55831909179687500000f,
-      0.62658691406250000000f,      0.67083740234375000000f,
-      0.72360229492187500000f,      0.78640747070312500000f,
-      0.84255981445312511000f,      0.89572143554687500000f,
-      0.03002929687500000000f,      0.04919433593750000000f,
-      0.11621093750000000000f,      0.16067504882812500000f,
-      0.21011352539062500000f,      0.25668334960937500000f,
-      0.29135131835937500000f,      0.33230590820312500000f,
-      0.38214111328125000000f,      0.50415039062500000000f,
-      0.59658813476562500000f,      0.66036987304687500000f,
-      0.72467041015625011000f,      0.79522705078125000000f,
-      0.86395263671874989000f,      0.92694091796875011000f,
-      0.06213378906250000000f,      0.07745361328125000000f,
-      0.12713623046875000000f,      0.23684692382812500000f,
-      0.27911376953125000000f,      0.31774902343750000000f,
-      0.37060546875000006000f,      0.41531372070312500000f,
-      0.47570800781250000000f,      0.52395629882812500000f,
-      0.56637573242187500000f,      0.61380004882812500000f,
-      0.66589355468750000000f,      0.74197387695312500000f,
-      0.85537719726562489000f,      0.93420410156249989000f,
-      0.05709838867187500000f,      0.07186889648437500000f,
-      0.12393188476562500000f,      0.15695190429687500000f,
-      0.22778320312500000000f,      0.30911254882812500000f,
-      0.36441040039062506000f,      0.45779418945312506000f,
-      0.50903320312500000000f,      0.56011962890625000000f,
-      0.60903930664062500000f,      0.67990112304687500000f,
-      0.75869750976562489000f,      0.82006835937500000000f,
-      0.88464355468750000000f,      0.93429565429687511000f,
-      0.07830810546875000000f,      0.09646606445312500000f,
-      0.14169311523437500000f,      0.19003295898437500000f,
-      0.22601318359375000000f,      0.30426025390625000000f,
-      0.35455322265625000000f,      0.40942382812500000000f,
-      0.48489379882812500000f,      0.52990722656250000000f,
-      0.58352661132812500000f,      0.63528442382812500000f,
-      0.68945312500000000000f,      0.75439453125000000000f,
-      0.87686157226562489000f,      0.94854736328125000000f,
-      0.05187988281249999300f,      0.07101440429687500000f,
-      0.14733886718750000000f,      0.18124389648437500000f,
-      0.23092651367187500000f,      0.27935791015625000000f,
-      0.33834838867187500000f,      0.38973999023437500000f,
-      0.43362426757812506000f,      0.49197387695312500000f,
-      0.61712646484375000000f,      0.69186401367187500000f,
-      0.75219726562500000000f,      0.81347656250000000000f,
-      0.87573242187499989000f,      0.93826293945312500000f,
-      0.09671020507812500000f,      0.11819458007812501000f,
-      0.15399169921875000000f,      0.20959472656250000000f,
-      0.24975585937500000000f,      0.28930664062500000000f,
-      0.37643432617187500000f,      0.42932128906250000000f,
-      0.48138427734375000000f,      0.54843139648437500000f,
-      0.61740112304687500000f,      0.66256713867187500000f,
-      0.71777343750000000000f,      0.77041625976562500000f,
-      0.82476806640625000000f,      0.87677001953124989000f,
-      0.04772949218750000000f,      0.07296752929687500000f,
-      0.12905883789062500000f,      0.20538330078125000000f,
-      0.27175903320312500000f,      0.31918334960937500000f,
-      0.39752197265625000000f,      0.45877075195312500000f,
-      0.52688598632812500000f,      0.60452270507812500000f,
-      0.66677856445312500000f,      0.72451782226562500000f,
-      0.77789306640625000000f,      0.83349609375000000000f,
-      0.88687133789062500000f,      0.93161010742187511000f,
-      0.08740234375000000000f,      0.10861206054687501000f,
-      0.14401245117187500000f,      0.19656372070312503000f,
-      0.29272460937500000000f,      0.33737182617187500000f,
-      0.38949584960937500000f,      0.45117187500000000000f,
-      0.50134277343750000000f,      0.55432128906250000000f,
-      0.62518310546875000000f,      0.67938232421875000000f,
-      0.73800659179687511000f,      0.80148315429687500000f,
-      0.86618041992187500000f,      0.92236328125000000000f,
-      0.08157348632812498600f,      0.10525512695312501000f,
-      0.13980102539062500000f,      0.18258666992187500000f,
-      0.20944213867187500000f,      0.25363159179687500000f,
-      0.38037109375000000000f,      0.42453002929687506000f,
-      0.48028564453125000000f,      0.54293823242187500000f,
-      0.59252929687500000000f,      0.64642333984375000000f,
-      0.73318481445312500000f,      0.81057739257812500000f,
-      0.87655639648437500000f,      0.92895507812500000000f,
-      0.07382202148437500000f,      0.09304809570312500000f,
-      0.13043212890625000000f,      0.19482421875000000000f,
-      0.26135253906250000000f,      0.29483032226562500000f,
-      0.34448242187499994000f,      0.38684082031250000000f,
-      0.44088745117187500000f,      0.53643798828125000000f,
-      0.60473632812500000000f,      0.64791870117187511000f,
-      0.70492553710937500000f,      0.77117919921874989000f,
-      0.82089233398437500000f,      0.88275146484374989000f,
-      0.03900146484375000000f,      0.06106567382812500000f,
-      0.09155273437500000000f,      0.16336059570312500000f,
-      0.30502319335937500000f,      0.35940551757812500000f,
-      0.39727783203125000000f,      0.44464111328125000000f,
-      0.48980712890625000000f,      0.54205322265625000000f,
-      0.60980224609375000000f,      0.65969848632812511000f,
-      0.71322631835937489000f,      0.76547241210937500000f,
-      0.84399414062500000000f,      0.92077636718749989000f,
-      0.02844238281250000000f,      0.04956054687500000000f,
-      0.08538818359375000000f,      0.13946533203125000000f,
-      0.26220703125000000000f,      0.30480957031250000000f,
-      0.35253906249999994000f,      0.39825439453125000000f,
-      0.51638793945312500000f,      0.56997680664062500000f,
-      0.62301635742187500000f,      0.69610595703125000000f,
-      0.75735473632812500000f,      0.81845092773437500000f,
-      0.87902832031250011000f,      0.92727661132812489000f,
-      0.07092285156250000000f,      0.09072875976562500000f,
-      0.12683105468750000000f,      0.17401123046875000000f,
-      0.21115112304687500000f,      0.26873779296875000000f,
-      0.31307983398437500000f,      0.38156127929687494000f,
-      0.45822143554687494000f,      0.50558471679687500000f,
-      0.59259033203125000000f,      0.65231323242187500000f,
-      0.70016479492187500000f,      0.74920654296875000000f,
-      0.82470703124999989000f,      0.91091918945312500000f,
-      0.04772949218750000000f,      0.07241821289062500000f,
-      0.10543823242187499000f,      0.14974975585937500000f,
-      0.18234252929687500000f,      0.22692871093750000000f,
-      0.35968017578125000000f,      0.44265747070312500000f,
-      0.49154663085937500000f,      0.55383300781250000000f,
-      0.61093139648437500000f,      0.66079711914062500000f,
-      0.72448730468749989000f,      0.78778076171875000000f,
-      0.87213134765625000000f,      0.92687988281250000000f,
-      0.09231567382812501400f,      0.11380004882812500000f,
-      0.14849853515625000000f,      0.19897460937500000000f,
-      0.28952026367187500000f,      0.33395385742187500000f,
-      0.37713623046875000000f,      0.43511962890625000000f,
-      0.49359130859375000000f,      0.53408813476562500000f,
-      0.59436035156250000000f,      0.65332031250000000000f,
-      0.70883178710937500000f,      0.76007080078125000000f,
-      0.83456420898437500000f,      0.89743041992187500000f,
-      0.03875732421875000000f,      0.05996704101562500000f,
-      0.20758056640625000000f,      0.24398803710937500000f,
-      0.28088378906250000000f,      0.33044433593750000000f,
-      0.38168334960937500000f,      0.43426513671875000000f,
-      0.48092651367187500000f,      0.54504394531250000000f,
-      0.62161254882812500000f,      0.68670654296875000000f,
-      0.75173950195312500000f,      0.80914306640625000000f,
-      0.87081909179687500000f,      0.93154907226562500000f,
-      0.06744384765625000000f,      0.08389282226562500000f,
-      0.13018798828125000000f,      0.22848510742187503000f,
-      0.30145263671875000000f,      0.33624267578125000000f,
-      0.39132690429687500000f,      0.44039916992187500000f,
-      0.49581909179687494000f,      0.56842041015625000000f,
-      0.62408447265625000000f,      0.67303466796875011000f,
-      0.72445678710937500000f,      0.77182006835937500000f,
-      0.82623291015625000000f,      0.89016723632812500000f,
-      0.03890991210937500000f,      0.05877685546875000000f,
-      0.13214111328125000000f,      0.20059204101562503000f,
-      0.25759887695312500000f,      0.33325195312500000000f,
-      0.40466308593750000000f,      0.45800781249999994000f,
-      0.51657104492187500000f,      0.56680297851562500000f,
-      0.63000488281250000000f,      0.67800903320312500000f,
-      0.73190307617187500000f,      0.77740478515625000000f,
-      0.83532714843750000000f,      0.87417602539062489000f,
-      0.09201049804687500000f,      0.11199951171875000000f,
-      0.15521240234375000000f,      0.19445800781250000000f,
-      0.24072265625000000000f,      0.28408813476562500000f,
-      0.33465576171875006000f,      0.38580322265624994000f,
-      0.44235229492187500000f,      0.49353027343750000000f,
-      0.55175781250000000000f,      0.60949707031250000000f,
-      0.68524169921874989000f,      0.75985717773437500000f,
-      0.83502197265624989000f,      0.91476440429687500000f,
-      0.08795166015625001400f,      0.11392211914062500000f,
-      0.15603637695312500000f,      0.19781494140625000000f,
-      0.24795532226562503000f,      0.29556274414062500000f,
-      0.35394287109375000000f,      0.40551757812500006000f,
-      0.47012329101562500000f,      0.52465820312500000000f,
-      0.61578369140625000000f,      0.68438720703125011000f,
-      0.75686645507812500000f,      0.82440185546875000000f,
-      0.89147949218750000000f,      0.94027709960937511000f,
-      0.07019042968750000000f,      0.09057617187500000000f,
-      0.12515258789062500000f,      0.16607666015625000000f,
-      0.19308471679687500000f,      0.24139404296875000000f,
-      0.38009643554687500000f,      0.42303466796875000000f,
-      0.48056030273437500000f,      0.53421020507812500000f,
-      0.58145141601562500000f,      0.63107299804687500000f,
-      0.69015502929687500000f,      0.75250244140625000000f,
-      0.83920288085937500000f,      0.91751098632812500000f,
-      0.06887817382812500000f,      0.08972167968750000000f,
-      0.13519287109375000000f,      0.18283081054687497000f,
-      0.21490478515624997000f,      0.25524902343750000000f,
-      0.28729248046875000000f,      0.34252929687500000000f,
-      0.47982788085937500000f,      0.53161621093750000000f,
-      0.58755493164062500000f,      0.65518188476562489000f,
-      0.72982788085937500000f,      0.79507446289062500000f,
-      0.86761474609375000000f,      0.92724609375000000000f,
-      0.03744506835937500000f,      0.06240844726562500000f,
-      0.11651611328124999000f,      0.15292358398437500000f,
-      0.21331787109375000000f,      0.28170776367187500000f,
-      0.33642578124999994000f,      0.39706420898437494000f,
-      0.52920532226562500000f,      0.58035278320312500000f,
-      0.62814331054687500000f,      0.69577026367187500000f,
-      0.76889038085937500000f,      0.82019042968750000000f,
-      0.89572143554687500000f,      0.94009399414062489000f,
-      0.04132080078125000000f,      0.05871582031250000000f,
-      0.11563110351562500000f,      0.24649047851562500000f,
-      0.31900024414062500000f,      0.35519409179687500000f,
-      0.40747070312500000000f,      0.45217895507812500000f,
-      0.51095581054687500000f,      0.55508422851562500000f,
-      0.61325073242187500000f,      0.67181396484374989000f,
-      0.75051879882812500000f,      0.81411743164062500000f,
-      0.87423706054687500000f,      0.92333984375000000000f,
-      0.09588623046875000000f,      0.12356567382812501000f,
-      0.18911743164062500000f,      0.22634887695312500000f,
-      0.26712036132812500000f,      0.30993652343750000000f,
-      0.35195922851562500000f,      0.40225219726562500000f,
-      0.48666381835937500000f,      0.53878784179687500000f,
-      0.59832763671875000000f,      0.65313720703125000000f,
-      0.71676635742187500000f,      0.78305053710937511000f,
-      0.85824584960937511000f,      0.92480468750000000000f,
-      0.04019165039062500700f,      0.06906127929687500000f,
-      0.14419555664062500000f,      0.23226928710937500000f,
-      0.29501342773437500000f,      0.35504150390625000000f,
-      0.43161010742187500000f,      0.49615478515625000000f,
-      0.57141113281250000000f,      0.63165283203125000000f,
-      0.68295288085937500000f,      0.73263549804687511000f,
-      0.78659057617187489000f,      0.83163452148437500000f,
-      0.88287353515625000000f,      0.93362426757812500000f,
-      0.04791259765625000000f,      0.07089233398437500000f,
-      0.11651611328124999000f,      0.18966674804687500000f,
-      0.30191040039062500000f,      0.35266113281250000000f,
-      0.39886474609375000000f,      0.44650268554687500000f,
-      0.49291992187500006000f,      0.55816650390625000000f,
-      0.65264892578125000000f,      0.71246337890625000000f,
-      0.76641845703125011000f,      0.82162475585937500000f,
-      0.87622070312500000000f,      0.92065429687500000000f,
-      0.07009887695312500000f,      0.11917114257812500000f,
-      0.19186401367187503000f,      0.26116943359375000000f,
-      0.32556152343750006000f,      0.38958740234375000000f,
-      0.45834350585937500000f,      0.52191162109375000000f,
-      0.58093261718750000000f,      0.63101196289062500000f,
-      0.68179321289062500000f,      0.72848510742187500000f,
-      0.77752685546875000000f,      0.82656860351562500000f,
-      0.88046264648437500000f,      0.93139648437500000000f,
-      0.05844116210937500000f,      0.07650756835937500000f,
-      0.12307739257812499000f,      0.17544555664062500000f,
-      0.21542358398437497000f,      0.27072143554687500000f,
-      0.32528686523437500000f,      0.37225341796875006000f,
-      0.42532348632812500000f,      0.46945190429687500000f,
-      0.51480102539062500000f,      0.57089233398437500000f,
-      0.70724487304687489000f,      0.78790283203125011000f,
-      0.87017822265625000000f,      0.93081665039062500000f,
-      0.07336425781250000000f,      0.08905029296875000000f,
-      0.15838623046875000000f,      0.19079589843750000000f,
-      0.22662353515625003000f,      0.30172729492187500000f,
-      0.37802124023437500000f,      0.45150756835937494000f,
-      0.51129150390625000000f,      0.56054687500000000000f,
-      0.62066650390625000000f,      0.67147827148437511000f,
-      0.73962402343750000000f,      0.80737304687500000000f,
-      0.86944580078125000000f,      0.92764282226562500000f,
-      0.04946899414062500000f,      0.06796264648437500000f,
-      0.10617065429687500000f,      0.15518188476562500000f,
-      0.28762817382812500000f,      0.39343261718750006000f,
-      0.43475341796875006000f,      0.47766113281250000000f,
-      0.52505493164062500000f,      0.56988525390625000000f,
-      0.62396240234375000000f,      0.67776489257812500000f,
-      0.72564697265625000000f,      0.78939819335937500000f,
-      0.85238647460937500000f,      0.91836547851562500000f,
-      0.05703735351562500000f,      0.07293701171875000000f,
-      0.12527465820312500000f,      0.21426391601562500000f,
-      0.34243774414062500000f,      0.38986206054687500000f,
-      0.42904663085937500000f,      0.47576904296875006000f,
-      0.51953125000000000000f,      0.56787109375000000000f,
-      0.62850952148437500000f,      0.67367553710937500000f,
-      0.72171020507812489000f,      0.76763916015625000000f,
-      0.82135009765625000000f,      0.87496948242187500000f,
-      0.07785034179687500000f,      0.09924316406250000000f,
-      0.14306640625000000000f,      0.20025634765625000000f,
-      0.24014282226562500000f,      0.27847290039062500000f,
-      0.31967163085937506000f,      0.36010742187500000000f,
-      0.47003173828125000000f,      0.57312011718750000000f,
-      0.64062500000000000000f,      0.68832397460937500000f,
-      0.74124145507812500000f,      0.79248046874999989000f,
-      0.83816528320312500000f,      0.89208984375000000000f,
-      0.08255004882812500000f,      0.10659790039062501000f,
-      0.14450073242187500000f,      0.19409179687500000000f,
-      0.24124145507812503000f,      0.28540039062500000000f,
-      0.35211181640625006000f,      0.40985107421875000000f,
-      0.46505737304687500000f,      0.51632690429687500000f,
-      0.56820678710937500000f,      0.61322021484375000000f,
-      0.66528320312500000000f,      0.71234130859375000000f,
-      0.76904296875000000000f,      0.89285278320312500000f,
-      0.06610107421875000000f,      0.08517456054687500000f,
-      0.12240600585937499000f,      0.15505981445312500000f,
-      0.17993164062500003000f,      0.27581787109375000000f,
-      0.40914916992187494000f,      0.44869995117187506000f,
-      0.50485229492187500000f,      0.55508422851562500000f,
-      0.60717773437500000000f,      0.66702270507812500000f,
-      0.75903320312500000000f,      0.82308959960937500000f,
-      0.88363647460937500000f,      0.93121337890625000000f,
-      0.05691528320312499300f,      0.09219360351562500000f,
-      0.14331054687500000000f,      0.19940185546875003000f,
-      0.25460815429687500000f,      0.30255126953125000000f,
-      0.39028930664062500000f,      0.43038940429687500000f,
-      0.50454711914062500000f,      0.54104614257812500000f,
-      0.65124511718750000000f,      0.68478393554687500000f,
-      0.75906372070312500000f,      0.80352783203125000000f,
-      0.86755371093750000000f,      0.92022705078125000000f,
-      0.10281372070312500000f,      0.13259887695312500000f,
-      0.20059204101562503000f,      0.26742553710937500000f,
-      0.31460571289062500000f,      0.35745239257812500000f,
-      0.40792846679687500000f,      0.45117187500000000000f,
-      0.50302124023437500000f,      0.55374145507812500000f,
-      0.60543823242187500000f,      0.64840698242187500000f,
-      0.71081542968750000000f,      0.77749633789062489000f,
-      0.84091186523437489000f,      0.89865112304687500000f,
-      0.03860473632812500000f,      0.06665039062500000000f,
-      0.16610717773437500000f,      0.24087524414062500000f,
-      0.32321166992187500000f,      0.40097045898437506000f,
-      0.46096801757812500000f,      0.50778198242187500000f,
-      0.56158447265625000000f,      0.60504150390625000000f,
-      0.65365600585937500000f,      0.70175170898437500000f,
-      0.75436401367187500000f,      0.80679321289062500000f,
-      0.86557006835937500000f,      0.91934204101562500000f,
-      0.04833984375000000700f,      0.06115722656250000000f,
-      0.10787963867187500000f,      0.13580322265625000000f,
-      0.26434326171875000000f,      0.32849121093750000000f,
-      0.39160156250000000000f,      0.45709228515625000000f,
-      0.51794433593750000000f,      0.57354736328125000000f,
-      0.63879394531250000000f,      0.68807983398437500000f,
-      0.75183105468750000000f,      0.80935668945312500000f,
-      0.87588500976562500000f,      0.93283081054687511000f,
-      0.10433959960937500000f,      0.13818359375000000000f,
-      0.20147705078124997000f,      0.24078369140624997000f,
-      0.29016113281250000000f,      0.33187866210937494000f,
-      0.38973999023437500000f,      0.43814086914062500000f,
-      0.48983764648437500000f,      0.55938720703125000000f,
-      0.62957763671875000000f,      0.68634033203125000000f,
-      0.76507568359375000000f,      0.82202148437499989000f,
-      0.88336181640625011000f,      0.93206787109375000000f,
-      0.05267333984375000000f,      0.06872558593750000000f,
-      0.14028930664062500000f,      0.21209716796875000000f,
-      0.25570678710937500000f,      0.29977416992187500000f,
-      0.34677124023437500000f,      0.39044189453125006000f,
-      0.43658447265625000000f,      0.47229003906250000000f,
-      0.51263427734375000000f,      0.54986572265625000000f,
-      0.66134643554687511000f,      0.77972412109375000000f,
-      0.85900878906249989000f,      0.92672729492187500000f,
-      0.10330200195312500000f,      0.11810302734375000000f,
-      0.16195678710937503000f,      0.19494628906250000000f,
-      0.21792602539062500000f,      0.26501464843750000000f,
-      0.38742065429687500000f,      0.45590209960937500000f,
-      0.50292968750000000000f,      0.55776977539062500000f,
-      0.62673950195312500000f,      0.67285156249999989000f,
-      0.73080444335937489000f,      0.79238891601562500000f,
-      0.86102294921875000000f,      0.91418457031250000000f,
-      0.08456420898437500000f,      0.10089111328124999000f,
-      0.13580322265625000000f,      0.16967773437500000000f,
-      0.19692993164062497000f,      0.28970336914062500000f,
-      0.41345214843750000000f,      0.45025634765625006000f,
-      0.51095581054687500000f,      0.56295776367187500000f,
-      0.61120605468750000000f,      0.66333007812499989000f,
-      0.72467041015625011000f,      0.77371215820312500000f,
-      0.82827758789062500000f,      0.88702392578125000000f,
-      0.09240722656250000000f,      0.11901855468750001000f,
-      0.20193481445312503000f,      0.24087524414062500000f,
-      0.28109741210937500000f,      0.31982421875000000000f,
-      0.36764526367187500000f,      0.41452026367187494000f,
-      0.46331787109375000000f,      0.50848388671875000000f,
-      0.56463623046875000000f,      0.61315917968750000000f,
-      0.67718505859374989000f,      0.74334716796875000000f,
-      0.80267333984375000000f,      0.88369750976562489000f,
-      0.06103515624999999300f,      0.07781982421875000000f,
-      0.12411499023437500000f,      0.20864868164062503000f,
-      0.29382324218750000000f,      0.33575439453125000000f,
-      0.38433837890625006000f,      0.43023681640625000000f,
-      0.47573852539062500000f,      0.52474975585937500000f,
-      0.57003784179687500000f,      0.61337280273437500000f,
-      0.65704345703125000000f,      0.70449829101562500000f,
-      0.75198364257812500000f,      0.88568115234375000000f,
-      0.08679199218749998600f,      0.10076904296875000000f,
-      0.15573120117187500000f,      0.18637084960937500000f,
-      0.21090698242187500000f,      0.26239013671875000000f,
-      0.37890625000000000000f,      0.42889404296875000000f,
-      0.48907470703125000000f,      0.56661987304687500000f,
-      0.63085937500000000000f,      0.67962646484375000000f,
-      0.73095703125000000000f,      0.78646850585937500000f,
-      0.84405517578125000000f,      0.91632080078125000000f,
-      0.12338256835937500000f,      0.15716552734375000000f,
-      0.22180175781250000000f,      0.27636718750000000000f,
-      0.33312988281250000000f,      0.38568115234375006000f,
-      0.44381713867187500000f,      0.49389648437500000000f,
-      0.54772949218750000000f,      0.60092163085937500000f,
-      0.65176391601562500000f,      0.70132446289062500000f,
-      0.75759887695312500000f,      0.81149291992187500000f,
-      0.86911010742187500000f,      0.92263793945312500000f,
-      0.06436157226562500000f,      0.08010864257812500000f,
-      0.13183593750000000000f,      0.16860961914062500000f,
-      0.22747802734375000000f,      0.31188964843750000000f,
-      0.39611816406250006000f,      0.44854736328125000000f,
-      0.53793334960937500000f,      0.58786010742187500000f,
-      0.62515258789062500000f,      0.68301391601562500000f,
-      0.74093627929687500000f,      0.78665161132812500000f,
-      0.84982299804687500000f,      0.92950439453125000000f,
-      0.04730224609375000000f,      0.08139038085937501400f,
-      0.19754028320312500000f,      0.28979492187500000000f,
-      0.33523559570312500000f,      0.37695312500000000000f,
-      0.42098999023437500000f,      0.46487426757812500000f,
-      0.52182006835937500000f,      0.56890869140625000000f,
-      0.62442016601562500000f,      0.67492675781250000000f,
-      0.73843383789062489000f,      0.80233764648437500000f,
-      0.86679077148437500000f,      0.91955566406250000000f,
-      0.07357788085937500000f,      0.09411621093750000000f,
-      0.12649536132812500000f,      0.16461181640625000000f,
-      0.19430541992187500000f,      0.24884033203124997000f,
-      0.40054321289062500000f,      0.48977661132812500000f,
-      0.53591918945312500000f,      0.58364868164062500000f,
-      0.64874267578125000000f,      0.69464111328125000000f,
-      0.74642944335937500000f,      0.80313110351562500000f,
-      0.86227416992187500000f,      0.90643310546875000000f,
-      0.12692260742187500000f,      0.13781738281250000000f,
-      0.18176269531250000000f,      0.23300170898437500000f,
-      0.25189208984375000000f,      0.27404785156250000000f,
-      0.34204101562500000000f,      0.43130493164062500000f,
-      0.49468994140624994000f,      0.54550170898437500000f,
-      0.61633300781250000000f,      0.66723632812500011000f,
-      0.72753906250000000000f,      0.78573608398437511000f,
-      0.85626220703125000000f,      0.91589355468750000000f,
-      0.06182861328125000000f,      0.07418823242187500000f,
-      0.08682250976562500000f,      0.11041259765625000000f,
-      0.24261474609375000000f,      0.29913330078125000000f,
-      0.38821411132812500000f,      0.44128417968750000000f,
-      0.50585937500000000000f,      0.57934570312500000000f,
-      0.65234375000000000000f,      0.71163940429687500000f,
-      0.76174926757812500000f,      0.81536865234375000000f,
-      0.88412475585937500000f,      0.93505859375000000000f,
-      0.10464477539062500000f,      0.11697387695312500000f,
-      0.13647460937500000000f,      0.14990234375000000000f,
-      0.23568725585937500000f,      0.31695556640625000000f,
-      0.39614868164062500000f,      0.46759033203125000000f,
-      0.50961303710937500000f,      0.57394409179687500000f,
-      0.63409423828125000000f,      0.68820190429687511000f,
-      0.75155639648437500000f,      0.80853271484375000000f,
-      0.86468505859375000000f,      0.93023681640625000000f,
-      0.14465332031250000000f,      0.15774536132812500000f,
-      0.17687988281250003000f,      0.19790649414062503000f,
-      0.21356201171874997000f,      0.26947021484375000000f,
-      0.35940551757812500000f,      0.43988037109375000000f,
-      0.51364135742187500000f,      0.56192016601562500000f,
-      0.63442993164062500000f,      0.68264770507812489000f,
-      0.73962402343750000000f,      0.78842163085937511000f,
-      0.84860229492187500000f,      0.91616821289062500000f,
-      0.00457763671875000000f,      0.00512695312500000000f,
-     -0.00051879882812500000f,     -0.00326538085937500000f,
-     -0.00433349609375000000f,     -0.00698852539062499910f,
-     -0.00976562500000000000f,     -0.01239013671875000000f,
-     -0.01535034179687500000f,     -0.01892089843750000000f,
-     -0.02645874023437500000f,     -0.02853393554687500000f,
-     -0.02752685546875000000f,     -0.02075195312500000000f,
-     -0.01214599609375000000f,     -0.00347900390625000000f,
-     -0.01214599609375000000f,     -0.01083374023437500000f,
-      0.00149536132812500000f,      0.00778198242187500000f,
-      0.00347900390625000000f,      0.00793457031250000000f,
-      0.01217651367187500000f,      0.00805664062500000000f,
-      0.00967407226562500000f,      0.01315307617187500000f,
-      0.01568603515625000000f,      0.01620483398437500000f,
-      0.01327514648437500000f,      0.01086425781250000000f,
-      0.00726318359375000000f,      0.00323486328125000000f,
-     -0.00131225585937500000f,     -0.00109863281250000000f,
-     -0.00515747070312500000f,     -0.00683593750000000000f,
-     -0.01193237304687500000f,     -0.01931762695312500000f,
-     -0.02368164062500000000f,     -0.02960205078125000000f,
-     -0.02575683593750000000f,     -0.01388549804687500000f,
-     -0.00552368164062500000f,     -0.00036621093750000000f,
-      0.00259399414062500000f,      0.00259399414062500000f,
-      0.00500488281250000000f,      0.00595092773437500000f,
-      0.00372314453125000000f,      0.00259399414062500000f,
-     -0.00482177734375000000f,     -0.01953125000000000000f,
-     -0.02755737304687500000f,      0.00027465820312500000f,
-      0.00021362304687500000f,     -0.00378417968750000000f,
-      0.00454711914062500000f,      0.00097656250000000000f,
-      0.00671386718750000000f,      0.01126098632812500000f,
-      0.00738525390625000000f,      0.00350952148437500040f,
-      0.00241088867187500000f,      0.00256347656250000000f,
-     -0.00445556640625000000f,     -0.00659179687500000000f,
-     -0.00213623046875000000f,      0.03125000000000000000f,
-      0.02291870117187500000f,      0.01751708984375000000f,
-      0.01342773437500000000f,      0.01150512695312500000f,
-      0.01074218749999999800f,      0.00619506835937500000f,
-      0.00091552734374999989f,      0.00048828125000000000f,
-     -0.00009155273437500000f,      0.00247192382812500000f,
-      0.00491333007812500000f,      0.00305175781250000000f,
-     -0.00451660156250000000f,     -0.00537109374999999910f,
-      0.02847290039062500000f,      0.02288818359375000000f,
-      0.01232910156250000000f,      0.00521850585937500000f,
-     -0.00006103515625000000f,     -0.00445556640625000000f,
-     -0.01254272460937500000f,     -0.01348876953125000000f,
-     -0.01651000976562500000f,     -0.01684570312500000000f,
-     -0.01348876953125000000f,     -0.00820922851562500000f,
-     -0.00732421874999999910f,     -0.00158691406250000020f,
-      0.01840209960937500000f,      0.01937866210937500000f,
-      0.01235961914062499800f,      0.00543212890625000000f,
-      0.00656127929687500000f,      0.00057983398437500000f,
-     -0.00466918945312500000f,     -0.00509643554687500000f,
-     -0.00885009765625000000f,     -0.00668334960937500090f,
-      0.00460815429687500000f,      0.00827026367187500000f,
-      0.00460815429687500000f,      0.00363159179687500000f,
-      0.00924682617187500000f,      0.00811767578125000000f,
-      0.00305175781250000000f,      0.00210571289062500000f,
-     -0.00894165039062500000f,     -0.02005004882812500000f,
-      0.02865600585937500000f,      0.02011108398437500000f,
-      0.01348876953125000000f,      0.01071166992187500000f,
-      0.00402832031250000000f,      0.00299072265625000000f,
-     -0.00048828125000000000f,     -0.00003051757812500000f,
-     -0.00411987304687500000f,     -0.00610351562500000000f,
-     -0.00680541992187500000f,     -0.00271606445312500000f,
-      0.00509643554687500000f,      0.00469970703125000000f,
-      0.00524902343750000000f,      0.00723266601562500000f,
-     -0.00137329101562500000f,     -0.00558471679687500000f,
-     -0.00695800781250000000f,     -0.01483154296875000000f,
-      0.00802612304687500000f,      0.01855468750000000000f,
-      0.00482177734375000000f,     -0.00381469726562499960f,
-     -0.01190185546875000000f,     -0.00692749023437500000f,
-     -0.00360107421875000000f,      0.00131225585937500000f,
-     -0.01394653320312500000f,     -0.01196289062500000000f,
-     -0.02346801757812500000f,     -0.02563476562500000000f,
-      0.00061035156250000000f,     -0.00357055664062500000f,
-     -0.00592041015625000000f,     -0.00576782226562500000f,
-     -0.00527954101562500000f,     -0.00527954101562500000f,
-     -0.00100708007812500000f,      0.00097656250000000000f,
-      0.00531005859375000000f,      0.00439453125000000000f,
-      0.00350952148437500040f,      0.00509643554687500000f,
-      0.00173950195312500000f,      0.00134277343749999980f,
-      0.00042724609375000000f,      0.00448608398437500000f,
-      0.00292968750000000000f,     -0.00164794921875000000f,
-     -0.00433349609375000000f,     -0.00393676757812500000f,
-     -0.00775146484375000000f,     -0.01010131835937500000f,
-      0.00927734375000000000f,      0.00946044921875000000f,
-     -0.00158691406250000020f,     -0.01278686523437500000f,
-     -0.02581787109375000000f,     -0.03234863281250000000f,
-     -0.00268554687499999960f,     -0.00375366210937500000f,
-     -0.00616455078125000000f,     -0.01046752929687500200f,
-     -0.01690673828125000000f,     -0.02932739257812500000f,
-     -0.02902221679687500000f,      0.00997924804687500000f,
-      0.00485229492187500000f,      0.00247192382812500000f,
-      0.00778198242187500000f,      0.00692749023437500000f,
-      0.00366210937499999960f,      0.00619506835937500000f,
-      0.00781250000000000000f,      0.00585937500000000000f,
-      0.00500488281250000000f,      0.00683593750000000000f,
-      0.00885009765625000000f,      0.00595092773437500000f,
-      0.00659179687500000000f,      0.00637817382812500090f,
-      0.00390625000000000000f,      0.02539062500000000300f,
-      0.03137207031250000000f,      0.02713012695312500000f,
-      0.02130126953125000000f,      0.01538085937500000000f,
-      0.01245117187500000000f,      0.01083374023437500000f,
-      0.00665283203124999910f,      0.00097656250000000000f,
-     -0.00350952148437500040f,     -0.00256347656250000000f,
-     -0.00842285156250000000f,     -0.00305175781250000000f,
-     -0.00952148437500000000f,     -0.01477050781250000000f,
-      0.02743530273437500000f,      0.02081298828124999700f,
-      0.01419067382812500000f,      0.01391601562500000000f,
-      0.00735473632812500090f,     -0.00036621093750000000f,
-     -0.00839233398437500000f,     -0.01296997070312499800f,
-     -0.01406860351562500000f,     -0.01119995117187500000f,
-     -0.00100708007812500000f,     -0.00085449218750000000f,
-     -0.00311279296875000000f,     -0.00592041015625000000f,
-     -0.01608276367187500000f,      0.02633666992187500000f,
-      0.02764892578125000000f,      0.01412963867187500000f,
-      0.00747680664062500000f,      0.00039672851562500005f,
-     -0.00646972656250000000f,     -0.00930786132812500000f,
-     -0.00320434570312500000f,      0.00497436523437500000f,
-      0.00851440429687500000f,      0.00537109374999999910f,
-      0.00283813476562499960f,      0.00204467773437500000f,
-      0.00350952148437500040f,      0.00585937500000000000f,
-      0.00186157226562500000f,     -0.00152587890625000000f,
-     -0.00402832031250000000f,     -0.00534057617187499910f,
-     -0.00683593750000000000f,     -0.00827026367187500000f,
-     -0.01919555664062500000f,     -0.00769042968750000000f,
-      0.03533935546875000000f,      0.02966308593750000000f,
-      0.01947021484375000000f,      0.00854492187500000000f,
-      0.00915527343750000000f,      0.00994873046875000000f,
-      0.00436401367187500000f,     -0.00463867187500000000f,
-     -0.00653076171875000000f,     -0.00875854492187500000f,
-      0.00161743164062500000f,     -0.00128173828125000000f,
-     -0.00720214843750000000f,     -0.01074218749999999800f,
-     -0.01290893554687500000f,     -0.00756835937500000000f,
-     -0.00393676757812500000f,     -0.00497436523437500000f,
-     -0.00543212890625000000f,     -0.00363159179687500000f,
-      0.00259399414062500000f,      0.00173950195312500000f,
-      0.01568603515625000000f,      0.01165771484375000000f,
-      0.01141357421875000200f,      0.01226806640625000000f,
-      0.01293945312500000000f,      0.01290893554687500000f,
-      0.00827026367187500000f,      0.00601196289062499910f,
-      0.00296020507812500000f,      0.00122070312500000000f,
-      0.00119018554687500000f,     -0.00296020507812500000f,
-     -0.00582885742187500000f,     -0.00500488281250000000f,
-     -0.00701904296875000090f,     -0.00781250000000000000f,
-     -0.01251220703125000000f,      0.01208496093750000200f,
-      0.00997924804687500000f,      0.00387573242187500000f,
-      0.00030517578125000000f,     -0.00363159179687500000f,
-     -0.00509643554687500000f,     -0.00888061523437500000f,
-     -0.00836181640625000000f,     -0.00430297851562500000f,
-     -0.00302124023437500040f,     -0.00689697265625000000f,
-     -0.00665283203124999910f,     -0.00424194335937500000f,
-     -0.00683593750000000000f,     -0.00637817382812500090f,
-     -0.00817871093750000000f,     -0.01348876953125000000f,
-     -0.01260375976562500000f,      0.00677490234375000000f,
-      0.00177001953125000000f,      0.01589965820312500000f,
-      0.01049804687500000000f,      0.00787353515625000000f,
-      0.00231933593750000000f,     -0.00128173828125000000f,
-     -0.00433349609375000000f,     -0.00503540039062499910f,
-     -0.00375366210937500000f,     -0.00280761718750000000f,
-      0.00143432617187500000f,      0.00024414062500000000f,
-     -0.00009155273437500000f,     -0.00582885742187500000f,
-     -0.00033569335937499995f,     -0.00500488281250000000f,
-     -0.00509643554687500000f,     -0.01071166992187500000f,
-     -0.02258300781250000000f,      0.00949096679687500000f,
-      0.01641845703125000000f,      0.00888061523437500000f,
-      0.00561523437500000000f,      0.00088500976562500000f,
-     -0.00320434570312500000f,      0.00027465820312500000f,
-     -0.00091552734374999989f,     -0.00164794921875000000f,
-     -0.00051879882812500000f,     -0.00234985351562500000f,
-     -0.00827026367187500000f,     -0.01257324218750000000f,
-     -0.01898193359375000000f,     -0.01977539062500000000f,
-      0.01452636718750000000f,      0.00567626953124999910f,
-     -0.00201416015625000000f,     -0.00601196289062499910f,
-     -0.00222778320312500000f,     -0.00286865234375000000f,
-     -0.00045776367187499995f,      0.00143432617187500000f,
-      0.00085449218750000000f,      0.00341796875000000000f,
-     -0.00177001953125000000f,     -0.00100708007812500000f,
-      0.00198364257812500000f,      0.00057983398437500000f,
-      0.00256347656250000000f,      0.00262451171875000000f,
-      0.00842285156250000000f,      0.00347900390625000000f,
-      0.01440429687500000000f,      0.02398681640625000000f,
-      0.02438354492187499700f,      0.01907348632812500000f,
-      0.01266479492187500000f,      0.00543212890625000000f,
-     -0.00106811523437500000f,     -0.00079345703125000011f,
-      0.00015258789062500000f,      0.00027465820312500000f,
-      0.00253295898437500040f,      0.00119018554687500000f,
-      0.00112915039062500000f,      0.00119018554687500000f,
-     -0.00561523437500000000f,     -0.01141357421875000200f,
-     -0.00808715820312500000f,     -0.01104736328125000000f,
-     -0.01528930664062500000f,      0.01028442382812500000f,
-      0.02185058593750000000f,      0.01458740234374999800f,
-     -0.00183105468749999980f,     -0.00381469726562499960f,
-     -0.00497436523437500000f,      0.01104736328125000000f,
-      0.00051879882812500000f,     -0.00372314453125000000f,
-     -0.00711059570312500000f,      0.00851440429687500000f,
-      0.00421142578125000000f,      0.00479125976562500000f,
-      0.00970458984375000000f,      0.00588989257812500000f,
-      0.00576782226562500000f,      0.00637817382812500090f,
-      0.00811767578125000000f,      0.00769042968750000000f,
-     -0.00140380859375000000f,     -0.00170898437500000000f,
-     -0.00845336914062500000f,     -0.01309204101562500000f,
-      0.01416015625000000000f,      0.01177978515625000000f,
-      0.00433349609375000000f,      0.00134277343749999980f,
-     -0.00131225585937500000f,      0.00201416015625000000f,
-      0.00805664062500000000f,      0.00555419921875000000f,
-      0.00143432617187500000f,      0.00042724609375000000f,
-     -0.00079345703125000011f,     -0.00241088867187500000f,
-      0.00149536132812500000f,      0.00045776367187499995f,
-     -0.00390625000000000000f,     -0.00619506835937500000f,
-     -0.01220703125000000000f,     -0.01458740234374999800f,
-      0.00991821289062500000f,      0.00082397460937500000f,
-      0.00714111328125000000f,      0.01254272460937500000f,
-      0.00625610351562500000f,      0.00393676757812500000f,
-      0.00036621093750000000f,      0.00177001953125000000f,
-      0.00375366210937500000f,      0.00173950195312500000f,
-      0.00521850585937500000f,      0.00418090820312500000f,
-      0.00292968750000000000f,      0.00390625000000000000f,
-     -0.00097656250000000000f,      0.00408935546875000000f,
-     -0.00036621093750000000f,      0.00173950195312500000f,
-      0.00363159179687500000f,      0.00079345703125000011f,
-     -0.00067138671874999989f,     -0.00503540039062499910f,
-     -0.01525878906249999800f,     -0.02139282226562500000f,
-     -0.01611328125000000000f,     -0.00354003906250000000f,
-      0.00195312500000000000f,     -0.00024414062500000000f,
-      0.00296020507812500000f,     -0.00027465820312500000f,
-     -0.00494384765625000000f,     -0.00201416015625000000f,
-     -0.00476074218750000000f,     -0.00592041015625000000f,
-     -0.00924682617187500000f,     -0.01666259765625000000f,
-     -0.01040649414062499800f,      0.01666259765625000000f,
-      0.01092529296875000000f,      0.00289916992187500000f,
-      0.00137329101562500000f,      0.00231933593750000000f,
-      0.00823974609375000000f,      0.01229858398437500000f,
-      0.00625610351562500000f,      0.00305175781250000000f,
-      0.00375366210937500000f,      0.00152587890625000000f,
-     -0.00161743164062500000f,     -0.00439453125000000000f,
-     -0.00335693359375000000f,     -0.00039672851562500005f,
-      0.00097656250000000000f,     -0.00695800781250000000f,
-     -0.00396728515625000000f,      0.01077270507812500000f,
-      0.00903320312500000000f,      0.00170898437500000000f,
-     -0.01135253906249999800f,     -0.00772094726562500000f,
-      0.01113891601562500000f,      0.00222778320312500000f,
-      0.00030517578125000000f,     -0.00103759765625000000f,
-     -0.00424194335937500000f,     -0.00582885742187500000f,
-     -0.00292968750000000000f,      0.00015258789062500000f,
-      0.00134277343749999980f,     -0.00259399414062500000f,
-     -0.00546264648437500000f,     -0.00393676757812500000f,
-     -0.00585937500000000000f,     -0.00750732421875000000f,
-     -0.00259399414062500000f,     -0.00335693359375000000f,
-     -0.00473022460937500000f,     -0.00134277343749999980f,
-     -0.00082397460937500000f,      0.00442504882812500000f,
-      0.00421142578125000000f,      0.00241088867187500000f,
-      0.00097656250000000000f,     -0.00451660156250000000f,
-     -0.01760864257812500000f,     -0.01934814453125000000f,
-      0.00582885742187500000f,      0.00286865234375000000f,
-     -0.00027465820312500000f,     -0.00106811523437500000f,
-     -0.00234985351562500000f,     -0.00256347656250000000f,
-     -0.00170898437500000000f,     -0.00521850585937500000f,
-     -0.00909423828125000000f,     -0.00827026367187500000f,
-     -0.00741577148437500000f,     -0.00476074218750000000f,
-     -0.01000976562500000000f,     -0.00717163085937500000f,
-     -0.00231933593750000000f,     -0.00390625000000000000f,
-     -0.00369262695312500000f,      0.00393676757812500000f,
-      0.00039672851562500005f,     -0.00067138671874999989f,
-      0.00097656250000000000f,      0.00137329101562500000f,
-     -0.00756835937500000000f,     -0.00198364257812500000f,
-      0.00588989257812500000f,     -0.00247192382812500000f,
-      0.00912475585937500000f,      0.00173950195312500000f,
-     -0.00448608398437500000f,      0.00585937500000000000f,
-     -0.00503540039062499910f,     -0.01080322265625000200f,
-     -0.01019287109375000000f,     -0.00323486328125000000f,
-     -0.00476074218750000000f,     -0.00122070312500000000f,
-     -0.00009155273437500000f,     -0.00207519531250000000f,
-      0.00378417968750000000f,     -0.00784301757812500000f,
-      0.00238037109375000000f,      0.00378417968750000000f,
-      0.00518798828125000000f,      0.01257324218750000000f,
-      0.00692749023437500000f,      0.00320434570312500000f,
-     -0.00317382812500000040f,      0.00036621093750000000f,
-      0.00469970703125000000f,      0.00762939453124999910f,
-      0.00836181640625000000f,      0.00787353515625000000f,
-      0.00012207031250000000f,     -0.00082397460937500000f,
-      0.00717163085937500000f,      0.00463867187500000000f,
-      0.00155639648437500000f,      0.01031494140625000000f,
-      0.00915527343750000000f,      0.00021362304687500000f,
-     -0.00958251953125000000f,     -0.01254272460937500000f,
-      0.00656127929687500000f,      0.00518798828125000000f,
-     -0.00027465820312500000f,     -0.00283813476562499960f,
-     -0.00234985351562500000f,      0.00231933593750000000f,
-      0.00204467773437500000f,      0.00164794921875000000f,
-      0.00610351562500000000f,      0.00961303710937500000f,
-      0.00497436523437500000f,      0.00219726562500000000f,
-     -0.00277709960937500000f,     -0.01226806640625000000f,
-      0.00482177734375000000f,      0.00570678710937500090f,
-     -0.00476074218750000000f,     -0.00277709960937500000f,
-      0.00885009765625000000f,      0.00814819335937500000f,
-      0.00509643554687500000f,      0.00277709960937500000f,
-      0.00427246093750000000f,      0.00521850585937500000f,
-      0.00341796875000000000f,      0.00027465820312500000f,
-     -0.00128173828125000000f,     -0.00540161132812500090f,
-     -0.01342773437500000000f,      0.01174926757812500200f,
-      0.00244140625000000000f,      0.00045776367187499995f,
-      0.00524902343750000000f,      0.00393676757812500000f,
-      0.00125122070312500000f,     -0.00393676757812500000f,
-     -0.01135253906249999800f,     -0.00073242187500000000f,
-     -0.00228881835937500000f,     -0.00091552734374999989f,
-     -0.00518798828125000000f,      0.00030517578125000000f,
-     -0.00360107421875000000f,      0.00173950195312500000f,
-      0.00238037109375000000f,     -0.00308227539062500000f,
-      0.00708007812500000000f,      0.00491333007812500000f,
-      0.00375366210937500000f,      0.00781250000000000000f,
-      0.00845336914062500000f,      0.00308227539062500000f,
-     -0.00585937500000000000f,     -0.01919555664062500000f,
-     -0.00305175781250000000f,     -0.00183105468749999980f,
-     -0.00708007812500000000f,      0.00201416015625000000f,
-      0.00039672851562500005f,     -0.00039672851562500005f,
-     -0.00244140625000000000f,     -0.00729370117187499910f,
-      0.00729370117187499910f,      0.00112915039062500000f,
-      0.00097656250000000000f,      0.00271606445312500000f,
-     -0.00973510742187500000f,     -0.01766967773437500000f,
-      0.01373291015625000000f,      0.01098632812500000000f,
-      0.00009155273437500000f,     -0.00088500976562500000f,
-     -0.00912475585937500000f,     -0.00271606445312500000f,
-     -0.00164794921875000000f,     -0.00335693359375000000f,
-     -0.00750732421875000000f,     -0.00500488281250000000f,
-      0.00018310546875000000f,     -0.00573730468750000000f,
-      0.01031494140625000000f,      0.00537109374999999910f,
-     -0.00280761718750000000f,      0.00601196289062499910f,
-      0.00418090820312500000f,      0.00408935546875000000f,
-      0.00036621093750000000f,     -0.00006103515625000000f,
-      0.00170898437500000000f,     -0.00558471679687500000f,
-      0.00347900390625000000f,     -0.00109863281250000000f,
-     -0.00399780273437500000f,     -0.00622558593750000000f,
-      0.00228881835937500000f,     -0.00076293945312500000f,
-     -0.00531005859375000000f,      0.00582885742187500000f,
-     -0.00045776367187499995f,     -0.00885009765625000000f,
-     -0.01309204101562500000f,     -0.00814819335937500000f,
-      0.00241088867187500000f,      0.00112915039062500000f,
-      0.00323486328125000000f,      0.00070190429687500000f,
-     -0.01171875000000000000f,      0.01296997070312499800f,
-      0.00213623046875000000f,     -0.00042724609375000000f,
-      0.00646972656250000000f,      0.00320434570312500000f,
-      0.00045776367187499995f,     -0.00006103515625000000f,
-     -0.00128173828125000000f,     -0.00112915039062500000f,
-     -0.00375366210937500000f,      0.00329589843750000000f,
-      0.00085449218750000000f,     -0.00146484375000000000f,
-      0.00588989257812500000f,      0.00601196289062499910f,
-      0.00527954101562500000f,     -0.00100708007812500000f,
-      0.00112915039062500000f,      0.00222778320312500000f,
-     -0.00173950195312500000f,      0.00781250000000000000f,
-      0.00418090820312500000f,     -0.00177001953125000000f,
-     -0.01312255859375000000f,     -0.00695800781250000000f,
-      0.00662231445312500000f,     -0.00155639648437500000f,
-     -0.00030517578125000000f,     -0.00177001953125000000f,
-     -0.00018310546875000000f,      0.00067138671874999989f,
-      0.00317382812500000040f,      0.00186157226562500000f,
-     -0.00363159179687500000f,      0.00515747070312500000f,
-      0.00439453125000000000f,      0.00048828125000000000f,
-     -0.00140380859375000000f,     -0.01202392578124999800f,
-      0.00183105468749999980f,      0.01385498046875000000f,
-     -0.00244140625000000000f,     -0.00909423828125000000f,
-     -0.00198364257812500000f,      0.00076293945312500000f,
-      0.00000000000000000000f,     -0.00073242187500000000f,
-     -0.00198364257812500000f,     -0.01272583007812500000f,
-      0.01419067382812500000f,      0.00842285156250000000f,
-     -0.00009155273437500000f,     -0.00592041015625000000f,
-     -0.00039672851562500005f,      0.00396728515625000000f,
-      0.00057983398437500000f,     -0.00018310546875000000f,
-     -0.00064086914062500000f,     -0.00073242187500000000f,
-     -0.00549316406250000000f,     -0.00161743164062500000f,
-     -0.00259399414062500000f,      0.00061035156250000000f,
-      0.00360107421875000000f,      0.00448608398437500000f,
-      0.00344848632812500000f,     -0.00228881835937500000f,
-     -0.00881958007812500000f,      0.00689697265625000000f,
-     -0.00372314453125000000f,      0.00692749023437500000f,
-      0.00823974609375000000f,      0.00381469726562499960f,
-      0.00332641601562499960f,      0.00601196289062499910f,
-      0.00381469726562499960f,      0.00421142578125000000f,
-      0.00134277343749999980f,      0.00183105468749999980f,
-      0.00076293945312500000f,     -0.00167846679687500000f,
-     -0.00509643554687500000f,     -0.00097656250000000000f,
-     -0.00424194335937500000f,     -0.00588989257812500000f,
-     -0.00527954101562500000f,     -0.00964355468750000000f,
-      0.00875854492187500000f,     -0.00634765625000000090f,
-      0.00772094726562500000f,      0.00729370117187499910f,
-      0.00082397460937500000f,     -0.00244140625000000000f,
-     -0.00573730468750000000f,     -0.00085449218750000000f,
-     -0.00555419921875000000f,     -0.00717163085937500000f,
-      0.00476074218750000000f,     -0.00357055664062500000f,
-      0.00390625000000000000f,     -0.00146484375000000000f,
-     -0.00177001953125000000f,     -0.00689697265625000000f,
-      0.00524902343750000000f,      0.00552368164062500000f,
-      0.00509643554687500000f,      0.00057983398437500000f,
-      0.00189208984375000000f,      0.00030517578125000000f,
-      0.00006103515625000000f,      0.00552368164062500000f,
-      0.00460815429687500000f,      0.00329589843750000000f,
-     -0.00048828125000000000f,     -0.00033569335937499995f,
-     -0.00238037109375000000f,     -0.01010131835937500000f,
-      0.01254272460937500000f,      0.00405883789062500000f,
-      0.00051879882812500000f,      0.00317382812500000040f,
-      0.00195312500000000000f,     -0.00561523437500000000f,
-      0.00073242187500000000f,     -0.00091552734374999989f,
-     -0.00009155273437500000f,     -0.00863647460937500000f,
-      0.00369262695312500000f,      0.00622558593750000000f,
-     -0.00024414062500000000f,     -0.00607299804687500000f,
-     -0.00064086914062500000f,     -0.00244140625000000000f,
-     -0.00515747070312500000f,     -0.00479125976562500000f,
-     -0.00582885742187500000f,     -0.00415039062500000000f,
-      0.00247192382812500000f,      0.00473022460937500000f,
-      0.00042724609375000000f,     -0.00399780273437500000f,
-      0.00744628906250000000f,      0.00225830078125000000f,
-     -0.00173950195312500000f,     -0.00143432617187500000f,
-     -0.00854492187500000000f,      0.01058959960937500000f,
-      0.00338745117187500000f,     -0.00234985351562500000f,
-     -0.00390625000000000000f,     -0.00433349609375000000f,
-     -0.00592041015625000000f,     -0.00381469726562499960f,
-     -0.00018310546875000000f,     -0.00207519531250000000f,
-      0.00277709960937500000f,      0.00003051757812500000f,
-      0.00070190429687500000f,      0.00042724609375000000f,
-     -0.00469970703125000000f,     -0.00103759765625000000f,
-      0.00070190429687500000f,     -0.00115966796875000000f,
-     -0.01046752929687500200f,      0.01535034179687500000f,
-      0.00445556640625000000f,     -0.00115966796875000000f,
-     -0.00140380859375000000f,     -0.00125122070312500000f,
-      0.00177001953125000000f,      0.00094604492187500000f,
-      0.00192260742187500000f,     -0.00146484375000000000f,
-     -0.00357055664062500000f,      0.00137329101562500000f,
-      0.00085449218750000000f,      0.00003051757812500000f,
-     -0.00271606445312500000f,     -0.00015258789062500000f,
-     -0.00134277343749999980f,     -0.00088500976562500000f,
-     -0.01367187500000000000f,      0.01486206054687500000f,
-      0.00622558593750000000f,      0.00247192382812500000f,
-      0.00140380859375000000f,     -0.00323486328125000000f,
-     -0.00921630859375000000f,      0.01159667968750000000f,
-      0.00366210937499999960f,     -0.00115966796875000000f,
-     -0.00036621093750000000f,     -0.00119018554687500000f,
-      0.00213623046875000000f,     -0.00009155273437500000f,
-      0.00076293945312500000f,     -0.00198364257812500000f,
-      0.00091552734374999989f,     -0.00033569335937499995f,
-      0.00103759765625000000f,     -0.00045776367187499995f,
-      0.00067138671874999989f,     -0.00350952148437500040f,
-      0.00000000000000000000f,     -0.00241088867187500000f,
-     -0.00253295898437500040f,      0.00137329101562500000f,
-      0.00347900390625000000f,      0.00131225585937500000f,
-      0.00457763671875000000f,      0.00109863281250000000f,
-      0.00711059570312500000f,      0.00454711914062500000f,
-      0.00595092773437500000f,      0.00015258789062500000f,
-      0.00076293945312500000f,     -0.00158691406250000020f,
-     -0.01449584960937500000f,      0.00836181640625000000f,
-      0.00085449218750000000f,     -0.00119018554687500000f,
-     -0.00024414062500000000f,     -0.00201416015625000000f,
-     -0.00778198242187500000f,      0.00787353515625000000f,
-      0.00170898437500000000f,      0.00436401367187500000f,
-     -0.00137329101562500000f,     -0.00579833984375000000f,
-      0.00503540039062499910f,     -0.00183105468749999980f,
-      0.00061035156250000000f,      0.00006103515625000000f,
-      0.00381469726562499960f,     -0.00393676757812500000f,
-      0.00155639648437500000f,     -0.00024414062500000000f,
-     -0.01022338867187500000f,      0.00878906250000000000f,
-      0.00115966796875000000f,      0.00180053710937500000f,
-      0.00076293945312500000f,     -0.00128173828125000000f,
-      0.00070190429687500000f,     -0.00360107421875000000f,
-     -0.00341796875000000000f,      0.00033569335937499995f,
-     -0.00167846679687500000f,     -0.00405883789062500000f,
-     -0.00332641601562499960f,      0.00073242187500000000f,
-     -0.00320434570312500000f,      0.00238037109375000000f,
-     -0.00195312500000000000f,     -0.00747680664062500000f,
-      0.00616455078125000000f,     -0.00198364257812500000f,
-     -0.00387573242187500000f,      0.00494384765625000000f,
-      0.00122070312500000000f,     -0.00286865234375000000f,
-      0.00271606445312500000f,     -0.00259399414062500000f,
-     -0.00363159179687500000f,     -0.00314331054687500000f,
-      0.00296020507812500000f,      0.00027465820312500000f,
-     -0.00213623046875000000f,     -0.00085449218750000000f,
-      0.00592041015625000000f,      0.00262451171875000000f,
-     -0.00341796875000000000f,     -0.00280761718750000000f,
-     -0.00347900390625000000f,      0.00225830078125000000f,
-     -0.00149536132812500000f,      0.00140380859375000000f,
-     -0.00256347656250000000f,     -0.00543212890625000000f,
-      0.00344848632812500000f,      0.00158691406250000020f,
-     -0.00625610351562500000f,      0.01016235351562500000f,
-      0.00268554687499999960f,      0.00677490234375000000f,
-      0.00170898437500000000f,     -0.00167846679687500000f,
-      0.00039672851562500005f,      0.00262451171875000000f,
-      0.00012207031250000000f,     -0.00234985351562500000f,
-      0.00683593750000000000f,      0.00347900390625000000f,
-     -0.00320434570312500000f,      0.00341796875000000000f,
-      0.00381469726562499960f,     -0.00088500976562500000f,
-     -0.00054931640625000000f,     -0.00439453125000000000f,
-      0.00067138671874999989f,     -0.00177001953125000000f,
-     -0.00302124023437500040f,      0.00085449218750000000f,
-      0.00347900390625000000f,     -0.00201416015625000000f,
-     -0.00097656250000000000f,     -0.00515747070312500000f,
-     -0.00958251953125000000f,      0.00869750976562500000f,
-      0.00219726562500000000f,     -0.00225830078125000000f,
-      0.00546264648437500000f,      0.00085449218750000000f,
-     -0.00241088867187500000f,     -0.00555419921875000000f,
-      0.00039672851562500005f,     -0.00167846679687500000f,
-      0.00448608398437500000f,      0.00039672851562500005f,
-      0.00036621093750000000f,     -0.00164794921875000000f,
-      0.00094604492187500000f,     -0.00256347656250000000f,
-     -0.00051879882812500000f,     -0.00228881835937500000f,
-     -0.00695800781250000000f,      0.00253295898437500040f,
-     -0.01144409179687500000f,      0.01330566406249999800f,
-      0.00335693359375000000f,     -0.00192260742187500000f,
-     -0.00082397460937500000f,     -0.00415039062500000000f,
-      0.00515747070312500000f,     -0.00170898437500000000f,
-     -0.00024414062500000000f,     -0.00521850585937500000f,
-      0.00561523437500000000f,     -0.00128173828125000000f,
-      0.00451660156250000000f,      0.00207519531250000000f,
-      0.00622558593750000000f,      0.00717163085937500000f,
-      0.00335693359375000000f,     -0.00698852539062499910f,
-      0.00277709960937500000f,      0.00521850585937500000f,
-     -0.00131225585937500000f,     -0.00009155273437500000f,
-     -0.00079345703125000011f,     -0.00302124023437500040f,
-     -0.00338745117187500000f,      0.00216674804687500000f,
-     -0.00518798828125000000f,      0.00616455078125000000f,
-     -0.00204467773437500000f,      0.00552368164062500000f,
-     -0.00112915039062500000f,      0.00332641601562499960f,
-     -0.00366210937499999960f,      0.00009155273437500000f,
-     -0.00167846679687500000f,     -0.00793457031250000000f,
-     -0.00048828125000000000f,      0.00463867187500000000f,
-      0.00277709960937500000f,      0.00433349609375000000f,
-      0.00128173828125000000f,      0.00134277343749999980f,
-      0.00408935546875000000f,      0.00143432617187500000f,
-      0.00051879882812500000f,     -0.00106811523437500000f,
-      0.00067138671874999989f,      0.00241088867187500000f,
-     -0.00515747070312500000f,      0.00125122070312500000f,
-      0.00140380859375000000f,      0.00845336914062500000f,
-     -0.00283813476562499960f,     -0.00149536132812500000f,
-     -0.00384521484375000000f,      0.00112915039062500000f,
-     -0.00314331054687500000f,     -0.00103759765625000000f,
-     -0.00067138671874999989f,     -0.00274658203125000000f,
-     -0.00408935546875000000f,     -0.00625610351562500000f,
-      0.00280761718750000000f,     -0.00027465820312500000f,
-      0.00003051757812500000f,     -0.00595092773437500000f,
-     -0.00729370117187499910f,      0.00137329101562500000f,
-      0.00164794921875000000f,      0.00054931640625000000f,
-     -0.00070190429687500000f,     -0.00003051757812500000f,
-     -0.00244140625000000000f,     -0.00299072265625000000f,
-     -0.00061035156250000000f,     -0.00796508789062500000f,
-      0.00933837890625000000f,      0.00219726562500000000f,
-      0.00061035156250000000f,     -0.00271606445312500000f,
-     -0.00662231445312500000f,      0.00033569335937499995f,
-      0.00018310546875000000f,     -0.00250244140625000000f,
-      0.00271606445312500000f,      0.00039672851562500005f,
-     -0.00393676757812500000f,     -0.00271606445312500000f,
-      0.00253295898437500040f,     -0.00216674804687500000f,
-     -0.00167846679687500000f,      0.00396728515625000000f,
-     -0.00299072265625000000f,     -0.00445556640625000000f,
-     -0.00082397460937500000f,     -0.00173950195312500000f,
-      0.00161743164062500000f,      0.00839233398437500000f,
-      0.00051879882812500000f,      0.00518798828125000000f,
-     -0.00015258789062500000f,     -0.00164794921875000000f,
-      0.00402832031250000000f,     -0.00195312500000000000f,
-      0.00219726562500000000f,      0.00488281250000000000f,
-     -0.00381469726562499960f,     -0.00512695312500000000f,
-      0.00219726562500000000f,      0.00122070312500000000f,
-      0.00518798828125000000f,      0.00238037109375000000f,
-      0.00756835937500000000f,      0.00354003906250000000f,
-      0.00061035156250000000f,      0.00256347656250000000f,
-      0.00094604492187500000f,     -0.00103759765625000000f,
-      0.00579833984375000000f,      0.00115966796875000000f,
-      0.00039672851562500005f,     -0.00323486328125000000f,
-      0.00686645507812500000f,      0.00082397460937500000f,
-     -0.00512695312500000000f,      0.00073242187500000000f,
-     -0.00479125976562500000f,     -0.00372314453125000000f,
-      0.00503540039062499910f,      0.00033569335937499995f,
-     -0.00491333007812500000f,     -0.00650024414062500000f,
-     -0.00036621093750000000f,     -0.00155639648437500000f,
-     -0.00308227539062500000f,      0.00128173828125000000f,
-      0.00308227539062500000f,      0.00082397460937500000f,
-      0.00167846679687500000f,      0.00338745117187500000f,
-      0.00228881835937500000f,      0.00216674804687500000f,
-     -0.00292968750000000000f,     -0.00003051757812500000f,
-      0.00198364257812500000f,     -0.00845336914062500000f,
-      0.01199340820312500000f,     -0.00079345703125000011f,
-     -0.00134277343749999980f,     -0.00207519531250000000f,
-     -0.00256347656250000000f,     -0.00201416015625000000f,
-     -0.00289916992187500000f,      0.00717163085937500000f,
-      0.00546264648437500000f,     -0.00076293945312500000f,
-     -0.00125122070312500000f,      0.00082397460937500000f,
-     -0.00277709960937500000f,     -0.00390625000000000000f,
-     -0.00677490234375000000f,      0.00445556640625000000f,
-     -0.00219726562500000000f,     -0.00091552734374999989f,
-     -0.00073242187500000000f,      0.00167846679687500000f,
-     -0.00384521484375000000f,     -0.00207519531250000000f,
-     -0.00177001953125000000f,     -0.00387573242187500000f,
-      0.00039672851562500005f,     -0.00296020507812500000f,
-     -0.00323486328125000000f,      0.00531005859375000000f,
-     -0.00305175781250000000f,      0.00473022460937500000f,
-      0.00308227539062500000f,     -0.00445556640625000000f,
-     -0.00064086914062500000f,      0.00796508789062500000f,
-      0.00067138671874999989f,      0.00115966796875000000f,
-     -0.00201416015625000000f,      0.00198364257812500000f,
-      0.00012207031250000000f,      0.00213623046875000000f,
-      0.00195312500000000000f,      0.00439453125000000000f,
-      0.00180053710937500000f,      0.00650024414062500000f,
-      0.00216674804687500000f,     -0.01028442382812500000f,
-      0.00924682617187500000f,     -0.00158691406250000020f,
-      0.00155639648437500000f,     -0.00170898437500000000f,
-      0.00003051757812500000f,      0.00030517578125000000f,
-     -0.00045776367187499995f,     -0.00015258789062500000f,
-      0.00103759765625000000f,      0.00158691406250000020f,
-      0.00695800781250000000f,      0.00399780273437500000f,
-      0.00491333007812500000f,     -0.00387573242187500000f,
-     -0.00653076171875000000f,      0.00726318359375000000f,
-      0.00375366210937500000f,      0.00195312500000000000f,
-     -0.00448608398437500000f,     -0.00152587890625000000f,
-     -0.00103759765625000000f,     -0.00387573242187500000f,
-      0.00622558593750000000f,      0.00494384765625000000f,
-      0.00259399414062500000f,      0.00125122070312500000f,
-      0.00015258789062500000f,     -0.00427246093750000000f,
-      0.00222778320312500000f,     -0.00457763671875000000f,
-      0.00170898437500000000f,     -0.00292968750000000000f,
-     -0.00201416015625000000f,     -0.00061035156250000000f,
-      0.00006103515625000000f,     -0.00717163085937500000f,
-      0.00180053710937500000f,     -0.00067138671874999989f,
-     -0.00326538085937500000f,      0.00457763671875000000f,
-     -0.00048828125000000000f,     -0.00143432617187500000f,
-     -0.00012207031250000000f,      0.00247192382812500000f,
-     -0.00204467773437500000f,      0.00509643554687500000f,
-      0.00454711914062500000f,      0.00454711914062500000f,
-     -0.00479125976562500000f,      0.00878906250000000000f,
-     -0.00476074218750000000f,     -0.00082397460937500000f,
-     -0.00024414062500000000f,      0.00054931640625000000f,
-      0.00253295898437500040f,     -0.00073242187500000000f,
-     -0.00125122070312500000f,     -0.00509643554687500000f,
-      0.00482177734375000000f,     -0.00305175781250000000f,
-      0.00283813476562499960f,      0.00161743164062500000f,
-      0.00613403320312500000f,      0.00045776367187499995f,
-      0.00128173828125000000f,      0.00811767578125000000f,
-      0.00848388671875000000f,     -0.00036621093750000000f,
-     -0.00018310546875000000f,     -0.00112915039062500000f,
-      0.00259399414062500000f,      0.00018310546875000000f,
-      0.00061035156250000000f,     -0.00573730468750000000f,
-     -0.00827026367187500000f,      0.00326538085937500000f,
-     -0.00039672851562500005f,     -0.00244140625000000000f,
-      0.00155639648437500000f,      0.00616455078125000000f,
-      0.00527954101562500000f,     -0.00210571289062500000f,
-      0.00238037109375000000f,     -0.00573730468750000000f,
-      0.00140380859375000000f,      0.00012207031250000000f,
-      0.00466918945312500000f,      0.00036621093750000000f,
-     -0.00421142578125000000f,      0.00515747070312500000f,
-      0.00015258789062500000f,     -0.00177001953125000000f,
-     -0.00375366210937500000f,     -0.00329589843750000000f,
-     -0.00741577148437500000f,      0.00457763671875000000f,
-      0.00030517578125000000f,     -0.00582885742187500000f,
-      0.00750732421875000000f,     -0.00045776367187499995f,
-      0.00115966796875000000f,      0.00076293945312500000f,
-     -0.00030517578125000000f,      0.00042724609375000000f,
-      0.00186157226562500000f,      0.00152587890625000000f,
-     -0.00628662109375000000f,     -0.00656127929687500000f,
-     -0.00671386718750000000f,      0.00274658203125000000f,
-      0.00015258789062500000f,     -0.00454711914062500000f,
-     -0.00668334960937500090f,      0.00170898437500000000f,
-      0.00433349609375000000f,      0.00073242187500000000f,
-     -0.01147460937500000000f,      0.00234985351562500000f,
-     -0.00244140625000000000f,      0.00228881835937500000f,
-      0.00018310546875000000f,      0.00128173828125000000f,
-     -0.00308227539062500000f,      0.00048828125000000000f,
-      0.00170898437500000000f,      0.00042724609375000000f,
-     -0.00173950195312500000f,      0.00009155273437500000f,
-     -0.00051879882812500000f,      0.00244140625000000000f,
-      0.00173950195312500000f,     -0.00109863281250000000f,
-      0.00268554687499999960f,     -0.00180053710937500000f,
-     -0.00296020507812500000f,     -0.00057983398437500000f,
-     -0.00451660156250000000f,      0.00140380859375000000f,
-     -0.00668334960937500090f,      0.00689697265625000000f,
-      0.00347900390625000000f,     -0.00012207031250000000f,
-     -0.00219726562500000000f,     -0.00045776367187499995f,
-      0.00112915039062500000f,     -0.00149536132812500000f,
-     -0.00085449218750000000f,      0.00753784179687500000f,
-      0.00134277343749999980f,      0.00375366210937500000f,
-      0.00143432617187500000f,     -0.00372314453125000000f,
-     -0.00115966796875000000f,      0.00051879882812500000f,
-      0.00012207031250000000f,     -0.00344848632812500000f,
-     -0.00097656250000000000f,     -0.00683593750000000000f,
-      0.00469970703125000000f,     -0.00408935546875000000f,
-      0.00598144531250000000f,      0.00216674804687500000f,
-     -0.00814819335937500000f,     -0.00259399414062500000f,
-      0.00085449218750000000f,     -0.00213623046875000000f,
-      0.00271606445312500000f,     -0.00366210937499999960f,
-      0.00302124023437500040f,     -0.00006103515625000000f,
-      0.00195312500000000000f,      0.00231933593750000000f,
-     -0.00506591796875000090f,     -0.00146484375000000000f,
-      0.00576782226562500000f,     -0.00106811523437500000f,
-     -0.00280761718750000000f,     -0.00515747070312500000f,
-     -0.00375366210937500000f,      0.01034545898437500000f,
-      0.00115966796875000000f,     -0.00076293945312500000f,
-      0.00115966796875000000f,     -0.00106811523437500000f,
-      0.00686645507812500000f,     -0.00424194335937500000f,
-     -0.00152587890625000000f,     -0.00192260742187500000f,
-      0.00750732421875000000f,      0.00183105468749999980f,
-     -0.00564575195312500000f,     -0.00332641601562499960f,
-     -0.00149536132812500000f,     -0.00161743164062500000f,
-     -0.00509643554687500000f,      0.00155639648437500000f,
-      0.00454711914062500000f,      0.00183105468749999980f,
-     -0.00308227539062500000f,     -0.00100708007812500000f,
-      0.00076293945312500000f,     -0.00231933593750000000f,
-      0.00366210937499999960f,      0.00097656250000000000f,
-     -0.00091552734374999989f,     -0.00253295898437500040f,
-      0.00311279296875000000f,      0.00277709960937500000f,
-     -0.00567626953124999910f,     -0.00796508789062500000f,
-      0.00399780273437500000f,     -0.00601196289062499910f
+     -0.45703125000000000000f,     -0.41406250000000000000f,
+     -0.36718750000000000000f,     -0.31640625000000000000f,
+     -0.25390625000000000000f,     -0.20312500000000003000f,
+     -0.14453125000000000000f,     -0.08593749999999998600f,
+     -0.01953125000000000000f,      0.04296874999999999300f,
+      0.10546875000000000000f,      0.16406250000000000000f,
+      0.23046875000000000000f,      0.29296875000000000000f,
+      0.35546875000000000000f,      0.41406250000000000000f,
+     -0.46874999999999994000f,     -0.45312500000000000000f,
+     -0.39062500000000000000f,     -0.32812500000000000000f,
+     -0.26171875000000000000f,     -0.19140625000000000000f,
+     -0.12500000000000000000f,     -0.06250000000000000000f,
+      0.00000000000000000000f,      0.05859374999999999300f,
+      0.11718749999999999000f,      0.17968750000000000000f,
+      0.24218750000000000000f,      0.30078125000000000000f,
+      0.36718750000000000000f,      0.42578124999999994000f,
+     -0.47265625000000000000f,     -0.45312500000000000000f,
+     -0.39843750000000000000f,     -0.33203125000000000000f,
+     -0.27734375000000000000f,     -0.22656250000000000000f,
+     -0.15234375000000000000f,     -0.09375000000000000000f,
+     -0.01953125000000000000f,      0.03906250000000000000f,
+      0.11328125000000000000f,      0.17578125000000000000f,
+      0.23828125000000000000f,      0.30078125000000000000f,
+      0.35937500000000000000f,      0.41796875000000000000f,
+     -0.46874999999999994000f,     -0.45312500000000000000f,
+     -0.36718750000000000000f,     -0.32421875000000006000f,
+     -0.26953125000000000000f,     -0.22265625000000000000f,
+     -0.17968750000000000000f,     -0.09765625000000000000f,
+     -0.02734375000000000000f,      0.03906250000000000000f,
+      0.10546875000000000000f,      0.16406250000000000000f,
+      0.22656250000000000000f,      0.29296875000000000000f,
+      0.35546875000000000000f,      0.41796875000000000000f,
+     -0.44531250000000000000f,     -0.42578124999999994000f,
+     -0.36718750000000000000f,     -0.30859375000000000000f,
+     -0.25781250000000000000f,     -0.20312500000000003000f,
+     -0.13671875000000000000f,     -0.07031250000000000000f,
+     -0.01562500000000000000f,      0.03515625000000000000f,
+      0.10156250000000001000f,      0.15625000000000000000f,
+      0.20703125000000000000f,      0.25390625000000000000f,
+      0.31640625000000000000f,      0.35937500000000000000f,
+     -0.44531250000000000000f,     -0.42187500000000000000f,
+     -0.37500000000000000000f,     -0.28906250000000000000f,
+     -0.24218750000000000000f,     -0.19531250000000000000f,
+     -0.13281250000000000000f,     -0.07031250000000000000f,
+      0.00000000000000000000f,      0.07031250000000000000f,
+      0.12890625000000000000f,      0.18359375000000000000f,
+      0.23828125000000000000f,      0.30078125000000000000f,
+      0.36718750000000000000f,      0.41796875000000000000f,
+     -0.45312500000000000000f,     -0.42578124999999994000f,
+     -0.38671875000000006000f,     -0.32812500000000000000f,
+     -0.27734375000000000000f,     -0.23437499999999997000f,
+     -0.17187499999999997000f,     -0.11718749999999999000f,
+     -0.03515625000000000000f,      0.01953125000000000000f,
+      0.07031250000000000000f,      0.12890625000000000000f,
+      0.20312500000000003000f,      0.27343750000000000000f,
+      0.34374999999999994000f,      0.41406250000000000000f,
+     -0.46484375000000000000f,     -0.44531250000000000000f,
+     -0.38671875000000006000f,     -0.34765625000000000000f,
+     -0.27734375000000000000f,     -0.23437499999999997000f,
+     -0.19531250000000000000f,     -0.14453125000000000000f,
+     -0.01562500000000000000f,      0.04687500000000000000f,
+      0.10937500000000000000f,      0.17968750000000000000f,
+      0.23437499999999997000f,      0.30078125000000000000f,
+      0.35546875000000000000f,      0.41406250000000000000f,
+     -0.44140625000000000000f,     -0.42578124999999994000f,
+     -0.33984375000000000000f,     -0.30468750000000000000f,
+     -0.26171875000000000000f,     -0.20312500000000003000f,
+     -0.15625000000000000000f,     -0.07421875000000000000f,
+     -0.03125000000000000000f,      0.04687500000000000000f,
+      0.11328125000000000000f,      0.16796875000000000000f,
+      0.22656250000000000000f,      0.29296875000000000000f,
+      0.36718750000000000000f,      0.44140625000000000000f,
+     -0.46484375000000000000f,     -0.44531250000000000000f,
+     -0.34374999999999994000f,     -0.30078125000000000000f,
+     -0.24609375000000000000f,     -0.19140625000000000000f,
+     -0.14062500000000000000f,     -0.08984375000000000000f,
+      0.00390625000000000000f,      0.06640625000000000000f,
+      0.12890625000000000000f,      0.19921875000000000000f,
+      0.26562500000000000000f,      0.31640625000000000000f,
+      0.37890625000000000000f,      0.42578124999999994000f,
+     -0.46484375000000000000f,     -0.44531250000000000000f,
+     -0.39453125000000000000f,     -0.34374999999999994000f,
+     -0.27734375000000000000f,     -0.22265625000000000000f,
+     -0.16406250000000000000f,     -0.06250000000000000000f,
+     -0.00390625000000000000f,      0.04296874999999999300f,
+      0.09375000000000000000f,      0.14843750000000000000f,
+      0.21093750000000000000f,      0.26953125000000000000f,
+      0.35156250000000000000f,      0.42968750000000000000f,
+     -0.45312500000000000000f,     -0.40234375000000000000f,
+     -0.33593750000000000000f,     -0.28515625000000000000f,
+     -0.22265625000000000000f,     -0.16796875000000000000f,
+     -0.10546875000000000000f,     -0.05078125000000000700f,
+      0.00781250000000000000f,      0.06250000000000000000f,
+      0.12109375000000000000f,      0.17578125000000000000f,
+      0.23828125000000000000f,      0.29687500000000000000f,
+      0.35937500000000000000f,      0.42187500000000000000f,
+     -0.45312500000000000000f,     -0.43750000000000000000f,
+     -0.39062500000000000000f,     -0.30078125000000000000f,
+     -0.26562500000000000000f,     -0.19921875000000000000f,
+     -0.16015625000000000000f,     -0.08593749999999998600f,
+     -0.04296874999999999300f,      0.00000000000000000000f,
+      0.06250000000000000000f,      0.14453125000000000000f,
+      0.21875000000000000000f,      0.28125000000000000000f,
+      0.34374999999999994000f,      0.40625000000000006000f,
+     -0.46093750000000000000f,     -0.44140625000000000000f,
+     -0.37500000000000000000f,     -0.32812500000000000000f,
+     -0.26953125000000000000f,     -0.21484375000000000000f,
+     -0.16406250000000000000f,     -0.11718749999999999000f,
+     -0.04687500000000000000f,      0.06640625000000000000f,
+      0.12890625000000000000f,      0.19921875000000000000f,
+      0.27343750000000000000f,      0.32421875000000006000f,
+      0.38281250000000000000f,      0.42968750000000000000f,
+     -0.42578124999999994000f,     -0.40625000000000006000f,
+     -0.35937500000000000000f,     -0.31250000000000000000f,
+     -0.26171875000000000000f,     -0.21875000000000000000f,
+     -0.16015625000000000000f,     -0.10937500000000000000f,
+     -0.05078125000000000700f,      0.00000000000000000000f,
+      0.05468750000000000000f,      0.10937500000000000000f,
+      0.16796875000000000000f,      0.23437499999999997000f,
+      0.33203125000000000000f,      0.40625000000000006000f,
+     -0.43750000000000000000f,     -0.41796875000000000000f,
+     -0.37109375000000000000f,     -0.32031250000000000000f,
+     -0.27734375000000000000f,     -0.22265625000000000000f,
+     -0.17578125000000000000f,     -0.10156250000000001000f,
+     -0.04296874999999999300f,      0.00390625000000000000f,
+      0.10546875000000000000f,      0.16015625000000000000f,
+      0.20703125000000000000f,      0.25781250000000000000f,
+      0.32812500000000000000f,      0.40625000000000006000f,
+     -0.44921875000000006000f,     -0.43359375000000000000f,
+     -0.38671875000000006000f,     -0.35937500000000000000f,
+     -0.24609375000000000000f,     -0.20312500000000003000f,
+     -0.15234375000000000000f,     -0.09375000000000000000f,
+     -0.05078125000000000700f,      0.01953125000000000000f,
+      0.10546875000000000000f,      0.16406250000000000000f,
+      0.23437499999999997000f,      0.30468750000000000000f,
+      0.36328124999999994000f,      0.42578124999999994000f,
+     -0.43750000000000000000f,     -0.42187500000000000000f,
+     -0.37500000000000000000f,     -0.34765625000000000000f,
+     -0.30078125000000000000f,     -0.19921875000000000000f,
+     -0.16015625000000000000f,     -0.08593749999999998600f,
+     -0.04296874999999999300f,      0.05078125000000000700f,
+      0.12109375000000000000f,      0.17187499999999997000f,
+      0.22265625000000000000f,      0.28125000000000000000f,
+      0.33984375000000000000f,      0.41015625000000000000f,
+     -0.43359375000000000000f,     -0.41796875000000000000f,
+     -0.37109375000000000000f,     -0.33984375000000000000f,
+     -0.30078125000000000000f,     -0.19140625000000000000f,
+     -0.14843750000000000000f,     -0.09375000000000000000f,
+     -0.03906250000000000000f,      0.00000000000000000000f,
+      0.05859374999999999300f,      0.11718749999999999000f,
+      0.21093750000000000000f,      0.29296875000000000000f,
+      0.36328124999999994000f,      0.41796875000000000000f,
+     -0.41796875000000000000f,     -0.40234375000000000000f,
+     -0.36328124999999994000f,     -0.28906250000000000000f,
+     -0.20312500000000003000f,     -0.17187499999999997000f,
+     -0.12109375000000000000f,     -0.06250000000000000000f,
+     -0.01171875000000000000f,      0.03906250000000000000f,
+      0.12890625000000000000f,      0.17578125000000000000f,
+      0.22656250000000000000f,      0.27734375000000000000f,
+      0.33203125000000000000f,      0.38281250000000000000f,
+     -0.44921875000000006000f,     -0.43359375000000000000f,
+     -0.38281250000000000000f,     -0.28125000000000000000f,
+     -0.23437499999999997000f,     -0.19140625000000000000f,
+     -0.13671875000000000000f,     -0.09375000000000000000f,
+      0.00390625000000000000f,      0.04296874999999999300f,
+      0.09765625000000000000f,      0.14843750000000000000f,
+      0.21875000000000000000f,      0.31640625000000000000f,
+      0.38281250000000000000f,      0.43750000000000000000f,
+     -0.45312500000000000000f,     -0.43750000000000000000f,
+     -0.39843750000000000000f,     -0.27343750000000000000f,
+     -0.23046875000000000000f,     -0.19140625000000000000f,
+     -0.14062500000000000000f,     -0.09765625000000000000f,
+     -0.02734375000000000000f,      0.01953125000000000000f,
+      0.06640625000000000000f,      0.11718749999999999000f,
+      0.18750000000000000000f,      0.25781250000000000000f,
+      0.33984375000000000000f,      0.40234375000000000000f,
+     -0.44140625000000000000f,     -0.42578124999999994000f,
+     -0.36718750000000000000f,     -0.33593750000000000000f,
+     -0.29296875000000000000f,     -0.25000000000000000000f,
+     -0.20312500000000003000f,     -0.09375000000000000000f,
+     -0.05468750000000000000f,      0.02343750000000000000f,
+      0.08984375000000000000f,      0.16796875000000000000f,
+      0.23828125000000000000f,      0.30078125000000000000f,
+      0.35937500000000000000f,      0.42187500000000000000f,
+     -0.46093750000000000000f,     -0.43750000000000000000f,
+     -0.39062500000000000000f,     -0.35156250000000000000f,
+     -0.25390625000000000000f,     -0.20703125000000000000f,
+     -0.15234375000000000000f,     -0.08593749999999998600f,
+      0.02343750000000000000f,      0.07031250000000000000f,
+      0.12500000000000000000f,      0.19140625000000000000f,
+      0.26171875000000000000f,      0.31640625000000000000f,
+      0.37890625000000000000f,      0.42578124999999994000f,
+     -0.45312500000000000000f,     -0.42578124999999994000f,
+     -0.38671875000000006000f,     -0.31250000000000000000f,
+     -0.26953125000000000000f,     -0.21484375000000000000f,
+     -0.16015625000000000000f,     -0.10546875000000000000f,
+     -0.04296874999999999300f,      0.01171875000000000000f,
+      0.08984375000000000000f,      0.15625000000000000000f,
+      0.23828125000000000000f,      0.31250000000000000000f,
+      0.39453125000000000000f,      0.44140625000000000000f,
+     -0.42968750000000000000f,     -0.41406250000000000000f,
+     -0.35937500000000000000f,     -0.32812500000000000000f,
+     -0.28515625000000000000f,     -0.16406250000000000000f,
+     -0.12109375000000000000f,     -0.06640625000000000000f,
+     -0.00390625000000000000f,      0.03906250000000000000f,
+      0.10156250000000001000f,      0.14453125000000000000f,
+      0.19921875000000000000f,      0.29687500000000000000f,
+      0.38671875000000006000f,      0.44140625000000000000f,
+     -0.45312500000000000000f,     -0.42968750000000000000f,
+     -0.36328124999999994000f,     -0.29296875000000000000f,
+     -0.22265625000000000000f,     -0.16015625000000000000f,
+     -0.08203125000000000000f,     -0.02343750000000000000f,
+      0.03906250000000000000f,      0.09765625000000000000f,
+      0.15625000000000000000f,      0.21093750000000000000f,
+      0.26562500000000000000f,      0.32031250000000000000f,
+      0.37500000000000000000f,      0.42968750000000000000f,
+     -0.45312500000000000000f,     -0.43359375000000000000f,
+     -0.39062500000000000000f,     -0.35937500000000000000f,
+     -0.31640625000000000000f,     -0.17968750000000000000f,
+     -0.12500000000000000000f,     -0.07421875000000000000f,
+     -0.01953125000000000000f,      0.02734375000000000000f,
+      0.09765625000000000000f,      0.16406250000000000000f,
+      0.22656250000000000000f,      0.28906250000000000000f,
+      0.35937500000000000000f,      0.41796875000000000000f,
+     -0.43750000000000000000f,     -0.42578124999999994000f,
+     -0.33593750000000000000f,     -0.30468750000000000000f,
+     -0.26562500000000000000f,     -0.21875000000000000000f,
+     -0.17578125000000000000f,     -0.08593749999999998600f,
+     -0.05078125000000000700f,     -0.00390625000000000000f,
+      0.05078125000000000700f,      0.12500000000000000000f,
+      0.22656250000000000000f,      0.30468750000000000000f,
+      0.35546875000000000000f,      0.41796875000000000000f,
+     -0.42187500000000000000f,     -0.40625000000000006000f,
+     -0.34765625000000000000f,     -0.29687500000000000000f,
+     -0.25781250000000000000f,     -0.20312500000000003000f,
+     -0.14843750000000000000f,     -0.10156250000000001000f,
+     -0.02734375000000000000f,      0.01562500000000000000f,
+      0.07031250000000000000f,      0.11718749999999999000f,
+      0.16796875000000000000f,      0.28906250000000000000f,
+      0.38281250000000000000f,      0.43750000000000000000f,
+     -0.44531250000000000000f,     -0.42968750000000000000f,
+     -0.32031250000000000000f,     -0.28125000000000000000f,
+     -0.23828125000000000000f,     -0.19531250000000000000f,
+     -0.14453125000000000000f,     -0.07812500000000000000f,
+     -0.04296874999999999300f,      0.00390625000000000000f,
+      0.06640625000000000000f,      0.17968750000000000000f,
+      0.24218750000000000000f,      0.30468750000000000000f,
+      0.36328124999999994000f,      0.43750000000000000000f,
+     -0.43750000000000000000f,     -0.42187500000000000000f,
+     -0.38671875000000006000f,     -0.30078125000000000000f,
+     -0.25781250000000000000f,     -0.22656250000000000000f,
+     -0.12890625000000000000f,     -0.08593749999999998600f,
+     -0.04296874999999999300f,      0.05078125000000000700f,
+      0.09765625000000000000f,      0.13671875000000000000f,
+      0.18359375000000000000f,      0.25000000000000000000f,
+      0.33984375000000000000f,      0.42187500000000000000f,
+     -0.44140625000000000000f,     -0.42578124999999994000f,
+     -0.37500000000000000000f,     -0.27343750000000000000f,
+     -0.23046875000000000000f,     -0.19140625000000000000f,
+     -0.13671875000000000000f,     -0.09375000000000000000f,
+     -0.02343750000000000000f,      0.02734375000000000000f,
+      0.07421875000000000000f,      0.13281250000000000000f,
+      0.25390625000000000000f,      0.30859375000000000000f,
+      0.36718750000000000000f,      0.41406250000000000000f,
+     -0.44921875000000006000f,     -0.43359375000000000000f,
+     -0.37500000000000000000f,     -0.33203125000000000000f,
+     -0.28125000000000000000f,     -0.23046875000000000000f,
+     -0.18359375000000000000f,     -0.12890625000000000000f,
+     -0.07812500000000000000f,     -0.03125000000000000000f,
+      0.03125000000000000000f,      0.13671875000000000000f,
+      0.21875000000000000000f,      0.28906250000000000000f,
+      0.35937500000000000000f,      0.42968750000000000000f,
+     -0.43359375000000000000f,     -0.42187500000000000000f,
+     -0.35937500000000000000f,     -0.25390625000000000000f,
+     -0.21093750000000000000f,     -0.17578125000000000000f,
+     -0.12109375000000000000f,     -0.07812500000000000000f,
+     -0.00781250000000000000f,      0.04296874999999999300f,
+      0.08984375000000000000f,      0.13281250000000000000f,
+      0.18359375000000000000f,      0.24609375000000000000f,
+      0.37500000000000000000f,      0.44531250000000000000f,
+     -0.44140625000000000000f,     -0.42187500000000000000f,
+     -0.38281250000000000000f,     -0.33984375000000000000f,
+     -0.30859375000000000000f,     -0.26562500000000000000f,
+     -0.12500000000000000000f,     -0.07421875000000000000f,
+     -0.01953125000000000000f,      0.04687500000000000000f,
+      0.09765625000000000000f,      0.16015625000000000000f,
+      0.23437499999999997000f,      0.30078125000000000000f,
+      0.37500000000000000000f,      0.42578124999999994000f,
+     -0.44921875000000006000f,     -0.42578124999999994000f,
+     -0.37500000000000000000f,     -0.32031250000000000000f,
+     -0.22656250000000000000f,     -0.18750000000000000000f,
+     -0.13281250000000000000f,     -0.06640625000000000000f,
+     -0.01562500000000000000f,      0.03515625000000000000f,
+      0.14062500000000000000f,      0.19531250000000000000f,
+      0.25390625000000000000f,      0.30859375000000000000f,
+      0.37890625000000000000f,      0.42578124999999994000f,
+     -0.44921875000000006000f,     -0.42968750000000000000f,
+     -0.39062500000000000000f,     -0.34374999999999994000f,
+     -0.21875000000000000000f,     -0.17578125000000000000f,
+     -0.13281250000000000000f,     -0.08203125000000000000f,
+     -0.02734375000000000000f,      0.02734375000000000000f,
+      0.09375000000000000000f,      0.14453125000000000000f,
+      0.19531250000000000000f,      0.25000000000000000000f,
+      0.33593750000000000000f,      0.41796875000000000000f,
+     -0.40625000000000006000f,     -0.38281250000000000000f,
+     -0.34374999999999994000f,     -0.30078125000000000000f,
+     -0.23437499999999997000f,     -0.19921875000000000000f,
+     -0.14453125000000000000f,     -0.07031250000000000000f,
+     -0.01171875000000000000f,      0.03125000000000000000f,
+      0.09765625000000000000f,      0.15625000000000000000f,
+      0.20703125000000000000f,      0.26562500000000000000f,
+      0.35546875000000000000f,      0.41796875000000000000f,
+     -0.46093750000000000000f,     -0.44140625000000000000f,
+     -0.37890625000000000000f,     -0.33203125000000000000f,
+     -0.28906250000000000000f,     -0.24218750000000000000f,
+     -0.19921875000000000000f,     -0.15625000000000000000f,
+     -0.09765625000000000000f,      0.01562500000000000000f,
+      0.09375000000000000000f,      0.15625000000000000000f,
+      0.22265625000000000000f,      0.29296875000000000000f,
+      0.35937500000000000000f,      0.42578124999999994000f,
+     -0.41796875000000000000f,     -0.40234375000000000000f,
+     -0.35937500000000000000f,     -0.32421875000000006000f,
+     -0.28906250000000000000f,     -0.24218750000000000000f,
+     -0.10937500000000000000f,     -0.07031250000000000000f,
+     -0.01562500000000000000f,      0.03515625000000000000f,
+      0.08593749999999998600f,      0.13281250000000000000f,
+      0.19531250000000000000f,      0.26171875000000000000f,
+      0.33984375000000000000f,      0.41796875000000000000f,
+     -0.45312500000000000000f,     -0.43750000000000000000f,
+     -0.29296875000000000000f,     -0.26171875000000000000f,
+     -0.21875000000000000000f,     -0.17578125000000000000f,
+     -0.12109375000000000000f,     -0.06250000000000000000f,
+     -0.01953125000000000000f,      0.03906250000000000000f,
+      0.11718749999999999000f,      0.17578125000000000000f,
+      0.24609375000000000000f,      0.30859375000000000000f,
+      0.37500000000000000000f,      0.43359375000000000000f,
+     -0.41406250000000000000f,     -0.39843750000000000000f,
+     -0.34374999999999994000f,     -0.30078125000000000000f,
+     -0.26562500000000000000f,     -0.20312500000000003000f,
+     -0.14843750000000000000f,     -0.09765625000000000000f,
+     -0.01562500000000000000f,      0.02734375000000000000f,
+      0.08984375000000000000f,      0.14062500000000000000f,
+      0.25781250000000000000f,      0.32812500000000000000f,
+      0.38281250000000000000f,      0.43359375000000000000f,
+     -0.40234375000000000000f,     -0.38671875000000006000f,
+     -0.33984375000000000000f,     -0.29687500000000000000f,
+     -0.25781250000000000000f,     -0.21875000000000000000f,
+     -0.11328125000000000000f,     -0.05078125000000000700f,
+      0.00000000000000000000f,      0.05468750000000000000f,
+      0.12109375000000000000f,      0.16406250000000000000f,
+      0.22265625000000000000f,      0.27734375000000000000f,
+      0.33203125000000000000f,      0.37500000000000000000f,
+     -0.44531250000000000000f,     -0.43359375000000000000f,
+     -0.35546875000000000000f,     -0.22656250000000000000f,
+     -0.18359375000000000000f,     -0.14843750000000000000f,
+     -0.10156250000000001000f,     -0.05468750000000000000f,
+      0.01171875000000000000f,      0.05078125000000000700f,
+      0.10156250000000001000f,      0.15625000000000000000f,
+      0.24218750000000000000f,      0.31250000000000000000f,
+      0.37500000000000000000f,      0.42968750000000000000f,
+     -0.44531250000000000000f,     -0.42968750000000000000f,
+     -0.35156250000000000000f,     -0.32421875000000006000f,
+     -0.28125000000000000000f,     -0.25000000000000000000f,
+     -0.14062500000000000000f,     -0.09375000000000000000f,
+     -0.05078125000000000700f,      0.02343750000000000000f,
+      0.10937500000000000000f,      0.19140625000000000000f,
+      0.25781250000000000000f,      0.31640625000000000000f,
+      0.37890625000000000000f,      0.43750000000000000000f,
+     -0.42578124999999994000f,     -0.41015625000000000000f,
+     -0.35546875000000000000f,     -0.32031250000000000000f,
+     -0.27734375000000000000f,     -0.19921875000000000000f,
+     -0.14843750000000000000f,     -0.09375000000000000000f,
+     -0.03906250000000000000f,      0.00390625000000000000f,
+      0.07812500000000000000f,      0.19140625000000000000f,
+      0.25000000000000000000f,      0.30468750000000000000f,
+      0.35546875000000000000f,      0.41406250000000000000f,
+     -0.43359375000000000000f,     -0.41796875000000000000f,
+     -0.35156250000000000000f,     -0.32031250000000000000f,
+     -0.27343750000000000000f,     -0.23437499999999997000f,
+     -0.19140625000000000000f,     -0.04687500000000000000f,
+      0.00000000000000000000f,      0.04296874999999999300f,
+      0.09765625000000000000f,      0.14453125000000000000f,
+      0.23437499999999997000f,      0.32031250000000000000f,
+      0.39453125000000000000f,      0.44531250000000000000f,
+     -0.43359375000000000000f,     -0.41796875000000000000f,
+     -0.36328124999999994000f,     -0.28125000000000000000f,
+     -0.16406250000000000000f,     -0.11718749999999999000f,
+     -0.07812500000000000000f,     -0.03125000000000000000f,
+      0.01562500000000000000f,      0.06250000000000000000f,
+      0.13281250000000000000f,      0.17968750000000000000f,
+      0.22656250000000000000f,      0.27343750000000000000f,
+      0.33203125000000000000f,      0.38281250000000000000f,
+     -0.43750000000000000000f,     -0.42578124999999994000f,
+     -0.31250000000000000000f,     -0.25390625000000000000f,
+     -0.21875000000000000000f,     -0.17187499999999997000f,
+     -0.12890625000000000000f,     -0.06640625000000000000f,
+     -0.01171875000000000000f,      0.03125000000000000000f,
+      0.07812500000000000000f,      0.12109375000000000000f,
+      0.19140625000000000000f,      0.30859375000000000000f,
+      0.38281250000000000000f,      0.43750000000000000000f,
+     -0.40625000000000006000f,     -0.38281250000000000000f,
+     -0.32812500000000000000f,     -0.28125000000000000000f,
+     -0.23046875000000000000f,     -0.17578125000000000000f,
+     -0.12109375000000000000f,     -0.07031250000000000000f,
+     -0.00390625000000000000f,      0.04687500000000000000f,
+      0.12109375000000000000f,      0.18359375000000000000f,
+      0.25000000000000000000f,      0.31640625000000000000f,
+      0.38281250000000000000f,      0.42968750000000000000f,
+     -0.42968750000000000000f,     -0.41406250000000000000f,
+     -0.35937500000000000000f,     -0.30859375000000000000f,
+     -0.27343750000000000000f,     -0.23046875000000000000f,
+     -0.19140625000000000000f,     -0.15234375000000000000f,
+     -0.00390625000000000000f,      0.04296874999999999300f,
+      0.08593749999999998600f,      0.13671875000000000000f,
+      0.20312500000000003000f,      0.26953125000000000000f,
+      0.34765625000000000000f,      0.42578124999999994000f,
+     -0.44140625000000000000f,     -0.42578124999999994000f,
+     -0.39453125000000000000f,     -0.37109375000000000000f,
+     -0.21875000000000000000f,     -0.17187499999999997000f,
+     -0.11328125000000000000f,     -0.06250000000000000000f,
+     -0.00781250000000000000f,      0.07031250000000000000f,
+      0.12890625000000000000f,      0.18750000000000000000f,
+      0.24609375000000000000f,      0.30468750000000000000f,
+      0.37109375000000000000f,      0.42968750000000000000f,
+     -0.42578124999999994000f,     -0.41406250000000000000f,
+     -0.36718750000000000000f,     -0.33984375000000000000f,
+     -0.28906250000000000000f,     -0.16015625000000000000f,
+     -0.11328125000000000000f,     -0.05468750000000000000f,
+      0.00390625000000000000f,      0.05078125000000000700f,
+      0.10937500000000000000f,      0.18359375000000000000f,
+      0.26953125000000000000f,      0.32812500000000000000f,
+      0.38671875000000006000f,      0.43359375000000000000f,
+     -0.44921875000000006000f,     -0.42968750000000000000f,
+     -0.39453125000000000000f,     -0.32812500000000000000f,
+     -0.19531250000000000000f,     -0.12500000000000000000f,
+     -0.08593749999999998600f,     -0.04296874999999999300f,
+      0.00390625000000000000f,      0.05078125000000000700f,
+      0.11718749999999999000f,      0.17578125000000000000f,
+      0.22656250000000000000f,      0.28125000000000000000f,
+      0.34765625000000000000f,      0.41796875000000000000f,
+     -0.41406250000000000000f,     -0.39843750000000000000f,
+     -0.34765625000000000000f,     -0.29296875000000000000f,
+     -0.25000000000000000000f,     -0.21484375000000000000f,
+     -0.17187499999999997000f,     -0.13281250000000000000f,
+     -0.05078125000000000700f,      0.06250000000000000000f,
+      0.12500000000000000000f,      0.16796875000000000000f,
+      0.23046875000000000000f,      0.28515625000000000000f,
+      0.33593750000000000000f,      0.39062500000000000000f,
+     -0.43359375000000000000f,     -0.41796875000000000000f,
+     -0.36718750000000000000f,     -0.27343750000000000000f,
+     -0.21484375000000000000f,     -0.17968750000000000000f,
+     -0.12890625000000000000f,     -0.08203125000000000000f,
+     -0.02734375000000000000f,      0.01953125000000000000f,
+      0.07421875000000000000f,      0.12109375000000000000f,
+      0.16796875000000000000f,      0.21484375000000000000f,
+      0.27343750000000000000f,      0.40234375000000000000f,
+     -0.39843750000000000000f,     -0.37890625000000000000f,
+     -0.31250000000000000000f,     -0.27734375000000000000f,
+     -0.23437499999999997000f,     -0.19140625000000000000f,
+     -0.14062500000000000000f,     -0.09375000000000000000f,
+     -0.03125000000000000000f,      0.01562500000000000000f,
+      0.07421875000000000000f,      0.12500000000000000000f,
+      0.18750000000000000000f,      0.24609375000000000000f,
+      0.30859375000000000000f,      0.39062500000000000000f,
+     -0.44140625000000000000f,     -0.42578124999999994000f,
+     -0.35156250000000000000f,     -0.29687500000000000000f,
+     -0.25781250000000000000f,     -0.20703125000000000000f,
+     -0.16015625000000000000f,     -0.11328125000000000000f,
+     -0.06250000000000000000f,     -0.02734375000000000000f,
+      0.01953125000000000000f,      0.05859374999999999300f,
+      0.16406250000000000000f,      0.26953125000000000000f,
+      0.34765625000000000000f,      0.42187500000000000000f,
+     -0.42187500000000000000f,     -0.41015625000000000000f,
+     -0.36328124999999994000f,     -0.33203125000000000000f,
+     -0.29687500000000000000f,     -0.24218750000000000000f,
+     -0.08984375000000000000f,     -0.03125000000000000000f,
+      0.01562500000000000000f,      0.07031250000000000000f,
+      0.12890625000000000000f,      0.17578125000000000000f,
+      0.23437499999999997000f,      0.28906250000000000000f,
+      0.35156250000000000000f,      0.41015625000000000000f,
+     -0.44531250000000000000f,     -0.42968750000000000000f,
+     -0.34765625000000000000f,     -0.23828125000000000000f,
+     -0.20312500000000003000f,     -0.16406250000000000000f,
+     -0.11718749999999999000f,     -0.07031250000000000000f,
+     -0.01562500000000000000f,      0.05078125000000000700f,
+      0.10156250000000001000f,      0.15234375000000000000f,
+      0.20703125000000000000f,      0.26171875000000000000f,
+      0.31640625000000000000f,      0.37500000000000000000f,
+     -0.38671875000000006000f,     -0.37109375000000000000f,
+     -0.33593750000000000000f,     -0.30078125000000000000f,
+     -0.26953125000000000000f,     -0.23437499999999997000f,
+     -0.12500000000000000000f,     -0.05859374999999999300f,
+     -0.00781250000000000000f,      0.05859374999999999300f,
+      0.13671875000000000000f,      0.18359375000000000000f,
+      0.25000000000000000000f,      0.31250000000000000000f,
+      0.37500000000000000000f,      0.42968750000000000000f,
+     -0.44921875000000006000f,     -0.41015625000000000000f,
+     -0.31250000000000000000f,     -0.23828125000000000000f,
+     -0.16796875000000000000f,     -0.10546875000000000000f,
+     -0.05468750000000000000f,     -0.00390625000000000000f,
+      0.05078125000000000700f,      0.10156250000000001000f,
+      0.15625000000000000000f,      0.20703125000000000000f,
+      0.26171875000000000000f,      0.31250000000000000000f,
+      0.37109375000000000000f,      0.42968750000000000000f,
+     -0.39062500000000000000f,     -0.35546875000000000000f,
+     -0.28125000000000000000f,     -0.23046875000000000000f,
+     -0.18750000000000000000f,     -0.14843750000000000000f,
+     -0.09765625000000000000f,     -0.05078125000000000700f,
+      0.00390625000000000000f,      0.05859374999999999300f,
+      0.10937500000000000000f,      0.15234375000000000000f,
+      0.22656250000000000000f,      0.29296875000000000000f,
+      0.35546875000000000000f,      0.41015625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+     -0.01953125000000000000f,     -0.01953125000000000000f,
+     -0.02734375000000000000f,     -0.03125000000000000000f,
+     -0.01953125000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.02343750000000000000f,
+     -0.03125000000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+     -0.02343750000000000000f,      0.01562500000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.03515625000000000000f,      0.02734375000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.00781250000000000000f,
+     -0.01953125000000000000f,     -0.02343750000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01562500000000000000f,     -0.03125000000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+     -0.01953125000000000000f,     -0.02734375000000000000f,
+     -0.03515625000000000000f,      0.01562500000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+     -0.00390625000000000000f,      0.03515625000000000000f,
+      0.02734375000000000000f,      0.02343750000000000000f,
+      0.01953125000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.01562500000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.03125000000000000000f,      0.03125000000000000000f,
+      0.02343750000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.02343750000000000000f,
+      0.02343750000000000000f,      0.02343750000000000000f,
+      0.02734375000000000000f,      0.02343750000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.01562500000000000000f,
+     -0.02734375000000000000f,     -0.03906250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01562500000000000000f,     -0.01953125000000000000f,
+      0.03125000000000000000f,      0.01953125000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01171875000000000000f,
+     -0.02343750000000000000f,     -0.03906250000000000000f,
+     -0.03906250000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01953125000000000000f,
+     -0.03125000000000000000f,     -0.03515625000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01171875000000000000f,
+      0.03906250000000000000f,      0.03515625000000000000f,
+      0.02734375000000000000f,      0.01562500000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+      0.03515625000000000000f,      0.02734375000000000000f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+     -0.01171875000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01953125000000000000f,
+     -0.02343750000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.01562500000000000000f,     -0.01562500000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.01562500000000000000f,      0.01953125000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+      0.00000000000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,     -0.01953125000000000000f,
+     -0.02734375000000000000f,      0.01953125000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.02343750000000000000f,     -0.02734375000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.02734375000000000000f,      0.01953125000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.01953125000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01953125000000000000f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.01562500000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01562500000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.02343750000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01562500000000000000f,     -0.02343750000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01562500000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01562500000000000000f,      0.01562500000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.01171875000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01562500000000000000f,      0.01953125000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01953125000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.01562500000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01562500000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.01562500000000000000f,
+      0.00781250000000000000f,      0.01562500000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+      0.01171875000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.01171875000000000000f,      0.01562500000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,     -0.01171875000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f
 };
 
 const SKP_Silk_NLSF_CBS_FLP SKP_Silk_NLSF_CB0_16_Stage_info_FLP[ NLSF_MSVQ_CB0_16_STAGES ] =
 {
-        { 128, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 *   0 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[   0 ] },
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 128 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 128 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 144 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 144 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 152 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 152 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 160 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 160 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 168 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 168 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 176 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 176 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 184 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 184 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 192 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 192 ] },
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 200 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 200 ] }
+        {  64, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 *   0 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[   0 ] },
+        {  16, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 *  64 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[  64 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 *  80 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[  80 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 *  88 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[  88 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 *  96 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[  96 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 104 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 104 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 112 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 112 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 120 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 120 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 128 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 128 ] },
+        {  16, &SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * 136 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates[ 136 ] }
 };
 
 const SKP_Silk_NLSF_CB_FLP SKP_Silk_NLSF_CB0_16_FLP =
--- a/src_FLP/SKP_Silk_tables_NLSF_CB1_10_FLP.c
+++ b/src_FLP/SKP_Silk_tables_NLSF_CB1_10_FLP.c
@@ -28,7 +28,7 @@
 /**********************************************/
 /* This file has been automatically generated */
 /*                                            */
-/* ROM usage:  3.21 kB                        */
+/* ROM usage:  3.56 kB                        */
 /**********************************************/
 
 #include "SKP_Silk_tables_FLP.h"
@@ -36,421 +36,465 @@
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB1_10_rates[ NLSF_MSVQ_CB1_10_VECTORS ] =
 {
-      1.93750000000000000000f,      3.21875000000000000000f,
-      3.75000000000000000000f,      3.96875000000000000000f,
-      4.21875000000000000000f,      4.21875000000000000000f,
-      4.84375000000000000000f,      5.21875000000000000000f,
-      5.25000000000000000000f,      5.37500000000000000000f,
-      5.40625000000000000000f,      5.50000000000000000000f,
-      5.59375000000000000000f,      5.65625000000000000000f,
-      5.65625000000000000000f,      5.78125000000000000000f,
-      5.81250000000000000000f,      6.18750000000000000000f,
-      6.21875000000000000000f,      6.34375000000000000000f,
-      6.40625000000000000000f,      6.93750000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      1.68750000000000000000f,      2.37500000000000000000f,
-      3.15625000000000000000f,      3.37500000000000000000f,
-      3.71875000000000000000f,      3.75000000000000000000f,
-      3.84375000000000000000f,      3.90625000000000000000f,
-      2.12500000000000000000f,      2.65625000000000000000f,
-      2.71875000000000000000f,      3.21875000000000000000f,
-      3.34375000000000000000f,      3.50000000000000000000f,
-      3.59375000000000000000f,      3.62500000000000000000f,
-      2.43750000000000000000f,      2.65625000000000000000f,
-      2.65625000000000000000f,      3.15625000000000000000f,
-      3.28125000000000000000f,      3.28125000000000000000f,
-      3.43750000000000000000f,      3.46875000000000000000f,
-      2.59375000000000000000f,      2.84375000000000000000f,
-      3.03125000000000000000f,      3.03125000000000000000f,
-      3.03125000000000000000f,      3.12500000000000000000f,
-      3.15625000000000000000f,      3.28125000000000000000f,
-      2.87500000000000000000f,      2.90625000000000000000f,
-      2.90625000000000000000f,      2.96875000000000000000f,
-      3.00000000000000000000f,      3.06250000000000000000f,
-      3.09375000000000000000f,      3.21875000000000000000f
+      1.62500000000000000000f,      3.18750000000000000000f,
+      3.43750000000000000000f,      4.00000000000000000000f,
+      4.75000000000000000000f,      4.81250000000000000000f,
+      5.00000000000000000000f,      5.31250000000000000000f,
+      5.43750000000000000000f,      5.62500000000000000000f,
+      5.68750000000000000000f,      5.75000000000000000000f,
+      5.75000000000000000000f,      6.12500000000000000000f,
+      6.18750000000000000000f,      6.31250000000000000000f,
+      6.37500000000000000000f,      6.43750000000000000000f,
+      6.43750000000000000000f,      6.50000000000000000000f,
+      6.56250000000000000000f,      6.75000000000000000000f,
+      6.93750000000000000000f,      7.06250000000000000000f,
+      7.06250000000000000000f,      7.06250000000000000000f,
+      7.06250000000000000000f,      7.06250000000000000000f,
+      7.06250000000000000000f,      7.06250000000000000000f,
+      7.06250000000000000000f,      7.06250000000000000000f,
+      0.93750000000000000000f,      2.87500000000000000000f,
+      3.68750000000000000000f,      4.00000000000000000000f,
+      4.25000000000000000000f,      4.25000000000000000000f,
+      4.25000000000000000000f,      4.37500000000000000000f,
+      1.12500000000000000000f,      2.62500000000000000000f,
+      3.50000000000000000000f,      3.93750000000000000000f,
+      4.00000000000000000000f,      4.18750000000000000000f,
+      4.25000000000000000000f,      4.25000000000000000000f,
+      1.06250000000000000000f,      3.18750000000000000000f,
+      3.62500000000000000000f,      3.75000000000000000000f,
+      3.87500000000000000000f,      3.93750000000000000000f,
+      3.93750000000000000000f,      4.25000000000000000000f,
+      2.18750000000000000000f,      2.56250000000000000000f,
+      2.75000000000000000000f,      2.87500000000000000000f,
+      2.93750000000000000000f,      3.56250000000000000000f,
+      4.06250000000000000000f,      4.31250000000000000000f,
+      1.31250000000000000000f,      2.75000000000000000000f,
+      2.93750000000000000000f,      3.62500000000000000000f,
+      3.93750000000000000000f,      4.00000000000000000000f,
+      4.12500000000000000000f,      4.12500000000000000000f,
+      1.68750000000000000000f,      2.50000000000000000000f,
+      3.25000000000000000000f,      3.37500000000000000000f,
+      3.37500000000000000000f,      3.43750000000000000000f,
+      3.56250000000000000000f,      4.31250000000000000000f
 };
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB1_10_ndelta_min[ 10 + 1 ] =
 {
-      0.01409912109375000000f,
+      0.00894165039062500000f,
+      0.00097656250000000000f,
+      0.00686645507812500000f,
+      0.00854492187500000000f,
+      0.00466918945312500000f,
+      0.00070190429687500000f,
+      0.00039672851562500005f,
+      0.00042724609375000000f,
+      0.00027465820312500000f,
       0.00009155273437500000f,
-      0.00195312500000000000f,
-      0.00225830078125000000f,
-      0.00299072265625000000f,
-      0.00152587890625000000f,
-      0.00296020507812500000f,
-      0.00207519531250000000f,
-      0.00366210937499999960f,
-      0.00161743164062500000f,
-      0.01950073242187500000f
+      0.02099609375000000000f
 };
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB1_10[ 10 * NLSF_MSVQ_CB1_10_VECTORS ] =
 {
-      0.05728149414062500000f,      0.14178466796875000000f,
-      0.23535156250000003000f,      0.32791137695312500000f,
-      0.42614746093750000000f,      0.51965332031250000000f,
-      0.61764526367187500000f,      0.70745849609375000000f,
-      0.80783081054687511000f,      0.89376831054687500000f,
-      0.04919433593750000000f,      0.10003662109375001000f,
-      0.21624755859374997000f,      0.30441284179687500000f,
-      0.40368652343750000000f,      0.49633789062499994000f,
-      0.59802246093750000000f,      0.69244384765625011000f,
-      0.79458618164062500000f,      0.88394165039062500000f,
-      0.06619262695312500000f,      0.11688232421875000000f,
-      0.19714355468750000000f,      0.27337646484375000000f,
-      0.36499023437500000000f,      0.45013427734375000000f,
-      0.56176757812500000000f,      0.66098022460937500000f,
-      0.76348876953125000000f,      0.85580444335937489000f,
-      0.11230468750000001000f,      0.18383789062500000000f,
-      0.27423095703125000000f,      0.37402343749999994000f,
-      0.46389770507812494000f,      0.55505371093750000000f,
-      0.66348266601562500000f,      0.74645996093750000000f,
-      0.83874511718749989000f,      0.91732788085937500000f,
-      0.07885742187500000000f,      0.15829467773437500000f,
-      0.23800659179687500000f,      0.33270263671874994000f,
-      0.40219116210937500000f,      0.48110961914062500000f,
-      0.58035278320312500000f,      0.68453979492187500000f,
-      0.79013061523437500000f,      0.87579345703125000000f,
-      0.11386108398437500000f,      0.17550659179687500000f,
-      0.26397705078125000000f,      0.35833740234375000000f,
-      0.46051025390625000000f,      0.53121948242187500000f,
-      0.62228393554687500000f,      0.71475219726562500000f,
-      0.80041503906250000000f,      0.89254760742187511000f,
-      0.06430053710937500000f,      0.19296264648437500000f,
-      0.27206420898437500000f,      0.37310791015625000000f,
-      0.45089721679687500000f,      0.54293823242187500000f,
-      0.63061523437500000000f,      0.72262573242187500000f,
-      0.81875610351562500000f,      0.89578247070312500000f,
-      0.05117797851562500000f,      0.08758544921875000000f,
-      0.16436767578125000000f,      0.24649047851562500000f,
-      0.36062622070312500000f,      0.46313476562500000000f,
-      0.56936645507812500000f,      0.67156982421875011000f,
-      0.77859497070312500000f,      0.87551879882812500000f,
-      0.06442260742187500000f,      0.11062622070312501000f,
-      0.21444702148437500000f,      0.32312011718750000000f,
-      0.42904663085937500000f,      0.52468872070312500000f,
-      0.64505004882812489000f,      0.74035644531250000000f,
-      0.84158325195312500000f,      0.91662597656250011000f,
-      0.07409667968750000000f,      0.12237548828125000000f,
-      0.17593383789062500000f,      0.28613281250000000000f,
-      0.42129516601562500000f,      0.48281860351562500000f,
-      0.59338378906250000000f,      0.68325805664062511000f,
-      0.77194213867187500000f,      0.89447021484375000000f,
-      0.06884765625000000000f,      0.14123535156250000000f,
-      0.25564575195312500000f,      0.37966918945312500000f,
-      0.46640014648437500000f,      0.59393310546875000000f,
-      0.67922973632812500000f,      0.77975463867187489000f,
-      0.86767578124999989000f,      0.92480468750000000000f,
-      0.07177734375000000000f,      0.11215209960937499000f,
-      0.18704223632812500000f,      0.36218261718750000000f,
-      0.44406127929687494000f,      0.50827026367187500000f,
-      0.59887695312500000000f,      0.66781616210937500000f,
-      0.80950927734375000000f,      0.88040161132812500000f,
-      0.16000366210937500000f,      0.22119140625000000000f,
-      0.32220458984375000000f,      0.40493774414062500000f,
-      0.47763061523437506000f,      0.54684448242187500000f,
-      0.64517211914062500000f,      0.72714233398437500000f,
-      0.82708740234375000000f,      0.90084838867187489000f,
-      0.13494873046875000000f,      0.20523071289062500000f,
-      0.31887817382812500000f,      0.40505981445312500000f,
-      0.49206542968750000000f,      0.60794067382812500000f,
-      0.69659423828124989000f,      0.79531860351562500000f,
-      0.87777709960937500000f,      0.93331909179687500000f,
-      0.13757324218750000000f,      0.19198608398437500000f,
-      0.29003906250000000000f,      0.36038208007812506000f,
-      0.42196655273437500000f,      0.48675537109375000000f,
-      0.58218383789062500000f,      0.67395019531250000000f,
-      0.78552246093750000000f,      0.87457275390625000000f,
-      0.07751464843750000000f,      0.13113403320312500000f,
-      0.26181030273437500000f,      0.41436767578125000000f,
-      0.50762939453125000000f,      0.58291625976562500000f,
-      0.65756225585937500000f,      0.72897338867187500000f,
-      0.81716918945312489000f,      0.88946533203125000000f,
-      0.10305786132812501000f,      0.19403076171875003000f,
-      0.31201171875000000000f,      0.44305419921875000000f,
-      0.54641723632812500000f,      0.64257812500000000000f,
-      0.72134399414062500000f,      0.78686523437500011000f,
-      0.85940551757812500000f,      0.91885375976562500000f,
-      0.12747192382812500000f,      0.18133544921875000000f,
-      0.24899291992187497000f,      0.30847167968750000000f,
-      0.37017822265625000000f,      0.47210693359375000000f,
-      0.61618041992187500000f,      0.71185302734375000000f,
-      0.81732177734375000000f,      0.89596557617187500000f,
-      0.07604980468750000000f,      0.11599731445312501000f,
-      0.18750000000000000000f,      0.29983520507812500000f,
-      0.48828124999999994000f,      0.56979370117187500000f,
-      0.63760375976562489000f,      0.72213745117187500000f,
-      0.79037475585937500000f,      0.88421630859374989000f,
-      0.09188842773437500000f,      0.14425659179687500000f,
-      0.20855712890625000000f,      0.32058715820312500000f,
-      0.38040161132812500000f,      0.44238281250000000000f,
-      0.52078247070312500000f,      0.61193847656250000000f,
-      0.77102661132812500000f,      0.85623168945312500000f,
-      0.12661743164062500000f,      0.21963500976562500000f,
-      0.37652587890625000000f,      0.46008300781249994000f,
-      0.54937744140625000000f,      0.61614990234375000000f,
-      0.67709350585937500000f,      0.75448608398437500000f,
-      0.82650756835937500000f,      0.88882446289062511000f,
-      0.09078979492187500000f,      0.13970947265625000000f,
-      0.19677734375000000000f,      0.25567626953125000000f,
-      0.29513549804687500000f,      0.40359497070312500000f,
-      0.59515380859375000000f,      0.67984008789062500000f,
-      0.79522705078125000000f,      0.88043212890625000000f,
-      0.12518310546875000000f,      0.17578125000000000000f,
-      0.23632812500000000000f,      0.28942871093750000000f,
-      0.32788085937500000000f,      0.37561035156250000000f,
-      0.44790649414062500000f,      0.59835815429687500000f,
-      0.75808715820312500000f,      0.86611938476562489000f,
-      0.15048217773437500000f,      0.28341674804687500000f,
-      0.38076782226562500000f,      0.40878295898437500000f,
-      0.41845703125000000000f,      0.43795776367187506000f,
-      0.48974609375000000000f,      0.60629272460937500000f,
-      0.73815917968750000000f,      0.88482666015624989000f,
-      0.12637329101562500000f,      0.24008178710937500000f,
-      0.40100097656250000000f,      0.54077148437500000000f,
-      0.61230468750000000000f,      0.64416503906250000000f,
-      0.66198730468750000000f,      0.69342041015625000000f,
-      0.72436523437500000000f,      0.83767700195312500000f,
-      0.12240600585937499000f,      0.26611328125000000000f,
-      0.40386962890625006000f,      0.49456787109375006000f,
-      0.53713989257812500000f,      0.55813598632812500000f,
-      0.56530761718750000000f,      0.60086059570312500000f,
-      0.70904541015625000000f,      0.85089111328125000000f,
-      0.10437011718750000000f,      0.18295288085937500000f,
-      0.34271240234375006000f,      0.46133422851562500000f,
-      0.48544311523437500000f,      0.51217651367187500000f,
-      0.54205322265625000000f,      0.71249389648437500000f,
-      0.82086181640625000000f,      0.91387939453125000000f,
-      0.09399414062500001400f,      0.20709228515625000000f,
-      0.31936645507812506000f,      0.41735839843750000000f,
-      0.55111694335937500000f,      0.72067260742187489000f,
-      0.82574462890624989000f,      0.88751220703124989000f,
-      0.90219116210937500000f,      0.91262817382812500000f,
-      0.09271240234375000000f,      0.17150878906250003000f,
-      0.28277587890625000000f,      0.39276123046875000000f,
-      0.57382202148437500000f,      0.59844970703125000000f,
-      0.61065673828125000000f,      0.63482666015625000000f,
-      0.72882080078125011000f,      0.89434814453125000000f,
-      0.10113525390625000000f,      0.19592285156250000000f,
-      0.27606201171875000000f,      0.40472412109375000000f,
-      0.48428344726562500000f,      0.70547485351562500000f,
-      0.72225952148437500000f,      0.73898315429687500000f,
-      0.74728393554687500000f,      0.79086303710937500000f,
-      0.10586547851562500000f,      0.21249389648437500000f,
-      0.30831909179687500000f,      0.46636962890625006000f,
-      0.62655639648437500000f,      0.70922851562500000000f,
-      0.76367187500000000000f,      0.79409790039062500000f,
-      0.81591796875000000000f,      0.83175659179687500000f,
-      0.09280395507812500000f,      0.19711303710937500000f,
-      0.29837036132812500000f,      0.39355468750000000000f,
-      0.49789428710937500000f,      0.59234619140625000000f,
-      0.73455810546875000000f,      0.89578247070312500000f,
-      0.97030639648437500000f,      0.97885131835937500000f,
-     -0.00610351562500000000f,     -0.00408935546875000000f,
-     -0.00344848632812500000f,     -0.00622558593750000000f,
-     -0.01058959960937500000f,     -0.01342773437500000000f,
-     -0.01074218749999999800f,     -0.00643920898437500000f,
-     -0.01275634765625000200f,     -0.00524902343750000000f,
-     -0.00955200195312500000f,      0.00180053710937500000f,
-      0.01510620117187500000f,      0.02355957031250000000f,
-      0.02200317382812500000f,      0.01873779296875000000f,
-      0.01019287109375000000f,      0.01354980468750000000f,
-      0.00686645507812500000f,      0.00738525390625000000f,
-      0.00491333007812500000f,      0.00048828125000000000f,
-      0.00836181640625000000f,      0.01721191406250000000f,
-     -0.00222778320312500000f,     -0.00573730468750000000f,
-     -0.01205444335937500000f,     -0.00521850585937500000f,
-      0.02371215820312499700f,      0.01550292968750000000f,
-      0.04089355468750000000f,      0.03494262695312500000f,
-      0.02133178710937500000f,      0.00598144531250000000f,
-      0.00680541992187500000f,      0.00527954101562500000f,
-      0.00274658203125000000f,      0.00076293945312500000f,
-     -0.00079345703125000011f,      0.00054931640625000000f,
-      0.00405883789062500000f,     -0.00320434570312500000f,
-     -0.01098632812500000000f,     -0.00845336914062500000f,
-      0.02621459960937500000f,      0.01934814453125000000f,
-      0.00125122070312500000f,     -0.01699829101562500000f,
-     -0.02343750000000000000f,     -0.02825927734375000000f,
-     -0.01834106445312500000f,     -0.03115844726562500000f,
-     -0.03628540039062500000f,     -0.01113891601562500000f,
-      0.00686645507812500000f,      0.00326538085937500000f,
-      0.01141357421875000200f,     -0.00152587890625000000f,
-      0.01321411132812500000f,      0.01272583007812500000f,
-      0.00476074218750000000f,      0.00119018554687500000f,
-     -0.01821899414062500000f,     -0.04263305664062499300f,
-     -0.04864501953125000000f,     -0.01806640625000000000f,
-     -0.01480102539062500000f,     -0.00891113281250000000f,
-      0.00772094726562500000f,      0.00265502929687500000f,
-     -0.00000000000000000000f,     -0.00018310546875000000f,
-     -0.00076293945312500000f,     -0.01052856445312500000f,
-     -0.00732421874999999910f,      0.00366210937499999960f,
-      0.03848266601562500000f,      0.02886962890625000000f,
-      0.00506591796875000090f,     -0.00845336914062500000f,
-      0.00735473632812500090f,      0.00509643554687500000f,
-      0.00518798828125000000f,      0.01309204101562500000f,
-      0.01580810546875000000f,      0.02178955078125000000f,
-      0.01837158203125000000f,      0.00775146484375000000f,
-      0.00408935546875000000f,      0.00280761718750000000f,
-     -0.00463867187500000000f,     -0.00988769531250000000f,
-     -0.01202392578124999800f,      0.00149536132812500000f,
-     -0.00460815429687500000f,     -0.00927734375000000000f,
-     -0.02209472656250000000f,     -0.02005004882812500000f,
-     -0.00494384765625000000f,     -0.01126098632812500000f,
-     -0.00106811523437500000f,      0.00009155273437500000f,
-     -0.00006103515625000000f,     -0.00952148437500000000f,
-     -0.00610351562500000000f,     -0.00280761718750000000f,
-     -0.00692749023437500000f,      0.00738525390625000000f,
-      0.01916503906250000000f,      0.01724243164062500000f,
-     -0.00378417968750000000f,      0.03222656250000000000f,
-      0.02349853515625000300f,      0.00308227539062500000f,
-     -0.00256347656250000000f,     -0.00100708007812500000f,
-      0.00012207031250000000f,     -0.00585937500000000000f,
-     -0.00830078125000000000f,      0.00015258789062500000f,
-     -0.01913452148437500000f,     -0.02981567382812500000f,
-      0.01278686523437500000f,      0.01440429687500000000f,
-      0.00161743164062500000f,     -0.00314331054687500000f,
-      0.00442504882812500000f,      0.00982666015625000000f,
-     -0.00289916992187500000f,     -0.00094604492187500000f,
-     -0.00305175781250000000f,     -0.00924682617187500000f,
-     -0.01708984375000000000f,     -0.03256225585937500000f,
-     -0.01260375976562500000f,      0.02178955078125000000f,
-      0.00863647460937500000f,      0.00006103515625000000f,
-     -0.00680541992187500000f,     -0.01119995117187500000f,
-      0.01596069335937500000f,      0.01098632812500000000f,
-     -0.00115966796875000000f,     -0.00350952148437500040f,
-      0.01153564453125000000f,     -0.01803588867187500000f,
-     -0.02191162109375000000f,      0.01367187500000000000f,
-     -0.01467895507812500000f,     -0.00836181640625000000f,
-      0.00549316406250000000f,     -0.00268554687499999960f,
-     -0.01773071289062500000f,     -0.00479125976562500000f,
-     -0.02124023437500000000f,     -0.03860473632812500000f,
-      0.01202392578124999800f,     -0.01461791992187500000f,
-     -0.00070190429687500000f,      0.00378417968750000000f,
-     -0.00131225585937500000f,      0.00057983398437500000f,
-     -0.00344848632812500000f,     -0.00720214843750000000f,
-     -0.01257324218750000000f,     -0.02011108398437500000f,
-     -0.00610351562500000000f,      0.00006103515625000000f,
-     -0.00210571289062500000f,     -0.01043701171875000000f,
-      0.00607299804687500000f,      0.00167846679687500000f,
-      0.00177001953125000000f,     -0.00109863281250000000f,
-     -0.00155639648437500000f,     -0.00189208984375000000f,
-      0.01547241210937500000f,      0.01547241210937500000f,
-      0.01303100585937500200f,      0.01348876953125000000f,
-      0.00109863281250000000f,      0.01834106445312500000f,
-     -0.00430297851562500000f,      0.00207519531250000000f,
-      0.00836181640625000000f,      0.00836181640625000000f,
-      0.00207519531250000000f,     -0.00036621093750000000f,
-     -0.00012207031250000000f,      0.00216674804687500000f,
-     -0.00588989257812500000f,     -0.01416015625000000000f,
-     -0.01296997070312499800f,     -0.01168823242187499800f,
-      0.01245117187500000000f,      0.00619506835937500000f,
-     -0.01028442382812500000f,      0.00720214843750000000f,
-      0.01251220703125000000f,     -0.00180053710937500000f,
-     -0.00076293945312500000f,     -0.01040649414062499800f,
-     -0.01370239257812500200f,      0.00085449218750000000f,
-     -0.00027465820312500000f,      0.00274658203125000000f,
-      0.01013183593750000200f,     -0.00042724609375000000f,
-     -0.02761840820312499700f,      0.00292968750000000000f,
-     -0.01647949218750000000f,     -0.00738525390625000000f,
-      0.02072143554687500000f,     -0.00180053710937500000f,
-      0.00585937500000000000f,     -0.00073242187500000000f,
-      0.00183105468749999980f,     -0.00662231445312500000f,
-      0.00015258789062500000f,     -0.00112915039062500000f,
-      0.00546264648437500000f,     -0.00061035156250000000f,
-      0.00949096679687500000f,      0.01583862304687500000f,
-      0.00836181640625000000f,      0.00219726562500000000f,
-     -0.00994873046875000000f,     -0.03143310546875000000f,
-     -0.00799560546875000000f,      0.00650024414062500000f,
-      0.01159667968750000000f,      0.00250244140625000000f,
-      0.01000976562500000000f,      0.01254272460937500000f,
-     -0.01647949218750000000f,      0.01751708984375000000f,
-     -0.00863647460937500000f,      0.00460815429687500000f,
-      0.00552368164062500000f,     -0.01226806640625000000f,
-     -0.00848388671875000000f,     -0.00732421874999999910f,
-     -0.00335693359375000000f,     -0.00692749023437500000f,
-     -0.00805664062500000000f,     -0.00271606445312500000f,
-     -0.00762939453124999910f,     -0.00790405273437500000f,
-     -0.00082397460937500000f,      0.00323486328125000000f,
-     -0.00729370117187499910f,     -0.00299072265625000000f,
-     -0.01190185546875000000f,      0.00360107421875000000f,
-      0.00186157226562500000f,      0.00317382812500000040f,
-      0.00897216796875000000f,      0.01623535156250000000f,
-      0.00280761718750000000f,     -0.00039672851562500005f,
-      0.00183105468749999980f,     -0.00711059570312500000f,
-      0.01022338867187500000f,      0.01651000976562500000f,
-      0.00936889648437500000f,     -0.00079345703125000011f,
-     -0.00335693359375000000f,     -0.00277709960937500000f,
-     -0.00704956054687500000f,     -0.01403808593750000200f,
-      0.00518798828125000000f,      0.00613403320312500000f,
-      0.00292968750000000000f,     -0.01135253906249999800f,
-      0.00402832031250000000f,      0.01327514648437500000f,
-     -0.00921630859375000000f,      0.00659179687500000000f,
-     -0.00851440429687500000f,     -0.00125122070312500000f,
-      0.00225830078125000000f,      0.00579833984375000000f,
-      0.01123046875000000000f,      0.00833129882812500000f,
-     -0.00567626953124999910f,     -0.01855468750000000000f,
-     -0.00479125976562500000f,      0.00485229492187500000f,
-      0.00036621093750000000f,      0.00848388671875000000f,
-      0.00747680664062500000f,      0.00936889648437500000f,
-      0.00076293945312500000f,     -0.00570678710937500090f,
-     -0.00048828125000000000f,      0.00167846679687500000f,
-      0.00091552734374999989f,     -0.00497436523437500000f,
-      0.01672363281250000000f,     -0.00936889648437500000f,
-      0.00323486328125000000f,     -0.00015258789062500000f,
-      0.00082397460937500000f,      0.01007080078124999800f,
-     -0.01269531250000000200f,      0.01449584960937500000f,
-      0.01336669921875000200f,     -0.00717163085937500000f,
-      0.00317382812500000040f,      0.00418090820312500000f,
-      0.00064086914062500000f,     -0.00015258789062500000f,
-     -0.00915527343750000000f,     -0.01428222656250000000f,
-      0.01589965820312500000f,     -0.01058959960937500000f,
-      0.00518798828125000000f,     -0.00610351562500000000f,
-     -0.00668334960937500090f,      0.00939941406250000000f,
-     -0.00372314453125000000f,     -0.00405883789062500000f,
-      0.00668334960937500090f,     -0.00048828125000000000f,
-      0.01095581054687500000f,      0.01257324218750000000f,
-     -0.00271606445312500000f,     -0.00338745117187500000f,
-      0.00146484375000000000f,      0.00982666015625000000f,
-      0.00433349609375000000f,      0.00540161132812500090f,
-     -0.00872802734375000000f,     -0.00387573242187500000f,
-     -0.00119018554687500000f,     -0.00192260742187500000f,
-     -0.00128173828125000000f,     -0.01376342773437500000f,
-      0.00488281250000000000f,      0.00939941406250000000f,
-     -0.00173950195312500000f,      0.00588989257812500000f,
-     -0.00146484375000000000f,      0.00225830078125000000f,
-     -0.01055908203125000000f,      0.00180053710937500000f,
-     -0.00082397460937500000f,      0.00082397460937500000f,
-     -0.01431274414062499800f,     -0.00845336914062500000f,
-     -0.01049804687500000000f,      0.00860595703125000000f,
-      0.00799560546875000000f,      0.00372314453125000000f,
-      0.00521850585937500000f,     -0.00759887695312500000f,
-      0.00082397460937500000f,      0.00787353515625000000f,
-      0.00573730468750000000f,     -0.00009155273437500000f,
-      0.00204467773437500000f,     -0.00628662109375000000f,
-     -0.00866699218750000000f,      0.00888061523437500000f,
-     -0.00357055664062500000f,     -0.00268554687499999960f,
-     -0.01455688476562500000f,      0.01144409179687500000f,
-      0.00152587890625000000f,      0.00323486328125000000f,
-      0.00302124023437500040f,     -0.00555419921875000000f,
-      0.01336669921875000200f,     -0.01147460937500000000f,
-     -0.01223754882812500000f,     -0.00149536132812500000f,
-      0.00363159179687500000f,     -0.00070190429687500000f,
-     -0.00030517578125000000f,     -0.00146484375000000000f,
-     -0.00354003906250000000f,     -0.00610351562500000000f,
-     -0.00946044921875000000f,      0.00369262695312500000f,
-      0.00222778320312500000f,      0.00021362304687500000f,
-      0.00723266601562500000f,     -0.00689697265625000000f,
-      0.00424194335937500000f,     -0.01391601562500000000f,
-      0.01211547851562500000f,      0.00106811523437500000f,
-      0.00009155273437500000f,     -0.00329589843750000000f,
-      0.00985717773437500000f,     -0.00228881835937500000f,
-      0.01013183593750000200f,      0.00604248046875000090f,
-     -0.00302124023437500040f,     -0.00064086914062500000f
+     -0.44140625000000000000f,     -0.35937500000000000000f,
+     -0.26562500000000000000f,     -0.16796875000000000000f,
+     -0.07812500000000000000f,      0.01171875000000000000f,
+      0.10937500000000000000f,      0.20312500000000003000f,
+      0.30468750000000000000f,      0.39062500000000000000f,
+     -0.44531250000000000000f,     -0.39453125000000000000f,
+     -0.29296875000000000000f,     -0.20703125000000000000f,
+     -0.11718749999999999000f,     -0.02734375000000000000f,
+      0.07812500000000000000f,      0.17578125000000000000f,
+      0.28125000000000000000f,      0.37500000000000000000f,
+     -0.38281250000000000000f,     -0.31640625000000000000f,
+     -0.22656250000000000000f,     -0.12890625000000000000f,
+     -0.03906250000000000000f,      0.03906250000000000000f,
+      0.13671875000000000000f,      0.22656250000000000000f,
+      0.32031250000000000000f,      0.40234375000000000000f,
+     -0.42968750000000000000f,     -0.38671875000000006000f,
+     -0.31250000000000000000f,     -0.23828125000000000000f,
+     -0.14843750000000000000f,     -0.05859374999999999300f,
+      0.04687500000000000000f,      0.14843750000000000000f,
+      0.25781250000000000000f,      0.34765625000000000000f,
+     -0.44921875000000006000f,     -0.42187500000000000000f,
+     -0.30078125000000000000f,     -0.19140625000000000000f,
+     -0.08203125000000000000f,      0.01562500000000000000f,
+      0.11328125000000000000f,      0.20703125000000000000f,
+      0.30859375000000000000f,      0.39843750000000000000f,
+     -0.39453125000000000000f,     -0.31640625000000000000f,
+     -0.21484375000000000000f,     -0.11328125000000000000f,
+     -0.02734375000000000000f,      0.08984375000000000000f,
+      0.18359375000000000000f,      0.27734375000000000000f,
+      0.36328124999999994000f,      0.42968750000000000000f,
+     -0.39062500000000000000f,     -0.32421875000000006000f,
+     -0.25390625000000000000f,     -0.17187499999999997000f,
+     -0.09765625000000000000f,     -0.02734375000000000000f,
+      0.07421875000000000000f,      0.17578125000000000000f,
+      0.28125000000000000000f,      0.37500000000000000000f,
+     -0.42968750000000000000f,     -0.39062500000000000000f,
+     -0.33203125000000000000f,     -0.17578125000000000000f,
+     -0.09765625000000000000f,     -0.03125000000000000000f,
+      0.08593749999999998600f,      0.15234375000000000000f,
+      0.30468750000000000000f,      0.37890625000000000000f,
+     -0.44921875000000006000f,     -0.41796875000000000000f,
+     -0.34765625000000000000f,     -0.26953125000000000000f,
+     -0.14062500000000000000f,     -0.03515625000000000000f,
+      0.07812500000000000000f,      0.17578125000000000000f,
+      0.28125000000000000000f,      0.38671875000000006000f,
+     -0.44140625000000000000f,     -0.38671875000000006000f,
+     -0.26953125000000000000f,     -0.14843750000000000000f,
+     -0.04687500000000000000f,      0.06250000000000000000f,
+      0.17187499999999997000f,      0.26562500000000000000f,
+      0.35937500000000000000f,      0.42578124999999994000f,
+     -0.42578124999999994000f,     -0.38281250000000000000f,
+     -0.32812500000000000000f,     -0.23437499999999997000f,
+     -0.07421875000000000000f,     -0.01171875000000000000f,
+      0.07031250000000000000f,      0.16796875000000000000f,
+      0.23828125000000000000f,      0.38281250000000000000f,
+     -0.38671875000000006000f,     -0.30078125000000000000f,
+     -0.17968750000000000000f,     -0.06640625000000000000f,
+      0.03906250000000000000f,      0.13671875000000000000f,
+      0.21484375000000000000f,      0.28906250000000000000f,
+      0.35937500000000000000f,      0.41406250000000000000f,
+     -0.41015625000000000000f,     -0.35546875000000000000f,
+     -0.27343750000000000000f,     -0.16406250000000000000f,
+     -0.00390625000000000000f,      0.06640625000000000000f,
+      0.13671875000000000000f,      0.22656250000000000000f,
+      0.29296875000000000000f,      0.38671875000000006000f,
+     -0.35156250000000000000f,     -0.30078125000000000000f,
+     -0.20703125000000000000f,     -0.14843750000000000000f,
+     -0.08203125000000000000f,      0.00000000000000000000f,
+      0.10937500000000000000f,      0.19140625000000000000f,
+      0.29687500000000000000f,      0.37890625000000000000f,
+     -0.42968750000000000000f,     -0.39453125000000000000f,
+     -0.31250000000000000000f,     -0.11328125000000000000f,
+     -0.03125000000000000000f,      0.02343750000000000000f,
+      0.11718749999999999000f,      0.18750000000000000000f,
+      0.32031250000000000000f,      0.38671875000000006000f,
+     -0.42968750000000000000f,     -0.35937500000000000000f,
+     -0.21484375000000000000f,     -0.07421875000000000000f,
+      0.01562500000000000000f,      0.09765625000000000000f,
+      0.16796875000000000000f,      0.24218750000000000000f,
+      0.32812500000000000000f,      0.39453125000000000000f,
+     -0.39453125000000000000f,     -0.34374999999999994000f,
+     -0.28515625000000000000f,     -0.22656250000000000000f,
+     -0.17578125000000000000f,     -0.10156250000000001000f,
+      0.08203125000000000000f,      0.17968750000000000000f,
+      0.27734375000000000000f,      0.38281250000000000000f,
+     -0.32421875000000006000f,     -0.26171875000000000000f,
+     -0.15625000000000000000f,     -0.08593749999999998600f,
+     -0.00781250000000000000f,      0.07421875000000000000f,
+      0.16015625000000000000f,      0.24609375000000000000f,
+      0.33203125000000000000f,      0.40234375000000000000f,
+     -0.43750000000000000000f,     -0.40234375000000000000f,
+     -0.34765625000000000000f,     -0.24218750000000000000f,
+     -0.03125000000000000000f,      0.05859374999999999300f,
+      0.12890625000000000000f,      0.21875000000000000000f,
+      0.28906250000000000000f,      0.37890625000000000000f,
+     -0.45703125000000000000f,     -0.28515625000000000000f,
+     -0.21875000000000000000f,     -0.12890625000000000000f,
+     -0.05078125000000000700f,      0.04296874999999999300f,
+      0.13281250000000000000f,      0.22265625000000000000f,
+      0.31250000000000000000f,      0.39453125000000000000f,
+     -0.42968750000000000000f,     -0.39062500000000000000f,
+     -0.32812500000000000000f,     -0.28125000000000000000f,
+     -0.23046875000000000000f,     -0.05859374999999999300f,
+      0.08203125000000000000f,      0.17578125000000000000f,
+      0.29687500000000000000f,      0.37500000000000000000f,
+     -0.40234375000000000000f,     -0.35156250000000000000f,
+     -0.28125000000000000000f,     -0.23046875000000000000f,
+     -0.15625000000000000000f,      0.00390625000000000000f,
+      0.12500000000000000000f,      0.21875000000000000000f,
+      0.32031250000000000000f,      0.38281250000000000000f,
+     -0.41796875000000000000f,     -0.37890625000000000000f,
+     -0.30859375000000000000f,     -0.21093750000000000000f,
+     -0.14453125000000000000f,     -0.08203125000000000000f,
+     -0.01562500000000000000f,      0.08593749999999998600f,
+      0.27734375000000000000f,      0.36718750000000000000f,
+     -0.37890625000000000000f,     -0.26171875000000000000f,
+     -0.10546875000000000000f,     -0.00781250000000000000f,
+      0.11328125000000000000f,      0.17187499999999997000f,
+      0.22656250000000000000f,      0.27734375000000000000f,
+      0.32031250000000000000f,      0.38281250000000000000f,
+     -0.34765625000000000000f,     -0.28906250000000000000f,
+     -0.21484375000000000000f,     -0.17578125000000000000f,
+     -0.11718749999999999000f,     -0.07031250000000000000f,
+     -0.00781250000000000000f,      0.08984375000000000000f,
+      0.25390625000000000000f,      0.37890625000000000000f,
+     -0.41406250000000000000f,     -0.32031250000000000000f,
+     -0.21875000000000000000f,     -0.12109375000000000000f,
+     -0.01953125000000000000f,      0.13281250000000000000f,
+      0.23046875000000000000f,      0.25390625000000000000f,
+      0.26562500000000000000f,      0.30468750000000000000f,
+     -0.41796875000000000000f,     -0.32031250000000000000f,
+     -0.22265625000000000000f,     -0.12109375000000000000f,
+      0.07812500000000000000f,      0.12109375000000000000f,
+      0.13281250000000000000f,      0.13671875000000000000f,
+      0.26562500000000000000f,      0.40234375000000000000f,
+     -0.42578124999999994000f,     -0.32421875000000006000f,
+     -0.21875000000000000000f,     -0.12500000000000000000f,
+     -0.02343750000000000000f,      0.07031250000000000000f,
+      0.19140625000000000000f,      0.32031250000000000000f,
+      0.42578124999999994000f,      0.45312500000000000000f,
+     -0.40234375000000000000f,     -0.32031250000000000000f,
+     -0.19531250000000000000f,     -0.06640625000000000000f,
+     -0.02343750000000000000f,      0.00781250000000000000f,
+      0.07421875000000000000f,      0.21875000000000000000f,
+      0.32421875000000006000f,      0.41015625000000000000f,
+     -0.41406250000000000000f,     -0.32031250000000000000f,
+     -0.21093750000000000000f,     -0.11718749999999999000f,
+     -0.00390625000000000000f,      0.12500000000000000000f,
+      0.16015625000000000000f,      0.19140625000000000000f,
+      0.20312500000000003000f,      0.38281250000000000000f,
+     -0.38281250000000000000f,     -0.25781250000000000000f,
+     -0.14062500000000000000f,      0.00000000000000000000f,
+      0.01953125000000000000f,      0.04687500000000000000f,
+      0.05468750000000000000f,      0.10156250000000001000f,
+      0.25000000000000000000f,      0.37890625000000000000f,
+     -0.41015625000000000000f,     -0.31250000000000000000f,
+     -0.20703125000000000000f,     -0.11328125000000000000f,
+      0.00781250000000000000f,      0.11718749999999999000f,
+      0.29687500000000000000f,      0.35156250000000000000f,
+      0.36718750000000000000f,      0.37500000000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.01953125000000000000f,
+      0.02734375000000000000f,      0.02343750000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+      0.03125000000000000000f,      0.03515625000000000000f,
+      0.01953125000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.02734375000000000000f,     -0.04296874999999999300f,
+     -0.04296874999999999300f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.00781250000000000000f,
+     -0.02343750000000000000f,     -0.01171875000000000000f,
+      0.00781250000000000000f,     -0.01562500000000000000f,
+      0.03906250000000000000f,      0.01953125000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.01953125000000000000f,     -0.02734375000000000000f,
+      0.04296874999999999300f,      0.02734375000000000000f,
+      0.01562500000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.02734375000000000000f,      0.03906250000000000000f,
+      0.01171875000000000000f,     -0.00390625000000000000f,
+     -0.02343750000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01562500000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.01953125000000000000f,
+     -0.04296874999999999300f,     -0.03906250000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+     -0.01953125000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.01953125000000000000f,
+      0.01562500000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.03515625000000000000f,
+     -0.01953125000000000000f,     -0.00390625000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.02343750000000000000f,
+      0.02734375000000000000f,      0.02343750000000000000f,
+     -0.00781250000000000000f,     -0.01953125000000000000f,
+     -0.03515625000000000000f,     -0.01562500000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.01171875000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+     -0.02343750000000000000f,     -0.03515625000000000000f,
+      0.02343750000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00781250000000000000f,
+      0.01562500000000000000f,     -0.01171875000000000000f,
+      0.03515625000000000000f,      0.01171875000000000000f,
+     -0.01171875000000000000f,      0.01562500000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.01562500000000000000f,
+     -0.02343750000000000000f,      0.04296874999999999300f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.02343750000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.01953125000000000000f,      0.02343750000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.02343750000000000000f,     -0.03125000000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.03125000000000000000f,      0.00390625000000000000f,
+     -0.01953125000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.03125000000000000000f,
+      0.01171875000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.03906250000000000000f,
+      0.00390625000000000000f,     -0.01562500000000000000f,
+     -0.00390625000000000000f,     -0.01562500000000000000f,
+     -0.02343750000000000000f,      0.02343750000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.01562500000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.01562500000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.01562500000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.01562500000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.01562500000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.01953125000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.02734375000000000000f,      0.02343750000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.01562500000000000000f,
+     -0.01562500000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.01562500000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.01953125000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.01953125000000000000f,     -0.01171875000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.01562500000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.01953125000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.01171875000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01562500000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.01171875000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.01562500000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.01171875000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.01171875000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00781250000000000000f,
+     -0.01562500000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.01562500000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f
 };
 
 const SKP_Silk_NLSF_CBS_FLP SKP_Silk_NLSF_CB1_10_Stage_info_FLP[ NLSF_MSVQ_CB1_10_STAGES ] =
@@ -460,7 +504,8 @@
         {   8, &SKP_Silk_NLSF_MSVQ_CB1_10[ 10 *  40 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates[  40 ] },
         {   8, &SKP_Silk_NLSF_MSVQ_CB1_10[ 10 *  48 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates[  48 ] },
         {   8, &SKP_Silk_NLSF_MSVQ_CB1_10[ 10 *  56 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates[  56 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10[ 10 *  64 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates[  64 ] }
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10[ 10 *  64 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates[  64 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10[ 10 *  72 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates[  72 ] }
 };
 
 const SKP_Silk_NLSF_CB_FLP SKP_Silk_NLSF_CB1_10_FLP =
--- a/src_FLP/SKP_Silk_tables_NLSF_CB1_16_FLP.c
+++ b/src_FLP/SKP_Silk_tables_NLSF_CB1_16_FLP.c
@@ -36,915 +36,915 @@
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB1_16_rates[ NLSF_MSVQ_CB1_16_VECTORS ] =
 {
-      1.78125000000000000000f,      3.06250000000000000000f,
-      4.15625000000000000000f,      4.18750000000000000000f,
-      4.31250000000000000000f,      4.50000000000000000000f,
-      4.53125000000000000000f,      4.59375000000000000000f,
-      4.75000000000000000000f,      5.53125000000000000000f,
-      5.53125000000000000000f,      5.56250000000000000000f,
-      5.65625000000000000000f,      5.71875000000000000000f,
-      5.75000000000000000000f,      6.31250000000000000000f,
-      6.43750000000000000000f,      6.71875000000000000000f,
-      6.81250000000000000000f,      6.93750000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      7.09375000000000000000f,      7.09375000000000000000f,
-      1.18750000000000000000f,      2.71875000000000000000f,
-      3.03125000000000000000f,      3.71875000000000000000f,
-      4.00000000000000000000f,      4.21875000000000000000f,
-      4.37500000000000000000f,      4.46875000000000000000f,
-      1.25000000000000000000f,      2.53125000000000000000f,
-      3.34375000000000000000f,      3.34375000000000000000f,
-      4.03125000000000000000f,      4.18750000000000000000f,
-      4.18750000000000000000f,      4.46875000000000000000f,
-      0.96875000000000000000f,      3.40625000000000000000f,
-      3.56250000000000000000f,      3.75000000000000000000f,
-      4.00000000000000000000f,      4.06250000000000000000f,
-      4.09375000000000000000f,      4.12500000000000000000f,
-      1.34375000000000000000f,      1.90625000000000000000f,
-      3.87500000000000000000f,      3.90625000000000000000f,
-      4.12500000000000000000f,      4.25000000000000000000f,
-      4.40625000000000000000f,      4.43750000000000000000f,
-      0.93750000000000000000f,      3.43750000000000000000f,
+      1.93750000000000000000f,      3.25000000000000000000f,
+      3.81250000000000000000f,      4.31250000000000000000f,
+      4.56250000000000000000f,      4.75000000000000000000f,
+      5.06250000000000000000f,      5.06250000000000000000f,
+      5.18750000000000000000f,      5.25000000000000000000f,
+      5.31250000000000000000f,      5.37500000000000000000f,
+      5.37500000000000000000f,      5.50000000000000000000f,
+      5.50000000000000000000f,      5.62500000000000000000f,
+      5.87500000000000000000f,      5.87500000000000000000f,
+      5.93750000000000000000f,      6.06250000000000000000f,
+      6.12500000000000000000f,      6.25000000000000000000f,
+      6.37500000000000000000f,      6.68750000000000000000f,
+      6.68750000000000000000f,      7.00000000000000000000f,
+      7.00000000000000000000f,      7.00000000000000000000f,
+      7.00000000000000000000f,      7.00000000000000000000f,
+      7.00000000000000000000f,      7.00000000000000000000f,
+      1.25000000000000000000f,      2.62500000000000000000f,
+      2.75000000000000000000f,      3.87500000000000000000f,
+      4.00000000000000000000f,      4.25000000000000000000f,
+      4.62500000000000000000f,      4.62500000000000000000f,
+      1.06250000000000000000f,      2.87500000000000000000f,
       3.68750000000000000000f,      3.75000000000000000000f,
-      4.03125000000000000000f,      4.09375000000000000000f,
-      4.15625000000000000000f,      4.15625000000000000000f,
-      0.96875000000000000000f,      3.37500000000000000000f,
-      3.59375000000000000000f,      3.78125000000000000000f,
-      3.87500000000000000000f,      4.06250000000000000000f,
-      4.15625000000000000000f,      4.28125000000000000000f,
-      1.25000000000000000000f,      3.06250000000000000000f,
-      3.59375000000000000000f,      3.59375000000000000000f,
-      3.62500000000000000000f,      3.65625000000000000000f,
-      3.84375000000000000000f,      3.87500000000000000000f,
-      1.56250000000000000000f,      2.90625000000000000000f,
-      3.37500000000000000000f,      3.43750000000000000000f,
-      3.50000000000000000000f,      3.50000000000000000000f,
-      3.56250000000000000000f,      3.59375000000000000000f,
-      2.28125000000000000000f,      2.96875000000000000000f,
-      2.96875000000000000000f,      3.00000000000000000000f,
-      3.00000000000000000000f,      3.28125000000000000000f,
-      3.34375000000000000000f,      3.43750000000000000000f
+      3.87500000000000000000f,      3.87500000000000000000f,
+      4.31250000000000000000f,      4.37500000000000000000f,
+      0.75000000000000000000f,      3.75000000000000000000f,
+      3.93750000000000000000f,      4.06250000000000000000f,
+      4.18750000000000000000f,      4.31250000000000000000f,
+      4.31250000000000000000f,      4.43750000000000000000f,
+      0.62500000000000000000f,      3.87500000000000000000f,
+      3.93750000000000000000f,      4.00000000000000000000f,
+      4.25000000000000000000f,      4.62500000000000000000f,
+      4.75000000000000000000f,      5.00000000000000000000f,
+      0.56250000000000000000f,      4.06250000000000000000f,
+      4.31250000000000000000f,      4.37500000000000000000f,
+      4.43750000000000000000f,      4.56250000000000000000f,
+      4.56250000000000000000f,      4.68750000000000000000f,
+      0.68750000000000000000f,      3.81250000000000000000f,
+      3.87500000000000000000f,      4.18750000000000000000f,
+      4.25000000000000000000f,      4.37500000000000000000f,
+      4.43750000000000000000f,      4.50000000000000000000f,
+      1.06250000000000000000f,      3.06250000000000000000f,
+      3.56250000000000000000f,      3.62500000000000000000f,
+      3.68750000000000000000f,      4.12500000000000000000f,
+      4.18750000000000000000f,      4.68750000000000000000f,
+      1.18750000000000000000f,      2.56250000000000000000f,
+      3.00000000000000000000f,      3.75000000000000000000f,
+      4.31250000000000000000f,      4.31250000000000000000f,
+      4.37500000000000000000f,      4.37500000000000000000f,
+      1.87500000000000000000f,      2.00000000000000000000f,
+      2.93750000000000000000f,      3.25000000000000000000f,
+      3.50000000000000000000f,      4.12500000000000000000f,
+      4.37500000000000000000f,      4.50000000000000000000f
 };
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB1_16_ndelta_min[ 16 + 1 ] =
 {
-      0.00451660156250000000f,
-      0.00009155273437500000f,
-      0.00183105468749999980f,
+      0.00335693359375000000f,
+      0.00085449218750000000f,
+      0.00372314453125000000f,
       0.00207519531250000000f,
-      0.00357055664062500000f,
-      0.00262451171875000000f,
-      0.00369262695312500000f,
-      0.00378417968750000000f,
-      0.00463867187500000000f,
-      0.00466918945312500000f,
-      0.00631713867187499910f,
-      0.00460815429687500000f,
-      0.00686645507812500000f,
-      0.00729370117187499910f,
-      0.00384521484375000000f,
-      0.00558471679687500000f,
-      0.02416992187500000300f
+      0.00228881835937500000f,
+      0.00216674804687500000f,
+      0.00195312500000000000f,
+      0.00238037109375000000f,
+      0.00253295898437500040f,
+      0.00234985351562500000f,
+      0.00247192382812500000f,
+      0.00231933593750000000f,
+      0.00256347656250000000f,
+      0.00222778320312500000f,
+      0.00210571289062500000f,
+      0.00064086914062500000f,
+      0.02374267578125000000f
 };
 
 const SKP_float SKP_Silk_NLSF_MSVQ_CB1_16[ 16 * NLSF_MSVQ_CB1_16_VECTORS ] =
 {
-      0.03994750976562499300f,      0.09338378906250000000f,
-      0.15475463867187500000f,      0.21350097656250000000f,
-      0.27551269531250000000f,      0.33380126953125000000f,
-      0.39471435546875000000f,      0.45443725585937500000f,
-      0.51675415039062500000f,      0.57537841796875000000f,
-      0.63452148437500000000f,      0.69470214843750000000f,
-      0.75540161132812500000f,      0.81356811523437500000f,
-      0.87359619140625000000f,      0.93081665039062500000f,
-      0.03857421875000000000f,      0.08377075195312498600f,
-      0.14068603515625000000f,      0.19555664062500000000f,
-      0.25286865234375000000f,      0.30648803710937500000f,
-      0.36877441406250000000f,      0.43054199218750000000f,
-      0.49188232421875006000f,      0.55429077148437500000f,
-      0.61325073242187500000f,      0.67639160156250000000f,
-      0.74047851562500000000f,      0.80310058593750000000f,
-      0.86453247070312500000f,      0.92318725585937500000f,
-      0.03186035156250000000f,      0.06347656250000000000f,
-      0.11206054687500000000f,      0.15805053710937500000f,
-      0.21789550781250003000f,      0.27770996093750000000f,
-      0.33782958984375000000f,      0.39871215820312494000f,
-      0.47067260742187500000f,      0.54290771484375000000f,
-      0.60824584960937500000f,      0.67446899414062500000f,
-      0.74127197265625000000f,      0.80447387695312500000f,
-      0.86972045898437500000f,      0.92828369140625000000f,
-      0.03451538085937500000f,      0.07556152343750000000f,
-      0.13665771484375000000f,      0.18765258789062500000f,
-      0.24114990234375000000f,      0.30136108398437500000f,
-      0.36431884765624994000f,      0.42141723632812500000f,
-      0.48428344726562500000f,      0.54107666015625000000f,
-      0.60876464843750000000f,      0.66244506835937500000f,
-      0.72512817382812500000f,      0.77926635742187500000f,
-      0.83697509765625000000f,      0.88247680664062500000f,
-      0.03173828125000000000f,      0.06115722656250000000f,
-      0.12286376953125000000f,      0.18615722656250000000f,
-      0.25732421875000000000f,      0.32025146484375000000f,
-      0.38482666015625000000f,      0.44842529296875000000f,
-      0.51260375976562500000f,      0.57296752929687500000f,
-      0.63473510742187500000f,      0.69525146484375000000f,
-      0.75598144531250000000f,      0.81427001953125000000f,
-      0.87374877929687511000f,      0.93127441406250000000f,
-      0.07049560546875000000f,      0.11633300781250001000f,
-      0.18045043945312497000f,      0.24209594726562500000f,
-      0.30618286132812500000f,      0.36257934570312500000f,
-      0.42373657226562500000f,      0.48211669921875000000f,
-      0.54171752929687500000f,      0.59741210937500000000f,
-      0.65557861328125000000f,      0.71032714843750000000f,
-      0.76773071289062500000f,      0.82427978515624989000f,
-      0.87991333007812500000f,      0.93453979492187500000f,
-      0.03826904296875000000f,      0.08688354492187500000f,
-      0.15298461914062500000f,      0.20693969726562500000f,
-      0.26324462890625000000f,      0.31646728515625000000f,
-      0.38836669921875000000f,      0.44656372070312500000f,
-      0.49685668945312494000f,      0.54479980468750000000f,
-      0.60638427734375000000f,      0.65527343749999989000f,
-      0.70196533203124989000f,      0.75161743164062500000f,
-      0.81512451171875000000f,      0.85327148437500000000f,
-      0.04479980468750000000f,      0.09335327148437500000f,
-      0.15219116210937500000f,      0.21441650390625000000f,
-      0.26675415039062500000f,      0.31774902343750000000f,
-      0.37478637695312500000f,      0.42785644531250000000f,
-      0.48736572265625000000f,      0.54086303710937500000f,
-      0.59936523437500000000f,      0.65679931640625000000f,
-      0.71630859375000000000f,      0.78311157226562500000f,
-      0.85406494140625000000f,      0.92239379882812500000f,
-      0.06625366210937500000f,      0.10882568359375000000f,
-      0.17105102539062497000f,      0.22534179687500000000f,
-      0.28698730468750000000f,      0.34240722656249994000f,
-      0.39764404296875000000f,      0.45037841796875000000f,
-      0.50924682617187500000f,      0.56204223632812500000f,
-      0.62091064453125000000f,      0.67416381835937511000f,
-      0.73410034179687489000f,      0.79992675781250000000f,
-      0.86535644531250000000f,      0.92764282226562500000f,
-      0.07351684570312500000f,      0.14270019531250000000f,
-      0.23019409179687497000f,      0.29864501953125000000f,
-      0.34848022460937500000f,      0.39474487304687500000f,
-      0.43847656250000006000f,      0.47769165039062500000f,
-      0.52996826171875000000f,      0.57809448242187500000f,
-      0.63360595703125000000f,      0.68594360351562511000f,
-      0.74584960937500000000f,      0.80343627929687500000f,
-      0.86315917968750000000f,      0.92291259765625000000f,
-      0.07183837890625000000f,      0.12884521484375000000f,
-      0.20812988281250003000f,      0.27792358398437500000f,
-      0.35388183593749994000f,      0.42523193359375000000f,
-      0.48745727539062494000f,      0.53961181640625000000f,
-      0.58465576171875000000f,      0.62612915039062500000f,
-      0.67111206054687500000f,      0.71472167968750000000f,
-      0.76837158203125000000f,      0.82202148437499989000f,
-      0.87872314453125000000f,      0.93161010742187511000f,
-      0.04037475585937500000f,      0.07366943359375000000f,
-      0.12768554687500000000f,      0.18429565429687500000f,
-      0.22991943359375000000f,      0.28680419921875000000f,
-      0.33871459960937500000f,      0.39968872070312500000f,
-      0.45162963867187500000f,      0.50204467773437500000f,
-      0.56256103515625000000f,      0.63742065429687500000f,
-      0.71685791015624989000f,      0.78851318359375011000f,
-      0.85589599609374989000f,      0.92239379882812500000f,
-      0.04153442382812500700f,      0.09896850585937500000f,
-      0.18457031250000000000f,      0.25973510742187500000f,
-      0.33572387695312500000f,      0.40115356445312500000f,
-      0.45999145507812500000f,      0.50683593750000000000f,
-      0.55316162109375000000f,      0.59146118164062500000f,
-      0.63818359375000000000f,      0.68991088867187500000f,
-      0.75256347656250011000f,      0.81384277343750000000f,
-      0.87472534179687500000f,      0.93280029296875000000f,
-      0.03710937500000000000f,      0.08081054687500000000f,
-      0.18008422851562503000f,      0.25701904296875000000f,
-      0.30630493164062500000f,      0.34866333007812500000f,
-      0.39590454101562500000f,      0.44564819335937500000f,
-      0.50921630859375000000f,      0.56762695312500000000f,
-      0.62728881835937500000f,      0.68405151367187500000f,
-      0.74615478515625000000f,      0.80200195312500000000f,
-      0.86077880859375000000f,      0.91787719726562500000f,
-      0.07376098632812500000f,      0.12353515625000000000f,
-      0.19274902343750000000f,      0.25735473632812500000f,
-      0.32073974609375000000f,      0.38931274414062494000f,
-      0.45996093750000006000f,      0.52780151367187500000f,
-      0.59732055664062500000f,      0.65621948242187489000f,
-      0.71194458007812500000f,      0.75628662109375011000f,
-      0.80062866210937489000f,      0.84500122070312500000f,
-      0.89154052734375000000f,      0.94052124023437500000f,
-      0.03088378906250000000f,      0.07156372070312500000f,
-      0.15231323242187500000f,      0.22512817382812503000f,
-      0.28884887695312500000f,      0.36364746093750000000f,
-      0.43627929687500000000f,      0.50555419921875000000f,
-      0.56982421875000000000f,      0.62695312500000000000f,
-      0.68029785156250000000f,      0.72747802734375000000f,
-      0.77560424804687511000f,      0.82550048828125011000f,
-      0.88037109375000000000f,      0.93234252929687500000f,
-      0.05911254882812500000f,      0.11270141601562500000f,
-      0.19125366210937500000f,      0.24472045898437500000f,
-      0.31652832031250000000f,      0.37213134765625000000f,
-      0.43600463867187494000f,      0.47781372070312500000f,
-      0.53195190429687500000f,      0.57568359375000000000f,
-      0.63381958007812500000f,      0.67767333984375000000f,
-      0.73355102539062500000f,      0.77706909179687489000f,
-      0.83566284179687500000f,      0.87286376953125000000f,
-      0.06008911132812500000f,      0.10086059570312500000f,
-      0.15310668945312500000f,      0.20526123046875000000f,
-      0.25558471679687500000f,      0.30496215820312500000f,
-      0.35504150390625000000f,      0.40527343750000000000f,
-      0.46014404296875000000f,      0.51119995117187500000f,
-      0.56347656250000000000f,      0.61398315429687500000f,
-      0.67013549804687500000f,      0.72808837890625000000f,
-      0.80029296875000011000f,      0.89410400390625011000f,
-      0.03656005859375000000f,      0.08078002929687500000f,
-      0.16564941406250000000f,      0.22653198242187500000f,
-      0.29830932617187500000f,      0.37094116210937500000f,
-      0.44754028320312500000f,      0.49877929687500000000f,
-      0.55300903320312500000f,      0.60394287109375000000f,
-      0.65786743164062489000f,      0.69723510742187500000f,
-      0.74719238281250011000f,      0.78558349609375000000f,
-      0.84347534179687500000f,      0.87619018554687500000f,
-      0.04992675781250000000f,      0.10232543945312500000f,
-      0.16622924804687500000f,      0.23184204101562503000f,
-      0.30020141601562500000f,      0.35543823242187500000f,
-      0.42614746093750000000f,      0.48886108398437500000f,
-      0.54510498046875000000f,      0.61389160156250000000f,
-      0.68112182617187500000f,      0.73355102539062500000f,
-      0.79241943359375000000f,      0.85711669921875011000f,
-      0.91290283203125011000f,      0.95501708984375000000f,
-      0.08166503906250000000f,      0.12527465820312500000f,
-      0.19464111328125000000f,      0.25094604492187500000f,
-      0.30694580078125000000f,      0.35244750976562500000f,
-      0.39892578124999994000f,      0.44107055664062494000f,
-      0.48693847656249994000f,      0.52963256835937500000f,
-      0.57772827148437500000f,      0.62261962890625000000f,
-      0.67697143554687500000f,      0.72888183593750000000f,
-      0.78482055664062500000f,      0.84603881835937500000f,
-      0.04190063476562500000f,      0.07913208007812500000f,
-      0.13577270507812500000f,      0.17190551757812500000f,
-      0.22277832031250000000f,      0.25711059570312500000f,
-      0.28912353515625000000f,      0.33013916015625000000f,
-      0.38967895507812500000f,      0.47979736328125006000f,
-      0.57989501953125000000f,      0.65396118164062500000f,
-      0.72271728515625000000f,      0.79113769531250000000f,
-      0.85861206054687500000f,      0.92568969726562500000f,
-      0.04870605468750000000f,      0.09713745117187500000f,
-      0.16412353515625003000f,      0.21862792968750000000f,
-      0.26458740234375000000f,      0.30838012695312500000f,
-      0.35003662109375000000f,      0.39166259765625000000f,
-      0.42697143554687500000f,      0.45904541015624994000f,
-      0.50787353515625000000f,      0.54635620117187500000f,
-      0.63351440429687500000f,      0.77157592773437500000f,
-      0.84747314453125000000f,      0.92285156249999989000f,
-      0.06216430664062500000f,      0.12167358398437500000f,
-      0.19033813476562500000f,      0.24771118164062500000f,
-      0.30377197265625000000f,      0.37368774414062500000f,
-      0.43386840820312500000f,      0.48498535156250000000f,
-      0.54244995117187500000f,      0.61383056640625000000f,
-      0.68096923828125000000f,      0.79168701171875000000f,
-      0.80276489257812500000f,      0.80819702148437500000f,
-      0.81774902343750000000f,      0.87161254882812500000f,
-      0.06655883789062500000f,      0.11773681640625000000f,
-      0.17578125000000000000f,      0.24182128906250000000f,
-      0.30642700195312500000f,      0.35330200195312500000f,
-      0.42019653320312494000f,      0.47912597656250000000f,
-      0.53189086914062500000f,      0.60665893554687500000f,
-      0.71969604492187500000f,      0.74884033203125000000f,
-      0.76940917968750000000f,      0.78408813476562511000f,
-      0.87548828125000000000f,      0.93099975585937489000f,
-      0.06079101562500000000f,      0.11846923828125000000f,
-      0.19757080078125000000f,      0.24057006835937503000f,
-      0.28628540039062500000f,      0.38671875000000006000f,
-      0.43762207031250000000f,      0.47915649414062500000f,
-      0.50836181640625000000f,      0.54418945312500000000f,
-      0.63629150390625000000f,      0.69839477539062500000f,
-      0.75308227539062511000f,      0.80740356445312500000f,
-      0.86947631835937500000f,      0.92956542968750000000f,
-      0.07296752929687500000f,      0.12170410156250000000f,
-      0.16625976562500000000f,      0.22680664062500000000f,
-      0.33612060546875000000f,      0.38388061523437500000f,
-      0.40100097656250000000f,      0.43170166015625000000f,
-      0.48516845703125006000f,      0.56738281250000000000f,
-      0.64404296875000000000f,      0.70169067382812500000f,
-      0.75296020507812500000f,      0.82965087890624989000f,
-      0.85882568359375000000f,      0.90368652343750000000f,
-      0.05227661132812500000f,      0.15570068359375000000f,
-      0.21328735351562500000f,      0.23797607421875000000f,
-      0.26458740234375000000f,      0.30853271484375000000f,
-      0.38897705078125000000f,      0.45413208007812500000f,
-      0.50991821289062500000f,      0.56173706054687500000f,
-      0.61419677734375000000f,      0.67465209960937500000f,
-      0.73794555664062500000f,      0.79949951171874989000f,
-      0.86172485351562500000f,      0.91970825195312500000f,
-      0.04919433593750000000f,      0.11038208007812500000f,
-      0.18762207031250000000f,      0.25509643554687500000f,
-      0.29223632812500000000f,      0.35180664062500006000f,
-      0.45581054687500000000f,      0.54348754882812500000f,
-      0.55807495117187500000f,      0.57156372070312500000f,
-      0.57986450195312500000f,      0.64425659179687500000f,
-      0.75167846679687500000f,      0.81164550781250000000f,
-      0.87707519531250000000f,      0.93515014648437500000f,
-      0.06915283203125000000f,      0.12719726562500000000f,
-      0.23992919921875000000f,      0.29132080078125000000f,
-      0.29351806640625000000f,      0.29611206054687500000f,
-      0.30926513671875000000f,      0.42410278320312500000f,
-      0.49636840820312500000f,      0.56250000000000000000f,
-      0.62826538085937500000f,      0.68984985351562500000f,
-      0.75543212890625000000f,      0.82379150390625000000f,
-      0.88882446289062511000f,      0.94116210937500000000f,
-      0.05615234375000000700f,      0.11953735351562501000f,
-      0.19140625000000000000f,      0.23831176757812500000f,
-      0.29644775390625000000f,      0.34906005859375000000f,
-      0.42013549804687500000f,      0.48214721679687500000f,
-      0.58728027343750000000f,      0.67053222656250000000f,
-      0.70129394531250000000f,      0.70739746093750000000f,
-      0.72396850585937489000f,      0.78277587890625000000f,
-      0.88858032226562500000f,      0.94863891601562500000f,
-      0.04449462890625000000f,      0.11022949218750000000f,
-      0.18334960937500000000f,      0.22851562500000000000f,
-      0.29989624023437500000f,      0.36294555664062500000f,
-      0.42987060546875000000f,      0.48016357421875000000f,
-      0.53222656250000000000f,      0.59616088867187500000f,
-      0.68432617187500000000f,      0.75582885742187500000f,
-      0.89251708984375000000f,      0.91333007812499989000f,
-      0.93127441406250000000f,      0.94442749023437489000f,
-     -0.00311279296875000000f,     -0.00369262695312500000f,
-     -0.00094604492187500000f,     -0.00018310546875000000f,
-      0.00015258789062500000f,     -0.00006103515625000000f,
-      0.00024414062500000000f,     -0.00054931640625000000f,
-     -0.00012207031250000000f,      0.00018310546875000000f,
-      0.00042724609375000000f,     -0.00006103515625000000f,
-     -0.00036621093750000000f,     -0.00048828125000000000f,
-     -0.00036621093750000000f,     -0.00183105468749999980f,
-     -0.00384521484375000000f,     -0.01077270507812500000f,
-     -0.01751708984375000000f,     -0.02066040039062500000f,
-     -0.02005004882812500000f,     -0.01882934570312500000f,
-     -0.01519775390625000000f,     -0.01199340820312500000f,
-     -0.01062011718750000000f,     -0.00845336914062500000f,
-     -0.00686645507812500000f,     -0.00500488281250000000f,
-     -0.00311279296875000000f,     -0.00213623046875000000f,
-     -0.00094604492187500000f,      0.00100708007812500000f,
-      0.00012207031250000000f,      0.01156616210937500000f,
-      0.01181030273437500000f,      0.01681518554687500000f,
-      0.01846313476562500000f,      0.01892089843750000000f,
-      0.01623535156250000000f,      0.01470947265625000200f,
-      0.01348876953125000000f,      0.01385498046875000000f,
-      0.01174926757812500200f,      0.01058959960937500000f,
-      0.00982666015625000000f,      0.00912475585937500000f,
-      0.00811767578125000000f,      0.00610351562500000000f,
-      0.03564453125000000000f,      0.02902221679687500000f,
-      0.02050781250000000000f,      0.00750732421875000000f,
-      0.00183105468749999980f,     -0.00491333007812500000f,
-     -0.00790405273437500000f,     -0.00714111328125000000f,
-     -0.00772094726562500000f,     -0.00860595703125000000f,
-     -0.00619506835937500000f,     -0.00570678710937500090f,
-     -0.00473022460937500000f,     -0.00537109374999999910f,
-     -0.00604248046875000090f,     -0.00543212890625000000f,
-      0.00030517578125000000f,      0.00518798828125000000f,
-      0.01199340820312500000f,      0.01858520507812500000f,
-      0.01693725585937500000f,      0.00634765625000000090f,
-     -0.01007080078124999800f,     -0.01742553710937500000f,
-     -0.02346801757812500000f,     -0.01931762695312500000f,
-     -0.00973510742187500000f,     -0.00131225585937500000f,
-      0.00289916992187500000f,      0.00320434570312500000f,
-      0.00323486328125000000f,      0.00354003906250000000f,
-     -0.00463867187500000000f,     -0.00427246093750000000f,
-     -0.00381469726562499960f,      0.00015258789062500000f,
-      0.00527954101562500000f,      0.00836181640625000000f,
-      0.00805664062500000000f,      0.01010131835937500000f,
-     -0.00112915039062500000f,     -0.00894165039062500000f,
-     -0.01858520507812500000f,     -0.02398681640625000000f,
-     -0.02926635742187500000f,     -0.02484130859375000300f,
-     -0.01968383789062500000f,     -0.00726318359375000000f,
-     -0.00277709960937500000f,      0.00109863281250000000f,
-     -0.00033569335937499995f,     -0.00308227539062500000f,
-     -0.00851440429687500000f,     -0.00692749023437500000f,
-     -0.00122070312500000000f,      0.00274658203125000000f,
-      0.01617431640625000000f,      0.02066040039062500000f,
-      0.02716064453125000000f,      0.03369140625000000000f,
-      0.03048706054687500000f,      0.02548217773437500000f,
-      0.01721191406250000000f,      0.00900268554687500000f,
-     -0.00854492187500000000f,     -0.01110839843750000000f,
-     -0.01037597656250000000f,     -0.01010131835937500000f,
-     -0.00866699218750000000f,      0.00878906250000000000f,
-      0.02322387695312500000f,      0.02685546875000000000f,
-      0.03015136718750000000f,      0.01913452148437500000f,
-      0.00445556640625000000f,     -0.00689697265625000000f,
-     -0.00619506835937500000f,     -0.00552368164062500000f,
-     -0.00433349609375000000f,      0.00119018554687500000f,
-      0.00073242187500000000f,     -0.00079345703125000011f,
-     -0.00326538085937500000f,     -0.00280761718750000000f,
-     -0.00491333007812500000f,     -0.00411987304687500000f,
-     -0.00399780273437500000f,     -0.00268554687499999960f,
-     -0.00488281250000000000f,     -0.00476074218750000000f,
-     -0.00228881835937500000f,     -0.00131225585937500000f,
-     -0.00109863281250000000f,     -0.00018310546875000000f,
-     -0.00100708007812500000f,      0.00100708007812500000f,
-     -0.00988769531250000000f,     -0.01266479492187500000f,
-     -0.00329589843750000000f,      0.00378417968750000000f,
-      0.00479125976562500000f,      0.00582885742187500000f,
-      0.00619506835937500000f,      0.00601196289062499910f,
-      0.00439453125000000000f,      0.00332641601562499960f,
-      0.00463867187500000000f,      0.00537109374999999910f,
-      0.00579833984375000000f,      0.00372314453125000000f,
-      0.00308227539062500000f,      0.00485229492187500000f,
-      0.02023315429687500000f,      0.02038574218750000000f,
-      0.01464843749999999800f,      0.01220703125000000000f,
-      0.01156616210937500000f,      0.01354980468750000000f,
-      0.01361083984375000000f,      0.01397705078124999800f,
-      0.01046752929687500200f,      0.01071166992187500000f,
-      0.00946044921875000000f,      0.00695800781250000000f,
-      0.00405883789062500000f,      0.00134277343749999980f,
-      0.00228881835937500000f,      0.00192260742187500000f,
-     -0.00256347656250000000f,      0.00119018554687500000f,
-     -0.00088500976562500000f,      0.00106811523437500000f,
-     -0.00286865234375000000f,     -0.00711059570312500000f,
-     -0.00796508789062500000f,     -0.01080322265625000200f,
-      0.00234985351562500000f,      0.00799560546875000000f,
-     -0.00073242187500000000f,     -0.00442504882812500000f,
-     -0.01016235351562500000f,     -0.01248168945312500000f,
-     -0.01232910156250000000f,     -0.01821899414062500000f,
-     -0.01489257812500000000f,     -0.00915527343750000000f,
-      0.02777099609375000000f,      0.01806640625000000000f,
-      0.01257324218750000000f,      0.00366210937499999960f,
-      0.00396728515625000000f,     -0.00155639648437500000f,
-     -0.00112915039062500000f,     -0.00234985351562500000f,
-     -0.00524902343750000000f,     -0.00552368164062500000f,
-     -0.00485229492187500000f,     -0.00451660156250000000f,
-     -0.00219726562500000000f,     -0.00189208984375000000f,
-      0.01556396484375000000f,      0.01574707031250000000f,
-      0.00344848632812500000f,     -0.01785278320312500000f,
-     -0.03280639648437500000f,     -0.02920532226562500000f,
-     -0.01272583007812500000f,     -0.00595092773437500000f,
-      0.00027465820312500000f,      0.00021362304687500000f,
-     -0.00268554687499999960f,     -0.00527954101562500000f,
-     -0.00277709960937500000f,      0.00164794921875000000f,
-      0.00299072265625000000f,      0.00289916992187500000f,
-     -0.00085449218750000000f,      0.00601196289062499910f,
-     -0.01608276367187500000f,     -0.01895141601562500000f,
-      0.00479125976562500000f,      0.00372314453125000000f,
-     -0.00512695312500000000f,      0.00448608398437500000f,
-      0.00942993164062500000f,      0.00915527343750000000f,
-      0.01025390625000000000f,      0.00961303710937500000f,
-      0.01208496093750000200f,      0.01245117187500000000f,
-      0.01147460937500000000f,      0.00323486328125000000f,
-     -0.00494384765625000000f,     -0.00518798828125000000f,
-     -0.00961303710937500000f,      0.00299072265625000000f,
-      0.02505493164062499700f,      0.02770996093750000000f,
-      0.01739501953125000000f,     -0.00100708007812500000f,
-     -0.00952148437500000000f,     -0.01733398437500000000f,
-     -0.01745605468750000000f,     -0.01153564453125000000f,
-     -0.00326538085937500000f,      0.00070190429687500000f,
-      0.00476074218750000000f,      0.00283813476562499960f,
-     -0.00393676757812500000f,     -0.00265502929687500000f,
-      0.00061035156250000000f,     -0.00219726562500000000f,
-     -0.00112915039062500000f,      0.00122070312500000000f,
-      0.00064086914062500000f,      0.00082397460937500000f,
-      0.00146484375000000000f,      0.00228881835937500000f,
-      0.00234985351562500000f,      0.00198364257812500000f,
-      0.00140380859375000000f,      0.00216674804687500000f,
-      0.00201416015625000000f,      0.00143432617187500000f,
-      0.00415039062500000000f,      0.01049804687500000000f,
-      0.00720214843750000000f,      0.00982666015625000000f,
-      0.00518798828125000000f,      0.00863647460937500000f,
-      0.00820922851562500000f,      0.00888061523437500000f,
-      0.00494384765625000000f,     -0.00131225585937500000f,
-     -0.00622558593750000000f,     -0.00790405273437500000f,
-     -0.00732421874999999910f,     -0.00930786132812500000f,
-     -0.01068115234374999800f,     -0.00952148437500000000f,
-      0.01364135742187499800f,      0.01062011718750000000f,
-      0.01052856445312500000f,      0.00784301757812500000f,
-      0.00216674804687500000f,     -0.00399780273437500000f,
-     -0.00234985351562500000f,     -0.00579833984375000000f,
-     -0.00616455078125000000f,     -0.00122070312500000000f,
-      0.00106811523437500000f,      0.00405883789062500000f,
-      0.00796508789062500000f,      0.01113891601562500000f,
-      0.01336669921875000200f,      0.00924682617187500000f,
-     -0.00024414062500000000f,      0.00067138671874999989f,
-      0.00427246093750000000f,      0.00418090820312500000f,
-     -0.00915527343750000000f,     -0.01956176757812500000f,
-     -0.02331542968750000000f,     -0.00817871093750000000f,
-     -0.00070190429687500000f,     -0.00076293945312500000f,
-      0.00222778320312500000f,     -0.00494384765625000000f,
-     -0.00457763671875000000f,     -0.00646972656250000000f,
-     -0.00219726562500000000f,      0.00018310546875000000f,
-      0.00119018554687500000f,      0.00238037109375000000f,
-      0.00317382812500000040f,     -0.00283813476562499960f,
-     -0.00939941406250000000f,     -0.00415039062500000000f,
-      0.00357055664062500000f,     -0.00216674804687500000f,
-     -0.01565551757812500000f,     -0.02502441406250000000f,
-     -0.02136230468749999700f,     -0.01373291015625000000f,
-     -0.00491333007812500000f,     -0.00070190429687500000f,
-      0.00088500976562500000f,      0.00238037109375000000f,
-      0.01028442382812500000f,      0.00323486328125000000f,
-     -0.01239013671875000000f,     -0.02386474609375000000f,
-     -0.00341796875000000000f,      0.00711059570312500000f,
-      0.01168823242187499800f,      0.00189208984375000000f,
-     -0.00384521484375000000f,      0.00018310546875000000f,
-     -0.00234985351562500000f,     -0.00088500976562500000f,
-     -0.00445556640625000000f,     -0.00375366210937500000f,
-     -0.00155639648437500000f,     -0.00082397460937500000f,
-     -0.00082397460937500000f,     -0.01162719726562500000f,
-     -0.01956176757812500000f,      0.01226806640625000000f,
-      0.01644897460937500000f,      0.00024414062500000000f,
-     -0.00631713867187499910f,     -0.01116943359375000000f,
-     -0.00109863281250000000f,     -0.00082397460937500000f,
-     -0.00622558593750000000f,     -0.00692749023437500000f,
-     -0.00723266601562500000f,     -0.00576782226562500000f,
-     -0.00195312500000000000f,      0.00155639648437500000f,
-     -0.00280761718750000000f,     -0.00418090820312500000f,
-     -0.00857543945312500000f,      0.00189208984375000000f,
-      0.00711059570312500000f,      0.00280761718750000000f,
-      0.00451660156250000000f,      0.00897216796875000000f,
-      0.01107788085937500200f,      0.01269531250000000200f,
-      0.01721191406250000000f,      0.01907348632812500000f,
-      0.01129150390625000000f,     -0.00109863281250000000f,
-     -0.01431274414062499800f,     -0.01409912109375000000f,
-      0.00311279296875000000f,      0.00512695312500000000f,
-      0.00097656250000000000f,      0.00357055664062500000f,
-     -0.00064086914062500000f,      0.00296020507812500000f,
-      0.00424194335937500000f,      0.00271606445312500000f,
-      0.00317382812500000040f,      0.00106811523437500000f,
-      0.00012207031250000000f,      0.00250244140625000000f,
-      0.00201416015625000000f,      0.00177001953125000000f,
-      0.00222778320312500000f,      0.00283813476562499960f,
-     -0.00231933593750000000f,     -0.00976562500000000000f,
-     -0.00720214843750000000f,     -0.00576782226562500000f,
-     -0.00619506835937500000f,     -0.00433349609375000000f,
-     -0.00082397460937500000f,     -0.00222778320312500000f,
-      0.00027465820312500000f,     -0.00027465820312500000f,
-     -0.00076293945312500000f,      0.00036621093750000000f,
-     -0.00045776367187499995f,      0.00012207031250000000f,
-      0.00012207031250000000f,     -0.00152587890625000000f,
-      0.00958251953125000000f,      0.00549316406250000000f,
-      0.00494384765625000000f,     -0.00149536132812500000f,
-      0.00607299804687500000f,     -0.00329589843750000000f,
-     -0.00692749023437500000f,     -0.00201416015625000000f,
-     -0.01364135742187499800f,     -0.00204467773437500000f,
-     -0.00805664062500000000f,     -0.01202392578124999800f,
-      0.00015258789062500000f,      0.00167846679687500000f,
-     -0.00405883789062500000f,     -0.00537109374999999910f,
-     -0.00354003906250000000f,     -0.00735473632812500090f,
-      0.00830078125000000000f,      0.00332641601562499960f,
-      0.00860595703125000000f,      0.00799560546875000000f,
-      0.00585937500000000000f,     -0.00195312500000000000f,
-     -0.01196289062500000000f,     -0.01568603515625000000f,
-      0.00476074218750000000f,      0.00619506835937500000f,
-      0.00469970703125000000f,      0.00219726562500000000f,
-     -0.00103759765625000000f,     -0.00488281250000000000f,
-     -0.00222778320312500000f,      0.00009155273437500000f,
-     -0.00100708007812500000f,     -0.01315307617187500000f,
-      0.00979614257812500000f,      0.00054931640625000000f,
-     -0.01730346679687500000f,     -0.01800537109375000000f,
-     -0.00329589843750000000f,      0.00268554687499999960f,
-      0.00201416015625000000f,      0.00155639648437500000f,
-     -0.00094604492187500000f,     -0.00588989257812500000f,
-     -0.00140380859375000000f,      0.00198364257812500000f,
-     -0.00088500976562500000f,     -0.00070190429687500000f,
-      0.00656127929687500000f,     -0.00094604492187500000f,
-      0.00308227539062500000f,     -0.00344848632812500000f,
-      0.00097656250000000000f,      0.00927734375000000000f,
-      0.00268554687499999960f,      0.00976562500000000000f,
-      0.01367187500000000000f,      0.00015258789062500000f,
-     -0.01339721679687500000f,     -0.01715087890625000000f,
-     -0.01550292968750000000f,     -0.00411987304687500000f,
-     -0.00039672851562500005f,     -0.00521850585937500000f,
-     -0.00024414062500000000f,      0.00555419921875000000f,
-     -0.00302124023437500040f,     -0.00552368164062500000f,
-     -0.00454711914062500000f,      0.01147460937500000000f,
-      0.01452636718750000000f,      0.00195312500000000000f,
-     -0.01208496093750000200f,     -0.01989746093750000000f,
-     -0.00457763671875000000f,      0.00537109374999999910f,
-      0.00677490234375000000f,      0.00198364257812500000f,
-     -0.01800537109375000000f,      0.02194213867187500300f,
-      0.00827026367187500000f,      0.01217651367187500000f,
-      0.00747680664062500000f,      0.00219726562500000000f,
-     -0.00476074218750000000f,     -0.00463867187500000000f,
-     -0.00537109374999999910f,      0.00180053710937500000f,
-      0.00286865234375000000f,      0.00381469726562499960f,
-     -0.00027465820312500000f,     -0.00021362304687500000f,
-      0.00027465820312500000f,      0.00003051757812500000f,
-     -0.00186157226562500000f,     -0.00354003906250000000f,
-     -0.00250244140625000000f,      0.00003051757812500000f,
-      0.00241088867187500000f,      0.00067138671874999989f,
-     -0.00134277343749999980f,     -0.00045776367187499995f,
-     -0.00146484375000000000f,     -0.00198364257812500000f,
-     -0.00189208984375000000f,     -0.00308227539062500000f,
-     -0.00311279296875000000f,     -0.00164794921875000000f,
-     -0.00213623046875000000f,     -0.00238037109375000000f,
-     -0.00244140625000000000f,     -0.00076293945312500000f,
-      0.01214599609375000000f,      0.00216674804687500000f,
-      0.00424194335937500000f,      0.00115966796875000000f,
-      0.00274658203125000000f,      0.00592041015625000000f,
-      0.00677490234375000000f,      0.00759887695312500000f,
-      0.00503540039062499910f,      0.00286865234375000000f,
-      0.00674438476562500000f,      0.00799560546875000000f,
-      0.00497436523437500000f,      0.00277709960937500000f,
-     -0.00628662109375000000f,      0.01748657226562500000f,
-      0.00610351562500000000f,     -0.00875854492187500000f,
-     -0.00448608398437500000f,      0.00015258789062500000f,
-     -0.00054931640625000000f,     -0.00259399414062500000f,
-     -0.00225830078125000000f,     -0.00381469726562499960f,
-     -0.00265502929687500000f,      0.00259399414062500000f,
-      0.00430297851562500000f,      0.00012207031250000000f,
-     -0.00012207031250000000f,      0.00085449218750000000f,
-      0.00714111328125000000f,      0.00146484375000000000f,
-     -0.00457763671875000000f,     -0.00338745117187500000f,
-     -0.01544189453125000000f,      0.00723266601562500000f,
-     -0.00637817382812500090f,      0.01052856445312500000f,
-      0.00286865234375000000f,     -0.00378417968750000000f,
-      0.00234985351562500000f,      0.00369262695312500000f,
-      0.00436401367187500000f,      0.00036621093750000000f,
-     -0.00244140625000000000f,     -0.00146484375000000000f,
-      0.00582885742187500000f,      0.00439453125000000000f,
-     -0.00283813476562499960f,     -0.00198364257812500000f,
-     -0.00460815429687500000f,     -0.01962280273437500000f,
-      0.01327514648437500000f,      0.00323486328125000000f,
-      0.00265502929687500000f,      0.00021362304687500000f,
-      0.00198364257812500000f,      0.00311279296875000000f,
-      0.00286865234375000000f,      0.00207519531250000000f,
-      0.00015258789062500000f,      0.00302124023437500040f,
-      0.00677490234375000000f,      0.00283813476562499960f,
-      0.00286865234375000000f,      0.01083374023437500000f,
-     -0.00039672851562500005f,     -0.00271606445312500000f,
-     -0.00695800781250000000f,     -0.01535034179687500000f,
-      0.00875854492187500000f,      0.00332641601562499960f,
-      0.00329589843750000000f,      0.01370239257812500200f,
-      0.00772094726562500000f,     -0.00088500976562500000f,
-     -0.00332641601562499960f,     -0.00354003906250000000f,
-      0.00045776367187499995f,     -0.00222778320312500000f,
-     -0.00061035156250000000f,      0.00399780273437500000f,
-     -0.00448608398437500000f,      0.00219726562500000000f,
-      0.00180053710937500000f,     -0.00457763671875000000f,
-     -0.01812744140625000000f,      0.00833129882812500000f,
-      0.00964355468750000000f,      0.00402832031250000000f,
-      0.00607299804687500000f,      0.00323486328125000000f,
-      0.00604248046875000090f,      0.00646972656250000000f,
-      0.00671386718750000000f,      0.00250244140625000000f,
-      0.00137329101562500000f,     -0.00039672851562500005f,
-      0.00680541992187500000f,      0.00418090820312500000f,
-      0.00823974609375000000f,      0.00115966796875000000f,
-      0.00769042968750000000f,      0.00411987304687500000f,
-     -0.00540161132812500090f,     -0.00631713867187499910f,
-     -0.01098632812500000000f,     -0.00311279296875000000f,
-      0.01229858398437500000f,      0.01239013671875000000f,
-     -0.00042724609375000000f,      0.00253295898437500040f,
-      0.00195312500000000000f,      0.00155639648437500000f,
-     -0.00021362304687500000f,     -0.00302124023437500040f,
-     -0.00296020507812500000f,     -0.00268554687499999960f,
-     -0.00378417968750000000f,     -0.00198364257812500000f,
-      0.00128173828125000000f,      0.00097656250000000000f,
-      0.00085449218750000000f,      0.00088500976562500000f,
-      0.00036621093750000000f,      0.00061035156250000000f,
-      0.00363159179687500000f,     -0.00079345703125000011f,
-     -0.00646972656250000000f,     -0.00613403320312500000f,
-      0.01138305664062500000f,      0.00765991210937500090f,
-      0.00430297851562500000f,      0.00314331054687500000f,
-      0.00109863281250000000f,     -0.00158691406250000020f,
-      0.00201416015625000000f,      0.00054931640625000000f,
-     -0.00018310546875000000f,     -0.00289916992187500000f,
-     -0.00598144531250000000f,      0.00015258789062500000f,
-      0.00299072265625000000f,     -0.00259399414062500000f,
-     -0.00329589843750000000f,      0.00665283203124999910f,
-     -0.00500488281250000000f,      0.00061035156250000000f,
-      0.01086425781250000000f,      0.00524902343750000000f,
-      0.00112915039062500000f,      0.00811767578125000000f,
-      0.00070190429687500000f,      0.00341796875000000000f,
-     -0.00073242187500000000f,     -0.00302124023437500040f,
-     -0.00280761718750000000f,     -0.00543212890625000000f,
-      0.00088500976562500000f,     -0.00848388671875000000f,
-      0.01184082031250000000f,     -0.00183105468749999980f,
-     -0.00671386718750000000f,      0.00915527343750000000f,
-     -0.00039672851562500005f,      0.00469970703125000000f,
-      0.00582885742187500000f,      0.00045776367187499995f,
-     -0.00112915039062500000f,     -0.00335693359375000000f,
-     -0.00466918945312500000f,     -0.00457763671875000000f,
-     -0.00347900390625000000f,     -0.00021362304687500000f,
-     -0.00286865234375000000f,     -0.00094604492187500000f,
-     -0.00189208984375000000f,     -0.00540161132812500090f,
-      0.00012207031250000000f,     -0.00213623046875000000f,
-      0.00106811523437500000f,      0.01382446289062500000f,
-      0.00448608398437500000f,     -0.00753784179687500000f,
-     -0.01000976562500000000f,      0.00308227539062500000f,
-      0.00061035156250000000f,     -0.00347900390625000000f,
-      0.00448608398437500000f,      0.00329589843750000000f,
-     -0.00363159179687500000f,     -0.00332641601562499960f,
-     -0.00311279296875000000f,     -0.00726318359375000000f,
-      0.00167846679687500000f,     -0.00311279296875000000f,
-      0.00527954101562500000f,     -0.00271606445312500000f,
-      0.00393676757812500000f,      0.00421142578125000000f,
-     -0.01007080078124999800f,     -0.00488281250000000000f,
-      0.01480102539062500000f,      0.00469970703125000000f,
-     -0.00180053710937500000f,     -0.00518798828125000000f,
-     -0.00061035156250000000f,     -0.00103759765625000000f,
-     -0.00796508789062500000f,     -0.00122070312500000000f,
-     -0.00393676757812500000f,      0.00234985351562500000f,
-     -0.00256347656250000000f,      0.00210571289062500000f,
-      0.00253295898437500040f,      0.00488281250000000000f,
-      0.00515747070312500000f,      0.00192260742187500000f,
-     -0.01574707031250000000f,      0.00091552734374999989f,
-      0.01025390625000000000f,      0.00158691406250000020f,
-     -0.00000000000000000000f,     -0.00158691406250000020f,
-     -0.00378417968750000000f,      0.00482177734375000000f,
-      0.00057983398437500000f,      0.00601196289062499910f,
-     -0.00030517578125000000f,     -0.01144409179687500000f,
-      0.01235961914062499800f,      0.00869750976562500000f,
-      0.00347900390625000000f,     -0.01205444335937500000f,
-     -0.00143432617187500000f,      0.00598144531250000000f,
-      0.00189208984375000000f,      0.00265502929687500000f,
-     -0.00323486328125000000f,     -0.00198364257812500000f,
-     -0.00228881835937500000f,     -0.00210571289062500000f,
-     -0.00039672851562500005f,      0.00103759765625000000f,
-      0.00302124023437500040f,      0.00180053710937500000f,
-      0.00253295898437500040f,      0.00299072265625000000f,
-      0.00134277343749999980f,      0.00000000000000000000f,
-      0.00073242187500000000f,      0.00054931640625000000f,
-      0.00051879882812500000f,      0.00213623046875000000f,
-     -0.00067138671874999989f,      0.00592041015625000000f,
-      0.00634765625000000090f,      0.00439453125000000000f,
-     -0.00241088867187500000f,     -0.00045776367187499995f,
-      0.00097656250000000000f,     -0.00317382812500000040f,
-     -0.00085449218750000000f,     -0.00320434570312500000f,
-     -0.00567626953124999910f,     -0.00646972656250000000f,
-     -0.00695800781250000000f,     -0.00241088867187500000f,
-     -0.00231933593750000000f,      0.00155639648437500000f,
-     -0.00216674804687500000f,      0.00219726562500000000f,
-      0.00360107421875000000f,     -0.00103759765625000000f,
-     -0.00009155273437500000f,     -0.00521850585937500000f,
-      0.00015258789062500000f,      0.00006103515625000000f,
-     -0.00329589843750000000f,     -0.00381469726562499960f,
-      0.00189208984375000000f,     -0.00177001953125000000f,
-      0.00177001953125000000f,     -0.00369262695312500000f,
-      0.00222778320312500000f,     -0.01422119140625000000f,
-      0.00280761718750000000f,      0.00192260742187500000f,
-     -0.00286865234375000000f,     -0.00238037109375000000f,
-     -0.00231933593750000000f,      0.00646972656250000000f,
-      0.00109863281250000000f,     -0.00686645507812500000f,
-     -0.00216674804687500000f,     -0.01080322265625000200f,
-      0.00463867187500000000f,      0.00436401367187500000f,
-     -0.00241088867187500000f,     -0.00750732421875000000f,
-     -0.00155639648437500000f,     -0.00094604492187500000f,
-     -0.00018310546875000000f,     -0.00823974609375000000f,
-      0.00732421874999999910f,      0.00640869140625000000f,
-      0.00091552734374999989f,     -0.00479125976562500000f,
-     -0.00704956054687500000f,      0.00225830078125000000f,
-     -0.00445556640625000000f,      0.00268554687499999960f,
-     -0.00833129882812500000f,      0.00476074218750000000f,
-      0.00280761718750000000f,      0.00170898437500000000f,
-      0.00216674804687500000f,      0.00006103515625000000f,
-      0.00970458984375000000f,      0.00500488281250000000f,
-      0.00097656250000000000f,     -0.00335693359375000000f,
-     -0.00106811523437500000f,     -0.00125122070312500000f,
-     -0.00289916992187500000f,     -0.00323486328125000000f,
-      0.00033569335937499995f,      0.00402832031250000000f,
-     -0.00207519531250000000f,      0.00167846679687500000f,
-      0.00375366210937500000f,     -0.00253295898437500040f,
-     -0.00454711914062500000f,      0.00646972656250000000f,
-      0.00402832031250000000f,      0.00000000000000000000f,
-     -0.00592041015625000000f,      0.00167846679687500000f,
-      0.00628662109375000000f,     -0.00329589843750000000f,
-     -0.01077270507812500000f,      0.00881958007812500000f,
-     -0.00595092773437500000f,      0.00003051757812500000f,
-      0.00711059570312500000f,     -0.00067138671874999989f,
-     -0.00183105468749999980f,      0.00061035156250000000f,
-      0.00079345703125000011f,      0.00207519531250000000f,
-      0.00506591796875000090f,      0.00082397460937500000f,
-     -0.00177001953125000000f,      0.00396728515625000000f,
-      0.00341796875000000000f,      0.00326538085937500000f,
-      0.00082397460937500000f,     -0.00503540039062499910f,
-      0.00350952148437500040f,     -0.00283813476562499960f,
-     -0.00112915039062500000f,      0.00115966796875000000f,
-      0.00253295898437500040f,      0.01473999023437500000f,
-      0.00198364257812500000f,     -0.00698852539062499910f,
-     -0.00039672851562500005f,      0.00479125976562500000f,
-      0.00259399414062500000f,      0.00152587890625000000f,
-      0.00415039062500000000f,      0.00030517578125000000f,
-      0.00097656250000000000f,      0.00253295898437500040f,
-      0.00250244140625000000f,      0.00167846679687500000f,
-      0.00015258789062500000f,     -0.00027465820312500000f,
-     -0.00158691406250000020f,     -0.00238037109375000000f,
-     -0.00247192382812500000f,     -0.00155639648437500000f,
-      0.00122070312500000000f,      0.00054931640625000000f,
-     -0.00387573242187500000f,     -0.00683593750000000000f,
-     -0.00125122070312500000f,      0.00161743164062500000f,
-     -0.00640869140625000000f,     -0.00344848632812500000f,
-      0.00073242187500000000f,     -0.00051879882812500000f,
-     -0.00570678710937500090f,     -0.00271606445312500000f,
-      0.00024414062500000000f,      0.00369262695312500000f,
-      0.00253295898437500040f,      0.00234985351562500000f,
-      0.00277709960937500000f,     -0.00225830078125000000f,
-     -0.00106811523437500000f,     -0.00341796875000000000f,
-     -0.00491333007812500000f,     -0.00527954101562500000f,
-      0.00311279296875000000f,      0.00402832031250000000f,
-     -0.00381469726562499960f,     -0.00186157226562500000f,
-      0.00314331054687500000f,     -0.00793457031250000000f,
-      0.00158691406250000020f,      0.00506591796875000090f,
-     -0.00097656250000000000f,     -0.00476074218750000000f,
-     -0.00265502929687500000f,     -0.00170898437500000000f,
-      0.00183105468749999980f,     -0.00213623046875000000f,
-     -0.00378417968750000000f,      0.00738525390625000000f,
-      0.00347900390625000000f,     -0.00765991210937500090f,
-     -0.00506591796875000090f,      0.00613403320312500000f,
-      0.00387573242187500000f,      0.00085449218750000000f,
-     -0.00033569335937499995f,      0.00070190429687500000f,
-     -0.00244140625000000000f,     -0.00350952148437500040f,
-     -0.00061035156250000000f,     -0.00155639648437500000f,
-     -0.01062011718750000000f,      0.01037597656250000000f,
-     -0.00103759765625000000f,      0.00405883789062500000f,
-      0.00039672851562500005f,      0.00280761718750000000f,
-     -0.00378417968750000000f,     -0.00415039062500000000f,
-     -0.00366210937499999960f,     -0.00079345703125000011f,
-     -0.00018310546875000000f,      0.00051879882812500000f,
-      0.00085449218750000000f,      0.00064086914062500000f,
-      0.00366210937499999960f,     -0.00512695312500000000f,
-      0.00488281250000000000f,     -0.00106811523437500000f,
-      0.00350952148437500040f,      0.00085449218750000000f,
-      0.00027465820312500000f,      0.00021362304687500000f,
-     -0.00170898437500000000f,      0.00119018554687500000f,
-      0.00476074218750000000f,      0.00781250000000000000f,
-     -0.00054931640625000000f,      0.00003051757812500000f,
-      0.00845336914062500000f,      0.00250244140625000000f,
-     -0.00213623046875000000f,     -0.00439453125000000000f,
-     -0.00268554687499999960f,     -0.00039672851562500005f,
-     -0.00180053710937500000f,     -0.00479125976562500000f,
-      0.00024414062500000000f,     -0.00408935546875000000f,
-      0.00064086914062500000f,     -0.00122070312500000000f,
-      0.00177001953125000000f,     -0.00064086914062500000f,
-      0.00592041015625000000f,     -0.00842285156250000000f,
-      0.00296020507812500000f,      0.00851440429687500000f,
-     -0.00170898437500000000f,     -0.00427246093750000000f,
-      0.00381469726562499960f,      0.00173950195312500000f,
-     -0.00561523437500000000f,     -0.00622558593750000000f,
-     -0.00213623046875000000f,     -0.00006103515625000000f,
-      0.00390625000000000000f,     -0.00616455078125000000f,
-     -0.00238037109375000000f,      0.00701904296875000090f,
-     -0.00070190429687500000f,      0.00491333007812500000f,
-     -0.00311279296875000000f,      0.00003051757812500000f,
-      0.00003051757812500000f,      0.00549316406250000000f,
-     -0.00094604492187500000f,     -0.00262451171875000000f,
-     -0.00509643554687500000f,     -0.00173950195312500000f,
-     -0.00183105468749999980f,      0.00082397460937500000f,
-     -0.00039672851562500005f,      0.00302124023437500040f,
-      0.00329589843750000000f,      0.00338745117187500000f,
-      0.00231933593750000000f,      0.00210571289062500000f,
-      0.00103759765625000000f,     -0.00064086914062500000f,
-      0.00161743164062500000f,      0.00115966796875000000f,
-      0.00103759765625000000f,      0.00238037109375000000f,
-      0.00222778320312500000f,      0.00668334960937500090f,
-      0.00155639648437500000f,      0.00045776367187499995f,
-     -0.00219726562500000000f,     -0.00314331054687500000f,
-     -0.00631713867187499910f,      0.00091552734374999989f,
-      0.00650024414062500000f,     -0.00042724609375000000f,
-      0.00094604492187500000f,     -0.00286865234375000000f,
-     -0.00122070312500000000f,     -0.00439453125000000000f,
-      0.00204467773437500000f,      0.00012207031250000000f,
-      0.00320434570312500000f,      0.00180053710937500000f,
-     -0.00732421874999999910f,      0.00076293945312500000f,
-      0.00744628906250000000f,      0.00210571289062500000f,
-      0.00177001953125000000f,      0.00070190429687500000f,
-     -0.00073242187500000000f,     -0.00015258789062500000f,
-     -0.00045776367187499995f,     -0.00405883789062500000f,
-     -0.00216674804687500000f,     -0.00204467773437500000f,
-      0.00552368164062500000f,      0.00088500976562500000f,
-     -0.00137329101562500000f,      0.00369262695312500000f,
-      0.00292968750000000000f,      0.00155639648437500000f,
-     -0.00219726562500000000f,     -0.00161743164062500000f,
-      0.00170898437500000000f,     -0.00466918945312500000f,
-     -0.00082397460937500000f,      0.00259399414062500000f,
-      0.00558471679687500000f,      0.00643920898437500000f,
-      0.00320434570312500000f,     -0.00103759765625000000f,
-     -0.00140380859375000000f,      0.00131225585937500000f,
-     -0.00219726562500000000f,     -0.00283813476562499960f,
-      0.00109863281250000000f,     -0.00390625000000000000f,
-      0.00088500976562500000f,      0.00338745117187500000f,
-     -0.00289916992187500000f,     -0.00476074218750000000f,
-     -0.00546264648437500000f,     -0.00717163085937500000f,
-      0.00064086914062500000f,     -0.00119018554687500000f,
-     -0.00216674804687500000f,     -0.00100708007812500000f,
-     -0.00186157226562500000f,     -0.00769042968750000000f,
-      0.00701904296875000090f,     -0.00399780273437500000f,
-      0.00479125976562500000f,     -0.00064086914062500000f,
-     -0.00259399414062500000f,     -0.00085449218750000000f,
-     -0.00375366210937500000f,      0.00244140625000000000f,
-     -0.00488281250000000000f,      0.00192260742187500000f,
-      0.00143432617187500000f,     -0.00018310546875000000f,
-     -0.00149536132812500000f,     -0.00292968750000000000f,
-     -0.00057983398437500000f,      0.00051879882812500000f,
-     -0.00177001953125000000f,      0.00051879882812500000f,
-     -0.00000000000000000000f,     -0.00039672851562500005f,
-     -0.00518798828125000000f,      0.00076293945312500000f,
-     -0.00106811523437500000f,      0.00180053710937500000f,
-      0.00030517578125000000f,     -0.00094604492187500000f,
-     -0.01260375976562500000f,      0.00247192382812500000f,
-      0.00189208984375000000f,      0.00054931640625000000f,
-     -0.00500488281250000000f,      0.00747680664062500000f,
-      0.00280761718750000000f,     -0.00503540039062499910f,
-      0.00128173828125000000f,      0.00079345703125000011f,
-      0.00384521484375000000f,     -0.00756835937500000000f,
-      0.00588989257812500000f,     -0.00167846679687500000f,
-      0.00048828125000000000f,      0.00119018554687500000f,
-      0.00042724609375000000f,      0.00152587890625000000f
+     -0.46093750000000000000f,     -0.41015625000000000000f,
+     -0.35156250000000000000f,     -0.28906250000000000000f,
+     -0.22656250000000000000f,     -0.17187499999999997000f,
+     -0.11328125000000000000f,     -0.05078125000000000700f,
+      0.01171875000000000000f,      0.07031250000000000000f,
+      0.12890625000000000000f,      0.19140625000000000000f,
+      0.25000000000000000000f,      0.30859375000000000000f,
+      0.37109375000000000000f,      0.42578124999999994000f,
+     -0.46093750000000000000f,     -0.42968750000000000000f,
+     -0.37109375000000000000f,     -0.31640625000000000000f,
+     -0.25781250000000000000f,     -0.20312500000000003000f,
+     -0.14453125000000000000f,     -0.08203125000000000000f,
+     -0.01562500000000000000f,      0.04687500000000000000f,
+      0.10546875000000000000f,      0.16796875000000000000f,
+      0.23437499999999997000f,      0.30078125000000000000f,
+      0.36328124999999994000f,      0.41796875000000000000f,
+     -0.46874999999999994000f,     -0.44531250000000000000f,
+     -0.36718750000000000000f,     -0.30468750000000000000f,
+     -0.23437499999999997000f,     -0.17578125000000000000f,
+     -0.11328125000000000000f,     -0.05078125000000000700f,
+      0.01171875000000000000f,      0.07421875000000000000f,
+      0.13281250000000000000f,      0.19140625000000000000f,
+      0.25390625000000000000f,      0.31250000000000000000f,
+      0.37109375000000000000f,      0.42968750000000000000f,
+     -0.47656250000000000000f,     -0.45703125000000000000f,
+     -0.40234375000000000000f,     -0.34374999999999994000f,
+     -0.26953125000000000000f,     -0.20312500000000003000f,
+     -0.14453125000000000000f,     -0.07421875000000000000f,
+     -0.00781250000000000000f,      0.05859374999999999300f,
+      0.12109375000000000000f,      0.18359375000000000000f,
+      0.24609375000000000000f,      0.30859375000000000000f,
+      0.37109375000000000000f,      0.42968750000000000000f,
+     -0.46484375000000000000f,     -0.43359375000000000000f,
+     -0.37109375000000000000f,     -0.31640625000000000000f,
+     -0.26562500000000000000f,     -0.20703125000000000000f,
+     -0.14062500000000000000f,     -0.08593749999999998600f,
+     -0.01953125000000000000f,      0.03515625000000000000f,
+      0.10546875000000000000f,      0.15625000000000000000f,
+      0.21875000000000000000f,      0.27343750000000000000f,
+      0.33203125000000000000f,      0.37500000000000000000f,
+     -0.45703125000000000000f,     -0.41406250000000000000f,
+     -0.35156250000000000000f,     -0.29687500000000000000f,
+     -0.24218750000000000000f,     -0.19140625000000000000f,
+     -0.12109375000000000000f,     -0.05859374999999999300f,
+     -0.00781250000000000000f,      0.03906250000000000000f,
+      0.10156250000000001000f,      0.15234375000000000000f,
+      0.19921875000000000000f,      0.25000000000000000000f,
+      0.31250000000000000000f,      0.35156250000000000000f,
+     -0.44140625000000000000f,     -0.39843750000000000000f,
+     -0.32812500000000000000f,     -0.26953125000000000000f,
+     -0.21093750000000000000f,     -0.16406250000000000000f,
+     -0.10546875000000000000f,     -0.05859374999999999300f,
+     -0.00390625000000000000f,      0.05078125000000000700f,
+      0.10937500000000000000f,      0.16406250000000000000f,
+      0.22656250000000000000f,      0.28515625000000000000f,
+      0.35156250000000000000f,      0.41406250000000000000f,
+     -0.44921875000000006000f,     -0.40625000000000006000f,
+     -0.35156250000000000000f,     -0.29687500000000000000f,
+     -0.24609375000000000000f,     -0.19531250000000000000f,
+     -0.13671875000000000000f,     -0.08203125000000000000f,
+     -0.03125000000000000000f,      0.02734375000000000000f,
+      0.08593749999999998600f,      0.14453125000000000000f,
+      0.20703125000000000000f,      0.27343750000000000000f,
+      0.34374999999999994000f,      0.41796875000000000000f,
+     -0.42578124999999994000f,     -0.38281250000000000000f,
+     -0.32031250000000000000f,     -0.25781250000000000000f,
+     -0.19140625000000000000f,     -0.13671875000000000000f,
+     -0.07031250000000000000f,     -0.00781250000000000000f,
+      0.05468750000000000000f,      0.11718749999999999000f,
+      0.17578125000000000000f,      0.22656250000000000000f,
+      0.28515625000000000000f,      0.33593750000000000000f,
+      0.39062500000000000000f,      0.44140625000000000000f,
+     -0.41406250000000000000f,     -0.37500000000000000000f,
+     -0.32031250000000000000f,     -0.26562500000000000000f,
+     -0.20703125000000000000f,     -0.15625000000000000000f,
+     -0.09765625000000000000f,     -0.03906250000000000000f,
+      0.01953125000000000000f,      0.07421875000000000000f,
+      0.13281250000000000000f,      0.19140625000000000000f,
+      0.25390625000000000000f,      0.31250000000000000000f,
+      0.37500000000000000000f,      0.42968750000000000000f,
+     -0.46874999999999994000f,     -0.44140625000000000000f,
+     -0.38671875000000006000f,     -0.33593750000000000000f,
+     -0.28125000000000000000f,     -0.23046875000000000000f,
+     -0.19531250000000000000f,     -0.14062500000000000000f,
+     -0.02734375000000000000f,      0.03906250000000000000f,
+      0.10546875000000000000f,      0.17578125000000000000f,
+      0.23828125000000000000f,      0.30468750000000000000f,
+      0.36718750000000000000f,      0.42578124999999994000f,
+     -0.45703125000000000000f,     -0.42578124999999994000f,
+     -0.37500000000000000000f,     -0.32812500000000000000f,
+     -0.28125000000000000000f,     -0.22656250000000000000f,
+     -0.18359375000000000000f,     -0.12500000000000000000f,
+     -0.07421875000000000000f,     -0.00781250000000000000f,
+      0.08984375000000000000f,      0.15625000000000000000f,
+      0.22265625000000000000f,      0.29296875000000000000f,
+      0.35937500000000000000f,      0.42578124999999994000f,
+     -0.46484375000000000000f,     -0.43750000000000000000f,
+     -0.38671875000000006000f,     -0.33984375000000000000f,
+     -0.30468750000000000000f,     -0.25781250000000000000f,
+     -0.16406250000000000000f,     -0.07812500000000000000f,
+     -0.02343750000000000000f,      0.04296874999999999300f,
+      0.10937500000000000000f,      0.17187499999999997000f,
+      0.23437499999999997000f,      0.30468750000000000000f,
+      0.36718750000000000000f,      0.42968750000000000000f,
+     -0.42968750000000000000f,     -0.37890625000000000000f,
+     -0.30859375000000000000f,     -0.24218750000000000000f,
+     -0.17187499999999997000f,     -0.10156250000000001000f,
+     -0.03125000000000000000f,      0.03125000000000000000f,
+      0.08984375000000000000f,      0.14062500000000000000f,
+      0.19140625000000000000f,      0.23437499999999997000f,
+      0.28125000000000000000f,      0.32812500000000000000f,
+      0.37890625000000000000f,      0.43359375000000000000f,
+     -0.42578124999999994000f,     -0.36718750000000000000f,
+     -0.28515625000000000000f,     -0.21484375000000000000f,
+     -0.14453125000000000000f,     -0.08593749999999998600f,
+     -0.03125000000000000000f,      0.00781250000000000000f,
+      0.05078125000000000700f,      0.09375000000000000000f,
+      0.14453125000000000000f,      0.19531250000000000000f,
+      0.25390625000000000000f,      0.30859375000000000000f,
+      0.37109375000000000000f,      0.42968750000000000000f,
+     -0.44531250000000000000f,     -0.39453125000000000000f,
+     -0.32421875000000006000f,     -0.26171875000000000000f,
+     -0.18750000000000000000f,     -0.12109375000000000000f,
+     -0.05859374999999999300f,     -0.00390625000000000000f,
+      0.03906250000000000000f,      0.08203125000000000000f,
+      0.13281250000000000000f,      0.19140625000000000000f,
+      0.25390625000000000000f,      0.31250000000000000000f,
+      0.37500000000000000000f,      0.43359375000000000000f,
+     -0.46093750000000000000f,     -0.43750000000000000000f,
+     -0.39062500000000000000f,     -0.35937500000000000000f,
+     -0.31250000000000000000f,     -0.19140625000000000000f,
+     -0.13281250000000000000f,     -0.07421875000000000000f,
+     -0.02734375000000000000f,      0.03125000000000000000f,
+      0.10156250000000001000f,      0.16796875000000000000f,
+      0.23437499999999997000f,      0.30468750000000000000f,
+      0.36718750000000000000f,      0.42968750000000000000f,
+     -0.46093750000000000000f,     -0.43750000000000000000f,
+     -0.39062500000000000000f,     -0.30468750000000000000f,
+     -0.23828125000000000000f,     -0.19921875000000000000f,
+     -0.14843750000000000000f,     -0.10156250000000001000f,
+     -0.02343750000000000000f,      0.02343750000000000000f,
+      0.07421875000000000000f,      0.12890625000000000000f,
+      0.20312500000000003000f,      0.28515625000000000000f,
+      0.36718750000000000000f,      0.42968750000000000000f,
+     -0.45703125000000000000f,     -0.42968750000000000000f,
+     -0.36718750000000000000f,     -0.30859375000000000000f,
+     -0.26171875000000000000f,     -0.21093750000000000000f,
+     -0.16406250000000000000f,     -0.10546875000000000000f,
+     -0.06250000000000000000f,     -0.02343750000000000000f,
+      0.03125000000000000000f,      0.13671875000000000000f,
+      0.22265625000000000000f,      0.29296875000000000000f,
+      0.35937500000000000000f,      0.42578124999999994000f,
+     -0.44140625000000000000f,     -0.35937500000000000000f,
+     -0.27734375000000000000f,     -0.22265625000000000000f,
+     -0.17578125000000000000f,     -0.13281250000000000000f,
+     -0.08593749999999998600f,     -0.03906250000000000000f,
+      0.01562500000000000000f,      0.06640625000000000000f,
+      0.12500000000000000000f,      0.17968750000000000000f,
+      0.24218750000000000000f,      0.30078125000000000000f,
+      0.36328124999999994000f,      0.41796875000000000000f,
+     -0.46874999999999994000f,     -0.42968750000000000000f,
+     -0.35156250000000000000f,     -0.27734375000000000000f,
+     -0.21093750000000000000f,     -0.14453125000000000000f,
+     -0.06640625000000000000f,     -0.00390625000000000000f,
+      0.06250000000000000000f,      0.12109375000000000000f,
+      0.17187499999999997000f,      0.21875000000000000000f,
+      0.27343750000000000000f,      0.32031250000000000000f,
+      0.37890625000000000000f,      0.43359375000000000000f,
+     -0.42968750000000000000f,     -0.39453125000000000000f,
+     -0.34374999999999994000f,     -0.31250000000000000000f,
+     -0.26953125000000000000f,     -0.19531250000000000000f,
+     -0.11718749999999999000f,     -0.05078125000000000700f,
+      0.00781250000000000000f,      0.06640625000000000000f,
+      0.12500000000000000000f,      0.18750000000000000000f,
+      0.25000000000000000000f,      0.31250000000000000000f,
+      0.37890625000000000000f,      0.43359375000000000000f,
+     -0.46093750000000000000f,     -0.43750000000000000000f,
+     -0.39453125000000000000f,     -0.33593750000000000000f,
+     -0.21484375000000000000f,     -0.16015625000000000000f,
+     -0.11328125000000000000f,     -0.06250000000000000000f,
+     -0.01562500000000000000f,      0.03906250000000000000f,
+      0.11718749999999999000f,      0.16796875000000000000f,
+      0.21875000000000000000f,      0.28125000000000000000f,
+      0.35156250000000000000f,      0.41796875000000000000f,
+     -0.43750000000000000000f,     -0.40234375000000000000f,
+     -0.34374999999999994000f,     -0.28906250000000000000f,
+     -0.23828125000000000000f,     -0.19140625000000000000f,
+     -0.14062500000000000000f,     -0.09375000000000000000f,
+     -0.03906250000000000000f,      0.01562500000000000000f,
+      0.06640625000000000000f,      0.11328125000000000000f,
+      0.16796875000000000000f,      0.22265625000000000000f,
+      0.28906250000000000000f,      0.39843750000000000000f,
+     -0.46093750000000000000f,     -0.41796875000000000000f,
+     -0.32812500000000000000f,     -0.26953125000000000000f,
+     -0.20312500000000003000f,     -0.13671875000000000000f,
+     -0.06640625000000000000f,     -0.01953125000000000000f,
+      0.03515625000000000000f,      0.07812500000000000000f,
+      0.13281250000000000000f,      0.17578125000000000000f,
+      0.23046875000000000000f,      0.26953125000000000000f,
+      0.32812500000000000000f,      0.36328124999999994000f,
+     -0.41406250000000000000f,     -0.37109375000000000000f,
+     -0.30468750000000000000f,     -0.24609375000000000000f,
+     -0.18750000000000000000f,     -0.14062500000000000000f,
+     -0.09375000000000000000f,     -0.05078125000000000700f,
+     -0.00390625000000000000f,      0.03515625000000000000f,
+      0.08203125000000000000f,      0.12500000000000000000f,
+      0.17968750000000000000f,      0.23437499999999997000f,
+      0.29687500000000000000f,      0.35937500000000000000f,
+     -0.45312500000000000000f,     -0.39453125000000000000f,
+     -0.33203125000000000000f,     -0.26953125000000000000f,
+     -0.21093750000000000000f,     -0.14453125000000000000f,
+     -0.08203125000000000000f,     -0.02343750000000000000f,
+      0.04296874999999999300f,      0.09375000000000000000f,
+      0.15234375000000000000f,      0.20703125000000000000f,
+      0.29687500000000000000f,      0.36328124999999994000f,
+      0.40625000000000006000f,      0.43750000000000000000f,
+     -0.44531250000000000000f,     -0.40625000000000006000f,
+     -0.33984375000000000000f,     -0.28906250000000000000f,
+     -0.23828125000000000000f,     -0.19531250000000000000f,
+     -0.15625000000000000000f,     -0.11718749999999999000f,
+     -0.07421875000000000000f,     -0.03906250000000000000f,
+      0.01562500000000000000f,      0.05468750000000000000f,
+      0.14062500000000000000f,      0.26953125000000000000f,
+      0.34765625000000000000f,      0.42578124999999994000f,
+     -0.43750000000000000000f,     -0.38281250000000000000f,
+     -0.33203125000000000000f,     -0.28125000000000000000f,
+     -0.21093750000000000000f,     -0.13671875000000000000f,
+     -0.08984375000000000000f,     -0.04296874999999999300f,
+      0.01171875000000000000f,      0.07812500000000000000f,
+      0.14843750000000000000f,      0.21875000000000000000f,
+      0.26953125000000000000f,      0.31640625000000000000f,
+      0.35156250000000000000f,      0.42187500000000000000f,
+     -0.45312500000000000000f,     -0.39453125000000000000f,
+     -0.32812500000000000000f,     -0.27343750000000000000f,
+     -0.21484375000000000000f,     -0.15625000000000000000f,
+     -0.09765625000000000000f,     -0.03125000000000000000f,
+      0.04296874999999999300f,      0.11718749999999999000f,
+      0.16015625000000000000f,      0.19140625000000000000f,
+      0.24218750000000000000f,      0.32421875000000006000f,
+      0.41015625000000000000f,      0.45703125000000000000f,
+     -0.44921875000000006000f,     -0.38281250000000000000f,
+     -0.32031250000000000000f,     -0.23828125000000000000f,
+     -0.18750000000000000000f,     -0.15625000000000000000f,
+     -0.11328125000000000000f,     -0.05468750000000000000f,
+      0.02343750000000000000f,      0.08593749999999998600f,
+      0.15234375000000000000f,      0.20703125000000000000f,
+      0.26562500000000000000f,      0.32031250000000000000f,
+      0.37500000000000000000f,      0.42968750000000000000f,
+     -0.44140625000000000000f,     -0.37500000000000000000f,
+     -0.29687500000000000000f,     -0.26562500000000000000f,
+     -0.23046875000000000000f,     -0.17187499999999997000f,
+     -0.08203125000000000000f,     -0.03125000000000000000f,
+      0.01171875000000000000f,      0.05859374999999999300f,
+      0.12890625000000000000f,      0.19140625000000000000f,
+      0.25390625000000000000f,      0.31250000000000000000f,
+      0.37109375000000000000f,      0.42968750000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.02343750000000000000f,
+     -0.02343750000000000000f,     -0.01953125000000000000f,
+     -0.01562500000000000000f,     -0.01562500000000000000f,
+     -0.01171875000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+     -0.01562500000000000000f,     -0.01953125000000000000f,
+     -0.01953125000000000000f,     -0.01562500000000000000f,
+     -0.01171875000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.03515625000000000000f,      0.03125000000000000000f,
+      0.01953125000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.01953125000000000000f,     -0.03125000000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.03125000000000000000f,
+      0.03515625000000000000f,      0.03125000000000000000f,
+      0.01953125000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.01562500000000000000f,      0.01953125000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.01953125000000000000f,
+     -0.03125000000000000000f,     -0.03125000000000000000f,
+     -0.02343750000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00781250000000000000f,
+      0.01953125000000000000f,      0.01953125000000000000f,
+      0.01953125000000000000f,      0.03125000000000000000f,
+      0.03515625000000000000f,      0.02734375000000000000f,
+      0.02343750000000000000f,      0.01171875000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.02343750000000000000f,     -0.02734375000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.01562500000000000000f,      0.02734375000000000000f,
+      0.01562500000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.01953125000000000000f,
+     -0.02734375000000000000f,      0.01953125000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+     -0.02734375000000000000f,     -0.02343750000000000000f,
+     -0.01953125000000000000f,     -0.01171875000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.01562500000000000000f,
+      0.01953125000000000000f,      0.01562500000000000000f,
+      0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.02343750000000000000f,     -0.02734375000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.02343750000000000000f,     -0.03515625000000000000f,
+     -0.01562500000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01953125000000000000f,     -0.02734375000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.01171875000000000000f,
+      0.01562500000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.01953125000000000000f,
+     -0.01562500000000000000f,     -0.01171875000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.01171875000000000000f,
+      0.01171875000000000000f,      0.00000000000000000000f,
+     -0.01562500000000000000f,     -0.02343750000000000000f,
+     -0.01562500000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.01953125000000000000f,
+     -0.02734375000000000000f,     -0.01953125000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.01562500000000000000f,     -0.02734375000000000000f,
+      0.01953125000000000000f,      0.01171875000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.01171875000000000000f,
+     -0.02734375000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.01562500000000000000f,      0.02343750000000000000f,
+      0.02343750000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.01562500000000000000f,     -0.01562500000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01562500000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,     -0.01562500000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.01171875000000000000f,
+      0.01562500000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.01953125000000000000f,
+     -0.01562500000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+     -0.01562500000000000000f,      0.00390625000000000000f,
+      0.01562500000000000000f,      0.01562500000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01953125000000000000f,      0.01562500000000000000f,
+     -0.00390625000000000000f,     -0.01953125000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.01562500000000000000f,
+     -0.02734375000000000000f,      0.01953125000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.01171875000000000000f,     -0.01171875000000000000f,
+      0.02343750000000000000f,      0.01953125000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.01562500000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+      0.01562500000000000000f,      0.00000000000000000000f,
+     -0.01562500000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.01562500000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.01171875000000000000f,
+     -0.00781250000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.01953125000000000000f,
+      0.01562500000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00781250000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.01953125000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.01171875000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.01953125000000000000f,
+      0.01171875000000000000f,     -0.00781250000000000000f,
+     -0.01562500000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.01953125000000000000f,
+      0.01171875000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.01562500000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.01562500000000000000f,      0.00781250000000000000f,
+     -0.01171875000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00781250000000000000f,
+     -0.00781250000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00781250000000000000f,
+     -0.01171875000000000000f,      0.00781250000000000000f,
+      0.01171875000000000000f,      0.00000000000000000000f,
+     -0.01562500000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.01171875000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.01171875000000000000f,
+      0.00781250000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01171875000000000000f,     -0.01562500000000000000f,
+      0.01953125000000000000f,      0.01171875000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.01171875000000000000f,
+      0.01171875000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00781250000000000000f,     -0.00781250000000000000f,
+      0.00781250000000000000f,      0.01171875000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,      0.01562500000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.01953125000000000000f,      0.01171875000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00781250000000000000f,     -0.01171875000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.01562500000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.01562500000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00781250000000000000f,     -0.01562500000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00781250000000000000f,      0.01171875000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00390625000000000000f,     -0.00781250000000000000f,
+      0.00000000000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.01171875000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+     -0.00781250000000000000f,      0.01171875000000000000f,
+     -0.00390625000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00390625000000000000f,      0.00781250000000000000f,
+     -0.01562500000000000000f,     -0.00390625000000000000f,
+     -0.00781250000000000000f,     -0.00390625000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+     -0.00390625000000000000f,      0.00390625000000000000f,
+      0.00000000000000000000f,      0.00390625000000000000f,
+      0.00390625000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f,
+      0.00000000000000000000f,      0.00000000000000000000f
 };
 
 const SKP_Silk_NLSF_CBS_FLP SKP_Silk_NLSF_CB1_16_Stage_info_FLP[ NLSF_MSVQ_CB1_16_STAGES ] =
--- a/src_FLP/SKP_Silk_tables_other_FLP.c
+++ b/src_FLP/SKP_Silk_tables_other_FLP.c
@@ -26,8 +26,7 @@
 ***********************************************************************/
 
 #include "SKP_Silk_structs_FLP.h"
-#include "SKP_Silk_define_FLP.h"
-#include "SKP_Silk_perceptual_parameters.h"
+#include "SKP_Silk_tables_FLP.h"
 
 const SKP_float SKP_Silk_HarmShapeFIR_FLP[ HARM_SHAPE_FIR_TAPS ] = { 16384.0f / 65536.0f, 32767.0f / 65536.0f, 16384.0f / 65536.0f };
 
--- a/src_FLP/SKP_Silk_wrappers_FLP.c
+++ b/src_FLP/SKP_Silk_wrappers_FLP.c
@@ -134,10 +134,10 @@
     const SKP_int16                 *pIn                /* I    Input signal                            */
 )
 {
-    SKP_int i, ret, SA_Q8, Tilt_Q15;
+    SKP_int i, ret, SA_Q8, SNR_dB_Q7, Tilt_Q15;
     SKP_int Quality_Bands_Q15[ VAD_N_BANDS ];
 
-    ret = SKP_Silk_VAD_GetSA_Q8( &psEnc->sCmn.sVAD, &SA_Q8, Quality_Bands_Q15, &Tilt_Q15,
+    ret = SKP_Silk_VAD_GetSA_Q8( &psEnc->sCmn.sVAD, &SA_Q8, &SNR_dB_Q7, Quality_Bands_Q15, &Tilt_Q15,
         pIn, psEnc->sCmn.frame_length, psEnc->sCmn.fs_kHz );
 
     psEnc->speech_activity = ( SKP_float )SA_Q8 / 256.0f;
@@ -165,7 +165,7 @@
     SKP_int16   x_16[ MAX_FRAME_LENGTH ];
     /* Prediction and coding parameters */
     SKP_int32   Gains_Q16[ MAX_NB_SUBFR ];
-    SKP_array_of_int16_4_byte_aligned( PredCoef_Q12[ 2 ], MAX_LPC_ORDER );
+    SKP_DWORD_ALIGN SKP_int16 PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ];
     SKP_int16   LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ];
     SKP_int     LTP_scale_Q14;
 
@@ -180,7 +180,7 @@
     /* Convert control struct to fix control struct */
     /* Noise shape parameters */
     for( i = 0; i < MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER; i++ ) {
-        AR2_Q13[ i ] = (SKP_int16)SKP_SAT16( SKP_float2int( psEncCtrl->AR2[ i ] * 8192.0f ) );
+        AR2_Q13[ i ] = SKP_float2int( psEncCtrl->AR2[ i ] * 8192.0f );
     }
 
     for( i = 0; i < MAX_NB_SUBFR; i++ ) {
@@ -222,7 +222,7 @@
 
     /* Call NSQ */
     if( useLBRR ) {
-        if( psEnc->sCmn.nStatesDelayedDecision > 1 ) {
+        if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) {
             SKP_Silk_NSQ_del_dec( &psEnc->sCmn, &psEncCtrl->sCmn, &psEnc->sNSQ_LBRR, 
                 x_16, q, psEncCtrl->sCmn.NLSFInterpCoef_Q2, PredCoef_Q12[ 0 ], LTPCoef_Q14, AR2_Q13, 
                 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, Lambda_Q10, LTP_scale_Q14 );
@@ -232,7 +232,7 @@
                 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, Lambda_Q10, LTP_scale_Q14 );
         }
     } else {
-        if( psEnc->sCmn.nStatesDelayedDecision > 1 ) {
+        if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) {
             SKP_Silk_NSQ_del_dec( &psEnc->sCmn, &psEncCtrl->sCmn, &psEnc->sNSQ, 
                 x_16, q, psEncCtrl->sCmn.NLSFInterpCoef_Q2, PredCoef_Q12[ 0 ], LTPCoef_Q14, AR2_Q13, 
                 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, Lambda_Q10, LTP_scale_Q14 );
--- a/src_SigProc_FIX/SKP_Silk_A2NLSF.c
+++ b/src_SigProc_FIX/SKP_Silk_A2NLSF.c
@@ -34,9 +34,9 @@
 #include "SKP_Silk_SigProc_FIX.h"
 
 /* Number of binary divisions, when not in low complexity mode */
-#define BIN_DIV_STEPS_A2NLSF_FIX      2 /* must be no higher than 16 - log2( LSF_COS_TAB_SZ_FIX ) */
+#define BIN_DIV_STEPS_A2NLSF_FIX      3 /* must be no higher than 16 - log2( LSF_COS_TAB_SZ_FIX ) */
 #define QPoly                        16
-#define MAX_ITERATIONS_A2NLSF_FIX    50
+#define MAX_ITERATIONS_A2NLSF_FIX    30
 
 /* Flag for using 2x as many cosine sampling points, reduces the risk of missing a root */
 #define OVERSAMPLE_COSINE_TABLE       0
@@ -61,7 +61,7 @@
 /* Polynomial evaluation                             */
 SKP_INLINE SKP_int32 SKP_Silk_A2NLSF_eval_poly(    /* return the polynomial evaluation, in QPoly */
     SKP_int32        *p,    /* I    Polynomial, QPoly        */
-    const SKP_int32    x,   /* I    Evaluation point, Q12    */
+    const SKP_int32   x,    /* I    Evaluation point, Q12    */
     const SKP_int    dd     /* I    Order                    */
 )
 {
@@ -78,9 +78,9 @@
 
 SKP_INLINE void SKP_Silk_A2NLSF_init(
      const SKP_int32    *a_Q16,
-     SKP_int32            *P, 
-     SKP_int32            *Q, 
-     const SKP_int        dd
+     SKP_int32          *P, 
+     SKP_int32          *Q, 
+     const SKP_int      dd
 ) 
 {
     SKP_int k;
@@ -257,7 +257,7 @@
                 }
 
                 /* Error: Apply progressively more bandwidth expansion and run again */
-                SKP_Silk_bwexpander_32( a_Q16, d, 65536 - SKP_SMULBB( 66, i ) ); // 66_Q16 = 0.001
+                SKP_Silk_bwexpander_32( a_Q16, d, 65536 - SKP_SMULBB( 10 + i, i ) ); // 10_Q16 = 0.00015
 
                 SKP_Silk_A2NLSF_init( a_Q16, P, Q, dd );
                 p = P;                            /* Pointer to polynomial */
@@ -268,9 +268,9 @@
                     NLSF[ 0 ] = 0;
                     p = Q;                        /* Pointer to polynomial */
                     ylo = SKP_Silk_A2NLSF_eval_poly( p, xlo, dd );
-                    root_ix = 1;                /* Index of current root */
+                    root_ix = 1;                  /* Index of current root */
                 } else {
-                    root_ix = 0;                /* Index of current root */
+                    root_ix = 0;                  /* Index of current root */
                 }
                 k = 1;                            /* Reset loop counter */
             }
--- a/src_SigProc_FIX/SKP_Silk_LPC_inv_pred_gain.c
+++ b/src_SigProc_FIX/SKP_Silk_LPC_inv_pred_gain.c
@@ -34,6 +34,7 @@
  * Copyright 2008 (c), Skype Limited                                    *
  *                                                                      */
 #include "SKP_Silk_SigProc_FIX.h"
+
 #define QA          16
 #define A_LIMIT     SKP_FIX_CONST( 0.99975, QA )
 
@@ -171,3 +172,4 @@
 
     return LPC_inverse_pred_gain_QA( invGain_Q30, Atmp_QA, order );
 }
+
--- a/src_SigProc_FIX/SKP_Silk_LPC_stabilize.c
+++ b/src_SigProc_FIX/SKP_Silk_LPC_stabilize.c
@@ -116,6 +116,7 @@
         maxabs = SKP_RSHIFT( maxabs, rshift );
         if( maxabs >= SKP_int16_MAX ) {
             /* Reduce magnitude of prediction coefficients */
+            maxabs = SKP_min( maxabs, 98369 ); // ( SKP_int32_MAX / ( 65470 >> 2 ) ) + SKP_int16_MAX = 98369
             sc_Q16 = 65470 - SKP_DIV32( SKP_MUL( 65470 >> 2, maxabs - SKP_int16_MAX ), 
                                         SKP_RSHIFT32( SKP_MUL( maxabs, idx + 1), 2 ) );
             SKP_Silk_bwexpander_32( a_Q24, L, sc_Q16 );
--- a/src_SigProc_FIX/SKP_Silk_NLSF_VQ_weights_laroia.c
+++ b/src_SigProc_FIX/SKP_Silk_NLSF_VQ_weights_laroia.c
@@ -34,6 +34,7 @@
 */
 
 #define Q_OUT                       6
+#define MIN_NDELTA                  3
 
 /* Laroia low complexity NLSF weights */
 void SKP_Silk_NLSF_VQ_weights_laroia(
@@ -50,9 +51,9 @@
     SKP_assert( ( D & 1 ) == 0 );
     
     /* First value */
-    tmp1_int = SKP_max_int( pNLSF_Q15[ 0 ], 1 );
+    tmp1_int = SKP_max_int( pNLSF_Q15[ 0 ], MIN_NDELTA );
     tmp1_int = SKP_DIV32_16( 1 << ( 15 + Q_OUT ), tmp1_int );
-    tmp2_int = SKP_max_int( pNLSF_Q15[ 1 ] - pNLSF_Q15[ 0 ], 1 );
+    tmp2_int = SKP_max_int( pNLSF_Q15[ 1 ] - pNLSF_Q15[ 0 ], MIN_NDELTA );
     tmp2_int = SKP_DIV32_16( 1 << ( 15 + Q_OUT ), tmp2_int );
     pNLSFW_Q6[ 0 ] = (SKP_int)SKP_min_int( tmp1_int + tmp2_int, SKP_int16_MAX );
     SKP_assert( pNLSFW_Q6[ 0 ] > 0 );
@@ -59,12 +60,12 @@
     
     /* Main loop */
     for( k = 1; k < D - 1; k += 2 ) {
-        tmp1_int = SKP_max_int( pNLSF_Q15[ k + 1 ] - pNLSF_Q15[ k ], 1 );
+        tmp1_int = SKP_max_int( pNLSF_Q15[ k + 1 ] - pNLSF_Q15[ k ], MIN_NDELTA );
         tmp1_int = SKP_DIV32_16( 1 << ( 15 + Q_OUT ), tmp1_int );
         pNLSFW_Q6[ k ] = (SKP_int)SKP_min_int( tmp1_int + tmp2_int, SKP_int16_MAX );
         SKP_assert( pNLSFW_Q6[ k ] > 0 );
 
-        tmp2_int = SKP_max_int( pNLSF_Q15[ k + 2 ] - pNLSF_Q15[ k + 1 ], 1 );
+        tmp2_int = SKP_max_int( pNLSF_Q15[ k + 2 ] - pNLSF_Q15[ k + 1 ], MIN_NDELTA );
         tmp2_int = SKP_DIV32_16( 1 << ( 15 + Q_OUT ), tmp2_int );
         pNLSFW_Q6[ k + 1 ] = (SKP_int)SKP_min_int( tmp1_int + tmp2_int, SKP_int16_MAX );
         SKP_assert( pNLSFW_Q6[ k + 1 ] > 0 );
@@ -71,7 +72,7 @@
     }
     
     /* Last value */
-    tmp1_int = SKP_max_int( ( 1 << 15 ) - pNLSF_Q15[ D - 1 ], 1 );
+    tmp1_int = SKP_max_int( ( 1 << 15 ) - pNLSF_Q15[ D - 1 ], MIN_NDELTA );
     tmp1_int = SKP_DIV32_16( 1 << ( 15 + Q_OUT ), tmp1_int );
     pNLSFW_Q6[ D - 1 ] = (SKP_int)SKP_min_int( tmp1_int + tmp2_int, SKP_int16_MAX );
     SKP_assert( pNLSFW_Q6[ D - 1 ] > 0 );
--- a/src_SigProc_FIX/SKP_Silk_SigProc_FIX.h
+++ b/src_SigProc_FIX/SKP_Silk_SigProc_FIX.h
@@ -82,10 +82,10 @@
  Upsample 2x, low quality 
  */
 void SKP_Silk_resampler_up2(
-    SKP_int32                           *S,         /* I/O: State vector [ 2 ]          */
-    SKP_int16                           *out,       /* O:   Output signal [ 2 * len ]   */
-    const SKP_int16                     *in,        /* I:   Input signal [ len ]        */
-    SKP_int32                           len         /* I:   Number of INPUT samples     */
+    SKP_int32                           *S,         /* I/O: State vector [ 2 ]                  */
+    SKP_int16                           *out,       /* O:   Output signal [ 2 * len ]           */
+    const SKP_int16                     *in,        /* I:   Input signal [ len ]                */
+    SKP_int32                           len         /* I:   Number of input samples             */
 );
 
 /*!
@@ -92,10 +92,10 @@
 * Downsample 2x, mediocre quality 
 */
 void SKP_Silk_resampler_down2(
-    SKP_int32                           *S,         /* I/O: State vector [ 2 ]          */
-    SKP_int16                           *out,       /* O:   Output signal [ len ]       */
-    const SKP_int16                     *in,        /* I:   Input signal [ 2 * len ]    */
-    SKP_int32                           len         /* I:   Number of OUTPUT samples    */
+    SKP_int32                           *S,         /* I/O: State vector [ 2 ]                  */
+    SKP_int16                           *out,       /* O:   Output signal [ len ]               */
+    const SKP_int16                     *in,        /* I:   Input signal [ floor(len/2) ]       */
+    SKP_int32                           inLen       /* I:   Number of input samples             */
 );
 
 
@@ -110,7 +110,7 @@
 );
 
 /*!
- * Downsamples by a factor 3, low quality
+ * Downsample by a factor 3, low quality
 */
 void SKP_Silk_resampler_down3(
     SKP_int32                           *S,         /* I/O: State vector [ 8 ]                  */
@@ -301,12 +301,12 @@
 
 /* Calculates the reflection coefficients from the correlation sequence    */
 /* Faster than schur64(), but much less accurate.                          */
-/* Uses SMLAWB(), requiring armv5E and higher.                             */
-void SKP_Silk_schur(
-    SKP_int16           *rc_Q15,        /* O:  reflection coefficients [order] Q15         */
-    const SKP_int32     *c,             /* I:  correlations [order+1]                      */
-    const SKP_int32     order           /* I:  prediction order                            */
-);
+/* uses SMLAWB(), requiring armv5E and higher.                             */ 
+SKP_int32 SKP_Silk_schur(               /* O:    Returns residual energy                   */
+    SKP_int16           *rc_Q15,        /* O:    reflection coefficients [order] Q15       */
+    const SKP_int32     *c,             /* I:    correlations [order+1]                    */
+    const SKP_int32     order           /* I:    prediction order                          */
+);;
 
 /* Calculates the reflection coefficients from the correlation sequence    */
 /* Slower than schur(), but more accurate.                                 */
@@ -333,7 +333,6 @@
 
 /* Apply sine window to signal vector.                                      */
 /* Window types:                                                            */
-/*    0 -> sine window from 0 to pi                                         */
 /*    1 -> sine window from 0 to pi/2                                       */
 /*    2 -> sine window from pi/2 to pi                                      */
 /* every other sample of window is linearly interpolated, for speed         */
@@ -552,10 +551,12 @@
         return (SKP_int32) ((x << (32 - r)) | (x >> r));
 }
 
-/* Define 4-byte aligned array of SKP_int16 */
-#define SKP_array_of_int16_4_byte_aligned( arrayName, nElements )    \
-    SKP_int32 dummy_int32 ## arrayName;                                \
-    SKP_int16 arrayName[ (nElements) ]
+/* Allocate SKP_int16 alligned to 4-byte memory address */
+#if EMBEDDED_ARM
+#define SKP_DWORD_ALIGN __attribute__((aligned(4)))
+#else
+#define SKP_DWORD_ALIGN
+#endif
 
 /* Useful Macros that can be adjusted to other platforms */
 #define SKP_memcpy(a, b, c)                memcpy((a), (b), (c))    /* Dest, Src, ByteCount */
@@ -684,7 +685,7 @@
 #define SKP_max(a, b)                     (((a) > (b)) ? (a) : (b))
 
 /* Macro to convert floating-point constants to fixed-point */
-#define SKP_FIX_CONST( C, Q )             ((SKP_int32)((C) * (1 << (Q)) + 0.5))
+#define SKP_FIX_CONST( C, Q )           ((SKP_int32)((C) * ((SKP_int64)1 << (Q)) + 0.5))
 
 /* SKP_min() versions with typecast in the function call */
 SKP_INLINE SKP_int SKP_min_int(SKP_int a, SKP_int b)
--- a/src_SigProc_FIX/SKP_Silk_apply_sine_window.c
+++ b/src_SigProc_FIX/SKP_Silk_apply_sine_window.c
@@ -29,10 +29,20 @@
 
 /* Apply sine window to signal vector.                                      */
 /* Window types:                                                            */
-/*    0 -> sine window from 0 to pi                                         */
 /*    1 -> sine window from 0 to pi/2                                       */
 /*    2 -> sine window from pi/2 to pi                                      */
-/* every other sample of window is linearly interpolated, for speed         */
+/* Every other sample is linearly interpolated, for speed.                  */
+/* Window length must be between 16 and 120 (incl) and a multiple of 4.     */
+
+/* Matlab code for table: 
+   for k=16:9*4:16+2*9*4, fprintf(' %7.d,', -round(65536*pi ./ (k:4:k+8*4))); fprintf('\n'); end
+*/
+static SKP_int16 freq_table_Q16[ 27 ] = {
+   12111,    9804,    8235,    7100,    6239,    5565,    5022,    4575,    4202,
+    3885,    3612,    3375,    3167,    2984,    2820,    2674,    2542,    2422,
+    2313,    2214,    2123,    2038,    1961,    1889,    1822,    1760,    1702,
+};
+
 void SKP_Silk_apply_sine_window(
     SKP_int16                        px_win[],            /* O    Pointer to windowed signal                  */
     const SKP_int16                  px[],                /* I    Pointer to input signal                     */
@@ -40,51 +50,48 @@
     const SKP_int                    length               /* I    Window length, multiple of 4                */
 )
 {
-    SKP_int   k;
-    SKP_int32 f_Q16, c_Q20, S0_Q16, S1_Q16;
-    /* Length must be multiple of 4 */
-    SKP_assert( ( length & 3 ) == 0 );
+    SKP_int   k, f_Q16, c_Q16;
+    SKP_int32 S0_Q16, S1_Q16;
 
-    /* Input pointer must be 4-byte aligned */
-    SKP_assert( ( (SKP_int64)px & 3 ) == 0 );
+    SKP_assert( win_type == 1 || win_type == 2 );
 
-    if( win_type == 0 ) {
-        f_Q16 = SKP_DIV32_16( 411775, length + 1 );        // 411775 = 2 * 65536 * pi
-    } else {
-        f_Q16 = SKP_DIV32_16( 205887, length + 1 );        // 205887 = 65536 * pi
-    }
+    /* Length must be in a range from 16 to 120 and a multiple of 4 */
+    SKP_assert( length >= 16 && length <= 120 );
+    SKP_assert( ( length & 3 ) == 0 );
 
-    /* factor used for cosine approximation */
-    c_Q20 = -SKP_RSHIFT( SKP_MUL( f_Q16, f_Q16 ), 12 );
+    /* Frequency */
+    k = ( length >> 2 ) - 4;
+    SKP_assert( k >= 0 && k <= 26 );
+    f_Q16 = (SKP_int)freq_table_Q16[ k ];
 
-    /* c_Q20 becomes too large if length is too small */
-    SKP_assert( c_Q20 >= -32768 );
+    /* Factor used for cosine approximation */
+    c_Q16 = SKP_SMULWB( f_Q16, -f_Q16 );
+    SKP_assert( c_Q16 >= -32768 );
 
     /* initialize state */
-    if( win_type < 2 ) {
+    if( win_type == 1 ) {
         /* start from 0 */
         S0_Q16 = 0;
         /* approximation of sin(f) */
-        S1_Q16 = f_Q16;
+        S1_Q16 = f_Q16 + SKP_RSHIFT( length, 3 );
     } else {
         /* start from 1 */
         S0_Q16 = ( 1 << 16 );
         /* approximation of cos(f) */
-        S1_Q16 = ( 1 << 16 ) + SKP_RSHIFT( c_Q20, 5 );
+        S1_Q16 = ( 1 << 16 ) + SKP_RSHIFT( c_Q16, 1 ) + SKP_RSHIFT( length, 4 );
     }
 
-
     /* Uses the recursive equation:   sin(n*f) = 2 * cos(f) * sin((n-1)*f) - sin((n-2)*f)    */
     /* 4 samples at a time */
     for( k = 0; k < length; k += 4 ) {
         px_win[ k ]     = (SKP_int16)SKP_SMULWB( SKP_RSHIFT( S0_Q16 + S1_Q16, 1 ), px[ k ] );
         px_win[ k + 1 ] = (SKP_int16)SKP_SMULWB( S1_Q16, px[ k + 1] );
-        S0_Q16 = SKP_RSHIFT( SKP_MUL( c_Q20, S1_Q16 ), 20 ) + SKP_LSHIFT( S1_Q16, 1 ) - S0_Q16 + 1;
+        S0_Q16 = SKP_SMULWB( S1_Q16, c_Q16 ) + SKP_LSHIFT( S1_Q16, 1 ) - S0_Q16 + 1;
         S0_Q16 = SKP_min( S0_Q16, ( 1 << 16 ) );
 
         px_win[ k + 2 ] = (SKP_int16)SKP_SMULWB( SKP_RSHIFT( S0_Q16 + S1_Q16, 1 ), px[ k + 2] );
         px_win[ k + 3 ] = (SKP_int16)SKP_SMULWB( S0_Q16, px[ k + 3 ] );
-        S1_Q16 = SKP_RSHIFT( SKP_MUL( c_Q20, S0_Q16 ), 20 ) + SKP_LSHIFT( S0_Q16, 1 ) - S1_Q16;
+        S1_Q16 = SKP_SMULWB( S0_Q16, c_Q16 ) + SKP_LSHIFT( S0_Q16, 1 ) - S1_Q16;
         S1_Q16 = SKP_min( S1_Q16, ( 1 << 16 ) );
     }
 }
--- a/src_SigProc_FIX/SKP_Silk_array_maxabs.c
+++ b/src_SigProc_FIX/SKP_Silk_array_maxabs.c
@@ -37,7 +37,6 @@
 #include "SKP_Silk_SigProc_FIX.h"
 
 /* Function that returns the maximum absolut value of the input vector */
-#if (! defined(__mips__)) && EMBEDDED_ARM<4
 SKP_int16 SKP_Silk_int16_array_maxabs(    /* O    Maximum absolute value, max: 2^15-1   */
     const SKP_int16        *vec,            /* I    Input vector  [len]                   */
     const SKP_int32        len              /* I    Length of input vector                */
@@ -44,6 +43,7 @@
 )                    
 {
     SKP_int32 max = 0, i, lvl = 0, ind;
+	if( len == 0 ) return 0;
 
     ind = len - 1;
     max = SKP_SMULBB( vec[ ind ], vec[ ind ] );
@@ -66,4 +66,4 @@
         }
     }
 }
-#endif
+
--- a/src_SigProc_FIX/SKP_Silk_burg_modified.c
+++ b/src_SigProc_FIX/SKP_Silk_burg_modified.c
@@ -40,7 +40,7 @@
 #define MAX_FRAME_SIZE              544 // subfr_length * nb_subfr = ( 0.005 * 24000 + 16 ) * 4 = 544
 #define MAX_NB_SUBFR                4
 
-#define QA                          24
+#define QA                          25
 #define N_BITS_HEAD_ROOM            2
 #define MIN_RSHIFTS                 -16
 #define MAX_RSHIFTS                 (32 - QA)
--- /dev/null
+++ b/src_SigProc_FIX/SKP_Silk_debug.c
@@ -1,0 +1,169 @@
+/***********************************************************************
+Copyright (c) 2006-2010, Skype Limited. All rights reserved. 
+Redistribution and use in source and binary forms, with or without 
+modification, (subject to the limitations in the disclaimer below) 
+are permitted provided that the following conditions are met:
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright 
+notice, this list of conditions and the following disclaimer in the 
+documentation and/or other materials provided with the distribution.
+- Neither the name of Skype Limited, nor the names of specific 
+contributors, may be used to endorse or promote products derived from 
+this software without specific prior written permission.
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED 
+BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+***********************************************************************/
+
+/*                                                                      *
+ * SKP_debug.c                                                          *
+ *                                                                      *
+ * This contains code to help debugging                                 *
+ *                                                                      *
+ * Copyright 2009 (c), Skype Limited                                    *
+ * Date: 090629                                                         *
+ *                                                                      */
+
+#include "SKP_debug.h"
+#include "../src_SigProc_FIX/SKP_Silk_SigProc_FIX.h"
+
+#ifdef _WIN32
+
+#if (defined(_WIN32) || defined(_WINCE)) 
+#include <windows.h>    /* timer */
+#else   // Linux or Mac
+#include <sys/time.h>
+#endif
+
+unsigned long GetHighResolutionTime() /* O: time in usec*/
+{
+    /* Returns a time counter in microsec   */
+    /* the resolution is platform dependent */
+    /* but is typically 1.62 us resolution  */
+    LARGE_INTEGER lpPerformanceCount;
+    LARGE_INTEGER lpFrequency;
+    QueryPerformanceCounter(&lpPerformanceCount);
+    QueryPerformanceFrequency(&lpFrequency);
+    return (unsigned long)((1000000*(lpPerformanceCount.QuadPart)) / lpFrequency.QuadPart);
+}
+#else   // Linux or Mac
+unsigned long GetHighResolutionTime() /* O: time in usec*/
+{
+    struct timeval tv;
+    gettimeofday(&tv, 0);
+    return((tv.tv_sec*1000000)+(tv.tv_usec));
+}
+#endif
+
+#if SKP_TIC_TOC
+
+int           SKP_Timer_nTimers = 0;
+int           SKP_Timer_depth_ctr = 0;
+char          SKP_Timer_tags[SKP_NUM_TIMERS_MAX][SKP_NUM_TIMERS_MAX_TAG_LEN];
+#ifdef WIN32
+LARGE_INTEGER SKP_Timer_start[SKP_NUM_TIMERS_MAX];
+#else
+unsigned long SKP_Timer_start[SKP_NUM_TIMERS_MAX];
+#endif  
+unsigned int  SKP_Timer_cnt[SKP_NUM_TIMERS_MAX];
+SKP_int64     SKP_Timer_min[SKP_NUM_TIMERS_MAX];
+SKP_int64     SKP_Timer_sum[SKP_NUM_TIMERS_MAX];
+SKP_int64     SKP_Timer_max[SKP_NUM_TIMERS_MAX];
+SKP_int64     SKP_Timer_depth[SKP_NUM_TIMERS_MAX];
+
+#ifdef WIN32
+void SKP_TimerSave(char *file_name)
+{
+    if( SKP_Timer_nTimers > 0 ) 
+    {
+        int k;
+        FILE *fp;
+        LARGE_INTEGER lpFrequency;
+        LARGE_INTEGER lpPerformanceCount1, lpPerformanceCount2;
+        int del = 0x7FFFFFFF;
+        double avg, sum_avg;
+        /* estimate overhead of calling performance counters */
+        for( k = 0; k < 1000; k++ ) {
+            QueryPerformanceCounter(&lpPerformanceCount1);
+            QueryPerformanceCounter(&lpPerformanceCount2);
+            lpPerformanceCount2.QuadPart -= lpPerformanceCount1.QuadPart;
+            if( (int)lpPerformanceCount2.LowPart < del )
+                del = lpPerformanceCount2.LowPart;
+        }
+        QueryPerformanceFrequency(&lpFrequency);
+        /* print results to file */
+        sum_avg = 0.0f;
+        for( k = 0; k < SKP_Timer_nTimers; k++ ) {
+            if (SKP_Timer_depth[k] == 0) {
+                sum_avg += (1e6 * SKP_Timer_sum[k] / SKP_Timer_cnt[k] - del) / lpFrequency.QuadPart * SKP_Timer_cnt[k];
+            }
+        }
+        fp = fopen(file_name, "w");
+        fprintf(fp, "                                min         avg     %%         max      count\n");
+        for( k = 0; k < SKP_Timer_nTimers; k++ ) {
+            if (SKP_Timer_depth[k] == 0) {
+                fprintf(fp, "%-28s", SKP_Timer_tags[k]);
+            } else if (SKP_Timer_depth[k] == 1) {
+                fprintf(fp, " %-27s", SKP_Timer_tags[k]);
+            } else if (SKP_Timer_depth[k] == 2) {
+                fprintf(fp, "  %-26s", SKP_Timer_tags[k]);
+            } else if (SKP_Timer_depth[k] == 3) {
+                fprintf(fp, "   %-25s", SKP_Timer_tags[k]);
+            } else {
+                fprintf(fp, "    %-24s", SKP_Timer_tags[k]);
+            }
+            avg = (1e6 * SKP_Timer_sum[k] / SKP_Timer_cnt[k] - del) / lpFrequency.QuadPart;
+            fprintf(fp, "%8.2f", (1e6 * (SKP_max_64(SKP_Timer_min[k] - del, 0))) / lpFrequency.QuadPart);
+            fprintf(fp, "%12.2f %6.2f", avg, 100.0 * avg / sum_avg * SKP_Timer_cnt[k]);
+            fprintf(fp, "%12.2f", (1e6 * (SKP_max_64(SKP_Timer_max[k] - del, 0))) / lpFrequency.QuadPart);
+            fprintf(fp, "%10d\n", SKP_Timer_cnt[k]);
+        }
+        fprintf(fp, "                                microseconds\n");
+        fclose(fp);
+    }
+}
+#else
+void SKP_TimerSave(char *file_name)
+{
+    if( SKP_Timer_nTimers > 0 ) 
+    {
+        int k;
+        FILE *fp;
+        /* print results to file */
+        fp = fopen(file_name, "w");
+        fprintf(fp, "                                min         avg         max      count\n");
+        for( k = 0; k < SKP_Timer_nTimers; k++ )
+        {
+            if (SKP_Timer_depth[k] == 0) {
+                fprintf(fp, "%-28s", SKP_Timer_tags[k]);
+            } else if (SKP_Timer_depth[k] == 1) {
+                fprintf(fp, " %-27s", SKP_Timer_tags[k]);
+            } else if (SKP_Timer_depth[k] == 2) {
+                fprintf(fp, "  %-26s", SKP_Timer_tags[k]);
+            } else if (SKP_Timer_depth[k] == 3) {
+                fprintf(fp, "   %-25s", SKP_Timer_tags[k]);
+            } else {
+                fprintf(fp, "    %-24s", SKP_Timer_tags[k]);
+            }
+            fprintf(fp, "%d ", SKP_Timer_min[k]);
+            fprintf(fp, "%f ", (double)SKP_Timer_sum[k] / (double)SKP_Timer_cnt[k]);
+            fprintf(fp, "%d ", SKP_Timer_max[k]);
+            fprintf(fp, "%10d\n", SKP_Timer_cnt[k]);
+        }
+        fprintf(fp, "                                microseconds\n");
+        fclose(fp);
+    }
+}
+#endif
+
+#endif /* SKP_TIC_TOC */
--- a/src_SigProc_FIX/SKP_Silk_pitch_analysis_core.c
+++ b/src_SigProc_FIX/SKP_Silk_pitch_analysis_core.c
@@ -64,7 +64,7 @@
 /*************************************************************/
 /*      FIXED POINT CORE PITCH ANALYSIS FUNCTION             */
 /*************************************************************/
-SKP_int SKP_Silk_pitch_analysis_core(  /* O    Voicing estimate: 0 voiced, 1 unvoiced                        */
+SKP_int SKP_Silk_pitch_analysis_core(    /* O    Voicing estimate: 0 voiced, 1 unvoiced                        */
     const SKP_int16  *signal,            /* I    Signal of length PE_FRAME_LENGTH_MS*Fs_kHz           */
     SKP_int          *pitch_out,         /* O    4 pitch lag values                                          */
     SKP_int          *lagIndex,          /* O    Lag Index                                                   */
@@ -187,7 +187,7 @@
         /* Calculate first vector products before loop */
         cross_corr = SKP_Silk_inner_prod_aligned( target_ptr, basis_ptr, sf_length_8kHz );
         normalizer = SKP_Silk_inner_prod_aligned( basis_ptr,  basis_ptr, sf_length_8kHz );
-        normalizer = SKP_ADD_SAT32( normalizer, 1000 );
+        normalizer = SKP_ADD_SAT32( normalizer, SKP_SMULBB( sf_length_8kHz, 4000 ) );
 
         temp32 = SKP_DIV32( cross_corr, SKP_Silk_SQRT_APPROX( normalizer ) + 1 );
         C[ k ][ min_lag_4kHz ] = (SKP_int16)SKP_SAT16( temp32 );        /* Q0 */
@@ -226,7 +226,7 @@
             C[ 0 ][ i ] = (SKP_int16)sum;                                         /* Q-1 */
         }
     } else {
-        /* Only short lag bias */
+        /* Only short-lag bias */
         for( i = max_lag_4kHz; i >= min_lag_4kHz; i-- ) {
             sum = (SKP_int32)C[ 0 ][ i ];
             sum = SKP_SMLAWB( sum, sum, SKP_LSHIFT( -i, 4 ) );                    /* Q-1 */
@@ -233,10 +233,11 @@
             C[ 0 ][ i ] = (SKP_int16)sum;                                         /* Q-1 */
         }
     }
+
     /* Sort */
-    length_d_srch = 5 + complexity;
-    SKP_assert( length_d_srch <= PE_D_SRCH_LENGTH );
-      SKP_Silk_insertion_sort_decreasing_int16( &C[ 0 ][ min_lag_4kHz ], d_srch, max_lag_4kHz - min_lag_4kHz + 1, length_d_srch );
+    length_d_srch = SKP_ADD_LSHIFT32( 4, complexity, 1 );
+    SKP_assert( 3 * length_d_srch <= PE_D_SRCH_LENGTH );
+    SKP_Silk_insertion_sort_decreasing_int16( &C[ 0 ][ min_lag_4kHz ], d_srch, max_lag_4kHz - min_lag_4kHz + 1, length_d_srch );
 
     /* Escape if correlation is very low already here */
     target_ptr = &signal_4kHz[ SKP_SMULBB( sf_length_4kHz, nb_subfr ) ];
@@ -244,8 +245,8 @@
     energy = SKP_ADD_SAT32( energy, 1000 );                                  /* Q0 */
     Cmax = (SKP_int)C[ 0 ][ min_lag_4kHz ];                                  /* Q-1 */
     threshold = SKP_SMULBB( Cmax, Cmax );                                    /* Q-2 */
-    /* Compare in Q-2 domain */
 
+    /* Compare in Q-2 domain */
     if( SKP_RSHIFT( energy, 4 + 2 ) > threshold ) {                            
         SKP_memset( pitch_out, 0, nb_subfr * sizeof( SKP_int ) );
         *LTPCorr_Q15  = 0;
@@ -333,7 +334,7 @@
             basis_ptr = target_ptr - d;
 
             /* Check that we are within range of the array */
-             SKP_assert( basis_ptr >= signal_8kHz );
+            SKP_assert( basis_ptr >= signal_8kHz );
             SKP_assert( basis_ptr + sf_length_8kHz <= signal_8kHz + frame_length_8kHz );
         
             cross_corr   = SKP_Silk_inner_prod_aligned( target_ptr, basis_ptr, sf_length_8kHz );
@@ -433,7 +434,10 @@
             CCmax_new_b -= prev_lag_bias_Q15; /* Q15 */
         }
 
-        if( CCmax_new_b > CCmax_b && CCmax_new > corr_thres_Q15 ) {
+        if ( CCmax_new_b > CCmax_b                                          && /* Find maximum biased correlation                  */
+             CCmax_new > corr_thres_Q15                                     && /* Correlation needs to be high enough to be voiced */
+             SKP_Silk_CB_lags_stage2[ 0 ][ CBimax_new ] <= min_lag_8kHz        /* Lag must be in range                             */
+            ) {
             CCmax_b = CCmax_new_b;
             CCmax   = CCmax_new;
             lag     = d;
@@ -522,7 +526,7 @@
                 for( k = 0; k < nb_subfr; k++ ) {
                     SKP_assert( PE_MAX_NB_SUBFR == 4 );
                     energy     += SKP_RSHIFT( energies_st3[  k ][ j ][ lag_counter ], 2 ); /* use mean, to avoid overflow */
-                     SKP_assert( energy >= 0 );
+                    SKP_assert( energy >= 0 );
                     cross_corr += SKP_RSHIFT( crosscorr_st3[ k ][ j ][ lag_counter ], 2 ); /* use mean, to avoid overflow */
                 }
                 if( cross_corr > 0 ) {
@@ -549,7 +553,9 @@
                     CCmax_new = 0;
                 }
 
-                if( CCmax_new > CCmax ) {
+                if( CCmax_new > CCmax                                               && 
+                   ( d + (SKP_int)SKP_Silk_CB_lags_stage3[ 0 ][ j ] ) <= max_lag  
+                   ) {
                     CCmax   = CCmax_new;
                     lag_new = d;
                     CBimax  = j;
--- a/src_SigProc_FIX/SKP_Silk_pitch_est_tables.c
+++ b/src_SigProc_FIX/SKP_Silk_pitch_est_tables.c
@@ -36,7 +36,7 @@
 
 const SKP_int8 SKP_Silk_CB_lags_stage3_10_ms[ PE_MAX_NB_SUBFR >> 1 ][ PE_NB_CBKS_STAGE3_10MS ] = 
 {
-    {-3,-2,-2,-1,-1, 0, 0, 1, 1, 2, 2,3},
+    {-3,-2,-2,-1,-1, 0, 0, 1, 1, 2, 2, 3},
     { 3, 3, 2, 2, 1, 1, 0, 0,-1,-1,-2,-2}
 };
 
--- a/src_SigProc_FIX/SKP_Silk_resampler_down2.c
+++ b/src_SigProc_FIX/SKP_Silk_resampler_down2.c
@@ -36,7 +36,6 @@
 #include "SKP_Silk_SigProc_FIX.h"
 #include "SKP_Silk_resampler_rom.h"
 
-#if (EMBEDDED_ARM<5) && (!defined(__mips__))
 /* Downsample by a factor 2, mediocre quality */
 void SKP_Silk_resampler_down2(
     SKP_int32                           *S,         /* I/O: State vector [ 2 ]                  */
@@ -76,4 +75,4 @@
         out[ k ] = (SKP_int16)SKP_SAT16( SKP_RSHIFT_ROUND( out32, 11 ) );
     }
 }
-#endif
+
--- a/src_SigProc_FIX/SKP_Silk_resampler_private.h
+++ b/src_SigProc_FIX/SKP_Silk_resampler_private.h
@@ -37,6 +37,7 @@
 
 #ifndef SKP_Silk_RESAMPLER_H
 #define SKP_Silk_RESAMPLER_H
+
 #ifdef __cplusplus
 extern "C" {
 #endif
--- a/src_SigProc_FIX/SKP_Silk_resampler_private_AR2.c
+++ b/src_SigProc_FIX/SKP_Silk_resampler_private_AR2.c
@@ -36,7 +36,6 @@
 #include "SKP_Silk_SigProc_FIX.h"
 #include "SKP_Silk_resampler_private.h"
 
-#if (EMBEDDED_ARM<5) && (!defined(__mips__)) 
 /* Second order AR filter with single delay elements */
 void SKP_Silk_resampler_private_AR2(
 	SKP_int32					    S[],		    /* I/O: State vector [ 2 ]			    	    */
@@ -57,4 +56,4 @@
 		S[ 1 ]      = SKP_SMULWB( out32, A_Q14[ 1 ] );
 	}
 }
-#endif
+
--- a/src_SigProc_FIX/SKP_Silk_resampler_private_ARMA4.c
+++ b/src_SigProc_FIX/SKP_Silk_resampler_private_ARMA4.c
@@ -42,7 +42,6 @@
 /* Coeffients are stored in a packed format:                                                        */
 /*    { B1_Q14[1], B2_Q14[1], -A1_Q14[1], -A1_Q14[2], -A2_Q14[1], -A2_Q14[2], gain_Q16 }            */
 /* where it is assumed that B*_Q14[0], B*_Q14[2], A*_Q14[0] are all 16384                           */
-#if (EMBEDDED_ARM<5) && (!defined(__mips__))
 void SKP_Silk_resampler_private_ARMA4(
 	SKP_int32					    S[],		    /* I/O: State vector [ 4 ]			    	    */
 	SKP_int16					    out[],		    /* O:	Output signal				    	    */
@@ -75,5 +74,5 @@
         out[ k ] = (SKP_int16)SKP_SAT16( SKP_RSHIFT32( SKP_SMLAWB( 128, out2_Q8, Coef[ 6 ] ), 8 ) );
 	}
 }
-#endif
+
 
--- a/src_SigProc_FIX/SKP_Silk_resampler_private_down_FIR.c
+++ b/src_SigProc_FIX/SKP_Silk_resampler_private_down_FIR.c
@@ -46,12 +46,14 @@
 		buf_ptr = buf2 + SKP_RSHIFT( index_Q16, 16 );
 
 		/* Inner product */
-		res_Q6 = SKP_SMULWB(         SKP_ADD32( buf_ptr[ 0 ], buf_ptr[ 11 ] ), FIR_Coefs[ 0 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 1 ], buf_ptr[ 10 ] ), FIR_Coefs[ 1 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 2 ], buf_ptr[  9 ] ), FIR_Coefs[ 2 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 3 ], buf_ptr[  8 ] ), FIR_Coefs[ 3 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 4 ], buf_ptr[  7 ] ), FIR_Coefs[ 4 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 5 ], buf_ptr[  6 ] ), FIR_Coefs[ 5 ] );
+		res_Q6 = SKP_SMULWB(         SKP_ADD32( buf_ptr[ 0 ], buf_ptr[ 15 ] ), FIR_Coefs[ 0 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 1 ], buf_ptr[ 14 ] ), FIR_Coefs[ 1 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 2 ], buf_ptr[ 13 ] ), FIR_Coefs[ 2 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 3 ], buf_ptr[ 12 ] ), FIR_Coefs[ 3 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 4 ], buf_ptr[ 11 ] ), FIR_Coefs[ 4 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 5 ], buf_ptr[ 10 ] ), FIR_Coefs[ 5 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 6 ], buf_ptr[  9 ] ), FIR_Coefs[ 6 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, SKP_ADD32( buf_ptr[ 7 ], buf_ptr[  8 ] ), FIR_Coefs[ 7 ] );
 
 			    /* Scale down, saturate and store in output array */
 		*out++ = (SKP_int16)SKP_SAT16( SKP_RSHIFT_ROUND( res_Q6, 6 ) );
@@ -81,13 +83,17 @@
 		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 3 ], interpol_ptr[ 3 ] );
 		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 4 ], interpol_ptr[ 4 ] );
 		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 5 ], interpol_ptr[ 5 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 6 ], interpol_ptr[ 6 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 7 ], interpol_ptr[ 7 ] );
 		interpol_ptr = &FIR_Coefs[ RESAMPLER_DOWN_ORDER_FIR / 2 * ( FIR_Fracs - 1 - interpol_ind ) ];
-		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 11 ], interpol_ptr[ 0 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 10 ], interpol_ptr[ 1 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[  9 ], interpol_ptr[ 2 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[  8 ], interpol_ptr[ 3 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[  7 ], interpol_ptr[ 4 ] );
-		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[  6 ], interpol_ptr[ 5 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 15 ], interpol_ptr[ 0 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 14 ], interpol_ptr[ 1 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 13 ], interpol_ptr[ 2 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 12 ], interpol_ptr[ 3 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 11 ], interpol_ptr[ 4 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[ 10 ], interpol_ptr[ 5 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[  9 ], interpol_ptr[ 6 ] );
+		res_Q6 = SKP_SMLAWB( res_Q6, buf_ptr[  8 ], interpol_ptr[ 7 ] );
 
 		/* Scale down, saturate and store in output array */
 		*out++ = (SKP_int16)SKP_SAT16( SKP_RSHIFT_ROUND( res_Q6, 6 ) );
--- a/src_SigProc_FIX/SKP_Silk_resampler_private_up2_HQ.c
+++ b/src_SigProc_FIX/SKP_Silk_resampler_private_up2_HQ.c
@@ -39,7 +39,6 @@
 /* Upsample by a factor 2, high quality */
 /* Uses 2nd order allpass filters for the 2x upsampling, followed by a      */
 /* notch filter just above Nyquist.                                         */
-#if (EMBEDDED_ARM<5) && (!defined(__mips__))
 void SKP_Silk_resampler_private_up2_HQ(
 	SKP_int32	                    *S,			    /* I/O: Resampler state [ 6 ]					*/
     SKP_int16                       *out,           /* O:   Output signal [ 2 * len ]               */
@@ -105,8 +104,6 @@
             SKP_SMLAWB( 256, out32_1, SKP_Silk_resampler_up2_hq_notch[ 3 ] ), 9 ) );
     }
 }
-#endif
-
 
 void SKP_Silk_resampler_private_up2_HQ_wrapper(
 	void	                        *SS,		    /* I/O: Resampler state (unused)				*/
--- a/src_SigProc_FIX/SKP_Silk_resampler_private_up4.c
+++ b/src_SigProc_FIX/SKP_Silk_resampler_private_up4.c
@@ -34,7 +34,7 @@
  *                                                                      */
 
 #include "SKP_Silk_SigProc_FIX.h"
-#include "SKP_Silk_resampler_rom.h"
+#include "SKP_Silk_resampler_private.h"
 
 /* Upsample by a factor 4, Note: very low quality, only use with output sampling rates above 96 kHz. */
 void SKP_Silk_resampler_private_up4(
--- a/src_SigProc_FIX/SKP_Silk_resampler_rom.c
+++ b/src_SigProc_FIX/SKP_Silk_resampler_rom.c
@@ -29,7 +29,7 @@
  * File Name:	SKP_Silk_resampler_rom.c								*
  *																		*
  * Description: Filter coefficients for IIR/FIR polyphase resampling	*
- * Total size: 550 Words (1.1 kB)                                      *
+ * Total size: <600 Words (1.2 kB)                                      *
  *                                                                      *
  * Copyright 2010 (c), Skype Limited                                    *
  * All rights reserved.													*
@@ -37,59 +37,52 @@
 
 #include "SKP_Silk_resampler_private.h"
 
-
-#if EMBEDDED_ARM
-#define SKP_DWORD_ALIGN __attribute__((aligned(4)))
-#else
-#define SKP_DWORD_ALIGN
-#endif
-
-/* Tables for 2x downsampler. Values above 32767 intentionally wrap to a negative value. */
+/* Tables for 2x downsampler */
 const SKP_int16 SKP_Silk_resampler_down2_0 = 9872;
-const SKP_int16 SKP_Silk_resampler_down2_1 = 39809;
+const SKP_int16 SKP_Silk_resampler_down2_1 = 39809 - 65536;
 
-/* Tables for 2x upsampler, low quality. Values above 32767 intentionally wrap to a negative value. */
+/* Tables for 2x upsampler, low quality */
 const SKP_int16 SKP_Silk_resampler_up2_lq_0 = 8102;
-const SKP_int16 SKP_Silk_resampler_up2_lq_1 = 36783;
+const SKP_int16 SKP_Silk_resampler_up2_lq_1 = 36783 - 65536;
 
-/* Tables for 2x upsampler, high quality. Values above 32767 intentionally wrap to a negative value. */
-const SKP_int16 SKP_Silk_resampler_up2_hq_0[ 2 ] = {  4280, 33727 };
-const SKP_int16 SKP_Silk_resampler_up2_hq_1[ 2 ] = { 16295, 54015 };
+/* Tables for 2x upsampler, high quality */
+const SKP_int16 SKP_Silk_resampler_up2_hq_0[ 2 ] = {  4280, 33727 - 65536 };
+const SKP_int16 SKP_Silk_resampler_up2_hq_1[ 2 ] = { 16295, 54015 - 65536 };
 /* Matlab code for the notch filter coefficients: */
-/* B = [1, 0.12, 1];  A = [1, 0.055, 0.8]; G = 0.87; freqz(G * B, A, 2^14, 16e3); axis([0, 8000, -10, 1]);  */
+/* B = [1, 0.14, 1];  A = [1, 0.08, 0.84]; G = 0.89; freqz(G * B, A, 2^14, 16e3); axis([0, 8000, -10, 1]);  */
 /* fprintf('\t%6d, %6d, %6d, %6d\n', round(B(2)*2^16), round(-A(2)*2^16), round((1-A(3))*2^16), round(G*2^15)) */
-const SKP_int16 SKP_Silk_resampler_up2_hq_notch[ 4 ] = { 7864,  -3604,  13107,  28508 };
+const SKP_int16 SKP_Silk_resampler_up2_hq_notch[ 4 ] = { 9175,  -5243,  10486,  29164 };
+//const SKP_int16 SKP_Silk_resampler_up2_hq_notch[ 4 ] = { 6554,  -3932,   6554,  30573 };       /* for hybrid mode? */
 
-
-/* Tables with IIR and FIR coefficients for fractional downsamplers (70 Words) */
+/* Tables with IIR and FIR coefficients for fractional downsamplers (90 Words) */
 SKP_DWORD_ALIGN const SKP_int16 SKP_Silk_Resampler_3_4_COEFS[ 2 + 3 * RESAMPLER_DOWN_ORDER_FIR / 2 ] = {
-	-18249, -12532,
-	   -97,    284,   -495,    309,  10268,  20317,
-	   -94,    156,    -48,   -720,   5984,  18278,
-	   -45,     -4,    237,   -847,   2540,  14662,
+	-20253, -13986,
+	    86,      7,   -151,    368,   -542,    232,  11041,  21904,
+	    39,     90,   -181,    216,    -17,   -877,   6408,  19695,
+	     2,    113,   -108,      2,    314,   -977,   2665,  15787,
 };
 
 SKP_DWORD_ALIGN const SKP_int16 SKP_Silk_Resampler_2_3_COEFS[ 2 + 2 * RESAMPLER_DOWN_ORDER_FIR / 2 ] = {
-	-11891, -12486,
-	    20,    211,   -657,    688,   8423,  15911,
-	   -44,    197,   -152,   -653,   3855,  13015,
+	-13997, -14120,
+	    60,   -174,     71,    298,   -800,    659,   9238,  17461,
+	    48,    -40,   -150,    314,   -155,   -845,   4188,  14293,
 };
 
 SKP_DWORD_ALIGN const SKP_int16 SKP_Silk_Resampler_1_2_COEFS[ 2 + RESAMPLER_DOWN_ORDER_FIR / 2 ] = {
-	  2415, -13101,
-	   158,   -295,   -400,   1265,   4832,   7968,
+	  1233, -14293,
+	   -91,    162,    169,   -342,   -505,   1332,   5281,   8742,
 };
 
 SKP_DWORD_ALIGN const SKP_int16 SKP_Silk_Resampler_3_8_COEFS[ 2 + 3 * RESAMPLER_DOWN_ORDER_FIR / 2 ] = {
-	 13270, -13738,
-	  -294,   -123,    747,   2043,   3339,   3995,
-	  -151,   -311,    414,   1583,   2947,   3877,
-	   -33,   -389,    143,   1141,   2503,   3653,
+	 12634, -14550,
+	   246,   -175,   -326,   -113,    764,   2209,   3664,   4402,
+	   171,      3,   -301,   -258,    391,   1693,   3227,   4272,
+	    88,    138,   -236,   -327,     95,   1203,   2733,   4022,
 };
 
 SKP_DWORD_ALIGN const SKP_int16 SKP_Silk_Resampler_1_3_COEFS[ 2 + RESAMPLER_DOWN_ORDER_FIR / 2 ] = {
-	 16643, -14000,
-	  -331,     19,    581,   1421,   2290,   2845,
+	 16306, -14409,
+	    99,   -201,   -220,    -16,    572,   1483,   2433,   3043,
 };
 
 SKP_DWORD_ALIGN const SKP_int16 SKP_Silk_Resampler_2_3_COEFS_LQ[ 2 + 2 * 2 ] = {
@@ -129,148 +122,148 @@
 
 /* Table with interplation fractions of 1/288 : 2/288 : 287/288 (432 Words) */
 SKP_DWORD_ALIGN const SKP_int16 SKP_Silk_resampler_frac_FIR_144[ 144 ][ RESAMPLER_ORDER_FIR_144 / 2 ] = {
-	{ -647,  1884, 30078},
-	{ -625,  1736, 30044},
-	{ -603,  1591, 30005},
-	{ -581,  1448, 29963},
-	{ -559,  1308, 29917},
-	{ -537,  1169, 29867},
-	{ -515,  1032, 29813},
-	{ -494,   898, 29755},
-	{ -473,   766, 29693},
-	{ -452,   636, 29627},
-	{ -431,   508, 29558},
-	{ -410,   383, 29484},
-	{ -390,   260, 29407},
-	{ -369,   139, 29327},
-	{ -349,    20, 29242},
-	{ -330,   -97, 29154},
-	{ -310,  -211, 29062},
-	{ -291,  -324, 28967},
-	{ -271,  -434, 28868},
-	{ -253,  -542, 28765},
-	{ -234,  -647, 28659},
-	{ -215,  -751, 28550},
-	{ -197,  -852, 28436},
-	{ -179,  -951, 28320},
-	{ -162, -1048, 28200},
-	{ -144, -1143, 28077},
-	{ -127, -1235, 27950},
-	{ -110, -1326, 27820},
-	{  -94, -1414, 27687},
-	{  -77, -1500, 27550},
-	{  -61, -1584, 27410},
-	{  -45, -1665, 27268},
-	{  -30, -1745, 27122},
-	{  -15, -1822, 26972},
-	{    0, -1897, 26820},
-	{   15, -1970, 26665},
-	{   29, -2041, 26507},
-	{   44, -2110, 26346},
-	{   57, -2177, 26182},
-	{   71, -2242, 26015},
-	{   84, -2305, 25845},
-	{   97, -2365, 25673},
-	{  110, -2424, 25498},
-	{  122, -2480, 25320},
-	{  134, -2534, 25140},
-	{  146, -2587, 24956},
-	{  157, -2637, 24771},
-	{  168, -2685, 24583},
-	{  179, -2732, 24392},
-	{  190, -2776, 24199},
-	{  200, -2819, 24003},
-	{  210, -2859, 23805},
-	{  220, -2898, 23605},
-	{  229, -2934, 23403},
-	{  238, -2969, 23198},
-	{  247, -3002, 22992},
-	{  255, -3033, 22783},
-	{  263, -3062, 22572},
-	{  271, -3089, 22359},
-	{  279, -3114, 22144},
-	{  286, -3138, 21927},
-	{  293, -3160, 21709},
-	{  300, -3180, 21488},
-	{  306, -3198, 21266},
-	{  312, -3215, 21042},
-	{  318, -3229, 20816},
-	{  323, -3242, 20589},
-	{  328, -3254, 20360},
-	{  333, -3263, 20130},
-	{  338, -3272, 19898},
-	{  342, -3278, 19665},
-	{  346, -3283, 19430},
-	{  350, -3286, 19194},
-	{  353, -3288, 18957},
-	{  356, -3288, 18718},
-	{  359, -3286, 18478},
-	{  362, -3283, 18238},
-	{  364, -3279, 17996},
-	{  366, -3273, 17753},
-	{  368, -3266, 17509},
-	{  369, -3257, 17264},
-	{  371, -3247, 17018},
-	{  372, -3235, 16772},
-	{  372, -3222, 16525},
-	{  373, -3208, 16277},
-	{  373, -3192, 16028},
-	{  373, -3175, 15779},
-	{  373, -3157, 15529},
-	{  372, -3138, 15279},
-	{  371, -3117, 15028},
-	{  370, -3095, 14777},
-	{  369, -3072, 14526},
-	{  368, -3048, 14274},
-	{  366, -3022, 14022},
-	{  364, -2996, 13770},
-	{  362, -2968, 13517},
-	{  359, -2940, 13265},
-	{  357, -2910, 13012},
-	{  354, -2880, 12760},
-	{  351, -2848, 12508},
-	{  348, -2815, 12255},
-	{  344, -2782, 12003},
-	{  341, -2747, 11751},
-	{  337, -2712, 11500},
-	{  333, -2676, 11248},
-	{  328, -2639, 10997},
-	{  324, -2601, 10747},
-	{  320, -2562, 10497},
-	{  315, -2523, 10247},
-	{  310, -2482,  9998},
-	{  305, -2442,  9750},
-	{  300, -2400,  9502},
-	{  294, -2358,  9255},
-	{  289, -2315,  9009},
-	{  283, -2271,  8763},
-	{  277, -2227,  8519},
-	{  271, -2182,  8275},
-	{  265, -2137,  8032},
-	{  259, -2091,  7791},
-	{  252, -2045,  7550},
-	{  246, -1998,  7311},
-	{  239, -1951,  7072},
-	{  232, -1904,  6835},
-	{  226, -1856,  6599},
-	{  219, -1807,  6364},
-	{  212, -1758,  6131},
-	{  204, -1709,  5899},
-	{  197, -1660,  5668},
-	{  190, -1611,  5439},
-	{  183, -1561,  5212},
-	{  175, -1511,  4986},
-	{  168, -1460,  4761},
-	{  160, -1410,  4538},
-	{  152, -1359,  4317},
-	{  145, -1309,  4098},
-	{  137, -1258,  3880},
-	{  129, -1207,  3664},
-	{  121, -1156,  3450},
-	{  113, -1105,  3238},
-	{  105, -1054,  3028},
-	{   97, -1003,  2820},
-	{   89,  -952,  2614},
-	{   81,  -901,  2409},
-	{   73,  -851,  2207},
+	{  -25,    58, 32526},
+	{   -8,   -69, 32461},
+	{    8,  -195, 32393},
+	{   25,  -318, 32321},
+	{   41,  -439, 32244},
+	{   57,  -557, 32163},
+	{   72,  -673, 32079},
+	{   88,  -787, 31990},
+	{  103,  -899, 31897},
+	{  118, -1009, 31801},
+	{  133, -1116, 31700},
+	{  148, -1221, 31596},
+	{  162, -1324, 31488},
+	{  177, -1424, 31376},
+	{  191, -1522, 31260},
+	{  205, -1618, 31140},
+	{  218, -1712, 31017},
+	{  231, -1803, 30890},
+	{  245, -1893, 30759},
+	{  257, -1980, 30625},
+	{  270, -2065, 30487},
+	{  282, -2147, 30346},
+	{  295, -2228, 30201},
+	{  306, -2306, 30052},
+	{  318, -2382, 29900},
+	{  330, -2456, 29745},
+	{  341, -2528, 29586},
+	{  352, -2597, 29424},
+	{  362, -2664, 29259},
+	{  373, -2730, 29090},
+	{  383, -2793, 28918},
+	{  393, -2854, 28743},
+	{  402, -2912, 28565},
+	{  411, -2969, 28384},
+	{  421, -3024, 28199},
+	{  429, -3076, 28012},
+	{  438, -3126, 27822},
+	{  446, -3175, 27628},
+	{  454, -3221, 27432},
+	{  462, -3265, 27233},
+	{  469, -3307, 27031},
+	{  476, -3348, 26826},
+	{  483, -3386, 26619},
+	{  490, -3422, 26409},
+	{  496, -3456, 26196},
+	{  502, -3488, 25981},
+	{  508, -3518, 25763},
+	{  514, -3547, 25543},
+	{  519, -3573, 25320},
+	{  524, -3597, 25095},
+	{  529, -3620, 24867},
+	{  533, -3640, 24637},
+	{  538, -3659, 24405},
+	{  541, -3676, 24171},
+	{  545, -3691, 23934},
+	{  548, -3704, 23696},
+	{  552, -3716, 23455},
+	{  554, -3726, 23212},
+	{  557, -3733, 22967},
+	{  559, -3740, 22721},
+	{  561, -3744, 22472},
+	{  563, -3747, 22222},
+	{  565, -3748, 21970},
+	{  566, -3747, 21716},
+	{  567, -3745, 21460},
+	{  568, -3741, 21203},
+	{  568, -3735, 20944},
+	{  568, -3728, 20684},
+	{  568, -3719, 20422},
+	{  568, -3708, 20159},
+	{  568, -3697, 19894},
+	{  567, -3683, 19628},
+	{  566, -3668, 19361},
+	{  564, -3652, 19093},
+	{  563, -3634, 18823},
+	{  561, -3614, 18552},
+	{  559, -3594, 18280},
+	{  557, -3571, 18008},
+	{  554, -3548, 17734},
+	{  552, -3523, 17459},
+	{  549, -3497, 17183},
+	{  546, -3469, 16907},
+	{  542, -3440, 16630},
+	{  539, -3410, 16352},
+	{  535, -3379, 16074},
+	{  531, -3346, 15794},
+	{  527, -3312, 15515},
+	{  522, -3277, 15235},
+	{  517, -3241, 14954},
+	{  513, -3203, 14673},
+	{  507, -3165, 14392},
+	{  502, -3125, 14110},
+	{  497, -3085, 13828},
+	{  491, -3043, 13546},
+	{  485, -3000, 13264},
+	{  479, -2957, 12982},
+	{  473, -2912, 12699},
+	{  466, -2867, 12417},
+	{  460, -2820, 12135},
+	{  453, -2772, 11853},
+	{  446, -2724, 11571},
+	{  439, -2675, 11289},
+	{  432, -2625, 11008},
+	{  424, -2574, 10727},
+	{  417, -2522, 10446},
+	{  409, -2470, 10166},
+	{  401, -2417,  9886},
+	{  393, -2363,  9607},
+	{  385, -2309,  9328},
+	{  376, -2253,  9050},
+	{  368, -2198,  8773},
+	{  359, -2141,  8497},
+	{  351, -2084,  8221},
+	{  342, -2026,  7946},
+	{  333, -1968,  7672},
+	{  324, -1910,  7399},
+	{  315, -1850,  7127},
+	{  305, -1791,  6856},
+	{  296, -1731,  6586},
+	{  286, -1670,  6317},
+	{  277, -1609,  6049},
+	{  267, -1548,  5783},
+	{  257, -1486,  5517},
+	{  247, -1424,  5254},
+	{  237, -1362,  4991},
+	{  227, -1300,  4730},
+	{  217, -1237,  4470},
+	{  207, -1174,  4212},
+	{  197, -1110,  3956},
+	{  187, -1047,  3701},
+	{  176,  -984,  3448},
+	{  166,  -920,  3196},
+	{  155,  -856,  2946},
+	{  145,  -792,  2698},
+	{  134,  -728,  2452},
+	{  124,  -664,  2207},
+	{  113,  -600,  1965},
+	{  102,  -536,  1724},
+	{   92,  -472,  1486},
+	{   81,  -408,  1249},
+	{   70,  -345,  1015},
+	{   60,  -281,   783},
+	{   49,  -217,   553},
+	{   38,  -154,   325},
 };
--- a/src_SigProc_FIX/SKP_Silk_resampler_rom.h
+++ b/src_SigProc_FIX/SKP_Silk_resampler_rom.h
@@ -40,15 +40,15 @@
 #ifndef _SKP_SILK_FIX_RESAMPLER_ROM_H_
 #define _SKP_SILK_FIX_RESAMPLER_ROM_H_
 
-#include "SKP_Silk_typedef.h"
-#include "SKP_Silk_resampler_structs.h"
-
 #ifdef  __cplusplus
 extern "C"
 {
 #endif
 
-#define RESAMPLER_DOWN_ORDER_FIR                12
+#include "SKP_Silk_typedef.h"
+#include "SKP_Silk_resampler_structs.h"
+
+#define RESAMPLER_DOWN_ORDER_FIR                16
 #define RESAMPLER_ORDER_FIR_144                 6
 
 
--- a/src_SigProc_FIX/SKP_Silk_resampler_structs.h
+++ b/src_SigProc_FIX/SKP_Silk_resampler_structs.h
@@ -37,6 +37,7 @@
 
 #ifndef SKP_Silk_RESAMPLER_STRUCTS_H
 #define SKP_Silk_RESAMPLER_STRUCTS_H
+
 #ifdef __cplusplus
 extern "C" {
 #endif
--- a/src_SigProc_FIX/SKP_Silk_schur.c
+++ b/src_SigProc_FIX/SKP_Silk_schur.c
@@ -37,10 +37,10 @@
 
 /* Faster than schur64(), but much less accurate.                       */
 /* uses SMLAWB(), requiring armv5E and higher.                          */ 
-void SKP_Silk_schur(
-    SKP_int16            *rc_Q15,                /* O:    reflection coefficients [order] Q15         */
-    const SKP_int32      *c,                     /* I:    correlations [order+1]                      */
-    const SKP_int32      order                   /* I:    prediction order                            */
+SKP_int32 SKP_Silk_schur(                     /* O:    Returns residual energy                     */
+    SKP_int16            *rc_Q15,               /* O:    reflection coefficients [order] Q15         */
+    const SKP_int32      *c,                    /* I:    correlations [order+1]                      */
+    const SKP_int32      order                  /* I:    prediction order                            */
 )
 {
     SKP_int        k, n, lz;
@@ -60,7 +60,7 @@
         /* Shift to the left */
         lz -= 2; 
         for( k = 0; k < order + 1; k++ ) {
-            C[ k ][ 0 ] = C[ k ][ 1 ] = SKP_LSHIFT( c[k], lz );
+            C[ k ][ 0 ] = C[ k ][ 1 ] = SKP_LSHIFT( c[ k ], lz );
         }
     } else {
         /* No need to shift */
@@ -78,7 +78,7 @@
         rc_tmp_Q15 = SKP_SAT16( rc_tmp_Q15 );
 
         /* Store */
-        rc_Q15[ k ] = (SKP_int16)rc_tmp_Q15;
+        rc_Q15[ k ] = ( SKP_int16 )rc_tmp_Q15;
 
         /* Update correlations */
         for( n = 0; n < order - k; n++ ) {
@@ -88,4 +88,7 @@
             C[ n ][ 1 ]         = SKP_SMLAWB( Ctmp2, SKP_LSHIFT( Ctmp1, 1 ), rc_tmp_Q15 );
         }
     }
+
+    /* return residual energy */
+    return C[ 0 ][ 1 ];
 }
--- a/src_SigProc_FLP/SKP_Silk_NLSF_VQ_weights_laroia_FLP.c
+++ b/src_SigProc_FLP/SKP_Silk_NLSF_VQ_weights_laroia_FLP.c
@@ -33,7 +33,7 @@
 Signal Processing, pp. 641-644, 1991.
 */
 
-#define MIN_NDELTA      ( 1e-6f / PI )
+#define MIN_NDELTA                  1e-4f
 
 /* Laroia low complexity NLSF weights */
 void SKP_Silk_NLSF_VQ_weights_laroia_FLP( 
--- a/src_SigProc_FLP/SKP_Silk_SigProc_FLP.h
+++ b/src_SigProc_FLP/SKP_Silk_SigProc_FLP.h
@@ -25,6 +25,7 @@
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ***********************************************************************/
 
+
 #ifndef _SKP_SILK_SIGPROC_FLP_H_
 #define _SKP_SILK_SIGPROC_FLP_H_
 
@@ -83,10 +84,10 @@
     SKP_int32            order          /* I:   prediction order                          */
 );
 
-void SKP_Silk_schur_FLP(
-    SKP_float           refl_coef[],     /* O   reflection coefficients (length order)       */
-    const SKP_float     auto_corr[],     /* I   autotcorreation sequence (length order+1)    */
-    SKP_int             order            /* I   order                                        */
+SKP_float SKP_Silk_schur_FLP(           /* O    returns residual energy                     */
+    SKP_float       refl_coef[],        /* O    reflection coefficients (length order)      */
+    const SKP_float auto_corr[],        /* I    autocorrelation sequence (length order+1)   */
+    SKP_int         order               /* I    order                                       */
 );
 
 void SKP_Silk_k2a_FLP(
--- a/src_SigProc_FLP/SKP_Silk_k2a_FLP.c
+++ b/src_SigProc_FLP/SKP_Silk_k2a_FLP.c
@@ -44,7 +44,7 @@
 )
 {
     SKP_int   k, n;
-    SKP_float Atmp[SKP_Silk_MAX_ORDER_LPC];
+    SKP_float Atmp[ SKP_Silk_MAX_ORDER_LPC ];
 
     for( k = 0; k < order; k++ ){
         for( n = 0; n < k; n++ ){
--- a/src_SigProc_FLP/SKP_Silk_pitch_analysis_core_FLP.c
+++ b/src_SigProc_FLP/SKP_Silk_pitch_analysis_core_FLP.c
@@ -102,12 +102,13 @@
     SKP_float lag_log2, prevLag_log2, delta_lag_log2_sqr;
     SKP_float energies_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ];
     SKP_float cross_corr_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ];
-    SKP_int diff, lag_counter, frame_length, frame_length_8kHz, frame_length_4kHz;
-    SKP_int sf_length, sf_length_8kHz, sf_length_4kHz;
-    SKP_int min_lag, min_lag_8kHz, min_lag_4kHz;
-    SKP_int max_lag, max_lag_8kHz, max_lag_4kHz;
+    SKP_int   diff, lag_counter;
+    SKP_int   frame_length, frame_length_8kHz, frame_length_4kHz;
+    SKP_int   sf_length, sf_length_8kHz, sf_length_4kHz;
+    SKP_int   min_lag, min_lag_8kHz, min_lag_4kHz;
+    SKP_int   max_lag, max_lag_8kHz, max_lag_4kHz;
+    SKP_int   nb_cbk_search;
     const SKP_int8 *Lag_CB_ptr;
-    SKP_int nb_cbk_search;
 
     /* Check for valid sampling frequency */
     SKP_assert( Fs_kHz == 8 || Fs_kHz == 12 || Fs_kHz == 16 || Fs_kHz == 24 );
@@ -210,7 +211,7 @@
 
         /* Calculate first vector products before loop */
         cross_corr = SKP_Silk_inner_product_FLP( target_ptr, basis_ptr, sf_length_8kHz );
-        normalizer = SKP_Silk_energy_FLP( basis_ptr, sf_length_8kHz ) + 1000.0f;
+        normalizer = SKP_Silk_energy_FLP( basis_ptr, sf_length_8kHz ) + sf_length_8kHz * 4000.0f;
 
         C[ 0 ][ min_lag_4kHz ] += (SKP_float)(cross_corr / sqrt(normalizer));
 
@@ -234,14 +235,14 @@
         target_ptr += sf_length_8kHz;
     }
 
-    /* apply short-lag bias */
+    /* Apply short-lag bias */
     for( i = max_lag_4kHz; i >= min_lag_4kHz; i-- ) {
         C[ 0 ][ i ] -= C[ 0 ][ i ] * i / 4096.0f;
     }
 
     /* Sort */
-    length_d_srch = 5 + complexity;
-    SKP_assert( length_d_srch <= PE_D_SRCH_LENGTH );
+    length_d_srch = 4 + 2 * complexity;
+    SKP_assert( 3 * length_d_srch <= PE_D_SRCH_LENGTH );
     SKP_Silk_insertion_sort_decreasing_FLP( &C[ 0 ][ min_lag_4kHz ], d_srch, max_lag_4kHz - min_lag_4kHz + 1, length_d_srch );
 
     /* Escape if correlation is very low already here */
@@ -253,7 +254,7 @@
     }
     threshold = Cmax * Cmax; 
     if( energy / 16.0f > threshold ) {
-        SKP_memset( pitch_out, 0, nb_subfr * sizeof(SKP_int) );
+        SKP_memset( pitch_out, 0, nb_subfr * sizeof( SKP_int ) );
         *LTPCorr      = 0.0f;
         *lagIndex     = 0;
         *contourIndex = 0;
@@ -372,7 +373,7 @@
         } else {
             nb_cbk_search = PE_NB_CBKS_STAGE2;
         }
-    }else{
+    } else {
         cbk_size       = PE_NB_CBKS_STAGE2_10MS;
         Lag_CB_ptr     = &SKP_Silk_CB_lags_stage2_10_ms[ 0 ][ 0 ];
         nb_cbk_search  = PE_NB_CBKS_STAGE2_10MS;
@@ -410,7 +411,10 @@
             CCmax_new_b -= PE_FLP_PREVLAG_BIAS * nb_subfr * (*LTPCorr) * delta_lag_log2_sqr / (delta_lag_log2_sqr + 0.5f);
         }
 
-        if ( CCmax_new_b > CCmax_b && CCmax_new > nb_subfr * search_thres2 * search_thres2 ) {
+        if ( CCmax_new_b > CCmax_b                                      && /* Find maximum biased correlation                  */
+             CCmax_new > nb_subfr * search_thres2 * search_thres2       && /* Correlation needs to be high enough to be voiced */
+             SKP_Silk_CB_lags_stage2[ 0 ][ CBimax_new ] <= min_lag_8kHz    /* Lag must be in range                             */
+            ) {
             CCmax_b = CCmax_new_b;
             CCmax   = CCmax_new;
             lag     = d;
@@ -488,7 +492,9 @@
                     CCmax_new = 0.0f;               
                 }
 
-                if( CCmax_new > CCmax ) {
+                if( CCmax_new > CCmax &&
+                   ( d + (SKP_int)SKP_Silk_CB_lags_stage3[ 0 ][ j ] ) <= max_lag  
+                   ) {
                     CCmax   = CCmax_new;
                     lag_new = d;
                     CBimax  = j;
--- a/src_SigProc_FLP/SKP_Silk_schur_FLP.c
+++ b/src_SigProc_FLP/SKP_Silk_schur_FLP.c
@@ -36,36 +36,38 @@
 
 #include "SKP_Silk_SigProc_FLP.h"
 
-void SKP_Silk_schur_FLP(  
+SKP_float SKP_Silk_schur_FLP(           /* O    returns residual energy                     */
     SKP_float       refl_coef[],        /* O    reflection coefficients (length order)      */
-    const SKP_float auto_corr[],        /* I    autotcorreation sequence (length order+1)   */
+    const SKP_float auto_corr[],        /* I    autotcorrelation sequence (length order+1)  */
     SKP_int         order               /* I    order                                       */
 )
 {
     SKP_int   k, n;
-    SKP_float C[SKP_Silk_MAX_ORDER_LPC + 1][2];
+    SKP_float C[ SKP_Silk_MAX_ORDER_LPC + 1 ][ 2 ];
     SKP_float Ctmp1, Ctmp2, rc_tmp;
     
-    /* copy correlations */
-    for( k = 0; k < order+1; k++ ){
-        C[k][0] = C[k][1] = auto_corr[k];
+    /* Copy correlations */
+    for( k = 0; k < order+1; k++ ) {
+        C[ k ][ 0 ] = C[ k ][ 1 ] = auto_corr[ k ];
     }
 
-    for( k = 0; k < order; k++ )
-    {
-        /* get reflection coefficient */
-        rc_tmp = -C[k + 1][0] / SKP_max_float(C[0][1], 1e-9f);
+    for( k = 0; k < order; k++ ) {
+        /* Get reflection coefficient */
+        rc_tmp = -C[ k + 1 ][ 0 ] / SKP_max_float( C[ 0 ][ 1 ], 1e-9f );
 
-        /* save the output */
-        refl_coef[k] = rc_tmp;
+        /* Save the output */
+        refl_coef[ k ] = rc_tmp;
 
-        /* update correlations */
+        /* Update correlations */
         for( n = 0; n < order - k; n++ ){
-            Ctmp1 = C[n + k + 1][0];
-            Ctmp2 = C[n][1];
-            C[n + k + 1][0] = Ctmp1 + Ctmp2 * rc_tmp;
-            C[n][1]         = Ctmp2 + Ctmp1 * rc_tmp;
+            Ctmp1 = C[ n + k + 1 ][ 0 ];
+            Ctmp2 = C[ n ][ 1 ];
+            C[ n + k + 1 ][ 0 ] = Ctmp1 + Ctmp2 * rc_tmp;
+            C[ n ][ 1 ]         = Ctmp2 + Ctmp1 * rc_tmp;
         }
     }
+
+    /* Return residual energy */
+    return C[ 0 ][ 1 ];
 }
 
--- a/src_SigProc_FLP/SKP_Silk_sort_FLP.c
+++ b/src_SigProc_FLP/SKP_Silk_sort_FLP.c
@@ -28,9 +28,6 @@
 /* Insertion sort (fast for already almost sorted arrays):  */
 /* Best case:  O(n)   for an already sorted array           */
 /* Worst case: O(n^2) for an inversely sorted array         */
-/*                                                          */
-/* To be implemented:                                       */
-/* Shell short: http://en.wikipedia.org/wiki/Shell_sort     */
 
 #include "SKP_Silk_typedef.h"
 #include "SKP_Silk_SigProc_FLP.h"
--- a/src_common/SKP_Silk_NLSF2A_stable.c
+++ b/src_common/SKP_Silk_NLSF2A_stable.c
@@ -42,7 +42,7 @@
     /* Ensure stable LPCs */
     for( i = 0; i < MAX_LPC_STABILIZE_ITERATIONS; i++ ) {
         if( SKP_Silk_LPC_inverse_pred_gain( &invGain_Q30, pAR_Q12, LPC_order ) == 1 ) {
-            SKP_Silk_bwexpander( pAR_Q12, LPC_order, 65536 - SKP_SMULBB( 66, i ) ); /* 66_Q16 = 0.001 */
+            SKP_Silk_bwexpander( pAR_Q12, LPC_order, 65536 - SKP_SMULBB( 10 + i, i ) );		/* 10_Q16 = 0.00015 */
         } else {
             break;
         }
--- a/src_common/SKP_Silk_NLSF_MSVQ_decode.c
+++ b/src_common/SKP_Silk_NLSF_MSVQ_decode.c
@@ -35,19 +35,20 @@
     const SKP_int                   LPC_order       /* I    LPC order used                                      */
 ) 
 {
-    const SKP_int16 *pCB_element;
-          SKP_int    s;
-          SKP_int    i;
+    const SKP_int8 *pCB_element;
+          SKP_int   s;
+          SKP_int   i;
+          SKP_int   pNLSF_Q8[ MAX_LPC_ORDER ];
 
     /* Check that each index is within valid range */
     SKP_assert( 0 <= NLSFIndices[ 0 ] && NLSFIndices[ 0 ] < psNLSF_CB->CBStages[ 0 ].nVectors );
 
     /* Point to the first vector element */
-    pCB_element = &psNLSF_CB->CBStages[ 0 ].CB_NLSF_Q15[ SKP_MUL( NLSFIndices[ 0 ], LPC_order ) ];
+    pCB_element = &psNLSF_CB->CBStages[ 0 ].CB_NLSF_Q8[ SKP_MUL( NLSFIndices[ 0 ], LPC_order ) ];
 
     /* Initialize with the codebook vector from stage 0 */
     for( i = 0; i < LPC_order; i++ ) {
-        pNLSF_Q15[ i ] = ( SKP_int )pCB_element[ i ];
+        pNLSF_Q8[ i ] = ( SKP_int )pCB_element[ i ];
     }
           
     for( s = 1; s < psNLSF_CB->nStages; s++ ) {
@@ -56,34 +57,39 @@
 
         if( LPC_order == 16 ) {
             /* Point to the first vector element */
-            pCB_element = &psNLSF_CB->CBStages[ s ].CB_NLSF_Q15[ SKP_LSHIFT( NLSFIndices[ s ], 4 ) ];
+            pCB_element = &psNLSF_CB->CBStages[ s ].CB_NLSF_Q8[ SKP_LSHIFT( NLSFIndices[ s ], 4 ) ];
 
             /* Add the codebook vector from the current stage */
-            pNLSF_Q15[  0 ] += pCB_element[  0 ];
-            pNLSF_Q15[  1 ] += pCB_element[  1 ];
-            pNLSF_Q15[  2 ] += pCB_element[  2 ];
-            pNLSF_Q15[  3 ] += pCB_element[  3 ];
-            pNLSF_Q15[  4 ] += pCB_element[  4 ];
-            pNLSF_Q15[  5 ] += pCB_element[  5 ];
-            pNLSF_Q15[  6 ] += pCB_element[  6 ];
-            pNLSF_Q15[  7 ] += pCB_element[  7 ];
-            pNLSF_Q15[  8 ] += pCB_element[  8 ];
-            pNLSF_Q15[  9 ] += pCB_element[  9 ];
-            pNLSF_Q15[ 10 ] += pCB_element[ 10 ];
-            pNLSF_Q15[ 11 ] += pCB_element[ 11 ];
-            pNLSF_Q15[ 12 ] += pCB_element[ 12 ];
-            pNLSF_Q15[ 13 ] += pCB_element[ 13 ];
-            pNLSF_Q15[ 14 ] += pCB_element[ 14 ];
-            pNLSF_Q15[ 15 ] += pCB_element[ 15 ];
+            pNLSF_Q8[  0 ] += ( SKP_int )pCB_element[  0 ];
+            pNLSF_Q8[  1 ] += ( SKP_int )pCB_element[  1 ];
+            pNLSF_Q8[  2 ] += ( SKP_int )pCB_element[  2 ];
+            pNLSF_Q8[  3 ] += ( SKP_int )pCB_element[  3 ];
+            pNLSF_Q8[  4 ] += ( SKP_int )pCB_element[  4 ];
+            pNLSF_Q8[  5 ] += ( SKP_int )pCB_element[  5 ];
+            pNLSF_Q8[  6 ] += ( SKP_int )pCB_element[  6 ];
+            pNLSF_Q8[  7 ] += ( SKP_int )pCB_element[  7 ];
+            pNLSF_Q8[  8 ] += ( SKP_int )pCB_element[  8 ];
+            pNLSF_Q8[  9 ] += ( SKP_int )pCB_element[  9 ];
+            pNLSF_Q8[ 10 ] += ( SKP_int )pCB_element[ 10 ];
+            pNLSF_Q8[ 11 ] += ( SKP_int )pCB_element[ 11 ];
+            pNLSF_Q8[ 12 ] += ( SKP_int )pCB_element[ 12 ];
+            pNLSF_Q8[ 13 ] += ( SKP_int )pCB_element[ 13 ];
+            pNLSF_Q8[ 14 ] += ( SKP_int )pCB_element[ 14 ];
+            pNLSF_Q8[ 15 ] += ( SKP_int )pCB_element[ 15 ];
         } else {
             /* Point to the first vector element */
-            pCB_element = &psNLSF_CB->CBStages[ s ].CB_NLSF_Q15[ SKP_SMULBB( NLSFIndices[ s ], LPC_order ) ];
+            pCB_element = &psNLSF_CB->CBStages[ s ].CB_NLSF_Q8[ SKP_SMULBB( NLSFIndices[ s ], LPC_order ) ];
 
             /* Add the codebook vector from the current stage */
             for( i = 0; i < LPC_order; i++ ) {
-                pNLSF_Q15[ i ] += pCB_element[ i ];
+                pNLSF_Q8[ i ] += ( SKP_int )pCB_element[ i ];
             }
         }
+    }
+
+    /* Add 1/2 in Q15 */
+    for( i = 0; i < LPC_order; i++ ) {
+        pNLSF_Q15[ i ] = SKP_LSHIFT16( pNLSF_Q8[ i ], 7 ) + SKP_FIX_CONST( 0.5f, 15 );
     }
 
     /* NLSF stabilization */
--- a/src_common/SKP_Silk_NSQ.c
+++ b/src_common/SKP_Silk_NSQ.c
@@ -28,11 +28,12 @@
 #include "SKP_Silk_main.h"
 
 SKP_INLINE void SKP_Silk_nsq_scale_states(
+    SKP_Silk_encoder_state *psEncC,         /* I/O Encoder State                    */
     SKP_Silk_nsq_state  *NSQ,               /* I/O NSQ state                        */
     const SKP_int16     x[],                /* I input in Q0                        */
     SKP_int32           x_sc_Q10[],         /* O input scaled with 1/Gain           */
-    SKP_int             length,             /* I length of input                    */
-    SKP_int16           sLTP[],             /* I re-whitened LTP state in Q0        */
+    SKP_int             subfr_length,       /* I length of input                    */
+    const SKP_int16     sLTP[],             /* I re-whitened LTP state in Q0        */
     SKP_int32           sLTP_Q16[],         /* O LTP state matching scaled input    */
     SKP_int             subfr,              /* I subframe number                    */
     const SKP_int       LTP_scale_Q14,      /* I                                    */
@@ -59,8 +60,7 @@
     SKP_int             offset_Q10,         /* I                                    */
     SKP_int             length,             /* I    Input length                    */
     SKP_int             shapingLPCOrder,    /* I    Noise shaping AR filter order   */
-    SKP_int             predictLPCOrder,    /* I    Prediction filter order         */
-    SKP_int32           warping_Q16         /* I                                    */
+    SKP_int             predictLPCOrder     /* I    Prediction filter order         */
 #ifdef SAVE_ALL_INTERNAL_DATA
     ,SKP_float          q_in_env[],         /* O                                    */
     SKP_float           q_exc[],            /* O                                    */
@@ -116,6 +116,8 @@
     /* Set unvoiced lag to the previous one, overwrite later for voiced */
     lag             = NSQ->lagPrev;
 
+    SKP_assert( NSQ->prev_inv_gain_Q16 != 0 );
+
     offset_Q10 = SKP_Silk_Quantization_Offsets_Q10[ psEncCtrlC->sigtype ][ psEncCtrlC->QuantOffsetType ];
 
     if( LSFInterpFactor_Q2 == ( 1 << 2 ) ) {
@@ -135,20 +137,20 @@
 
         /* Noise shape parameters */
         SKP_assert( HarmShapeGain_Q14[ k ] >= 0 );
-        HarmShapeFIRPacked_Q14  =                        SKP_RSHIFT( HarmShapeGain_Q14[ k ], 2 );
+        HarmShapeFIRPacked_Q14  =                          SKP_RSHIFT( HarmShapeGain_Q14[ k ], 2 );
         HarmShapeFIRPacked_Q14 |= SKP_LSHIFT( ( SKP_int32 )SKP_RSHIFT( HarmShapeGain_Q14[ k ], 1 ), 16 );
 
+        NSQ->rewhite_flag = 0;
         if( psEncCtrlC->sigtype == SIG_TYPE_VOICED ) {
             /* Voiced */
             lag = psEncCtrlC->pitchL[ k ];
 
-            NSQ->rewhite_flag = 0;
             /* Re-whitening */
             if( ( k & ( 3 - SKP_LSHIFT( LSF_interpolation_flag, 1 ) ) ) == 0 ) {
-                /* Rewhiten with new A coefs */
-                
+
+                /* Rewhiten with new A coefs */
                 start_idx = psEncC->ltp_mem_length - lag - psEncC->predictLPCOrder - LTP_ORDER / 2;
-                start_idx = SKP_LIMIT_int( start_idx, 0, psEncC->ltp_mem_length - psEncC->predictLPCOrder ); /* Limit */
+                SKP_assert( start_idx > 0 );
                 
                 SKP_memset( FiltState, 0, psEncC->predictLPCOrder * sizeof( SKP_int32 ) );
                 SKP_Silk_MA_Prediction( &NSQ->xq[ start_idx + k * psEncC->subfr_length ], 
@@ -159,12 +161,12 @@
             }
         }
         
-        SKP_Silk_nsq_scale_states( NSQ, x, x_sc_Q10, psEncC->subfr_length, sLTP, 
+        SKP_Silk_nsq_scale_states( psEncC, NSQ, x, x_sc_Q10, psEncC->subfr_length, sLTP, 
             sLTP_Q16, k, LTP_scale_Q14, Gains_Q16, psEncCtrlC->pitchL );
 
         SKP_Silk_noise_shape_quantizer( NSQ, psEncCtrlC->sigtype, x_sc_Q10, q, pxq, sLTP_Q16, A_Q12, B_Q14, 
             AR_shp_Q13, lag, HarmShapeFIRPacked_Q14, Tilt_Q14[ k ], LF_shp_Q14[ k ], Gains_Q16[ k ], Lambda_Q10, 
-            offset_Q10, psEncC->subfr_length, psEncC->shapingLPCOrder, psEncC->predictLPCOrder, psEncCtrlC->warping_Q16
+            offset_Q10, psEncC->subfr_length, psEncC->shapingLPCOrder, psEncC->predictLPCOrder
 #ifdef SAVE_ALL_INTERNAL_DATA
             , q_in_env, q_exc, q_LPC_exc, q_exc_prev
 #endif
@@ -183,6 +185,7 @@
 
     /* Update lagPrev for next frame */
     NSQ->lagPrev = psEncCtrlC->pitchL[ psEncC->nb_subfr - 1 ];
+
     /* Save quantized speech and noise shaping signals */
     SKP_memcpy( NSQ->xq,           &NSQ->xq[           psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( SKP_int16 ) );
     SKP_memcpy( NSQ->sLTP_shp_Q10, &NSQ->sLTP_shp_Q10[ psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( SKP_int32 ) );
@@ -191,7 +194,7 @@
     DEBUG_STORE_DATA( q_in_env.dat,  q_in_env_buf,  psEncC->frame_length * sizeof( SKP_float ) );
     DEBUG_STORE_DATA( q_exc.dat,     q_exc_buf,     psEncC->frame_length * sizeof( SKP_float ) );
     DEBUG_STORE_DATA( q_lpc_exc.dat, q_LPC_exc_buf, psEncC->frame_length * sizeof( SKP_float ) );
-    DEBUG_STORE_DATA( xq.dat,        &NSQ->xq[ psEncC->ltp_mem_length - psEncC->frame_length ], psEncC->frame_length * sizeof( SKP_int16 ) );
+    DEBUG_STORE_DATA( xq.dat,        NSQ->xq,       psEncC->frame_length * sizeof( SKP_int16 ) );
     DEBUG_STORE_DATA( q.dat,         &q[ -psEncC->frame_length ], psEncC->frame_length * sizeof( SKP_int8 ) );
 #endif
 }
@@ -218,8 +221,7 @@
     SKP_int             offset_Q10,         /* I                                    */
     SKP_int             length,             /* I    Input length                    */
     SKP_int             shapingLPCOrder,    /* I    Noise shaping AR filter order   */
-    SKP_int             predictLPCOrder,    /* I    Prediction filter order         */
-    SKP_int             warping_Q16         /* I                                    */
+    SKP_int             predictLPCOrder     /* I    Prediction filter order         */
 #ifdef SAVE_ALL_INTERNAL_DATA
     ,SKP_float          q_in_env[],         /* O                                    */
     SKP_float           q_exc[],            /* O                                    */
@@ -240,13 +242,13 @@
     pred_lag_ptr = &sLTP_Q16[ NSQ->sLTP_buf_idx - lag + LTP_ORDER / 2 ];
     
     /* Setup short term AR state */
-    psLPC_Q14     = &NSQ->sLPC_Q14[ MAX_LPC_ORDER - 1 ];
+    psLPC_Q14 = &NSQ->sLPC_Q14[ NSQ_LPC_BUF_LENGTH - 1 ];
 
     /* Quantization thresholds */
-    thr1_Q10 = SKP_SUB_RSHIFT32( -1536, Lambda_Q10, 1);
-    thr2_Q10 = SKP_SUB_RSHIFT32( -512,  Lambda_Q10, 1);
+    thr1_Q10 = SKP_SUB_RSHIFT32( -1536, Lambda_Q10, 1 );
+    thr2_Q10 = SKP_SUB_RSHIFT32(  -512, Lambda_Q10, 1 );
     thr2_Q10 = SKP_ADD_RSHIFT32( thr2_Q10, SKP_SMULBB( offset_Q10, Lambda_Q10 ), 10 );
-    thr3_Q10 = SKP_ADD_RSHIFT32(  512,  Lambda_Q10, 1);
+    thr3_Q10 = SKP_ADD_RSHIFT32(   512, Lambda_Q10, 1 );
 
     for( i = 0; i < length; i++ ) {
         /* Generate dither */
@@ -271,7 +273,6 @@
         LPC_pred_Q10 = SKP_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -7 ], a_Q12[ 7 ] );
         LPC_pred_Q10 = SKP_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -8 ], a_Q12[ 8 ] );
         LPC_pred_Q10 = SKP_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -9 ], a_Q12[ 9 ] );
-
         for( j = 10; j < predictLPCOrder; j ++ ) {
             LPC_pred_Q10 = SKP_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -j ], a_Q12[ j ] );
         }
@@ -291,20 +292,15 @@
 
         /* Noise shape feedback */
         SKP_assert( ( shapingLPCOrder & 1 ) == 0 );   /* check that order is even */
-        /* Output of lowpass section */
-        tmp2 = SKP_SMLAWB( psLPC_Q14[ 0 ], NSQ->sAR2_Q14[ 0 ], warping_Q16 );
-        /* Output of allpass section */
-        tmp1 = SKP_SMLAWB( NSQ->sAR2_Q14[ 0 ], NSQ->sAR2_Q14[ 1 ] - tmp2, warping_Q16 );
+        tmp2 = psLPC_Q14[ 0 ];
+        tmp1 = NSQ->sAR2_Q14[ 0 ];
         NSQ->sAR2_Q14[ 0 ] = tmp2;
         n_AR_Q10 = SKP_SMULWB( tmp2, AR_shp_Q13[ 0 ] );
-        /* Loop over allpass sections */
         for( j = 2; j < shapingLPCOrder; j += 2 ) {
-            /* Output of allpass section */
-            tmp2 = SKP_SMLAWB( NSQ->sAR2_Q14[ j - 1 ], NSQ->sAR2_Q14[ j + 0 ] - tmp1, warping_Q16 );
+            tmp2 = NSQ->sAR2_Q14[ j - 1 ];
             NSQ->sAR2_Q14[ j - 1 ] = tmp1;
             n_AR_Q10 = SKP_SMLAWB( n_AR_Q10, tmp1, AR_shp_Q13[ j - 1 ] );
-            /* Output of allpass section */
-            tmp1 = SKP_SMLAWB( NSQ->sAR2_Q14[ j + 0 ], NSQ->sAR2_Q14[ j + 1 ] - tmp2, warping_Q16 );
+            tmp1 = NSQ->sAR2_Q14[ j + 0 ];
             NSQ->sAR2_Q14[ j + 0 ] = tmp2;
             n_AR_Q10 = SKP_SMLAWB( n_AR_Q10, tmp2, AR_shp_Q13[ j ] );
         }
@@ -324,8 +320,8 @@
             /* Symmetric, packed FIR coefficients */
             n_LTP_Q14 = SKP_SMULWB( SKP_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 );
             n_LTP_Q14 = SKP_SMLAWT( n_LTP_Q14, shp_lag_ptr[ -1 ],                     HarmShapeFIRPacked_Q14 );
-            shp_lag_ptr++;
             n_LTP_Q14 = SKP_LSHIFT( n_LTP_Q14, 6 );
+            shp_lag_ptr++;
         } else {
             n_LTP_Q14 = 0;
         }
@@ -345,18 +341,21 @@
         r_Q10 = SKP_LIMIT_32( r_Q10, -64 << 10, 64 << 10 );
 
         /* Quantize */
-        if( r_Q10 < thr1_Q10 ) {
-            q_Q0 = SKP_RSHIFT_ROUND( SKP_ADD_RSHIFT32( r_Q10, Lambda_Q10, 1 ), 10 );
-            q_Q10 = SKP_LSHIFT( q_Q0, 10 );
-        } else if( r_Q10 < thr2_Q10 ) {
-            q_Q0 = -1;
-            q_Q10 = -1024;
-        } else if( r_Q10 > thr3_Q10 ) {
-            q_Q0 = SKP_RSHIFT_ROUND( SKP_SUB_RSHIFT32( r_Q10, Lambda_Q10, 1 ), 10 );
-            q_Q10 = SKP_LSHIFT( q_Q0, 10 );
+        q_Q0 = 0;
+        q_Q10 = 0;
+        if( r_Q10 < thr2_Q10 ) {
+            if( r_Q10 < thr1_Q10 ) {
+                q_Q0 = SKP_RSHIFT_ROUND( SKP_ADD_RSHIFT32( r_Q10, Lambda_Q10, 1 ), 10 );
+                q_Q10 = SKP_LSHIFT( q_Q0, 10 );
+            } else {
+                q_Q0 = -1;
+                q_Q10 = -1024;
+            }
         } else {
-            q_Q0 = 0;
-            q_Q10 = 0;
+            if( r_Q10 > thr3_Q10 ) {
+                q_Q0 = SKP_RSHIFT_ROUND( SKP_SUB_RSHIFT32( r_Q10, Lambda_Q10, 1 ), 10 );
+                q_Q10 = SKP_LSHIFT( q_Q0, 10 );
+            }
         }
         q[ i ] = ( SKP_int8 )q_Q0; /* No saturation needed because max is 64 */
 
@@ -391,24 +390,26 @@
         /* Make dither dependent on quantized signal */
         NSQ->rand_seed += q[ i ];
     }
+
     /* Update LPC synth buffer */
-    SKP_memcpy( NSQ->sLPC_Q14, &NSQ->sLPC_Q14[ length ], MAX_LPC_ORDER * sizeof( SKP_int32 ) );
+    SKP_memcpy( NSQ->sLPC_Q14, &NSQ->sLPC_Q14[ length ], NSQ_LPC_BUF_LENGTH * sizeof( SKP_int32 ) );
 }
 
 SKP_INLINE void SKP_Silk_nsq_scale_states(
+    SKP_Silk_encoder_state *psEncC,         /* I/O Encoder State                    */
     SKP_Silk_nsq_state  *NSQ,               /* I/O NSQ state                        */
     const SKP_int16     x[],                /* I input in Q0                        */
     SKP_int32           x_sc_Q10[],         /* O input scaled with 1/Gain           */
-    SKP_int             length,             /* I length of input                    */
-    SKP_int16           sLTP[],             /* I re-whitened LTP state in Q0        */
+    SKP_int             subfr_length,       /* I length of input                    */
+    const SKP_int16     sLTP[],             /* I re-whitened LTP state in Q0        */
     SKP_int32           sLTP_Q16[],         /* O LTP state matching scaled input    */
     SKP_int             subfr,              /* I subframe number                    */
     const SKP_int       LTP_scale_Q14,      /* I                                    */
-    const SKP_int32     Gains_Q16[ MAX_NB_SUBFR ], /* I                                 */
-    const SKP_int       pitchL[ MAX_NB_SUBFR ]  /* I                                    */
+    const SKP_int32     Gains_Q16[ MAX_NB_SUBFR ], /* I                             */
+    const SKP_int       pitchL[ MAX_NB_SUBFR ]  /* I                                */
 )
 {
-    SKP_int   i, scale_length, lag;
+    SKP_int   i, lag;
     SKP_int32 inv_gain_Q16, gain_adj_Q16, inv_gain_Q32;
 
     inv_gain_Q16 = SKP_INVERSE32_varQ( SKP_max( Gains_Q16[ subfr ], 1 ), 32 );
@@ -415,7 +416,7 @@
     inv_gain_Q16 = SKP_min( inv_gain_Q16, SKP_int16_MAX );
     lag          = pitchL[ subfr ];
 
-    /* After rewhitening the LTP state is un-scaled */
+    /* After rewhitening the LTP state is un-scaled, so scale with inv_gain_Q16 */
     if( NSQ->rewhite_flag ) {
         inv_gain_Q32 = SKP_LSHIFT( inv_gain_Q16, 16 );
         if( subfr == 0 ) {
@@ -423,33 +424,31 @@
             inv_gain_Q32 = SKP_LSHIFT( SKP_SMULWB( inv_gain_Q32, LTP_scale_Q14 ), 2 );
         }
         for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) {
+            SKP_assert( i < MAX_FRAME_LENGTH );
             sLTP_Q16[ i ] = SKP_SMULWB( inv_gain_Q32, sLTP[ i ] );
         }
     }
 
-    /* Prepare for Worst case. Next frame starts with max lag voiced */
-    scale_length = length * MAX_NB_SUBFR;                                           /* approx max lag */
-    scale_length = scale_length - SKP_SMULBB( MAX_NB_SUBFR - (subfr + 1), length ); /* subtract samples that will be too old in next frame */
-    scale_length = SKP_max_int( scale_length, lag + LTP_ORDER );                /* make sure to scale whole pitch period if voiced */
-
     /* Adjust for changing gain */
     if( inv_gain_Q16 != NSQ->prev_inv_gain_Q16 ) {
-        gain_adj_Q16 =  SKP_DIV32_varQ( inv_gain_Q16, NSQ->prev_inv_gain_Q16, 16 );
+        gain_adj_Q16 = SKP_DIV32_varQ( inv_gain_Q16, NSQ->prev_inv_gain_Q16, 16 );
 
-        for( i = NSQ->sLTP_shp_buf_idx - scale_length; i < NSQ->sLTP_shp_buf_idx; i++ ) {
+        /* Scale long-term shaping state */
+        for( i = NSQ->sLTP_shp_buf_idx - subfr_length * psEncC->nb_subfr; i < NSQ->sLTP_shp_buf_idx; i++ ) {
             NSQ->sLTP_shp_Q10[ i ] = SKP_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q10[ i ] );
         }
 
-        /* Scale LTP predict state */
+        /* Scale long-term prediction state */
         if( NSQ->rewhite_flag == 0 ) {
             for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) {
                 sLTP_Q16[ i ] = SKP_SMULWW( gain_adj_Q16, sLTP_Q16[ i ] );
             }
         }
+
         NSQ->sLF_AR_shp_Q12 = SKP_SMULWW( gain_adj_Q16, NSQ->sLF_AR_shp_Q12 );
 
-        /* scale short term state */
-        for( i = 0; i < MAX_LPC_ORDER; i++ ) {
+        /* Scale short-term prediction and shaping states */
+        for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) {
             NSQ->sLPC_Q14[ i ] = SKP_SMULWW( gain_adj_Q16, NSQ->sLPC_Q14[ i ] );
         }
         for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) {
@@ -458,7 +457,7 @@
     }
 
     /* Scale input */
-    for( i = 0; i < length; i++ ) {
+    for( i = 0; i < subfr_length; i++ ) {
         x_sc_Q10[ i ] = SKP_RSHIFT( SKP_SMULBB( x[ i ], ( SKP_int16 )inv_gain_Q16 ), 6 );
     }
 
@@ -465,4 +464,4 @@
     /* save inv_gain */
     SKP_assert( inv_gain_Q16 != 0 );
     NSQ->prev_inv_gain_Q16 = inv_gain_Q16;
-}
\ No newline at end of file
+}
--- a/src_common/SKP_Silk_NSQ_del_dec.c
+++ b/src_common/SKP_Silk_NSQ_del_dec.c
@@ -58,12 +58,13 @@
 );
 
 SKP_INLINE void SKP_Silk_nsq_del_dec_scale_states(
+    SKP_Silk_encoder_state *psEncC,             /* I/O  Encoder State                       */
     SKP_Silk_nsq_state  *NSQ,                   /* I/O  NSQ state                           */
     NSQ_del_dec_struct  psDelDec[],             /* I/O  Delayed decision states             */
     const SKP_int16     x[],                    /* I    Input in Q0                         */
     SKP_int32           x_sc_Q10[],             /* O    Input scaled with 1/Gain in Q10     */
-    SKP_int             length,                 /* I    Length of input                     */
-    SKP_int16           sLTP[],                 /* I    Re-whitened LTP state in Q0         */
+    SKP_int             subfr_length,           /* I    Length of input                     */
+    const SKP_int16     sLTP[],                 /* I    Re-whitened LTP state in Q0         */
     SKP_int32           sLTP_Q16[],             /* O    LTP state matching scaled input     */
     SKP_int             subfr,                  /* I    Subframe number                     */
     SKP_int             nStatesDelayedDecision, /* I    Number of del dec states            */
@@ -159,11 +160,16 @@
     smpl_buf_idx = 0; /* index of oldest samples */
 
     decisionDelay = SKP_min_int( DECISION_DELAY, subfr_length );
+
     /* For voiced frames limit the decision delay to lower than the pitch lag */
     if( psEncCtrlC->sigtype == SIG_TYPE_VOICED ) {
         for( k = 0; k < psEncC->nb_subfr; k++ ) {
             decisionDelay = SKP_min_int( decisionDelay, psEncCtrlC->pitchL[ k ] - LTP_ORDER / 2 - 1 );
         }
+    } else {
+        if( lag > 0 ) {
+            decisionDelay = SKP_min_int( decisionDelay, lag - LTP_ORDER / 2 - 1 );
+        }
     }
 
     if( LSFInterpFactor_Q2 == ( 1 << 2 ) ) {
@@ -182,6 +188,11 @@
         B_Q14      = &LTPCoef_Q14[ k * LTP_ORDER           ];
         AR_shp_Q13 = &AR2_Q13[     k * MAX_SHAPE_LPC_ORDER ];
 
+        /* Noise shape parameters */
+        SKP_assert( HarmShapeGain_Q14[ k ] >= 0 );
+        HarmShapeFIRPacked_Q14  =                          SKP_RSHIFT( HarmShapeGain_Q14[ k ], 2 );
+        HarmShapeFIRPacked_Q14 |= SKP_LSHIFT( ( SKP_int32 )SKP_RSHIFT( HarmShapeGain_Q14[ k ], 1 ), 16 );
+
         NSQ->rewhite_flag = 0;
         if( psEncCtrlC->sigtype == SIG_TYPE_VOICED ) {
             /* Voiced */
@@ -212,7 +223,7 @@
                     last_smple_idx = smpl_buf_idx + decisionDelay;
                     for( i = 0; i < decisionDelay; i++ ) {
                         last_smple_idx = ( last_smple_idx - 1 ) & DECISION_DELAY_MASK;
-                        q[   i - decisionDelay ] = ( SKP_int )SKP_RSHIFT( psDD->Q_Q10[ last_smple_idx ], 10 );
+                        q[   i - decisionDelay ] = ( SKP_int8 )SKP_RSHIFT( psDD->Q_Q10[ last_smple_idx ], 10 );
                         pxq[ i - decisionDelay ] = ( SKP_int16 )SKP_SAT16( SKP_RSHIFT_ROUND( 
                             SKP_SMULWW( psDD->Xq_Q10[ last_smple_idx ], 
                             psDD->Gain_Q16[ last_smple_idx ] ), 10 ) );
@@ -224,7 +235,7 @@
 
                 /* Rewhiten with new A coefs */
                 start_idx = psEncC->ltp_mem_length - lag - psEncC->predictLPCOrder - LTP_ORDER / 2;
-                start_idx = SKP_LIMIT_int( start_idx, 0, psEncC->ltp_mem_length - psEncC->predictLPCOrder );
+                SKP_assert( start_idx > 0 );
                 
                 SKP_memset( FiltState, 0, psEncC->predictLPCOrder * sizeof( SKP_int32 ) );
                 SKP_Silk_MA_Prediction( &NSQ->xq[ start_idx + k * psEncC->subfr_length ], 
@@ -235,12 +246,7 @@
             }
         }
 
-        /* Noise shape parameters */
-        SKP_assert( HarmShapeGain_Q14[ k ] >= 0 );
-        HarmShapeFIRPacked_Q14  =                          SKP_RSHIFT( HarmShapeGain_Q14[ k ], 2 );
-        HarmShapeFIRPacked_Q14 |= SKP_LSHIFT( ( SKP_int32 )SKP_RSHIFT( HarmShapeGain_Q14[ k ], 1 ), 16 );
-
-        SKP_Silk_nsq_del_dec_scale_states( NSQ, psDelDec, x, x_sc_Q10, 
+        SKP_Silk_nsq_del_dec_scale_states( psEncC, NSQ, psDelDec, x, x_sc_Q10, 
             subfr_length, sLTP, sLTP_Q16, k, psEncC->nStatesDelayedDecision, smpl_buf_idx,
             LTP_scale_Q14, Gains_Q16, psEncCtrlC->pitchL );
 
@@ -247,7 +253,7 @@
         SKP_Silk_noise_shape_quantizer_del_dec( NSQ, psDelDec, psEncCtrlC->sigtype, x_sc_Q10, q, pxq, sLTP_Q16,
             A_Q12, B_Q14, AR_shp_Q13, lag, HarmShapeFIRPacked_Q14, Tilt_Q14[ k ], LF_shp_Q14[ k ], Gains_Q16[ k ], 
             Lambda_Q10, offset_Q10, psEncC->subfr_length, subfr++, psEncC->shapingLPCOrder, psEncC->predictLPCOrder, 
-            psEncCtrlC->warping_Q16, psEncC->nStatesDelayedDecision, &smpl_buf_idx, decisionDelay );
+            psEncC->warping_Q16, psEncC->nStatesDelayedDecision, &smpl_buf_idx, decisionDelay );
         
         x   += psEncC->subfr_length;
         q   += psEncC->subfr_length;
@@ -280,8 +286,8 @@
     SKP_memcpy( NSQ->sAR2_Q14, psDD->sAR2_Q14, sizeof( psDD->sAR2_Q14 ) );
 
     /* Update states */
-    NSQ->sLF_AR_shp_Q12    = psDD->LF_AR_Q12;
-    NSQ->lagPrev           = psEncCtrlC->pitchL[ psEncC->nb_subfr - 1 ];
+    NSQ->sLF_AR_shp_Q12 = psDD->LF_AR_Q12;
+    NSQ->lagPrev        = psEncCtrlC->pitchL[ psEncC->nb_subfr - 1 ];
 
     /* Save quantized speech and noise shaping signals */
     SKP_memmove( NSQ->xq,           &NSQ->xq[           psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( SKP_int16 ) );
@@ -289,7 +295,7 @@
 
 #ifdef SAVE_ALL_INTERNAL_DATA
     DEBUG_STORE_DATA( sLTP_Q16, &sLTP_Q16[ psEncC->frame_length ], psEncC->frame_length * sizeof( SKP_int32 ) );
-    DEBUG_STORE_DATA( xq.dat, &NSQ->xq[ psEncC->ltp_mem_length - psEncC->frame_length], psEncC->frame_length * sizeof( SKP_int16 ) );
+    DEBUG_STORE_DATA( xq.dat, NSQ->xq,                             psEncC->frame_length * sizeof( SKP_int16 ) );
 #endif
 }
 
@@ -595,12 +601,13 @@
 }
 
 SKP_INLINE void SKP_Silk_nsq_del_dec_scale_states(
+    SKP_Silk_encoder_state *psEncC,             /* I/O  Encoder State                       */
     SKP_Silk_nsq_state  *NSQ,                   /* I/O  NSQ state                           */
     NSQ_del_dec_struct  psDelDec[],             /* I/O  Delayed decision states             */
     const SKP_int16     x[],                    /* I    Input in Q0                         */
     SKP_int32           x_sc_Q10[],             /* O    Input scaled with 1/Gain in Q10     */
-    SKP_int             length,                 /* I    Length of input                     */
-    SKP_int16           sLTP[],                 /* I    Re-whitened LTP state in Q0         */
+    SKP_int             subfr_length,           /* I    Length of input                     */
+    const SKP_int16     sLTP[],                 /* I    Re-whitened LTP state in Q0         */
     SKP_int32           sLTP_Q16[],             /* O    LTP state matching scaled input     */
     SKP_int             subfr,                  /* I    Subframe number                     */
     SKP_int             nStatesDelayedDecision, /* I    Number of del dec states            */
@@ -610,7 +617,7 @@
     const SKP_int       pitchL[ MAX_NB_SUBFR ]      /* I    Pitch lag                           */
 )
 {
-    SKP_int            i, k, scale_length, lag;
+    SKP_int            i, k, lag;
     SKP_int32          inv_gain_Q16, gain_adj_Q16, inv_gain_Q32;
     NSQ_del_dec_struct *psDD;
 
@@ -617,7 +624,8 @@
     inv_gain_Q16 = SKP_INVERSE32_varQ( SKP_max( Gains_Q16[ subfr ], 1 ), 32 );
     inv_gain_Q16 = SKP_min( inv_gain_Q16, SKP_int16_MAX );
     lag          = pitchL[ subfr ];
-    /* After rewhitening the LTP state is un-scaled. So scale with inv_gain_Q16 */
+
+    /* After rewhitening the LTP state is un-scaled, so scale with inv_gain_Q16 */
     if( NSQ->rewhite_flag ) {
         inv_gain_Q32 = SKP_LSHIFT( inv_gain_Q16, 16 );
         if( subfr == 0 ) {
@@ -634,6 +642,18 @@
     if( inv_gain_Q16 != NSQ->prev_inv_gain_Q16 ) {
         gain_adj_Q16 = SKP_DIV32_varQ( inv_gain_Q16, NSQ->prev_inv_gain_Q16, 16 );
 
+        /* Scale long-term shaping state */
+        for( i = NSQ->sLTP_shp_buf_idx - subfr_length * psEncC->nb_subfr; i < NSQ->sLTP_shp_buf_idx; i++ ) {
+            NSQ->sLTP_shp_Q10[ i ] = SKP_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q10[ i ] );
+        }
+
+        /* Scale long-term prediction state */
+        if( NSQ->rewhite_flag == 0 ) {
+            for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) {
+                sLTP_Q16[ i ] = SKP_SMULWW( gain_adj_Q16, sLTP_Q16[ i ] );
+            }
+        }
+
         for( k = 0; k < nStatesDelayedDecision; k++ ) {
             psDD = &psDelDec[ k ];
             
@@ -640,9 +660,9 @@
             /* Scale scalar states */
             psDD->LF_AR_Q12 = SKP_SMULWW( gain_adj_Q16, psDD->LF_AR_Q12 );
             
-            /* scale short term state */
+	        /* Scale short-term prediction and shaping states */
             for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) {
-                psDD->sLPC_Q14[ NSQ_LPC_BUF_LENGTH - i - 1 ] = SKP_SMULWW( gain_adj_Q16, psDD->sLPC_Q14[ NSQ_LPC_BUF_LENGTH - i - 1 ] );
+                psDD->sLPC_Q14[ i ] = SKP_SMULWW( gain_adj_Q16, psDD->sLPC_Q14[ i ] );
             }
             for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) {
                 psDD->sAR2_Q14[ i ] = SKP_SMULWW( gain_adj_Q16, psDD->sAR2_Q14[ i ] );
@@ -652,28 +672,10 @@
                 psDD->Shape_Q10[ i ] = SKP_SMULWW( gain_adj_Q16, psDD->Shape_Q10[ i ] );
             }
         }
-
-        /* Scale long term shaping state */
-
-        /* Calculate length to be scaled, Worst case: Next frame is voiced with max lag */
-        scale_length = length * MAX_NB_SUBFR;                                               /* aprox max lag */
-        scale_length = scale_length - SKP_SMULBB( MAX_NB_SUBFR - ( subfr + 1 ), length );   /* subtract samples that will be too old in next frame */
-        scale_length = SKP_max_int( scale_length, lag + LTP_ORDER );                    /* make sure to scale whole pitch period if voiced */
-
-        for( i = NSQ->sLTP_shp_buf_idx - scale_length; i < NSQ->sLTP_shp_buf_idx; i++ ) {
-            NSQ->sLTP_shp_Q10[ i ] = SKP_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q10[ i ] );
-        }
-
-        /* Scale LTP predict state */
-        if( NSQ->rewhite_flag == 0 ) {
-            for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) {
-                sLTP_Q16[ i ] = SKP_SMULWW( gain_adj_Q16, sLTP_Q16[ i ] );
-            }
-        }
     }
 
     /* Scale input */
-    for( i = 0; i < length; i++ ) {
+    for( i = 0; i < subfr_length; i++ ) {
         x_sc_Q10[ i ] = SKP_RSHIFT( SKP_SMULBB( x[ i ], ( SKP_int16 )inv_gain_Q16 ), 6 );
     }
 
--- a/src_common/SKP_Silk_PLC.c
+++ b/src_common/SKP_Silk_PLC.c
@@ -157,7 +157,7 @@
     SKP_int16 *B_Q14, exc_buf[ MAX_FRAME_LENGTH ], *exc_buf_ptr;
     SKP_int16 rand_scale_Q14, A_Q12_tmp[ MAX_LPC_ORDER ];
     SKP_int32 rand_seed, harm_Gain_Q15, rand_Gain_Q15;
-    SKP_int   lag, idx, shift1, shift2;
+    SKP_int   lag, idx, sLTP_buf_idx, shift1, shift2;
     SKP_int32 energy1, energy2, *rand_ptr, *pred_lag_ptr;
     SKP_int32 sig_Q10[ MAX_FRAME_LENGTH ], *sig_Q10_ptr, LPC_exc_Q10, LPC_pred_Q10,  LTP_pred_Q14;
     SKP_Silk_PLC_struct *psPLC;
@@ -183,7 +183,7 @@
     SKP_Silk_sum_sqr_shift( &energy1, &shift1, exc_buf,                         psDec->subfr_length );
     SKP_Silk_sum_sqr_shift( &energy2, &shift2, &exc_buf[ psDec->subfr_length ], psDec->subfr_length );
         
-    if( SKP_RSHIFT( energy1, shift2 ) < SKP_RSHIFT( energy1, shift2 ) ) {
+    if( SKP_RSHIFT( energy1, shift2 ) < SKP_RSHIFT( energy2, shift1 ) ) {
         /* First sub-frame has lowest energy */
         rand_ptr = &psDec->exc_Q10[ SKP_max_int( 0, 3 * psDec->subfr_length - RAND_BUF_SIZE ) ];
     } else {
@@ -230,9 +230,9 @@
         }
     }
 
-    rand_seed           = psPLC->rand_seed;
-    lag                 = SKP_RSHIFT_ROUND( psPLC->pitchL_Q8, 8 );
-    psDec->sLTP_buf_idx = psDec->ltp_mem_length;
+    rand_seed    = psPLC->rand_seed;
+    lag          = SKP_RSHIFT_ROUND( psPLC->pitchL_Q8, 8 );
+    sLTP_buf_idx = psDec->ltp_mem_length;
 
     /***************************/
     /* LTP synthesis filtering */
@@ -240,7 +240,7 @@
     sig_Q10_ptr = sig_Q10;
     for( k = 0; k < psDec->nb_subfr; k++ ) {
         /* Setup pointer */
-        pred_lag_ptr = &psDec->sLTP_Q16[ psDec->sLTP_buf_idx - lag + LTP_ORDER / 2 ];
+        pred_lag_ptr = &psDec->sLTP_Q16[ sLTP_buf_idx - lag + LTP_ORDER / 2 ];
         for( i = 0; i < psDec->subfr_length; i++ ) {
             rand_seed = SKP_RAND( rand_seed );
             idx = SKP_RSHIFT( rand_seed, 25 ) & RAND_BUF_MASK;
@@ -258,8 +258,8 @@
             LPC_exc_Q10 = SKP_ADD32( LPC_exc_Q10, SKP_RSHIFT_ROUND( LTP_pred_Q14, 4 ) );  /* Harmonic part */
             
             /* Update states */
-            psDec->sLTP_Q16[ psDec->sLTP_buf_idx ] = SKP_LSHIFT( LPC_exc_Q10, 6 );
-            psDec->sLTP_buf_idx++;
+            psDec->sLTP_Q16[ sLTP_buf_idx ] = SKP_LSHIFT( LPC_exc_Q10, 6 );
+            sLTP_buf_idx++;
                 
             /* Save LPC residual */
             sig_Q10_ptr[ i ] = LPC_exc_Q10;
--- a/src_common/SKP_Silk_VAD.c
+++ b/src_common/SKP_Silk_VAD.c
@@ -25,11 +25,6 @@
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ***********************************************************************/
 
-/*
- * File Name:   SKP_Silk_VAD.c
- * Description: Silk VAD.
- */
-
 #include <stdlib.h>
 #include "SKP_Silk_main.h"
 
@@ -77,6 +72,7 @@
 SKP_int SKP_Silk_VAD_GetSA_Q8(                                  /* O    Return value, 0 if success      */
     SKP_Silk_VAD_state          *psSilk_VAD,                    /* I/O  Silk VAD state                  */
     SKP_int                     *pSA_Q8,                        /* O    Speech activity level in Q8     */
+    SKP_int                     *pSNR_dB_Q7,                    /* O    SNR for current frame in Q7     */
     SKP_int                     pQuality_Q15[ VAD_N_BANDS ],    /* O    Smoothed SNR for each band      */
     SKP_int                     *pTilt_Q15,                     /* O    current frame's frequency tilt  */
     const SKP_int16             pIn[],                          /* I    PCM input       [framelength]   */
@@ -88,7 +84,7 @@
     SKP_int32 scratch[ 3 * MAX_FRAME_LENGTH / 2 ];
     SKP_int   decimated_framelength, dec_subframe_length, dec_subframe_offset, SNR_Q7, i, b, s;
     SKP_int32 sumSquared, smooth_coef_Q16;
-    SKP_int16 HPstateTmp, SNR_dB_Q7;
+    SKP_int16 HPstateTmp;
 
     SKP_int16 X[ VAD_N_BANDS ][ MAX_FRAME_LENGTH / 2 ];
     SKP_int32 Xnrg[ VAD_N_BANDS ];
@@ -121,7 +117,6 @@
     /*********************************************/
     /* HP filter on lowest band (differentiator) */
     /*********************************************/
-    // y( n ) = 0.5 * x( n ) - 0.5 * x( n - 1 )
     decimated_framelength = SKP_RSHIFT( framelength, 3 );
     X[ 0 ][ decimated_framelength - 1 ] = SKP_RSHIFT( X[ 0 ][ decimated_framelength - 1 ], 1 );
     HPstateTmp = X[ 0 ][ decimated_framelength - 1 ];
@@ -212,12 +207,12 @@
     sumSquared = SKP_DIV32_16( sumSquared, VAD_N_BANDS ); /* Q14 */
 
     /* Root-mean-square approximation, scale to dBs, and write to output pointer */
-    SNR_dB_Q7 = ( SKP_int16 )( 3 * SKP_Silk_SQRT_APPROX( sumSquared ) ); /* Q7 */
+    *pSNR_dB_Q7 = ( SKP_int16 )( 3 * SKP_Silk_SQRT_APPROX( sumSquared ) ); /* Q7 */
 
     /*********************************/
     /* Speech Probability Estimation */
     /*********************************/
-    SA_Q15 = SKP_Silk_sigm_Q15( SKP_SMULWB( VAD_SNR_FACTOR_Q16, SNR_dB_Q7 ) - VAD_NEGATIVE_OFFSET_Q5 );
+    SA_Q15 = SKP_Silk_sigm_Q15( SKP_SMULWB( VAD_SNR_FACTOR_Q16, *pSNR_dB_Q7 ) - VAD_NEGATIVE_OFFSET_Q5 );
 
     /**************************/
     /* Frequency Tilt Measure */
--- a/src_common/SKP_Silk_code_signs.c
+++ b/src_common/SKP_Silk_code_signs.c
@@ -36,11 +36,11 @@
 /* Encodes signs of excitation */
 void SKP_Silk_encode_signs(
     ec_enc                      *psRangeEnc,        /* I/O  Compressor data structure                   */
-    const SKP_int8              q[],                /* I    pulse signal                                */
-    const SKP_int               length,             /* I    length of input                             */
+    const SKP_int8              q[],                /* I    Pulse signal                                */
+    const SKP_int               length,             /* I    Length of input                             */
     const SKP_int               sigtype,            /* I    Signal type                                 */
     const SKP_int               QuantOffsetType,    /* I    Quantization offset type                    */
-    const SKP_int               RateLevelIndex      /* I    Rate Level Index                            */
+    const SKP_int               RateLevelIndex      /* I    Rate level index                            */
 )
 {
     SKP_int i;
--- /dev/null
+++ b/src_common/SKP_Silk_control_audio_bandwidth.c
@@ -1,0 +1,137 @@
+/***********************************************************************
+Copyright (c) 2006-2010, Skype Limited. All rights reserved. 
+Redistribution and use in source and binary forms, with or without 
+modification, (subject to the limitations in the disclaimer below) 
+are permitted provided that the following conditions are met:
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright 
+notice, this list of conditions and the following disclaimer in the 
+documentation and/or other materials provided with the distribution.
+- Neither the name of Skype Limited, nor the names of specific 
+contributors, may be used to endorse or promote products derived from 
+this software without specific prior written permission.
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED 
+BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+***********************************************************************/
+
+#include "SKP_Silk_main.h"
+
+/* Control internal sampling rate */
+SKP_int SKP_Silk_control_audio_bandwidth(
+    SKP_Silk_encoder_state      *psEncC,            /* I/O  Pointer to Silk encoder state               */
+    const SKP_int32             TargetRate_bps      /* I    Target max bitrate (bps)                    */
+)
+{
+    SKP_int fs_kHz;
+
+    fs_kHz = psEncC->fs_kHz;
+    if( fs_kHz == 0 ) {
+        /* Encoder has just been initialized */
+        if( TargetRate_bps >= SWB2WB_BITRATE_BPS ) {
+            fs_kHz = 24;
+        } else if( TargetRate_bps >= WB2MB_BITRATE_BPS ) {
+            fs_kHz = 16;
+        } else if( TargetRate_bps >= MB2NB_BITRATE_BPS ) {
+            fs_kHz = 12;
+        } else {
+            fs_kHz = 8;
+        }
+        /* Make sure internal rate is not higher than external rate or maximum allowed, or lower than minimum allowed */
+        fs_kHz = SKP_min( fs_kHz, SKP_DIV32_16( psEncC->API_fs_Hz, 1000 ) );
+        fs_kHz = SKP_min( fs_kHz, psEncC->maxInternal_fs_kHz );
+        fs_kHz = SKP_max( fs_kHz, psEncC->minInternal_fs_kHz );
+    } else if( SKP_SMULBB( fs_kHz, 1000 ) > psEncC->API_fs_Hz || fs_kHz > psEncC->maxInternal_fs_kHz || fs_kHz < psEncC->minInternal_fs_kHz ) {
+        /* Make sure internal rate is not higher than external rate or maximum allowed, or lower than minimum allowed */
+        fs_kHz = SKP_DIV32_16( psEncC->API_fs_Hz, 1000 );
+        fs_kHz = SKP_min( fs_kHz, psEncC->maxInternal_fs_kHz );
+        fs_kHz = SKP_max( fs_kHz, psEncC->minInternal_fs_kHz );
+    } else {
+        /* State machine for the internal sampling rate switching */
+        if( psEncC->API_fs_Hz > 8000 ) {
+            /* Accumulate the difference between the target rate and limit for switching down */
+            psEncC->bitrateDiff += SKP_MUL( psEncC->PacketSize_ms, psEncC->TargetRate_bps - psEncC->bitrate_threshold_down );
+            psEncC->bitrateDiff  = SKP_min( psEncC->bitrateDiff, 0 );
+
+            if( psEncC->vadFlag == NO_VOICE_ACTIVITY ) { /* Low speech activity */
+                /* Check if we should switch down */
+#if SWITCH_TRANSITION_FILTERING 
+                if( ( psEncC->sLP.transition_frame_no == 0 ) &&                         /* Transition phase not active */
+                    ( psEncC->bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ||              /* Bitrate threshold is met */
+                    ( psEncC->sSWBdetect.WB_detected * psEncC->fs_kHz == 24 ) ) ) {     /* Forced down-switching due to WB input */
+                        psEncC->sLP.transition_frame_no = 1;                            /* Begin transition phase */
+                        psEncC->sLP.mode                = 0;                            /* Switch down */
+                } else if( 
+                    ( psEncC->sLP.transition_frame_no >= TRANSITION_FRAMES_DOWN ) &&    /* Transition phase complete */
+                    ( psEncC->sLP.mode == 0 ) ) {                                       /* Ready to switch down */
+                        psEncC->sLP.transition_frame_no = 0;                            /* Ready for new transition phase */
+#else
+                if( psEncC->bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ) {               /* Bitrate threshold is met */ 
+#endif            
+                    psEncC->bitrateDiff = 0;
+
+                    /* Switch to a lower sample frequency */
+                    if( psEncC->fs_kHz == 24 ) {
+                        fs_kHz = 16;
+                    } else if( psEncC->fs_kHz == 16 ) {
+                        fs_kHz = 12;
+                    } else {
+                        SKP_assert( psEncC->fs_kHz == 12 );
+                        fs_kHz = 8;
+                    }
+                }
+
+                /* Check if we should switch up */
+                if( ( ( psEncC->fs_kHz * 1000 < psEncC->API_fs_Hz ) &&
+                    ( psEncC->TargetRate_bps >= psEncC->bitrate_threshold_up ) && 
+                    ( psEncC->sSWBdetect.WB_detected * psEncC->fs_kHz < 16 ) ) && 
+                    ( ( psEncC->fs_kHz == 16 ) && ( psEncC->maxInternal_fs_kHz >= 24 ) || 
+                    ( psEncC->fs_kHz == 12 ) && ( psEncC->maxInternal_fs_kHz >= 16 ) ||
+                    ( psEncC->fs_kHz ==  8 ) && ( psEncC->maxInternal_fs_kHz >= 12 ) ) 
+#if SWITCH_TRANSITION_FILTERING
+                    && ( psEncC->sLP.transition_frame_no == 0 ) ) { /* No transition phase running, ready to switch */
+                        psEncC->sLP.mode = 1; /* Switch up */
+#else
+                    ) {
+#endif
+                        psEncC->bitrateDiff = 0;
+
+                        /* Switch to a higher sample frequency */
+                        if( psEncC->fs_kHz == 8 ) {
+                            fs_kHz = 12;
+                        } else if( psEncC->fs_kHz == 12 ) {
+                            fs_kHz = 16;
+                        } else {
+                            SKP_assert( psEncC->fs_kHz == 16 );
+                            fs_kHz = 24;
+                        }
+                }
+            }
+        }
+
+#if SWITCH_TRANSITION_FILTERING
+        /* After switching up, stop transition filter during speech inactivity */
+        if( ( psEncC->sLP.mode == 1 ) &&
+            ( psEncC->sLP.transition_frame_no >= TRANSITION_FRAMES_UP ) && 
+            ( psEncC->vadFlag == NO_VOICE_ACTIVITY ) ) {
+
+                psEncC->sLP.transition_frame_no = 0;
+
+                /* Reset transition filter state */
+                SKP_memset( psEncC->sLP.In_LP_State, 0, 2 * sizeof( SKP_int32 ) );
+        }
+#endif
+    }
+
+    return fs_kHz;
+}
--- a/src_common/SKP_Silk_create_init_destroy.c
+++ b/src_common/SKP_Silk_create_init_destroy.c
@@ -39,7 +39,8 @@
     SKP_memset( psDec, 0, sizeof( SKP_Silk_decoder_state ) );
 
     /* Set sampling rate to 24 kHz, and init non-zero values */
-    SKP_Silk_decoder_set_fs( psDec, 24, MAX_NB_SUBFR );
+    psDec->nb_subfr = MAX_NB_SUBFR;
+    SKP_Silk_decoder_set_fs( psDec, 24 );
 
     /* Used to deactivate e.g. LSF interpolation and fluctuation reduction */
     psDec->first_frame_after_reset = 1;
--- /dev/null
+++ b/src_common/SKP_Silk_dec_API.c
@@ -1,0 +1,282 @@
+/***********************************************************************
+Copyright (c) 2006-2010, Skype Limited. All rights reserved. 
+Redistribution and use in source and binary forms, with or without 
+modification, (subject to the limitations in the disclaimer below) 
+are permitted provided that the following conditions are met:
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright 
+notice, this list of conditions and the following disclaimer in the 
+documentation and/or other materials provided with the distribution.
+- Neither the name of Skype Limited, nor the names of specific 
+contributors, may be used to endorse or promote products derived from 
+this software without specific prior written permission.
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED 
+BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+***********************************************************************/
+
+#include "SKP_Silk_SDK_API.h"
+#include "SKP_Silk_main.h"
+
+/*********************/
+/* Decoder functions */
+/*********************/
+
+SKP_int SKP_Silk_SDK_Get_Decoder_Size( SKP_int32 *decSizeBytes ) 
+{
+    SKP_int ret = SKP_SILK_NO_ERROR;
+
+    *decSizeBytes = sizeof( SKP_Silk_decoder_state );
+
+    return ret;
+}
+
+/* Reset decoder state */
+SKP_int SKP_Silk_SDK_InitDecoder(
+    void* decState                                      /* I/O: State                                          */
+)
+{
+    SKP_int ret = SKP_SILK_NO_ERROR;
+    SKP_Silk_decoder_state *struc;
+
+    struc = (SKP_Silk_decoder_state *)decState;
+
+    ret  = SKP_Silk_init_decoder( struc );
+
+    return ret;
+}
+
+/* Decode a frame */
+SKP_int SKP_Silk_SDK_Decode(
+    void*                               decState,       /* I/O: State                                           */
+    SKP_SILK_SDK_DecControlStruct*      decControl,     /* I/O: Control Structure                               */
+    SKP_int                             lostFlag,       /* I:   0: no loss, 1 loss                              */
+    ec_dec                              *psRangeDec,    /* I/O  Compressor data structure                       */
+    const SKP_int                       nBytesIn,       /* I:   Number of input bytes                           */
+    SKP_int16                           *samplesOut,    /* O:   Decoded output speech vector                    */
+    SKP_int32                           *nSamplesOut    /* I/O: Number of samples (vector/decoded)              */
+)
+{
+    SKP_int ret = SKP_SILK_NO_ERROR, used_bytes, prev_fs_kHz;
+    SKP_Silk_decoder_state *psDec;
+
+    psDec = (SKP_Silk_decoder_state *)decState;
+
+    /**********************************/
+    /* Test if first frame in payload */
+    /**********************************/
+    if( psDec->moreInternalDecoderFrames == 0 ) {
+        /* First Frame in Payload */
+        psDec->nFramesDecoded = 0;  /* Used to count frames in packet */
+    }
+
+    if( psDec->moreInternalDecoderFrames == 0 &&    /* First frame in packet    */
+        lostFlag == 0 &&                            /* Not packet loss          */
+        nBytesIn > MAX_ARITHM_BYTES ) {             /* Too long payload         */
+            /* Avoid trying to decode a too large packet */
+            lostFlag = 1;
+            return SKP_SILK_DEC_PAYLOAD_TOO_LARGE;
+    }
+            
+    /* Save previous sample frequency */
+    prev_fs_kHz = psDec->fs_kHz;
+
+    if( psDec->nFramesDecoded == 0 ) {
+        SKP_int fs_kHz_dec;
+        if( decControl->payloadSize_ms == 10 ) {
+            psDec->nFramesInPacket = 1;
+            psDec->nb_subfr = 2;
+        } else if( decControl->payloadSize_ms == 20 ) {
+            psDec->nFramesInPacket = 1;
+            psDec->nb_subfr = 4;
+        } else if( decControl->payloadSize_ms == 40 ) {
+            psDec->nFramesInPacket = 2;
+            psDec->nb_subfr = 4;
+        } else if( decControl->payloadSize_ms == 60 ) {
+            psDec->nFramesInPacket = 3;
+            psDec->nb_subfr = 4;
+        } else {
+            SKP_assert( 0 );
+            return SKP_SILK_DEC_INVALID_FRAME_SIZE;
+        } 
+        fs_kHz_dec = ( decControl->internalSampleRate >> 10 ) + 1;
+        if( fs_kHz_dec != 8 && fs_kHz_dec != 12 && fs_kHz_dec != 16 && fs_kHz_dec != 24 ) {
+            SKP_assert( 0 );
+            return SKP_SILK_DEC_INVALID_SAMPLING_FREQUENCY;
+        }
+        SKP_Silk_decoder_set_fs( psDec, fs_kHz_dec );
+    }
+    
+    /* Call decoder for one frame */
+    ret += SKP_Silk_decode_frame( psDec, psRangeDec, samplesOut, nSamplesOut, nBytesIn, lostFlag, &used_bytes );
+    
+    if( used_bytes ) { /* Only Call if not a packet loss */
+
+        psDec->moreInternalDecoderFrames = psDec->nFramesInPacket - psDec->nFramesDecoded;
+        if( psDec->nBytesLeft <= 0 || psDec->moreInternalDecoderFrames <= 0 ) {
+            /* Last frame in Payload */
+        
+            /* Track inband FEC usage */
+            if( psDec->vadFlag == VOICE_ACTIVITY ) {
+                if( psDec->FrameTermination == SKP_SILK_NO_LBRR ) {
+                    psDec->no_FEC_counter++;
+                    if( psDec->no_FEC_counter > NO_LBRR_THRES ) {
+                        psDec->inband_FEC_offset = 0;
+                    }
+                } else if( psDec->FrameTermination == SKP_SILK_LBRR ) {
+                    psDec->inband_FEC_offset = 1; /* FEC info with 1 packet delay */
+                    psDec->no_FEC_counter    = 0;
+                }
+            }
+        }
+    }
+
+    if( MAX_API_FS_KHZ * 1000 < decControl->API_sampleRate ||
+        8000       > decControl->API_sampleRate ) {
+        ret = SKP_SILK_DEC_INVALID_SAMPLING_FREQUENCY;
+        return( ret );
+    }
+
+    /* Resample if needed */
+    if( psDec->fs_kHz * 1000 != decControl->API_sampleRate ) { 
+        SKP_int16 samplesOut_tmp[ MAX_API_FS_KHZ * MAX_FRAME_LENGTH_MS ];
+        SKP_assert( psDec->fs_kHz <= MAX_API_FS_KHZ );
+
+        /* Copy to a tmp buffer as the resampling writes to samplesOut */
+        SKP_memcpy( samplesOut_tmp, samplesOut, *nSamplesOut * sizeof( SKP_int16 ) );
+
+        /* (Re-)initialize resampler state when switching internal sampling frequency */
+        if( prev_fs_kHz != psDec->fs_kHz || psDec->prev_API_sampleRate != decControl->API_sampleRate ) {
+            ret = SKP_Silk_resampler_init( &psDec->resampler_state, SKP_SMULBB( psDec->fs_kHz, 1000 ), decControl->API_sampleRate );
+        }
+
+        /* Resample the output to API_sampleRate */
+        ret += SKP_Silk_resampler( &psDec->resampler_state, samplesOut, samplesOut_tmp, *nSamplesOut );
+
+        /* Update the number of output samples */
+        *nSamplesOut = SKP_DIV32( ( SKP_int32 )*nSamplesOut * decControl->API_sampleRate, psDec->fs_kHz * 1000 );
+    }
+
+    psDec->prev_API_sampleRate = decControl->API_sampleRate;
+
+    /* Copy all parameters that are needed out of internal structure to the control stucture */
+    decControl->frameSize                 = ( SKP_int )psDec->frame_length;
+    decControl->framesPerPayload          = ( SKP_int )psDec->nFramesInPacket;
+    decControl->inBandFECOffset           = ( SKP_int )psDec->inband_FEC_offset;
+    decControl->moreInternalDecoderFrames = ( SKP_int )psDec->moreInternalDecoderFrames;
+
+    return ret;
+}
+
+#if 0
+/* Function to find LBRR information in a packet */
+void SKP_Silk_SDK_search_for_LBRR(
+    const SKP_uint8                     *inData,        /* I:   Encoded input vector                            */
+    const SKP_int16                     nBytesIn,       /* I:   Number of input Bytes                           */
+    SKP_int                             lost_offset,    /* I:   Offset from lost packet                         */
+    SKP_uint8                           *LBRRData,      /* O:   LBRR payload                                    */
+    SKP_int16                           *nLBRRBytes     /* O:   Number of LBRR Bytes                            */
+)
+{
+    SKP_int ret = SKP_SILK_NO_ERROR;
+    SKP_Silk_decoder_state   sDec; // Local decoder state to avoid interfering with running decoder */
+    SKP_Silk_decoder_control sDecCtrl;
+    SKP_int i, TempQ[ MAX_FRAME_LENGTH ];
+
+    if( lost_offset < 1 || lost_offset > MAX_LBRR_DELAY ) {
+        /* No useful FEC in this packet */
+        *nLBRRBytes = 0;
+        return;
+    }
+
+    sDec.nFramesDecoded = 0;
+    sDec.fs_kHz         = 0; /* Force update parameters LPC_order etc */
+    SKP_memset( sDec.prevNLSF_Q15, 0, MAX_LPC_ORDER * sizeof( SKP_int ) );
+
+    /* Decode all parameter indices for the whole packet*/
+    SKP_Silk_decode_indices( &sDec, psRangeDec );
+
+    /* Is there usable LBRR in this packet */
+    *nLBRRBytes = 0;
+    if( ( sDec.FrameTermination - 1 ) & lost_offset && sDec.FrameTermination > 0 && sDec.nBytesLeft >= 0 ) {
+        /* The wanted FEC is present in the packet */
+        for( i = 0; i < sDec.nFramesInPacket; i++ ) {
+            SKP_Silk_decode_parameters( &sDec, &sDecCtrl, psRangeDec, TempQ, 0 );
+            
+            if( sDec.nBytesLeft <= 0 || sDec.sRC.error ) {
+                /* Corrupt stream */
+                LBRRData = NULL;
+                *nLBRRBytes = 0;
+                break;
+            } else {
+                sDec.nFramesDecoded++;
+            }
+        }
+    
+        if( LBRRData != NULL ) {
+            /* The wanted FEC is present in the packet */
+            *nLBRRBytes = sDec.nBytesLeft;
+            SKP_memcpy( LBRRData, &inData[ nBytesIn - sDec.nBytesLeft ], sDec.nBytesLeft * sizeof( SKP_uint8 ) );
+        }
+    }
+}
+#endif
+
+#if 0  // todo: clean up, make efficient
+/* Getting type of content for a packet */
+void SKP_Silk_SDK_get_TOC(
+    ec_dec                              *psRangeDec,    /* I/O  Compressor data structure                   */
+    const SKP_int16                     nBytesIn,       /* I:   Number of input bytes                           */
+    SKP_Silk_TOC_struct                 *Silk_TOC       /* O:   Type of content                                 */
+)
+{
+    SKP_Silk_decoder_state      sDec; // Local Decoder state to avoid interfering with running decoder */
+    SKP_int i, ret = SKP_SILK_NO_ERROR;
+
+    sDec.nFramesDecoded = 0;
+    sDec.fs_kHz         = 0; /* Force update parameters LPC_order etc */
+
+    /* Decode all parameter indices for the whole packet*/
+    SKP_Silk_decode_indices( &sDec );
+    
+    if( sDec.sRC.error ) {
+        /* Corrupt packet */
+        SKP_memset( Silk_TOC, 0, sizeof( SKP_Silk_TOC_struct ) );
+        Silk_TOC->corrupt = 1;
+    } else {
+        Silk_TOC->corrupt = 0;
+        Silk_TOC->framesInPacket = sDec.nFramesInPacket;
+        Silk_TOC->fs_kHz         = sDec.fs_kHz;
+        if( sDec.FrameTermination == SKP_SILK_LAST_FRAME ) {
+            Silk_TOC->inbandLBRR = sDec.FrameTermination;
+        } else {
+            Silk_TOC->inbandLBRR = sDec.FrameTermination - 1;
+        }
+        /* Copy data */
+        for( i = 0; i < sDec.nFramesInPacket; i++ ) {
+            Silk_TOC->vadFlags[ i ]     = sDec.vadFlagBuf[ i ];
+            Silk_TOC->sigtypeFlags[ i ] = sDec.sigtype[ i ];
+        }
+    }
+}
+#endif
+
+/**************************/
+/* Get the version number */
+/**************************/
+/* Return a pointer to string specifying the version */ 
+const char *SKP_Silk_SDK_get_version()
+{
+    static const char version[] = "1.0.4";
+    return version;
+}
\ No newline at end of file
--- a/src_common/SKP_Silk_dec_SDK_API.c
+++ /dev/null
@@ -1,235 +1,0 @@
-#include "SKP_Silk_SDK_API.h"
-#include "SKP_Silk_main.h"
-
-/*********************/
-/* Decoder functions */
-/*********************/
-
-SKP_int SKP_Silk_SDK_Get_Decoder_Size( SKP_int32 *decSizeBytes ) 
-{
-    SKP_int ret = SKP_SILK_NO_ERROR;
-
-    *decSizeBytes = sizeof( SKP_Silk_decoder_state );
-
-    return ret;
-}
-
-/* Reset decoder state */
-SKP_int SKP_Silk_SDK_InitDecoder(
-    void* decState                                      /* I/O: State                                          */
-)
-{
-    SKP_int ret = SKP_SILK_NO_ERROR;
-    SKP_Silk_decoder_state *struc;
-
-    struc = (SKP_Silk_decoder_state *)decState;
-
-    ret  = SKP_Silk_init_decoder( struc );
-
-    return ret;
-}
-
-/* Decode a frame */
-SKP_int SKP_Silk_SDK_Decode(
-    void*                               decState,       /* I/O: State                                           */
-    SKP_SILK_SDK_DecControlStruct*      decControl,     /* I/O: Control Structure                               */
-    SKP_int                             lostFlag,       /* I:   0: no loss, 1 loss                              */
-    ec_dec                              *psRangeDec,    /* I/O  Compressor data structure                       */
-    const SKP_int                       nBytesIn,       /* I:   Number of input bytes                           */
-    SKP_int16                           *samplesOut,    /* O:   Decoded output speech vector                    */
-    SKP_int16                           *nSamplesOut    /* I/O: Number of samples (vector/decoded)              */
-)
-{
-    SKP_int ret = SKP_SILK_NO_ERROR, used_bytes, prev_fs_kHz;
-    SKP_Silk_decoder_state *psDec;
-
-    psDec = (SKP_Silk_decoder_state *)decState;
-
-    /**********************************/
-    /* Test if first frame in payload */
-    /**********************************/
-    if( psDec->moreInternalDecoderFrames == 0 ) {
-        /* First Frame in Payload */
-        psDec->nFramesDecoded = 0;  /* Used to count frames in packet */
-    }
-
-    if( psDec->moreInternalDecoderFrames == 0 &&    /* First frame in packet    */
-        lostFlag == 0 &&                            /* Not packet loss          */
-        nBytesIn > MAX_ARITHM_BYTES ) {             /* Too long payload         */
-            /* Avoid trying to decode a too large packet */
-            lostFlag = 1;
-            ret = SKP_SILK_DEC_PAYLOAD_TOO_LARGE;
-    }
-            
-    /* Save previous sample frequency */
-    prev_fs_kHz = psDec->fs_kHz;
-    
-    /* Call decoder for one frame */
-    ret += SKP_Silk_decode_frame( psDec, psRangeDec, samplesOut, nSamplesOut, nBytesIn, lostFlag, &used_bytes );
-    
-    if( used_bytes ) { /* Only Call if not a packet loss */
-        if( psDec->nBytesLeft > 0 && psDec->FrameTermination == SKP_SILK_MORE_FRAMES && psDec->nFramesDecoded < 5 ) {
-            /* We have more frames in the Payload */
-            psDec->moreInternalDecoderFrames = 1;
-        } else {
-            /* Last frame in Payload */
-            psDec->moreInternalDecoderFrames = 0;
-            psDec->nFramesInPacket = psDec->nFramesDecoded;
-        
-            /* Track inband FEC usage */
-            if( psDec->vadFlag == VOICE_ACTIVITY ) {
-                if( psDec->FrameTermination == SKP_SILK_LAST_FRAME ) {
-                    psDec->no_FEC_counter++;
-                    if( psDec->no_FEC_counter > NO_LBRR_THRES ) {
-                        psDec->inband_FEC_offset = 0;
-                    }
-                } else if( psDec->FrameTermination == SKP_SILK_LBRR_VER1 ) {
-                    psDec->inband_FEC_offset = 1; /* FEC info with 1 packet delay */
-                    psDec->no_FEC_counter    = 0;
-                } else if( psDec->FrameTermination == SKP_SILK_LBRR_VER2 ) {
-                    psDec->inband_FEC_offset = 2; /* FEC info with 2 packets delay */
-                    psDec->no_FEC_counter    = 0;
-                }
-            }
-        }
-    }
-
-    if( MAX_API_FS_KHZ * 1000 < decControl->API_sampleRate ||
-        8000       > decControl->API_sampleRate ) {
-        ret = SKP_SILK_DEC_INVALID_SAMPLING_FREQUENCY;
-        return( ret );
-    }
-
-    /* Resample if needed */
-    if( psDec->fs_kHz * 1000 != decControl->API_sampleRate ) { 
-        SKP_int16 samplesOut_tmp[ MAX_API_FS_KHZ * MAX_FRAME_LENGTH_MS ];
-        SKP_assert( psDec->fs_kHz <= MAX_API_FS_KHZ );
-
-        /* Copy to a tmp buffer as the resampling writes to samplesOut */
-        SKP_memcpy( samplesOut_tmp, samplesOut, *nSamplesOut * sizeof( SKP_int16 ) );
-
-        /* (Re-)initialize resampler state when switching internal sampling frequency */
-        if( prev_fs_kHz != psDec->fs_kHz || psDec->prev_API_sampleRate != decControl->API_sampleRate ) {
-            ret = SKP_Silk_resampler_init( &psDec->resampler_state, SKP_SMULBB( psDec->fs_kHz, 1000 ), decControl->API_sampleRate );
-        }
-
-        /* Resample the output to API_sampleRate */
-        ret += SKP_Silk_resampler( &psDec->resampler_state, samplesOut, samplesOut_tmp, *nSamplesOut );
-
-        /* Update the number of output samples */
-        *nSamplesOut = SKP_DIV32( ( SKP_int32 )*nSamplesOut * decControl->API_sampleRate, psDec->fs_kHz * 1000 );
-    }
-
-    psDec->prev_API_sampleRate = decControl->API_sampleRate;
-
-    /* Copy all parameters that are needed out of internal structure to the control stucture */
-    decControl->frameSize                 = ( SKP_int )psDec->frame_length;
-    decControl->framesPerPacket           = ( SKP_int )psDec->nFramesInPacket;
-    decControl->inBandFECOffset           = ( SKP_int )psDec->inband_FEC_offset;
-    decControl->moreInternalDecoderFrames = ( SKP_int )psDec->moreInternalDecoderFrames;
-
-    return ret;
-}
-
-#if 0
-/* Function to find LBRR information in a packet */
-void SKP_Silk_SDK_search_for_LBRR(
-    const SKP_uint8                     *inData,        /* I:   Encoded input vector                            */
-    const SKP_int16                     nBytesIn,       /* I:   Number of input Bytes                           */
-    SKP_int                             lost_offset,    /* I:   Offset from lost packet                         */
-    SKP_uint8                           *LBRRData,      /* O:   LBRR payload                                    */
-    SKP_int16                           *nLBRRBytes     /* O:   Number of LBRR Bytes                            */
-)
-{
-    SKP_int ret = SKP_SILK_NO_ERROR;
-    SKP_Silk_decoder_state   sDec; // Local decoder state to avoid interfering with running decoder */
-    SKP_Silk_decoder_control sDecCtrl;
-    SKP_int i, TempQ[ MAX_FRAME_LENGTH ];
-
-    if( lost_offset < 1 || lost_offset > MAX_LBRR_DELAY ) {
-        /* No useful FEC in this packet */
-        *nLBRRBytes = 0;
-        return;
-    }
-
-    sDec.nFramesDecoded = 0;
-    sDec.fs_kHz         = 0; /* Force update parameters LPC_order etc */
-    SKP_memset( sDec.prevNLSF_Q15, 0, MAX_LPC_ORDER * sizeof( SKP_int ) );
-
-    /* Decode all parameter indices for the whole packet*/
-    SKP_Silk_decode_indices( &sDec, psRangeDec );
-
-    /* Is there usable LBRR in this packet */
-    *nLBRRBytes = 0;
-    if( ( sDec.FrameTermination - 1 ) & lost_offset && sDec.FrameTermination > 0 && sDec.nBytesLeft >= 0 ) {
-        /* The wanted FEC is present in the packet */
-        for( i = 0; i < sDec.nFramesInPacket; i++ ) {
-            SKP_Silk_decode_parameters( &sDec, &sDecCtrl, psRangeDec, TempQ, 0 );
-            
-            if( sDec.nBytesLeft <= 0 || sDec.sRC.error ) {
-                /* Corrupt stream */
-                LBRRData = NULL;
-                *nLBRRBytes = 0;
-                break;
-            } else {
-                sDec.nFramesDecoded++;
-            }
-        }
-    
-        if( LBRRData != NULL ) {
-            /* The wanted FEC is present in the packet */
-            *nLBRRBytes = sDec.nBytesLeft;
-            SKP_memcpy( LBRRData, &inData[ nBytesIn - sDec.nBytesLeft ], sDec.nBytesLeft * sizeof( SKP_uint8 ) );
-        }
-    }
-}
-#endif
-
-#if 0  // todo: clean up, make efficient
-/* Getting type of content for a packet */
-void SKP_Silk_SDK_get_TOC(
-    ec_dec                              *psRangeDec,    /* I/O  Compressor data structure                   */
-    const SKP_int16                     nBytesIn,       /* I:   Number of input bytes                           */
-    SKP_Silk_TOC_struct                 *Silk_TOC       /* O:   Type of content                                 */
-)
-{
-    SKP_Silk_decoder_state      sDec; // Local Decoder state to avoid interfering with running decoder */
-    SKP_int i, ret = SKP_SILK_NO_ERROR;
-
-    sDec.nFramesDecoded = 0;
-    sDec.fs_kHz         = 0; /* Force update parameters LPC_order etc */
-
-    /* Decode all parameter indices for the whole packet*/
-    SKP_Silk_decode_indices( &sDec );
-    
-    if( sDec.nFramesInPacket > SILK_MAX_FRAMES_PER_PACKET || sDec.sRC.error ) {
-        /* Corrupt packet */
-        SKP_memset( Silk_TOC, 0, sizeof( SKP_Silk_TOC_struct ) );
-        Silk_TOC->corrupt = 1;
-    } else {
-        Silk_TOC->corrupt = 0;
-        Silk_TOC->framesInPacket = sDec.nFramesInPacket;
-        Silk_TOC->fs_kHz         = sDec.fs_kHz;
-        if( sDec.FrameTermination == SKP_SILK_LAST_FRAME ) {
-            Silk_TOC->inbandLBRR = sDec.FrameTermination;
-        } else {
-            Silk_TOC->inbandLBRR = sDec.FrameTermination - 1;
-        }
-        /* Copy data */
-        for( i = 0; i < sDec.nFramesInPacket; i++ ) {
-            Silk_TOC->vadFlags[ i ]     = sDec.vadFlagBuf[ i ];
-            Silk_TOC->sigtypeFlags[ i ] = sDec.sigtype[ i ];
-        }
-    }
-}
-#endif
-
-/**************************/
-/* Get the version number */
-/**************************/
-/* Return a pointer to string specifying the version */ 
-const char *SKP_Silk_SDK_get_version()
-{
-    static const char version[] = "1.0.4";
-    return version;
-}
\ No newline at end of file
--- a/src_common/SKP_Silk_decode_core.c
+++ b/src_common/SKP_Silk_decode_core.c
@@ -37,14 +37,14 @@
     const SKP_int               q[ MAX_FRAME_LENGTH ]               /* I    Pulse signal                */
 )
 {
-    SKP_int     i, k, lag = 0, start_idx, NLSF_interpolation_flag, sigtype, LTP_scale_Q14;
-    SKP_int16   *A_Q12, *B_Q14, *pxq, A_Q12_tmp[ MAX_LPC_ORDER ];
-    SKP_int16   sLTP[ MAX_FRAME_LENGTH ];
-    SKP_int32   Gain_Q16, *pred_lag_ptr, *pexc_Q10, *pres_Q10, LTP_pred_Q14, LPC_pred_Q10;
-    SKP_int32   rand_seed, offset_Q10, dither;
-    SKP_int32   vec_Q10[ MAX_SUB_FRAME_LENGTH ];
-    SKP_int32   inv_gain_Q16, inv_gain_Q32, gain_adj_Q16, FiltState[ MAX_LPC_ORDER ];
-    SKP_int     j;
+    SKP_int   i, k, lag = 0, start_idx, sLTP_buf_idx, NLSF_interpolation_flag, sigtype, LTP_scale_Q14;
+    SKP_int16 *A_Q12, *B_Q14, *pxq, A_Q12_tmp[ MAX_LPC_ORDER ];
+    SKP_int16 sLTP[ MAX_FRAME_LENGTH ];
+    SKP_int32 LTP_pred_Q14, LPC_pred_Q10, Gain_Q16, inv_gain_Q16, inv_gain_Q32, gain_adj_Q16, rand_seed, offset_Q10, dither;
+    SKP_int32 *pred_lag_ptr, *pexc_Q10, *pres_Q10;
+    SKP_int32 vec_Q10[ MAX_SUB_FRAME_LENGTH ];
+    SKP_int32 FiltState[ MAX_LPC_ORDER ];
+    SKP_int   j;
 
     SKP_assert( psDec->prev_inv_gain_Q16 != 0 );
     
@@ -57,7 +57,7 @@
     }
 
 #ifdef SAVE_ALL_INTERNAL_DATA
-    DEBUG_STORE_DATA( q_dec.dat, q, psDec->frame_length * sizeof( SKP_int ));
+    DEBUG_STORE_DATA( q_dec.dat, q, psDec->frame_length * sizeof( SKP_int ) );
 #endif
 
     /* Decode excitation */
@@ -82,7 +82,7 @@
     pexc_Q10 = psDec->exc_Q10;
     pres_Q10 = psDec->res_Q10;
     pxq      = &psDec->outBuf[ psDec->ltp_mem_length ];
-    psDec->sLTP_buf_idx = psDec->ltp_mem_length;
+    sLTP_buf_idx = psDec->ltp_mem_length;
     /* Loop over subframes */
     for( k = 0; k < psDec->nb_subfr; k++ ) {
         A_Q12 = psDecCtrl->PredCoef_Q12[ k >> 1 ];
@@ -123,7 +123,7 @@
             if( ( k & ( 3 - SKP_LSHIFT( NLSF_interpolation_flag, 1 ) ) ) == 0 ) {
                 /* Rewhiten with new A coefs */
                 start_idx = psDec->ltp_mem_length - lag - psDec->LPC_order - LTP_ORDER / 2;
-                start_idx = SKP_LIMIT_int( start_idx, 0, psDec->ltp_mem_length - psDec->LPC_order );
+                SKP_assert( start_idx > 0 );
 
                 SKP_memset( FiltState, 0, psDec->LPC_order * sizeof( SKP_int32 ) ); /* Not really necessary, but Valgrind and Coverity will complain otherwise */
                 SKP_Silk_MA_Prediction( &psDec->outBuf[ start_idx + k * psDec->subfr_length ], 
@@ -136,13 +136,13 @@
                     inv_gain_Q32 = SKP_LSHIFT( SKP_SMULWB( inv_gain_Q32, psDecCtrl->LTP_scale_Q14 ), 2 );
                 }
                 for( i = 0; i < (lag + LTP_ORDER/2); i++ ) {
-                    psDec->sLTP_Q16[ psDec->sLTP_buf_idx - i - 1 ] = SKP_SMULWB( inv_gain_Q32, sLTP[ psDec->ltp_mem_length - i - 1 ] );
+                    psDec->sLTP_Q16[ sLTP_buf_idx - i - 1 ] = SKP_SMULWB( inv_gain_Q32, sLTP[ psDec->ltp_mem_length - i - 1 ] );
                 }
             } else {
                 /* Update LTP state when Gain changes */
                 if( gain_adj_Q16 != ( SKP_int32 )1 << 16 ) {
                     for( i = 0; i < ( lag + LTP_ORDER / 2 ); i++ ) {
-                        psDec->sLTP_Q16[ psDec->sLTP_buf_idx - i - 1 ] = SKP_SMULWW( gain_adj_Q16, psDec->sLTP_Q16[ psDec->sLTP_buf_idx - i - 1 ] );
+                        psDec->sLTP_Q16[ sLTP_buf_idx - i - 1 ] = SKP_SMULWW( gain_adj_Q16, psDec->sLTP_Q16[ sLTP_buf_idx - i - 1 ] );
                     }
                 }
             }
@@ -160,7 +160,7 @@
         /* Long-term prediction */
         if( sigtype == SIG_TYPE_VOICED ) {
             /* Setup pointer */
-            pred_lag_ptr = &psDec->sLTP_Q16[ psDec->sLTP_buf_idx - lag + LTP_ORDER / 2 ];
+            pred_lag_ptr = &psDec->sLTP_Q16[ sLTP_buf_idx - lag + LTP_ORDER / 2 ];
             for( i = 0; i < psDec->subfr_length; i++ ) {
                 /* Unrolled loop */
                 LTP_pred_Q14 = SKP_SMULWB(               pred_lag_ptr[  0 ], B_Q14[ 0 ] );
@@ -174,8 +174,8 @@
                 pres_Q10[ i ] = SKP_ADD32( pexc_Q10[ i ], SKP_RSHIFT_ROUND( LTP_pred_Q14, 4 ) );
             
                 /* Update states */
-                psDec->sLTP_Q16[ psDec->sLTP_buf_idx ] = SKP_LSHIFT( pres_Q10[ i ], 6 );
-                psDec->sLTP_buf_idx++;
+                psDec->sLTP_Q16[ sLTP_buf_idx ] = SKP_LSHIFT( pres_Q10[ i ], 6 );
+                sLTP_buf_idx++;
             }
         } else {
             SKP_memcpy( pres_Q10, pexc_Q10, psDec->subfr_length * sizeof( SKP_int32 ) );
--- a/src_common/SKP_Silk_decode_frame.c
+++ b/src_common/SKP_Silk_decode_frame.c
@@ -25,7 +25,6 @@
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ***********************************************************************/
 
-
 #include "SKP_Silk_main.h"
 #include "SKP_Silk_PLC.h"
 
@@ -36,7 +35,7 @@
     SKP_Silk_decoder_state      *psDec,             /* I/O  Pointer to Silk decoder state               */
     ec_dec                      *psRangeDec,        /* I/O  Compressor data structure                   */
     SKP_int16                   pOut[],             /* O    Pointer to output speech frame              */
-    SKP_int16                   *pN,                /* O    Pointer to size of output frame             */
+    SKP_int32                   *pN,                /* O    Pointer to size of output frame             */
     const SKP_int               nBytes,             /* I    Payload length                              */
     SKP_int                     action,             /* I    Action from Jitter Buffer                   */
     SKP_int                     *decBytes           /* O    Used bytes to decode this frame             */
@@ -78,8 +77,9 @@
         if( 0 ) { //psDec->sRC.error ) {
             psDec->nBytesLeft = 0;
 
-            action              = 1; /* PLC operation */
-            SKP_Silk_decoder_set_fs( psDec, fs_Khz_old, nb_subfr_old );
+            action = 1;                         /* PLC operation */
+            psDec->nb_subfr = nb_subfr_old;
+            SKP_Silk_decoder_set_fs( psDec, fs_Khz_old );
 
             /* Avoid crashing */
             *decBytes = psRangeDec->buf->storage; 
@@ -122,7 +122,6 @@
     if( action == 1 ) {
         /* Handle packet loss by extrapolation */
         SKP_Silk_PLC( psDec, &sDecCtrl, pOut, L, action );
-        psDec->lossCnt++;
     }
 
     /*************************/
@@ -161,6 +160,7 @@
 
     /* Update some decoder state variables */
     psDec->lagPrev = sDecCtrl.pitchL[ MAX_NB_SUBFR - 1 ];
+
 TOC(decode_frame)
 
     return ret;
--- a/src_common/SKP_Silk_decode_indices.c
+++ b/src_common/SKP_Silk_decode_indices.c
@@ -33,31 +33,12 @@
     ec_dec                      *psRangeDec         /* I/O  Compressor data structure                   */
 )
 {
-    SKP_int   i, k, Ix, fs_kHz_dec, nb_subfr, FrameIndex = 0, FrameTermination;
+    SKP_int   i, k, Ix, FrameIndex;
     SKP_int   sigtype, QuantOffsetType, seed_int, nBytesUsed;
     SKP_int   decode_absolute_lagIndex, delta_lagIndex, prev_lagIndex = 0;
     const SKP_Silk_NLSF_CB_struct *psNLSF_CB = NULL;
 
-    /************************/
-    /* Decode sampling rate */
-    /************************/
-    /* only done for first frame of packet */
-    if( psDec->nFramesDecoded == 0 ) {
-        SKP_Silk_range_decoder( &Ix, psRangeDec, SKP_Silk_SamplingRates_CDF, SKP_Silk_SamplingRates_offset );
-        fs_kHz_dec = SKP_Silk_SamplingRates_table[ Ix ];
-
-        /* Convert number of subframes to index */
-        SKP_Silk_range_decoder( &Ix, psRangeDec, SKP_Silk_NbSubframes_CDF, SKP_Silk_NbSubframes_offset );
-        nb_subfr = (Ix + 1) << 1;
-        SKP_assert( nb_subfr == MAX_NB_SUBFR >> 1 || nb_subfr == MAX_NB_SUBFR );
-        
-        SKP_Silk_decoder_set_fs( psDec, fs_kHz_dec, nb_subfr );
-    
-        FrameIndex       = 0;
-        FrameTermination = SKP_SILK_MORE_FRAMES;
-    }
-
-    while( FrameTermination == SKP_SILK_MORE_FRAMES ) {
+    for( FrameIndex = 0; FrameIndex < psDec->nFramesInPacket; FrameIndex++ ) {
         /*******************/
         /* Decode VAD flag */
         /*******************/
@@ -173,23 +154,19 @@
         /***************/
         SKP_Silk_range_decoder( &seed_int, psRangeDec, SKP_Silk_Seed_CDF, SKP_Silk_Seed_offset );
         psDec->Seed[ FrameIndex ] = ( SKP_int32 )seed_int;
-        /**************************************/
-        /* Decode Frame termination indicator */
-        /**************************************/
-        SKP_Silk_range_decoder( &FrameTermination, psRangeDec, SKP_Silk_FrameTermination_CDF, SKP_Silk_FrameTermination_offset );
 
         psDec->sigtype[ FrameIndex ]         = sigtype;
         psDec->QuantOffsetType[ FrameIndex ] = QuantOffsetType;
-
-        FrameIndex++;
     }
 
+    /**************************************/
+    /* Decode Frame termination indicator */
+    /**************************************/
+    SKP_Silk_range_decoder( &psDec->FrameTermination, psRangeDec, SKP_Silk_FrameTermination_CDF, SKP_Silk_FrameTermination_offset );
+
     /****************************************/
     /* get number of bytes used so far      */
     /****************************************/
     nBytesUsed = SKP_RSHIFT( ec_dec_tell( psRangeDec, 0 ) + 7, 3 );
     psDec->nBytesLeft = psRangeDec->buf->storage - nBytesUsed;
-
-    psDec->nFramesInPacket  = FrameIndex;
-    psDec->FrameTermination = FrameTermination;
 }
--- a/src_common/SKP_Silk_decode_parameters.c
+++ b/src_common/SKP_Silk_decode_parameters.c
@@ -41,7 +41,6 @@
     const SKP_int16 *cbk_ptr_Q14;
     const SKP_Silk_NLSF_CB_struct *psNLSF_CB = NULL;
     
-    psDec->FrameTermination       = SKP_SILK_MORE_FRAMES;
     psDecCtrl->sigtype            = psDec->sigtype[ psDec->nFramesDecoded ];
     psDecCtrl->QuantOffsetType    = psDec->QuantOffsetType[ psDec->nFramesDecoded ];
     psDec->vadFlag                = psDec->vadFlagBuf[ psDec->nFramesDecoded ];
@@ -51,10 +50,10 @@
     /* Dequant Gains */
     SKP_Silk_gains_dequant( psDecCtrl->Gains_Q16, psDec->GainsIndices[ psDec->nFramesDecoded ], 
         &psDec->LastGainIndex, psDec->nFramesDecoded, psDec->nb_subfr );
+
     /****************/
     /* Decode NLSFs */
     /****************/
-
     /* Set pointer to NLSF VQ CB for the current signal type */
     psNLSF_CB = psDec->psNLSF_CB[ psDecCtrl->sigtype ];
 
@@ -107,7 +106,7 @@
         /* Decode LTP gains */
         /********************/
         psDecCtrl->PERIndex = psDec->PERIndex[ psDec->nFramesDecoded ];
-        
+
         /* Decode Codebook Index */
         cbk_ptr_Q14 = SKP_Silk_LTP_vq_ptrs_Q14[ psDecCtrl->PERIndex ]; /* set pointer to start of codebook */
 
@@ -114,7 +113,7 @@
         for( k = 0; k < psDec->nb_subfr; k++ ) {
             Ix = psDec->LTPIndex[ psDec->nFramesDecoded ][ k ];
             for( i = 0; i < LTP_ORDER; i++ ) {
-                psDecCtrl->LTPCoef_Q14[ SKP_SMULBB( k, LTP_ORDER ) + i ] = cbk_ptr_Q14[ SKP_SMULBB( Ix, LTP_ORDER ) + i ];
+                psDecCtrl->LTPCoef_Q14[ k * LTP_ORDER + i ] = cbk_ptr_Q14[ Ix * LTP_ORDER + i ];
             }
         }
 
@@ -125,8 +124,8 @@
         psDecCtrl->LTP_scale_Q14 = SKP_Silk_LTPScales_table_Q14[ Ix ];
     } else {
         SKP_assert( psDecCtrl->sigtype == SIG_TYPE_UNVOICED );
-        SKP_memset( psDecCtrl->pitchL,      0, psDec->nb_subfr * sizeof( SKP_int ) );
-        SKP_memset( psDecCtrl->LTPCoef_Q14, 0, psDec->nb_subfr * LTP_ORDER * sizeof( SKP_int16 ) );
+        SKP_memset( psDecCtrl->pitchL,      0,             psDec->nb_subfr * sizeof( SKP_int   ) );
+        SKP_memset( psDecCtrl->LTPCoef_Q14, 0, LTP_ORDER * psDec->nb_subfr * sizeof( SKP_int16 ) );
         psDecCtrl->PERIndex      = 0;
         psDecCtrl->LTP_scale_Q14 = 0;
     }
@@ -143,9 +142,4 @@
     /****************************************/
     nBytesUsed = SKP_RSHIFT( ec_dec_tell( psRangeDec, 0 ) + 7, 3 );
     psDec->nBytesLeft = psRangeDec->buf->storage - nBytesUsed;
-
-    if( psDec->nFramesInPacket == (psDec->nFramesDecoded + 1)) {
-        /* To indicate the packet has been fully decoded */
-        psDec->FrameTermination = SKP_SILK_LAST_FRAME;
-    }
 }
--- a/src_common/SKP_Silk_decoder_set_fs.c
+++ b/src_common/SKP_Silk_decoder_set_fs.c
@@ -30,12 +30,10 @@
 /* Set decoder sampling rate */
 void SKP_Silk_decoder_set_fs(
     SKP_Silk_decoder_state          *psDec,             /* I/O  Decoder state pointer                       */
-    SKP_int                         fs_kHz,             /* I    Sampling frequency (kHz)                    */
-    SKP_int                         nb_subfr            /* I    Number of subframes                         */
+    SKP_int                         fs_kHz              /* I    Sampling frequency (kHz)                    */
 )
 {
-    psDec->nb_subfr = nb_subfr;
-    psDec->frame_length   = SKP_SMULBB( psDec->nb_subfr, psDec->subfr_length );
+    psDec->frame_length = SKP_SMULBB( psDec->nb_subfr, psDec->subfr_length );
     if( psDec->fs_kHz != fs_kHz ) {
         psDec->fs_kHz  = fs_kHz;
         psDec->subfr_length   = SKP_SMULBB( SUB_FRAME_LENGTH_MS, fs_kHz );
@@ -55,7 +53,6 @@
         SKP_memset( psDec->outBuf,       0, MAX_FRAME_LENGTH   * sizeof( SKP_int16 ) );
         SKP_memset( psDec->prevNLSF_Q15, 0, MAX_LPC_ORDER      * sizeof( SKP_int )   );
 
-        psDec->sLTP_buf_idx            = 0;
         psDec->lagPrev                 = 100;
         psDec->LastGainIndex           = 1;
         psDec->prev_sigtype            = 0;
--- a/src_common/SKP_Silk_define.h
+++ b/src_common/SKP_Silk_define.h
@@ -31,6 +31,10 @@
 #include "SKP_Silk_errors.h"
 #include "SKP_Silk_typedef.h"
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef __cplusplus
 extern "C"
 {
@@ -45,11 +49,9 @@
 /* MAX DELTA LAG used for multiframe packets */
 #define MAX_DELTA_LAG                           10
 
-/* Lower limit on bitrate for each mode */
-#define MIN_TARGET_RATE_NB_BPS                  5000
-#define MIN_TARGET_RATE_MB_BPS                  7000
-#define MIN_TARGET_RATE_WB_BPS                  8000
-#define MIN_TARGET_RATE_SWB_BPS                 20000
+/* Limits on bitrate */
+#define MIN_TARGET_RATE_BPS                     5000
+#define MAX_TARGET_RATE_BPS                     100000
 
 /* Transition bitrates between modes */
 #define SWB2WB_BITRATE_BPS                      25000
@@ -80,17 +82,9 @@
 #define INBAND_FEC_MIN_RATE_BPS                 18000  /* Dont use inband FEC below this total target rate  */
 #define LBRR_LOSS_THRES                         2   /* Start adding LBRR at this loss rate (needs tuning)   */
 
-/* LBRR usage defines */
-#define SKP_SILK_NO_LBRR                        0   /* No LBRR information for this packet                  */
-#define SKP_SILK_ADD_LBRR_TO_PLUS1              1   /* Add LBRR for this packet to packet n + 1             */
-#define SKP_SILK_ADD_LBRR_TO_PLUS2              2   /* Add LBRR for this packet to packet n + 2             */
-
 /* Frame termination indicator defines */
-#define SKP_SILK_LAST_FRAME                     0   /* Last frames in packet                                */
-#define SKP_SILK_MORE_FRAMES                    1   /* More frames to follow this one                       */
-#define SKP_SILK_LBRR_VER1                      2   /* LBRR information from packet n - 1                   */
-#define SKP_SILK_LBRR_VER2                      3   /* LBRR information from packet n - 2                   */
-#define SKP_SILK_EXT_LAYER                      4   /* Extension layers added                               */
+#define SKP_SILK_NO_LBRR                        0
+#define SKP_SILK_LBRR                           1
 
 /* Number of Second order Sections for SWB detection HP filter */
 #define NB_SOS                                  3
@@ -102,7 +96,7 @@
 #define LOW_COMPLEXITY_ONLY                     0
 
 /* Activate bandwidth transition filtering for mode switching */
-#  define SWITCH_TRANSITION_FILTERING           1
+#define SWITCH_TRANSITION_FILTERING             1
 
 /* Decoder Parameters */
 #define DEC_HP_ORDER                            2
@@ -122,7 +116,7 @@
 /* Number of subframes */
 #define MAX_NB_SUBFR                            4
 
-/* number of samples per frame */ 
+/* Number of samples per frame */ 
 #define LTP_MEM_LENGTH_MS                       20
 #define SUB_FRAME_LENGTH_MS                     5
 #define MAX_SUB_FRAME_LENGTH                    ( SUB_FRAME_LENGTH_MS * MAX_FS_KHZ )
@@ -129,39 +123,32 @@
 #define MAX_FRAME_LENGTH_MS                     ( SUB_FRAME_LENGTH_MS * MAX_NB_SUBFR )
 #define MAX_FRAME_LENGTH                        ( MAX_FRAME_LENGTH_MS * MAX_FS_KHZ )
 
-/* number of lookahead samples for pitch analysis */
-#define LA_PITCH_MS                             3
-#define LA_PITCH_MAX                            (LA_PITCH_MS * MAX_FS_KHZ)
+/* Milliseconds of lookahead for pitch analysis */
+#define LA_PITCH_MS                             2
+#define LA_PITCH_MAX                            ( LA_PITCH_MS * MAX_FS_KHZ )
 
-/* number of lookahead samples for noise shape analysis */
-#define LA_SHAPE_MS                             5
-#define LA_SHAPE_MAX                            (LA_SHAPE_MS * MAX_FS_KHZ)
-
 /* Order of LPC used in find pitch */
 #define MAX_FIND_PITCH_LPC_ORDER                16
 
 /* Length of LPC window used in find pitch */
-#define FIND_PITCH_LPC_WIN_MS                   (30 + (LA_PITCH_MS << 1))
-#define FIND_PITCH_LPC_WIN_MS_2_SF              (15 + (LA_PITCH_MS << 1))
-#define FIND_PITCH_LPC_WIN_MAX                  (FIND_PITCH_LPC_WIN_MS * MAX_FS_KHZ)
+#define FIND_PITCH_LPC_WIN_MS                   ( 20 + (LA_PITCH_MS << 1) )
+#define FIND_PITCH_LPC_WIN_MS_2_SF              ( 10 + (LA_PITCH_MS << 1) )
+#define FIND_PITCH_LPC_WIN_MAX                  ( FIND_PITCH_LPC_WIN_MS * MAX_FS_KHZ )
 
 #define PITCH_EST_COMPLEXITY_HC_MODE            SKP_Silk_PE_MAX_COMPLEX
 #define PITCH_EST_COMPLEXITY_MC_MODE            SKP_Silk_PE_MID_COMPLEX
 #define PITCH_EST_COMPLEXITY_LC_MODE            SKP_Silk_PE_MIN_COMPLEX
 
+/* Milliseconds of lookahead for noise shape analysis */
+#define LA_SHAPE_MS                             5
+#define LA_SHAPE_MAX                            ( LA_SHAPE_MS * MAX_FS_KHZ )
 
+/* Maximum length of LPC window used in noise shape analysis */
+#define SHAPE_LPC_WIN_MAX                       ( 15 * MAX_FS_KHZ )
+
 /* Max number of bytes in payload output buffer (may contain multiple frames) */
 #define MAX_ARITHM_BYTES                        1024
 
-#define RANGE_CODER_WRITE_BEYOND_BUFFER         -1
-#define RANGE_CODER_CDF_OUT_OF_RANGE            -2
-#define RANGE_CODER_NORMALIZATION_FAILED        -3
-#define RANGE_CODER_ZERO_INTERVAL_WIDTH         -4
-#define RANGE_CODER_DECODER_CHECK_FAILED        -5
-#define RANGE_CODER_READ_BEYOND_BUFFER          -6
-#define RANGE_CODER_ILLEGAL_SAMPLING_RATE       -7
-#define RANGE_CODER_DEC_PAYLOAD_TOO_LONG        -8
-
 /* dB level of lowest gain quantization level */
 #define MIN_QGAIN_DB                            6
 /* dB level of highest gain quantization level */
@@ -199,12 +186,6 @@
 
 #define HARM_SHAPE_FIR_TAPS                     3
 
-/* Length of LPC window used in noise shape analysis */
-#define SHAPE_LPC_WIN_MS                        15
-#define SHAPE_LPC_WIN_16_KHZ                    (SHAPE_LPC_WIN_MS * 16)
-#define SHAPE_LPC_WIN_24_KHZ                    (SHAPE_LPC_WIN_MS * 24)
-#define SHAPE_LPC_WIN_MAX                       (SHAPE_LPC_WIN_MS * MAX_FS_KHZ)
-
 /* Maximum number of delayed decision states */
 #define MAX_DEL_DEC_STATES                      4
 
@@ -259,9 +240,9 @@
 /******************/
 /* NLSF quantizer */
 /******************/
-#   define NLSF_MSVQ_MAX_CB_STAGES                      10  /* Update manually when changing codebooks      */
-#   define NLSF_MSVQ_MAX_VECTORS_IN_STAGE               128 /* Update manually when changing codebooks      */
-#   define NLSF_MSVQ_MAX_VECTORS_IN_STAGE_TWO_TO_END    16  /* Update manually when changing codebooks      */
+#define NLSF_MSVQ_MAX_CB_STAGES                      10 /* Update manually when changing codebooks      */
+#define NLSF_MSVQ_MAX_VECTORS_IN_STAGE               64 /* Update manually when changing codebooks      */
+#define NLSF_MSVQ_MAX_VECTORS_IN_STAGE_TWO_TO_END    16 /* Update manually when changing codebooks      */
 
 #define NLSF_MSVQ_FLUCTUATION_REDUCTION         1
 #define MAX_NLSF_MSVQ_SURVIVORS                 16
@@ -281,7 +262,7 @@
 #   define NLSF_MSVQ_TREE_SEARCH_MAX_VECTORS_EVALUATED  MAX_NLSF_MSVQ_SURVIVORS * NLSF_MSVQ_MAX_VECTORS_IN_STAGE_TWO_TO_END
 #endif
 
-#define NLSF_MSVQ_SURV_MAX_REL_RD               4
+#define NLSF_MSVQ_SURV_MAX_REL_RD               0.1f    /* Must be < 0.5                                    */
 
 /* Transition filtering for mode switching */
 #if SWITCH_TRANSITION_FILTERING
@@ -298,12 +279,6 @@
 
 /* BWE factors to apply after packet loss */
 #define BWE_AFTER_LOSS_Q16                      63570
-
-/*************************/
-/* Perceptual parameters */
-/*************************/
-/* Amount of warping to apply */
-#define WARPING_MULTIPLIER_Q16                  SKP_FIX_CONST( 0.02, 16 )
 
 /* Defines for CN generation */
 #define CNG_BUF_MASK_MAX                        255             /* 2^floor(log2(MAX_FRAME_LENGTH))-1    */
--- a/src_common/SKP_Silk_enc_API.c
+++ b/src_common/SKP_Silk_enc_API.c
@@ -44,7 +44,7 @@
 #define SKP_Silk_control_encoder_Fxx    SKP_Silk_control_encoder_FLP
 #define SKP_Silk_encode_frame_Fxx       SKP_Silk_encode_frame_FLP
 #endif
-#define SKP_Silk_EncodeControlStruct SKP_SILK_SDK_EncControlStruct
+#define SKP_Silk_EncodeControlStruct    SKP_SILK_SDK_EncControlStruct
 
 
 /****************************************/
@@ -70,18 +70,21 @@
 )
 {
     SKP_Silk_encoder_state_Fxx *psEnc;
-    SKP_int ret = SKP_SILK_NO_ERROR;    
+    SKP_int ret = SKP_SILK_NO_ERROR;
 
     psEnc = ( SKP_Silk_encoder_state_Fxx* )encState;
 
     encStatus->API_sampleRate        = psEnc->sCmn.API_fs_Hz;
     encStatus->maxInternalSampleRate = SKP_SMULBB( psEnc->sCmn.maxInternal_fs_kHz, 1000 );
-    encStatus->packetSize            = ( SKP_int )SKP_DIV32_16( psEnc->sCmn.API_fs_Hz * psEnc->sCmn.PacketSize_ms, 1000 );  /* convert samples -> ms */
+    encStatus->minInternalSampleRate = SKP_SMULBB( psEnc->sCmn.minInternal_fs_kHz, 1000 );
+    encStatus->payloadSize_ms        = psEnc->sCmn.PacketSize_ms;
     encStatus->bitRate               = psEnc->sCmn.TargetRate_bps;
     encStatus->packetLossPercentage  = psEnc->sCmn.PacketLoss_perc;
     encStatus->complexity            = psEnc->sCmn.Complexity;
     encStatus->useInBandFEC          = psEnc->sCmn.useInBandFEC;
     encStatus->useDTX                = psEnc->sCmn.useDTX;
+    encStatus->useCBR                = psEnc->sCmn.useCBR;
+    encStatus->internalSampleRate    = SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 );
     return ret;
 }
 
@@ -118,17 +121,16 @@
 /**************************/
 SKP_int SKP_Silk_SDK_Encode( 
     void                                *encState,      /* I/O: State                                           */
-    const SKP_Silk_EncodeControlStruct  *encControl,    /* I:   Control structure                               */
+    SKP_Silk_EncodeControlStruct        *encControl,    /* I:   Control structure                               */
     const SKP_int16                     *samplesIn,     /* I:   Speech sample input vector                      */
     SKP_int                             nSamplesIn,     /* I:   Number of samples in input vector               */
     ec_enc                              *psRangeEnc,    /* I/O  Compressor data structure                       */
-    SKP_int16                           *nBytesOut      /* I/O: Number of bytes in payload (input: Max bytes)   */
+    SKP_int32                           *nBytesOut      /* I/O: Number of bytes in payload (input: Max bytes)   */
 )
 {
-    SKP_int   max_internal_fs_kHz, PacketSize_ms, PacketLoss_perc, UseInBandFEC, UseDTX, ret = SKP_SILK_NO_ERROR;
-    SKP_int   nSamplesToBuffer, Complexity, input_ms, nSamplesFromInput = 0;
-    SKP_int32 TargetRate_bps, API_fs_Hz;
-    SKP_int16 MaxBytesOut;
+    SKP_int   max_internal_fs_kHz, min_internal_fs_kHz, PacketSize_ms, PacketLoss_perc, UseInBandFEC, ret = SKP_SILK_NO_ERROR;
+    SKP_int   nSamplesToBuffer, Complexity, input_10ms, nSamplesFromInput = 0;
+    SKP_int32 TargetRate_bps, API_fs_Hz, MaxBytesOut;
     SKP_Silk_encoder_state_Fxx *psEnc = ( SKP_Silk_encoder_state_Fxx* )encState;
 
     SKP_assert( encControl != NULL );
@@ -144,50 +146,74 @@
         ( ( encControl->maxInternalSampleRate !=  8000 ) &&
           ( encControl->maxInternalSampleRate != 12000 ) &&
           ( encControl->maxInternalSampleRate != 16000 ) &&
-          ( encControl->maxInternalSampleRate != 24000 ) ) ) {
+          ( encControl->maxInternalSampleRate != 24000 ) ) ||
+        ( ( encControl->minInternalSampleRate !=  8000 ) &&
+          ( encControl->minInternalSampleRate != 12000 ) &&
+          ( encControl->minInternalSampleRate != 16000 ) &&
+          ( encControl->minInternalSampleRate != 24000 ) ) ||
+          ( encControl->minInternalSampleRate > encControl->maxInternalSampleRate ) ) {
         ret = SKP_SILK_ENC_FS_NOT_SUPPORTED;
         SKP_assert( 0 );
         return( ret );
     }
+    if( encControl->useDTX < 0 || encControl->useDTX > 1 ) {
+        ret = SKP_SILK_ENC_INVALID_DTX_SETTING;
+    }
+	if( encControl->useCBR < 0 || encControl->useCBR > 1 ) {
+        ret = SKP_SILK_ENC_INVALID_DTX_SETTING;
+    }
 
+
     /* Set encoder parameters from control structure */
-    API_fs_Hz           =                              encControl->API_sampleRate;
-    max_internal_fs_kHz = SKP_DIV32_16(     ( SKP_int )encControl->maxInternalSampleRate, 1000 );   /* convert Hz -> kHz */
-    PacketSize_ms       = SKP_DIV32( 1000 * ( SKP_int )encControl->packetSize, API_fs_Hz );
-    TargetRate_bps      =                 ( SKP_int32 )encControl->bitRate;
-    PacketLoss_perc     =                   ( SKP_int )encControl->packetLossPercentage;
-    UseInBandFEC        =                   ( SKP_int )encControl->useInBandFEC;
-    Complexity          =                   ( SKP_int )encControl->complexity;
-    UseDTX              =                   ( SKP_int )encControl->useDTX;
+    API_fs_Hz           =            encControl->API_sampleRate;
+    max_internal_fs_kHz = (SKP_int)( encControl->maxInternalSampleRate >> 10 ) + 1;   /* convert Hz -> kHz */
+    min_internal_fs_kHz = (SKP_int)( encControl->minInternalSampleRate >> 10 ) + 1;   /* convert Hz -> kHz */
+    PacketSize_ms       =            encControl->payloadSize_ms;
+    TargetRate_bps      =            encControl->bitRate;
+    PacketLoss_perc     =            encControl->packetLossPercentage;
+    UseInBandFEC        =            encControl->useInBandFEC;
+    Complexity          =            encControl->complexity;
+    psEnc->sCmn.useDTX  =            encControl->useDTX;
+	psEnc->sCmn.useCBR  =			 encControl->useCBR;
+
     /* Save values in state */
     psEnc->sCmn.API_fs_Hz          = API_fs_Hz;
     psEnc->sCmn.maxInternal_fs_kHz = max_internal_fs_kHz;
+    psEnc->sCmn.minInternal_fs_kHz = min_internal_fs_kHz;
     psEnc->sCmn.useInBandFEC       = UseInBandFEC;
 
-    /* Only accept input lengths that are a multiplum of 10 ms */
-    input_ms = SKP_DIV32( 1000 * nSamplesIn, API_fs_Hz );
-    if( ( input_ms % 10) != 0 || nSamplesIn < 0 ) {
+    /* Only accept input lengths that are a multiple of 10 ms */
+    input_10ms = SKP_DIV32( 100 * nSamplesIn, API_fs_Hz );
+    if( input_10ms * API_fs_Hz != 100 * nSamplesIn || nSamplesIn < 0 ) {
         ret = SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
         SKP_assert( 0 );
         return( ret );
     }
 
-    /* Make sure no more than one packet can be produced */
-    if( nSamplesIn > SKP_DIV32_16( psEnc->sCmn.PacketSize_ms * API_fs_Hz, 1000 ) ) {
-        ret = SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
+    TargetRate_bps = SKP_LIMIT( TargetRate_bps, MIN_TARGET_RATE_BPS, MAX_TARGET_RATE_BPS );
+    if( ( ret = SKP_Silk_control_encoder_Fxx( psEnc, PacketSize_ms, TargetRate_bps, 
+                        PacketLoss_perc, Complexity) ) != 0 ) {
         SKP_assert( 0 );
         return( ret );
     }
-    if( ( ret = SKP_Silk_control_encoder_Fxx( psEnc, API_fs_Hz, max_internal_fs_kHz, PacketSize_ms, TargetRate_bps, 
-                    PacketLoss_perc, UseInBandFEC, UseDTX, input_ms, Complexity) ) != 0 ) {
+
+    encControl->internalSampleRate = SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 );
+    
+    /* Make sure no more than one packet can be produced */
+    if( 1000 * (SKP_int32)nSamplesIn > psEnc->sCmn.PacketSize_ms * API_fs_Hz ) {
+        ret = SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
         SKP_assert( 0 );
         return( ret );
     }
 
+#if MAX_FS_KHZ > 16
     /* Detect energy above 8 kHz */
-    if( SKP_min( API_fs_Hz, 1000 * max_internal_fs_kHz ) == 24000 && psEnc->sCmn.sSWBdetect.SWB_detected == 0 && psEnc->sCmn.sSWBdetect.WB_detected == 0 ) {
+    if( SKP_min( API_fs_Hz, 1000 * max_internal_fs_kHz ) == 24000 && 
+            psEnc->sCmn.sSWBdetect.SWB_detected == 0 && 
+            psEnc->sCmn.sSWBdetect.WB_detected == 0 ) {
         SKP_Silk_detect_SWB_input( &psEnc->sCmn.sSWBdetect, samplesIn, ( SKP_int )nSamplesIn );
     }
+#endif
 
     /* Input buffering/resampling and encoding */
     MaxBytesOut = 0;                    /* return 0 output bytes if no encoder called */
@@ -199,7 +225,7 @@
             /* Copy to buffer */
             SKP_memcpy( &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], samplesIn, nSamplesFromInput * sizeof( SKP_int16 ) );
         } else {  
-            nSamplesToBuffer  = SKP_min( nSamplesToBuffer, SKP_DIV32( ( SKP_int32 )nSamplesIn * psEnc->sCmn.fs_kHz * 1000, API_fs_Hz ) );
+            nSamplesToBuffer  = SKP_min( nSamplesToBuffer, 10 * input_10ms * psEnc->sCmn.fs_kHz );
             nSamplesFromInput = SKP_DIV32_16( nSamplesToBuffer * API_fs_Hz, psEnc->sCmn.fs_kHz * 1000 );
             /* Resample and write to buffer */
             ret += SKP_Silk_resampler( &psEnc->sCmn.resampler_state, &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], samplesIn, nSamplesFromInput );
@@ -210,6 +236,8 @@
 
         /* Silk encoder */
         if( psEnc->sCmn.inputBufIx >= psEnc->sCmn.frame_length ) {
+            SKP_assert( psEnc->sCmn.inputBufIx == psEnc->sCmn.frame_length );
+
             /* Enough data in input buffer, so encode */
             if( MaxBytesOut == 0 ) {
                 /* No payload obtained so far */
@@ -218,7 +246,7 @@
                     SKP_assert( 0 );
                 }
             } else {
-                /* Already contains a payload */
+                /* outData already contains a payload */
                 if( ( ret = SKP_Silk_encode_frame_Fxx( psEnc, nBytesOut, psRangeEnc, psEnc->sCmn.inputBuf ) ) != 0 ) {
                     SKP_assert( 0 );
                 }
@@ -226,6 +254,11 @@
                 SKP_assert( *nBytesOut == 0 );
             }
             psEnc->sCmn.inputBufIx = 0;
+            psEnc->sCmn.controlled_since_last_payload = 0;
+
+            if( nSamplesIn == 0 ) {
+                break;
+            }
         } else {
             break;
         }
--- a/src_common/SKP_Silk_encode_parameters.c
+++ b/src_common/SKP_Silk_encode_parameters.c
@@ -45,26 +45,6 @@
     SKP_int nBytes_after, nBytes_before;
 #endif
 
-    /*************************************/
-    /* Encode sampling rate and          */
-    /* number of subframes in each frame */
-    /*************************************/
-    /* only done for first frame in packet */
-    if( psEncC->nFramesInPayloadBuf == 0 ) {
-        /* get sampling rate index */
-        for( i = 0; i < 3; i++ ) {
-            if( SKP_Silk_SamplingRates_table[ i ] == psEncC->fs_kHz ) {
-                break;
-            }
-        }
-        ec_encode_bin( psRangeEnc, SKP_Silk_SamplingRates_CDF[ i ], SKP_Silk_SamplingRates_CDF[ i + 1 ], 16 );
-
-        /* Convert number of subframes to index */
-        SKP_assert( psEncC->nb_subfr == MAX_NB_SUBFR >> 1 || psEncC->nb_subfr == MAX_NB_SUBFR );
-        i = (psEncC->nb_subfr >> 1) - 1;
-        ec_enc_bit_prob( psRangeEnc, i, 65536 - SKP_Silk_NbSubframes_CDF[ 1 ] );
-    }
-
     /*********************************************/
     /* Encode VAD flag                           */
     /*********************************************/
@@ -208,6 +188,7 @@
 #ifdef SAVE_ALL_INTERNAL_DATA
         nBytes_before = SKP_RSHIFT( ec_enc_tell( psRangeEnc, 0 ) + 7, 3 );
 #endif
+
         /* PERIndex value */
         ec_encode_bin( psRangeEnc, SKP_Silk_LTP_per_index_CDF[ psEncCtrlC->PERIndex ], 
             SKP_Silk_LTP_per_index_CDF[ psEncCtrlC->PERIndex + 1 ], 16 );
--- a/src_common/SKP_Silk_encode_pulses.c
+++ b/src_common/SKP_Silk_encode_pulses.c
@@ -88,7 +88,6 @@
     const SKP_int8 *pulses_ptr;
     const SKP_uint16 *cdf_ptr;
     const SKP_int16 *nBits_ptr;
-    //extern SKP_int nbits_extra;
 
     SKP_memset( pulses_comb, 0, 8 * sizeof( SKP_int ) ); // Fixing Valgrind reported problem
 
--- a/src_common/SKP_Silk_main.h
+++ b/src_common/SKP_Silk_main.h
@@ -28,6 +28,11 @@
 #ifndef SKP_SILK_MAIN_H
 #define SKP_SILK_MAIN_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include "SKP_Silk_SigProc_FIX.h"
 #include "SKP_Silk_define.h"
 #include "SKP_Silk_structs.h"
@@ -37,10 +42,6 @@
 #include "entenc.h"
 #include "entdec.h"
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
 
 /* Encodes signs of excitation */
 void SKP_Silk_encode_signs(
@@ -62,6 +63,12 @@
     const SKP_int               RateLevelIndex      /* I    Rate Level Index                            */
 );
 
+/* Control internal sampling rate */
+SKP_int SKP_Silk_control_audio_bandwidth(
+    SKP_Silk_encoder_state      *psEncC,            /* I/O  Pointer to Silk encoder state               */
+    const SKP_int32             TargetRate_bps      /* I    Target max bitrate (bps)                    */
+);
+
 /***************/
 /* Shell coder */
 /***************/
@@ -191,6 +198,7 @@
 SKP_int SKP_Silk_VAD_GetSA_Q8(                                  /* O    Return value, 0 if success      */
     SKP_Silk_VAD_state          *psSilk_VAD,                    /* I/O  Silk VAD state                  */
     SKP_int                     *pSA_Q8,                        /* O    Speech activity level in Q8     */
+    SKP_int                     *pSNR_dB_Q7,                    /* O    SNR for current frame in Q7     */
     SKP_int                     pQuality_Q15[ VAD_N_BANDS ],    /* O    Smoothed SNR for each band      */
     SKP_int                     *pTilt_Q15,                     /* O    current frame's frequency tilt  */
     const SKP_int16             pIn[],                          /* I    PCM input       [framelength]   */
@@ -235,8 +243,7 @@
 /* Set decoder sampling rate */
 void SKP_Silk_decoder_set_fs(
     SKP_Silk_decoder_state          *psDec,             /* I/O  Decoder state pointer                       */
-    SKP_int                         fs_kHz,             /* I    Sampling frequency (kHz)                    */
-    SKP_int                         nb_subfr            /* I    Number of subframes                         */
+    SKP_int                         fs_kHz              /* I    Sampling frequency (kHz)                    */
 );
 
 /****************/
@@ -246,7 +253,7 @@
     SKP_Silk_decoder_state      *psDec,             /* I/O  Pointer to Silk decoder state               */
     ec_dec                      *psRangeDec,        /* I/O  Compressor data structure                   */
     SKP_int16                   pOut[],             /* O    Pointer to output speech frame              */
-    SKP_int16                   *pN,                /* O    Pointer to size of output frame             */
+    SKP_int32                   *pN,                /* O    Pointer to size of output frame             */
     const SKP_int               nBytes,             /* I    Payload length                              */
     SKP_int                     action,             /* I    Action from Jitter Buffer                   */
     SKP_int                     *decBytes           /* O    Used bytes to decode this frame             */
@@ -324,7 +331,7 @@
     const SKP_uint8             *indata,            /* I:   Encoded input vector                        */
     const SKP_int16             nBytesIn,           /* I:   Number of input Bytes                       */
     SKP_uint8                   *Layer0data,        /* O:   Layer0 payload                              */
-    SKP_int16                   *nLayer0Bytes       /* O:   Number of FEC Bytes                         */
+    SKP_int32                   *nLayer0Bytes       /* O:   Number of FEC Bytes                         */
 );
 
 /* Resets LBRR buffer, used if packet size changes */
--- /dev/null
+++ b/src_common/SKP_Silk_setup_complexity.h
@@ -1,0 +1,99 @@
+/***********************************************************************
+Copyright (c) 2006-2010, Skype Limited. All rights reserved. 
+Redistribution and use in source and binary forms, with or without 
+modification, (subject to the limitations in the disclaimer below) 
+are permitted provided that the following conditions are met:
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright 
+notice, this list of conditions and the following disclaimer in the 
+documentation and/or other materials provided with the distribution.
+- Neither the name of Skype Limited, nor the names of specific 
+contributors, may be used to endorse or promote products derived from 
+this software without specific prior written permission.
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED 
+BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+***********************************************************************/
+
+#include "SKP_Silk_main.h"
+#include "SKP_Silk_tuning_parameters.h"
+
+SKP_INLINE SKP_int SKP_Silk_setup_complexity(
+    SKP_Silk_encoder_state          *psEncC,            /* I/O                      */
+    SKP_int                         Complexity          /* I                        */
+)
+{
+    SKP_int ret = 0;
+
+    /* Check that settings are valid */
+    if( LOW_COMPLEXITY_ONLY && Complexity != 0 ) { 
+        ret = SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING;
+    }
+
+    /* Set encoding complexity */
+    if( Complexity == 0 || LOW_COMPLEXITY_ONLY ) {
+        /* Low complexity */
+        psEncC->Complexity                      = 0;
+        psEncC->pitchEstimationComplexity       = PITCH_EST_COMPLEXITY_LC_MODE;
+        psEncC->pitchEstimationThreshold_Q16    = SKP_FIX_CONST( FIND_PITCH_CORRELATION_THRESHOLD_LC_MODE, 16 );
+        psEncC->pitchEstimationLPCOrder         = 6;
+        psEncC->shapingLPCOrder                 = 8;
+        psEncC->la_shape                        = 3 * psEncC->fs_kHz;
+        psEncC->nStatesDelayedDecision          = 1;
+        psEncC->useInterpolatedNLSFs            = 0;
+        psEncC->LTPQuantLowComplexity           = 1;
+        psEncC->NLSF_MSVQ_Survivors             = MAX_NLSF_MSVQ_SURVIVORS_LC_MODE;
+        psEncC->warping_Q16                     = 0;
+    } else if( Complexity == 1 ) {
+        /* Medium complexity */
+        psEncC->Complexity                      = 1;
+        psEncC->pitchEstimationComplexity       = PITCH_EST_COMPLEXITY_MC_MODE;
+        psEncC->pitchEstimationThreshold_Q16    = SKP_FIX_CONST( FIND_PITCH_CORRELATION_THRESHOLD_MC_MODE, 16 );
+        psEncC->pitchEstimationLPCOrder         = 12;
+        psEncC->shapingLPCOrder                 = 12;
+        psEncC->la_shape                        = 5 * psEncC->fs_kHz;
+        psEncC->nStatesDelayedDecision          = 2;
+        psEncC->useInterpolatedNLSFs            = 0;
+        psEncC->LTPQuantLowComplexity           = 0;
+        psEncC->NLSF_MSVQ_Survivors             = MAX_NLSF_MSVQ_SURVIVORS_MC_MODE;
+        psEncC->warping_Q16                     = psEncC->fs_kHz * SKP_FIX_CONST( WARPING_MULTIPLIER, 16 );
+    } else if( Complexity == 2 ) {
+        /* High complexity */
+        psEncC->Complexity                      = 2;
+        psEncC->pitchEstimationComplexity       = PITCH_EST_COMPLEXITY_HC_MODE;
+        psEncC->pitchEstimationThreshold_Q16    = SKP_FIX_CONST( FIND_PITCH_CORRELATION_THRESHOLD_HC_MODE, 16 );
+        psEncC->pitchEstimationLPCOrder         = 16;
+        psEncC->shapingLPCOrder                 = 16;
+        psEncC->la_shape                        = 5 * psEncC->fs_kHz;
+        psEncC->nStatesDelayedDecision          = MAX_DEL_DEC_STATES;
+        psEncC->useInterpolatedNLSFs            = 1;
+        psEncC->LTPQuantLowComplexity           = 0;
+        psEncC->NLSF_MSVQ_Survivors             = MAX_NLSF_MSVQ_SURVIVORS;
+        psEncC->warping_Q16                     = psEncC->fs_kHz * SKP_FIX_CONST( WARPING_MULTIPLIER, 16 );
+    } else {
+        ret = SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING;
+    }
+
+    /* Do not allow higher pitch estimation LPC order than predict LPC order */
+    psEncC->pitchEstimationLPCOrder             = SKP_min_int( psEncC->pitchEstimationLPCOrder, psEncC->predictLPCOrder );
+    psEncC->shapeWinLength                      = SUB_FRAME_LENGTH_MS * psEncC->fs_kHz + 2 * psEncC->la_shape;
+
+    SKP_assert( psEncC->pitchEstimationLPCOrder <= MAX_FIND_PITCH_LPC_ORDER );
+    SKP_assert( psEncC->shapingLPCOrder         <= MAX_SHAPE_LPC_ORDER      );
+    SKP_assert( psEncC->nStatesDelayedDecision  <= MAX_DEL_DEC_STATES       );
+    SKP_assert( psEncC->warping_Q16             <= 32767                    );
+    SKP_assert( psEncC->la_shape                <= LA_SHAPE_MAX             );
+    SKP_assert( psEncC->shapeWinLength          <= SHAPE_LPC_WIN_MAX        );
+
+    return( ret );
+}
--- a/src_common/SKP_Silk_structs.h
+++ b/src_common/SKP_Silk_structs.h
@@ -46,7 +46,7 @@
 typedef struct {
     SKP_int16   xq[           2 * MAX_FRAME_LENGTH ]; /* Buffer for quantized output signal */
     SKP_int32   sLTP_shp_Q10[ 2 * MAX_FRAME_LENGTH ];
-    SKP_int32   sLPC_Q14[ MAX_FRAME_LENGTH / MAX_NB_SUBFR + MAX_LPC_ORDER ];
+    SKP_int32   sLPC_Q14[ MAX_FRAME_LENGTH / MAX_NB_SUBFR + NSQ_LPC_BUF_LENGTH ];
     SKP_int32   sAR2_Q14[ MAX_SHAPE_LPC_ORDER ];
     SKP_int32   sLF_AR_shp_Q12;
     SKP_int     lagPrev;
@@ -117,8 +117,8 @@
 /* Structure for one stage of MSVQ */
 typedef struct {
     const SKP_int32             nVectors;
-    const SKP_int16             *CB_NLSF_Q15;
-    const SKP_int16             *Rates_Q5;
+    const SKP_int8              *CB_NLSF_Q8;
+    const SKP_uint8             *Rates_Q4;
 } SKP_Silk_NLSF_CBS;
 
 /* Structure containing NLSF MSVQ codebook */
@@ -157,6 +157,7 @@
     SKP_int32                       API_fs_Hz;                      /* API sampling frequency (Hz)                                          */
     SKP_int32                       prev_API_fs_Hz;                 /* Previous API sampling frequency (Hz)                                 */
     SKP_int                         maxInternal_fs_kHz;             /* Maximum internal sampling frequency (kHz)                            */
+    SKP_int                         minInternal_fs_kHz;             /* Minimum internal sampling frequency (kHz)                            */
     SKP_int                         fs_kHz;                         /* Internal sampling frequency (kHz)                                    */
     SKP_int                         fs_kHz_changed;                 /* Did we switch yet?                                                   */
     SKP_int                         nb_subfr;                       /* Number of 5 ms subframes in a frame                                  */
@@ -165,6 +166,7 @@
     SKP_int                         ltp_mem_length;                 /* Length of LTP memory                                                 */
     SKP_int                         la_pitch;                       /* Look-ahead for pitch analysis (samples)                              */
     SKP_int                         la_shape;                       /* Look-ahead for noise shape analysis (samples)                        */
+    SKP_int                         shapeWinLength;                 /* Window length for noise shape analysis (samples)                     */
     SKP_int32                       TargetRate_bps;                 /* Target bitrate (bps)                                                 */
     SKP_int                         PacketSize_ms;                  /* Number of milliseconds to put in each packet                         */
     SKP_int                         PacketLoss_perc;                /* Packet loss rate measured by farend                                  */
@@ -176,9 +178,13 @@
     SKP_int                         predictLPCOrder;                /* Filter order for prediction filters                                  */
     SKP_int                         pitchEstimationComplexity;      /* Complexity level for pitch estimator                                 */
     SKP_int                         pitchEstimationLPCOrder;        /* Whitening filter order for pitch estimator                           */
+    SKP_int32                       pitchEstimationThreshold_Q16;   /* Threshold for pitch estimator                                        */
     SKP_int                         LTPQuantLowComplexity;          /* Flag for low complexity LTP quantization                             */
     SKP_int                         NLSF_MSVQ_Survivors;            /* Number of survivors in NLSF MSVQ                                     */
     SKP_int                         first_frame_after_reset;        /* Flag for deactivating NLSF interp. and fluc. reduction after resets  */
+    SKP_int                         controlled_since_last_payload;  /* Flag for ensuring codec_control only runs once per packet            */
+	SKP_int                         warping_Q16;                    /* Warping parameter for warped noise shaping                           */
+    SKP_int                         useCBR;                         /* Flag to enable constant bitrate                                      */
 
     /* Input/output buffering */
     SKP_int16                       inputBuf[ MAX_FRAME_LENGTH ];   /* buffer containin input signal                                        */
@@ -235,7 +241,6 @@
     SKP_int     NLSFIndices[ NLSF_MSVQ_MAX_CB_STAGES ];  /* NLSF path of quantized LSF vector   */
     SKP_int     NLSFInterpCoef_Q2;
     SKP_int     GainsIndices[ MAX_NB_SUBFR ];
-	SKP_int     warping_Q16;
     SKP_int32   Seed;
     SKP_int     LTP_scaleIndex;
     SKP_int     RateLevelIndex;
@@ -250,7 +255,6 @@
 
 /* Struct for Packet Loss Concealment */
 typedef struct {
-    SKP_int     pitchL[ MAX_NB_SUBFR ];         /* Pitch lag per 5 ms for last 20 ms                        */
     SKP_int32   pitchL_Q8;                      /* Pitch lag to use for voiced concealment                  */
     SKP_int16   LTPCoef_Q14[ LTP_ORDER ];       /* LTP coeficients to use for voiced concealment            */
     SKP_int16   prevLPC_Q12[ MAX_LPC_ORDER ];
@@ -285,7 +289,6 @@
     SKP_int32       exc_Q10[ MAX_FRAME_LENGTH ];
     SKP_int32       res_Q10[ MAX_FRAME_LENGTH ];
     SKP_int16       outBuf[ 2 * MAX_FRAME_LENGTH ];             /* Buffer for output signal                                             */
-    SKP_int         sLTP_buf_idx;                               /* LTP_buf_index                                                        */
     SKP_int         lagPrev;                                    /* Previous Lag                                                         */
     SKP_int         LastGainIndex;                              /* Previous gain index                                                  */
     SKP_int         LastGainIndex_EnhLayer;                     /* Previous gain index                                                  */
@@ -353,7 +356,7 @@
     SKP_int32           Gains_Q16[ MAX_NB_SUBFR ];
     SKP_int32           Seed;
     /* holds interpolated and final coefficients, 4-byte aligned */
-    SKP_array_of_int16_4_byte_aligned( PredCoef_Q12[ 2 ], MAX_LPC_ORDER );
+    SKP_DWORD_ALIGN SKP_int16 PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ];
     SKP_int16           LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ];
     SKP_int             LTP_scale_Q14;
 
--- a/src_common/SKP_Silk_tables.h
+++ b/src_common/SKP_Silk_tables.h
@@ -100,13 +100,6 @@
 extern const SKP_uint16 SKP_Silk_vadflag_CDF[ 3 ];                                                  /*   3 */
 extern const SKP_int    SKP_Silk_vadflag_offset;
 
-extern const SKP_int    SKP_Silk_SamplingRates_table[ 4 ];                                          /*   4 */
-extern const SKP_uint16 SKP_Silk_SamplingRates_CDF[ 5 ];                                            /*   5 */
-extern const SKP_int    SKP_Silk_SamplingRates_offset;
-
-extern const SKP_uint16 SKP_Silk_NbSubframes_CDF[ 3 ];                                              /*   3 */
-extern const SKP_int    SKP_Silk_NbSubframes_offset;
-
 extern const SKP_uint16 SKP_Silk_NLSF_interpolation_factor_CDF[ 6 ];
 extern const SKP_int    SKP_Silk_NLSF_interpolation_factor_offset;
 
@@ -148,7 +141,7 @@
 extern const SKP_int16  SKP_Silk_Dec_B_HP_8[ DEC_HP_ORDER + 1 ];                                    /*   3 */
 
 /* Table for frame termination indication */
-extern const SKP_uint16 SKP_Silk_FrameTermination_CDF[ 6 ];
+extern const SKP_uint16 SKP_Silk_FrameTermination_CDF[ 3 ];
 extern const SKP_int    SKP_Silk_FrameTermination_offset;
 
 /* Table for random seed */
--- a/src_common/SKP_Silk_tables_NLSF_CB0_10.c
+++ b/src_common/SKP_Silk_tables_NLSF_CB0_10.c
@@ -28,139 +28,149 @@
 /**********************************************/
 /* This file has been automatically generated */
 /*                                            */
-/* ROM usage:  0.29 + 2.66 kB                 */
+/* ROM usage:  0.31 + 1.43 kB                 */
 /**********************************************/
 
 #include "SKP_Silk_structs.h"
+#include "SKP_Silk_tables.h"
 #include "SKP_Silk_tables_NLSF_CB0_10.h"
 
 const SKP_uint16 SKP_Silk_NLSF_MSVQ_CB0_10_CDF[ NLSF_MSVQ_CB0_10_VECTORS + NLSF_MSVQ_CB0_10_STAGES ] =
 {
             0,
-         2658,
-         4420,
-         6107,
-         7757,
-         9408,
-        10955,
-        12502,
-        13983,
-        15432,
-        16882,
-        18331,
-        19750,
-        21108,
-        22409,
-        23709,
-        25010,
-        26256,
-        27501,
-        28747,
-        29965,
-        31158,
-        32351,
-        33544,
-        34736,
-        35904,
-        36997,
-        38091,
-        39185,
-        40232,
-        41280,
-        42327,
-        43308,
-        44290,
-        45271,
-        46232,
-        47192,
-        48132,
-        49032,
-        49913,
-        50775,
-        51618,
-        52462,
-        53287,
-        54095,
-        54885,
-        55675,
-        56449,
-        57222,
-        57979,
-        58688,
-        59382,
-        60076,
-        60726,
-        61363,
-        61946,
-        62505,
-        63052,
-        63543,
-        63983,
-        64396,
-        64766,
-        65023,
+         2433,
+         4865,
+         7096,
+         8971,
+        10549,
+        12126,
+        13636,
+        15147,
+        16657,
+        18104,
+        19550,
+        20996,
+        22381,
+        23766,
+        25093,
+        26419,
+        27745,
+        29016,
+        30232,
+        31448,
+        32664,
+        33780,
+        34895,
+        36010,
+        37078,
+        38146,
+        39169,
+        40192,
+        41215,
+        42194,
+        43173,
+        44153,
+        45091,
+        46028,
+        46966,
+        47904,
+        48842,
+        49740,
+        50638,
+        51498,
+        52358,
+        53218,
+        54042,
+        54865,
+        55689,
+        56478,
+        57266,
+        58055,
+        58810,
+        59565,
+        60321,
+        61044,
+        61652,
+        62260,
+        62868,
+        63337,
+        63683,
+        64001,
+        64257,
+        64512,
+        64768,
+        65024,
         65279,
         65535,
             0,
-         4977,
-         9542,
-        14106,
-        18671,
-        23041,
-        27319,
-        31596,
-        35873,
-        39969,
-        43891,
-        47813,
-        51652,
-        55490,
-        59009,
-        62307,
+         5110,
+        10220,
+        15114,
+        19800,
+        24097,
+        28394,
+        32691,
+        36988,
+        41285,
+        45225,
+        48999,
+        52612,
+        56226,
+        59839,
+        62749,
         65535,
             0,
-         8571,
-        17142,
-        25529,
-        33917,
-        42124,
-        49984,
-        57844,
+         8964,
+        17928,
+        26148,
+        34368,
+        42588,
+        50459,
+        57997,
         65535,
             0,
-         8732,
-        17463,
-        25825,
-        34007,
-        42189,
-        50196,
-        58032,
+        10142,
+        19048,
+        27576,
+        36104,
+        44271,
+        52091,
+        58959,
         65535,
             0,
-         8948,
-        17704,
-        25733,
-        33762,
-        41791,
-        49821,
-        57678,
+         8874,
+        17371,
+        25869,
+        34366,
+        42158,
+        49951,
+        57743,
         65535,
             0,
-         4374,
-         8655,
-        12936,
-        17125,
-        21313,
-        25413,
-        29512,
-        33611,
-        37710,
-        41809,
-        45820,
-        49832,
-        53843,
-        57768,
-        61694,
+         8970,
+        17560,
+        25786,
+        34012,
+        42238,
+        50115,
+        57992,
+        65535,
+            0,
+         4875,
+         9750,
+        14418,
+        19086,
+        23754,
+        28422,
+        32892,
+        37173,
+        41272,
+        45371,
+        49297,
+        52896,
+        56496,
+        59797,
+        63098,
         65535
 };
 
@@ -171,710 +181,757 @@
      &SKP_Silk_NLSF_MSVQ_CB0_10_CDF[  82 ],
      &SKP_Silk_NLSF_MSVQ_CB0_10_CDF[  91 ],
      &SKP_Silk_NLSF_MSVQ_CB0_10_CDF[ 100 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_10_CDF[ 109 ]
+     &SKP_Silk_NLSF_MSVQ_CB0_10_CDF[ 109 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_10_CDF[ 118 ]
 };
 
 const SKP_int SKP_Silk_NLSF_MSVQ_CB0_10_CDF_middle_idx[ NLSF_MSVQ_CB0_10_STAGES ] =
 {
-      23,
+      22,
        8,
        5,
        5,
        5,
-       9
+       5,
+       8
 };
 
-const SKP_int16 SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q5[ NLSF_MSVQ_CB0_10_VECTORS ] =
+const SKP_uint8 SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q4[ NLSF_MSVQ_CB0_10_VECTORS ] =
 {
-              148,              167,
-              169,              170,
-              170,              173,
-              173,              175,
-              176,              176,
-              176,              177,
-              179,              181,
-              181,              181,
-              183,              183,
-              183,              184,
-              185,              185,
-              185,              185,
-              186,              189,
-              189,              189,
-              191,              191,
-              191,              194,
-              194,              194,
-              195,              195,
-              196,              198,
-              199,              200,
-              201,              201,
-              202,              203,
-              204,              204,
-              205,              205,
-              206,              209,
-              210,              210,
-              213,              214,
-              218,              220,
-              221,              226,
-              231,              234,
-              239,              256,
-              256,              256,
-              119,              123,
-              123,              123,
-              125,              126,
-              126,              126,
-              128,              130,
-              130,              131,
-              131,              135,
-              138,              139,
+               76,               76,
+               78,               82,
+               86,               86,
+               87,               87,
+               87,               88,
+               88,               88,
+               89,               89,
+               90,               90,
+               90,               91,
+               92,               92,
+               92,               94,
                94,               94,
                95,               95,
-               96,               98,
-               98,               99,
-               93,               93,
-               95,               96,
+               96,               96,
                96,               97,
-               98,              100,
-               92,               93,
                97,               97,
-               97,               97,
                98,               98,
-              125,              126,
-              126,              127,
-              127,              128,
+               98,               98,
+               98,               99,
+               99,              100,
+              100,              100,
+              101,              101,
+              101,              102,
+              102,              102,
+              103,              103,
+              103,              104,
+              108,              108,
+              108,              114,
+              121,              123,
               128,              128,
               128,              128,
-              129,              129,
-              129,              130,
-              130,              131
+              128,              128,
+               59,               59,
+               60,               61,
+               63,               63,
+               63,               63,
+               63,               65,
+               66,               67,
+               67,               67,
+               72,               73,
+               46,               46,
+               48,               48,
+               48,               49,
+               50,               50,
+               43,               46,
+               47,               47,
+               48,               49,
+               52,               53,
+               46,               47,
+               47,               47,
+               49,               49,
+               49,               49,
+               46,               47,
+               48,               48,
+               48,               49,
+               49,               50,
+               60,               60,
+               61,               61,
+               61,               61,
+               62,               63,
+               64,               64,
+               65,               67,
+               67,               69,
+               69,               76
 };
 
 const SKP_int SKP_Silk_NLSF_MSVQ_CB0_10_ndelta_min_Q15[ 10 + 1 ] =
 {
-              563,
-                3,
+              553,
+                5,
                22,
-               20,
+               19,
                 3,
                 3,
-              132,
-              119,
-              358,
-               86,
-              964
+              180,
+              162,
+              306,
+              171,
+              991
 };
 
-const SKP_int16 SKP_Silk_NLSF_MSVQ_CB0_10_Q15[ 10 * NLSF_MSVQ_CB0_10_VECTORS ] =
+const SKP_int8 SKP_Silk_NLSF_MSVQ_CB0_10_Q8[ 10 * NLSF_MSVQ_CB0_10_VECTORS ] =
 {
-             2210,             4023,
-             6981,             9260,
-            12573,            15687,
-            19207,            22383,
-            25981,            29142,
-             3285,             4172,
-             6116,            10856,
-            15289,            16826,
-            19701,            22010,
-            24721,            29313,
-             1554,             2511,
-             6577,            10337,
-            13837,            16511,
-            20086,            23214,
-            26480,            29464,
-             3062,             4017,
-             5771,            10037,
-            13365,            14952,
-            20140,            22891,
-            25229,            29603,
-             2085,             3457,
-             5934,             8718,
-            11501,            13670,
-            17997,            21817,
-            24935,            28745,
-             2776,             4093,
-             6421,            10413,
-            15111,            16806,
-            20825,            23826,
-            26308,            29411,
-             2717,             4034,
-             5697,             8463,
-            14301,            16354,
-            19007,            23413,
-            25812,            28506,
-             2872,             3702,
-             5881,            11034,
-            17141,            18879,
-            21146,            23451,
-            25817,            29600,
-             2999,             4015,
-             7357,            11219,
-            12866,            17307,
-            20081,            22644,
-            26774,            29107,
-             2942,             3866,
-             5918,            11915,
-            13909,            16072,
-            20453,            22279,
-            27310,            29826,
-             2271,             3527,
-             6606,             9729,
-            12943,            17382,
-            20224,            22345,
-            24602,            28290,
-             2207,             3310,
-             5844,             9339,
-            11141,            15651,
-            18576,            21177,
-            25551,            28228,
-             3963,             4975,
-             6901,            11588,
-            13466,            15577,
-            19231,            21368,
-            25510,            27759,
-             2749,             3549,
-             6966,            13808,
-            15653,            17645,
-            20090,            22599,
-            26467,            28537,
-             2126,             3504,
-             5109,             9954,
-            12550,            14620,
-            19703,            21687,
-            26457,            29106,
-             3966,             5745,
-             7442,             9757,
-            14468,            16404,
-            19135,            23048,
-            25375,            28391,
-             3197,             4751,
-             6451,             9298,
-            13038,            14874,
-            17962,            20627,
-            23835,            28464,
-             3195,             4081,
-             6499,            12252,
-            14289,            16040,
-            18357,            20730,
-            26980,            29309,
-             1533,             2471,
-             4486,             7796,
-            12332,            15758,
-            19567,            22298,
-            25673,            29051,
-             2002,             2971,
-             4985,             8083,
-            13181,            15435,
-            18237,            21517,
-            24595,            28351,
-             3808,             4925,
-             6710,            10201,
-            12011,            14300,
-            18457,            20391,
-            26525,            28956,
-             2281,             3418,
-             4979,             8726,
-            15964,            18104,
-            20250,            22771,
-            25286,            28954,
-             3051,             5479,
-             7290,             9848,
-            12744,            14503,
-            18665,            23684,
-            26065,            28947,
-             2364,             3565,
-             5502,             9621,
-            14922,            16621,
-            19005,            20996,
-            26310,            29302,
-             4093,             5212,
-             6833,             9880,
-            16303,            18286,
-            20571,            23614,
-            26067,            29128,
-             2941,             3996,
-             6038,            10638,
-            12668,            14451,
-            16798,            19392,
-            26051,            28517,
-             3863,             5212,
-             7019,             9468,
-            11039,            13214,
-            19942,            22344,
-            25126,            29539,
-             4615,             6172,
-             7853,            10252,
-            12611,            14445,
-            19719,            22441,
-            24922,            29341,
-             3566,             4512,
-             6985,             8684,
-            10544,            16097,
-            18058,            22475,
-            26066,            28167,
-             4481,             5489,
-             7432,            11414,
-            13191,            15225,
-            20161,            22258,
-            26484,            29716,
-             3320,             4320,
-             6621,             9867,
-            11581,            14034,
-            21168,            23210,
-            26588,            29903,
-             3794,             4689,
-             6916,             8655,
-            10143,            16144,
-            19568,            21588,
-            27557,            29593,
-             2446,             3276,
-             5918,            12643,
-            16601,            18013,
-            21126,            23175,
-            27300,            29634,
-             2450,             3522,
-             5437,             8560,
-            15285,            19911,
-            21826,            24097,
-            26567,            29078,
-             2580,             3796,
-             5580,             8338,
-             9969,            12675,
-            18907,            22753,
-            25450,            29292,
-             3325,             4312,
-             6241,             7709,
-             9164,            14452,
-            21665,            23797,
-            27096,            29857,
-             3338,             4163,
-             7738,            11114,
-            12668,            14753,
-            16931,            22736,
-            25671,            28093,
-             3840,             4755,
-             7755,            13471,
-            15338,            17180,
-            20077,            22353,
-            27181,            29743,
-             2504,             4079,
-             8351,            12118,
-            15046,            18595,
-            21684,            24704,
-            27519,            29937,
-             5234,             6342,
-             8267,            11821,
-            15155,            16760,
-            20667,            23488,
-            25949,            29307,
-             2681,             3562,
-             6028,            10827,
-            18458,            20458,
-            22303,            24701,
-            26912,            29956,
-             3374,             4528,
-             6230,             8256,
-             9513,            12730,
-            18666,            20720,
-            26007,            28425,
-             2731,             3629,
-             8320,            12450,
-            14112,            16431,
-            18548,            22098,
-            25329,            27718,
-             3481,             4401,
-             7321,             9319,
-            11062,            13093,
-            15121,            22315,
-            26331,            28740,
-             3577,             4945,
-             6669,             8792,
-            10299,            12645,
-            19505,            24766,
-            26996,            29634,
-             4058,             5060,
-             7288,            10190,
-            11724,            13936,
-            15849,            18539,
-            26701,            29845,
-             4262,             5390,
-             7057,             8982,
-            10187,            15264,
-            20480,            22340,
-            25958,            28072,
-             3404,             4329,
-             6629,             7946,
-            10121,            17165,
-            19640,            22244,
-            25062,            27472,
-             3157,             4168,
-             6195,             9319,
-            10771,            13325,
-            15416,            19816,
-            24672,            27634,
-             2503,             3473,
-             5130,             6767,
-             8571,            14902,
-            19033,            21926,
-            26065,            28728,
-             4133,             5102,
-             7553,            10054,
-            11757,            14924,
-            17435,            20186,
-            23987,            26272,
-             4972,             6139,
-             7894,             9633,
-            11320,            14295,
-            21737,            24306,
-            26919,            29907,
-             2958,             3816,
-             6851,             9204,
-            10895,            18052,
-            20791,            23338,
-            27556,            29609,
-             5234,             6028,
-             8034,            10154,
-            11242,            14789,
-            18948,            20966,
-            26585,            29127,
-             5241,             6838,
-            10526,            12819,
-            14681,            17328,
-            19928,            22336,
-            26193,            28697,
-             3412,             4251,
-             5988,             7094,
-             9907,            18243,
-            21669,            23777,
-            26969,            29087,
-             2470,             3217,
-             7797,            15296,
-            17365,            19135,
-            21979,            24256,
-            27322,            29442,
-             4939,             5804,
-             8145,            11809,
-            13873,            15598,
-            17234,            19423,
-            26476,            29645,
-             5051,             6167,
-             8223,             9655,
-            12159,            17995,
-            20464,            22832,
-            26616,            28462,
-             4987,             5907,
-             9319,            11245,
-            13132,            15024,
-            17485,            22687,
-            26011,            28273,
-             5137,             6884,
-            11025,            14950,
-            17191,            19425,
-            21807,            24393,
-            26938,            29288,
-             7057,             7884,
-             9528,            10483,
-            10960,            14811,
-            19070,            21675,
-            25645,            28019,
-             6759,             7160,
-             8546,            11779,
-            12295,            13023,
-            16627,            21099,
-            24697,            28287,
-             3863,             9762,
-            11068,            11445,
-            12049,            13960,
-            18085,            21507,
-            25224,            28997,
-              397,              335,
-              651,             1168,
-              640,              765,
-              465,              331,
-              214,             -194,
-             -578,             -647,
-             -657,              750,
-              564,              613,
-              549,              630,
-              304,              -52,
-              828,              922,
-              443,              111,
-              138,              124,
-              169,               14,
-              144,               83,
-              132,               58,
-             -413,             -752,
-              869,              336,
-              385,               69,
-               56,              830,
-             -227,             -266,
-             -368,             -440,
-            -1195,              163,
-              126,             -228,
-              802,              156,
-              188,              120,
-              376,               59,
-             -358,             -558,
-            -1326,             -254,
-             -202,             -789,
-              296,               92,
-              -70,             -129,
-             -718,            -1135,
-              292,              -29,
-             -631,              487,
-             -157,             -153,
-             -279,                2,
-             -419,             -342,
-              -34,             -514,
-             -799,            -1571,
-             -687,             -609,
-             -546,             -130,
-             -215,             -252,
-             -446,             -574,
-            -1337,              207,
-              -72,               32,
-              103,             -642,
-              942,              733,
-              187,               29,
-             -211,             -814,
-              143,              225,
-               20,               24,
-             -268,             -377,
-             1623,             1133,
-              667,              164,
-              307,              366,
-              187,               34,
-               62,             -313,
-             -832,            -1482,
-            -1181,              483,
-              -42,              -39,
-             -450,            -1406,
-             -587,              -52,
-             -760,              334,
-               98,              -60,
-             -500,             -488,
-            -1058,              299,
-              131,             -250,
-             -251,             -703,
-             1037,              568,
-             -413,             -265,
-             1687,              573,
-              345,              323,
-               98,               61,
-             -102,               31,
-              135,              149,
-              617,              365,
-              -39,               34,
-             -611,             1201,
-             1421,              736,
-             -414,             -393,
-             -492,             -343,
-             -316,             -532,
-              528,              172,
-               90,              322,
-             -294,             -319,
-             -541,              503,
-              639,              401,
-                1,             -149,
-              -73,             -167,
-              150,              118,
-              308,              218,
-              121,              195,
-             -143,             -261,
-            -1013,             -802,
-              387,              436,
-              130,             -427,
-             -448,             -681,
-              123,              -87,
-             -251,             -113,
-              274,              310,
-              445,              501,
-              354,              272,
-              141,             -285,
-              569,              656,
-               37,              -49,
-              251,             -386,
-             -263,             1122,
-              604,              606,
-              336,               95,
-               34,                0,
-               85,              180,
-              207,             -367,
-             -622,             1070,
-               -6,              -79,
-             -160,              -92,
-             -137,             -276,
-             -323,             -371,
-             -696,            -1036,
-              407,              102,
-              -86,             -214,
-             -482,             -647,
-              -28,             -291,
-              -97,             -180,
-             -250,             -435,
-              -18,              -76,
-             -332,              410,
-              407,              168,
-              539,              411,
-              254,              111,
-               58,             -145,
-              200,               30,
-              187,              116,
-              131,             -367,
-             -475,              781,
-             -559,              561,
-              195,             -115,
-                8,             -168,
-               30,               55,
-             -122,              131,
-               82,               -5,
-             -273,              -50,
-             -632,              668,
-                4,               32,
-              -26,             -279,
-              315,              165,
-              197,              377,
-              155,              -41,
-             -138,             -324,
-             -109,             -617,
-              360,               98,
-              -53,             -319,
-             -114,             -245,
-              -82,              507,
-              468,              263,
-             -137,             -389,
-              652,              354,
-              -18,             -227,
-             -462,             -135,
-              317,               53,
-              -16,               66,
-              -72,             -126,
-             -356,             -347,
-             -328,              -72,
-             -337,              324,
-              152,              349,
-              169,             -196,
-              179,              254,
-              260,              325,
-              -74,              -80,
-               75,              -31,
-              270,              275,
-               87,              278,
-             -446,             -301,
-              309,               71,
-              -25,             -242,
-              516,              161,
-             -162,              -83,
-              329,              230,
-             -311,             -259,
-              177,              -26,
-             -462,               89,
-              257,                6,
-             -130,              -93,
-             -456,             -317,
-             -221,             -206,
-             -417,             -182,
-              -74,              234,
-               48,              261,
-              359,              231,
-              258,               85,
-             -282,              252,
-             -147,             -222,
-              251,             -207,
-              443,              123,
-             -417,              -36,
-              273,             -241,
-              240,             -112,
-               44,             -167,
-              126,             -124,
-              -77,               58,
-             -401,              333,
-             -118,               82,
-              126,              151,
-             -433,              359,
-             -130,             -102,
-              131,             -244,
-               86,               85,
-             -462,              414,
-             -240,               16,
-              145,               28,
-             -205,             -481,
-              373,              293,
-              -72,             -174,
-               62,              259,
-               -8,              -18,
-              362,              233,
-              185,               43,
-              278,               27,
-              193,              570,
-             -248,              189,
-               92,               31,
-             -275,               -3,
-              243,              176,
-              438,              209,
-              206,              -51,
-               79,              109,
-              168,             -185,
-             -308,              -68,
-             -618,              385,
-             -310,             -108,
-             -164,              165,
-               61,             -152,
-             -101,             -412,
-             -268,             -257,
-              -40,              -20,
-              -28,             -158,
-             -301,              271,
-              380,             -338,
-             -367,             -132,
-               64,              114,
-             -131,             -225,
-             -156,             -260,
-              -63,             -116,
-              155,             -586,
-             -202,              254,
-             -287,              178,
-              227,             -106,
-             -294,              164,
-              298,             -100,
-              185,              317,
-              193,              -45,
-               28,               80,
-              -87,             -433,
-               22,              -48,
-               48,             -237,
-             -229,             -139,
-              120,             -364,
-              268,             -136,
-              396,              125,
-              130,              -89,
-             -272,              118,
-             -256,              -68,
-             -451,              488,
-              143,             -165,
-              -48,             -190,
-              106,              219,
-               47,              435,
-              245,               97,
-               75,             -418,
-              121,             -187,
-              570,             -200,
-             -351,              225,
-              -21,             -217,
-              234,             -111,
-              194,               14,
-              242,              118,
-              140,             -397,
-              355,              361,
-              -45,             -195
+             -108,              -90,
+              -71,              -49,
+              -24,               -5,
+               21,               48,
+               75,               99,
+             -108,              -99,
+              -76,              -57,
+              -39,               -7,
+               20,               50,
+               76,               98,
+             -105,              -97,
+              -83,              -49,
+              -19,               -7,
+               27,               47,
+               67,              102,
+              -97,              -90,
+              -75,              -49,
+               -6,                6,
+               27,               55,
+               73,               95,
+              -95,              -89,
+              -72,              -40,
+              -28,              -11,
+               21,               37,
+               70,               86,
+             -103,              -97,
+              -82,              -48,
+                8,               21,
+               36,               56,
+               74,              101,
+             -103,              -96,
+              -81,              -33,
+              -19,               -3,
+               28,               41,
+               86,              102,
+             -111,             -102,
+              -85,              -62,
+              -38,              -21,
+               11,               41,
+               66,               95,
+              -88,              -82,
+              -63,              -28,
+              -10,                1,
+               35,               53,
+               73,              103,
+             -101,              -96,
+              -67,              -17,
+               -4,               10,
+               30,               45,
+               86,              103,
+              -94,              -87,
+              -70,              -55,
+              -44,              -25,
+               37,               55,
+               73,              104,
+              -98,              -92,
+              -71,              -37,
+              -23,              -10,
+               37,               54,
+               73,              104,
+             -114,             -108,
+              -79,              -49,
+              -20,                2,
+               29,               54,
+               80,              103,
+             -107,              -99,
+              -86,              -60,
+               -7,               11,
+               27,               49,
+               67,               95,
+             -100,              -94,
+              -76,              -40,
+               -5,                6,
+               26,               43,
+               62,              102,
+              -88,              -79,
+              -64,              -44,
+              -28,              -15,
+               26,               43,
+               64,              104,
+             -103,              -98,
+              -71,              -26,
+              -14,                4,
+               23,               43,
+               72,               87,
+             -110,             -103,
+              -83,              -58,
+              -27,               -5,
+               16,               35,
+               58,               92,
+             -103,              -94,
+              -79,              -62,
+              -21,               -7,
+               12,               52,
+               69,               88,
+             -107,              -98,
+              -84,              -44,
+              -29,              -12,
+                9,               28,
+               73,               90,
+              -99,              -93,
+              -68,              -32,
+              -19,               -5,
+               12,               28,
+               86,              104,
+             -100,              -91,
+              -75,              -55,
+              -40,              -26,
+               20,               40,
+               58,              101,
+             -100,              -94,
+              -73,              -60,
+              -49,               -1,
+               18,               36,
+               83,               96,
+             -106,              -97,
+              -69,              -47,
+              -25,               11,
+               31,               46,
+               65,               89,
+              -93,              -87,
+              -69,              -46,
+              -32,              -18,
+               -2,               14,
+               74,              103,
+              -93,              -87,
+              -65,              -29,
+                6,               18,
+               38,               57,
+               74,              102,
+              -92,              -85,
+              -66,              -54,
+              -43,               -4,
+               32,               45,
+               88,              104,
+             -108,              -99,
+              -85,              -50,
+              -35,              -19,
+               29,               41,
+               84,              102,
+              -97,              -90,
+              -73,              -57,
+              -48,              -24,
+               21,               35,
+               79,               94,
+              -84,              -76,
+              -57,              -40,
+              -29,              -11,
+               41,               60,
+               80,              104,
+             -100,              -94,
+              -75,              -64,
+              -51,                2,
+               20,               45,
+               68,               85,
+             -100,              -94,
+              -62,              -41,
+              -30,               13,
+               31,               52,
+               85,              101,
+              -95,              -86,
+              -70,              -52,
+              -38,              -23,
+               18,               64,
+               83,              101,
+             -114,             -108,
+              -94,              -69,
+              -31,               -5,
+               24,               46,
+               72,               99,
+             -100,              -95,
+              -54,              -38,
+              -26,              -10,
+                3,               51,
+               75,               89,
+             -104,              -98,
+              -73,              -31,
+               18,               31,
+               46,               65,
+               82,              105,
+              -90,              -84,
+              -62,              -51,
+              -38,                3,
+               25,               44,
+               72,               86,
+             -109,             -103,
+              -83,              -29,
+                2,               11,
+               38,               53,
+               84,              101,
+              -86,              -75,
+              -61,              -46,
+              -17,               -4,
+               18,               52,
+               69,               91,
+             -109,             -100,
+              -83,              -54,
+              -10,                1,
+               19,               35,
+               81,              100,
+             -101,              -95,
+              -78,              -68,
+              -58,              -16,
+               39,               56,
+               85,              103,
+              -87,              -80,
+              -58,              -41,
+              -29,               -7,
+               14,               30,
+               86,              104,
+             -105,              -99,
+              -61,               -7,
+                6,               21,
+               44,               61,
+               87,              102,
+              -86,              -80,
+              -48,              -30,
+              -18,                5,
+               25,               43,
+               82,               97,
+              -98,              -92,
+              -66,              -49,
+              -36,              -13,
+                0,               35,
+               59,               79,
+              -98,              -93,
+              -66,              -52,
+              -40,              -24,
+              -12,               46,
+               81,               98,
+             -107,              -95,
+              -64,              -39,
+              -14,               14,
+               42,               65,
+               88,              106,
+             -104,              -96,
+              -82,              -65,
+              -54,              -35,
+               21,               51,
+               72,               99,
+              -94,              -87,
+              -74,              -59,
+              -21,              -10,
+               14,               35,
+               58,               96,
+             -108,             -100,
+              -86,              -71,
+              -59,              -16,
+               20,               41,
+               74,               97,
+             -103,              -95,
+              -80,              -57,
+              -45,              -24,
+               -6,               19,
+               66,               89,
+              -99,              -93,
+              -74,              -65,
+              -50,               20,
+               40,               57,
+               85,               98,
+             -102,              -96,
+              -41,              -21,
+              -11,                9,
+               25,               59,
+               83,               98,
+              -94,              -87,
+              -71,              -59,
+              -47,               -8,
+               50,               68,
+               86,              105,
+             -108,             -101,
+              -84,              -59,
+              -11,               29,
+               44,               61,
+               82,               99,
+              -98,              -94,
+              -82,              -73,
+              -26,                6,
+               30,               53,
+               79,               98,
+              -85,              -71,
+              -37,              -12,
+                3,               22,
+               41,               61,
+               85,              100,
+              -85,              -79,
+              -66,              -55,
+              -19,               17,
+               33,               56,
+               83,               97,
+              -72,              -66,
+              -60,              -57,
+              -50,                4,
+               26,               52,
+               79,              103,
+              -95,              -74,
+              -31,              -18,
+              -11,               -6,
+                9,               52,
+               77,              100,
+              -78,              -75,
+              -68,              -51,
+              -43,              -38,
+               12,               45,
+               74,              100,
+              -99,              -68,
+              -40,              -33,
+              -24,              -16,
+               23,               58,
+               79,               97,
+              -99,              -48,
+              -42,              -40,
+              -36,              -19,
+               26,               52,
+               80,              105,
+              -73,              -69,
+              -62,              -43,
+              -31,              -25,
+               21,               48,
+               76,              101,
+                8,                7,
+                5,                2,
+                1,               -1,
+                1,                0,
+                0,               -1,
+                0,               -1,
+               -1,                0,
+               -2,               -4,
+               -8,              -11,
+               -2,               -4,
+                3,                2,
+               -2,               -6,
+               -4,               -7,
+               -2,               -2,
+               -6,                5,
+                0,               -1,
+                2,                8,
+                5,                3,
+                2,               -2,
+                8,                5,
+                0,               -1,
+                0,                0,
+               -2,               -4,
+               -1,               -2,
+               -9,              -13,
+               -1,               -1,
+               -4,               -1,
+                9,                4,
+                0,               -3,
+               -9,                4,
+                0,               -1,
+               -2,                1,
+               -2,               -4,
+               11,                7,
+                4,                3,
+                0,               -1,
+               -3,              -11,
+                4,                3,
+                1,                5,
+                1,               -2,
+                1,                0,
+               12,                8,
+                5,                3,
+               -1,                2,
+               -1,               -4,
+               -5,               -6,
+              -13,                5,
+                3,                1,
+                0,                0,
+                1,                0,
+               -1,               -2,
+               -5,               -5,
+              -10,                8,
+                2,                0,
+                3,               -1,
+                1,                0,
+                0,               -3,
+               -5,               -2,
+               -5,               -8,
+               10,                5,
+                1,                0,
+                1,               -2,
+               -3,               -5,
+               -9,               12,
+                6,                2,
+                3,                2,
+                5,               -1,
+               -1,               12,
+                8,                4,
+                0,               -1,
+               -5,               -7,
+                6,                3,
+               -2,               -3,
+                3,                1,
+               -2,                4,
+               -8,                7,
+                2,                1,
+                2,               -1,
+               -2,                0,
+               -2,                0,
+               -3,               -3,
+               -3,                5,
+                4,                2,
+                2,                0,
+               -2,               -4,
+                1,                1,
+               -1,               -3,
+               -3,               -7,
+                6,                2,
+                3,                2,
+               -1,               -1,
+                2,                0,
+                0,                6,
+                3,                6,
+                6,                3,
+                4,                5,
+                2,                2,
+                5,                2,
+                1,                2,
+                0,                1,
+                3,                3,
+                2,               -2,
+               -2,                1,
+                0,               -4,
+               -4,               -7,
+                0,                0,
+                4,                2,
+                0,               -2,
+               -2,               -7,
+               -1,                6,
+               -4,               -4,
+               -5,               -5,
+               -4,                0,
+               -1,               -2,
+               -2,                2,
+               -1,               -1,
+                0,                0,
+               -1,               -3,
+              -10,                3,
+                0,               -3,
+                0,                0,
+                0,                2,
+                0,               -1,
+               -1,               -2,
+               -7,                3,
+                0,                1,
+               -1,                0,
+               -1,                2,
+                3,                2,
+               -2,               -6,
+               -1,               -1,
+               -2,               -1,
+               -4,               -4,
+               -1,               -4,
+                3,               -1,
+                0,                0,
+               -3,               -5,
+                5,                1,
+                1,               -1,
+                2,                2,
+                1,                1,
+                1,                5,
+                2,                1,
+                2,               -1,
+                4,                1,
+               -2,               -2,
+               -3,                2,
+                0,                0,
+               -2,                5,
+                1,                2,
+               -2,               -2,
+                7,               -1,
+                0,                0,
+                0,                0,
+               -1,               -2,
+                3,                4,
+                2,               -1,
+               -2,                0,
+               -3,                2,
+                2,                1,
+                0,                0,
+                0,               -1,
+               -2,                0,
+                5,                0,
+               -1,                1,
+               -2,               -2,
+                2,                1,
+                0,                3,
+                0,               -3,
+                1,               -1,
+               -1,                0,
+                2,                1,
+                3,                1,
+                0,                3,
+                1,                2,
+                2,                2,
+                0,                2,
+                1,                0,
+               -2,               -3,
+               -1,               -2,
+                1,                0,
+                2,                0,
+               -3,               -3,
+               -2,                2,
+                0,                1,
+                1,                0,
+               -5,                3,
+                0,                1,
+                0,                0,
+                2,                1,
+                1,                0,
+               -1,               -5,
+                0,                2,
+               -2,                0,
+                0,                1,
+               -2,               -2,
+               -2,               -1,
+                1,               -3,
+                0,                0,
+               -2,               -3,
+               -3,                3,
+                0,                0,
+               -2,               -1,
+                0,                0,
+               -1,                0,
+                2,                1,
+                2,                0,
+                0,                3,
+                2,                0,
+                0,                2,
+                1,               -1,
+               -2,               -1,
+               -2,                2,
+               -2,                0,
+                0,               -1,
+                0,               -2,
+                1,                3,
+                0,               -1,
+                0,                1,
+               -2,               -1,
+                2,                1,
+               -1,                0,
+                1,               -3,
+               -1,                0,
+                0,                1,
+                1,                0,
+                1,                0,
+                0,                0,
+                1,                1,
+                2,               -3,
+               -1,               -2,
+               -1,               -2,
+                0,               -1,
+                2,                1,
+                1,                2,
+               -2,                1,
+                0,                0,
+                3,                1,
+               -2,               -2,
+                0,                0,
+                0,                0,
+                0,               -1,
+                0,                0,
+                0,                3,
+               -3,                0,
+               -1,                1,
+                3,               -2,
+                0,               -1,
+               -1,               -1,
+               -1,                0,
+                0,               -1,
+               -2,                1,
+                2,                1,
+                2,                0,
+               -1,                0,
+               -1,                0,
+                0,               -1,
+               -1,               -1,
+               -1,                0,
+                5,                1,
+                1,                0,
+                0,                0,
+               -1,                0,
+                1,               -4,
+               -1,                0,
+                0,               -1,
+               -1,                0,
+                0,                0,
+               -1,               -1,
+               -1,                5,
+                1,                0,
+               -2,               -1,
+               -1,               -2,
+               -1,                0,
+                0,               -3,
+                0,                1,
+                1,                2,
+                1,               -2,
+                2,                0,
+                0,                0,
+                0,                3,
+               -1,               -1,
+                1,                1,
+                1,                0,
+                1,                0,
+               -1,               -2,
+                0,                1,
+                1,                0,
+               -3,               -1,
+                1,                0,
+               -3,               -1,
+                0,               -1,
+                1,                1,
+                1,               -1,
+                0,               -1,
+                2,                1,
+                1,                1,
+                0,                2,
+               -2,                1,
+                0,                0,
+               -1,                1,
+               -1,                2,
+               -2,                1,
+               -1,                0,
+                0,                0,
+                2,                1,
+               -1,                0,
+               -2,                0,
+                1,                2,
+                1,                0,
+                0,               -2,
+                1,                0,
+               -2,                0,
+                1,                1,
+                1,               -1,
+                2,               -2,
+                2,                0,
+                1,               -1,
+                0,                1,
+                0,                1
 };
 
 const SKP_Silk_NLSF_CBS SKP_Silk_NLSF_CB0_10_Stage_info[ NLSF_MSVQ_CB0_10_STAGES ] =
 {
-        {  64, &SKP_Silk_NLSF_MSVQ_CB0_10_Q15[ 10 *   0 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q5[   0 ] },
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_10_Q15[ 10 *  64 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q5[  64 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10_Q15[ 10 *  80 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q5[  80 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10_Q15[ 10 *  88 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q5[  88 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10_Q15[ 10 *  96 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q5[  96 ] },
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_10_Q15[ 10 * 104 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q5[ 104 ] }
+        {  64, &SKP_Silk_NLSF_MSVQ_CB0_10_Q8[ 10 *   0 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q4[   0 ] },
+        {  16, &SKP_Silk_NLSF_MSVQ_CB0_10_Q8[ 10 *  64 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q4[  64 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10_Q8[ 10 *  80 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q4[  80 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10_Q8[ 10 *  88 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q4[  88 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10_Q8[ 10 *  96 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q4[  96 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10_Q8[ 10 * 104 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q4[ 104 ] },
+        {  16, &SKP_Silk_NLSF_MSVQ_CB0_10_Q8[ 10 * 112 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates_Q4[ 112 ] }
 };
 
 const SKP_Silk_NLSF_CB_struct SKP_Silk_NLSF_CB0_10 =
--- a/src_common/SKP_Silk_tables_NLSF_CB0_10.h
+++ b/src_common/SKP_Silk_tables_NLSF_CB0_10.h
@@ -35,8 +35,8 @@
 {
 #endif
 
-#define NLSF_MSVQ_CB0_10_STAGES       6
-#define NLSF_MSVQ_CB0_10_VECTORS      120
+#define NLSF_MSVQ_CB0_10_STAGES       7
+#define NLSF_MSVQ_CB0_10_VECTORS      128
 
 /* NLSF codebook entropy coding tables */
 extern const SKP_uint16         SKP_Silk_NLSF_MSVQ_CB0_10_CDF[ NLSF_MSVQ_CB0_10_VECTORS + NLSF_MSVQ_CB0_10_STAGES ];
--- a/src_common/SKP_Silk_tables_NLSF_CB0_16.c
+++ b/src_common/SKP_Silk_tables_NLSF_CB0_16.c
@@ -28,239 +28,176 @@
 /**********************************************/
 /* This file has been automatically generated */
 /*                                            */
-/* ROM usage:  0.51 + 7.38 kB                 */
+/* ROM usage:  0.38 + 2.62 kB                 */
 /**********************************************/
 
 #include "SKP_Silk_structs.h"
+#include "SKP_Silk_tables.h"
 #include "SKP_Silk_tables_NLSF_CB0_16.h"
 
 const SKP_uint16 SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ NLSF_MSVQ_CB0_16_VECTORS + NLSF_MSVQ_CB0_16_STAGES ] =
 {
             0,
-         1449,
-         2749,
-         4022,
-         5267,
-         6434,
-         7600,
-         8647,
-         9695,
-        10742,
-        11681,
-        12601,
-        13444,
-        14251,
-        15008,
-        15764,
-        16521,
-        17261,
-        18002,
-        18710,
-        19419,
+         2661,
+         5102,
+         7439,
+         9404,
+        11130,
+        12855,
+        14508,
+        15959,
+        17349,
+        18738,
         20128,
-        20837,
-        21531,
-        22225,
-        22919,
-        23598,
-        24277,
-        24956,
-        25620,
-        26256,
-        26865,
-        27475,
-        28071,
-        28667,
-        29263,
-        29859,
-        30443,
-        31026,
-        31597,
-        32168,
-        32727,
-        33273,
-        33808,
-        34332,
-        34855,
-        35379,
-        35902,
-        36415,
-        36927,
-        37439,
-        37941,
-        38442,
-        38932,
-        39423,
-        39914,
-        40404,
-        40884,
-        41364,
-        41844,
-        42324,
-        42805,
-        43285,
-        43754,
-        44224,
-        44694,
-        45164,
-        45623,
-        46083,
-        46543,
-        46993,
-        47443,
-        47892,
-        48333,
-        48773,
-        49213,
-        49653,
-        50084,
-        50515,
-        50946,
-        51377,
-        51798,
-        52211,
-        52614,
-        53018,
-        53422,
-        53817,
-        54212,
-        54607,
-        55002,
-        55388,
-        55775,
-        56162,
-        56548,
-        56910,
-        57273,
-        57635,
-        57997,
-        58352,
-        58698,
-        59038,
-        59370,
-        59702,
-        60014,
-        60325,
-        60630,
-        60934,
-        61239,
-        61537,
-        61822,
-        62084,
-        62346,
-        62602,
-        62837,
-        63072,
-        63302,
-        63517,
-        63732,
-        63939,
-        64145,
-        64342,
-        64528,
-        64701,
-        64867,
-        65023,
-        65151,
-        65279,
-        65407,
+        21458,
+        22679,
+        23847,
+        25016,
+        26184,
+        27303,
+        28422,
+        29541,
+        30660,
+        31731,
+        32803,
+        33874,
+        34901,
+        35927,
+        36953,
+        37979,
+        38961,
+        39944,
+        40885,
+        41826,
+        42767,
+        43708,
+        44609,
+        45510,
+        46411,
+        47274,
+        48136,
+        48999,
+        49862,
+        50725,
+        51551,
+        52377,
+        53204,
+        53995,
+        54786,
+        55544,
+        56269,
+        56995,
+        57690,
+        58355,
+        58992,
+        59629,
+        60266,
+        60904,
+        61514,
+        62124,
+        62708,
+        63292,
+        63828,
+        64364,
+        64834,
+        65230,
         65535,
             0,
-         5099,
-         9982,
-        14760,
-        19538,
-        24213,
-        28595,
-        32976,
-        36994,
-        41012,
-        44944,
-        48791,
-        52557,
-        56009,
-        59388,
-        62694,
+         5542,
+        10849,
+        16156,
+        21023,
+        25683,
+        29957,
+        33876,
+        37795,
+        41547,
+        45300,
+        48894,
+        52487,
+        55928,
+        59224,
+        62379,
         65535,
             0,
-         9955,
-        19697,
-        28825,
-        36842,
-        44686,
-        52198,
-        58939,
+        10647,
+        19220,
+        27793,
+        36003,
+        44213,
+        51422,
+        58631,
         65535,
             0,
-         8949,
-        17335,
-        25720,
-        33926,
-        41957,
-        49987,
-        57845,
+         8897,
+        17795,
+        26315,
+        34835,
+        42993,
+        51152,
+        58965,
         65535,
             0,
-         9724,
-        18642,
-        26998,
-        35355,
-        43532,
-        51534,
-        59365,
+         9726,
+        19453,
+        27632,
+        35811,
+        43643,
+        51475,
+        58657,
         65535,
             0,
-         8750,
-        17499,
-        26249,
-        34448,
-        42471,
-        50494,
-        58178,
+         9306,
+        18611,
+        27522,
+        36433,
+        44258,
+        52084,
+        58955,
         65535,
             0,
-         8730,
-        17273,
-        25816,
-        34176,
-        42536,
-        50203,
-        57869,
+         9344,
+        17912,
+        26481,
+        35049,
+        43254,
+        51111,
+        58635,
         65535,
             0,
-         8769,
-        17538,
-        26307,
-        34525,
-        42742,
-        50784,
-        58319,
+         8946,
+        17891,
+        26837,
+        35403,
+        43606,
+        51128,
+        58332,
         65535,
             0,
-         8736,
-        17101,
-        25466,
-        33653,
-        41839,
-        50025,
-        57864,
+         8919,
+        17460,
+        25638,
+        33817,
+        41996,
+        50174,
+        58353,
         65535,
             0,
-         4368,
-         8735,
-        12918,
-        17100,
-        21283,
-        25465,
-        29558,
-        33651,
-        37744,
-        41836,
-        45929,
-        50022,
-        54027,
-        57947,
-        61782,
+         4876,
+         9752,
+        14421,
+        18893,
+        23175,
+        27456,
+        31738,
+        35839,
+        39939,
+        43865,
+        47792,
+        51552,
+        55312,
+        59072,
+        62373,
         65535
 };
 
@@ -267,22 +204,21 @@
 const SKP_uint16 * const SKP_Silk_NLSF_MSVQ_CB0_16_CDF_start_ptr[ NLSF_MSVQ_CB0_16_STAGES ] =
 {
      &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[   0 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 129 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 146 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 155 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 164 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 173 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 182 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 191 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 200 ],
-     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 209 ]
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[  65 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[  82 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[  91 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 100 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 109 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 118 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 127 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 136 ],
+     &SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ 145 ]
 };
 
 const SKP_int SKP_Silk_NLSF_MSVQ_CB0_16_CDF_middle_idx[ NLSF_MSVQ_CB0_16_STAGES ] =
 {
-      42,
+      23,
        8,
-       4,
        5,
        5,
        5,
@@ -289,1022 +225,735 @@
        5,
        5,
        5,
-       9
+       5,
+       8
 };
 
-const SKP_int16 SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ NLSF_MSVQ_CB0_16_VECTORS ] =
+const SKP_uint8 SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[ NLSF_MSVQ_CB0_16_VECTORS ] =
 {
-              176,              181,
-              182,              183,
-              186,              186,
-              191,              191,
-              191,              196,
-              197,              201,
-              203,              206,
-              206,              206,
-              207,              207,
-              209,              209,
-              209,              209,
-              210,              210,
-              210,              211,
-              211,              211,
-              212,              214,
-              216,              216,
-              217,              217,
-              217,              217,
-              218,              218,
-              219,              219,
-              220,              221,
-              222,              223,
-              223,              223,
-              223,              224,
-              224,              224,
-              225,              225,
-              226,              226,
-              226,              226,
-              227,              227,
-              227,              227,
-              227,              227,
-              228,              228,
-              228,              228,
-              229,              229,
-              229,              230,
-              230,              230,
-              231,              231,
-              231,              231,
-              232,              232,
-              232,              232,
-              233,              234,
-              235,              235,
-              235,              236,
-              236,              236,
-              236,              237,
-              237,              237,
-              237,              240,
-              240,              240,
-              240,              241,
-              242,              243,
-              244,              244,
-              247,              247,
-              248,              248,
-              248,              249,
-              251,              255,
-              255,              256,
-              260,              260,
-              261,              264,
-              264,              266,
-              266,              268,
-              271,              274,
-              276,              279,
-              288,              288,
-              288,              288,
-              118,              120,
-              121,              121,
-              122,              125,
-              125,              129,
-              129,              130,
-              131,              132,
-              136,              137,
-              138,              145,
-               87,               88,
-               91,               97,
-               98,              100,
-              105,              106,
-               92,               95,
-               95,               96,
-               97,               97,
-               98,               99,
-               88,               92,
-               95,               95,
-               96,               97,
-               98,              109,
+               74,               76,
+               77,               81,
+               84,               84,
+               85,               88,
+               89,               89,
+               89,               90,
+               92,               93,
                93,               93,
-               93,               96,
-               97,               97,
-               99,              101,
-               93,               94,
-               94,               95,
-               95,               99,
-               99,               99,
-               93,               93,
-               93,               96,
-               96,               97,
-              100,              102,
-               93,               95,
+               94,               94,
+               94,               94,
+               95,               95,
                95,               96,
                96,               96,
+               96,               97,
+               97,               98,
+               98,               98,
                98,               99,
-              125,              125,
-              127,              127,
-              127,              127,
-              128,              128,
-              128,              128,
-              128,              128,
-              129,              130,
-              131,              132
+               99,               99,
+              100,              100,
+              100,              100,
+              100,              101,
+              101,              101,
+              102,              102,
+              103,              104,
+              104,              105,
+              106,              107,
+              107,              107,
+              107,              108,
+              108,              109,
+              109,              111,
+              111,              114,
+              118,              124,
+               57,               58,
+               58,               60,
+               61,               63,
+               65,               65,
+               66,               66,
+               67,               67,
+               68,               69,
+               70,               70,
+               42,               47,
+               47,               48,
+               48,               51,
+               51,               52,
+               46,               46,
+               47,               47,
+               48,               48,
+               49,               53,
+               44,               44,
+               48,               48,
+               49,               49,
+               51,               52,
+               45,               45,
+               46,               46,
+               49,               49,
+               52,               53,
+               45,               47,
+               47,               47,
+               48,               49,
+               50,               52,
+               46,               46,
+               46,               47,
+               48,               50,
+               51,               51,
+               46,               47,
+               48,               48,
+               48,               48,
+               48,               51,
+               60,               60,
+               61,               62,
+               63,               63,
+               63,               64,
+               64,               65,
+               65,               66,
+               66,               66,
+               69,               70
 };
 
 const SKP_int SKP_Silk_NLSF_MSVQ_CB0_16_ndelta_min_Q15[ 16 + 1 ] =
 {
-              266,
+              236,
+                4,
+               75,
                 3,
-               40,
                 3,
-                3,
-               16,
-               78,
-               89,
-              107,
-              141,
-              188,
-              146,
-              272,
-              240,
-              235,
-              215,
-              632
+                5,
+              115,
+               95,
+              113,
+              138,
+              176,
+              169,
+              249,
+              256,
+              271,
+              263,
+              630
 };
 
-const SKP_int16 SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * NLSF_MSVQ_CB0_16_VECTORS ] =
+const SKP_int8 SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 * NLSF_MSVQ_CB0_16_VECTORS ] =
 {
-             1170,             2278,             3658,             5374,
-             7666,             9113,            11298,            13304,
-            15371,            17549,            19587,            21487,
-            23798,            26038,            28318,            30201,
-             1628,             2334,             4115,             6036,
-             7818,             9544,            11777,            14021,
-            15787,            17408,            19466,            21261,
-            22886,            24565,            26714,            28059,
-             1724,             2670,             4056,             6532,
-             8357,            10119,            12093,            14061,
-            16491,            18795,            20417,            22402,
-            24251,            26224,            28410,            29956,
-             1493,             3427,             4789,             6399,
-             8435,            10168,            12000,            14066,
-            16229,            18210,            20040,            22098,
-            24153,            26095,            28183,            30121,
-             1119,             2089,             4295,             6245,
-             8691,            10741,            12688,            15057,
-            17028,            18792,            20717,            22514,
-            24497,            26548,            28619,            30630,
-             1363,             2417,             3927,             5556,
-             7422,             9315,            11879,            13767,
-            16143,            18520,            20458,            22578,
-            24539,            26436,            28318,            30318,
-             1122,             2503,             5216,             7148,
-             9310,            11078,            13175,            14800,
-            16864,            18700,            20436,            22488,
-            24572,            26602,            28555,            30426,
-              600,             1317,             2970,             5609,
-             7694,             9784,            12169,            14087,
-            16379,            18378,            20551,            22686,
-            24739,            26697,            28646,            30355,
-              941,             1882,             4274,             5540,
-             8482,             9858,            11940,            14287,
-            16091,            18501,            20326,            22612,
-            24711,            26638,            28814,            30430,
-              635,             1699,             4376,             5948,
-             8097,            10115,            12274,            14178,
-            16111,            17813,            19695,            21773,
-            23927,            25866,            28022,            30134,
-             1408,             2222,             3524,             5615,
-             7345,             8849,            10989,            12772,
-            15352,            17026,            18919,            21062,
-            23329,            25215,            27209,            29023,
-              701,             1307,             3548,             6301,
-             7744,             9574,            11227,            12978,
-            15170,            17565,            19775,            22097,
-            24230,            26335,            28377,            30231,
-             1752,             2364,             4879,             6569,
-             7813,             9796,            11199,            14290,
-            15795,            18000,            20396,            22417,
-            24308,            26124,            28360,            30633,
-              901,             1629,             3356,             4635,
-             7256,             8767,             9971,            11558,
-            15215,            17544,            19523,            21852,
-            23900,            25978,            28133,            30184,
-              981,             1669,             3323,             4693,
-             6213,             8692,            10614,            12956,
-            15211,            17711,            19856,            22122,
-            24344,            26592,            28723,            30481,
-             1607,             2577,             4220,             5512,
-             8532,            10388,            11627,            13671,
-            15752,            17199,            19840,            21859,
-            23494,            25786,            28091,            30131,
-              811,             1471,             3144,             5041,
-             7430,             9389,            11174,            13255,
-            15157,            16741,            19583,            22167,
-            24115,            26142,            28383,            30395,
-             1543,             2144,             3629,             6347,
-             7333,             9339,            10710,            13596,
-            15099,            17340,            20102,            21886,
-            23732,            25637,            27818,            29917,
-              492,             1185,             2940,             5488,
-             7095,             8751,            11596,            13579,
-            16045,            18015,            20178,            22127,
-            24265,            26406,            28484,            30357,
-             1547,             2282,             3693,             6341,
-             7758,             9607,            11848,            13236,
-            16564,            18069,            19759,            21404,
-            24110,            26606,            28786,            30655,
-              685,             1338,             3409,             5262,
-             6950,             9222,            11414,            14523,
-            16337,            17893,            19436,            21298,
-            23293,            25181,            27973,            30520,
-              887,             1581,             3057,             4318,
-             7192,             8617,            10047,            13106,
-            16265,            17893,            20233,            22350,
-            24379,            26384,            28314,            30189,
-             2285,             3745,             5662,             7576,
-             9323,            11320,            13239,            15191,
-            17175,            19225,            21108,            22972,
-            24821,            26655,            28561,            30460,
-             1496,             2108,             3448,             6898,
-             8328,             9656,            11252,            12823,
-            14979,            16482,            18180,            20085,
-            22962,            25160,            27705,            29629,
-              575,             1261,             3861,             6627,
-             8294,            10809,            12705,            14768,
-            17076,            19047,            20978,            23055,
-            24972,            26703,            28720,            30345,
-             1682,             2213,             3882,             6238,
-             7208,             9646,            10877,            13431,
-            14805,            16213,            17941,            20873,
-            23550,            25765,            27756,            29461,
-              888,             1616,             3924,             5195,
-             7206,             8647,             9842,            11473,
-            16067,            18221,            20343,            22774,
-            24503,            26412,            28054,            29731,
-              805,             1454,             2683,             4472,
-             7936,             9360,            11398,            14345,
-            16205,            17832,            19453,            21646,
-            23899,            25928,            28387,            30463,
-             1640,             2383,             3484,             5082,
-             6032,             8606,            11640,            12966,
-            15842,            17368,            19346,            21182,
-            23638,            25889,            28368,            30299,
-             1632,             2204,             4510,             7580,
-             8718,            10512,            11962,            14096,
-            15640,            17194,            19143,            22247,
-            24563,            26561,            28604,            30509,
-             2043,             2612,             3985,             6851,
-             8038,             9514,            10979,            12789,
-            15426,            16728,            18899,            20277,
-            22902,            26209,            28711,            30618,
-             2224,             2798,             4465,             5320,
-             7108,             9436,            10986,            13222,
-            14599,            18317,            20141,            21843,
-            23601,            25700,            28184,            30582,
-              835,             1541,             4083,             5769,
-             7386,             9399,            10971,            12456,
-            15021,            18642,            20843,            23100,
-            25292,            26966,            28952,            30422,
-             1795,             2343,             4809,             5896,
-             7178,             8545,            10223,            13370,
-            14606,            16469,            18273,            20736,
-            23645,            26257,            28224,            30390,
-             1734,             2254,             4031,             5188,
-             6506,             7872,             9651,            13025,
-            14419,            17305,            19495,            22190,
-            24403,            26302,            28195,            30177,
-             1841,             2349,             3968,             4764,
-             6376,             9825,            11048,            13345,
-            14682,            16252,            18183,            21363,
-            23918,            26156,            28031,            29935,
-             1432,             2047,             5631,             6927,
-             8198,             9675,            11358,            13506,
-            14802,            16419,            18339,            22019,
-            24124,            26177,            28130,            30586,
-             1730,             2320,             3744,             4808,
-             6007,             9666,            10997,            13622,
-            15234,            17495,            20088,            22002,
-            23603,            25400,            27379,            29254,
-             1267,             1915,             5483,             6812,
-             8229,             9919,            11589,            13337,
-            14747,            17965,            20552,            22167,
-            24519,            26819,            28883,            30642,
-             1526,             2229,             4240,             7388,
-             8953,            10450,            11899,            13718,
-            16861,            18323,            20379,            22672,
-            24797,            26906,            28906,            30622,
-             2175,             2791,             4104,             6875,
-             8612,             9798,            12152,            13536,
-            15623,            17682,            19213,            21060,
-            24382,            26760,            28633,            30248,
-              454,             1231,             4339,             5738,
-             7550,             9006,            10320,            13525,
-            16005,            17849,            20071,            21992,
-            23949,            26043,            28245,            30175,
-             2250,             2791,             4230,             5283,
-             6762,            10607,            11879,            13821,
-            15797,            17264,            20029,            22266,
-            24588,            26437,            28244,            30419,
-             1696,             2216,             4308,             8385,
-             9766,            11030,            12556,            14099,
-            16322,            17640,            19166,            20590,
-            23967,            26858,            28798,            30562,
-             2452,             3236,             4369,             6118,
-             7156,             9003,            11509,            12796,
-            15749,            17291,            19491,            22241,
-            24530,            26474,            28273,            30073,
-             1811,             2541,             3555,             5480,
-             9123,            10527,            11894,            13659,
-            15262,            16899,            19366,            21069,
-            22694,            24314,            27256,            29983,
-             1553,             2246,             4559,             5500,
-             6754,             7874,            11739,            13571,
-            15188,            17879,            20281,            22510,
-            24614,            26649,            28786,            30755,
-             1982,             2768,             3834,             5964,
-             8732,             9908,            11797,            14813,
-            16311,            17946,            21097,            22851,
-            24456,            26304,            28166,            29755,
-             1824,             2529,             3817,             5449,
-             6854,             8714,            10381,            12286,
-            14194,            15774,            19524,            21374,
-            23695,            26069,            28096,            30212,
-             2212,             2854,             3947,             5898,
-             9930,            11556,            12854,            14788,
-            16328,            17700,            20321,            22098,
-            23672,            25291,            26976,            28586,
-             2023,             2599,             4024,             4916,
-             6613,            11149,            12457,            14626,
-            16320,            17822,            19673,            21172,
-            23115,            26051,            28825,            30758,
-             1628,             2206,             3467,             4364,
-             8679,            10173,            11864,            13679,
-            14998,            16938,            19207,            21364,
-            23850,            26115,            28124,            30273,
-             2014,             2603,             4114,             7254,
-             8516,            10043,            11822,            13503,
-            16329,            17826,            19697,            21280,
-            23151,            24661,            26807,            30161,
-             2376,             2980,             4422,             5770,
-             7016,             9723,            11125,            13516,
-            15485,            16985,            19160,            20587,
-            24401,            27180,            29046,            30647,
-             2454,             3502,             4624,             6019,
-             7632,             8849,            10792,            13964,
-            15523,            17085,            19611,            21238,
-            22856,            25108,            28106,            29890,
-             1573,             2274,             3308,             5999,
-             8977,            10104,            12457,            14258,
-            15749,            18180,            19974,            21253,
-            23045,            25058,            27741,            30315,
-             1943,             2730,             4140,             6160,
-             7491,             8986,            11309,            12775,
-            14820,            16558,            17909,            19757,
-            21512,            23605,            27274,            29527,
-             2021,             2582,             4494,             5835,
-             6993,             8245,             9827,            14733,
-            16462,            17894,            19647,            21083,
-            23764,            26667,            29072,            30990,
-             1052,             1775,             3218,             4378,
-             7666,             9403,            11248,            13327,
-            14972,            17962,            20758,            22354,
-            25071,            27209,            29001,            30609,
-             2218,             2866,             4223,             5352,
-             6581,             9980,            11587,            13121,
-            15193,            16583,            18386,            20080,
-            22013,            25317,            28127,            29880,
-             2146,             2840,             4397,             5840,
-             7449,             8721,            10512,            11936,
-            13595,            17253,            19310,            20891,
-            23417,            25627,            27749,            30231,
-             1972,             2619,             3756,             6367,
-             7641,             8814,            12286,            13768,
-            15309,            18036,            19557,            20904,
-            22582,            24876,            27800,            30440,
-             2005,             2577,             4272,             7373,
-             8558,            10223,            11770,            13402,
-            16502,            18000,            19645,            21104,
-            22990,            26806,            29505,            30942,
-             1153,             1822,             3724,             5443,
-             6990,             8702,            10289,            11899,
-            13856,            15315,            17601,            21064,
-            23692,            26083,            28586,            30639,
-             1304,             1869,             3318,             7195,
-             9613,            10733,            12393,            13728,
-            15822,            17474,            18882,            20692,
-            23114,            25540,            27684,            29244,
-             2093,             2691,             4018,             6658,
-             7947,             9147,            10497,            11881,
-            15888,            17821,            19333,            21233,
-            23371,            25234,            27553,            29998,
-              575,             1331,             5304,             6910,
-             8425,            10086,            11577,            13498,
-            16444,            18527,            20565,            22847,
-            24914,            26692,            28759,            30157,
-             1435,             2024,             3283,             4156,
-             7611,            10592,            12049,            13927,
-            15459,            18413,            20495,            22270,
-            24222,            26093,            28065,            30099,
-             1632,             2168,             5540,             7478,
-             8630,            10391,            11644,            14321,
-            15741,            17357,            18756,            20434,
-            22799,            26060,            28542,            30696,
-             1407,             2245,             3405,             5639,
-             9419,            10685,            12104,            13495,
-            15535,            18357,            19996,            21689,
-            24351,            26550,            28853,            30564,
-             1675,             2226,             4005,             8223,
-             9975,            11155,            12822,            14316,
-            16504,            18137,            19574,            21050,
-            22759,            24912,            28296,            30634,
-             1080,             1614,             3622,             7565,
-             8748,            10303,            11713,            13848,
-            15633,            17434,            19761,            21825,
-            23571,            25393,            27406,            29063,
-             1693,             2229,             3456,             4354,
-             5670,            10890,            12563,            14167,
-            15879,            17377,            19817,            21971,
-            24094,            26131,            28298,            30099,
-             2042,             2959,             4195,             5740,
-             7106,             8267,            11126,            14973,
-            16914,            18295,            20532,            21982,
-            23711,            25769,            27609,            29351,
-              984,             1612,             3808,             5265,
-             6885,             8411,             9547,            10889,
-            12522,            16520,            19549,            21639,
-            23746,            26058,            28310,            30374,
-             2036,             2538,             4166,             7761,
-             9146,            10412,            12144,            13609,
-            15588,            17169,            18559,            20113,
-            21820,            24313,            28029,            30612,
-             1871,             2355,             4061,             5143,
-             7464,            10129,            11941,            15001,
-            16680,            18354,            19957,            22279,
-            24861,            26872,            28988,            30615,
-             2566,             3161,             4643,             6227,
-             7406,             9970,            11618,            13416,
-            15889,            17364,            19121,            20817,
-            22592,            24720,            28733,            31082,
-             1700,             2327,             4828,             5939,
-             7567,             9154,            11087,            12771,
-            14209,            16121,            20222,            22671,
-            24648,            26656,            28696,            30745,
-             3169,             3873,             5046,             6868,
-             8184,             9480,            12335,            14068,
-            15774,            17971,            20231,            21711,
-            23520,            25245,            27026,            28730,
-             1564,             2391,             4229,             6730,
-             8905,            10459,            13026,            15033,
-            17265,            19809,            21849,            23741,
-            25490,            27312,            29061,            30527,
-             2864,             3559,             4719,             6441,
-             9592,            11055,            12763,            14784,
-            16428,            18164,            20486,            22262,
-            24183,            26263,            28383,            30224,
-             2673,             3449,             4581,             5983,
-             6863,             8311,            12464,            13911,
-            15738,            17791,            19416,            21182,
-            24025,            26561,            28723,            30440,
-             2419,             3049,             4274,             6384,
-             8564,             9661,            11288,            12676,
-            14447,            17578,            19816,            21231,
-            23099,            25270,            26899,            28926,
-             1278,             2001,             3000,             5353,
-             9995,            11777,            13018,            14570,
-            16050,            17762,            19982,            21617,
-            23371,            25083,            27656,            30172,
-              932,             1624,             2798,             4570,
-             8592,             9988,            11552,            13050,
-            16921,            18677,            20415,            22810,
-            24817,            26819,            28804,            30385,
-             2324,             2973,             4156,             5702,
-             6919,             8806,            10259,            12503,
-            15015,            16567,            19418,            21375,
-            22943,            24550,            27024,            29849,
-             1564,             2373,             3455,             4907,
-             5975,             7436,            11786,            14505,
-            16107,            18148,            20019,            21653,
-            23740,            25814,            28578,            30372,
-             3025,             3729,             4866,             6520,
-             9487,            10943,            12358,            14258,
-            16174,            17501,            19476,            21408,
-            23227,            24906,            27347,            29407,
-             1270,             1965,             6802,             7995,
-             9204,            10828,            12507,            14230,
-            15759,            17860,            20369,            22502,
-            24633,            26514,            28535,            30525,
-             2210,             2749,             4266,             7487,
-             9878,            11018,            12823,            14431,
-            16247,            18626,            20450,            22054,
-            23739,            25291,            27074,            29169,
-             1275,             1926,             4330,             6573,
-             8441,            10920,            13260,            15008,
-            16927,            18573,            20644,            22217,
-            23983,            25474,            27372,            28645,
-             3015,             3670,             5086,             6372,
-             7888,             9309,            10966,            12642,
-            14495,            16172,            18080,            19972,
-            22454,            24899,            27362,            29975,
-             2882,             3733,             5113,             6482,
-             8125,             9685,            11598,            13288,
-            15405,            17192,            20178,            22426,
-            24801,            27014,            29212,            30811,
-             2300,             2968,             4101,             5442,
-             6327,             7910,            12455,            13862,
-            15747,            17505,            19053,            20679,
-            22615,            24658,            27499,            30065,
-             2257,             2940,             4430,             5991,
-             7042,             8364,             9414,            11224,
-            15723,            17420,            19253,            21469,
-            23915,            26053,            28430,            30384,
-             1227,             2045,             3818,             5011,
-             6990,             9231,            11024,            13011,
-            17341,            19017,            20583,            22799,
-            25195,            26876,            29351,            30805,
-             1354,             1924,             3789,             8077,
-            10453,            11639,            13352,            14817,
-            16743,            18189,            20095,            22014,
-            24593,            26677,            28647,            30256,
-             3142,             4049,             6197,             7417,
-             8753,            10156,            11533,            13181,
-            15947,            17655,            19606,            21402,
-            23487,            25659,            28123,            30304,
-             1317,             2263,             4725,             7611,
-             9667,            11634,            14143,            16258,
-            18724,            20698,            22379,            24007,
-            25775,            27251,            28930,            30593,
-             1570,             2323,             3818,             6215,
-             9893,            11556,            13070,            14631,
-            16152,            18290,            21386,            23346,
-            25114,            26923,            28712,            30168,
-             2297,             3905,             6287,             8558,
-            10668,            12766,            15019,            17102,
-            19036,            20677,            22341,            23871,
-            25478,            27085,            28851,            30520,
-             1915,             2507,             4033,             5749,
-             7059,             8871,            10659,            12198,
-            13937,            15383,            16869,            18707,
-            23175,            25818,            28514,            30501,
-             2404,             2918,             5190,             6252,
-             7426,             9887,            12387,            14795,
-            16754,            18368,            20338,            22003,
-            24236,            26456,            28490,            30397,
-             1621,             2227,             3479,             5085,
-             9425,            12892,            14246,            15652,
-            17205,            18674,            20446,            22209,
-            23778,            25867,            27931,            30093,
-             1869,             2390,             4105,             7021,
-            11221,            12775,            14059,            15590,
-            17024,            18608,            20595,            22075,
-            23649,            25154,            26914,            28671,
-             2551,             3252,             4688,             6562,
-             7869,             9125,            10475,            11800,
-            15402,            18780,            20992,            22555,
-            24289,            25968,            27465,            29232,
-             2705,             3493,             4735,             6360,
-             7905,             9352,            11538,            13430,
-            15239,            16919,            18619,            20094,
-            21800,            23342,            25200,            29257,
-             2166,             2791,             4011,             5081,
-             5896,             9038,            13407,            14703,
-            16543,            18189,            19896,            21857,
-            24872,            26971,            28955,            30514,
-             1865,             3021,             4696,             6534,
-             8343,             9914,            12789,            14103,
-            16533,            17729,            21340,            22439,
-            24873,            26330,            28428,            30154,
-             3369,             4345,             6573,             8763,
-            10309,            11713,            13367,            14784,
-            16483,            18145,            19839,            21247,
-            23292,            25477,            27555,            29447,
-             1265,             2184,             5443,             7893,
-            10591,            13139,            15105,            16639,
-            18402,            19826,            21419,            22995,
-            24719,            26437,            28363,            30125,
-             1584,             2004,             3535,             4450,
-             8662,            10764,            12832,            14978,
-            16972,            18794,            20932,            22547,
-            24636,            26521,            28701,            30567,
-             3419,             4528,             6602,             7890,
-             9508,            10875,            12771,            14357,
-            16051,            18330,            20630,            22490,
-            25070,            26936,            28946,            30542,
-             1726,             2252,             4597,             6950,
-             8379,             9823,            11363,            12794,
-            14306,            15476,            16798,            18018,
-            21671,            25550,            28148,            30367,
-             3385,             3870,             5307,             6388,
-             7141,             8684,            12695,            14939,
-            16480,            18277,            20537,            22048,
-            23947,            25965,            28214,            29956,
-             2771,             3306,             4450,             5560,
-             6453,             9493,            13548,            14754,
-            16743,            18447,            20028,            21736,
-            23746,            25353,            27141,            29066,
-             3028,             3900,             6617,             7893,
-             9211,            10480,            12047,            13583,
-            15182,            16662,            18502,            20092,
-            22190,            24358,            26302,            28957,
-             2000,             2550,             4067,             6837,
-             9628,            11002,            12594,            14098,
-            15589,            17195,            18679,            20099,
-            21530,            23085,            24641,            29022,
-             2844,             3302,             5103,             6107,
-             6911,             8598,            12416,            14054,
-            16026,            18567,            20672,            22270,
-            23952,            25771,            27658,            30026,
-             4043,             5150,             7268,             9056,
-            10916,            12638,            14543,            16184,
-            17948,            19691,            21357,            22981,
-            24825,            26591,            28479,            30233,
-             2109,             2625,             4320,             5525,
-             7454,            10220,            12980,            14698,
-            17627,            19263,            20485,            22381,
-            24279,            25777,            27847,            30458,
-             1550,             2667,             6473,             9496,
-            10985,            12352,            13795,            15233,
-            17099,            18642,            20461,            22116,
-            24197,            26291,            28403,            30132,
-             2411,             3084,             4145,             5394,
-             6367,             8154,            13125,            16049,
-            17561,            19125,            21258,            22762,
-            24459,            26317,            28255,            29702,
-             4159,             4516,             5956,             7635,
-             8254,             8980,            11208,            14133,
-            16210,            17875,            20196,            21864,
-            23840,            25747,            28058,            30012,
-             2026,             2431,             2845,             3618,
-             7950,             9802,            12721,            14460,
-            16576,            18984,            21376,            23319,
-            24961,            26718,            28971,            30640,
-             3429,             3833,             4472,             4912,
-             7723,            10386,            12981,            15322,
-            16699,            18807,            20778,            22551,
-            24627,            26494,            28334,            30482,
-             4740,             5169,             5796,             6485,
-             6998,             8830,            11777,            14414,
-            16831,            18413,            20789,            22369,
-            24236,            25835,            27807,            30021,
-              150,              168,              -17,             -107,
-             -142,             -229,             -320,             -406,
-             -503,             -620,             -867,             -935,
-             -902,             -680,             -398,             -114,
-             -398,             -355,               49,              255,
-              114,              260,              399,              264,
-              317,              431,              514,              531,
-              435,              356,              238,              106,
-              -43,              -36,             -169,             -224,
-             -391,             -633,             -776,             -970,
-             -844,             -455,             -181,              -12,
-               85,               85,              164,              195,
-              122,               85,             -158,             -640,
-             -903,                9,                7,             -124,
-              149,               32,              220,              369,
-              242,              115,               79,               84,
-             -146,             -216,              -70,             1024,
-              751,              574,              440,              377,
-              352,              203,               30,               16,
-               -3,               81,              161,              100,
-             -148,             -176,              933,              750,
-              404,              171,               -2,             -146,
-             -411,             -442,             -541,             -552,
-             -442,             -269,             -240,              -52,
-              603,              635,              405,              178,
-              215,               19,             -153,             -167,
-             -290,             -219,              151,              271,
-              151,              119,              303,              266,
-              100,               69,             -293,             -657,
-              939,              659,              442,              351,
-              132,               98,              -16,               -1,
-             -135,             -200,             -223,              -89,
-              167,              154,              172,              237,
-              -45,             -183,             -228,             -486,
-              263,              608,              158,             -125,
-             -390,             -227,             -118,               43,
-             -457,             -392,             -769,             -840,
-               20,             -117,             -194,             -189,
-             -173,             -173,              -33,               32,
-              174,              144,              115,              167,
-               57,               44,               14,              147,
-               96,              -54,             -142,             -129,
-             -254,             -331,              304,              310,
-              -52,             -419,             -846,            -1060,
-              -88,             -123,             -202,             -343,
-             -554,             -961,             -951,              327,
-              159,               81,              255,              227,
-              120,              203,              256,              192,
-              164,              224,              290,              195,
-              216,              209,              128,              832,
-             1028,              889,              698,              504,
-              408,              355,              218,               32,
-             -115,              -84,             -276,             -100,
-             -312,             -484,              899,              682,
-              465,              456,              241,              -12,
-             -275,             -425,             -461,             -367,
-              -33,              -28,             -102,             -194,
-             -527,              863,              906,              463,
-              245,               13,             -212,             -305,
-             -105,              163,              279,              176,
-               93,               67,              115,              192,
-               61,              -50,             -132,             -175,
-             -224,             -271,             -629,             -252,
-             1158,              972,              638,              280,
-              300,              326,              143,             -152,
-             -214,             -287,               53,              -42,
-             -236,             -352,             -423,             -248,
-             -129,             -163,             -178,             -119,
-               85,               57,              514,              382,
-              374,              402,              424,              423,
-              271,              197,               97,               40,
-               39,              -97,             -191,             -164,
-             -230,             -256,             -410,              396,
-              327,              127,               10,             -119,
-             -167,             -291,             -274,             -141,
-              -99,             -226,             -218,             -139,
-             -224,             -209,             -268,             -442,
-             -413,              222,               58,              521,
-              344,              258,               76,              -42,
-             -142,             -165,             -123,              -92,
-               47,                8,               -3,             -191,
-              -11,             -164,             -167,             -351,
-             -740,              311,              538,              291,
-              184,               29,             -105,                9,
-              -30,              -54,              -17,              -77,
-             -271,             -412,             -622,             -648,
-              476,              186,              -66,             -197,
-              -73,              -94,              -15,               47,
-               28,              112,              -58,              -33,
-               65,               19,               84,               86,
-              276,              114,              472,              786,
-              799,              625,              415,              178,
-              -35,              -26,                5,                9,
-               83,               39,               37,               39,
-             -184,             -374,             -265,             -362,
-             -501,              337,              716,              478,
-              -60,             -125,             -163,              362,
-               17,             -122,             -233,              279,
-              138,              157,              318,              193,
-              189,              209,              266,              252,
-              -46,              -56,             -277,             -429,
-              464,              386,              142,               44,
-              -43,               66,              264,              182,
-               47,               14,              -26,              -79,
-               49,               15,             -128,             -203,
-             -400,             -478,              325,               27,
-              234,              411,              205,              129,
-               12,               58,              123,               57,
-              171,              137,               96,              128,
-              -32,              134,              -12,               57,
-              119,               26,              -22,             -165,
-             -500,             -701,             -528,             -116,
-               64,               -8,               97,               -9,
-             -162,              -66,             -156,             -194,
-             -303,             -546,             -341,              546,
-              358,               95,               45,               76,
-              270,              403,              205,              100,
-              123,               50,              -53,             -144,
-             -110,              -13,               32,             -228,
-             -130,              353,              296,               56,
-             -372,             -253,              365,               73,
-               10,              -34,             -139,             -191,
-              -96,                5,               44,              -85,
-             -179,             -129,             -192,             -246,
-              -85,             -110,             -155,              -44,
-              -27,              145,              138,               79,
-               32,             -148,             -577,             -634,
-              191,               94,               -9,              -35,
-              -77,              -84,              -56,             -171,
-             -298,             -271,             -243,             -156,
-             -328,             -235,              -76,             -128,
-             -121,              129,               13,              -22,
-               32,               45,             -248,              -65,
-              193,              -81,              299,               57,
-             -147,              192,             -165,             -354,
-             -334,             -106,             -156,              -40,
-               -3,              -68,              124,             -257,
-               78,              124,              170,              412,
-              227,              105,             -104,               12,
-              154,              250,              274,              258,
-                4,              -27,              235,              152,
-               51,              338,              300,                7,
-             -314,             -411,              215,              170,
-               -9,              -93,              -77,               76,
-               67,               54,              200,              315,
-              163,               72,              -91,             -402,
-              158,              187,             -156,              -91,
-              290,              267,              167,               91,
-              140,              171,              112,                9,
-              -42,             -177,             -440,              385,
-               80,               15,              172,              129,
-               41,             -129,             -372,              -24,
-              -75,              -30,             -170,               10,
-             -118,               57,               78,             -101,
-              232,              161,              123,              256,
-              277,              101,             -192,             -629,
-             -100,              -60,             -232,               66,
-               13,              -13,              -80,             -239,
-              239,               37,               32,               89,
-             -319,             -579,              450,              360,
-                3,              -29,             -299,              -89,
-              -54,             -110,             -246,             -164,
-                6,             -188,              338,              176,
-              -92,              197,              137,              134,
-               12,               -2,               56,             -183,
-              114,              -36,             -131,             -204,
-               75,              -25,             -174,              191,
-              -15,             -290,             -429,             -267,
-               79,               37,              106,               23,
-             -384,              425,               70,              -14,
-              212,              105,               15,               -2,
-              -42,              -37,             -123,              108,
-               28,              -48,              193,              197,
-              173,              -33,               37,               73,
-              -57,              256,              137,              -58,
-             -430,             -228,              217,              -51,
-              -10,              -58,               -6,               22,
-              104,               61,             -119,              169,
-              144,               16,              -46,             -394,
-               60,              454,              -80,             -298,
-              -65,               25,                0,              -24,
-              -65,             -417,              465,              276,
-               -3,             -194,              -13,              130,
-               19,               -6,              -21,              -24,
-             -180,              -53,              -85,               20,
-              118,              147,              113,              -75,
-             -289,              226,             -122,              227,
-              270,              125,              109,              197,
-              125,              138,               44,               60,
-               25,              -55,             -167,              -32,
-             -139,             -193,             -173,             -316,
-              287,             -208,              253,              239,
-               27,              -80,             -188,              -28,
-             -182,             -235,              156,             -117,
-              128,              -48,              -58,             -226,
-              172,              181,              167,               19,
-               62,               10,                2,              181,
-              151,              108,              -16,              -11,
-              -78,             -331,              411,              133,
-               17,              104,               64,             -184,
-               24,              -30,               -3,             -283,
-              121,              204,               -8,             -199,
-              -21,              -80,             -169,             -157,
-             -191,             -136,               81,              155,
-               14,             -131,              244,               74,
-              -57,              -47,             -280,              347,
-              111,              -77,             -128,             -142,
-             -194,             -125,               -6,              -68,
-               91,                1,               23,               14,
-             -154,              -34,               23,              -38,
-             -343,              503,              146,              -38,
-              -46,              -41,               58,               31,
-               63,              -48,             -117,               45,
-               28,                1,              -89,               -5,
-              -44,              -29,             -448,              487,
-              204,               81,               46,             -106,
-             -302,              380,              120,              -38,
-              -12,              -39,               70,               -3,
-               25,              -65,               30,              -11,
-               34,              -15,               22,             -115,
-                0,              -79,              -83,               45,
-              114,               43,              150,               36,
-              233,              149,              195,                5,
-               25,              -52,             -475,              274,
-               28,              -39,               -8,              -66,
-             -255,              258,               56,              143,
-              -45,             -190,              165,              -60,
-               20,                2,              125,             -129,
-               51,               -8,             -335,              288,
-               38,               59,               25,              -42,
-               23,             -118,             -112,               11,
-              -55,             -133,             -109,               24,
-             -105,               78,              -64,             -245,
-              202,              -65,             -127,              162,
-               40,              -94,               89,              -85,
-             -119,             -103,               97,                9,
-              -70,              -28,              194,               86,
-             -112,              -92,             -114,               74,
-              -49,               46,              -84,             -178,
-              113,               52,             -205,              333,
-               88,              222,               56,              -55,
-               13,               86,                4,              -77,
-              224,              114,             -105,              112,
-              125,              -29,              -18,             -144,
-               22,              -58,              -99,               28,
-              114,              -66,              -32,             -169,
-             -314,              285,               72,              -74,
-              179,               28,              -79,             -182,
-               13,              -55,              147,               13,
-               12,              -54,               31,              -84,
-              -17,              -75,             -228,               83,
-             -375,              436,              110,              -63,
-              -27,             -136,              169,              -56,
-               -8,             -171,              184,              -42,
-              148,               68,              204,              235,
-              110,             -229,               91,              171,
-              -43,               -3,              -26,              -99,
-             -111,               71,             -170,              202,
-              -67,              181,              -37,              109,
-             -120,                3,              -55,             -260,
-              -16,              152,               91,              142,
-               42,               44,              134,               47,
-               17,              -35,               22,               79,
-             -169,               41,               46,              277,
-              -93,              -49,             -126,               37,
-             -103,              -34,              -22,              -90,
-             -134,             -205,               92,               -9,
-                1,             -195,             -239,               45,
-               54,               18,              -23,               -1,
-              -80,              -98,              -20,             -261,
-              306,               72,               20,              -89,
-             -217,               11,                6,              -82,
-               89,               13,             -129,              -89,
-               83,              -71,              -55,              130,
-              -98,             -146,              -27,              -57,
-               53,              275,               17,              170,
-               -5,              -54,              132,              -64,
-               72,              160,             -125,             -168,
-               72,               40,              170,               78,
-              248,              116,               20,               84,
-               31,              -34,              190,               38,
-               13,             -106,              225,               27,
-             -168,               24,             -157,             -122,
-              165,               11,             -161,             -213,
-              -12,              -51,             -101,               42,
-              101,               27,               55,              111,
-               75,               71,              -96,               -1,
-               65,             -277,              393,              -26,
-              -44,              -68,              -84,              -66,
-              -95,              235,              179,              -25,
-              -41,               27,              -91,             -128,
-             -222,              146,              -72,              -30,
-              -24,               55,             -126,              -68,
-              -58,             -127,               13,              -97,
-             -106,              174,             -100,              155,
-              101,             -146,              -21,              261,
-               22,               38,              -66,               65,
-                4,               70,               64,              144,
-               59,              213,               71,             -337,
-              303,              -52,               51,              -56,
-                1,               10,              -15,               -5,
-               34,               52,              228,              131,
-              161,             -127,             -214,              238,
-              123,               64,             -147,              -50,
-              -34,             -127,              204,              162,
-               85,               41,                5,             -140,
-               73,             -150,               56,              -96,
-              -66,              -20,                2,             -235,
-               59,              -22,             -107,              150,
-              -16,              -47,               -4,               81,
-              -67,              167,              149,              149,
-             -157,              288,             -156,              -27,
-               -8,               18,               83,              -24,
-              -41,             -167,              158,             -100,
-               93,               53,              201,               15,
-               42,              266,              278,              -12,
-               -6,              -37,               85,                6,
-               20,             -188,             -271,              107,
-              -13,              -80,               51,              202,
-              173,              -69,               78,             -188,
-               46,                4,              153,               12,
-             -138,              169,                5,              -58,
-             -123,             -108,             -243,              150,
-               10,             -191,              246,              -15,
-               38,               25,              -10,               14,
-               61,               50,             -206,             -215,
-             -220,               90,                5,             -149,
-             -219,               56,              142,               24,
-             -376,               77,              -80,               75,
-                6,               42,             -101,               16,
-               56,               14,              -57,                3,
-              -17,               80,               57,              -36,
-               88,              -59,              -97,              -19,
-             -148,               46,             -219,              226,
-              114,               -4,              -72,              -15,
-               37,              -49,              -28,              247,
-               44,              123,               47,             -122,
-              -38,               17,                4,             -113,
-              -32,             -224,              154,             -134,
-              196,               71,             -267,              -85,
-               28,              -70,               89,             -120,
-               99,               -2,               64,               76,
-             -166,              -48,              189,              -35,
-              -92,             -169,             -123,              339,
-               38,              -25,               38,              -35,
-              225,             -139,              -50,              -63,
-              246,               60,             -185,             -109,
-              -49,              -53,             -167,               51,
-              149,               60,             -101,              -33,
-               25,              -76,              120,               32,
-              -30,              -83,              102,               91,
-             -186,             -261,              131,             -197
+             -117,             -106,              -94,              -81,
+              -65,              -52,              -37,              -22,
+               -5,               11,               27,               42,
+               59,               75,               91,              106,
+             -120,             -116,             -100,              -84,
+              -67,              -49,              -32,              -16,
+                0,               15,               30,               46,
+               62,               77,               94,              109,
+             -121,             -116,             -102,              -85,
+              -71,              -58,              -39,              -24,
+               -5,               10,               29,               45,
+               61,               77,               92,              107,
+             -120,             -116,              -94,              -83,
+              -69,              -57,              -46,              -25,
+               -7,               10,               27,               42,
+               58,               75,               91,              107,
+             -114,             -109,              -94,              -79,
+              -66,              -52,              -35,              -18,
+               -4,                9,               26,               40,
+               53,               65,               81,               92,
+             -114,             -108,              -96,              -74,
+              -62,              -50,              -34,              -18,
+                0,               18,               33,               47,
+               61,               77,               94,              107,
+             -116,             -109,              -99,              -84,
+              -71,              -60,              -44,              -30,
+               -9,                5,               18,               33,
+               52,               70,               88,              106,
+             -119,             -114,              -99,              -89,
+              -71,              -60,              -50,              -37,
+               -4,               12,               28,               46,
+               60,               77,               91,              106,
+             -113,             -109,              -87,              -78,
+              -67,              -52,              -40,              -19,
+               -8,               12,               29,               43,
+               58,               75,               94,              113,
+             -119,             -114,              -88,              -77,
+              -63,              -49,              -36,              -23,
+                1,               17,               33,               51,
+               68,               81,               97,              109,
+             -119,             -114,             -101,              -88,
+              -71,              -57,              -42,              -16,
+               -1,               11,               24,               38,
+               54,               69,               90,              110,
+             -116,             -103,              -86,              -73,
+              -57,              -43,              -27,              -13,
+                2,               16,               31,               45,
+               61,               76,               92,              108,
+             -116,             -112,             -100,              -77,
+              -68,              -51,              -41,              -22,
+              -11,                0,               16,               37,
+               56,               72,               88,              104,
+             -118,             -113,              -96,              -84,
+              -69,              -55,              -42,              -30,
+              -12,               17,               33,               51,
+               70,               83,               98,              110,
+             -109,             -104,              -92,              -80,
+              -67,              -56,              -41,              -28,
+              -13,                0,               14,               28,
+               43,               60,               85,              104,
+             -112,             -107,              -95,              -82,
+              -71,              -57,              -45,              -26,
+              -11,                1,               27,               41,
+               53,               66,               84,              104,
+             -115,             -111,              -99,              -92,
+              -63,              -52,              -39,              -24,
+              -13,                5,               27,               42,
+               60,               78,               93,              109,
+             -112,             -108,              -96,              -89,
+              -77,              -51,              -41,              -22,
+              -11,               13,               31,               44,
+               57,               72,               87,              105,
+             -111,             -107,              -95,              -87,
+              -77,              -49,              -38,              -24,
+              -10,                0,               15,               30,
+               54,               75,               93,              107,
+             -107,             -103,              -93,              -74,
+              -52,              -44,              -31,              -16,
+               -3,               10,               33,               45,
+               58,               71,               85,               98,
+             -115,             -111,              -98,              -72,
+              -60,              -49,              -35,              -24,
+                1,               11,               25,               38,
+               56,               81,               98,              112,
+             -116,             -112,             -102,              -70,
+              -59,              -49,              -36,              -25,
+               -7,                5,               17,               30,
+               48,               66,               87,              103,
+             -113,             -109,              -94,              -86,
+              -75,              -64,              -52,              -24,
+              -14,                6,               23,               43,
+               61,               77,               92,              108,
+             -118,             -112,             -100,              -90,
+              -65,              -53,              -39,              -22,
+                6,               18,               32,               49,
+               67,               81,               97,              109,
+             -116,             -109,              -99,              -80,
+              -69,              -55,              -41,              -27,
+              -11,                3,               23,               40,
+               61,               80,              101,              113,
+             -110,             -106,              -92,              -84,
+              -73,              -42,              -31,              -17,
+               -1,               10,               26,               37,
+               51,               76,               99,              113,
+             -116,             -110,              -93,              -75,
+              -57,              -41,              -21,               -6,
+               10,               25,               40,               54,
+               68,               82,               96,              110,
+             -116,             -111,             -100,              -92,
+              -81,              -46,              -32,              -19,
+               -5,                7,               25,               42,
+               58,               74,               92,              107,
+             -112,             -109,              -86,              -78,
+              -68,              -56,              -45,              -22,
+              -13,               -1,               13,               32,
+               58,               78,               91,              107,
+             -108,             -104,              -89,              -76,
+              -66,              -52,              -38,              -26,
+               -7,                4,               18,               30,
+               43,               74,               98,              112,
+             -114,             -110,              -82,              -72,
+              -61,              -50,              -37,              -20,
+              -11,                1,               17,               46,
+               62,               78,               93,              112,
+             -112,             -108,              -99,              -77,
+              -66,              -58,              -33,              -22,
+              -11,               13,               25,               35,
+               47,               64,               87,              108,
+             -113,             -109,              -96,              -70,
+              -59,              -49,              -35,              -24,
+               -6,                7,               19,               34,
+               65,               79,               94,              106,
+             -115,             -111,              -96,              -85,
+              -72,              -59,              -47,              -33,
+              -20,               -8,                8,               35,
+               56,               74,               92,              110,
+             -111,             -108,              -92,              -65,
+              -54,              -45,              -31,              -20,
+               -2,               11,               23,               34,
+               47,               63,               96,              114,
+             -113,             -108,              -98,              -87,
+              -79,              -68,              -32,              -19,
+               -5,               12,               25,               41,
+               60,               77,               96,              109,
+             -115,             -109,              -96,              -82,
+              -58,              -48,              -34,              -17,
+               -4,                9,               36,               50,
+               65,               79,               97,              109,
+             -115,             -110,             -100,              -88,
+              -56,              -45,              -34,              -21,
+               -7,                7,               24,               37,
+               50,               64,               86,              107,
+             -104,              -98,              -88,              -77,
+              -60,              -51,              -37,              -18,
+               -3,                8,               25,               40,
+               53,               68,               91,              107,
+             -118,             -113,              -97,              -85,
+              -74,              -62,              -51,              -40,
+              -25,                4,               24,               40,
+               57,               75,               92,              109,
+             -107,             -103,              -92,              -83,
+              -74,              -62,              -28,              -18,
+               -4,                9,               22,               34,
+               50,               67,               87,              107,
+             -116,             -112,              -75,              -67,
+              -56,              -45,              -31,              -16,
+               -5,               10,               30,               45,
+               63,               79,               96,              111,
+             -106,             -102,              -88,              -77,
+              -68,              -52,              -38,              -25,
+               -4,                7,               23,               36,
+               66,               84,               98,              111,
+             -103,              -99,              -87,              -76,
+              -66,              -56,              -29,              -13,
+                0,               14,               31,               42,
+               57,               71,               85,               96,
+             -114,             -111,              -91,              -58,
+              -47,              -38,              -26,              -14,
+                3,               13,               26,               40,
+               62,               80,               96,              110,
+             -114,             -110,              -90,              -83,
+              -72,              -64,              -36,              -24,
+              -13,                6,               28,               49,
+               66,               81,               97,              112,
+             -109,             -105,              -91,              -82,
+              -71,              -51,              -38,              -24,
+              -10,                1,               20,               49,
+               64,               78,               91,              106,
+             -111,             -107,              -90,              -82,
+              -70,              -60,              -49,              -12,
+                0,               11,               25,               37,
+               60,               82,              101,              114,
+             -111,             -107,              -93,              -72,
+              -42,              -30,              -20,               -8,
+                4,               16,               34,               46,
+               58,               70,               85,               98,
+             -112,             -109,              -80,              -65,
+              -56,              -44,              -33,              -17,
+               -3,                8,               20,               31,
+               49,               79,               98,              112,
+             -104,              -98,              -84,              -72,
+              -59,              -45,              -31,              -18,
+               -1,               12,               31,               47,
+               64,               81,               98,              110,
+             -110,             -106,              -92,              -79,
+              -70,              -59,              -49,              -39,
+               -1,               11,               22,               35,
+               52,               69,               89,              109,
+             -113,             -109,             -101,              -95,
+              -56,              -44,              -29,              -16,
+               -2,               18,               33,               48,
+               63,               78,               95,              110,
+             -109,             -106,              -94,              -87,
+              -74,              -41,              -29,              -14,
+                1,               13,               28,               47,
+               69,               84,               99,              111,
+             -115,             -110,             -101,              -84,
+              -50,              -32,              -22,              -11,
+                1,               13,               30,               45,
+               58,               72,               89,              107,
+             -106,             -102,              -89,              -75,
+              -64,              -55,              -44,              -34,
+              -13,               16,               32,               43,
+               59,               73,               86,              100,
+             -111,             -107,              -94,              -70,
+              -55,              -46,              -33,              -21,
+               -7,                5,               19,               31,
+               43,               55,               70,              103,
+             -102,              -97,              -80,              -71,
+              -60,              -49,              -36,              -24,
+               -8,                4,               19,               32,
+               48,               63,               79,              100,
+             -113,             -109,              -90,              -76,
+              -66,              -53,              -41,              -29,
+              -16,               -7,                5,               15,
+               42,               69,               89,              108,
+             -108,             -105,              -93,              -85,
+              -76,              -62,              -23,               -8,
+                4,               18,               33,               45,
+               60,               74,               90,              105,
+             -114,             -110,              -89,              -61,
+              -52,              -42,              -30,              -18,
+               -4,               13,               26,               39,
+               53,               67,               81,               96,
+              -99,              -95,              -86,              -77,
+              -69,              -60,              -32,              -15,
+               -2,               15,               35,               47,
+               64,               80,               96,              110,
+             -115,             -105,              -80,              -61,
+              -43,              -27,              -14,               -1,
+               13,               26,               40,               53,
+               67,               80,               95,              110,
+             -100,              -91,              -72,              -59,
+              -48,              -38,              -25,              -13,
+                1,               15,               28,               39,
+               58,               75,               91,              105,
+                0,                0,                0,               -1,
+               -2,               -2,               -2,               -4,
+               -5,               -5,               -7,               -8,
+               -5,               -2,                0,                1,
+               -1,               -1,               -3,               -6,
+               -8,               -2,               -1,               -2,
+                1,                2,                3,                4,
+                3,                3,                2,                1,
+               -3,               -3,               -6,                4,
+                2,                1,               -1,               -2,
+                0,                0,               -1,                1,
+                0,                1,                0,                0,
+               -2,               -2,                9,                7,
+                4,                3,                1,                1,
+                0,                0,               -2,               -1,
+               -2,               -2,                0,               -1,
+               -2,               -2,               -1,               -2,
+               -2,                1,                0,                0,
+               -1,               -2,               -3,               -1,
+               -3,               -2,               -5,               -6,
+               -1,               -1,               -4,               -8,
+                3,                2,                1,                3,
+                1,                1,               -1,                1,
+                2,                3,                3,                1,
+                0,                0,               -2,               -4,
+               -5,               -7,               -9,                4,
+                2,                0,                1,                0,
+               -2,               -1,                0,                0,
+               -3,               -3,               -1,                9,
+                7,                6,                5,                4,
+                3,                3,                4,                4,
+                3,                3,                2,                1,
+                8,                8,                6,                3,
+                2,                0,                2,               -1,
+                0,                1,                1,                0,
+               -1,                0,                1,                0,
+                2,                2,                3,                1,
+                1,                1,                0,                6,
+                6,                6,                7,                6,
+                4,                3,                2,                0,
+                1,                1,                0,               -1,
+               -3,               -4,               -7,              -10,
+                0,                0,               -1,                2,
+                3,                2,                3,                2,
+               -1,                0,               -1,               -2,
+               -4,               -5,                8,                5,
+                3,                3,                1,               -1,
+               -3,               -3,               -1,                0,
+                2,                2,                2,                2,
+                1,                1,                0,                0,
+                0,                0,               -2,               -3,
+               -6,              -10,              -10,               -1,
+                1,                1,                1,               -1,
+               -1,               -2,               -3,               -5,
+               -8,               -9,                4,                3,
+                1,                1,                0,                1,
+                0,                0,               -2,               -3,
+               10,                9,                7,                4,
+                2,                2,                1,                0,
+               -1,               -3,               -3,               -2,
+                2,                2,                2,                1,
+                0,                1,                1,                0,
+               -1,                0,               -2,               -4,
+                9,                7,                4,                1,
+               -1,               -1,               -2,               -2,
+               -3,               -3,               -3,               -1,
+               -2,               -4,               -3,               -2,
+                0,               -1,                0,                1,
+                0,                0,                3,                4,
+                3,                2,                1,                1,
+                0,               -2,               -3,               -5,
+               -6,               -2,               -1,                0,
+               -2,               -2,               -4,               -4,
+                4,                2,                1,                1,
+                0,                0,                0,                0,
+                0,                1,                0,                0,
+                1,                1,                0,               -2,
+               -4,                5,                4,                3,
+                4,                1,                0,                0,
+                0,               -1,                0,                0,
+                3,                3,                2,                1,
+                0,               -1,               -1,                0,
+               -1,               -3,                0,                3,
+                3,                3,                3,                3,
+                0,                0,                1,                0,
+                0,               -3,               -3,               -5,
+               -7,                5,                3,                1,
+                0,                0,                0,                0,
+                1,                1,                1,                2,
+                1,                0,                1,                2,
+                1,                0,                3,                3,
+                1,               -2,               -6,               -7,
+               -1,               -1,                1,                1,
+                0,               -1,               -1,               -1,
+                7,                5,                3,                2,
+                3,                2,                3,                2,
+               -2,               -2,               -2,                0,
+               -1,                0,               -2,                5,
+                2,                2,                2,                0,
+                0,                0,               -1,               -1,
+                0,                0,               -1,               -2,
+               -3,               -5,                4,                1,
+                1,                1,               -2,               -1,
+                0,                2,                1,                0,
+                2,                2,                0,               -3,
+                3,                2,                1,                1,
+               -1,               -1,               -1,               -2,
+               -1,                0,               -2,               -2,
+               -1,               -1,                1,                3,
+                2,                2,                0,               -1,
+               -2,               -2,               -4,               -2,
+                2,                2,                2,                1,
+               -1,               -1,               -1,               -2,
+               -2,               -1,               -2,               -2,
+               -3,               -4,                4,                3,
+                2,                2,               -1,                0,
+                1,                1,                1,                0,
+               -1,               -1,               -3,               -6,
+                4,                2,                0,               -1,
+               -1,               -1,               -1,               -1,
+                0,                0,                3,                3,
+                2,                2,                3,                1,
+               -1,                4,                3,                3,
+                1,                0,               -1,                1,
+                1,                1,                1,                1,
+                0,                0,               -1,                0,
+               -1,               -2,               -1,               -1,
+               -4,               -6,                4,                2,
+                0,               -1,               -4,                3,
+                2,                0,                1,               -1,
+                0,                1,                0,               -2,
+               -2,               -1,               -1,               -1,
+               -1,               -1,               -1,               -2,
+               -3,                3,                0,                0,
+               -1,               -1,               -1,               -2,
+               -1,               -1,                0,                1,
+                1,                0,                1,                0,
+               -1,               -2,               -4,                4,
+                2,                0,                0,               -1,
+                1,                1,                1,                1,
+                1,                1,                0,               -2,
+               -2,               -3,                2,                0,
+                0,                2,                2,                1,
+                0,               -3,               -2,                1,
+                0,                0,               -1,                0,
+                1,                2,                1,                0,
+                2,                1,                3,                4,
+                3,                1,                1,               -1,
+               -2,               -2,                4,                1,
+                1,                0,                1,               -1,
+               -2,               -1,                0,               -1,
+                0,               -1,                0,                0,
+                1,                1,                1,                0,
+                1,                1,                0,                0,
+                0,                0,                1,               -2,
+               -4,                5,                4,                2,
+                1,                2,                0,                0,
+                1,                0,                0,               -3,
+               -1,               -2,               -5,                3,
+                3,                0,               -1,               -2,
+               -1,               -1,                0,               -1,
+               -1,                0,                0,               -1,
+                2,                2,                0,               -1,
+               -3,               -2,               -1,               -2,
+                0,                0,                1,                2,
+                0,               -1,               -3,                1,
+               -1,               -2,                2,                1,
+               -1,               -2,               -1,               -1,
+                0,                0,                1,                0,
+               -1,                1,               -1,                2,
+                1,                0,               -3,                3,
+                1,                2,                2,                0,
+                0,                0,               -2,                1,
+                0,               -1,                0,                0,
+               -2,                4,                2,                1,
+                3,                1,                1,                0,
+                0,                0,               -1,               -2,
+                2,                1,                0,               -2,
+               -1,                1,                0,                0,
+               -1,               -1,                2,                2,
+                1,                1,                1,                1,
+                1,                1,                1,                1,
+                2,                0,               -2,               -2,
+                1,               -1,               -4,                2,
+               -1,               -1,               -1,               -1,
+               -1,               -1,                4,                1,
+               -1,               -3,                1,                2,
+                0,                0,                1,                1,
+                1,                1,                0,                0,
+                0,                0,               -1,               -2,
+               -1,               -2,                0,               -4,
+                2,                4,                0,               -2,
+                1,                0,                0,               -1,
+               -1,               -2,               -2,                1,
+               -2,                1,                1,               -1,
+               -2,               -1,               -1,                0,
+                1,                1,                0,                1,
+                0,                2,                1,                0,
+                0,               -2,                1,                0,
+               -2,                0,                1,               -2,
+                0,               -1,                0,                1,
+                0,                0,                1,               -1,
+               -1,                0,               -3,                2,
+               -1,               -2,                1,                1,
+                0,               -1,                1,                0,
+                1,                1,                0,                0,
+                1,               -1,                2,                1,
+                1,               -1,               -2,                3,
+                0,               -1,                1,                0,
+                0,               -1,                3,                1,
+                1,                1,                0,                1,
+                2,                2,               -1,               -3,
+                0,               -1,               -3,                0,
+                0,               -1,               -1,               -1,
+                2,               -1,                0,                1,
+                0,                2,                1,                1,
+                0,                0,                0,               -1,
+                1,                0,                0,                1,
+                0,                0,               -1,               -3,
+                3,                0,                2,                1,
+               -3,                4,                1,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                1,                0,                0,                0,
+                0,                0,                0,               -1,
+                0,               -1,               -1,                0,
+                0,               -2,               -1,                1,
+                0,               -1,               -2,               -1,
+                0,                2,                0,                0,
+                1,               -1,                0,                2,
+                1,                0,               -1,                0,
+               -2,                0,                0,                0,
+               -1,               -1,                0,               -1,
+                0,               -1,                0,                0,
+               -1,                1,               -1,               -2,
+                0,                2,               -2,                0,
+                1,                0,                0,               -1,
+               -2,                2,                0,                0,
+                1,                2,                1,                1,
+                0,                0,               -1,                0,
+                0,                0,                2,                0,
+                0,               -2,                0,               -2,
+                1,                1,                0,                1,
+                0,                1,                1,                1,
+                0,                0,               -2,                1,
+               -1,                1,                1,               -1,
+                1,               -1,                0,               -2,
+                0,               -1,                2,                2,
+               -1,               -1,                1,                1,
+                1,                1,                0,                1,
+                0,                1,                0,                0,
+                0,               -1,                2,               -3,
+                1,                0,                0,                1,
+                2,                0,                0,               -1,
+               -2,               -2,                2,                0,
+                0,                0,                0,                1,
+                0,               -1,                0,                2,
+                0,                1,               -1,               -1,
+                1,                0,               -1,                0,
+               -1,                1,               -1,                0,
+               -1,                0,               -3,                0,
+                0,                0,                0,                1,
+               -1,                0,                0,                0,
+                1,               -1,                0,                0,
+                1,                0,                0,                0,
+                0,               -1,                2,                2,
+                1,                1,                1,                0,
+               -1,                0,                1,                1,
+                0,               -1,                0,                0,
+               -2,                0,               -1,                0,
+               -1,                0,                1,                0,
+                0,                1,                2,                1,
+                1,                0,                1,                0,
+               -1,                1,                1,                0,
+               -2,                0,               -1,               -1,
+                1,               -1,               -1,               -1,
+                0,                0,                0,               -2,
+                2,                0,               -1,                0,
+               -1,                1,                0,                1,
+                0,                1,                0,               -1,
+                1,                1,                0,                0,
+               -1,               -1,               -1,               -1,
+                1,                0,                0,                0,
+                1,               -1,                0,                0,
+               -2,                1,                1,                0,
+                1,                0,                1,               -1,
+                0,               -1,                0,                0,
+                0,                0,                0,                0,
+               -1,                0,                1,                2,
+               -1,                0,                1,                1,
+                0,               -1,                0,                0,
+                1,                0,                0,               -1,
+                1,                1,               -1,                0,
+               -1,                0,                0,                0,
+                0,               -1,                0,                1,
+               -1,                1,               -1,                1,
+                1,                1,                1,                1,
+                0,                1,                0,                0,
+                0,                2,                0,               -1,
+                0,                0,                1,                1,
+               -2,                1,                0,                1,
+                0,                1,               -2,               -1,
+               -1,                0,               -1,                0,
+                0,                0,                0,                0,
+               -2,               -1,                0,               -1,
+                0,               -1,                0,                1,
+                1,                1,               -1,                0,
+                1,               -1,                0,                1,
+                0,               -1,               -1,                0,
+                0,                0,                0,               -1,
+                0,                1,                1,                2,
+               -2,                0,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                1,               -1,                2,               -2,
+                0,                0,               -1,               -1,
+                0,                0,                2,               -1,
+                0,                1,               -1,                0,
+                1,               -1,               -1,               -1,
+               -1,                0,                0,                0,
+                0,               -1,                0,                0,
+                1,                2,                1,                1,
+               -1,               -1,                0,                0,
+               -1,                1,                0,                1,
+                1,                0,                0,                0,
+                0,                0,               -2,                1,
+                0,                0,                1,                1,
+                1,                1,                1,                1,
+                1,                0,               -1,                0,
+                2,                0,                0,                0,
+                2,                0,               -1,                0,
+                0,               -1,                0,               -1,
+                1,                0,               -1,                0,
+               -1,               -1,                0,                0,
+                0,                1,               -2,                0,
+                0,                0,                1,               -1,
+                0,               -1,                0,                1,
+                1,               -2,                0,                0,
+               -1,               -1,               -1,               -1,
+                0,                0,                0,                0,
+                0,                0,               -1,               -1,
+                0,                1,                2,               -2,
+                0,                0,                0,                0,
+                1,                1,                0,                0,
+                0,               -1,                0,                0,
+                0,                0,                0,               -2,
+               -1,                0,                0,               -1,
+                1,               -2,               -1,                0,
+                0,                1,                0,               -1,
+                0,                0,                1,                0,
+               -1,                0,                1,                0,
+                1,               -1,                1,                0
 };
 
 const SKP_Silk_NLSF_CBS SKP_Silk_NLSF_CB0_16_Stage_info[ NLSF_MSVQ_CB0_16_STAGES ] =
 {
-        { 128, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 *   0 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[   0 ] },
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 128 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 128 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 144 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 144 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 152 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 152 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 160 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 160 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 168 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 168 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 176 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 176 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 184 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 184 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 192 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 192 ] },
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_16_Q15[ 16 * 200 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q5[ 200 ] }
+        {  64, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 *   0 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[   0 ] },
+        {  16, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 *  64 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[  64 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 *  80 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[  80 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 *  88 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[  88 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 *  96 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[  96 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 * 104 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[ 104 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 * 112 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[ 112 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 * 120 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[ 120 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 * 128 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[ 128 ] },
+        {  16, &SKP_Silk_NLSF_MSVQ_CB0_16_Q8[ 16 * 136 ], &SKP_Silk_NLSF_MSVQ_CB0_16_rates_Q4[ 136 ] }
 };
 
 const SKP_Silk_NLSF_CB_struct SKP_Silk_NLSF_CB0_16 =
--- a/src_common/SKP_Silk_tables_NLSF_CB0_16.h
+++ b/src_common/SKP_Silk_tables_NLSF_CB0_16.h
@@ -36,7 +36,7 @@
 #endif
 
 #define NLSF_MSVQ_CB0_16_STAGES       10
-#define NLSF_MSVQ_CB0_16_VECTORS      216
+#define NLSF_MSVQ_CB0_16_VECTORS      152
 
 /* NLSF codebook entropy coding tables */
 extern const SKP_uint16         SKP_Silk_NLSF_MSVQ_CB0_16_CDF[ NLSF_MSVQ_CB0_16_VECTORS + NLSF_MSVQ_CB0_16_STAGES ];
--- a/src_common/SKP_Silk_tables_NLSF_CB1_10.c
+++ b/src_common/SKP_Silk_tables_NLSF_CB1_10.c
@@ -28,91 +28,101 @@
 /**********************************************/
 /* This file has been automatically generated */
 /*                                            */
-/* ROM usage:  0.19 + 1.61 kB                 */
+/* ROM usage:  0.22 + 0.90 kB                 */
 /**********************************************/
 
 #include "SKP_Silk_structs.h"
+#include "SKP_Silk_tables.h"
 #include "SKP_Silk_tables_NLSF_CB1_10.h"
 
 const SKP_uint16 SKP_Silk_NLSF_MSVQ_CB1_10_CDF[ NLSF_MSVQ_CB1_10_VECTORS + NLSF_MSVQ_CB1_10_STAGES ] =
 {
             0,
-        17096,
-        24130,
-        28997,
-        33179,
-        36696,
-        40213,
-        42493,
-        44252,
-        45973,
-        47551,
-        49095,
-        50542,
-        51898,
-        53196,
-        54495,
-        55685,
-        56851,
-        57749,
-        58628,
-        59435,
-        60207,
-        60741,
-        61220,
-        61700,
-        62179,
-        62659,
-        63138,
-        63617,
-        64097,
-        64576,
-        65056,
+        21247,
+        28440,
+        34489,
+        38585,
+        41021,
+        43353,
+        45401,
+        47050,
+        48562,
+        49890,
+        51162,
+        52379,
+        53597,
+        54536,
+        55435,
+        56260,
+        57049,
+        57805,
+        58562,
+        59286,
+        59979,
+        60588,
+        61122,
+        61613,
+        62103,
+        62593,
+        63084,
+        63574,
+        64064,
+        64554,
+        65045,
         65535,
             0,
-        20378,
-        33032,
-        40395,
-        46721,
-        51707,
-        56585,
-        61157,
+        34067,
+        42961,
+        48025,
+        52103,
+        55532,
+        58961,
+        62391,
         65535,
             0,
-        15055,
-        25472,
-        35447,
-        42501,
-        48969,
-        54773,
-        60212,
+        30146,
+        40804,
+        46615,
+        50906,
+        55016,
+        58624,
+        62080,
         65535,
             0,
-        12069,
-        22440,
-        32812,
-        40145,
-        46870,
-        53595,
-        59630,
+        31530,
+        38758,
+        44096,
+        48990,
+        53478,
+        57776,
+        62074,
         65535,
             0,
-        10839,
-        19954,
-        27957,
-        35961,
-        43965,
-        51465,
-        58805,
+        14400,
+        25503,
+        35253,
+        44194,
+        52756,
+        58308,
+        62234,
         65535,
             0,
-         8933,
-        17674,
-        26415,
-        34785,
-        42977,
-        50820,
-        58496,
+        26248,
+        35939,
+        44449,
+        49733,
+        53988,
+        58062,
+        61799,
+        65535,
+            0,
+        20097,
+        31540,
+        38344,
+        44584,
+        50823,
+        56798,
+        62277,
         65535
 };
 
@@ -123,446 +133,493 @@
      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  42 ],
      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  51 ],
      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  60 ],
-     &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  69 ]
+     &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  69 ],
+     &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  78 ]
 };
 
 const SKP_int SKP_Silk_NLSF_MSVQ_CB1_10_CDF_middle_idx[ NLSF_MSVQ_CB1_10_STAGES ] =
 {
-       5,
-       3,
        4,
+       2,
+       2,
+       2,
        4,
-       5,
-       5
+       3,
+       3
 };
 
-const SKP_int16 SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[ NLSF_MSVQ_CB1_10_VECTORS ] =
+const SKP_uint8 SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q4[ NLSF_MSVQ_CB1_10_VECTORS ] =
 {
-               62,              103,
-              120,              127,
-              135,              135,
-              155,              167,
-              168,              172,
-              173,              176,
-              179,              181,
-              181,              185,
-              186,              198,
-              199,              203,
-              205,              222,
-              227,              227,
-              227,              227,
-              227,              227,
-              227,              227,
-              227,              227,
-               54,               76,
-              101,              108,
-              119,              120,
-              123,              125,
-               68,               85,
-               87,              103,
-              107,              112,
-              115,              116,
-               78,               85,
-               85,              101,
-              105,              105,
-              110,              111,
-               83,               91,
-               97,               97,
-               97,              100,
-              101,              105,
-               92,               93,
-               93,               95,
-               96,               98,
-               99,              103
+               26,               51,
+               55,               64,
+               76,               77,
+               80,               85,
+               87,               90,
+               91,               92,
+               92,               98,
+               99,              101,
+              102,              103,
+              103,              104,
+              105,              108,
+              111,              113,
+              113,              113,
+              113,              113,
+              113,              113,
+              113,              113,
+               15,               46,
+               59,               64,
+               68,               68,
+               68,               70,
+               18,               42,
+               56,               63,
+               64,               67,
+               68,               68,
+               17,               51,
+               58,               60,
+               62,               63,
+               63,               68,
+               35,               41,
+               44,               46,
+               47,               57,
+               65,               69,
+               21,               44,
+               47,               58,
+               63,               64,
+               66,               66,
+               27,               40,
+               52,               54,
+               54,               55,
+               57,               69
 };
 
 const SKP_int SKP_Silk_NLSF_MSVQ_CB1_10_ndelta_min_Q15[ 10 + 1 ] =
 {
-              462,
+              293,
+               32,
+              225,
+              280,
+              153,
+               23,
+               13,
+               14,
+                9,
                 3,
-               64,
-               74,
-               98,
-               50,
-               97,
-               68,
-              120,
-               53,
-              639
+              688
 };
 
-const SKP_int16 SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 * NLSF_MSVQ_CB1_10_VECTORS ] =
+const SKP_int8 SKP_Silk_NLSF_MSVQ_CB1_10_Q8[ 10 * NLSF_MSVQ_CB1_10_VECTORS ] =
 {
-             1877,             4646,
-             7712,            10745,
-            13964,            17028,
-            20239,            23182,
-            26471,            29287,
-             1612,             3278,
-             7086,             9975,
-            13228,            16264,
-            19596,            22690,
-            26037,            28965,
-             2169,             3830,
-             6460,             8958,
-            11960,            14750,
-            18408,            21659,
-            25018,            28043,
-             3680,             6024,
-             8986,            12256,
-            15201,            18188,
-            21741,            24460,
-            27484,            30059,
-             2584,             5187,
-             7799,            10902,
-            13179,            15765,
-            19017,            22431,
-            25891,            28698,
-             3731,             5751,
-             8650,            11742,
-            15090,            17407,
-            20391,            23421,
-            26228,            29247,
-             2107,             6323,
-             8915,            12226,
-            14775,            17791,
-            20664,            23679,
-            26829,            29353,
-             1677,             2870,
-             5386,             8077,
-            11817,            15176,
-            18657,            22006,
-            25513,            28689,
-             2111,             3625,
-             7027,            10588,
-            14059,            17193,
-            21137,            24260,
-            27577,            30036,
-             2428,             4010,
-             5765,             9376,
-            13805,            15821,
-            19444,            22389,
-            25295,            29310,
-             2256,             4628,
-             8377,            12441,
-            15283,            19462,
-            22257,            25551,
-            28432,            30304,
-             2352,             3675,
-             6129,            11868,
-            14551,            16655,
-            19624,            21883,
-            26526,            28849,
-             5243,             7248,
-            10558,            13269,
-            15651,            17919,
-            21141,            23827,
-            27102,            29519,
-             4422,             6725,
-            10449,            13273,
-            16124,            19921,
-            22826,            26061,
-            28763,            30583,
-             4508,             6291,
-             9504,            11809,
-            13827,            15950,
-            19077,            22084,
-            25740,            28658,
-             2540,             4297,
-             8579,            13578,
-            16634,            19101,
-            21547,            23887,
-            26777,            29146,
-             3377,             6358,
-            10224,            14518,
-            17905,            21056,
-            23637,            25784,
-            28161,            30109,
-             4177,             5942,
-             8159,            10108,
-            12130,            15470,
-            20191,            23326,
-            26782,            29359,
-             2492,             3801,
-             6144,             9825,
-            16000,            18671,
-            20893,            23663,
-            25899,            28974,
-             3011,             4727,
-             6834,            10505,
-            12465,            14496,
-            17065,            20052,
-            25265,            28057,
-             4149,             7197,
-            12338,            15076,
-            18002,            20190,
-            22187,            24723,
-            27083,            29125,
-             2975,             4578,
-             6448,             8378,
-             9671,            13225,
-            19502,            22277,
-            26058,            28850,
-             4102,             5760,
-             7744,             9484,
-            10744,            12308,
-            14677,            19607,
-            24841,            28381,
-             4931,             9287,
-            12477,            13395,
-            13712,            14351,
-            16048,            19867,
-            24188,            28994,
-             4141,             7867,
-            13140,            17720,
-            20064,            21108,
-            21692,            22722,
-            23736,            27449,
-             4011,             8720,
-            13234,            16206,
-            17601,            18289,
-            18524,            19689,
-            23234,            27882,
-             3420,             5995,
-            11230,            15117,
-            15907,            16783,
-            17762,            23347,
-            26898,            29946,
-             3080,             6786,
-            10465,            13676,
-            18059,            23615,
-            27058,            29082,
-            29563,            29905,
-             3038,             5620,
-             9266,            12870,
-            18803,            19610,
-            20010,            20802,
-            23882,            29306,
-             3314,             6420,
-             9046,            13262,
-            15869,            23117,
-            23667,            24215,
-            24487,            25915,
-             3469,             6963,
-            10103,            15282,
-            20531,            23240,
-            25024,            26021,
-            26736,            27255,
-             3041,             6459,
-             9777,            12896,
-            16315,            19410,
-            24070,            29353,
-            31795,            32075,
-             -200,             -134,
-             -113,             -204,
-             -347,             -440,
-             -352,             -211,
-             -418,             -172,
-             -313,               59,
-              495,              772,
-              721,              614,
-              334,              444,
-              225,              242,
-              161,               16,
-              274,              564,
-              -73,             -188,
-             -395,             -171,
-              777,              508,
-             1340,             1145,
-              699,              196,
-              223,              173,
-               90,               25,
-              -26,               18,
-              133,             -105,
-             -360,             -277,
-              859,              634,
-               41,             -557,
-             -768,             -926,
-             -601,            -1021,
-            -1189,             -365,
-              225,              107,
-              374,              -50,
-              433,              417,
-              156,               39,
-             -597,            -1397,
-            -1594,             -592,
-             -485,             -292,
-              253,               87,
-               -0,               -6,
-              -25,             -345,
-             -240,              120,
-             1261,              946,
-              166,             -277,
-              241,              167,
-              170,              429,
-              518,              714,
-              602,              254,
-              134,               92,
-             -152,             -324,
-             -394,               49,
-             -151,             -304,
-             -724,             -657,
-             -162,             -369,
-              -35,                3,
-               -2,             -312,
-             -200,              -92,
-             -227,              242,
-              628,              565,
-             -124,             1056,
-              770,              101,
-              -84,              -33,
-                4,             -192,
-             -272,                5,
-             -627,             -977,
-              419,              472,
-               53,             -103,
-              145,              322,
-              -95,              -31,
-             -100,             -303,
-             -560,            -1067,
-             -413,              714,
-              283,                2,
-             -223,             -367,
-              523,              360,
-              -38,             -115,
-              378,             -591,
-             -718,              448,
-             -481,             -274,
-              180,              -88,
-             -581,             -157,
-             -696,            -1265,
-              394,             -479,
-              -23,              124,
-              -43,               19,
-             -113,             -236,
-             -412,             -659,
-             -200,                2,
-              -69,             -342,
-              199,               55,
-               58,              -36,
-              -51,              -62,
-              507,              507,
-              427,              442,
-               36,              601,
-             -141,               68,
-              274,              274,
-               68,              -12,
-               -4,               71,
-             -193,             -464,
-             -425,             -383,
-              408,              203,
-             -337,              236,
-              410,              -59,
-              -25,             -341,
-             -449,               28,
-               -9,               90,
-              332,              -14,
-             -905,               96,
-             -540,             -242,
-              679,              -59,
-              192,              -24,
-               60,             -217,
-                5,              -37,
-              179,              -20,
-              311,              519,
-              274,               72,
-             -326,            -1030,
-             -262,              213,
-              380,               82,
-              328,              411,
-             -540,              574,
-             -283,              151,
-              181,             -402,
-             -278,             -240,
-             -110,             -227,
-             -264,              -89,
-             -250,             -259,
-              -27,              106,
-             -239,              -98,
-             -390,              118,
-               61,              104,
-              294,              532,
-               92,              -13,
-               60,             -233,
-              335,              541,
-              307,              -26,
-             -110,              -91,
-             -231,             -460,
-              170,              201,
-               96,             -372,
-              132,              435,
-             -302,              216,
-             -279,              -41,
-               74,              190,
-              368,              273,
-             -186,             -608,
-             -157,              159,
-               12,              278,
-              245,              307,
-               25,             -187,
-              -16,               55,
-               30,             -163,
-              548,             -307,
-              106,               -5,
-               27,              330,
-             -416,              475,
-              438,             -235,
-              104,              137,
-               21,               -5,
-             -300,             -468,
-              521,             -347,
-              170,             -200,
-             -219,              308,
-             -122,             -133,
-              219,              -16,
-              359,              412,
-              -89,             -111,
-               48,              322,
-              142,              177,
-             -286,             -127,
-              -39,              -63,
-              -42,             -451,
-              160,              308,
-              -57,              193,
-              -48,               74,
-             -346,               59,
-              -27,               27,
-             -469,             -277,
-             -344,              282,
-              262,              122,
-              171,             -249,
-               27,              258,
-              188,               -3,
-               67,             -206,
-             -284,              291,
-             -117,              -88,
-             -477,              375,
-               50,              106,
-               99,             -182,
-              438,             -376,
-             -401,              -49,
-              119,              -23,
-              -10,              -48,
-             -116,             -200,
-             -310,              121,
-               73,                7,
-              237,             -226,
-              139,             -456,
-              397,               35,
-                3,             -108,
-              323,              -75,
-              332,              198,
-              -99,              -21
+             -113,              -92,
+              -68,              -43,
+              -20,                3,
+               28,               52,
+               78,              100,
+             -114,             -101,
+              -75,              -53,
+              -30,               -7,
+               20,               45,
+               72,               96,
+              -98,              -81,
+              -58,              -33,
+              -10,               10,
+               35,               58,
+               82,              103,
+             -110,              -99,
+              -80,              -61,
+              -38,              -15,
+               12,               38,
+               66,               89,
+             -115,             -108,
+              -77,              -49,
+              -21,                4,
+               29,               53,
+               79,              102,
+             -101,              -81,
+              -55,              -29,
+               -7,               23,
+               47,               71,
+               93,              110,
+             -100,              -83,
+              -65,              -44,
+              -25,               -7,
+               19,               45,
+               72,               96,
+             -110,             -100,
+              -85,              -45,
+              -25,               -8,
+               22,               39,
+               78,               97,
+             -115,             -107,
+              -89,              -69,
+              -36,               -9,
+               20,               45,
+               72,               99,
+             -113,              -99,
+              -69,              -38,
+              -12,               16,
+               44,               68,
+               92,              109,
+             -109,              -98,
+              -84,              -60,
+              -19,               -3,
+               18,               43,
+               61,               98,
+              -99,              -77,
+              -46,              -17,
+               10,               35,
+               55,               74,
+               92,              106,
+             -105,              -91,
+              -70,              -42,
+               -1,               17,
+               35,               58,
+               75,               99,
+              -90,              -77,
+              -53,              -38,
+              -21,                0,
+               28,               49,
+               76,               97,
+             -110,             -101,
+              -80,              -29,
+               -8,                6,
+               30,               48,
+               82,               99,
+             -110,              -92,
+              -55,              -19,
+                4,               25,
+               43,               62,
+               84,              101,
+             -101,              -88,
+              -73,              -58,
+              -45,              -26,
+               21,               46,
+               71,               98,
+              -83,              -67,
+              -40,              -22,
+               -2,               19,
+               41,               63,
+               85,              103,
+             -112,             -103,
+              -89,              -62,
+               -8,               15,
+               33,               56,
+               74,               97,
+             -117,              -73,
+              -56,              -33,
+              -13,               11,
+               34,               57,
+               80,              101,
+             -110,             -100,
+              -84,              -72,
+              -59,              -15,
+               21,               45,
+               76,               96,
+             -103,              -90,
+              -72,              -59,
+              -40,                1,
+               32,               56,
+               82,               98,
+             -107,              -97,
+              -79,              -54,
+              -37,              -21,
+               -4,               22,
+               71,               94,
+              -97,              -67,
+              -27,               -2,
+               29,               44,
+               58,               71,
+               82,               98,
+              -89,              -74,
+              -55,              -45,
+              -30,              -18,
+               -2,               23,
+               65,               97,
+             -106,              -82,
+              -56,              -31,
+               -5,               34,
+               59,               65,
+               68,               78,
+             -107,              -82,
+              -57,              -31,
+               20,               31,
+               34,               35,
+               68,              103,
+             -109,              -83,
+              -56,              -32,
+               -6,               18,
+               49,               82,
+              109,              116,
+             -103,              -82,
+              -50,              -17,
+               -6,                2,
+               19,               56,
+               83,              105,
+             -106,              -82,
+              -54,              -30,
+               -1,               32,
+               41,               49,
+               52,               98,
+              -98,              -66,
+              -36,                0,
+                5,               12,
+               14,               26,
+               64,               97,
+             -105,              -80,
+              -53,              -29,
+                2,               30,
+               76,               90,
+               94,               96,
+               -2,               -2,
+               -2,                0,
+               -1,               -1,
+               -1,                0,
+                0,                0,
+                2,                2,
+                3,                4,
+                3,                5,
+                7,                6,
+                4,                2,
+                8,                9,
+                5,               -2,
+                1,                1,
+                1,                0,
+               -2,               -2,
+                1,                1,
+                2,               -2,
+               -7,              -11,
+              -11,                0,
+               -1,                0,
+                1,                0,
+               -3,               -2,
+               -6,               -3,
+                2,               -4,
+               10,                5,
+               -1,               -3,
+               -5,               -7,
+               11,                7,
+                4,               -1,
+                1,                1,
+                0,                1,
+                7,               10,
+                3,               -1,
+               -6,               -2,
+               -3,               -4,
+                0,               -1,
+               -2,               -2,
+                0,                3,
+                0,               -5,
+              -11,              -10,
+               -1,                1,
+                1,                1,
+                1,                1,
+                1,                1,
+                1,                0,
+                2,                1,
+               -2,               -4,
+               -5,               -3,
+               -3,               -3,
+               -3,               -3,
+                3,                2,
+                3,                5,
+                4,                0,
+               -3,               -9,
+               -5,               -1,
+                3,                2,
+                2,               -1,
+               -1,               -1,
+               -2,                6,
+                7,                6,
+               -2,               -5,
+               -9,               -4,
+               -1,               -3,
+               -3,                1,
+                2,                2,
+               -6,               -9,
+                6,                3,
+                3,                1,
+                2,                1,
+               -1,               -1,
+                3,                1,
+               -2,                2,
+                4,               -3,
+                9,                3,
+               -3,                4,
+                1,                0,
+               -1,               -4,
+               -6,               11,
+                4,                1,
+                2,               -1,
+               -1,               -1,
+               -1,               -2,
+                0,                0,
+                0,                0,
+               -1,                0,
+                6,                3,
+                1,                0,
+                1,                1,
+                1,               -1,
+                1,                2,
+               -5,                6,
+                3,                2,
+                3,                4,
+                2,                1,
+                0,                1,
+                0,               -1,
+               -2,                2,
+                1,               -1,
+               -6,               -8,
+                2,               -1,
+                0,               -1,
+                8,                1,
+               -5,                0,
+               -1,               -1,
+                0,                0,
+                0,                0,
+               -2,                0,
+               -2,               -8,
+                3,                0,
+                2,                2,
+                1,                1,
+                0,                0,
+                1,                0,
+               -2,               10,
+                1,               -4,
+               -1,               -4,
+               -6,                6,
+                3,                4,
+                4,                1,
+               -1,               -2,
+                0,                1,
+                2,                1,
+                1,                4,
+                1,                1,
+               -1,               -2,
+                0,                4,
+                2,                0,
+               -1,               -2,
+               -1,               -2,
+                1,                0,
+               -1,               -2,
+               -2,                1,
+               -1,               -4,
+                0,               -1,
+               -1,               -4,
+                0,               -1,
+               -2,               -4,
+               -1,                0,
+                3,                3,
+                1,                1,
+               -1,               -3,
+                1,                1,
+                1,                1,
+               -1,               -2,
+                4,                3,
+                2,                0,
+               -1,               -2,
+                5,               -1,
+               -3,                0,
+               -1,                0,
+                0,               -1,
+                0,                0,
+                0,               -2,
+                0,               -1,
+               -7,                6,
+                2,                0,
+               -2,                4,
+               -4,                1,
+               -1,                1,
+                1,                0,
+                1,               -1,
+                1,                2,
+                2,                0,
+                1,                1,
+                0,                1,
+               -1,                1,
+                1,               -4,
+                2,               -1,
+                0,               -1,
+               -1,               -1,
+                0,               -1,
+               -3,               -1,
+               -2,                1,
+                1,               -3,
+               -1,                1,
+                1,                1,
+               -2,                1,
+                0,                1,
+               -5,                1,
+               -2,                1,
+                1,                1,
+               -2,                0,
+                0,                1,
+               -1,                0,
+                5,               -3,
+                0,               -3,
+                2,                0,
+               -3,               -2,
+               -2,                0,
+                0,               -1,
+                2,                2,
+                1,                0,
+               -4,               -1,
+                2,                1,
+               -1,               -3,
+               -5,                1,
+                1,                2,
+               -2,                0,
+                1,                1,
+                2,                2,
+                1,                1,
+                0,               -1,
+               -2,               -1,
+                0,                0,
+                0,                2,
+                0,                0,
+                1,               -1,
+                0,                3,
+               -2,               -1,
+                1,                0,
+                0,                0,
+                1,                0,
+                0,                0,
+                4,               -1,
+                1,               -3,
+                0,                1,
+                1,                4,
+                0,               -1,
+               -1,                0,
+               -1,               -1,
+               -2,               -3,
+               -1,                0,
+               -1,                0,
+                0,                1,
+               -3,                0,
+               -1,                2,
+               -4,                0,
+                1,                1,
+                1,                1,
+                0,                0,
+               -2,               -1,
+                0,                0,
+                3,               -2,
+               -1,                1,
+                1,                1,
+                4,               -1,
+               -1,                0,
+                1,                0,
+                0,                0,
+                0,               -1
 };
 
 const SKP_Silk_NLSF_CBS SKP_Silk_NLSF_CB1_10_Stage_info[ NLSF_MSVQ_CB1_10_STAGES ] =
 {
-        {  32, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *   0 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[   0 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  32 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  32 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  40 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  40 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  48 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  48 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  56 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  56 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  64 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  64 ] }
+        {  32, &SKP_Silk_NLSF_MSVQ_CB1_10_Q8[ 10 *   0 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q4[   0 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q8[ 10 *  32 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q4[  32 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q8[ 10 *  40 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q4[  40 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q8[ 10 *  48 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q4[  48 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q8[ 10 *  56 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q4[  56 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q8[ 10 *  64 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q4[  64 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q8[ 10 *  72 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q4[  72 ] }
 };
 
 const SKP_Silk_NLSF_CB_struct SKP_Silk_NLSF_CB1_10 =
--- a/src_common/SKP_Silk_tables_NLSF_CB1_10.h
+++ b/src_common/SKP_Silk_tables_NLSF_CB1_10.h
@@ -35,8 +35,8 @@
 {
 #endif
 
-#define NLSF_MSVQ_CB1_10_STAGES       6
-#define NLSF_MSVQ_CB1_10_VECTORS      72
+#define NLSF_MSVQ_CB1_10_STAGES       7
+#define NLSF_MSVQ_CB1_10_VECTORS      80
 
 /* NLSF codebook entropy coding tables */
 extern const SKP_uint16         SKP_Silk_NLSF_MSVQ_CB1_10_CDF[ NLSF_MSVQ_CB1_10_VECTORS + NLSF_MSVQ_CB1_10_STAGES ];
--- a/src_common/SKP_Silk_tables_NLSF_CB1_16.c
+++ b/src_common/SKP_Silk_tables_NLSF_CB1_16.c
@@ -28,127 +28,128 @@
 /**********************************************/
 /* This file has been automatically generated */
 /*                                            */
-/* ROM usage:  0.29 + 3.57 kB                 */
+/* ROM usage:  0.29 + 1.80 kB                 */
 /**********************************************/
 
 #include "SKP_Silk_structs.h"
+#include "SKP_Silk_tables.h"
 #include "SKP_Silk_tables_NLSF_CB1_16.h"
 
 const SKP_uint16 SKP_Silk_NLSF_MSVQ_CB1_16_CDF[ NLSF_MSVQ_CB1_16_VECTORS + NLSF_MSVQ_CB1_16_STAGES ] =
 {
             0,
-        19099,
-        26957,
-        30639,
-        34242,
-        37546,
-        40447,
-        43287,
-        46005,
-        48445,
-        49865,
-        51284,
-        52673,
-        53975,
-        55221,
-        56441,
-        57267,
-        58025,
-        58648,
-        59232,
-        59768,
-        60248,
-        60729,
-        61210,
-        61690,
-        62171,
-        62651,
-        63132,
-        63613,
-        64093,
-        64574,
-        65054,
+        17152,
+        24057,
+        28733,
+        32040,
+        34820,
+        37262,
+        39228,
+        41194,
+        42997,
+        44723,
+        46376,
+        47959,
+        49543,
+        50994,
+        52446,
+        53777,
+        54897,
+        56016,
+        57088,
+        58071,
+        59013,
+        59876,
+        60667,
+        61305,
+        61942,
+        62455,
+        62969,
+        63482,
+        63995,
+        64508,
+        65022,
         65535,
             0,
-        28808,
-        38775,
-        46801,
-        51785,
-        55886,
-        59410,
-        62572,
+        27679,
+        38351,
+        48138,
+        52625,
+        56739,
+        60199,
+        62867,
         65535,
             0,
-        27376,
-        38639,
-        45052,
-        51465,
-        55448,
-        59021,
-        62594,
+        31319,
+        40235,
+        45312,
+        50174,
+        54632,
+        59091,
+        62383,
         65535,
             0,
-        33403,
-        39569,
-        45102,
-        49961,
-        54047,
-        57959,
-        61788,
+        39134,
+        44026,
+        48322,
+        52261,
+        55873,
+        59185,
+        62498,
         65535,
             0,
-        25851,
-        43356,
-        47828,
-        52204,
-        55964,
-        59413,
-        62507,
+        42248,
+        46688,
+        50941,
+        55013,
+        58437,
+        61078,
+        63499,
         65535,
             0,
-        34277,
-        40337,
-        45432,
-        50311,
-        54326,
-        58171,
-        61853,
+        44150,
+        48053,
+        51334,
+        54477,
+        57486,
+        60245,
+        63005,
         65535,
             0,
-        33538,
-        39865,
-        45302,
-        50076,
-        54549,
-        58478,
-        62159,
+        40440,
+        45076,
+        49515,
+        53089,
+        56512,
+        59651,
+        62657,
         65535,
             0,
-        27445,
-        35258,
-        40665,
-        46072,
-        51362,
-        56540,
-        61086,
+        31605,
+        39507,
+        45094,
+        50444,
+        55567,
+        59351,
+        62973,
         65535,
             0,
-        22080,
-        30779,
-        37065,
-        43085,
-        48849,
-        54613,
-        60133,
+        28639,
+        39681,
+        47834,
+        52682,
+        55965,
+        59248,
+        62391,
         65535,
             0,
-        13417,
-        21748,
-        30078,
-        38231,
-        46383,
-        53091,
-        59515,
+        17932,
+        34375,
+        42961,
+        49875,
+        55689,
+        59458,
+        62628,
         65535
 };
 
@@ -175,520 +176,520 @@
        2,
        2,
        2,
-       3,
-       3,
-       4
+       2,
+       2,
+       3
 };
 
-const SKP_int16 SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[ NLSF_MSVQ_CB1_16_VECTORS ] =
+const SKP_uint8 SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[ NLSF_MSVQ_CB1_16_VECTORS ] =
 {
-               57,               98,
-              133,              134,
-              138,              144,
-              145,              147,
-              152,              177,
-              177,              178,
-              181,              183,
-              184,              202,
-              206,              215,
-              218,              222,
-              227,              227,
-              227,              227,
-              227,              227,
-              227,              227,
-              227,              227,
-              227,              227,
-               38,               87,
-               97,              119,
-              128,              135,
-              140,              143,
-               40,               81,
-              107,              107,
-              129,              134,
-              134,              143,
-               31,              109,
-              114,              120,
-              128,              130,
-              131,              132,
-               43,               61,
-              124,              125,
-              132,              136,
-              141,              142,
-               30,              110,
-              118,              120,
-              129,              131,
-              133,              133,
-               31,              108,
-              115,              121,
-              124,              130,
-              133,              137,
-               40,               98,
-              115,              115,
-              116,              117,
-              123,              124,
-               50,               93,
-              108,              110,
+               31,               52,
+               61,               69,
+               73,               76,
+               81,               81,
+               83,               84,
+               85,               86,
+               86,               88,
+               88,               90,
+               94,               94,
+               95,               97,
+               98,              100,
+              102,              107,
+              107,              112,
               112,              112,
-              114,              115,
-               73,               95,
-               95,               96,
-               96,              105,
-              107,              110
+              112,              112,
+              112,              112,
+               20,               42,
+               44,               62,
+               64,               68,
+               74,               74,
+               17,               46,
+               59,               60,
+               62,               62,
+               69,               70,
+               12,               60,
+               63,               65,
+               67,               69,
+               69,               71,
+               10,               62,
+               63,               64,
+               68,               74,
+               76,               80,
+                9,               65,
+               69,               70,
+               71,               73,
+               73,               75,
+               11,               61,
+               62,               67,
+               68,               70,
+               71,               72,
+               17,               49,
+               57,               58,
+               59,               66,
+               67,               75,
+               19,               41,
+               48,               60,
+               69,               69,
+               70,               70,
+               30,               32,
+               47,               52,
+               56,               66,
+               70,               72
 };
 
 const SKP_int SKP_Silk_NLSF_MSVQ_CB1_16_ndelta_min_Q15[ 16 + 1 ] =
 {
-              148,
-                3,
-               60,
+              110,
+               28,
+              122,
                68,
-              117,
-               86,
-              121,
-              124,
-              152,
-              153,
-              207,
-              151,
-              225,
-              239,
-              126,
-              183,
-              792
+               75,
+               71,
+               64,
+               78,
+               83,
+               77,
+               81,
+               76,
+               84,
+               73,
+               69,
+               21,
+              778
 };
 
-const SKP_int16 SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 * NLSF_MSVQ_CB1_16_VECTORS ] =
+const SKP_int8 SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 * NLSF_MSVQ_CB1_16_VECTORS ] =
 {
-             1309,             3060,             5071,             6996,
-             9028,            10938,            12934,            14891,
-            16933,            18854,            20792,            22764,
-            24753,            26659,            28626,            30501,
-             1264,             2745,             4610,             6408,
-             8286,            10043,            12084,            14108,
-            16118,            18163,            20095,            22164,
-            24264,            26316,            28329,            30251,
-             1044,             2080,             3672,             5179,
-             7140,             9100,            11070,            13065,
-            15423,            17790,            19931,            22101,
-            24290,            26361,            28499,            30418,
-             1131,             2476,             4478,             6149,
-             7902,             9875,            11938,            13809,
-            15869,            17730,            19948,            21707,
-            23761,            25535,            27426,            28917,
-             1040,             2004,             4026,             6100,
-             8432,            10494,            12610,            14694,
-            16797,            18775,            20799,            22782,
-            24772,            26682,            28631,            30516,
-             2310,             3812,             5913,             7933,
-            10033,            11881,            13885,            15798,
-            17751,            19576,            21482,            23276,
-            25157,            27010,            28833,            30623,
-             1254,             2847,             5013,             6781,
-             8626,            10370,            12726,            14633,
-            16281,            17852,            19870,            21472,
-            23002,            24629,            26710,            27960,
-             1468,             3059,             4987,             7026,
-             8741,            10412,            12281,            14020,
-            15970,            17723,            19640,            21522,
-            23472,            25661,            27986,            30225,
-             2171,             3566,             5605,             7384,
-             9404,            11220,            13030,            14758,
-            16687,            18417,            20346,            22091,
-            24055,            26212,            28356,            30397,
-             2409,             4676,             7543,             9786,
-            11419,            12935,            14368,            15653,
-            17366,            18943,            20762,            22477,
-            24440,            26327,            28284,            30242,
-             2354,             4222,             6820,             9107,
-            11596,            13934,            15973,            17682,
-            19158,            20517,            21991,            23420,
-            25178,            26936,            28794,            30527,
-             1323,             2414,             4184,             6039,
-             7534,             9398,            11099,            13097,
-            14799,            16451,            18434,            20887,
-            23490,            25838,            28046,            30225,
-             1361,             3243,             6048,             8511,
-            11001,            13145,            15073,            16608,
-            18126,            19381,            20912,            22607,
-            24660,            26668,            28663,            30566,
-             1216,             2648,             5901,             8422,
-            10037,            11425,            12973,            14603,
-            16686,            18600,            20555,            22415,
-            24450,            26280,            28206,            30077,
-             2417,             4048,             6316,             8433,
-            10510,            12757,            15072,            17295,
-            19573,            21503,            23329,            24782,
-            26235,            27689,            29214,            30819,
-             1012,             2345,             4991,             7377,
-             9465,            11916,            14296,            16566,
-            18672,            20544,            22292,            23838,
-            25415,            27050,            28848,            30551,
-             1937,             3693,             6267,             8019,
-            10372,            12194,            14287,            15657,
-            17431,            18864,            20769,            22206,
-            24037,            25463,            27383,            28602,
-             1969,             3305,             5017,             6726,
-             8375,             9993,            11634,            13280,
-            15078,            16751,            18464,            20119,
-            21959,            23858,            26224,            29298,
-             1198,             2647,             5428,             7423,
-             9775,            12155,            14665,            16344,
-            18121,            19790,            21557,            22847,
-            24484,            25742,            27639,            28711,
-             1636,             3353,             5447,             7597,
-             9837,            11647,            13964,            16019,
-            17862,            20116,            22319,            24037,
-            25966,            28086,            29914,            31294,
-             2676,             4105,             6378,             8223,
-            10058,            11549,            13072,            14453,
-            15956,            17355,            18931,            20402,
-            22183,            23884,            25717,            27723,
-             1373,             2593,             4449,             5633,
-             7300,             8425,             9474,            10818,
-            12769,            15722,            19002,            21429,
-            23682,            25924,            28135,            30333,
-             1596,             3183,             5378,             7164,
-             8670,            10105,            11470,            12834,
-            13991,            15042,            16642,            17903,
-            20759,            25283,            27770,            30240,
-             2037,             3987,             6237,             8117,
-             9954,            12245,            14217,            15892,
-            17775,            20114,            22314,            25942,
-            26305,            26483,            26796,            28561,
-             2181,             3858,             5760,             7924,
-            10041,            11577,            13769,            15700,
-            17429,            19879,            23583,            24538,
-            25212,            25693,            28688,            30507,
-             1992,             3882,             6474,             7883,
-             9381,            12672,            14340,            15701,
-            16658,            17832,            20850,            22885,
-            24677,            26457,            28491,            30460,
-             2391,             3988,             5448,             7432,
-            11014,            12579,            13140,            14146,
-            15898,            18592,            21104,            22993,
-            24673,            27186,            28142,            29612,
-             1713,             5102,             6989,             7798,
-             8670,            10110,            12746,            14881,
-            16709,            18407,            20126,            22107,
-            24181,            26198,            28237,            30137,
-             1612,             3617,             6148,             8359,
-             9576,            11528,            14936,            17809,
-            18287,            18729,            19001,            21111,
-            24631,            26596,            28740,            30643,
-             2266,             4168,             7862,             9546,
-             9618,             9703,            10134,            13897,
-            16265,            18432,            20587,            22605,
-            24754,            26994,            29125,            30840,
-             1840,             3917,             6272,             7809,
-             9714,            11438,            13767,            15799,
-            19244,            21972,            22980,            23180,
-            23723,            25650,            29117,            31085,
-             1458,             3612,             6008,             7488,
-             9827,            11893,            14086,            15734,
-            17440,            19535,            22424,            24767,
-            29246,            29928,            30516,            30947,
-             -102,             -121,              -31,               -6,
-                5,               -2,                8,              -18,
-               -4,                6,               14,               -2,
-              -12,              -16,              -12,              -60,
-             -126,             -353,             -574,             -677,
-             -657,             -617,             -498,             -393,
-             -348,             -277,             -225,             -164,
-             -102,              -70,              -31,               33,
-                4,              379,              387,              551,
-              605,              620,              532,              482,
-              442,              454,              385,              347,
-              322,              299,              266,              200,
-             1168,              951,              672,              246,
-               60,             -161,             -259,             -234,
-             -253,             -282,             -203,             -187,
-             -155,             -176,             -198,             -178,
-               10,              170,              393,              609,
-              555,              208,             -330,             -571,
-             -769,             -633,             -319,              -43,
-               95,              105,              106,              116,
-             -152,             -140,             -125,                5,
-              173,              274,              264,              331,
-              -37,             -293,             -609,             -786,
-             -959,             -814,             -645,             -238,
-              -91,               36,              -11,             -101,
-             -279,             -227,              -40,               90,
-              530,              677,              890,             1104,
-              999,              835,              564,              295,
-             -280,             -364,             -340,             -331,
-             -284,              288,              761,              880,
-              988,              627,              146,             -226,
-             -203,             -181,             -142,               39,
-               24,              -26,             -107,              -92,
-             -161,             -135,             -131,              -88,
-             -160,             -156,              -75,              -43,
-              -36,               -6,              -33,               33,
-             -324,             -415,             -108,              124,
-              157,              191,              203,              197,
-              144,              109,              152,              176,
-              190,              122,              101,              159,
-              663,              668,              480,              400,
-              379,              444,              446,              458,
-              343,              351,              310,              228,
-              133,               44,               75,               63,
-              -84,               39,              -29,               35,
-              -94,             -233,             -261,             -354,
-               77,              262,              -24,             -145,
-             -333,             -409,             -404,             -597,
-             -488,             -300,              910,              592,
-              412,              120,              130,              -51,
-              -37,              -77,             -172,             -181,
-             -159,             -148,              -72,              -62,
-              510,              516,              113,             -585,
-            -1075,             -957,             -417,             -195,
-                9,                7,              -88,             -173,
-              -91,               54,               98,               95,
-              -28,              197,             -527,             -621,
-              157,              122,             -168,              147,
-              309,              300,              336,              315,
-              396,              408,              376,              106,
-             -162,             -170,             -315,               98,
-              821,              908,              570,              -33,
-             -312,             -568,             -572,             -378,
-             -107,               23,              156,               93,
-             -129,              -87,               20,              -72,
-              -37,               40,               21,               27,
-               48,               75,               77,               65,
-               46,               71,               66,               47,
-              136,              344,              236,              322,
-              170,              283,              269,              291,
-              162,              -43,             -204,             -259,
-             -240,             -305,             -350,             -312,
-              447,              348,              345,              257,
-               71,             -131,              -77,             -190,
-             -202,              -40,               35,              133,
-              261,              365,              438,              303,
-               -8,               22,              140,              137,
-             -300,             -641,             -764,             -268,
-              -23,              -25,               73,             -162,
-             -150,             -212,              -72,                6,
-               39,               78,              104,              -93,
-             -308,             -136,              117,              -71,
-             -513,             -820,             -700,             -450,
-             -161,              -23,               29,               78,
-              337,              106,             -406,             -782,
-             -112,              233,              383,               62,
-             -126,                6,              -77,              -29,
-             -146,             -123,              -51,              -27,
-              -27,             -381,             -641,              402,
-              539,                8,             -207,             -366,
-              -36,              -27,             -204,             -227,
-             -237,             -189,              -64,               51,
-              -92,             -137,             -281,               62,
-              233,               92,              148,              294,
-              363,              416,              564,              625,
-              370,              -36,             -469,             -462,
-              102,              168,               32,              117,
-              -21,               97,              139,               89,
-              104,               35,                4,               82,
-               66,               58,               73,               93,
-              -76,             -320,             -236,             -189,
-             -203,             -142,              -27,              -73,
-                9,               -9,              -25,               12,
-              -15,                4,                4,              -50,
-              314,              180,              162,              -49,
-              199,             -108,             -227,              -66,
-             -447,              -67,             -264,             -394,
-                5,               55,             -133,             -176,
-             -116,             -241,              272,              109,
-              282,              262,              192,              -64,
-             -392,             -514,              156,              203,
-              154,               72,              -34,             -160,
-              -73,                3,              -33,             -431,
-              321,               18,             -567,             -590,
-             -108,               88,               66,               51,
-              -31,             -193,              -46,               65,
-              -29,              -23,              215,              -31,
-              101,             -113,               32,              304,
-               88,              320,              448,                5,
-             -439,             -562,             -508,             -135,
-              -13,             -171,               -8,              182,
-              -99,             -181,             -149,              376,
-              476,               64,             -396,             -652,
-             -150,              176,              222,               65,
-             -590,              719,              271,              399,
-              245,               72,             -156,             -152,
-             -176,               59,               94,              125,
-               -9,               -7,                9,                1,
-              -61,             -116,              -82,                1,
-               79,               22,              -44,              -15,
-              -48,              -65,              -62,             -101,
-             -102,              -54,              -70,              -78,
-              -80,              -25,              398,               71,
-              139,               38,               90,              194,
-              222,              249,              165,               94,
-              221,              262,              163,               91,
-             -206,              573,              200,             -287,
-             -147,                5,              -18,              -85,
-              -74,             -125,              -87,               85,
-              141,                4,               -4,               28,
-              234,               48,             -150,             -111,
-             -506,              237,             -209,              345,
-               94,             -124,               77,              121,
-              143,               12,              -80,              -48,
-              191,              144,              -93,              -65,
-             -151,             -643,              435,              106,
-               87,                7,               65,              102,
-               94,               68,                5,               99,
-              222,               93,               94,              355,
-              -13,              -89,             -228,             -503,
-              287,              109,              108,              449,
-              253,              -29,             -109,             -116,
-               15,              -73,              -20,              131,
-             -147,               72,               59,             -150,
-             -594,              273,              316,              132,
-              199,              106,              198,              212,
-              220,               82,               45,              -13,
-              223,              137,              270,               38,
-              252,              135,             -177,             -207,
-             -360,             -102,              403,              406,
-              -14,               83,               64,               51,
-               -7,              -99,              -97,              -88,
-             -124,              -65,               42,               32,
-               28,               29,               12,               20,
-              119,              -26,             -212,             -201,
-              373,              251,              141,              103,
-               36,              -52,               66,               18,
-               -6,              -95,             -196,                5,
-               98,              -85,             -108,              218,
-             -164,               20,              356,              172,
-               37,              266,               23,              112,
-              -24,              -99,              -92,             -178,
-               29,             -278,              388,              -60,
-             -220,              300,              -13,              154,
-              191,               15,              -37,             -110,
-             -153,             -150,             -114,               -7,
-              -94,              -31,              -62,             -177,
-                4,              -70,               35,              453,
-              147,             -247,             -328,              101,
-               20,             -114,              147,              108,
-             -119,             -109,             -102,             -238,
-               55,             -102,              173,              -89,
-              129,              138,             -330,             -160,
-              485,              154,              -59,             -170,
-              -20,              -34,             -261,              -40,
-             -129,               77,              -84,               69,
-               83,              160,              169,               63,
-             -516,               30,              336,               52,
-               -0,              -52,             -124,              158,
-               19,              197,              -10,             -375,
-              405,              285,              114,             -395,
-              -47,              196,               62,               87,
-             -106,              -65,              -75,              -69,
-              -13,               34,               99,               59,
-               83,               98,               44,                0,
-               24,               18,               17,               70,
-              -22,              194,              208,              144,
-              -79,              -15,               32,             -104,
-              -28,             -105,             -186,             -212,
-             -228,              -79,              -76,               51,
-              -71,               72,              118,              -34,
-               -3,             -171,                5,                2,
-             -108,             -125,               62,              -58,
-               58,             -121,               73,             -466,
-               92,               63,              -94,              -78,
-              -76,              212,               36,             -225,
-              -71,             -354,              152,              143,
-              -79,             -246,              -51,              -31,
-               -6,             -270,              240,              210,
-               30,             -157,             -231,               74,
-             -146,               88,             -273,              156,
-               92,               56,               71,                2,
-              318,              164,               32,             -110,
-              -35,              -41,              -95,             -106,
-               11,              132,              -68,               55,
-              123,              -83,             -149,              212,
-              132,                0,             -194,               55,
-              206,             -108,             -353,              289,
-             -195,                1,              233,              -22,
-              -60,               20,               26,               68,
-              166,               27,              -58,              130,
-              112,              107,               27,             -165,
-              115,              -93,              -37,               38,
-               83,              483,               65,             -229,
-              -13,              157,               85,               50,
-              136,               10,               32,               83,
-               82,               55,                5,               -9,
-              -52,              -78,              -81,              -51,
-               40,               18,             -127,             -224,
-              -41,               53,             -210,             -113,
-               24,              -17,             -187,              -89,
-                8,              121,               83,               77,
-               91,              -74,              -35,             -112,
-             -161,             -173,              102,              132,
-             -125,              -61,              103,             -260,
-               52,              166,              -32,             -156,
-              -87,              -56,               60,              -70,
-             -124,              242,              114,             -251,
-             -166,              201,              127,               28,
-              -11,               23,              -80,             -115,
-              -20,              -51,             -348,              340,
-              -34,              133,               13,               92,
-             -124,             -136,             -120,              -26,
-               -6,               17,               28,               21,
-              120,             -168,              160,              -35,
-              115,               28,                9,                7,
-              -56,               39,              156,              256,
-              -18,                1,              277,               82,
-              -70,             -144,              -88,              -13,
-              -59,             -157,                8,             -134,
-               21,              -40,               58,              -21,
-              194,             -276,               97,              279,
-              -56,             -140,              125,               57,
-             -184,             -204,              -70,               -2,
-              128,             -202,              -78,              230,
-              -23,              161,             -102,                1,
-                1,              180,              -31,              -86,
-             -167,              -57,              -60,               27,
-              -13,               99,              108,              111,
-               76,               69,               34,              -21,
-               53,               38,               34,               78,
-               73,              219,               51,               15,
-              -72,             -103,             -207,               30,
-              213,              -14,               31,              -94,
-              -40,             -144,               67,                4,
-              105,               59,             -240,               25,
-              244,               69,               58,               23,
-              -24,               -5,              -15,             -133,
-              -71,              -67,              181,               29,
-              -45,              121,               96,               51,
-              -72,              -53,               56,             -153,
-              -27,               85,              183,              211,
-              105,              -34,              -46,               43,
-              -72,              -93,               36,             -128,
-               29,              111,              -95,             -156,
-             -179,             -235,               21,              -39,
-              -71,              -33,              -61,             -252,
-              230,             -131,              157,              -21,
-              -85,              -28,             -123,               80,
-             -160,               63,               47,               -6,
-              -49,              -96,              -19,               17,
-              -58,               17,               -0,              -13,
-             -170,               25,              -35,               59,
-               10,              -31,             -413,               81,
-               62,               18,             -164,              245,
-               92,             -165,               42,               26,
-              126,             -248,              193,              -55,
-               16,               39,               14,               50
+             -118,             -105,              -90,              -74,
+              -58,              -44,              -29,              -13,
+                3,               18,               33,               49,
+               64,               79,               95,              109,
+             -118,             -110,              -95,              -81,
+              -66,              -52,              -37,              -21,
+               -4,               12,               27,               43,
+               60,               77,               93,              107,
+             -120,             -114,              -94,              -78,
+              -60,              -45,              -29,              -13,
+                3,               19,               34,               49,
+               65,               80,               95,              110,
+             -122,             -117,             -103,              -88,
+              -69,              -52,              -37,              -19,
+               -2,               15,               31,               47,
+               63,               79,               95,              110,
+             -119,             -111,              -95,              -81,
+              -68,              -53,              -36,              -22,
+               -5,                9,               27,               40,
+               56,               70,               85,               96,
+             -117,             -106,              -90,              -76,
+              -62,              -49,              -31,              -15,
+               -2,               10,               26,               39,
+               51,               64,               80,               90,
+             -113,             -102,              -84,              -69,
+              -54,              -42,              -27,              -15,
+               -1,               13,               28,               42,
+               58,               73,               90,              106,
+             -115,             -104,              -90,              -76,
+              -63,              -50,              -35,              -21,
+               -8,                7,               22,               37,
+               53,               70,               88,              107,
+             -109,              -98,              -82,              -66,
+              -49,              -35,              -18,               -2,
+               14,               30,               45,               58,
+               73,               86,              100,              113,
+             -106,              -96,              -82,              -68,
+              -53,              -40,              -25,              -10,
+                5,               19,               34,               49,
+               65,               80,               96,              110,
+             -120,             -113,              -99,              -86,
+              -72,              -59,              -50,              -36,
+               -7,               10,               27,               45,
+               61,               78,               94,              109,
+             -117,             -109,              -96,              -84,
+              -72,              -58,              -47,              -32,
+              -19,               -2,               23,               40,
+               57,               75,               92,              109,
+             -119,             -112,              -99,              -87,
+              -78,              -66,              -42,              -20,
+               -6,               11,               28,               44,
+               60,               78,               94,              110,
+             -110,              -97,              -79,              -62,
+              -44,              -26,               -8,                8,
+               23,               36,               49,               60,
+               72,               84,               97,              111,
+             -109,              -94,              -73,              -55,
+              -37,              -22,               -8,                2,
+               13,               24,               37,               50,
+               65,               79,               95,              110,
+             -114,             -101,              -83,              -67,
+              -48,              -31,              -15,               -1,
+               10,               21,               34,               49,
+               65,               80,               96,              111,
+             -118,             -112,             -100,              -92,
+              -80,              -49,              -34,              -19,
+               -7,                8,               26,               43,
+               60,               78,               94,              110,
+             -118,             -112,             -100,              -78,
+              -61,              -51,              -38,              -26,
+               -6,                6,               19,               33,
+               52,               73,               94,              110,
+             -117,             -110,              -94,              -79,
+              -67,              -54,              -42,              -27,
+              -16,               -6,                8,               35,
+               57,               75,               92,              109,
+             -113,              -92,              -71,              -57,
+              -45,              -34,              -22,              -10,
+                4,               17,               32,               46,
+               62,               77,               93,              107,
+             -120,             -110,              -90,              -71,
+              -54,              -37,              -17,               -1,
+               16,               31,               44,               56,
+               70,               82,               97,              111,
+             -110,             -101,              -88,              -80,
+              -69,              -50,              -30,              -13,
+                2,               17,               32,               48,
+               64,               80,               97,              111,
+             -118,             -112,             -101,              -86,
+              -55,              -41,              -29,              -16,
+               -4,               10,               30,               43,
+               56,               72,               90,              107,
+             -112,             -103,              -88,              -74,
+              -61,              -49,              -36,              -24,
+              -10,                4,               17,               29,
+               43,               57,               74,              102,
+             -118,             -107,              -84,              -69,
+              -52,              -35,              -17,               -5,
+                9,               20,               34,               45,
+               59,               69,               84,               93,
+             -106,              -95,              -78,              -63,
+              -48,              -36,              -24,              -13,
+               -1,                9,               21,               32,
+               46,               60,               76,               92,
+             -116,             -101,              -85,              -69,
+              -54,              -37,              -21,               -6,
+               11,               24,               39,               53,
+               76,               93,              104,              112,
+             -114,             -104,              -87,              -74,
+              -61,              -50,              -40,              -30,
+              -19,              -10,                4,               14,
+               36,               69,               89,              109,
+             -112,              -98,              -85,              -72,
+              -54,              -35,              -23,              -11,
+                3,               20,               38,               56,
+               69,               81,               90,              108,
+             -116,             -101,              -84,              -70,
+              -55,              -40,              -25,               -8,
+               11,               30,               41,               49,
+               62,               83,              105,              117,
+             -115,              -98,              -82,              -61,
+              -48,              -40,              -29,              -14,
+                6,               22,               39,               53,
+               68,               82,               96,              110,
+             -113,              -96,              -76,              -68,
+              -59,              -44,              -21,               -8,
+                3,               15,               33,               49,
+               65,               80,               95,              110,
+               -1,                0,                0,                1,
+                1,                2,                2,                2,
+                2,                2,                2,                1,
+                1,                1,                1,                0,
+                0,               -1,               -3,               -6,
+               -6,               -5,               -4,               -4,
+               -3,               -1,                0,                0,
+                0,                0,                1,                1,
+                0,                0,               -1,                0,
+               -1,               -2,               -3,               -3,
+               -4,               -5,               -5,               -4,
+               -3,               -2,               -2,                0,
+                9,                8,                5,                2,
+                1,               -1,               -1,               -2,
+               -1,               -2,               -1,               -2,
+               -2,               -2,               -2,               -2,
+               -5,               -8,                3,                2,
+                2,                0,                0,                0,
+                0,                0,                1,                1,
+                1,                1,                0,                0,
+                0,                0,                2,                8,
+                9,                8,                5,                2,
+               -1,               -2,               -2,               -2,
+               -1,                1,                1,                2,
+               -1,                0,               -1,                0,
+                0,                2,                4,                5,
+                4,                2,               -1,               -5,
+               -8,               -8,               -6,               -2,
+                0,                0,               -2,               -2,
+               -1,               -1,                0,                2,
+                5,                5,                5,                8,
+                9,                7,                6,                3,
+               -1,               -1,               -1,               -1,
+               -1,               -1,               -1,               -1,
+               -1,               -1,               -1,                0,
+               -1,                0,                0,                0,
+                4,                3,                4,                3,
+                3,                3,                3,                3,
+                2,                2,                2,                2,
+                2,                2,                2,                2,
+               -1,               -3,               -6,               -7,
+                0,                0,                4,                3,
+                3,                1,                1,                1,
+                1,                1,                1,                1,
+               -4,                7,                4,                4,
+                3,                3,                2,                2,
+                1,                1,                1,                1,
+                1,                1,                1,                1,
+               -2,               -5,               -7,                5,
+                3,                3,                3,                3,
+                2,                2,                1,                1,
+                1,                0,                0,                0,
+                2,                1,                4,                3,
+                0,               -3,               -7,               -6,
+               -5,               -3,               -2,               -1,
+                0,                0,                0,                0,
+                0,                0,                0,                1,
+                2,                3,                3,                4,
+                3,                4,                5,                4,
+                1,               -3,               -6,               -7,
+                2,                2,                1,               -1,
+               -3,               -2,               -2,               -1,
+                2,               -1,               -6,               -9,
+               -4,               -1,                1,                2,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                3,                3,                1,               -1,
+               -5,               -7,                1,               -1,
+                0,                1,                0,                0,
+                0,                0,                1,                1,
+               -1,               -1,                1,                1,
+                2,                3,                4,                4,
+                3,                0,               -3,               -5,
+               -4,               -3,               -2,               -1,
+                2,                2,                1,                1,
+                0,               -2,               -2,               -2,
+                1,                3,                3,                0,
+               -4,               -6,               -4,               -1,
+                0,                0,                1,                1,
+                2,                0,               -2,               -5,
+               -7,               -5,               -1,                0,
+                2,                2,                3,                2,
+                0,                0,               -4,               -7,
+                5,                3,               -1,               -2,
+               -1,               -1,               -1,                0,
+                0,                0,                0,                0,
+                0,               -1,               -1,               -3,
+               -7,                2,                0,                4,
+                3,                3,                2,                1,
+                1,                1,                0,                0,
+                0,                0,                2,                3,
+                1,                0,                0,               -1,
+                2,                2,                4,                6,
+                6,                3,                0,               -2,
+                1,                1,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+               -4,               -4,                2,                0,
+                2,                2,                2,                1,
+                2,                1,                1,                1,
+                1,                0,                1,                0,
+               -1,               -2,               -4,                3,
+                1,               -2,               -1,               -4,
+                2,                0,               -2,               -1,
+               -1,               -2,               -2,               -1,
+                0,                0,                1,               -2,
+               -1,                3,                4,                0,
+               -3,               -5,               -4,               -1,
+               -1,               -1,                0,                0,
+               -1,               -1,                2,                2,
+                0,               -3,               -4,                1,
+                4,                4,                3,                1,
+                0,                1,                1,                2,
+                0,               -1,               -1,               -1,
+               -1,               -2,               -5,                4,
+               -1,               -5,                2,                1,
+               -1,                0,                0,                1,
+                0,               -1,                0,                0,
+                1,                0,                0,               -4,
+               -7,                5,                2,                0,
+                1,                1,                0,                0,
+                1,                1,                0,                1,
+                1,                0,                2,                1,
+                0,                0,               -3,               -3,
+                6,                5,                0,               -3,
+                0,                0,                0,                0,
+               -1,                0,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                1,                1,                1,                0,
+                1,                3,                1,                1,
+                0,                0,                0,                0,
+               -1,               -2,               -3,               -4,
+                1,                0,               -2,                0,
+                4,                0,               -4,                1,
+                0,                1,                0,               -1,
+               -1,                0,                0,                0,
+                0,               -2,                4,                3,
+                1,               -1,               -2,                3,
+               -2,                0,               -2,               -1,
+                0,                1,                1,                0,
+                1,                1,                0,               -1,
+               -1,                2,               -2,               -5,
+                4,                1,                1,                0,
+               -1,               -1,                0,                1,
+                1,                0,               -2,                2,
+                2,                0,                5,                3,
+                2,                1,                1,                0,
+               -2,                1,                3,                0,
+                0,                0,                1,                0,
+                1,                0,               -1,               -1,
+               -1,               -2,                1,                5,
+                3,               -2,               -4,                2,
+               -2,                5,                3,               -2,
+                0,               -1,               -1,               -1,
+                0,                1,                0,                0,
+                2,                1,                0,               -1,
+               -1,                0,                0,                0,
+                1,                1,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                1,               -1,               -3,               -1,
+               -3,                0,                0,               -1,
+               -2,               -1,                0,                0,
+                0,                0,                0,                0,
+                1,                0,                0,                0,
+               -1,               -2,               -2,               -2,
+                1,                2,                0,               -1,
+               -1,                0,                0,               -4,
+                0,               -1,                4,                2,
+               -3,                0,                1,               -1,
+                0,               -2,               -1,                0,
+                0,                0,               -1,               -1,
+                1,                0,               -1,               -1,
+                1,               -2,                2,                2,
+               -2,                3,                0,               -2,
+               -2,               -1,               -3,                0,
+                0,                0,               -1,               -1,
+               -1,               -2,               -3,                2,
+                3,                0,               -4,                1,
+                2,                1,                0,                0,
+                1,                1,                0,               -2,
+                1,                0,                1,                0,
+               -2,               -1,                3,                0,
+                1,                3,                2,                0,
+                0,                0,                0,                0,
+                0,                1,                0,                0,
+                0,                0,                1,               -1,
+               -3,               -4,                5,                3,
+               -1,               -1,                0,               -1,
+               -1,                0,               -1,               -1,
+               -1,               -1,               -1,               -1,
+                0,                0,                0,                0,
+               -1,                2,                1,                1,
+                1,                2,                1,                1,
+                1,                1,                0,                1,
+                1,                1,                1,                1,
+                2,                1,                0,                1,
+                2,               -1,                0,               -2,
+               -1,                0,               -1,                0,
+                1,                0,                0,                0,
+                1,                0,                1,               -1,
+                0,                1,               -1,                3,
+                1,                1,                1,                1,
+                0,               -1,               -1,               -1,
+                0,                0,               -1,                1,
+                0,               -3,                3,                1,
+                0,               -2,                2,                1,
+                0,               -1,               -1,                0,
+                0,                0,               -1,               -1,
+               -1,                1,                2,               -2,
+                2,                3,               -1,               -1,
+                1,               -1,                0,                0,
+                1,               -1,               -2,                4,
+                0,                0,               -2,                1,
+                0,                0,                0,                0,
+                1,                1,                0,                0,
+                1,                0,                0,                0,
+                0,                1,                0,                0,
+                0,                0,                1,               -1,
+               -5,                3,                1,                0,
+               -1,               -1,               -1,               -1,
+                0,               -1,                0,                0,
+                0,                1,                1,                1,
+                1,                1,                0,                0,
+                2,                1,                0,                1,
+               -1,               -1,                1,                1,
+                1,                0,               -1,                0,
+               -1,                0,                0,                0,
+                0,               -1,                1,                2,
+                1,                1,                1,                0,
+               -1,                1,                1,                0,
+               -1,               -1,               -1,               -1,
+                0,                0,                2,               -3,
+                1,               -1,                0,                0,
+                1,                0,               -1,                0,
+               -1,               -1,                0,                0,
+                1,                0,                1,                0,
+                0,                4,               -1,               -1,
+               -1,                1,               -1,                0,
+                1,                1,                1,                1,
+                1,                0,               -1,                0,
+                1,                1,                0,                0,
+                1,               -4,                0,                1,
+                0,                0,                1,               -2,
+                0,                0,                0,                0,
+               -1,                0,               -1,                0,
+                1,               -1,                2,               -4,
+                1,                0,               -1,                1,
+               -2,                3,                0,                1,
+               -1,                0,               -1,                0,
+               -1,                0,                0,                1,
+                0,                0,               -1,                0,
+                1,                1,                1,                0,
+               -1,                0,                0,                0,
+               -1,                0,                1,                1,
+                0,                0,                0,                0,
+               -1,                0,                1,                1,
+                1,               -1,               -1,               -1,
+                1,               -1,                0,               -1,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                1,                1,
+               -1,                0,               -1,               -1,
+                1,               -1,                0,               -1,
+                1,               -2,                0,               -1,
+                0,                0,                0,                0,
+                1,                0,                0,                0,
+                0,                0,                1,                1,
+                1,                2,               -3,               -1,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+               -1,                0,                0,                0,
+                0,                0,                0,                0,
+                1,                0,                0,                0,
+               -1,                0,               -2,                3,
+               -1,                0,                1,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                0,                0,                0,                0,
+                1,                2,               -4,               -1,
+               -2,               -1,                0,                0,
+               -1,                1,                0,                1,
+                1,                0,                0,                0,
+                0,                0,                0,                0
 };
 
 const SKP_Silk_NLSF_CBS SKP_Silk_NLSF_CB1_16_Stage_info[ NLSF_MSVQ_CB1_16_STAGES ] =
 {
-        {  32, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *   0 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[   0 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  32 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  32 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  40 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  40 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  48 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  48 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  56 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  56 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  64 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  64 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  72 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  72 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  80 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  80 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  88 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  88 ] },
-        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q15[ 16 *  96 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q5[  96 ] }
+        {  32, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *   0 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[   0 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  32 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  32 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  40 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  40 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  48 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  48 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  56 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  56 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  64 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  64 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  72 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  72 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  80 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  80 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  88 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  88 ] },
+        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  96 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  96 ] }
 };
 
 const SKP_Silk_NLSF_CB_struct SKP_Silk_NLSF_CB1_16 =
--- a/src_common/SKP_Silk_tables_other.c
+++ b/src_common/SKP_Silk_tables_other.c
@@ -35,16 +35,16 @@
 
 /* Piece-wise linear mapping from bitrate in kbps to coding quality in dB SNR */
 const SKP_int32 TargetRate_table_NB[ TARGET_RATE_TAB_SZ ] = {
-    0,      8000,   9000,   11000,  13000,  16000,  22000,  100000
+    0,      8000,   9000,   11000,  13000,  16000,  22000,  MAX_TARGET_RATE_BPS
 };
 const SKP_int32 TargetRate_table_MB[ TARGET_RATE_TAB_SZ ] = {
-    0,      10000,  12000,  14000,  17000,  21000,  28000,  100000
+    0,      10000,  12000,  14000,  17000,  21000,  28000,  MAX_TARGET_RATE_BPS
 };
 const SKP_int32 TargetRate_table_WB[ TARGET_RATE_TAB_SZ ] = {
-    0,      11000,  14000,  17000,  21000,  26000,  36000,  100000
+    0,      11000,  14000,  17000,  21000,  26000,  36000,  MAX_TARGET_RATE_BPS
 };
 const SKP_int32 TargetRate_table_SWB[ TARGET_RATE_TAB_SZ ] = {
-    0,      13000,  16000,  19000,  25000,  32000,  46000,  100000
+    0,      13000,  16000,  19000,  25000,  32000,  46000,  MAX_TARGET_RATE_BPS
 };
 const SKP_int32 SNR_table_Q1[ TARGET_RATE_TAB_SZ ] = {
     19,     31,     35,     39,     43,     47,     54,     59
@@ -91,22 +91,13 @@
 const SKP_uint16 SKP_Silk_vadflag_CDF[ 3 ] = {0,  22000,  65535}; // 66% for speech, 33% for no speech
 const SKP_int    SKP_Silk_vadflag_offset   = 1;
 
-/* tables for sampling rate */
-const SKP_int    SKP_Silk_SamplingRates_table[ 4 ] = {8, 12, 16, 24};
-const SKP_uint16 SKP_Silk_SamplingRates_CDF[ 5 ]   = {0,  16000,  32000,  48000,  65535};
-const SKP_int    SKP_Silk_SamplingRates_offset     = 2;
-
-/* tables for number of subframes */
-const SKP_uint16 SKP_Silk_NbSubframes_CDF[ 3 ]   = {0,  40000, 65535};
-const SKP_int    SKP_Silk_NbSubframes_offset     = 1;
-
 /* tables for NLSF interpolation factor */
 const SKP_uint16 SKP_Silk_NLSF_interpolation_factor_CDF[ 6 ] = {0,   3706,   8703,  19226,  30926,  65535};
 const SKP_int    SKP_Silk_NLSF_interpolation_factor_offset   = 4;
 
 /* Table for frame termination indication */
-const SKP_uint16 SKP_Silk_FrameTermination_CDF[ 6 ] = {0,   13107,   26214,   39321,   52428,   65535};
-const SKP_int    SKP_Silk_FrameTermination_offset   = 4;
+const SKP_uint16 SKP_Silk_FrameTermination_CDF[ 3 ] = {0, 50000, 65535};
+const SKP_int    SKP_Silk_FrameTermination_offset   = 1;
 
 /* Table for random seed */
 const SKP_uint16 SKP_Silk_Seed_CDF[ 5 ] = {0, 16384, 32768, 49152, 65535};
--- /dev/null
+++ b/src_common/SKP_Silk_tuning_parameters.h
@@ -1,0 +1,179 @@
+/***********************************************************************
+Copyright (c) 2006-2010, Skype Limited. All rights reserved. 
+Redistribution and use in source and binary forms, with or without 
+modification, (subject to the limitations in the disclaimer below) 
+are permitted provided that the following conditions are met:
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright 
+notice, this list of conditions and the following disclaimer in the 
+documentation and/or other materials provided with the distribution.
+- Neither the name of Skype Limited, nor the names of specific 
+contributors, may be used to endorse or promote products derived from 
+this software without specific prior written permission.
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED 
+BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+***********************************************************************/
+
+#ifndef SKP_SILK_TUNING_PARAMETERS_H
+#define SKP_SILK_TUNING_PARAMETERS_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*******************/
+/* Pitch estimator */
+/*******************/
+
+/* Level of noise floor for whitening filter LPC analysis in pitch analysis */
+#define FIND_PITCH_WHITE_NOISE_FRACTION                 1e-3f
+
+/* Bandwidth expansion for whitening filter in pitch analysis */
+#define FIND_PITCH_BANDWITH_EXPANSION                   0.99f
+
+/* Threshold used by pitch estimator for early escape */
+#define FIND_PITCH_CORRELATION_THRESHOLD_HC_MODE        0.7f
+#define FIND_PITCH_CORRELATION_THRESHOLD_MC_MODE        0.75f
+#define FIND_PITCH_CORRELATION_THRESHOLD_LC_MODE        0.8f
+
+/*********************/
+/* Linear prediction */
+/*********************/
+
+/* LPC analysis defines: regularization and bandwidth expansion */
+#define FIND_LPC_COND_FAC                               2.5e-5f
+#define FIND_LPC_CHIRP                                  0.99995f
+
+/* LTP analysis defines */
+#define FIND_LTP_COND_FAC                               1e-5f
+#define LTP_DAMPING                                     0.001f
+#define LTP_SMOOTHING                                   0.1f
+
+/* LTP quantization settings */
+#define MU_LTP_QUANT_NB                                 0.03f
+#define MU_LTP_QUANT_MB                                 0.025f
+#define MU_LTP_QUANT_WB                                 0.02f
+#define MU_LTP_QUANT_SWB                                0.016f
+
+/***********************/
+/* High pass filtering */
+/***********************/
+
+/* Smoothing parameters for low end of pitch frequency range estimation */
+#define VARIABLE_HP_SMTH_COEF1                          0.1f
+#define VARIABLE_HP_SMTH_COEF2                          0.015f
+
+/* Min and max values for low end of pitch frequency range estimation */
+#define VARIABLE_HP_MIN_FREQ                            80.0f
+#define VARIABLE_HP_MAX_FREQ                            150.0f
+
+/* Max absolute difference between log2 of pitch frequency and smoother state, to enter the smoother */
+#define VARIABLE_HP_MAX_DELTA_FREQ                      0.4f
+
+/***********/
+/* Various */
+/***********/
+
+/* Required speech activity for counting frame as active */
+#define WB_DETECT_ACTIVE_SPEECH_LEVEL_THRES             0.7f        
+
+#define SPEECH_ACTIVITY_DTX_THRES                       0.1f
+
+/* Speech Activity LBRR enable threshold (needs tuning) */
+#define LBRR_SPEECH_ACTIVITY_THRES                      0.5f        
+
+/*************************/
+/* Perceptual parameters */
+/*************************/
+
+/* reduction in coding SNR during low speech activity */
+#define BG_SNR_DECR_dB                                  4.0f
+
+/* factor for reducing quantization noise during voiced speech */
+#define HARM_SNR_INCR_dB                                2.0f
+
+/* factor for reducing quantization noise for unvoiced sparse signals */
+#define SPARSE_SNR_INCR_dB                              2.0f
+
+/* threshold for sparseness measure above which to use lower quantization offset during unvoiced */
+#define SPARSENESS_THRESHOLD_QNT_OFFSET                 0.75f
+
+/* warping control */
+#define WARPING_MULTIPLIER                              0.015f
+
+/* fraction added to first autocorrelation value */
+#define SHAPE_WHITE_NOISE_FRACTION                      1e-5f
+
+/* noise shaping filter chirp factor */
+#define BANDWIDTH_EXPANSION                             0.95f
+
+/* difference between chirp factors for analysis and synthesis noise shaping filters at low bitrates */
+#define LOW_RATE_BANDWIDTH_EXPANSION_DELTA              0.01f
+
+/* extra harmonic boosting (signal shaping) at low bitrates */
+#define LOW_RATE_HARMONIC_BOOST                         0.1f
+
+/* extra harmonic boosting (signal shaping) for noisy input signals */
+#define LOW_INPUT_QUALITY_HARMONIC_BOOST                0.1f
+
+/* harmonic noise shaping */
+#define HARMONIC_SHAPING                                0.3f
+
+/* extra harmonic noise shaping for high bitrates or noisy input */
+#define HIGH_RATE_OR_LOW_QUALITY_HARMONIC_SHAPING       0.2f
+
+/* parameter for shaping noise towards higher frequencies */
+#define HP_NOISE_COEF                                   0.3f
+
+/* parameter for shaping noise even more towards higher frequencies during voiced speech */
+#define HARM_HP_NOISE_COEF                              0.35f
+
+/* parameter for applying a high-pass tilt to the input signal */
+#define INPUT_TILT                                      0.05f
+
+/* parameter for extra high-pass tilt to the input signal at high rates */
+#define HIGH_RATE_INPUT_TILT                            0.1f
+
+/* parameter for reducing noise at the very low frequencies */
+#define LOW_FREQ_SHAPING                                3.0f
+
+/* less reduction of noise at the very low frequencies for signals with low SNR at low frequencies */
+#define LOW_QUALITY_LOW_FREQ_SHAPING_DECR               0.5f
+
+/* noise floor to put a lower limit on the quantization step size */
+#define NOISE_FLOOR_dB                                  4.0f
+
+/* noise floor relative to active speech gain level */
+#define RELATIVE_MIN_GAIN_dB                            -50.0f
+
+/* subframe smoothing coefficient for determining active speech gain level (lower -> more smoothing) */
+#define GAIN_SMOOTHING_COEF                             1e-3f
+
+/* subframe smoothing coefficient for HarmBoost, HarmShapeGain, Tilt (lower -> more smoothing) */
+#define SUBFR_SMTH_COEF                                 0.4f
+
+/* parameters defining the R/D tradeoff in the residual quantizer */
+#define LAMBDA_OFFSET                                   1.2f
+#define LAMBDA_SPEECH_ACT                               -0.3f
+#define LAMBDA_DELAYED_DECISIONS                        -0.05f
+#define LAMBDA_INPUT_QUALITY                            -0.2f
+#define LAMBDA_CODING_QUALITY                           -0.1f
+#define LAMBDA_QUANT_OFFSET                             1.5f
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SKP_SILK_TUNING_PARAMETERS_H
--- a/test/Decoder.c
+++ b/test/Decoder.c
@@ -38,8 +38,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "SKP_Silk_SDK_API.h"
-#include "SKP_Silk_SigProc_FIX.h"
-#include "SKP_debug.h"
+#include "../src_SigProc_FIX/SKP_Silk_SigProc_FIX.h"
 
 /* Define codec specific settings should be moved to h file */
 #define MAX_BYTES_PER_FRAME     1024
@@ -85,16 +84,16 @@
 
 int main( int argc, char* argv[] )
 {
-    unsigned long tottime, starttime;
     double    filetime;
     size_t    counter;
-    SKP_int32 args, totPackets, i, k;
-    SKP_int16 ret, len, tot_len;
-    SKP_int16 nBytes;
+    SKP_int32 args, totPackets, i, k, ret, len, tot_len, nBytes;
     SKP_uint8 payload[    MAX_BYTES_PER_FRAME * MAX_INPUT_FRAMES * ( MAX_LBRR_DELAY + 1 ) ];
     SKP_uint8 *payloadEnd = NULL, *payloadToDec = NULL;
-    SKP_uint8 FECpayload[ MAX_BYTES_PER_FRAME * MAX_INPUT_FRAMES ], *payloadPtr;
-    SKP_int16 nBytesFEC;
+#if 0
+    SKP_uint8 FECpayload[ MAX_BYTES_PER_FRAME * MAX_INPUT_FRAMES ];
+    SKP_int32 nBytesFEC;
+#endif
+    SKP_uint8 *payloadPtr;
     SKP_int16 nBytesPerPacket[ MAX_LBRR_DELAY + 1 ], totBytes;
     SKP_int16 out[ ( ( MAX_FRAME_LENGTH_MS * MAX_API_FS_KHZ ) << 1 ) * MAX_INPUT_FRAMES ], *outPtr;
     char      speechOutFileName[ 150 ], bitInFileName[ 150 ];
@@ -182,7 +181,6 @@
         printf( "\nSKP_Silk_InitDecoder returned %d", ret );
     }
 
-    tottime    = 0;
     totPackets = 0;
     payloadEnd = payload;
 
@@ -189,7 +187,7 @@
     /* Simulate the jitter buffer holding MAX_FEC_DELAY packets */
     for( i = 0; i < MAX_LBRR_DELAY; i++ ) {
         /* Read payload size */
-        counter = fread( &nBytes, sizeof( SKP_int16 ), 1, bitInFile );
+        counter = fread( &nBytes, sizeof( SKP_int32 ), 1, bitInFile );
 #ifdef _SYSTEM_IS_BIG_ENDIAN
         swap_endian( &nBytes, 1 );
 #endif
@@ -205,7 +203,7 @@
 
     while( 1 ) {
         /* Read payload size */
-        counter = fread( &nBytes, sizeof( SKP_int16 ), 1, bitInFile );
+        counter = fread( &nBytes, sizeof( SKP_int32 ), 1, bitInFile );
 #ifdef _SYSTEM_IS_BIG_ENDIAN
         swap_endian( &nBytes, 1 );
 #endif
@@ -239,9 +237,8 @@
             payloadPtr = payload;
             for( i = 0; i < MAX_LBRR_DELAY; i++ ) {
                 if( nBytesPerPacket[ i + 1 ] > 0 ) {
-                    starttime = GetHighResolutionTime();
-                    //SKP_Silk_SDK_search_for_LBRR( payloadPtr, nBytesPerPacket[ i + 1 ], i + 1, FECpayload, &nBytesFEC );
-                    tottime += GetHighResolutionTime() - starttime;
+#if 0
+                    SKP_Silk_SDK_search_for_LBRR( payloadPtr, nBytesPerPacket[ i + 1 ], i + 1, FECpayload, &nBytesFEC );
                     if( nBytesFEC > 0 ) {
                         payloadToDec = FECpayload;
                         nBytes = nBytesFEC;
@@ -248,6 +245,7 @@
                         lost = 0;
                         break;
                     }
+#endif
                 }
                 payloadPtr += nBytesPerPacket[ i + 1 ];
             }
@@ -266,9 +264,7 @@
             frames = 0;
             do {
                 /* Decode 20 ms */
-                starttime = GetHighResolutionTime();
                 ret = SKP_Silk_SDK_Decode( psDec, &DecControl, 0, &range_dec_celt_state, nBytes, outPtr, &len );
-                tottime += GetHighResolutionTime() - starttime;
                 if( ret ) {
                     printf( "\nSKP_Silk_SDK_Decode returned %d", ret );
                 }
@@ -290,11 +286,9 @@
             } while( DecControl.moreInternalDecoderFrames ); 
         } else {    
             /* Loss: Decode enough frames to cover one packet duration */
-            for( i = 0; i < DecControl.framesPerPacket; i++ ) {
+            for( i = 0; i < DecControl.framesPerPayload; i++ ) {
                 /* Generate 20 ms */
-                starttime = GetHighResolutionTime();
                 ret = SKP_Silk_SDK_Decode( psDec, &DecControl, 1, &range_dec_celt_state, nBytes, outPtr, &len );
-                tottime += GetHighResolutionTime() - starttime;
                 if( ret ) {
                     printf( "\nSKP_Silk_Decode returned %d", ret );
                 }
@@ -325,7 +319,7 @@
         payloadEnd -= nBytesPerPacket[ 0 ];
         SKP_memmove( nBytesPerPacket, &nBytesPerPacket[ 1 ], MAX_LBRR_DELAY * sizeof( SKP_int16 ) );
 
-        if( !quiet ) {
+        if( !quiet && totPackets % 100 == 0 ) {
             fprintf( stderr, "\rPackets decoded:             %d", totPackets );
         }
     }
@@ -340,9 +334,8 @@
             payloadPtr = payload;
             for( i = 0; i < MAX_LBRR_DELAY; i++ ) {
                 if( nBytesPerPacket[ i + 1 ] > 0 ) {
-                    starttime = GetHighResolutionTime();
-                    //SKP_Silk_SDK_search_for_LBRR( payloadPtr, nBytesPerPacket[ i + 1 ], i + 1, FECpayload, &nBytesFEC );
-                    tottime += GetHighResolutionTime() - starttime;
+#if 0
+                    SKP_Silk_SDK_search_for_LBRR( payloadPtr, nBytesPerPacket[ i + 1 ], i + 1, FECpayload, &nBytesFEC );
                     if( nBytesFEC > 0 ) {
                         payloadToDec = FECpayload;
                         nBytes = nBytesFEC;
@@ -349,6 +342,7 @@
                         lost = 0;
                         break;
                     }
+#endif
                 }
                 payloadPtr += nBytesPerPacket[ i + 1 ];
             }
@@ -367,9 +361,7 @@
             frames = 0;
             do {
                 /* Decode 20 ms */
-                starttime = GetHighResolutionTime();
                 ret = SKP_Silk_SDK_Decode( psDec, &DecControl, 0, &range_dec_celt_state, nBytes, outPtr, &len );
-                tottime += GetHighResolutionTime() - starttime;
                 if( ret ) {
                     printf( "\nSKP_Silk_SDK_Decode returned %d", ret );
                 }
@@ -389,10 +381,8 @@
             /* Loss: Decode enough frames to cover one packet duration */
 
             /* Generate 20 ms */
-            for( i = 0; i < DecControl.framesPerPacket; i++ ) {
-                starttime = GetHighResolutionTime();
+            for( i = 0; i < DecControl.framesPerPayload; i++ ) {
                 ret = SKP_Silk_SDK_Decode( psDec, &DecControl, 1, &range_dec_celt_state, nBytes, outPtr, &len );
-                tottime += GetHighResolutionTime() - starttime;
                 if( ret ) {
                     printf( "\nSKP_Silk_Decode returned %d", ret );
                 }
@@ -417,7 +407,7 @@
         payloadEnd -= nBytesPerPacket[ 0 ];
         SKP_memmove( nBytesPerPacket, &nBytesPerPacket[ 1 ], MAX_LBRR_DELAY * sizeof( SKP_int16 ) );
 
-        if( !quiet ) {
+        if( !quiet && totPackets % 100 == 0 ) {
             fprintf( stderr, "\rPackets decoded:              %d", totPackets );
         }
     }
@@ -425,7 +415,6 @@
     filetime = totPackets * 1e-3 * packetSize_ms;
     if( !quiet ) {
         printf("\nFile length:                 %.3f s", filetime);
-        printf("\nTime for decoding:           %.3f s (%.3f%% of realtime)", 1e-6 * tottime, 1e-4 * tottime / filetime);
 
 #ifdef SKP_MACRO_COUNT
         printf("\n \nWMOPS calculation");
@@ -434,8 +423,6 @@
 #endif
         printf("\n\n");
     } else {
-        /* print time and % of realtime */
-        printf( "%.3f %.3f %d ", 1e-6 * tottime, 1e-4 * tottime / filetime, totPackets );
 #ifdef SKP_MACRO_COUNT
         /* print average and max WMOPS */
         printf( "%.3f %.3f \n", (float)totOps / ((float)packetSize_ms * (float)totPackets * 1e3), 
@@ -451,9 +438,6 @@
     /* Close files */
     fclose( speechOutFile );
     fclose( bitInFile );
-
-    /* Save timing file if TIC/TOC used */
-    SKP_TimerSave("decoder_timings.txt");
 
     return 0;
 }
--- a/test/Encoder.c
+++ b/test/Encoder.c
@@ -39,8 +39,7 @@
 #include <string.h>
 #include <math.h>
 #include "SKP_Silk_SDK_API.h"
-#include "SKP_Silk_SigProc_FIX.h"
-#include "SKP_debug.h"
+#include "../src_SigProc_FIX/SKP_Silk_SigProc_FIX.h"
 
 /* Define codec specific settings */
 #define MAX_BYTES_PER_FRAME     250 // Equals peak bitrate of 100 kbps 
@@ -93,11 +92,9 @@
 
 int main( int argc, char* argv[] )
 {
-    unsigned long tottime, starttime;
     double    filetime;
     size_t    counter;
-    SKP_int32 k, args, totPackets, totActPackets, ret;
-    SKP_int16 nBytes;
+    SKP_int32 k, args, totPackets, totActPackets, ret, nBytes;
     double    sumBytes, sumActBytes, avg_rate, act_rate, nrg;
     SKP_int16 in[ MAX_FRAME_LENGTH_MS * MAX_API_FS_KHZ * MAX_INPUT_FRAMES ];
     char      speechInFileName[ 150 ], bitOutFileName[ 150 ];
@@ -116,7 +113,8 @@
 
     /* default settings */
     SKP_int32 API_fs_Hz = 24000;
-    SKP_int32 max_internal_fs_Hz = 0;
+    SKP_int32 max_internal_fs_Hz = 24000;
+    SKP_int32 min_internal_fs_Hz = 8000;
     SKP_int32 targetRate_bps = 25000;
     SKP_int32 packetSize_ms = 20;
     SKP_int32 frameSizeReadFromFile_ms = 10;
@@ -220,7 +218,8 @@
     /* Set Encoder parameters */
     encControl.API_sampleRate        = API_fs_Hz;
     encControl.maxInternalSampleRate = max_internal_fs_Hz;
-    encControl.packetSize            = ( packetSize_ms * API_fs_Hz ) / 1000;
+    encControl.minInternalSampleRate = min_internal_fs_Hz;
+    encControl.payloadSize_ms        = packetSize_ms;
     encControl.packetLossPercentage  = packetLoss_perc;
     encControl.useInBandFEC          = INBandFEC_enabled;
     encControl.useDTX                = DTX_enabled;
@@ -232,18 +231,19 @@
         exit( 0 );
     }
 
-    tottime              = 0;
     totPackets           = 0;
     totActPackets        = 0;
     smplsSinceLastPacket = 0;
     sumBytes             = 0.0;
     sumActBytes          = 0.0;
-
+    
     while( 1 ) {
-        /* Init range coder */
-        ec_byte_writeinit_buffer( &range_enc_celt_buf, range_buf, MAX_BYTES_PER_FRAME * MAX_INPUT_FRAMES );
-        ec_enc_init( &range_enc_celt_state, &range_enc_celt_buf );
-        
+        if( smplsSinceLastPacket == 0 ) {
+            /* Init range coder */
+            ec_byte_writeinit_buffer( &range_enc_celt_buf, range_buf, MAX_BYTES_PER_FRAME * MAX_INPUT_FRAMES );
+            ec_enc_init( &range_enc_celt_state, &range_enc_celt_buf );
+        }
+
         /* Read input from file */
         counter = fread( in, sizeof( SKP_int16 ), ( frameSizeReadFromFile_ms * API_fs_Hz ) / 1000, speechInFile );
 #ifdef _SYSTEM_IS_BIG_ENDIAN
@@ -256,7 +256,6 @@
         /* max payload size */
         nBytes = MAX_BYTES_PER_FRAME * MAX_INPUT_FRAMES;
 
-        starttime = GetHighResolutionTime();
         /* Silk Encoder */
         ret = SKP_Silk_SDK_Encode( psEnc, &encControl, in, (SKP_int16)counter, &range_enc_celt_state, &nBytes );
         if( ret ) {
@@ -263,12 +262,7 @@
             printf( "\nSKP_Silk_Encode returned %d", ret );
             break;
         }
-        tottime += GetHighResolutionTime() - starttime;
 
-        /* Finish up the range coder */
-        ec_enc_done( &range_enc_celt_state );
-
-
 #ifdef SKP_MACRO_COUNT
         Ops = SKP_SaveResetCount();
         if( Ops > maxOps ){ maxOps = Ops; }
@@ -276,11 +270,15 @@
 #endif
 
         /* Get packet size */
-        packetSize_ms = ( SKP_int )( ( 1000 * ( SKP_int32 )encControl.packetSize ) / encControl.API_sampleRate );
+        packetSize_ms = encControl.payloadSize_ms;
 
         smplsSinceLastPacket += ( SKP_int )counter;
         
         if( ( ( 1000 * smplsSinceLastPacket ) / API_fs_Hz ) == packetSize_ms ) {
+            
+            /* Finish up the range coder */
+            ec_enc_done( &range_enc_celt_state );
+            
             /* Sends a dummy zero size packet in case of DTX period  */
             /* to make it work with the decoder test program.        */
             /* In practice should be handled by RTP sequence numbers */
@@ -301,13 +299,13 @@
             swap_endian( &nBytes_LE, 1 );
             fwrite( &nBytes_LE, sizeof( SKP_int16 ), 1, bitOutFile );
 #else
-            fwrite( &nBytes, sizeof( SKP_int16 ), 1, bitOutFile );
+            fwrite( &nBytes, sizeof( SKP_int32 ), 1, bitOutFile );
 #endif
 
             /* Write payload */
             fwrite( range_buf, sizeof( SKP_uint8 ), nBytes, bitOutFile );
         
-            if( !quiet ) {
+            if( !quiet && totPackets % 100 == 0 ) {
                 fprintf( stderr, "\rPackets encoded:              %d", totPackets );
             }
             smplsSinceLastPacket = 0;
@@ -318,7 +316,7 @@
     nBytes = -1;
 
     /* Write payload size */
-    fwrite( &nBytes, sizeof( SKP_int16 ), 1, bitOutFile );
+    fwrite( &nBytes, sizeof( SKP_int32 ), 1, bitOutFile );
 
     /* Free Encoder */
     free( psEnc );
@@ -331,7 +329,6 @@
     act_rate  = 8.0 / packetSize_ms * sumActBytes    / totActPackets;
     if( !quiet ) {
         printf( "\nFile length:                 %.3f s", filetime );
-        printf( "\nTime for encoding:           %.3f s (%.3f%% of realtime)", 1e-6 * tottime, 1e-4 * tottime / filetime );
         printf( "\nAverage bitrate:             %.3f kbps", avg_rate  );
         printf( "\nActive bitrate:              %.3f kbps", act_rate  );
 #ifdef SKP_MACRO_COUNT
@@ -341,9 +338,6 @@
 #endif
         printf( "\n\n" );
     } else {
-        /* print time and % of realtime */
-        printf("%.3f %.3f %d ", 1e-6 * tottime, 1e-4 * tottime / filetime, totPackets );
-
         /* print average and active bitrates */
         printf( "%.3f %.3f ", avg_rate, act_rate );
 #ifdef SKP_MACRO_COUNT
@@ -354,9 +348,6 @@
         printf( "%.3f %.3f \n", 0, 0);
 #endif
     }
-
-    /* Save timing file if TIC/TOC used */
-    SKP_TimerSave("encoder_timings.txt");
 
     return 0;
 }