Big SILK update
authorKoen Vos <koen.vos@skype.net>
Mon, 31 Jan 2011 21:38:33 +0000 (16:38 -0500)
committerJean-Marc Valin <jean-marc.valin@octasic.com>
Mon, 31 Jan 2011 21:38:33 +0000 (16:38 -0500)
108 files changed:
Makefile.am
interface/SKP_Silk_SDK_API.h
interface/SKP_debug.h
src_FIX/SKP_Silk_control_codec_FIX.c
src_FIX/SKP_Silk_define_FIX.h [deleted file]
src_FIX/SKP_Silk_encode_frame_FIX.c
src_FIX/SKP_Silk_find_pitch_lags_FIX.c
src_FIX/SKP_Silk_find_pred_coefs_FIX.c
src_FIX/SKP_Silk_main_FIX.h
src_FIX/SKP_Silk_noise_shape_analysis_FIX.c
src_FIX/SKP_Silk_perceptual_parameters_FIX.h [deleted file]
src_FIX/SKP_Silk_structs_FIX.h
src_FIX/Silk_FIX.vcproj [deleted file]
src_FIX/src_FIX.vcxproj [new file with mode: 0644]
src_FIX/src_FIX.vcxproj.filters [new file with mode: 0644]
src_FLP/SKP_Silk_LPC_analysis_filter_FLP.c
src_FLP/SKP_Silk_NLSF_MSVQ_decode_FLP.c
src_FLP/SKP_Silk_NLSF_MSVQ_encode_FLP.c
src_FLP/SKP_Silk_NLSF_VQ_rate_distortion_FLP.c
src_FLP/SKP_Silk_NLSF_VQ_sum_error_FLP.c
src_FLP/SKP_Silk_VQ_nearest_neighbor_FLP.c [deleted file]
src_FLP/SKP_Silk_control_codec_FLP.c
src_FLP/SKP_Silk_define_FLP.h [deleted file]
src_FLP/SKP_Silk_encode_frame_FLP.c
src_FLP/SKP_Silk_find_pitch_lags_FLP.c
src_FLP/SKP_Silk_find_pred_coefs_FLP.c
src_FLP/SKP_Silk_main_FLP.h
src_FLP/SKP_Silk_noise_shape_analysis_FLP.c
src_FLP/SKP_Silk_prefilter_FLP.c
src_FLP/SKP_Silk_process_NLSFs_FLP.c
src_FLP/SKP_Silk_process_gains_FLP.c
src_FLP/SKP_Silk_quant_LTP_gains_FLP.c [deleted file]
src_FLP/SKP_Silk_structs_FLP.h
src_FLP/SKP_Silk_tables_FLP.h [deleted file]
src_FLP/SKP_Silk_tables_NLSF_CB0_10_FLP.c [deleted file]
src_FLP/SKP_Silk_tables_NLSF_CB0_16_FLP.c [deleted file]
src_FLP/SKP_Silk_tables_NLSF_CB1_10_FLP.c [deleted file]
src_FLP/SKP_Silk_tables_NLSF_CB1_16_FLP.c [deleted file]
src_FLP/SKP_Silk_tables_other_FLP.c [deleted file]
src_FLP/SKP_Silk_wrappers_FLP.c
src_FLP/Silk_FLP.vcproj [deleted file]
src_FLP/src_FLP.vcxproj [new file with mode: 0644]
src_FLP/src_FLP.vcxproj.filters [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_NLSF2A.c
src_SigProc_FIX/SKP_Silk_NLSF_stabilize.c
src_SigProc_FIX/SKP_Silk_biquad.c
src_SigProc_FIX/SKP_Silk_biquad_alt.c
src_SigProc_FIX/SKP_Silk_common_pitch_est_defines.h
src_SigProc_FIX/SKP_Silk_debug.c
src_SigProc_FIX/SKP_Silk_pitch_analysis_core.c
src_SigProc_FIX/SKP_Silk_pitch_est_defines.h
src_SigProc_FIX/SKP_Silk_pitch_est_tables.c
src_SigProc_FIX/SigProc_FIX.vcproj [deleted file]
src_SigProc_FIX/src_SigProc_FIX.vcxproj [new file with mode: 0644]
src_SigProc_FIX/src_SigProc_FIX.vcxproj.filters [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_decimate2_coarsest_FLP.c
src_SigProc_FLP/SKP_Silk_pitch_analysis_core_FLP.c
src_SigProc_FLP/SKP_Silk_pitch_est_defines_FLP.h [deleted file]
src_SigProc_FLP/SigProc_FLP.vcproj [deleted file]
src_SigProc_FLP/src_SigProc_FLP.vcxproj [new file with mode: 0644]
src_SigProc_FLP/src_SigProc_FLP.vcxproj.filters [new file with mode: 0644]
src_common/SKP_Silk_NSQ_del_dec.c
src_common/SKP_Silk_VQ_WMat_EC.c [moved from src_FIX/SKP_Silk_VQ_nearest_neighbor_FIX.c with 84% similarity]
src_common/SKP_Silk_code_signs.c
src_common/SKP_Silk_control_audio_bandwidth.c
src_common/SKP_Silk_dec_API.c
src_common/SKP_Silk_decode_core.c
src_common/SKP_Silk_decode_frame.c
src_common/SKP_Silk_decode_indices.c
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_define.h
src_common/SKP_Silk_encode_parameters.c
src_common/SKP_Silk_encode_pulses.c
src_common/SKP_Silk_gain_quant.c
src_common/SKP_Silk_main.h
src_common/SKP_Silk_perceptual_parameters.h [deleted file]
src_common/SKP_Silk_pulses_to_bytes.c
src_common/SKP_Silk_quant_LTP_gains.c [moved from src_FIX/SKP_Silk_quant_LTP_gains_FIX.c with 58% similarity]
src_common/SKP_Silk_setup_complexity.h
src_common/SKP_Silk_structs.h
src_common/SKP_Silk_tables.h
src_common/SKP_Silk_tables_LTP.c
src_common/SKP_Silk_tables_NLSF_CB.h [moved from src_common/SKP_Silk_tables_NLSF_CB1_16.h with 63% similarity]
src_common/SKP_Silk_tables_NLSF_CB0_10.c
src_common/SKP_Silk_tables_NLSF_CB0_10.h [deleted file]
src_common/SKP_Silk_tables_NLSF_CB0_16.c
src_common/SKP_Silk_tables_NLSF_CB0_16.h [deleted file]
src_common/SKP_Silk_tables_NLSF_CB1_10.c
src_common/SKP_Silk_tables_NLSF_CB1_16.c
src_common/SKP_Silk_tables_gain.c
src_common/SKP_Silk_tables_other.c
src_common/SKP_Silk_tables_pitch_lag.c
src_common/SKP_Silk_tables_sign.c
src_common/SKP_Silk_tables_type_offset.c [deleted file]
src_common/SKP_Silk_tuning_parameters.h
src_common/Silk_CommonFLP.vcproj [deleted file]
src_common/src_common.vcxproj [new file with mode: 0644]
src_common/src_common.vcxproj.filters [new file with mode: 0644]
test/Dec_SDK.vcproj [deleted file]
test/Enc_SDK.vcproj [deleted file]
test/SKP_debug.c [deleted file]
test/SignalCompare.vcproj [deleted file]
test_silk_dec/test_silk_dec.vcxproj [new file with mode: 0644]
test_silk_dec/test_silk_dec.vcxproj.filters [new file with mode: 0644]
test_silk_enc/test_silk_enc.vcxproj [new file with mode: 0644]
test_silk_enc/test_silk_enc.vcxproj.filters [new file with mode: 0644]

index 0306747..c8fe559 100644 (file)
@@ -6,18 +6,23 @@ AM_CPPFLAGS = $(AM_CFLAGS)
 INCLUDES = -I$(top_srcdir)/src_FLP -I$(top_srcdir)/src_SigProc_FIX -I$(top_srcdir)/src_SigProc_FLP -I$(top_srcdir)/src_common -I$(top_srcdir)/interface -I$(top_srcdir)/../celt/libcelt
 EXTRA_DIST = Silk_FLP.sln \
 Silk_FLP.sln \
-src_FIX/Silk_FIX.vcproj \
-src_FLP/Silk_FLP.vcproj \
-src_common/Silk_Common.vcproj \
-src_common/Silk_CommonFLP.vcproj \
+src_FIX/src_FIX.vcxproj \
+src_FIX/src_FIX.vcxproj.filters \
+src_FLP/src_FLP.vcxproj \
+src_FLP/src_FLP.vcxproj.filters \
+src_common/src_common.vcxproj \
+src_common/src_common.vcxproj.filters \
 test/Encoder.c \
-test/Enc_SDK.vcproj \
 test/Decoder.c \
-test/Dec_SDK.vcproj \
 test/signalCompare.c \
-test/SignalCompare.vcproj \
-src_SigProc_FLP/SigProc_FLP.vcproj \
-src_SigProc_FIX/SigProc_FIX.vcproj
+src_SigProc_FLP/src_SigProc_FLP.vcxproj \
+src_SigProc_FLP/src_SigProc_FLP.vcxproj.filters \
+src_SigProc_FIX/src_SigProc_FIX.vcxproj \
+src_SigProc_FIX/src_SigProc_FIX.vcxproj.filters \
+test_silk_dec/test_silk_dec.vcxproj \
+test_silk_dec/test_silk_dec.vcxproj.filters \
+test_silk_enc/test_silk_enc.vcxproj \
+test_silk_enc/test_silk_enc.vcxproj.filters
 
 lib_LTLIBRARIES        = libSKP_SILK_SDK.la
 libSKP_SILK_SDK_la_SOURCES = src_common/SKP_Silk_CNG.c \
@@ -56,9 +61,10 @@ src_common/SKP_Silk_tables_other.c \
 src_common/SKP_Silk_tables_pitch_lag.c \
 src_common/SKP_Silk_tables_pulses_per_block.c \
 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_common/SKP_Silk_quant_LTP_gains.c \
+src_common/SKP_Silk_VQ_WMat_EC.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 \
@@ -81,16 +87,9 @@ src_FLP/SKP_Silk_noise_shape_analysis_FLP.c \
 src_FLP/SKP_Silk_prefilter_FLP.c \
 src_FLP/SKP_Silk_process_gains_FLP.c \
 src_FLP/SKP_Silk_process_NLSFs_FLP.c \
-src_FLP/SKP_Silk_quant_LTP_gains_FLP.c \
 src_FLP/SKP_Silk_regularize_correlations_FLP.c \
 src_FLP/SKP_Silk_residual_energy_FLP.c \
 src_FLP/SKP_Silk_solve_LS_FLP.c \
-src_FLP/SKP_Silk_tables_NLSF_CB0_10_FLP.c \
-src_FLP/SKP_Silk_tables_NLSF_CB0_16_FLP.c \
-src_FLP/SKP_Silk_tables_NLSF_CB1_10_FLP.c \
-src_FLP/SKP_Silk_tables_NLSF_CB1_16_FLP.c \
-src_FLP/SKP_Silk_tables_other_FLP.c \
-src_FLP/SKP_Silk_VQ_nearest_neighbor_FLP.c \
 src_FLP/SKP_Silk_warped_autocorrelation_FLP.c \
 src_FLP/SKP_Silk_wrappers_FLP.c \
 src_SigProc_FIX/SKP_Silk_A2NLSF.c \
@@ -177,21 +176,14 @@ src_common/SKP_Silk_perceptual_parameters.h \
 src_common/SKP_Silk_PLC.h \
 src_common/SKP_Silk_structs.h \
 src_common/SKP_Silk_tables.h \
-src_common/SKP_Silk_tables_NLSF_CB0_10.h \
-src_common/SKP_Silk_tables_NLSF_CB0_16.h \
-src_common/SKP_Silk_tables_NLSF_CB1_10.h \
-src_common/SKP_Silk_tables_NLSF_CB1_16.h \
+src_common/SKP_Silk_tables_NLSF_CB.h \
 src_common/SKP_Silk_tuning_parameters.h \
 src_common/SKP_Silk_setup_complexity.h \
-src_FIX/SKP_Silk_define_FIX.h \
 src_FIX/SKP_Silk_main_FIX.h \
-src_FIX/SKP_Silk_perceptual_parameters_FIX.h \
 src_FIX/SKP_Silk_structs_FIX.h \
 src_FLP/SKP_Silk_assembler_FLP.h \
-src_FLP/SKP_Silk_define_FLP.h \
 src_FLP/SKP_Silk_main_FLP.h \
 src_FLP/SKP_Silk_structs_FLP.h \
-src_FLP/SKP_Silk_tables_FLP.h \
 src_SigProc_FIX/SKP_Silk_common_pitch_est_defines.h \
 src_SigProc_FIX/SKP_Silk_Inlines.h \
 src_SigProc_FIX/SKP_Silk_MacroCount.h \
@@ -202,19 +194,18 @@ src_SigProc_FIX/SKP_Silk_resampler_private.h \
 src_SigProc_FIX/SKP_Silk_resampler_rom.h \
 src_SigProc_FIX/SKP_Silk_resampler_structs.h \
 src_SigProc_FIX/SKP_Silk_SigProc_FIX.h \
-src_SigProc_FLP/SKP_Silk_pitch_est_defines_FLP.h \
 src_SigProc_FLP/SKP_Silk_SigProc_FLP.h
 
 bin_PROGRAMS = Encoder Decoder signalCompare
-Encoder_SOURCES = test/Encoder.c test/SKP_debug.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
+Encoder_SOURCES = test/Encoder.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
 Encoder_LDADD = $(lib_LTLIBRARIES) 
 Encoder_LDFLAGS = $(LIBS)
 
-Decoder_SOURCES = test/Decoder.c test/SKP_debug.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
+Decoder_SOURCES = test/Decoder.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
 Decoder_LDADD = $(lib_LTLIBRARIES) 
 Decoder_LDFLAGS = $(LIBS)
 
-signalCompare_SOURCES = test/signalCompare.c test/SKP_debug.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
+signalCompare_SOURCES = test/signalCompare.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
 signalCompare_LDADD = $(lib_LTLIBRARIES) 
 signalCompare_LDFLAGS = $(LIBS)
 
index 8a83520..f263c0a 100644 (file)
@@ -118,7 +118,7 @@ SKP_int SKP_Silk_SDK_Decode(                            /* O:   Returns error co
     ec_dec                              *psRangeDec,    /* I/O  Compressor data structure                       */\r
     const SKP_int                       nBytesIn,       /* I:   Number of input bytes                           */\r
     SKP_int16                           *samplesOut,    /* O:   Decoded output speech vector                    */\r
-    SKP_int32                           *nSamplesOut    /* I/O: Number of samples (vector/decoded)              */\r
+    SKP_int32                           *nSamplesOut    /* O:   Number of samples decoded                       */\r
 );\r
 \r
 /***************************************************************/\r
index d55ca95..8694bb0 100644 (file)
@@ -254,24 +254,50 @@ extern SKP_int64     SKP_Timer_depth[SKP_NUM_TIMERS_MAX];
 /************************************/\r
 /* opens an empty file if this file has not yet been open, then writes to the file and closes it            */\r
 /* if file has been open previously it is opened again and the fwrite is appending, finally it is closed    */\r
-#define SAVE_DATA(FILE_NAME, DATA_PTR, N_BYTES) { static SKP_int32 init = 0;FILE *fp;if (init == 0) {init = 1;fp = fopen(#FILE_NAME, "wb");}else {fp = fopen(#FILE_NAME, "ab+");}   fwrite((DATA_PTR), (N_BYTES), 1, fp);fclose(fp);}   \r
+#define SAVE_DATA( FILE_NAME, DATA_PTR, N_BYTES ) {                 \\r
+    static SKP_int32 init = 0;                                      \\r
+    FILE *fp;                                                       \\r
+    if (init == 0)     {                                               \\r
+        init = 1;                                                   \\r
+        fp = fopen(#FILE_NAME, "wb");                               \\r
+    } else {                                                        \\r
+        fp = fopen(#FILE_NAME, "ab+");                              \\r
+    }                                                              \\r
+    fwrite((DATA_PTR), (N_BYTES), 1, fp);                           \\r
+    fclose(fp);                                                     \\r
+}      \r
 \r
 /* Example: DEBUG_STORE_DATA(testfile.pcm, &RIN[0], 160*sizeof(SKP_int16)); */\r
 \r
 #if 0\r
 /* Ensure that everything is written to files when an assert breaks */\r
 #define DEBUG_STORE_DATA(FILE_NAME, DATA_PTR, N_BYTES) SAVE_DATA(FILE_NAME, DATA_PTR, N_BYTES)\r
+#define DEBUG_STORE_CLOSE_FILES\r
+\r
 #else\r
+\r
+#define SKP_NUM_STORES_MAX                                  100\r
+extern FILE *SKP_debug_store_fp[ SKP_NUM_STORES_MAX ];\r
+extern int SKP_debug_store_count;\r
+\r
 /* Faster way of storing the data */\r
-#define DEBUG_STORE_DATA(FILE_NAME, DATA_PTR, N_BYTES) {    \\r
-    static SKP_int32 init = 0;                              \\r
-    static FILE *fp;                                        \\r
-    if (init == 0)                                          \\r
-    {                                                       \\r
-        init = 1;                                           \\r
-        fp = fopen(#FILE_NAME, "wb");                       \\r
-    }                                                       \\r
-    fwrite((DATA_PTR), (N_BYTES), 1, fp);                   \\r
+#define DEBUG_STORE_DATA( FILE_NAME, DATA_PTR, N_BYTES ) {          \\r
+    static SKP_int init = 0, cnt = 0;                               \\r
+    static FILE **fp;                                               \\r
+    if (init == 0) {                                                \\r
+        init = 1;                                                                                              \\r
+        cnt = SKP_debug_store_count++;                              \\r
+        SKP_debug_store_fp[ cnt ] = fopen(#FILE_NAME, "wb");        \\r
+    }                                                               \\r
+    fwrite((DATA_PTR), (N_BYTES), 1, SKP_debug_store_fp[ cnt ]);    \\r
+}\r
+\r
+/* Call this at the end of main() */\r
+#define DEBUG_STORE_CLOSE_FILES {                                   \\r
+    SKP_int i;                                                      \\r
+    for( i = 0; i < SKP_debug_store_count; i++ ) {                  \\r
+        fclose( SKP_debug_store_fp[ i ] );                          \\r
+    }                                                               \\r
 }\r
 #endif\r
 \r
@@ -283,6 +309,7 @@ extern SKP_int64     SKP_Timer_depth[SKP_NUM_TIMERS_MAX];
 /* define macros as empty strings */\r
 #define DEBUG_STORE_DATA(FILE_NAME, DATA_PTR, N_BYTES)\r
 #define SAVE_DATA(FILE_NAME, DATA_PTR, N_BYTES)\r
+#define DEBUG_STORE_CLOSE_FILES\r
 \r
 #endif /* SKP_DEBUG */\r
 \r
index 073a66b..63ddd76 100644 (file)
@@ -34,11 +34,6 @@ SKP_INLINE SKP_int SKP_Silk_setup_resamplers(
     SKP_int                         fs_kHz              /* I                        */\r
 );\r
 \r
-SKP_INLINE SKP_int SKP_Silk_setup_packetsize(\r
-    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */\r
-    SKP_int                         PacketSize_ms       /* I                        */\r
-);\r
-\r
 SKP_INLINE SKP_int SKP_Silk_setup_fs(\r
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */\r
     SKP_int                         fs_kHz,             /* I                        */\r
@@ -141,40 +136,6 @@ void SKP_Silk_LBRR_ctrl_FIX(
     }\r
 }\r
 \r
-SKP_INLINE SKP_int SKP_Silk_setup_packetsize(\r
-    SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */\r
-    SKP_int                         PacketSize_ms       /* I                        */\r
-)\r
-{\r
-    SKP_int ret = SKP_SILK_NO_ERROR;\r
-    if( ( PacketSize_ms !=  10 ) &&\r
-        ( PacketSize_ms !=  20 ) &&\r
-        ( PacketSize_ms !=  40 ) && \r
-        ( PacketSize_ms !=  60 ) ) {\r
-        ret = SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;\r
-    } else {\r
-        if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) {\r
-            if( PacketSize_ms == 10 ) {\r
-                /* Only allowed when the payload buffer is empty */\r
-                psEnc->sCmn.nb_subfr = MAX_NB_SUBFR >> 1;\r
-                psEnc->sCmn.PacketSize_ms = PacketSize_ms;\r
-                psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, psEnc->sCmn.fs_kHz );\r
-                /* Packet length changes. Reset LBRR buffer */\r
-                SKP_Silk_LBRR_reset( &psEnc->sCmn );\r
-            } else{\r
-                psEnc->sCmn.nb_subfr = MAX_NB_SUBFR;\r
-                psEnc->sCmn.PacketSize_ms = PacketSize_ms;\r
-                psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, psEnc->sCmn.fs_kHz );\r
-                /* Packet length changes. Reset LBRR buffer */\r
-                SKP_Silk_LBRR_reset( &psEnc->sCmn );\r
-            }\r
-        }\r
-        psEnc->sCmn.frame_length = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );\r
-    }\r
-\r
-    return(ret);\r
-}\r
-\r
 SKP_INLINE SKP_int SKP_Silk_setup_resamplers(\r
     SKP_Silk_encoder_state_FIX      *psEnc,             /* I/O                      */\r
     SKP_int                         fs_kHz              /* I                        */\r
@@ -235,16 +196,37 @@ SKP_INLINE SKP_int SKP_Silk_setup_fs(
 {\r
     SKP_int ret = SKP_SILK_NO_ERROR;\r
 \r
+    /* Set packet size */\r
+    if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) {\r
+        if( ( PacketSize_ms !=  10 ) &&\r
+            ( PacketSize_ms !=  20 ) &&\r
+            ( PacketSize_ms !=  40 ) && \r
+            ( PacketSize_ms !=  60 ) ) {\r
+            ret = SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;\r
+        }\r
+        if( PacketSize_ms == 10 ) {\r
+            /* Only allowed when the payload buffer is empty */\r
+            psEnc->sCmn.nb_subfr = MAX_NB_SUBFR >> 1;\r
+            psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz );\r
+        } else {\r
+            psEnc->sCmn.nb_subfr = MAX_NB_SUBFR;\r
+            psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz );\r
+        }\r
+        /* Packet length changes. Reset LBRR buffer */\r
+        SKP_Silk_LBRR_reset( &psEnc->sCmn );\r
+        psEnc->sCmn.PacketSize_ms = PacketSize_ms;\r
+    }\r
+\r
     /* Set internal sampling frequency */\r
     if( psEnc->sCmn.fs_kHz != fs_kHz ) {\r
         /* reset part of the state */\r
-        SKP_memset( &psEnc->sShape,          0,                            sizeof( SKP_Silk_shape_state_FIX ) );\r
-        SKP_memset( &psEnc->sPrefilt,        0,                            sizeof( SKP_Silk_prefilter_state_FIX ) );\r
-        SKP_memset( &psEnc->sNSQ,            0,                            sizeof( SKP_Silk_nsq_state ) );\r
-        SKP_memset( &psEnc->sPred,           0,                            sizeof( SKP_Silk_predict_state_FIX ) );\r
-        SKP_memset( psEnc->sNSQ.xq,          0, ( 2 * MAX_FRAME_LENGTH ) * sizeof( SKP_int16 ) );\r
-        SKP_memset( psEnc->sNSQ_LBRR.xq,     0, ( 2 * MAX_FRAME_LENGTH ) * sizeof( SKP_int16 ) );\r
-        SKP_memset( psEnc->sCmn.LBRR_buffer, 0,           MAX_LBRR_DELAY * sizeof( SKP_SILK_LBRR_struct ) );\r
+        SKP_memset( &psEnc->sShape,          0,                        sizeof( SKP_Silk_shape_state_FIX ) );\r
+        SKP_memset( &psEnc->sPrefilt,        0,                        sizeof( SKP_Silk_prefilter_state_FIX ) );\r
+        SKP_memset( &psEnc->sNSQ,            0,                        sizeof( SKP_Silk_nsq_state ) );\r
+        SKP_memset( &psEnc->sPred,           0,                        sizeof( SKP_Silk_predict_state_FIX ) );\r
+        SKP_memset( psEnc->sNSQ.xq,          0, 2 * MAX_FRAME_LENGTH * sizeof( SKP_int16 ) );\r
+        SKP_memset( psEnc->sNSQ_LBRR.xq,     0, 2 * MAX_FRAME_LENGTH * sizeof( SKP_int16 ) );\r
+        SKP_memset( psEnc->sCmn.LBRR_buffer, 0,       MAX_LBRR_DELAY * sizeof( SKP_SILK_LBRR_struct ) );\r
 #if SWITCH_TRANSITION_FILTERING\r
         SKP_memset( psEnc->sCmn.sLP.In_LP_State, 0, 2 * sizeof( SKP_int32 ) );\r
         if( psEnc->sCmn.sLP.mode == 1 ) {\r
@@ -278,46 +260,68 @@ SKP_INLINE SKP_int SKP_Silk_setup_fs(
             psEnc->sCmn.predictLPCOrder = MIN_LPC_ORDER;\r
             psEnc->sCmn.psNLSF_CB[ 0 ]  = &SKP_Silk_NLSF_CB0_10;\r
             psEnc->sCmn.psNLSF_CB[ 1 ]  = &SKP_Silk_NLSF_CB1_10;\r
+            if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ){\r
+                psEnc->sCmn.pitch_contour_iCDF = SKP_Silk_pitch_contour_NB_iCDF; \r
+            } else if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR / 2 ){\r
+                psEnc->sCmn.pitch_contour_iCDF = SKP_Silk_pitch_contour_10_ms_NB_iCDF;\r
+            } else {\r
+                /* Unsupported number of frames */\r
+                SKP_assert( 0 );\r
+            }\r
         } else {\r
             psEnc->sCmn.predictLPCOrder = MAX_LPC_ORDER;\r
             psEnc->sCmn.psNLSF_CB[ 0 ]  = &SKP_Silk_NLSF_CB0_16;\r
             psEnc->sCmn.psNLSF_CB[ 1 ]  = &SKP_Silk_NLSF_CB1_16;\r
+            if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ){\r
+                psEnc->sCmn.pitch_contour_iCDF = SKP_Silk_pitch_contour_iCDF; \r
+            } else if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR / 2 ){\r
+                psEnc->sCmn.pitch_contour_iCDF = SKP_Silk_pitch_contour_10_ms_iCDF;\r
+            } else {\r
+                /* Unsupported number of frames */\r
+                SKP_assert( 0 );\r
+            }\r
         }\r
-        psEnc->sCmn.subfr_length   = SKP_SMULBB( SUB_FRAME_LENGTH_MS, fs_kHz );\r
+        psEnc->sCmn.subfr_length   = SUB_FRAME_LENGTH_MS * fs_kHz;\r
+        psEnc->sCmn.frame_length   = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );\r
         psEnc->sCmn.ltp_mem_length = SKP_SMULBB( LTP_MEM_LENGTH_MS, fs_kHz ); \r
         psEnc->sCmn.la_pitch       = SKP_SMULBB( LA_PITCH_MS, fs_kHz );\r
         psEnc->sPred.min_pitch_lag = SKP_SMULBB(  3, fs_kHz );\r
         psEnc->sPred.max_pitch_lag = SKP_SMULBB( 18, fs_kHz );\r
         if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ){\r
             psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz );\r
-        } else {\r
+        } else if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR / 2 ){\r
             psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz );\r
+        } else {\r
+            /* Unsupported number of frames */\r
+            SKP_assert( 0 );\r
         }\r
         if( psEnc->sCmn.fs_kHz == 24 ) {\r
-            psEnc->mu_LTP_Q8 = SKP_FIX_CONST( MU_LTP_QUANT_SWB, 8 );\r
-            psEnc->sCmn.bitrate_threshold_up   = SKP_int32_MAX;\r
-            psEnc->sCmn.bitrate_threshold_down = SWB2WB_BITRATE_BPS; \r
+            psEnc->sCmn.mu_LTP_Q10 = SKP_FIX_CONST( MU_LTP_QUANT_SWB, 10 );\r
+            psEnc->sCmn.bitrate_threshold_up    = SKP_int32_MAX;\r
+            psEnc->sCmn.bitrate_threshold_down  = SWB2WB_BITRATE_BPS; \r
+            psEnc->sCmn.pitch_lag_low_bits_iCDF = SKP_Silk_uniform12_iCDF;\r
         } else if( psEnc->sCmn.fs_kHz == 16 ) {\r
-            psEnc->mu_LTP_Q8 = SKP_FIX_CONST( MU_LTP_QUANT_WB, 8 );\r
-            psEnc->sCmn.bitrate_threshold_up   = WB2SWB_BITRATE_BPS;\r
-            psEnc->sCmn.bitrate_threshold_down = WB2MB_BITRATE_BPS; \r
+            psEnc->sCmn.mu_LTP_Q10 = SKP_FIX_CONST( MU_LTP_QUANT_WB, 10 );\r
+            psEnc->sCmn.bitrate_threshold_up    = WB2SWB_BITRATE_BPS;\r
+            psEnc->sCmn.bitrate_threshold_down  = WB2MB_BITRATE_BPS; \r
+            psEnc->sCmn.pitch_lag_low_bits_iCDF = SKP_Silk_uniform8_iCDF;\r
         } else if( psEnc->sCmn.fs_kHz == 12 ) {\r
-            psEnc->mu_LTP_Q8 = SKP_FIX_CONST( MU_LTP_QUANT_MB, 8 );\r
-            psEnc->sCmn.bitrate_threshold_up   = MB2WB_BITRATE_BPS;\r
-            psEnc->sCmn.bitrate_threshold_down = MB2NB_BITRATE_BPS;\r
+            psEnc->sCmn.mu_LTP_Q10 = SKP_FIX_CONST( MU_LTP_QUANT_MB, 10 );\r
+            psEnc->sCmn.bitrate_threshold_up    = MB2WB_BITRATE_BPS;\r
+            psEnc->sCmn.bitrate_threshold_down  = MB2NB_BITRATE_BPS;\r
+            psEnc->sCmn.pitch_lag_low_bits_iCDF = SKP_Silk_uniform6_iCDF;\r
+        } else if( psEnc->sCmn.fs_kHz == 8 ) {\r
+            psEnc->sCmn.mu_LTP_Q10 = SKP_FIX_CONST( MU_LTP_QUANT_NB, 10 );\r
+            psEnc->sCmn.bitrate_threshold_up    = NB2MB_BITRATE_BPS;\r
+            psEnc->sCmn.bitrate_threshold_down  = 0;\r
+            psEnc->sCmn.pitch_lag_low_bits_iCDF = SKP_Silk_uniform4_iCDF;\r
         } else {\r
-            psEnc->mu_LTP_Q8 = SKP_FIX_CONST( MU_LTP_QUANT_NB, 8 );\r
-            psEnc->sCmn.bitrate_threshold_up   = NB2MB_BITRATE_BPS;\r
-            psEnc->sCmn.bitrate_threshold_down = 0;\r
+            /* unsupported sampling rate */\r
+            SKP_assert( 0 );\r
         }\r
         psEnc->sCmn.fs_kHz_changed = 1;\r
     }\r
 \r
-    /********************************************/\r
-    /* Set packet size                          */\r
-    /********************************************/\r
-    ret += SKP_Silk_setup_packetsize( psEnc, PacketSize_ms );\r
-\r
     /* Check that settings are valid */\r
     SKP_assert( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length );\r
  \r
@@ -329,9 +333,9 @@ SKP_INLINE SKP_int SKP_Silk_setup_rate(
     SKP_int                         TargetRate_bps      /* I                        */\r
 )\r
 {\r
-    SKP_int k, ret = 0;\r
+    SKP_int k, ret = SKP_SILK_NO_ERROR;\r
     SKP_int32 frac_Q6;\r
-    const SKP_int32 *rateTable;\r
+    const SKP_uint16 *rateTable;\r
 \r
     /* Set bitrate/coding quality */\r
     if( TargetRate_bps != psEnc->sCmn.TargetRate_bps ) {\r
diff --git a/src_FIX/SKP_Silk_define_FIX.h b/src_FIX/SKP_Silk_define_FIX.h
deleted file mode 100644 (file)
index 183b6aa..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/***********************************************************************\r
-Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
-Redistribution and use in source and binary forms, with or without \r
-modification, (subject to the limitations in the disclaimer below) \r
-are permitted provided that the following conditions are met:\r
-- Redistributions of source code must retain the above copyright notice,\r
-this list of conditions and the following disclaimer.\r
-- Redistributions in binary form must reproduce the above copyright \r
-notice, this list of conditions and the following disclaimer in the \r
-documentation and/or other materials provided with the distribution.\r
-- Neither the name of Skype Limited, nor the names of specific \r
-contributors, may be used to endorse or promote products derived from \r
-this software without specific prior written permission.\r
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
-BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
-CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-***********************************************************************/\r
-\r
-#ifndef SKP_SILK_DEFINE_FIX_H\r
-#define SKP_SILK_DEFINE_FIX_H\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif\r
-\r
-/* Head room for correlations                           */\r
-#define LTP_CORRS_HEAD_ROOM                             2\r
-#define LPC_CORRS_HEAD_ROOM                             10\r
-\r
-#define WB_DETECT_ACTIVE_SPEECH_LEVEL_THRES_Q8          179     // 179.2_Q8 = 0.7f required speech activity for counting frame as active\r
-\r
-/* DTX settings */\r
-#define SPEECH_ACTIVITY_DTX_THRES_Q8                    26      // 25.60_Q8 = 0.1f\r
-\r
-#define LBRR_SPEECH_ACTIVITY_THRES_Q8                   128\r
-\r
-/* level of noise floor for whitening filter LPC analysis in pitch analysis */\r
-#define FIND_PITCH_WHITE_NOISE_FRACTION_Q16             66\r
-\r
-/* bandwdith expansion for whitening filter in pitch analysis */\r
-#define FIND_PITCH_BANDWITH_EXPANSION_Q16               64881\r
-\r
-/* Threshold used by pitch estimator for early escape */\r
-#define FIND_PITCH_CORRELATION_THRESHOLD_Q16_HC_MODE    45875       // 0.7\r
-#define FIND_PITCH_CORRELATION_THRESHOLD_Q16_MC_MODE    49152       // 0.75\r
-#define FIND_PITCH_CORRELATION_THRESHOLD_Q16_LC_MODE    52429       // 0.8\r
-\r
-/* Regualarization factor for correlation matrix. Equivalent to adding noise at -50 dB */\r
-#define FIND_LTP_COND_FAC_Q31                           21475\r
-#define FIND_LPC_COND_FAC_Q32                           257698       // 6e-5\r
-\r
-/* Find Pred Coef defines */\r
-#define INACTIVE_BWExp_Q16                              64225       // 0.98\r
-#define ACTIVE_BWExp_Q16                                65470       // 0.999\r
-#define LTP_DAMPING_Q16                                 66\r
-#define LTP_SMOOTHING_Q26                               6710886\r
-\r
-/* LTP quantization settings */\r
-#define MU_LTP_QUANT_NB_Q8                              8\r
-#define MU_LTP_QUANT_MB_Q8                              6\r
-#define MU_LTP_QUANT_WB_Q8                              5\r
-#define MU_LTP_QUANT_SWB_Q8                             4\r
-\r
-/***********************/\r
-/* High pass filtering */\r
-/***********************/\r
-/* Smoothing parameters for low end of pitch frequency range estimation */\r
-#define VARIABLE_HP_SMTH_COEF1_Q16                      6554    // 0.1\r
-#define VARIABLE_HP_SMTH_COEF2_Q16                      983     // 0.015\r
-\r
-/* Min and max values for low end of pitch frequency range estimation */\r
-#define VARIABLE_HP_MIN_FREQ_Q0                         80\r
-#define VARIABLE_HP_MAX_FREQ_Q0                         150\r
-\r
-/* Max absolute difference between log2 of pitch frequency and smoother state, to enter the smoother */\r
-#define VARIABLE_HP_MAX_DELTA_FREQ_Q7                   51      // 0.4 in Q7\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
index e4b726d..e3d8789 100644 (file)
@@ -46,7 +46,6 @@ SKP_int SKP_Silk_encode_frame_FIX(
     SKP_int16   pIn_HP[ MAX_FRAME_LENGTH ];\r
     SKP_int16   res_pitch[ 2 * MAX_FRAME_LENGTH + LA_PITCH_MAX ];\r
     SKP_int     LBRR_idx, frame_terminator, SNR_dB_Q7;\r
-    const SKP_uint16 *FrameTermination_CDF;\r
 \r
     /* Low bitrate redundancy parameters */\r
     SKP_uint8   LBRRpayload[ MAX_ARITHM_BYTES ];\r
@@ -115,7 +114,7 @@ TOC(PREFILTER)
     /* Find linear prediction coefficients (LPC + LTP) */\r
     /***************************************************/\r
 TIC(FIND_PRED_COEF)\r
-    SKP_Silk_find_pred_coefs_FIX( psEnc, &sEncCtrl, res_pitch );\r
+    SKP_Silk_find_pred_coefs_FIX( psEnc, &sEncCtrl, res_pitch, x_frame );\r
 TOC(FIND_PRED_COEF)\r
 \r
     /****************************************/\r
@@ -133,7 +132,7 @@ TOC(PROCESS_GAINS)
     /****************************************/\r
     nBytesLBRR = MAX_ARITHM_BYTES;\r
 TIC(LBRR)\r
-    SKP_Silk_LBRR_encode_FIX( psEnc, &sEncCtrl, LBRRpayload, &nBytesLBRR, xfw );\r
+    //SKP_Silk_LBRR_encode_FIX( psEnc, &sEncCtrl, LBRRpayload, &nBytesLBRR, xfw );\r
 TOC(LBRR)\r
 \r
     /*****************************************/\r
@@ -186,7 +185,6 @@ TOC(NSQ)
     /****************************************/\r
 TIC(ENCODE_PARAMS)\r
     SKP_Silk_encode_parameters( &psEnc->sCmn, &sEncCtrl.sCmn, psRangeEnc );\r
-    FrameTermination_CDF = SKP_Silk_FrameTermination_CDF;\r
 TOC(ENCODE_PARAMS)\r
 \r
     /****************************************/\r
@@ -220,8 +218,7 @@ TOC(ENCODE_PARAMS)
         frame_terminator = SKP_SILK_NO_LBRR;\r
 \r
         /* Add the frame termination info to stream */\r
-        ec_encode_bin( psRangeEnc, FrameTermination_CDF[ frame_terminator ], \r
-            FrameTermination_CDF[ frame_terminator + 1 ], 16 );\r
+        ec_enc_icdf( psRangeEnc, frame_terminator, SKP_Silk_FrameTermination_iCDF, 8 );\r
 \r
         /* Code excitation signal */\r
         for( i = 0; i < psEnc->sCmn.nFramesInPayloadBuf; i++ ) {\r
@@ -316,7 +313,6 @@ TOC(ENCODE_FRAME)
         int i;\r
         DEBUG_STORE_DATA( xf.dat,                   x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, psEnc->sCmn.frame_length    * sizeof( SKP_int16 ) );\r
         DEBUG_STORE_DATA( xfw.dat,                  xfw,                            psEnc->sCmn.frame_length    * sizeof( SKP_int16 ) );\r
-        //     DEBUG_STORE_DATA( q.dat,                    &psEnc->sCmn.q[ ( psEnc->sCmn.nFramesInPayloadBuf - 1)*psEnc->sCmn.frame_length ],  psEnc->sCmn.frame_length    * sizeof( SKP_int8 ) );\r
         DEBUG_STORE_DATA( pitchL.dat,               sEncCtrl.sCmn.pitchL,           psEnc->sCmn.nb_subfr            * sizeof( SKP_int ) );\r
         for( i = 0; i < psEnc->sCmn.nb_subfr * LTP_ORDER; i++ ) {\r
             tmp[ i ] = (SKP_float)sEncCtrl.LTPCoef_Q14[ i ] / 16384.0f;\r
@@ -471,8 +467,7 @@ void SKP_Silk_LBRR_encode_FIX(
             frame_terminator = SKP_SILK_LAST_FRAME;\r
 \r
             /* Add the frame termination info to stream */\r
-            ec_encode_bin( psRangeEnc_LBRR, FrameTermination_CDF[ frame_terminator ], \r
-                FrameTermination_CDF[ frame_terminator + 1 ], 16 );\r
+            ec_enc_icdf( psRangeEnc, frame_terminator, SKP_Silk_FrameTermination_iCDF, 8 );\r
 \r
             /*********************************************/\r
             /* Encode quantization indices of excitation */\r
@@ -512,8 +507,7 @@ void SKP_Silk_LBRR_encode_FIX(
 \r
             /* Encode that more frames follows */\r
             frame_terminator = SKP_SILK_MORE_FRAMES;\r
-            ec_encode_bin( psRangeEnc_LBRR, FrameTermination_CDF[ frame_terminator ], \r
-                FrameTermination_CDF[ frame_terminator + 1 ], 16 );\r
+            ec_enc_icdf( psRangeEnc, frame_terminator, SKP_Silk_FrameTermination_iCDF, 8 );\r
         }\r
 \r
         /* Restore original Gains */\r
index ab13656..876403e 100644 (file)
@@ -82,7 +82,7 @@ void SKP_Silk_find_pitch_lags_FIX(
     SKP_Silk_autocorr( auto_corr, &scale, Wsig, psPredSt->pitch_LPC_win_length, psEnc->sCmn.pitchEstimationLPCOrder + 1 ); \r
         \r
     /* Add white noise, as fraction of energy */\r
-    auto_corr[ 0 ] = SKP_SMLAWB( auto_corr[ 0 ], auto_corr[ 0 ], SKP_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTION, 16 ) );\r
+    auto_corr[ 0 ] = SKP_SMLAWB( auto_corr[ 0 ], auto_corr[ 0 ], SKP_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTION, 16 ) ) + 1;\r
 \r
     /* Calculate the reflection coefficients using schur */\r
     res_nrg = SKP_Silk_schur( rc_Q15, auto_corr, psEnc->sCmn.pitchEstimationLPCOrder );\r
index a82775c..9fa696b 100644 (file)
@@ -54,10 +54,16 @@ double SKP_Silk_energy_FLP(
 \r
 /* integer to floating-point conversion */\r
 SKP_INLINE void SKP_short2float_array(\r
-       SKP_float               *out, \r
-       const SKP_int16 *in, \r
-       SKP_int32               length\r
-);\r
+    SKP_float       *out, \r
+    const SKP_int16 *in, \r
+    SKP_int32       length\r
+) \r
+{\r
+    SKP_int32 k;\r
+    for (k = length-1; k >= 0; k--) {\r
+        out[k] = (SKP_float)in[k];\r
+    }\r
+}\r
 \r
 SKP_INLINE SKP_float SKP_Silk_log2( double x ) { return ( SKP_float )( 3.32192809488736 * log10( x ) ); }\r
 \r
@@ -66,7 +72,8 @@ SKP_INLINE SKP_float SKP_Silk_log2( double x ) { return ( SKP_float )( 3.3219280
 void SKP_Silk_find_pred_coefs_FIX(\r
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  encoder state                               */\r
     SKP_Silk_encoder_control_FIX    *psEncCtrl,     /* I/O  encoder control                             */\r
-    const SKP_int16                 res_pitch[]     /* I    Residual from pitch analysis                */\r
+    const SKP_int16                 res_pitch[],    /* I    Residual from pitch analysis                */\r
+    const SKP_int16                 x[]             /* I    Speech signal                               */\r
 )\r
 {\r
     SKP_int         i;\r
@@ -126,8 +133,8 @@ void SKP_Silk_find_pred_coefs_FIX(
 #endif\r
 \r
         /* Quantize LTP gain parameters */\r
-        SKP_Silk_quant_LTP_gains_FIX( psEncCtrl->LTPCoef_Q14, psEncCtrl->sCmn.LTPIndex, &psEncCtrl->sCmn.PERIndex, \r
-            WLTP, psEnc->mu_LTP_Q8, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr);\r
+        SKP_Silk_quant_LTP_gains( psEncCtrl->LTPCoef_Q14, psEncCtrl->sCmn.LTPIndex, &psEncCtrl->sCmn.PERIndex, \r
+            WLTP, psEnc->sCmn.mu_LTP_Q10, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr);\r
 \r
         /* Control LTP scaling */\r
         SKP_Silk_LTP_scale_ctrl_FIX( psEnc, psEncCtrl );\r
@@ -141,7 +148,7 @@ void SKP_Silk_find_pred_coefs_FIX(
         /* UNVOICED */\r
         /************/\r
         /* Create signal with prepended subframes, scaled by inverse gains */\r
-        x_ptr     = psEnc->x_buf + psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder;\r
+        x_ptr     = x - psEnc->sCmn.predictLPCOrder;\r
         x_pre_ptr = LPC_in_pre;\r
         for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) {\r
             SKP_Silk_scale_copy_vector16( x_pre_ptr, x_ptr, invGains_Q16[ i ], \r
index c4573e1..577f2b8 100644 (file)
@@ -144,7 +144,8 @@ void SKP_Silk_find_pitch_lags_FIX(
 void SKP_Silk_find_pred_coefs_FIX(\r
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  encoder state                               */\r
     SKP_Silk_encoder_control_FIX    *psEncCtrl,     /* I/O  encoder control                             */\r
-    const SKP_int16                 res_pitch[]     /* I    Residual from pitch analysis                */\r
+    const SKP_int16                 res_pitch[],    /* I    Residual from pitch analysis                */\r
+    const SKP_int16                 x[]             /* I    Speech signal                               */\r
 );\r
 \r
 /* LPC analysis */\r
@@ -197,17 +198,6 @@ void SKP_Silk_residual_energy_FIX(
     const SKP_int   LPC_order                       /* I    LPC order                       */\r
 );\r
 \r
-/* LTP tap quantizer */\r
-void SKP_Silk_quant_LTP_gains_FIX(\r
-    SKP_int16           B_Q14[],                /* I/O  (un)quantized LTP gains     */\r
-    SKP_int             cbk_index[],            /* O    Codebook Index              */\r
-    SKP_int             *periodicity_index,     /* O    Periodicity Index           */\r
-    const SKP_int32     W_Q18[],                /* I    Error Weights in Q18        */\r
-    SKP_int             mu_Q8,                  /* I    Mu value (R/D tradeoff)     */\r
-    SKP_int             lowComplexity,          /* I    Flag for low complexity     */\r
-    const SKP_int       nb_subfr                /* I    number of subframes         */\r
-);\r
-\r
 /******************/\r
 /* NLSF Quantizer */\r
 /******************/\r
@@ -265,18 +255,6 @@ SKP_int32 SKP_Silk_residual_energy16_covar_FIX(
     SKP_int                         cQ                  /* I    Q value for c vector 0 - 15                 */\r
 );\r
 \r
-/* Entropy constrained MATRIX-weighted VQ, for a single input data vector */\r
-void SKP_Silk_VQ_WMat_EC_FIX(\r
-    SKP_int                         *ind,               /* O    index of best codebook vector               */\r
-    SKP_int32                       *rate_dist_Q14,     /* O    best weighted quantization error + mu * rate*/\r
-    const SKP_int16                 *in_Q14,            /* I    input vector to be quantized                */\r
-    const SKP_int32                 *W_Q18,             /* I    weighting matrix                            */\r
-    const SKP_int16                 *cb_Q14,            /* I    codebook                                    */\r
-    const SKP_int16                 *cl_Q6,             /* I    code length for each codebook vector        */\r
-    const SKP_int                   mu_Q8,              /* I    tradeoff between weighted error and rate    */\r
-    SKP_int                         L                   /* I    number of vectors in codebook               */\r
-);\r
-\r
 /* Processing of gains */\r
 void SKP_Silk_process_gains_FIX(\r
     SKP_Silk_encoder_state_FIX      *psEnc,         /* I/O  Encoder state                               */\r
index 05cbd2b..6c4e074 100644 (file)
@@ -161,13 +161,14 @@ void SKP_Silk_noise_shape_analysis_FIX(
     /****************/\r
     /* CONTROL SNR  */\r
     /****************/\r
-#if DEACTIVATE_SNR_FEEDBACK\r
-    psEncCtrl->current_SNR_dB_Q7 = psEnc->SNR_dB_Q7;\r
-#else\r
     /* Reduce SNR_dB values if recent bitstream has exceeded TargetRate */\r
     psEncCtrl->current_SNR_dB_Q7 = psEnc->SNR_dB_Q7 - SKP_SMULWB( SKP_LSHIFT( ( SKP_int32 )psEnc->BufferedInChannel_ms, 7 ), \r
-        SKP_FIX_CONST( 0.05, 16 ) );\r
-#endif\r
+        SKP_FIX_CONST( 0.1, 16 ) );\r
+\r
+    /* Reduce SNR for 10 ms frames */\r
+    if( psEnc->sCmn.nb_subfr == 2 ) {\r
+        psEncCtrl->current_SNR_dB_Q7 -= SKP_FIX_CONST( 1.5, 7 );\r
+    }\r
 \r
     /* Reduce SNR_dB if inband FEC used */\r
     if( psEnc->speech_activity_Q8 > SKP_FIX_CONST( LBRR_SPEECH_ACTIVITY_THRES, 8 ) ) {\r
@@ -186,11 +187,14 @@ void SKP_Silk_noise_shape_analysis_FIX(
         SKP_FIX_CONST( 18.0, 7 ), 4 ) ), 1 );\r
 \r
     /* Reduce coding SNR during low speech activity */\r
-    b_Q8 = SKP_FIX_CONST( 1.0, 8 ) - psEnc->speech_activity_Q8;\r
-    b_Q8 = SKP_SMULWB( SKP_LSHIFT( b_Q8, 8 ), b_Q8 );\r
-    SNR_adj_dB_Q7 = SKP_SMLAWB( psEncCtrl->current_SNR_dB_Q7,\r
-        SKP_SMULBB( SKP_FIX_CONST( -BG_SNR_DECR_dB, 7 ) >> ( 4 + 1 ), b_Q8 ),                                       // Q11\r
-        SKP_SMULWB( SKP_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q14 ) );     // Q12\r
+    SNR_adj_dB_Q7 = psEncCtrl->current_SNR_dB_Q7;\r
+    if( psEnc->sCmn.useCBR == 0 ) {\r
+        b_Q8 = SKP_FIX_CONST( 1.0, 8 ) - psEnc->speech_activity_Q8;\r
+        b_Q8 = SKP_SMULWB( SKP_LSHIFT( b_Q8, 8 ), b_Q8 );\r
+        SNR_adj_dB_Q7 = SKP_SMLAWB( SNR_adj_dB_Q7,\r
+            SKP_SMULBB( SKP_FIX_CONST( -BG_SNR_DECR_dB, 7 ) >> ( 4 + 1 ), b_Q8 ),                                       // Q11\r
+            SKP_SMULWB( SKP_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q14 ) );     // Q12\r
+    }\r
 \r
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {\r
         /* Reduce gains for periodic signals */\r
@@ -356,31 +360,17 @@ void SKP_Silk_noise_shape_analysis_FIX(
     /* Gain tweaking */\r
     /*****************/\r
     /* Increase gains during low speech activity and put lower limit on gains */\r
-    gain_mult_Q16 = SKP_Silk_log2lin( -SKP_SMLAWB( -SKP_FIX_CONST( 16.0, 7 ), SNR_adj_dB_Q7,                            SKP_FIX_CONST( 0.16, 16 ) ) );\r
-    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 ) ) );\r
-    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 ) ) );\r
-    tmp32 = SKP_SMULWW( psEnc->avgGain_Q16, tmp32 );\r
-    gain_add_Q16 = SKP_ADD_SAT32( gain_add_Q16, tmp32 );\r
-    SKP_assert( gain_mult_Q16 >= 0 );\r
-\r
+    gain_mult_Q16 = SKP_Silk_log2lin( -SKP_SMLAWB( -SKP_FIX_CONST( 16.0, 7 ), SNR_adj_dB_Q7, SKP_FIX_CONST( 0.16, 16 ) ) );\r
+    gain_add_Q16  = SKP_Silk_log2lin(  SKP_SMLAWB(  SKP_FIX_CONST( 16.0, 7 ), SKP_FIX_CONST( MIN_QGAIN_DB, 7 ), SKP_FIX_CONST( 0.16, 16 ) ) );\r
+    SKP_assert( gain_mult_Q16 > 0 );\r
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\r
         psEncCtrl->Gains_Q16[ k ] = SKP_SMULWW( psEncCtrl->Gains_Q16[ k ], gain_mult_Q16 );\r
         SKP_assert( psEncCtrl->Gains_Q16[ k ] >= 0 );\r
-    }\r
-\r
-    for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\r
         psEncCtrl->Gains_Q16[ k ] = SKP_ADD_POS_SAT32( psEncCtrl->Gains_Q16[ k ], gain_add_Q16 );\r
-        psEnc->avgGain_Q16 = SKP_ADD_SAT32( \r
-            psEnc->avgGain_Q16, \r
-            SKP_SMULWB(\r
-                psEncCtrl->Gains_Q16[ k ] - psEnc->avgGain_Q16, \r
-                SKP_RSHIFT_ROUND( SKP_SMULBB( psEnc->speech_activity_Q8, SKP_FIX_CONST( GAIN_SMOOTHING_COEF, 10 ) ), 2 ) \r
-            ) );\r
     }\r
 \r
     gain_mult_Q16 = SKP_FIX_CONST( 1.0, 16 ) + SKP_RSHIFT_ROUND( SKP_MLA( SKP_FIX_CONST( INPUT_TILT, 26 ), \r
         psEncCtrl->coding_quality_Q14, SKP_FIX_CONST( HIGH_RATE_INPUT_TILT, 12 ) ), 10 );\r
-\r
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\r
         psEncCtrl->GainsPre_Q14[ k ] = SKP_SMULWB( gain_mult_Q16, psEncCtrl->GainsPre_Q14[ k ] );\r
     }\r
@@ -389,8 +379,15 @@ void SKP_Silk_noise_shape_analysis_FIX(
     /* Control low-frequency shaping and noise tilt */\r
     /************************************************/\r
     /* Less low frequency shaping for noisy inputs */\r
+#if 1\r
     strength_Q16 = SKP_MUL( SKP_FIX_CONST( LOW_FREQ_SHAPING, 0 ), SKP_FIX_CONST( 1.0, 16 ) + \r
         SKP_SMULBB( SKP_FIX_CONST( LOW_QUALITY_LOW_FREQ_SHAPING_DECR, 1 ), psEncCtrl->input_quality_bands_Q15[ 0 ] - SKP_FIX_CONST( 1.0, 15 ) ) );\r
+#else\r
+// TODO: CHECK THAT BELOW WORKS FINE AND REPLACE\r
+    strength_Q16 = SKP_MUL( SKP_FIX_CONST( LOW_FREQ_SHAPING, 4 ), SKP_SMLAWB( SKP_FIX_CONST( 1.0, 12 ),\r
+        SKP_FIX_CONST( LOW_QUALITY_LOW_FREQ_SHAPING_DECR, 13 ), psEncCtrl->input_quality_bands_Q15[ 0 ] - SKP_FIX_CONST( 1.0, 15 ) ) );\r
+#endif\r
+    strength_Q16 = SKP_RSHIFT( SKP_MUL( strength_Q16, psEnc->speech_activity_Q8 ), 8 );\r
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {\r
         /* Reduce low frequencies quantization noise for periodic signals, depending on pitch lag */\r
         /*f = 400; freqz([1, -0.98 + 2e-4 * f], [1, -0.97 + 7e-4 * f], 2^12, Fs); axis([0, 1000, -10, 1])*/\r
diff --git a/src_FIX/SKP_Silk_perceptual_parameters_FIX.h b/src_FIX/SKP_Silk_perceptual_parameters_FIX.h
deleted file mode 100644 (file)
index 2df9650..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/***********************************************************************\r
-Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
-Redistribution and use in source and binary forms, with or without \r
-modification, (subject to the limitations in the disclaimer below) \r
-are permitted provided that the following conditions are met:\r
-- Redistributions of source code must retain the above copyright notice,\r
-this list of conditions and the following disclaimer.\r
-- Redistributions in binary form must reproduce the above copyright \r
-notice, this list of conditions and the following disclaimer in the \r
-documentation and/or other materials provided with the distribution.\r
-- Neither the name of Skype Limited, nor the names of specific \r
-contributors, may be used to endorse or promote products derived from \r
-this software without specific prior written permission.\r
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
-BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
-CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-***********************************************************************/\r
-\r
-#ifndef SKP_SILK_PERCEPTUAL_PARAMETERS_FIX_H\r
-#define SKP_SILK_PERCEPTUAL_PARAMETERS_FIX_H\r
-\r
-#include "SKP_Silk_perceptual_parameters.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif\r
-\r
-/* reduction in coding SNR during low speech activity */\r
-#define BG_SNR_DECR_dB_Q7                               SKP_FIX_CONST( BG_SNR_DECR_dB, 7 )\r
-\r
-/* factor for reducing quantization noise during voiced speech */\r
-#define HARM_SNR_INCR_dB_Q7                             SKP_FIX_CONST( HARM_SNR_INCR_dB, 7 )\r
-\r
-/* factor for reducing quantization noise for unvoiced sparse signals */\r
-#define SPARSE_SNR_INCR_dB_Q7                           SKP_FIX_CONST( SPARSE_SNR_INCR_dB, 7 )\r
-\r
-/* threshold for sparseness measure above which to use lower quantization offset during unvoiced */\r
-#define SPARSENESS_THRESHOLD_QNT_OFFSET_Q8              SKP_FIX_CONST( SPARSENESS_THRESHOLD_QNT_OFFSET, 8 )\r
-\r
-\r
-/* noise shaping filter chirp factor */\r
-#define BANDWIDTH_EXPANSION_Q16                         SKP_FIX_CONST( BANDWIDTH_EXPANSION, 16 )\r
-\r
-/* difference between chirp factors for analysis and synthesis noise shaping filters at low bitrates */\r
-#define LOW_RATE_BANDWIDTH_EXPANSION_DELTA_Q16          SKP_FIX_CONST( LOW_RATE_BANDWIDTH_EXPANSION_DELTA, 16 )\r
-\r
-/* factor to reduce all bandwidth expansion coefficients for super wideband, relative to wideband */\r
-#define SWB_BANDWIDTH_EXPANSION_REDUCTION_Q16           SKP_FIX_CONST( SWB_BANDWIDTH_EXPANSION_REDUCTION, 16 )\r
-\r
-/* gain reduction for fricatives */\r
-#define DE_ESSER_COEF_SWB_dB_Q7                         SKP_FIX_CONST( DE_ESSER_COEF_SWB_dB, 7 )\r
-#define DE_ESSER_COEF_WB_dB_Q7                          SKP_FIX_CONST( DE_ESSER_COEF_WB_dB, 7 )\r
-\r
-/* extra harmonic boosting (signal shaping) at low bitrates */\r
-#define LOW_RATE_HARMONIC_BOOST_Q16                     SKP_FIX_CONST( LOW_RATE_HARMONIC_BOOST, 16 )\r
-\r
-/* extra harmonic boosting (signal shaping) for noisy input signals */\r
-#define LOW_INPUT_QUALITY_HARMONIC_BOOST_Q16            SKP_FIX_CONST( LOW_INPUT_QUALITY_HARMONIC_BOOST, 16 )\r
-\r
-/* harmonic noise shaping */\r
-#define HARMONIC_SHAPING_Q16                            SKP_FIX_CONST( HARMONIC_SHAPING, 16 )\r
-\r
-/* extra harmonic noise shaping for high bitrates or noisy input */\r
-#define HIGH_RATE_OR_LOW_QUALITY_HARMONIC_SHAPING_Q16   SKP_FIX_CONST( HIGH_RATE_OR_LOW_QUALITY_HARMONIC_SHAPING, 16 )\r
-\r
-\r
-/* parameter for shaping noise towards higher frequencies */\r
-#define HP_NOISE_COEF_Q16                               SKP_FIX_CONST( HP_NOISE_COEF, 16 )\r
-\r
-/* parameter for shaping noise extra towards higher frequencies during voiced speech */\r
-#define HARM_HP_NOISE_COEF_Q24                          SKP_FIX_CONST( HARM_HP_NOISE_COEF, 24 )\r
-\r
-/* parameter for applying a high-pass tilt to the input signal */\r
-#define INPUT_TILT_Q26                                  SKP_FIX_CONST( INPUT_TILT, 26 )\r
-\r
-/* parameter for extra high-pass tilt to the input signal at high rates */\r
-#define HIGH_RATE_INPUT_TILT_Q12                        SKP_FIX_CONST( HIGH_RATE_INPUT_TILT, 12 )\r
-\r
-/* parameter for reducing noise at the very low frequencies */\r
-#define LOW_FREQ_SHAPING_Q0                             SKP_FIX_CONST( LOW_FREQ_SHAPING, 0 )\r
-\r
-/* less reduction of noise at the very low frequencies for signals with low SNR at low frequencies */\r
-#define LOW_QUALITY_LOW_FREQ_SHAPING_DECR_Q1            SKP_FIX_CONST( LOW_QUALITY_LOW_FREQ_SHAPING_DECR, 1 )\r
-\r
-/* fraction added to first autocorrelation value */\r
-#define SHAPE_WHITE_NOISE_FRACTION_Q20                  SKP_FIX_CONST( SHAPE_WHITE_NOISE_FRACTION, 20 )\r
-\r
-/* fraction of first autocorrelation value added to residual energy value; limits prediction gain */\r
-#define SHAPE_MIN_ENERGY_RATIO_Q24                      SKP_FIX_CONST( SHAPE_MIN_ENERGY_RATIO, 24 )\r
-\r
-/* noise floor to put a low limit on the quantization step size */\r
-#define NOISE_FLOOR_dB_Q7                               SKP_FIX_CONST( NOISE_FLOOR_dB, 7 )\r
-\r
-/* noise floor relative to active speech gain level */\r
-#define RELATIVE_MIN_GAIN_dB_Q7                         SKP_FIX_CONST( RELATIVE_MIN_GAIN_dB, 7 )\r
-\r
-/* subframe smoothing coefficient for determining active speech gain level (lower -> more smoothing) */\r
-#define GAIN_SMOOTHING_COEF_Q10                         SKP_FIX_CONST( GAIN_SMOOTHING_COEF, 10 )\r
-\r
-/* subframe smoothing coefficient for HarmBoost, HarmShapeGain, Tilt (lower -> more smoothing) */\r
-#define SUBFR_SMTH_COEF_Q16                             SKP_FIX_CONST( SUBFR_SMTH_COEF, 16 )\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif //SKP_SILK_PERCEPTUAL_PARAMETERS_FIX_H\r
index 261610c..f422d93 100644 (file)
@@ -91,10 +91,7 @@ typedef struct {
     /* Buffer for find pitch and noise shape analysis */\r
     SKP_DWORD_ALIGN SKP_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ];\r
     SKP_int                         LTPCorr_Q15;                    /* Normalized correlation from pitch lag estimator                      */\r
-    SKP_int                         mu_LTP_Q8;                      /* Rate-distortion tradeoff in LTP quantization                         */\r
     SKP_int32                       SNR_dB_Q7;                      /* Quality setting                                                      */\r
-    SKP_int32                       avgGain_Q16;                    /* average gain during active speech                                    */\r
-    SKP_int32                       avgGain_Q16_one_bit_per_sample; /* average gain during active speech                                    */\r
     SKP_int                         BufferedInChannel_ms;           /* Simulated number of ms buffer because of exceeded TargetRate_bps     */\r
     SKP_int                         speech_activity_Q8;             /* Speech activity in Q8                                                */\r
 \r
diff --git a/src_FIX/Silk_FIX.vcproj b/src_FIX/Silk_FIX.vcproj
deleted file mode 100644 (file)
index 2d1cd54..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="8,00"\r
-       Name="Silk_FIX"\r
-       ProjectGUID="{56B91D01-9150-4BBF-AFA1-5B68AB991B76}"\r
-       RootNamespace="Silk"\r
-       Keyword="Win32Proj"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       OutputDirectory="$(SolutionDir)"\r
-                       IntermediateDirectory="$(ConfigurationName)"\r
-                       ConfigurationType="4"\r
-                       CharacterSet="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               FavorSizeOrSpeed="0"\r
-                               AdditionalIncludeDirectories="&quot;../../../celt-0.8.0/libcelt&quot;;../interface;../src_common;../src_SigProc_FIX"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H"\r
-                               MinimalRebuild="true"\r
-                               BasicRuntimeChecks="3"\r
-                               RuntimeLibrary="1"\r
-                               FloatingPointModel="2"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="4"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLibrarianTool"\r
-                               OutputFile="SKP_Silk_FIX_Win32_debug.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                               CommandLine=""\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="$(SolutionDir)"\r
-                       IntermediateDirectory="$(ConfigurationName)"\r
-                       ConfigurationType="4"\r
-                       CharacterSet="1"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="0"\r
-                               FavorSizeOrSpeed="0"\r
-                               AdditionalIncludeDirectories="&quot;../../../celt-0.8.0/libcelt&quot;;../interface;../src_common;../src_SigProc_FIX"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H"\r
-                               GeneratePreprocessedFile="0"\r
-                               RuntimeLibrary="0"\r
-                               FloatingPointModel="2"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLibrarianTool"\r
-                               OutputFile="SKP_Silk_FIX_Win32_mt.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                               CommandLine=""\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
-                       >\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_control_codec_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_corrMatrix_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_encode_frame_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_find_LPC_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_find_LTP_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_find_pitch_lags_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_find_pred_coefs_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_HP_variable_cutoff_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_init_encoder_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_LTP_analysis_filter_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_LTP_scale_ctrl_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_NLSF_MSVQ_encode_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_NLSF_VQ_rate_distortion_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_NLSF_VQ_sum_error_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_noise_shape_analysis_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_prefilter_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_process_gains_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_process_NLSFs_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_quant_LTP_gains_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_regularize_correlations_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_residual_energy16_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_residual_energy_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_solve_LS_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_VQ_nearest_neighbor_FIX.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_warped_autocorrelation_FIX.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
-                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
-                       >\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_define_FIX.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_main_FIX.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_perceptual_parameters_FIX.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\SKP_Silk_structs_FIX.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/src_FIX/src_FIX.vcxproj b/src_FIX/src_FIX.vcxproj
new file mode 100644 (file)
index 0000000..1b73d8a
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{8484C90D-1561-402F-A91D-2DB10F8C5171}</ProjectGuid>\r
+    <Keyword>Win32Proj</Keyword>\r
+    <RootNamespace>src_FIX</RootNamespace>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup />\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>../interface;../src_SigProc_FIX;../src_common;../../celt/libcelt</AdditionalIncludeDirectories>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>../interface;../src_SigProc_FIX;../src_common;../../celt/libcelt</AdditionalIncludeDirectories>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <None Include="ReadMe.txt" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="SKP_Silk_main_FIX.h" />\r
+    <ClInclude Include="SKP_Silk_structs_FIX.h" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="SKP_Silk_control_codec_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_corrMatrix_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_encode_frame_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_find_LPC_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_find_LTP_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_find_pitch_lags_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_find_pred_coefs_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_HP_variable_cutoff_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_init_encoder_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_LTP_analysis_filter_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_LTP_scale_ctrl_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_NLSF_MSVQ_encode_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_NLSF_VQ_rate_distortion_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_NLSF_VQ_sum_error_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_noise_shape_analysis_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_prefilter_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_process_gains_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_process_NLSFs_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_regularize_correlations_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_residual_energy16_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_residual_energy_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_solve_LS_FIX.c" />\r
+    <ClCompile Include="SKP_Silk_warped_autocorrelation_FIX.c" />\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/src_FIX/src_FIX.vcxproj.filters b/src_FIX/src_FIX.vcxproj.filters
new file mode 100644 (file)
index 0000000..ad867d7
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+    </Filter>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="ReadMe.txt" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="SKP_Silk_main_FIX.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="SKP_Silk_structs_FIX.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="SKP_Silk_control_codec_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_corrMatrix_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_encode_frame_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_find_LPC_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_find_LTP_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_find_pitch_lags_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_find_pred_coefs_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_HP_variable_cutoff_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_init_encoder_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_LTP_analysis_filter_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_LTP_scale_ctrl_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_NLSF_MSVQ_encode_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_NLSF_VQ_rate_distortion_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_NLSF_VQ_sum_error_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_noise_shape_analysis_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_prefilter_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_process_gains_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_process_NLSFs_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_regularize_correlations_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_residual_energy_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_residual_energy16_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_solve_LS_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="SKP_Silk_warped_autocorrelation_FIX.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 1f71667..e3668b9 100644 (file)
@@ -91,22 +91,22 @@ void SKP_Silk_LPC_analysis_filter16_FLP(
         s_ptr = &s[ix - 1];\r
 \r
         /* short-term prediction */\r
-        LPC_pred = s_ptr[ 0 ]   * PredCoef[ 0 ]  + \r
-                   s_ptr[-1]  * PredCoef[ 1 ]  +\r
-                   s_ptr[-2]  * PredCoef[ 2 ]  +\r
-                   s_ptr[-3]  * PredCoef[ 3 ]  +\r
-                   s_ptr[-4]  * PredCoef[ 4 ]  +\r
-                   s_ptr[-5]  * PredCoef[ 5 ]  +\r
-                   s_ptr[-6]  * PredCoef[ 6 ]  +\r
-                   s_ptr[-7]  * PredCoef[ 7 ]  +\r
-                   s_ptr[-8]  * PredCoef[ 8 ]  +\r
-                   s_ptr[-9]  * PredCoef[ 9 ]  +\r
-                   s_ptr[-10] * PredCoef[ 10 ] +\r
-                   s_ptr[-11] * PredCoef[ 11 ] +\r
-                   s_ptr[-12] * PredCoef[ 12 ] +\r
-                   s_ptr[-13] * PredCoef[ 13 ] +\r
-                   s_ptr[-14] * PredCoef[ 14 ] +\r
-                   s_ptr[-15] * PredCoef[ 15 ];\r
+        LPC_pred = s_ptr[  0 ]  * PredCoef[ 0 ]  + \r
+                   s_ptr[ -1 ]  * PredCoef[ 1 ]  +\r
+                   s_ptr[ -2 ]  * PredCoef[ 2 ]  +\r
+                   s_ptr[ -3 ]  * PredCoef[ 3 ]  +\r
+                   s_ptr[ -4 ]  * PredCoef[ 4 ]  +\r
+                   s_ptr[ -5 ]  * PredCoef[ 5 ]  +\r
+                   s_ptr[ -6 ]  * PredCoef[ 6 ]  +\r
+                   s_ptr[ -7 ]  * PredCoef[ 7 ]  +\r
+                   s_ptr[ -8 ]  * PredCoef[ 8 ]  +\r
+                   s_ptr[ -9 ]  * PredCoef[ 9 ]  +\r
+                   s_ptr[ -10 ] * PredCoef[ 10 ] +\r
+                   s_ptr[ -11 ] * PredCoef[ 11 ] +\r
+                   s_ptr[ -12 ] * PredCoef[ 12 ] +\r
+                   s_ptr[ -13 ] * PredCoef[ 13 ] +\r
+                   s_ptr[ -14 ] * PredCoef[ 14 ] +\r
+                   s_ptr[ -15 ] * PredCoef[ 15 ];\r
 \r
         /* prediction error */\r
         r_LPC[ix] = s_ptr[ 1 ] - LPC_pred;\r
@@ -129,18 +129,18 @@ void SKP_Silk_LPC_analysis_filter12_FLP(
         s_ptr = &s[ix - 1];\r
 \r
         /* short-term prediction */\r
-        LPC_pred = s_ptr[ 0 ]   * PredCoef[ 0 ]  + \r
-                   s_ptr[-1]  * PredCoef[ 1 ]  +\r
-                   s_ptr[-2]  * PredCoef[ 2 ]  +\r
-                   s_ptr[-3]  * PredCoef[ 3 ]  +\r
-                   s_ptr[-4]  * PredCoef[ 4 ]  +\r
-                   s_ptr[-5]  * PredCoef[ 5 ]  +\r
-                   s_ptr[-6]  * PredCoef[ 6 ]  +\r
-                   s_ptr[-7]  * PredCoef[ 7 ]  +\r
-                   s_ptr[-8]  * PredCoef[ 8 ]  +\r
-                   s_ptr[-9]  * PredCoef[ 9 ]  +\r
-                   s_ptr[-10] * PredCoef[ 10 ] +\r
-                   s_ptr[-11] * PredCoef[ 11 ];\r
+        LPC_pred = s_ptr[  0 ]  * PredCoef[ 0 ]  + \r
+                   s_ptr[ -1 ]  * PredCoef[ 1 ]  +\r
+                   s_ptr[ -2 ]  * PredCoef[ 2 ]  +\r
+                   s_ptr[ -3 ]  * PredCoef[ 3 ]  +\r
+                   s_ptr[ -4 ]  * PredCoef[ 4 ]  +\r
+                   s_ptr[ -5 ]  * PredCoef[ 5 ]  +\r
+                   s_ptr[ -6 ]  * PredCoef[ 6 ]  +\r
+                   s_ptr[ -7 ]  * PredCoef[ 7 ]  +\r
+                   s_ptr[ -8 ]  * PredCoef[ 8 ]  +\r
+                   s_ptr[ -9 ]  * PredCoef[ 9 ]  +\r
+                   s_ptr[ -10 ] * PredCoef[ 10 ] +\r
+                   s_ptr[ -11 ] * PredCoef[ 11 ];\r
 \r
         /* prediction error */\r
         r_LPC[ix] = s_ptr[ 1 ] - LPC_pred;\r
@@ -163,16 +163,16 @@ void SKP_Silk_LPC_analysis_filter10_FLP(
         s_ptr = &s[ix - 1];\r
 \r
         /* short-term prediction */\r
-        LPC_pred = s_ptr[ 0 ]   * PredCoef[ 0 ]  + \r
-                   s_ptr[-1]  * PredCoef[ 1 ]  +\r
-                   s_ptr[-2]  * PredCoef[ 2 ]  +\r
-                   s_ptr[-3]  * PredCoef[ 3 ]  +\r
-                   s_ptr[-4]  * PredCoef[ 4 ]  +\r
-                   s_ptr[-5]  * PredCoef[ 5 ]  +\r
-                   s_ptr[-6]  * PredCoef[ 6 ]  +\r
-                   s_ptr[-7]  * PredCoef[ 7 ]  +\r
-                   s_ptr[-8]  * PredCoef[ 8 ]  +\r
-                   s_ptr[-9]  * PredCoef[ 9 ];\r
+        LPC_pred = s_ptr[  0 ] * PredCoef[ 0 ]  + \r
+                   s_ptr[ -1 ] * PredCoef[ 1 ]  +\r
+                   s_ptr[ -2 ] * PredCoef[ 2 ]  +\r
+                   s_ptr[ -3 ] * PredCoef[ 3 ]  +\r
+                   s_ptr[ -4 ] * PredCoef[ 4 ]  +\r
+                   s_ptr[ -5 ] * PredCoef[ 5 ]  +\r
+                   s_ptr[ -6 ] * PredCoef[ 6 ]  +\r
+                   s_ptr[ -7 ] * PredCoef[ 7 ]  +\r
+                   s_ptr[ -8 ] * PredCoef[ 8 ]  +\r
+                   s_ptr[ -9 ] * PredCoef[ 9 ];\r
 \r
         /* prediction error */\r
         r_LPC[ix] = s_ptr[ 1 ] - LPC_pred;\r
@@ -217,7 +217,7 @@ void SKP_Silk_LPC_analysis_filter6_FLP(
     const SKP_int                   length              /* I    Length of input signal                  */\r
 )\r
 {\r
-    SKP_int   ix = 8;\r
+    SKP_int   ix = 6;\r
     SKP_float LPC_pred;\r
     const SKP_float *s_ptr;\r
 \r
index 1b7cdc6..9774723 100644 (file)
@@ -30,65 +30,68 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 /* NLSF vector decoder */\r
 void SKP_Silk_NLSF_MSVQ_decode_FLP(\r
           SKP_float                 *pNLSF,             /* O    Decoded output vector [ LPC_ORDER ]     */\r
-    const SKP_Silk_NLSF_CB_FLP      *psNLSF_CB_FLP,     /* I    NLSF codebook struct                    */  \r
+    const SKP_Silk_NLSF_CB_struct   *psNLSF_CB,         /* I    NLSF codebook struct                    */  \r
     const SKP_int                   *NLSFIndices,       /* I    NLSF indices [ nStages ]                */\r
     const SKP_int                   LPC_order           /* I    LPC order used                          */\r
 )\r
 {\r
-    const SKP_float *pCB_element;\r
-          SKP_int    s;\r
-          SKP_int    i;\r
+    const SKP_int8 *pCB_element;\r
+          SKP_int  s;\r
+          SKP_int  i;\r
 \r
     /* Check that each index is within valid range */\r
-    SKP_assert( 0 <= NLSFIndices[ 0 ] && NLSFIndices[ 0 ] < psNLSF_CB_FLP->CBStages[ 0 ].nVectors );\r
+    SKP_assert( 0 <= NLSFIndices[ 0 ] && NLSFIndices[ 0 ] < psNLSF_CB->CBStages[ 0 ].nVectors );\r
 \r
     /* Point to the first vector element */\r
-    pCB_element = &psNLSF_CB_FLP->CBStages[ 0 ].CB[ SKP_MUL( NLSFIndices[ 0 ], LPC_order ) ];\r
+    pCB_element = &psNLSF_CB->CBStages[ 0 ].CB_NLSF_Q8[ SKP_MUL( NLSFIndices[ 0 ], LPC_order ) ];\r
 \r
     /* Initialize with the codebook vector from stage 0 */\r
-    SKP_memcpy( pNLSF, pCB_element, LPC_order * sizeof( SKP_float ) );\r
+    for( i = 0; i < LPC_order; i++ ) {\r
+        pNLSF[ i ] = ( SKP_float )pCB_element[ i ];\r
+    }\r
           \r
-    for( s = 1; s < psNLSF_CB_FLP->nStages; s++ ) {\r
+    for( s = 1; s < psNLSF_CB->nStages; s++ ) {\r
         /* Check that each index is within valid range */\r
-        SKP_assert( 0 <= NLSFIndices[ s ] && NLSFIndices[ s ] < psNLSF_CB_FLP->CBStages[ s ].nVectors );\r
+        SKP_assert( 0 <= NLSFIndices[ s ] && NLSFIndices[ s ] < psNLSF_CB->CBStages[ s ].nVectors );\r
 \r
         if( LPC_order == 16 ) {\r
             /* Point to the first vector element */\r
-            pCB_element = &psNLSF_CB_FLP->CBStages[ s ].CB[ SKP_LSHIFT( NLSFIndices[ s ], 4 ) ];\r
+            pCB_element = &psNLSF_CB->CBStages[ s ].CB_NLSF_Q8[ SKP_LSHIFT( NLSFIndices[ s ], 4 ) ];\r
 \r
             /* Add the codebook vector from the current stage */\r
-            pNLSF[ 0 ]  += pCB_element[ 0 ];\r
-            pNLSF[ 1 ]  += pCB_element[ 1 ];\r
-            pNLSF[ 2 ]  += pCB_element[ 2 ];\r
-            pNLSF[ 3 ]  += pCB_element[ 3 ];\r
-            pNLSF[ 4 ]  += pCB_element[ 4 ];\r
-            pNLSF[ 5 ]  += pCB_element[ 5 ];\r
-            pNLSF[ 6 ]  += pCB_element[ 6 ];\r
-            pNLSF[ 7 ]  += pCB_element[ 7 ];\r
-            pNLSF[ 8 ]  += pCB_element[ 8 ];\r
-            pNLSF[ 9 ]  += pCB_element[ 9 ];\r
-            pNLSF[ 10 ] += pCB_element[ 10 ];\r
-            pNLSF[ 11 ] += pCB_element[ 11 ];\r
-            pNLSF[ 12 ] += pCB_element[ 12 ];\r
-            pNLSF[ 13 ] += pCB_element[ 13 ];\r
-            pNLSF[ 14 ] += pCB_element[ 14 ];\r
-            pNLSF[ 15 ] += pCB_element[ 15 ];\r
+            pNLSF[ 0 ]  += ( SKP_float )pCB_element[ 0 ];\r
+            pNLSF[ 1 ]  += ( SKP_float )pCB_element[ 1 ];\r
+            pNLSF[ 2 ]  += ( SKP_float )pCB_element[ 2 ];\r
+            pNLSF[ 3 ]  += ( SKP_float )pCB_element[ 3 ];\r
+            pNLSF[ 4 ]  += ( SKP_float )pCB_element[ 4 ];\r
+            pNLSF[ 5 ]  += ( SKP_float )pCB_element[ 5 ];\r
+            pNLSF[ 6 ]  += ( SKP_float )pCB_element[ 6 ];\r
+            pNLSF[ 7 ]  += ( SKP_float )pCB_element[ 7 ];\r
+            pNLSF[ 8 ]  += ( SKP_float )pCB_element[ 8 ];\r
+            pNLSF[ 9 ]  += ( SKP_float )pCB_element[ 9 ];\r
+            pNLSF[ 10 ] += ( SKP_float )pCB_element[ 10 ];\r
+            pNLSF[ 11 ] += ( SKP_float )pCB_element[ 11 ];\r
+            pNLSF[ 12 ] += ( SKP_float )pCB_element[ 12 ];\r
+            pNLSF[ 13 ] += ( SKP_float )pCB_element[ 13 ];\r
+            pNLSF[ 14 ] += ( SKP_float )pCB_element[ 14 ];\r
+            pNLSF[ 15 ] += ( SKP_float )pCB_element[ 15 ];\r
         } else {\r
             /* Point to the first vector element */\r
-            pCB_element = &psNLSF_CB_FLP->CBStages[ s ].CB[ NLSFIndices[ s ] * LPC_order ];\r
+            pCB_element = &psNLSF_CB->CBStages[ s ].CB_NLSF_Q8[ NLSFIndices[ s ] * LPC_order ];\r
 \r
             /* Add the codebook vector from the current stage */\r
             for( i = 0; i < LPC_order; i++ ) {\r
-                pNLSF[ i ] += pCB_element[ i ];\r
+                pNLSF[ i ] += ( SKP_float )pCB_element[ i ];\r
             }\r
         }\r
     }\r
 \r
-    /* Add 1/2 */\r
+    /* Add 1/2 in Q8 and convert to Q0 */\r
     for( i = 0; i < LPC_order; i++ ) {\r
-        pNLSF[ i ] += 0.5f;\r
+        pNLSF[ i ] += 128.0f;\r
+        pNLSF[ i ] *= ( 1.0f / 256.0f );\r
     }\r
 \r
     /* NLSF stabilization */\r
-    SKP_Silk_NLSF_stabilize_FLP( pNLSF, psNLSF_CB_FLP->NDeltaMin, LPC_order );\r
+    SKP_Silk_NLSF_stabilize_FLP( pNLSF, psNLSF_CB->NDeltaMin_Q15, LPC_order );\r
 }\r
index e74e03d..3550778 100644 (file)
@@ -33,7 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 void SKP_Silk_NLSF_MSVQ_encode_FLP(\r
           SKP_int                   *NLSFIndices,       /* O    Codebook path vector [ CB_STAGES ]      */\r
           SKP_float                 *pNLSF,             /* I/O  Quantized NLSF vector [ LPC_ORDER ]     */\r
-    const SKP_Silk_NLSF_CB_FLP      *psNLSF_CB_FLP,     /* I    Codebook object                         */\r
+    const SKP_Silk_NLSF_CB_struct   *psNLSF_CB,         /* I    Codebook object                         */\r
     const SKP_float                 *pNLSF_q_prev,      /* I    Prev. quantized NLSF vector [LPC_ORDER] */\r
     const SKP_float                 *pW,                /* I    NLSF weight vector [ LPC_ORDER ]        */\r
     const SKP_float                 NLSF_mu,            /* I    Rate weight for the RD optimization     */\r
@@ -44,7 +44,10 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
 )\r
 {\r
     SKP_int     i, s, k, cur_survivors, prev_survivors, min_survivors, input_index, cb_index, bestIndex;\r
-    SKP_float   se, wsse, rateDistThreshold, bestRateDist;\r
+    SKP_float   rateDistThreshold;\r
+#if( NLSF_MSVQ_FLUCTUATION_REDUCTION == 1 )\r
+    SKP_float   se, wsse, bestRateDist;\r
+#endif\r
 \r
 #if( LOW_COMPLEXITY_ONLY == 1 )\r
     SKP_float   pRateDist[      NLSF_MSVQ_TREE_SEARCH_MAX_VECTORS_EVALUATED_LC_MODE ];\r
@@ -53,8 +56,8 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
     SKP_int     pTempIndices[   MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ];\r
     SKP_int     pPath[          MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * NLSF_MSVQ_MAX_CB_STAGES ];\r
     SKP_int     pPath_new[      MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * NLSF_MSVQ_MAX_CB_STAGES ];\r
-    SKP_float   pRes[           MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * MAX_LPC_ORDER ];\r
-    SKP_float   pRes_new[       MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * MAX_LPC_ORDER ];\r
+    SKP_float   pRes_Q8[        MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * MAX_LPC_ORDER ];\r
+    SKP_float   pRes_Q8_new[    MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * MAX_LPC_ORDER ];\r
 #else\r
     SKP_float   pRateDist[      NLSF_MSVQ_TREE_SEARCH_MAX_VECTORS_EVALUATED ];\r
     SKP_float   pRate[          MAX_NLSF_MSVQ_SURVIVORS ];\r
@@ -62,20 +65,27 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
     SKP_int     pTempIndices[   MAX_NLSF_MSVQ_SURVIVORS ];\r
     SKP_int     pPath[          MAX_NLSF_MSVQ_SURVIVORS * NLSF_MSVQ_MAX_CB_STAGES ];\r
     SKP_int     pPath_new[      MAX_NLSF_MSVQ_SURVIVORS * NLSF_MSVQ_MAX_CB_STAGES ];\r
-    SKP_float   pRes[           MAX_NLSF_MSVQ_SURVIVORS * MAX_LPC_ORDER ];\r
-    SKP_float   pRes_new[       MAX_NLSF_MSVQ_SURVIVORS * MAX_LPC_ORDER ];\r
+    SKP_float   pRes_Q8[        MAX_NLSF_MSVQ_SURVIVORS * MAX_LPC_ORDER ];\r
+    SKP_float   pRes_Q8_new[    MAX_NLSF_MSVQ_SURVIVORS * MAX_LPC_ORDER ];\r
 #endif\r
 \r
     const SKP_float *pConstFloat;\r
           SKP_float *pFloat;\r
     const SKP_int   *pConstInt;\r
           SKP_int   *pInt;\r
-    const SKP_float *pCB_element;\r
-    const SKP_Silk_NLSF_CBS_FLP *pCurrentCBStage;\r
+    const SKP_int8  *pCB_element;\r
+    const SKP_Silk_NLSF_CBS *pCurrentCBStage;\r
 \r
     SKP_assert( NLSF_MSVQ_Survivors <= MAX_NLSF_MSVQ_SURVIVORS );\r
     SKP_assert( ( LOW_COMPLEXITY_ONLY == 0 ) || ( NLSF_MSVQ_Survivors <= MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ) );\r
 \r
+#ifdef SAVE_ALL_INTERNAL_DATA\r
+    /* Use sigtype.dat to seperate into signal types */\r
+    DEBUG_STORE_DATA( NLSF.dat,    pNLSF,    LPC_order * sizeof( SKP_float ) );\r
+    DEBUG_STORE_DATA( WNLSF.dat,   pW,       LPC_order * sizeof( SKP_float ) );\r
+    DEBUG_STORE_DATA( NLSF_mu.dat, &NLSF_mu,             sizeof( SKP_float ) );\r
+#endif\r
+\r
     cur_survivors = NLSF_MSVQ_Survivors;\r
 \r
     /****************************************************/\r
@@ -85,9 +95,9 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
     /* Clear accumulated rates */\r
     SKP_memset( pRate, 0, NLSF_MSVQ_Survivors * sizeof( SKP_float ) );\r
 \r
-    /* Subtract 1/2 from NLSF input vector to create initial residual */\r
+    /* Subtract 1/2 from NLSF input vector to create initial residual, and scale to Q8 */\r
     for( i = 0; i < LPC_order; i++ ) {\r
-        pRes[ i ] = pNLSF[ i ] - 0.5f;\r
+        pRes_Q8[ i ] = ( pNLSF[ i ] - 0.5f ) * 256.0f;        \r
     }\r
 \r
     /* Set first stage values */\r
@@ -97,10 +107,10 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
     min_survivors = NLSF_MSVQ_Survivors / 2;\r
 \r
     /* Loop over all stages */\r
-    for( s = 0; s < psNLSF_CB_FLP->nStages; s++ ) {\r
+    for( s = 0; s < psNLSF_CB->nStages; s++ ) {\r
 \r
         /* Set a pointer to the current stage codebook */\r
-        pCurrentCBStage = &psNLSF_CB_FLP->CBStages[ s ];\r
+        pCurrentCBStage = &psNLSF_CB->CBStages[ s ];\r
 \r
         /* Calculate the number of survivors in the current stage */\r
         cur_survivors = SKP_min_32( NLSF_MSVQ_Survivors, prev_survivors * pCurrentCBStage->nVectors );\r
@@ -108,12 +118,12 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
 #if( NLSF_MSVQ_FLUCTUATION_REDUCTION == 0 )\r
         /* Find a single best survivor in the last stage, if we */\r
         /* do not need candidates for fluctuation reduction     */\r
-        if( s == psNLSF_CB_FLP->nStages - 1 ) {\r
+        if( s == psNLSF_CB->nStages - 1 ) {\r
             cur_survivors = 1;\r
         }\r
 #endif\r
         /* Nearest neighbor clustering for multiple input data vectors */\r
-        SKP_Silk_NLSF_VQ_rate_distortion_FLP( pRateDist, pCurrentCBStage, pRes, pW, pRate, NLSF_mu, prev_survivors, LPC_order );\r
+        SKP_Silk_NLSF_VQ_rate_distortion_FLP( pRateDist, pCurrentCBStage, pRes_Q8, pW, pRate, NLSF_mu, prev_survivors, LPC_order );\r
 \r
         /* Sort the rate-distortion errors */\r
         SKP_Silk_insertion_sort_increasing_FLP( pRateDist, pTempIndices, prev_survivors * pCurrentCBStage->nVectors, cur_survivors );\r
@@ -142,19 +152,19 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
             }\r
 \r
             /* Subtract new contribution from the previous residual vector for each of 'cur_survivors' */\r
-            pConstFloat = &pRes[ input_index * LPC_order ];\r
-            pCB_element = &pCurrentCBStage->CB[ cb_index * LPC_order ];\r
-            pFloat      = &pRes_new[ k * LPC_order ];\r
+            pConstFloat = &pRes_Q8[ input_index * LPC_order ];\r
+            pCB_element = &pCurrentCBStage->CB_NLSF_Q8[ cb_index * LPC_order ];\r
+            pFloat      = &pRes_Q8_new[ k * LPC_order ];\r
             for( i = 0; i < LPC_order; i++ ) {\r
                 pFloat[ i ] = pConstFloat[ i ] - pCB_element[ i ];\r
             }\r
 \r
             /* Update accumulated rate for stage 1 to the current */\r
-            pRate_new[ k ] = pRate[ input_index ] + pCurrentCBStage->Rates[ cb_index ];\r
+            pRate_new[ k ] = pRate[ input_index ] + 0.0625f * ( SKP_float )pCurrentCBStage->Rates_Q4[ cb_index ];\r
 \r
             /* Copy paths from previous matrix, starting with the best path */\r
-            pConstInt = &pPath[ input_index * psNLSF_CB_FLP->nStages ];\r
-            pInt      = &pPath_new[       k * psNLSF_CB_FLP->nStages ];\r
+            pConstInt = &pPath[ input_index * psNLSF_CB->nStages ];\r
+            pInt      = &pPath_new[       k * psNLSF_CB->nStages ];\r
             for( i = 0; i < s; i++ ) {\r
                 pInt[ i ] = pConstInt[ i ];\r
             }\r
@@ -162,15 +172,15 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
             pInt[ s ] = cb_index;\r
         }\r
 \r
-        if( s < psNLSF_CB_FLP->nStages - 1 ) {\r
+        if( s < psNLSF_CB->nStages - 1 ) {\r
             /* Copy NLSF residual matrix for next stage */\r
-            SKP_memcpy(pRes, pRes_new, cur_survivors * LPC_order * sizeof( SKP_float ) );\r
+            SKP_memcpy( pRes_Q8, pRes_Q8_new, cur_survivors * LPC_order * sizeof( SKP_float ) );\r
 \r
             /* Copy rate vector for next stage */\r
-            SKP_memcpy(pRate, pRate_new, cur_survivors * sizeof( SKP_float ) );\r
+            SKP_memcpy( pRate, pRate_new, cur_survivors * sizeof( SKP_float ) );\r
 \r
             /* Copy best path matrix for next stage */\r
-            SKP_memcpy(pPath, pPath_new, cur_survivors * psNLSF_CB_FLP->nStages * sizeof( SKP_int ) );\r
+            SKP_memcpy( pPath, pPath_new, cur_survivors * psNLSF_CB->nStages * sizeof( SKP_int ) );\r
         }\r
 \r
         prev_survivors = cur_survivors;\r
@@ -189,7 +199,7 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
         bestRateDist = SKP_float_MAX;\r
         for( s = 0; s < cur_survivors; s++ ) {\r
             /* Decode survivor to compare with previous quantized NLSF vector */\r
-            SKP_Silk_NLSF_MSVQ_decode_FLP( pNLSF, psNLSF_CB_FLP, &pPath_new[ s * psNLSF_CB_FLP->nStages ], LPC_order );\r
+            SKP_Silk_NLSF_MSVQ_decode_FLP( pNLSF, psNLSF_CB, &pPath_new[ s * psNLSF_CB->nStages ], LPC_order );\r
 \r
             /* Compare decoded NLSF vector with the previously quantized vector */ \r
             wsse = 0;\r
@@ -216,9 +226,9 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
 #endif\r
 \r
     /* Copy best path to output argument */\r
-    SKP_memcpy( NLSFIndices, &pPath_new[ bestIndex * psNLSF_CB_FLP->nStages ], psNLSF_CB_FLP->nStages * sizeof( SKP_int ) );\r
+    SKP_memcpy( NLSFIndices, &pPath_new[ bestIndex * psNLSF_CB->nStages ], psNLSF_CB->nStages * sizeof( SKP_int ) );\r
 \r
     /* Decode and stabilize the best survivor */\r
-    SKP_Silk_NLSF_MSVQ_decode_FLP( pNLSF, psNLSF_CB_FLP, NLSFIndices, LPC_order );\r
+    SKP_Silk_NLSF_MSVQ_decode_FLP( pNLSF, psNLSF_CB, NLSFIndices, LPC_order );\r
 \r
 }\r
index 914dbdd..5b92da1 100644 (file)
@@ -26,11 +26,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ***********************************************************************/\r
 \r
 #include "SKP_Silk_main_FLP.h"\r
-    \r
+\r
 /* Rate-Distortion calculations for multiple input data vectors */\r
 void SKP_Silk_NLSF_VQ_rate_distortion_FLP(\r
           SKP_float             *pRD,               /* O   Rate-distortion values [psNLSF_CBS_FLP->nVectors*N] */\r
-    const SKP_Silk_NLSF_CBS_FLP *psNLSF_CBS_FLP,    /* I   NLSF codebook stage struct                          */\r
+    const SKP_Silk_NLSF_CBS     *psNLSF_CBS,        /* I   NLSF codebook stage struct                          */\r
     const SKP_float             *in,                /* I   Input vectors to be quantized                       */\r
     const SKP_float             *w,                 /* I   Weight vector                                       */\r
     const SKP_float             *rate_acc,          /* I   Accumulated rates from previous stage               */\r
@@ -43,15 +43,15 @@ void SKP_Silk_NLSF_VQ_rate_distortion_FLP(
     SKP_int   i, n;\r
 \r
     /* Compute weighted quantization errors for all input vectors over one codebook stage */\r
-    SKP_Silk_NLSF_VQ_sum_error_FLP( pRD, in, w, psNLSF_CBS_FLP->CB, N, psNLSF_CBS_FLP->nVectors, LPC_order );\r
+    SKP_Silk_NLSF_VQ_sum_error_FLP( pRD, in, w, psNLSF_CBS->CB_NLSF_Q8, N, psNLSF_CBS->nVectors, LPC_order );\r
 \r
     /* Loop over input vectors */\r
     pRD_vec = pRD;\r
     for( n = 0; n < N; n++ ) {\r
         /* Add rate cost to error for each codebook vector */\r
-        for( i = 0; i < psNLSF_CBS_FLP->nVectors; i++ ) {\r
-            pRD_vec[ i ] += mu * ( rate_acc[n] + psNLSF_CBS_FLP->Rates[ i ] );\r
+        for( i = 0; i < psNLSF_CBS->nVectors; i++ ) {\r
+            pRD_vec[ i ] += mu * ( rate_acc[n] + 0.0625f * ( SKP_float )psNLSF_CBS->Rates_Q4[ i ] );\r
         }\r
-        pRD_vec += psNLSF_CBS_FLP->nVectors;\r
+        pRD_vec += psNLSF_CBS->nVectors;\r
     }\r
 }\r
index 5359da7..78db9b7 100644 (file)
@@ -30,18 +30,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 /* compute weighted quantization errors for LPC_order element input vectors, over one codebook stage */\r
 void SKP_Silk_NLSF_VQ_sum_error_FLP(\r
           SKP_float                 *err,               /* O    Weighted quantization errors [ N * K ]  */\r
-    const SKP_float                 *in,                /* I    Input vectors [ N * LPC_order ]         */\r
+    const SKP_float                 *in_NLSF_Q8,        /* I    Input vectors [ N * LPC_order ]         */\r
     const SKP_float                 *w,                 /* I    Weighting vectors [ N * LPC_order ]     */\r
-    const SKP_float                 *pCB,               /* I    Codebook vectors [ K * LPC_order ]      */\r
+    const SKP_int8                  *pCB_NLSF_Q8,       /* I    Codebook vectors [ K * LPC_order ]      */\r
     const SKP_int                   N,                  /* I    Number of input vectors                 */\r
     const SKP_int                   K,                  /* I    Number of codebook vectors              */\r
     const SKP_int                   LPC_order           /* I    LPC order                               */\r
 )\r
 {\r
-    SKP_int     i, n;\r
-    SKP_float   diff, sum_error;\r
-    SKP_float   Wcpy[ MAX_LPC_ORDER ];\r
-    const SKP_float *cb_vec;\r
+    SKP_int        i, n;\r
+    SKP_float      diff_Q8, sum_error_Q16;\r
+    SKP_float      Wcpy[ MAX_LPC_ORDER ];\r
+    const SKP_int8 *cb_vec_NLSF_Q8;\r
 \r
     /* Copy to local stack */\r
     SKP_memcpy( Wcpy, w, LPC_order * sizeof( SKP_float ) );\r
@@ -50,47 +50,47 @@ void SKP_Silk_NLSF_VQ_sum_error_FLP(
         /* Loop over input vectors */\r
         for( n = 0; n < N; n++ ) {\r
             /* Loop over codebook */\r
-            cb_vec = pCB;\r
+            cb_vec_NLSF_Q8 = pCB_NLSF_Q8;\r
             for( i = 0; i < K; i++ ) {\r
                 /* Compute weighted squared quantization error */\r
-                diff = in[ 0 ] - cb_vec[ 0 ];\r
-                sum_error  = Wcpy[ 0 ] * diff * diff;\r
-                diff = in[ 1 ] - cb_vec[ 1 ];\r
-                sum_error += Wcpy[ 1 ] * diff * diff;\r
-                diff = in[ 2 ] - cb_vec[ 2 ];\r
-                sum_error += Wcpy[ 2 ] * diff * diff;\r
-                diff = in[ 3 ] - cb_vec[ 3 ];\r
-                sum_error += Wcpy[ 3 ] * diff * diff;\r
-                diff = in[ 4 ] - cb_vec[ 4 ];\r
-                sum_error += Wcpy[ 4 ] * diff * diff;\r
-                diff = in[ 5 ] - cb_vec[ 5 ];\r
-                sum_error += Wcpy[ 5 ] * diff * diff;\r
-                diff = in[ 6 ] - cb_vec[ 6 ];\r
-                sum_error += Wcpy[ 6 ] * diff * diff;\r
-                diff = in[ 7 ] - cb_vec[ 7 ];\r
-                sum_error += Wcpy[ 7 ] * diff * diff;\r
-                diff = in[ 8 ] - cb_vec[ 8 ];\r
-                sum_error += Wcpy[ 8 ] * diff * diff;\r
-                diff = in[ 9 ] - cb_vec[ 9 ];\r
-                sum_error += Wcpy[ 9 ] * diff * diff;\r
-                diff = in[ 10 ] - cb_vec[ 10 ];\r
-                sum_error += Wcpy[ 10 ] * diff * diff;\r
-                diff = in[ 11 ] - cb_vec[ 11 ];\r
-                sum_error += Wcpy[ 11 ] * diff * diff;\r
-                diff = in[ 12 ] - cb_vec[ 12 ];\r
-                sum_error += Wcpy[ 12 ] * diff * diff;\r
-                diff = in[ 13 ] - cb_vec[ 13 ];\r
-                sum_error += Wcpy[ 13 ] * diff * diff;\r
-                diff = in[ 14 ] - cb_vec[ 14 ];\r
-                sum_error += Wcpy[ 14 ] * diff * diff;\r
-                diff = in[ 15 ] - cb_vec[ 15 ];\r
-                sum_error += Wcpy[ 15 ] * diff * diff;\r
+                diff_Q8 = in_NLSF_Q8[ 0 ] - ( SKP_float )cb_vec_NLSF_Q8[ 0 ];\r
+                sum_error_Q16  = Wcpy[ 0 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 1 ] - ( SKP_float )cb_vec_NLSF_Q8[ 1 ];\r
+                sum_error_Q16 += Wcpy[ 1 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 2 ] - ( SKP_float )cb_vec_NLSF_Q8[ 2 ];\r
+                sum_error_Q16 += Wcpy[ 2 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 3 ] - ( SKP_float )cb_vec_NLSF_Q8[ 3 ];\r
+                sum_error_Q16 += Wcpy[ 3 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 4 ] - ( SKP_float )cb_vec_NLSF_Q8[ 4 ];\r
+                sum_error_Q16 += Wcpy[ 4 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 5 ] - ( SKP_float )cb_vec_NLSF_Q8[ 5 ];\r
+                sum_error_Q16 += Wcpy[ 5 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 6 ] - ( SKP_float )cb_vec_NLSF_Q8[ 6 ];\r
+                sum_error_Q16 += Wcpy[ 6 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 7 ] - ( SKP_float )cb_vec_NLSF_Q8[ 7 ];\r
+                sum_error_Q16 += Wcpy[ 7 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 8 ] - ( SKP_float )cb_vec_NLSF_Q8[ 8 ];\r
+                sum_error_Q16 += Wcpy[ 8 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 9 ] - ( SKP_float )cb_vec_NLSF_Q8[ 9 ];\r
+                sum_error_Q16 += Wcpy[ 9 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 10 ] - ( SKP_float )cb_vec_NLSF_Q8[ 10 ];\r
+                sum_error_Q16 += Wcpy[ 10 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 11 ] - ( SKP_float )cb_vec_NLSF_Q8[ 11 ];\r
+                sum_error_Q16 += Wcpy[ 11 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 12 ] - ( SKP_float )cb_vec_NLSF_Q8[ 12 ];\r
+                sum_error_Q16 += Wcpy[ 12 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 13 ] - ( SKP_float )cb_vec_NLSF_Q8[ 13 ];\r
+                sum_error_Q16 += Wcpy[ 13 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 14 ] - ( SKP_float )cb_vec_NLSF_Q8[ 14 ];\r
+                sum_error_Q16 += Wcpy[ 14 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 15 ] - ( SKP_float )cb_vec_NLSF_Q8[ 15 ];\r
+                sum_error_Q16 += Wcpy[ 15 ] * diff_Q8 * diff_Q8;\r
 \r
-                err[ i ] = sum_error;\r
-                cb_vec += 16;\r
+                err[ i ] = ( 1.0f / 65536.0f ) * sum_error_Q16;\r
+                cb_vec_NLSF_Q8 += 16;\r
             }\r
-            err += K;\r
-            in  += 16;\r
+            err        += K;\r
+            in_NLSF_Q8 += 16;\r
         }\r
     } else {\r
         SKP_assert( LPC_order == 10 );\r
@@ -98,35 +98,35 @@ void SKP_Silk_NLSF_VQ_sum_error_FLP(
         /* Loop over input vectors */\r
         for( n = 0; n < N; n++ ) {\r
             /* Loop over codebook */\r
-            cb_vec = pCB;\r
+            cb_vec_NLSF_Q8 = pCB_NLSF_Q8;\r
             for( i = 0; i < K; i++ ) {\r
                 /* Compute weighted squared quantization error */\r
-                diff = in[ 0 ] - cb_vec[ 0 ];\r
-                sum_error  = Wcpy[ 0 ] * diff * diff;\r
-                diff = in[ 1 ] - cb_vec[ 1 ];\r
-                sum_error += Wcpy[ 1 ] * diff * diff;\r
-                diff = in[ 2 ] - cb_vec[ 2 ];\r
-                sum_error += Wcpy[ 2 ] * diff * diff;\r
-                diff = in[ 3 ] - cb_vec[ 3 ];\r
-                sum_error += Wcpy[ 3 ] * diff * diff;\r
-                diff = in[ 4 ] - cb_vec[ 4 ];\r
-                sum_error += Wcpy[ 4 ] * diff * diff;\r
-                diff = in[ 5 ] - cb_vec[ 5 ];\r
-                sum_error += Wcpy[ 5 ] * diff * diff;\r
-                diff = in[ 6 ] - cb_vec[ 6 ];\r
-                sum_error += Wcpy[ 6 ] * diff * diff;\r
-                diff = in[ 7 ] - cb_vec[ 7 ];\r
-                sum_error += Wcpy[ 7 ] * diff * diff;\r
-                diff = in[ 8 ] - cb_vec[ 8 ];\r
-                sum_error += Wcpy[ 8 ] * diff * diff;\r
-                diff = in[ 9 ] - cb_vec[ 9 ];\r
-                sum_error += Wcpy[ 9 ] * diff * diff;\r
+                diff_Q8 = in_NLSF_Q8[ 0 ] - ( SKP_float )cb_vec_NLSF_Q8[ 0 ];\r
+                sum_error_Q16  = Wcpy[ 0 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 1 ] - ( SKP_float )cb_vec_NLSF_Q8[ 1 ];\r
+                sum_error_Q16 += Wcpy[ 1 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 2 ] - ( SKP_float )cb_vec_NLSF_Q8[ 2 ];\r
+                sum_error_Q16 += Wcpy[ 2 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 3 ] - ( SKP_float )cb_vec_NLSF_Q8[ 3 ];\r
+                sum_error_Q16 += Wcpy[ 3 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 4 ] - ( SKP_float )cb_vec_NLSF_Q8[ 4 ];\r
+                sum_error_Q16 += Wcpy[ 4 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 5 ] - ( SKP_float )cb_vec_NLSF_Q8[ 5 ];\r
+                sum_error_Q16 += Wcpy[ 5 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 6 ] - ( SKP_float )cb_vec_NLSF_Q8[ 6 ];\r
+                sum_error_Q16 += Wcpy[ 6 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 7 ] - ( SKP_float )cb_vec_NLSF_Q8[ 7 ];\r
+                sum_error_Q16 += Wcpy[ 7 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 8 ] - ( SKP_float )cb_vec_NLSF_Q8[ 8 ];\r
+                sum_error_Q16 += Wcpy[ 8 ] * diff_Q8 * diff_Q8;\r
+                diff_Q8 = in_NLSF_Q8[ 9 ] - ( SKP_float )cb_vec_NLSF_Q8[ 9 ];\r
+                sum_error_Q16 += Wcpy[ 9 ] * diff_Q8 * diff_Q8;\r
 \r
-                err[ i ] = sum_error;\r
-                cb_vec += 10;\r
+                err[ i ] = ( 1.0f / 65536.0f ) * sum_error_Q16;\r
+                cb_vec_NLSF_Q8 += 10;\r
             }\r
-            err += K;\r
-            in  += 10;\r
+            err        += K;\r
+            in_NLSF_Q8 += 10;\r
         }\r
     }\r
 }\r
diff --git a/src_FLP/SKP_Silk_VQ_nearest_neighbor_FLP.c b/src_FLP/SKP_Silk_VQ_nearest_neighbor_FLP.c
deleted file mode 100644 (file)
index 61b65b3..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/***********************************************************************\r
-Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
-Redistribution and use in source and binary forms, with or without \r
-modification, (subject to the limitations in the disclaimer below) \r
-are permitted provided that the following conditions are met:\r
-- Redistributions of source code must retain the above copyright notice,\r
-this list of conditions and the following disclaimer.\r
-- Redistributions in binary form must reproduce the above copyright \r
-notice, this list of conditions and the following disclaimer in the \r
-documentation and/or other materials provided with the distribution.\r
-- Neither the name of Skype Limited, nor the names of specific \r
-contributors, may be used to endorse or promote products derived from \r
-this software without specific prior written permission.\r
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
-BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
-CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-***********************************************************************/\r
-\r
-#include "SKP_Silk_main_FLP.h"\r
-\r
-#define Q14_CONVERSION_FAC                              6.1035e-005f // 1 / 2^14\r
-\r
-/* entropy constrained MATRIX-weighted VQ, for a single input data vector */\r
-void SKP_Silk_VQ_WMat_EC_FLP(\r
-          SKP_int                   *ind,               /* O    Index of best codebook vector           */\r
-          SKP_float                 *rate_dist,         /* O    Best weighted quant. error + mu * rate  */\r
-    const SKP_float                 *in,                /* I    Input vector to be quantized            */\r
-    const SKP_float                 *W,                 /* I    Weighting matrix                        */\r
-    const SKP_int16                 *cb,                /* I    Codebook                                */\r
-    const SKP_int16                 *cl_Q6,             /* I    Code length for each codebook vector    */\r
-    const SKP_float                 mu,                 /* I    Tradeoff between WSSE and rate          */\r
-    const SKP_int                   L                   /* I    Number of vectors in codebook           */\r
-)\r
-{\r
-    SKP_int   k;\r
-    SKP_float sum1;\r
-    SKP_float diff[ 5 ];\r
-    const SKP_int16 *cb_row;\r
-\r
-    /* Loop over codebook */\r
-    *rate_dist = SKP_float_MAX;\r
-    cb_row = cb;\r
-    for( k = 0; k < L; k++ ) {\r
-        /* Calc difference between in vector and cbk vector */\r
-        diff[ 0 ] = in[ 0 ] - ( SKP_float )cb_row[ 0 ] * Q14_CONVERSION_FAC;\r
-        diff[ 1 ] = in[ 1 ] - ( SKP_float )cb_row[ 1 ] * Q14_CONVERSION_FAC;\r
-        diff[ 2 ] = in[ 2 ] - ( SKP_float )cb_row[ 2 ] * Q14_CONVERSION_FAC;\r
-        diff[ 3 ] = in[ 3 ] - ( SKP_float )cb_row[ 3 ] * Q14_CONVERSION_FAC;\r
-        diff[ 4 ] = in[ 4 ] - ( SKP_float )cb_row[ 4 ] * Q14_CONVERSION_FAC;\r
-\r
-        /* Weighted rate */\r
-        sum1 = mu * cl_Q6[ k ] / 64.0f;\r
-\r
-        /* Add weighted quantization error, assuming W is symmetric */\r
-        /* first row of W */\r
-        sum1 += diff[ 0 ] * ( W[ 0 ] * diff[ 0 ] + \r
-                     2.0f * ( W[ 1 ] * diff[ 1 ] + \r
-                              W[ 2 ] * diff[ 2 ] + \r
-                              W[ 3 ] * diff[ 3 ] + \r
-                              W[ 4 ] * diff[ 4 ] ) );\r
-\r
-        /* second row of W */\r
-        sum1 += diff[ 1 ] * ( W[ 6 ] * diff[ 1 ] + \r
-                     2.0f * ( W[ 7 ] * diff[ 2 ] + \r
-                              W[ 8 ] * diff[ 3 ] + \r
-                              W[ 9 ] * diff[ 4 ] ) );\r
-\r
-        /* third row of W */\r
-        sum1 += diff[ 2 ] * ( W[ 12 ] * diff[ 2 ] + \r
-                    2.0f *  ( W[ 13 ] * diff[ 3 ] + \r
-                              W[ 14 ] * diff[ 4 ] ) );\r
-\r
-        /* fourth row of W */\r
-        sum1 += diff[ 3 ] * ( W[ 18 ] * diff[ 3 ] + \r
-                     2.0f * ( W[ 19 ] * diff[ 4 ] ) );\r
-\r
-        /* last row of W */\r
-        sum1 += diff[ 4 ] * ( W[ 24 ] * diff[ 4 ] );\r
-\r
-        /* find best */\r
-        if( sum1 < *rate_dist ) {\r
-            *rate_dist = sum1;\r
-            *ind = k;\r
-        }\r
-\r
-        /* Go to next cbk vector */\r
-        cb_row += LTP_ORDER;\r
-    }\r
-}\r
index dd0e4d6..e8dff23 100644 (file)
@@ -33,11 +33,6 @@ SKP_INLINE SKP_int SKP_Silk_setup_resamplers(
     SKP_int                         fs_kHz              /* I    Internal sampling rate (kHz)            */\r
 );\r
 \r
-SKP_INLINE SKP_int SKP_Silk_setup_packetsize(\r
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Pointer to Silk encoder state FLP       */\r
-    SKP_int                         PacketSize_ms       /* I    Packet length (ms)                      */\r
-);\r
-\r
 SKP_INLINE SKP_int SKP_Silk_setup_fs(\r
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */\r
     SKP_int                         fs_kHz,             /* I                        */\r
@@ -140,40 +135,6 @@ void SKP_Silk_LBRR_ctrl_FLP(
     }\r
 }\r
 \r
-SKP_INLINE SKP_int SKP_Silk_setup_packetsize(\r
-    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O                      */\r
-    SKP_int                         PacketSize_ms       /* I                        */\r
-)\r
-{\r
-    SKP_int ret = SKP_SILK_NO_ERROR;\r
-    if( ( PacketSize_ms !=  10 ) &&\r
-        ( PacketSize_ms !=  20 ) &&\r
-        ( PacketSize_ms !=  40 ) && \r
-        ( PacketSize_ms !=  60 ) ) {\r
-        ret = SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;\r
-    } else {\r
-        if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) {\r
-            if( PacketSize_ms == 10 ) {\r
-                /* Only allowed when the payload buffer is empty */\r
-                psEnc->sCmn.nb_subfr = MAX_NB_SUBFR >> 1;\r
-                psEnc->sCmn.PacketSize_ms = PacketSize_ms;\r
-                psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, psEnc->sCmn.fs_kHz );\r
-                /* Packet length changes. Reset LBRR buffer */\r
-                SKP_Silk_LBRR_reset( &psEnc->sCmn );\r
-            } else{\r
-                psEnc->sCmn.nb_subfr = MAX_NB_SUBFR;\r
-                psEnc->sCmn.PacketSize_ms = PacketSize_ms;\r
-                psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, psEnc->sCmn.fs_kHz );\r
-                /* Packet length changes. Reset LBRR buffer */\r
-                SKP_Silk_LBRR_reset( &psEnc->sCmn );\r
-            }\r
-        }\r
-        psEnc->sCmn.frame_length = SKP_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );\r
-    }\r
-\r
-    return(ret);\r
-}\r
-\r
 SKP_INLINE SKP_int SKP_Silk_setup_resamplers(\r
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Pointer to Silk encoder state FLP       */\r
     SKP_int                         fs_kHz              /* I    External (API) sampling rate (Hz)       */\r
@@ -238,16 +199,37 @@ SKP_INLINE SKP_int SKP_Silk_setup_fs(
 {\r
     SKP_int ret = SKP_SILK_NO_ERROR;\r
 \r
+    /* Set packet size */\r
+    if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) {\r
+        if( ( PacketSize_ms !=  10 ) &&\r
+            ( PacketSize_ms !=  20 ) &&\r
+            ( PacketSize_ms !=  40 ) && \r
+            ( PacketSize_ms !=  60 ) ) {\r
+            ret = SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;\r
+        }\r
+        if( PacketSize_ms == 10 ) {\r
+            /* Only allowed when the payload buffer is empty */\r
+            psEnc->sCmn.nb_subfr = MAX_NB_SUBFR >> 1;\r
+            psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz );\r
+        } else {\r
+            psEnc->sCmn.nb_subfr = MAX_NB_SUBFR;\r
+            psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz );\r
+        }\r
+        /* Packet length changes. Reset LBRR buffer */\r
+        SKP_Silk_LBRR_reset( &psEnc->sCmn );\r
+        psEnc->sCmn.PacketSize_ms = PacketSize_ms;\r
+    }\r
+\r
     /* Set internal sampling frequency */\r
     if( psEnc->sCmn.fs_kHz != fs_kHz ) {\r
         /* reset part of the state */\r
-        SKP_memset( &psEnc->sShape,          0,                            sizeof( SKP_Silk_shape_state_FLP ) );\r
-        SKP_memset( &psEnc->sPrefilt,        0,                            sizeof( SKP_Silk_prefilter_state_FLP ) );\r
-        SKP_memset( &psEnc->sNSQ,            0,                            sizeof( SKP_Silk_nsq_state ) );\r
-        SKP_memset( &psEnc->sPred,           0,                            sizeof( SKP_Silk_predict_state_FLP ) );\r
-        SKP_memset( psEnc->sNSQ.xq,          0, ( 2 * MAX_FRAME_LENGTH ) * sizeof( SKP_int16 ) );\r
-        SKP_memset( psEnc->sNSQ_LBRR.xq,     0, ( 2 * MAX_FRAME_LENGTH ) * sizeof( SKP_int16 ) );\r
-        SKP_memset( psEnc->sCmn.LBRR_buffer, 0,           MAX_LBRR_DELAY * sizeof( SKP_SILK_LBRR_struct ) );\r
+        SKP_memset( &psEnc->sShape,          0,                        sizeof( SKP_Silk_shape_state_FLP ) );\r
+        SKP_memset( &psEnc->sPrefilt,        0,                        sizeof( SKP_Silk_prefilter_state_FLP ) );\r
+        SKP_memset( &psEnc->sNSQ,            0,                        sizeof( SKP_Silk_nsq_state ) );\r
+        SKP_memset( &psEnc->sPred,           0,                        sizeof( SKP_Silk_predict_state_FLP ) );\r
+        SKP_memset( psEnc->sNSQ.xq,          0, 2 * MAX_FRAME_LENGTH * sizeof( SKP_int16 ) );\r
+        SKP_memset( psEnc->sNSQ_LBRR.xq,     0, 2 * MAX_FRAME_LENGTH * sizeof( SKP_int16 ) );\r
+        SKP_memset( psEnc->sCmn.LBRR_buffer, 0,       MAX_LBRR_DELAY * sizeof( SKP_SILK_LBRR_struct ) );\r
 #if SWITCH_TRANSITION_FILTERING\r
         SKP_memset( psEnc->sCmn.sLP.In_LP_State, 0, 2 * sizeof( SKP_int32 ) );\r
         if( psEnc->sCmn.sLP.mode == 1 ) {\r
@@ -281,50 +263,68 @@ SKP_INLINE SKP_int SKP_Silk_setup_fs(
             psEnc->sCmn.predictLPCOrder = MIN_LPC_ORDER;\r
             psEnc->sCmn.psNLSF_CB[ 0 ]  = &SKP_Silk_NLSF_CB0_10;\r
             psEnc->sCmn.psNLSF_CB[ 1 ]  = &SKP_Silk_NLSF_CB1_10;\r
-            psEnc->psNLSF_CB_FLP[  0 ]  = &SKP_Silk_NLSF_CB0_10_FLP;\r
-            psEnc->psNLSF_CB_FLP[  1 ]  = &SKP_Silk_NLSF_CB1_10_FLP;\r
+            if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ){\r
+                psEnc->sCmn.pitch_contour_iCDF = SKP_Silk_pitch_contour_NB_iCDF; \r
+            } else if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR / 2 ){\r
+                psEnc->sCmn.pitch_contour_iCDF = SKP_Silk_pitch_contour_10_ms_NB_iCDF;\r
+            } else {\r
+                /* Unsupported number of frames */\r
+                SKP_assert( 0 );\r
+            }\r
         } else {\r
             psEnc->sCmn.predictLPCOrder = MAX_LPC_ORDER;\r
             psEnc->sCmn.psNLSF_CB[ 0 ]  = &SKP_Silk_NLSF_CB0_16;\r
             psEnc->sCmn.psNLSF_CB[ 1 ]  = &SKP_Silk_NLSF_CB1_16;\r
-            psEnc->psNLSF_CB_FLP[  0 ]  = &SKP_Silk_NLSF_CB0_16_FLP;\r
-            psEnc->psNLSF_CB_FLP[  1 ]  = &SKP_Silk_NLSF_CB1_16_FLP;\r
+            if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ){\r
+                psEnc->sCmn.pitch_contour_iCDF = SKP_Silk_pitch_contour_iCDF; \r
+            } else if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR / 2 ){\r
+                psEnc->sCmn.pitch_contour_iCDF = SKP_Silk_pitch_contour_10_ms_iCDF;\r
+            } else {\r
+                /* Unsupported number of frames */\r
+                SKP_assert( 0 );\r
+            }\r
         }\r
         psEnc->sCmn.subfr_length   = SUB_FRAME_LENGTH_MS * fs_kHz;\r
+        psEnc->sCmn.frame_length   = psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr;\r
         psEnc->sCmn.ltp_mem_length = LTP_MEM_LENGTH_MS * fs_kHz; \r
         psEnc->sCmn.la_pitch       = LA_PITCH_MS * fs_kHz;\r
         psEnc->sPred.min_pitch_lag =  3 * fs_kHz;\r
         psEnc->sPred.max_pitch_lag = 18 * fs_kHz;\r
         if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ){\r
             psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz );\r
-        } else {\r
+        } else if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR / 2 ){\r
             psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz );\r
+        } else {\r
+            /* Unsupported number of frames */\r
+            SKP_assert( 0 );\r
         }\r
         if( psEnc->sCmn.fs_kHz == 24 ) {\r
-            psEnc->mu_LTP = MU_LTP_QUANT_SWB;\r
-            psEnc->sCmn.bitrate_threshold_up   = SKP_int32_MAX;\r
-            psEnc->sCmn.bitrate_threshold_down = SWB2WB_BITRATE_BPS; \r
+            psEnc->sCmn.mu_LTP_Q10 = SKP_FIX_CONST( MU_LTP_QUANT_SWB, 10 );\r
+            psEnc->sCmn.bitrate_threshold_up    = SKP_int32_MAX;\r
+            psEnc->sCmn.bitrate_threshold_down  = SWB2WB_BITRATE_BPS; \r
+            psEnc->sCmn.pitch_lag_low_bits_iCDF = SKP_Silk_uniform12_iCDF;\r
         } else if( psEnc->sCmn.fs_kHz == 16 ) {\r
-            psEnc->mu_LTP = MU_LTP_QUANT_WB;\r
-            psEnc->sCmn.bitrate_threshold_up   = WB2SWB_BITRATE_BPS;\r
-            psEnc->sCmn.bitrate_threshold_down = WB2MB_BITRATE_BPS; \r
+            psEnc->sCmn.mu_LTP_Q10 = SKP_FIX_CONST( MU_LTP_QUANT_WB, 10 );\r
+            psEnc->sCmn.bitrate_threshold_up    = WB2SWB_BITRATE_BPS;\r
+            psEnc->sCmn.bitrate_threshold_down  = WB2MB_BITRATE_BPS; \r
+            psEnc->sCmn.pitch_lag_low_bits_iCDF = SKP_Silk_uniform8_iCDF;\r
         } else if( psEnc->sCmn.fs_kHz == 12 ) {\r
-            psEnc->mu_LTP = MU_LTP_QUANT_MB;\r
-            psEnc->sCmn.bitrate_threshold_up   = MB2WB_BITRATE_BPS;\r
-            psEnc->sCmn.bitrate_threshold_down = MB2NB_BITRATE_BPS;\r
+            psEnc->sCmn.mu_LTP_Q10 = SKP_FIX_CONST( MU_LTP_QUANT_MB, 10 );\r
+            psEnc->sCmn.bitrate_threshold_up    = MB2WB_BITRATE_BPS;\r
+            psEnc->sCmn.bitrate_threshold_down  = MB2NB_BITRATE_BPS;\r
+            psEnc->sCmn.pitch_lag_low_bits_iCDF = SKP_Silk_uniform6_iCDF;\r
+        } else if( psEnc->sCmn.fs_kHz == 8 ) {\r
+            psEnc->sCmn.mu_LTP_Q10 = SKP_FIX_CONST( MU_LTP_QUANT_NB, 10 );\r
+            psEnc->sCmn.bitrate_threshold_up    = NB2MB_BITRATE_BPS;\r
+            psEnc->sCmn.bitrate_threshold_down  = 0;\r
+            psEnc->sCmn.pitch_lag_low_bits_iCDF = SKP_Silk_uniform4_iCDF;\r
         } else {\r
-            psEnc->mu_LTP = MU_LTP_QUANT_NB;\r
-            psEnc->sCmn.bitrate_threshold_up   = NB2MB_BITRATE_BPS;\r
-            psEnc->sCmn.bitrate_threshold_down = 0;\r
+            /* unsupported sampling rate */\r
+            SKP_assert( 0 );\r
         }\r
         psEnc->sCmn.fs_kHz_changed = 1;\r
     }\r
 \r
-    /********************************************/\r
-    /* Set packet size                          */\r
-    /********************************************/\r
-    ret += SKP_Silk_setup_packetsize( psEnc, PacketSize_ms );\r
-\r
     /* Check that settings are valid */\r
     SKP_assert( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length );\r
  \r
@@ -338,7 +338,7 @@ SKP_INLINE SKP_int SKP_Silk_setup_rate(
 {\r
     SKP_int k, ret = SKP_SILK_NO_ERROR;\r
     SKP_float frac;\r
-    const SKP_int32 *rateTable;\r
+    const SKP_uint16 *rateTable;\r
 \r
     /* Set bitrate/coding quality */\r
     if( TargetRate_bps != psEnc->sCmn.TargetRate_bps ) {\r
diff --git a/src_FLP/SKP_Silk_define_FLP.h b/src_FLP/SKP_Silk_define_FLP.h
deleted file mode 100644 (file)
index e518430..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/***********************************************************************\r
-Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
-Redistribution and use in source and binary forms, with or without \r
-modification, (subject to the limitations in the disclaimer below) \r
-are permitted provided that the following conditions are met:\r
-- Redistributions of source code must retain the above copyright notice,\r
-this list of conditions and the following disclaimer.\r
-- Redistributions in binary form must reproduce the above copyright \r
-notice, this list of conditions and the following disclaimer in the \r
-documentation and/or other materials provided with the distribution.\r
-- Neither the name of Skype Limited, nor the names of specific \r
-contributors, may be used to endorse or promote products derived from \r
-this software without specific prior written permission.\r
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
-BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
-CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-***********************************************************************/\r
-\r
-#ifndef SKP_SILK_DEFINE_FLP_H\r
-#define SKP_SILK_DEFINE_FLP_H\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif\r
-\r
-/*******************/\r
-/* Pitch estimator */\r
-/*******************/\r
-\r
-/* Level of noise floor for whitening filter LPC analysis in pitch analysis */\r
-#define FIND_PITCH_WHITE_NOISE_FRACTION                 1e-3f\r
-\r
-/* Bandwidth expansion for whitening filter in pitch analysis */\r
-#define FIND_PITCH_BANDWITH_EXPANSION                   0.99f\r
-\r
-/* Threshold used by pitch estimator for early escape */\r
-#define FIND_PITCH_CORRELATION_THRESHOLD_HC_MODE        0.7f\r
-#define FIND_PITCH_CORRELATION_THRESHOLD_MC_MODE        0.75f\r
-#define FIND_PITCH_CORRELATION_THRESHOLD_LC_MODE        0.8f\r
-\r
-/***********************/\r
-/* Long-Term predictor */\r
-/***********************/\r
-\r
-/* Regualarization factor for correlation matrix. Equivalent to adding noise at -50 dB */\r
-#define FIND_LTP_COND_FAC                               1e-5f\r
-#define FIND_LPC_COND_FAC                               6e-5f\r
-\r
-/* Find prediction coefficients defines */\r
-#define LTP_DAMPING                                     0.001f\r
-#define LTP_SMOOTHING                                   0.1f\r
-\r
-/* LTP quantization settings */\r
-#define MU_LTP_QUANT_NB                                 0.03f\r
-#define MU_LTP_QUANT_MB                                 0.025f\r
-#define MU_LTP_QUANT_WB                                 0.02f\r
-#define MU_LTP_QUANT_SWB                                0.016f\r
-\r
-/***********************/\r
-/* High pass filtering */\r
-/***********************/\r
-\r
-/* Smoothing parameters for low end of pitch frequency range estimation */\r
-#define VARIABLE_HP_SMTH_COEF1                          0.1f\r
-#define VARIABLE_HP_SMTH_COEF2                          0.015f\r
-\r
-/* Min and max values for low end of pitch frequency range estimation */\r
-#define VARIABLE_HP_MIN_FREQ                            80.0f\r
-#define VARIABLE_HP_MAX_FREQ                            150.0f\r
-\r
-/* Max absolute difference between log2 of pitch frequency and smoother state, to enter the smoother */\r
-#define VARIABLE_HP_MAX_DELTA_FREQ                      0.4f\r
-\r
-/***********/\r
-/* Various */\r
-/***********/\r
-\r
-/* Required speech activity for counting frame as active */\r
-#define WB_DETECT_ACTIVE_SPEECH_LEVEL_THRES             0.7f        \r
-\r
-#define SPEECH_ACTIVITY_DTX_THRES                       0.1f\r
-\r
-/* Speech Activity LBRR enable threshold (needs tuning) */\r
-#define LBRR_SPEECH_ACTIVITY_THRES                      0.5f        \r
-\r
-#define Q14_CONVERSION_FAC                              6.1035e-005f // 1 / 2^14\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
index 664b037..9ea62eb 100644 (file)
@@ -52,8 +52,6 @@ SKP_int SKP_Silk_encode_frame_FLP(
     SKP_uint8   LBRRpayload[ MAX_ARITHM_BYTES ];\r
     SKP_int16   nBytesLBRR;\r
 \r
-    const SKP_uint16 *FrameTermination_CDF;\r
-\r
 TIC(ENCODE_FRAME)\r
 \r
     sEncCtrl.sCmn.Seed = psEnc->sCmn.frameCounter++ & 3;\r
@@ -125,7 +123,7 @@ TOC(PREFILTER)
     /* Find linear prediction coefficients (LPC + LTP) */\r
     /***************************************************/\r
 TIC(FIND_PRED_COEF)\r
-    SKP_Silk_find_pred_coefs_FLP( psEnc, &sEncCtrl, res_pitch );\r
+    SKP_Silk_find_pred_coefs_FLP( psEnc, &sEncCtrl, res_pitch, x_frame );\r
 TOC(FIND_PRED_COEF)\r
 \r
     /****************************************/\r
@@ -183,7 +181,6 @@ TOC(NSQ)
     /****************************************/\r
 TIC(ENCODE_PARAMS)\r
     SKP_Silk_encode_parameters( &psEnc->sCmn, &sEncCtrl.sCmn, psRangeEnc );\r
-    FrameTermination_CDF = SKP_Silk_FrameTermination_CDF;\r
 TOC(ENCODE_PARAMS)\r
 \r
     /****************************************/\r
@@ -217,8 +214,7 @@ TOC(ENCODE_PARAMS)
         frame_terminator = SKP_SILK_NO_LBRR;\r
 \r
         /* Add the frame termination info to stream */\r
-        ec_encode_bin( psRangeEnc, FrameTermination_CDF[ frame_terminator ], \r
-            FrameTermination_CDF[ frame_terminator + 1 ], 16 );\r
+        ec_enc_icdf( psRangeEnc, frame_terminator, SKP_Silk_FrameTermination_iCDF, 8 );\r
 \r
         /* Code excitation signal */\r
         for( i = 0; i < psEnc->sCmn.nFramesInPayloadBuf; i++ ) {\r
@@ -304,16 +300,15 @@ TOC(ENCODE_PARAMS)
 \r
 TOC(ENCODE_FRAME)\r
 #ifdef SAVE_ALL_INTERNAL_DATA\r
-    DEBUG_STORE_DATA( xf.dat,                   pIn_HP_LP,                           psEnc->sCmn.frame_length * sizeof( SKP_int16 ) );\r
-    DEBUG_STORE_DATA( xfw.dat,                  xfw,                                 psEnc->sCmn.frame_length * sizeof( SKP_float ) );\r
-//  DEBUG_STORE_DATA( q.dat,                    q,                                   psEnc->sCmn.frame_length * sizeof( SKP_int   ) );\r
+    //DEBUG_STORE_DATA( xf.dat,                   pIn_HP_LP,                           psEnc->sCmn.frame_length * sizeof( SKP_int16 ) );\r
+    //DEBUG_STORE_DATA( xfw.dat,                  xfw,                                 psEnc->sCmn.frame_length * sizeof( SKP_float ) );\r
     DEBUG_STORE_DATA( pitchL.dat,               sEncCtrl.sCmn.pitchL,                            MAX_NB_SUBFR * sizeof( SKP_int   ) );\r
     DEBUG_STORE_DATA( pitchG_quantized.dat,     sEncCtrl.LTPCoef,            psEnc->sCmn.nb_subfr * LTP_ORDER * sizeof( SKP_float ) );\r
     DEBUG_STORE_DATA( pitch_freq_low_Hz.dat,    &sEncCtrl.pitch_freq_low_Hz,                                    sizeof( SKP_float ) );\r
     DEBUG_STORE_DATA( LTPcorr.dat,              &psEnc->LTPCorr,                                                sizeof( SKP_float ) );\r
     DEBUG_STORE_DATA( tilt.dat,                 &sEncCtrl.input_tilt,                                           sizeof( SKP_float ) );\r
     DEBUG_STORE_DATA( gains.dat,                sEncCtrl.Gains,                          psEnc->sCmn.nb_subfr * sizeof( SKP_float ) );\r
-//    DEBUG_STORE_DATA( gains_indices.dat,        sEncCtrl.sCmn.GainsIndices, MAX_LAYERS * psEnc->sCmn.nb_subfr * sizeof( SKP_int   ) );\r
+    DEBUG_STORE_DATA( gains_indices.dat,        &sEncCtrl.sCmn.GainsIndices,             psEnc->sCmn.nb_subfr * sizeof( SKP_int   ) );\r
     DEBUG_STORE_DATA( nBytes.dat,               &nBytes,                                                        sizeof( SKP_int   ) );\r
     DEBUG_STORE_DATA( current_SNR_db.dat,       &sEncCtrl.current_SNR_dB,                                       sizeof( SKP_float ) );\r
     DEBUG_STORE_DATA( QuantOffsetType.dat,      &sEncCtrl.sCmn.QuantOffsetType,                                 sizeof( SKP_int   ) );\r
index ad9d775..46856b7 100644 (file)
@@ -81,7 +81,7 @@ void SKP_Silk_find_pitch_lags_FLP(
     SKP_Silk_autocorrelation_FLP( auto_corr, Wsig, psPredSt->pitch_LPC_win_length, psEnc->sCmn.pitchEstimationLPCOrder + 1 );\r
 \r
     /* Add white noise, as a fraction of the energy */\r
-    auto_corr[ 0 ] += auto_corr[ 0 ] * FIND_PITCH_WHITE_NOISE_FRACTION;\r
+    auto_corr[ 0 ] += auto_corr[ 0 ] * FIND_PITCH_WHITE_NOISE_FRACTION + 1;\r
 \r
     /* Calculate the reflection coefficients using Schur */\r
     res_nrg = SKP_Silk_schur_FLP( refl_coef, auto_corr, psEnc->sCmn.pitchEstimationLPCOrder );\r
index 9553f0c..1efd8dc 100644 (file)
@@ -29,9 +29,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 \r
 \r
 void SKP_Silk_find_pred_coefs_FLP(\r
-    SKP_Silk_encoder_state_FLP      *psEnc,         /* I/O  Encoder state FLP               */\r
-    SKP_Silk_encoder_control_FLP    *psEncCtrl,     /* I/O  Encoder control FLP             */\r
-    const SKP_float                 res_pitch[]     /* I    Residual from pitch analysis    */\r
+    SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */\r
+    SKP_Silk_encoder_control_FLP    *psEncCtrl,         /* I/O  Encoder control FLP                     */\r
+    const SKP_float                 res_pitch[],        /* I    Residual from pitch analysis            */\r
+    const SKP_float                 x[]                 /* I    Speech signal                           */\r
 )\r
 {\r
     SKP_int         i;\r
@@ -60,9 +61,14 @@ void SKP_Silk_find_pred_coefs_FLP(
             psEncCtrl->sCmn.pitchL, Wght, psEnc->sCmn.subfr_length,\r
             psEnc->sCmn.nb_subfr, psEnc->sCmn.ltp_mem_length );\r
 \r
+#ifdef SAVE_ALL_INTERNAL_DATA\r
+               DEBUG_STORE_DATA( ltp_gains.dat, psEncCtrl->LTPCoef, sizeof( psEncCtrl->LTPCoef ) );\r
+               DEBUG_STORE_DATA( ltp_weights.dat, WLTP, sizeof( WLTP ) );\r
+#endif\r
+\r
         /* Quantize LTP gain parameters */\r
         SKP_Silk_quant_LTP_gains_FLP( psEncCtrl->LTPCoef, psEncCtrl->sCmn.LTPIndex, &psEncCtrl->sCmn.PERIndex, \r
-            WLTP, psEnc->mu_LTP, psEnc->sCmn.LTPQuantLowComplexity , psEnc->sCmn.nb_subfr );\r
+            WLTP, psEnc->sCmn.mu_LTP_Q10, psEnc->sCmn.LTPQuantLowComplexity , psEnc->sCmn.nb_subfr );\r
 \r
         /* Control LTP scaling */\r
         SKP_Silk_LTP_scale_ctrl_FLP( psEnc, psEncCtrl );\r
@@ -76,7 +82,7 @@ void SKP_Silk_find_pred_coefs_FLP(
         /* UNVOICED */\r
         /************/\r
         /* Create signal with prepended subframes, scaled by inverse gains */\r
-        x_ptr     = psEnc->x_buf + psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder;\r
+        x_ptr     = x - psEnc->sCmn.predictLPCOrder;\r
         x_pre_ptr = LPC_in_pre;\r
         for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) {\r
             SKP_Silk_scale_copy_vector_FLP( x_pre_ptr, x_ptr, invGains[ i ], \r
@@ -104,7 +110,5 @@ void SKP_Silk_find_pred_coefs_FLP(
 \r
     /* Copy to prediction struct for use in next frame for fluctuation reduction */\r
     SKP_memcpy( psEnc->sPred.prev_NLSFq, NLSF, psEnc->sCmn.predictLPCOrder * sizeof( SKP_float ) );\r
-\r
-\r
 }\r
 \r
index 75e0a16..8b18c1f 100644 (file)
@@ -31,7 +31,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "SKP_Silk_SigProc_FLP.h"\r
 #include "SKP_Silk_SigProc_FIX.h"\r
 #include "SKP_Silk_structs_FLP.h"\r
-#include "SKP_Silk_tables_FLP.h"\r
 #include "SKP_Silk_main.h"\r
 #include "SKP_Silk_define.h"\r
 #include "SKP_debug.h"\r
@@ -146,7 +145,8 @@ void SKP_Silk_find_pitch_lags_FLP(
 void SKP_Silk_find_pred_coefs_FLP(\r
     SKP_Silk_encoder_state_FLP      *psEnc,             /* I/O  Encoder state FLP                       */\r
     SKP_Silk_encoder_control_FLP    *psEncCtrl,         /* I/O  Encoder control FLP                     */\r
-    const SKP_float                 res_pitch[]         /* I    Residual from pitch analysis            */\r
+    const SKP_float                 res_pitch[],        /* I    Residual from pitch analysis            */\r
+    const SKP_float                 x[]                 /* I    Speech signal                           */\r
 );\r
 \r
 /* LPC analysis */\r
@@ -248,13 +248,13 @@ void SKP_Silk_LPC_analysis_filter6_FLP(
 \r
 /* LTP tap quantizer */\r
 void SKP_Silk_quant_LTP_gains_FLP(\r
-          SKP_float B[ MAX_NB_SUBFR * LTP_ORDER ],          /* I/O  (Un-)quantized LTP gains                */\r
-          SKP_int   cbk_index[ MAX_NB_SUBFR ],              /* O    Codebook index                          */\r
-          SKP_int   *periodicity_index,                     /* O    Periodicity index                       */\r
-    const SKP_float W[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ],  /* I    Error weights                           */\r
-    const SKP_float mu,                                     /* I    Mu value (R/D tradeoff)                 */\r
-    const SKP_int   lowComplexity,                          /* I    Flag for low complexity                 */\r
-    const SKP_int   nb_subfr                                /* I    number of subframes                     */\r
+          SKP_float B[ MAX_NB_SUBFR * LTP_ORDER ],              /* I/O  (Un-)quantized LTP gains                */\r
+          SKP_int   cbk_index[ MAX_NB_SUBFR ],                  /* O    Codebook index                          */\r
+          SKP_int   *periodicity_index,                         /* O    Periodicity index                       */\r
+    const SKP_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ],  /* I    Error weights                           */\r
+    const SKP_int   mu_Q10,                                     /* I    Mu value (R/D tradeoff)     */\r
+    const SKP_int   lowComplexity,                              /* I    Flag for low complexity                 */\r
+    const SKP_int   nb_subfr                                    /* I    number of subframes                     */\r
 );\r
 \r
 /******************/\r
@@ -271,7 +271,7 @@ void SKP_Silk_process_NLSFs_FLP(
 void SKP_Silk_NLSF_MSVQ_encode_FLP(\r
           SKP_int                   *NLSFIndices,       /* O    Codebook path vector [ CB_STAGES ]      */\r
           SKP_float                 *pNLSF,             /* I/O  Quantized NLSF vector [ LPC_ORDER ]     */\r
-    const SKP_Silk_NLSF_CB_FLP      *psNLSF_CB_FLP,     /* I    Codebook object                         */\r
+    const SKP_Silk_NLSF_CB_struct   *psNLSF_CB,         /* I    Codebook object                         */\r
     const SKP_float                 *pNLSF_q_prev,      /* I    Prev. quantized NLSF vector [LPC_ORDER] */\r
     const SKP_float                 *pW,                /* I    NLSF weight vector [ LPC_ORDER ]        */\r
     const SKP_float                 NLSF_mu,            /* I    Rate weight for the RD optimization     */\r
@@ -284,7 +284,7 @@ void SKP_Silk_NLSF_MSVQ_encode_FLP(
 /* Rate-Distortion calculations for multiple input data vectors */\r
 void SKP_Silk_NLSF_VQ_rate_distortion_FLP(\r
           SKP_float             *pRD,               /* O   Rate-distortion values [psNLSF_CBS_FLP->nVectors*N] */\r
-    const SKP_Silk_NLSF_CBS_FLP *psNLSF_CBS_FLP,    /* I   NLSF codebook stage struct                          */\r
+    const SKP_Silk_NLSF_CBS     *psNLSF_CBS,        /* I   NLSF codebook stage struct                          */\r
     const SKP_float             *in,                /* I   Input vectors to be quantized                       */\r
     const SKP_float             *w,                 /* I   Weight vector                                       */\r
     const SKP_float             *rate_acc,          /* I   Accumulated rates from previous stage               */\r
@@ -298,7 +298,7 @@ void SKP_Silk_NLSF_VQ_sum_error_FLP(
           SKP_float                 *err,               /* O    Weighted quantization errors [ N * K ]  */\r
     const SKP_float                 *in,                /* I    Input vectors [ N * LPC_order ]         */\r
     const SKP_float                 *w,                 /* I    Weighting vectors [ N * LPC_order ]     */\r
-    const SKP_float                 *pCB,               /* I    Codebook vectors [ K * LPC_order ]      */\r
+    const SKP_int8                  *pCB_NLSF_Q8,       /* I    Codebook vectors [ K * LPC_order ]      */\r
     const SKP_int                   N,                  /* I    Number of input vectors                 */\r
     const SKP_int                   K,                  /* I    Number of codebook vectors              */\r
     const SKP_int                   LPC_order           /* I    LPC order                               */\r
@@ -307,7 +307,7 @@ void SKP_Silk_NLSF_VQ_sum_error_FLP(
 /* NLSF vector decoder */\r
 void SKP_Silk_NLSF_MSVQ_decode_FLP(\r
           SKP_float                 *pNLSF,             /* O    Decoded output vector [ LPC_ORDER ]     */\r
-    const SKP_Silk_NLSF_CB_FLP      *psNLSF_CB_FLP,     /* I    NLSF codebook struct                    */  \r
+    const SKP_Silk_NLSF_CB_struct   *psNLSF_CB,         /* I    NLSF codebook struct                    */  \r
     const SKP_int                   *NLSFIndices,       /* I    NLSF indices [ nStages ]                */\r
     const SKP_int                   LPC_order           /* I    LPC order used                          */\r
 );\r
@@ -404,8 +404,8 @@ void SKP_Silk_NLSF2A_stable_FLP(
 \r
 /* NLSF stabilizer, for a single input data vector */\r
 void SKP_Silk_NLSF_stabilize_FLP(\r
-          SKP_float                 *pNLSF,             /* I/O  (Un)stable NLSF vector [ LPC_order ]    */\r
-    const SKP_float                 *pNDelta_min,       /* I    Normalized delta min vector[LPC_order+1]*/\r
+          SKP_float                 *pNLSF,            /* I/O  (Un)stable NLSF vector [ LPC_order ]    */\r
+    const SKP_int                   *pNDelta_min_Q15,   /* I    Normalized delta min vector[LPC_order+1]*/\r
     const SKP_int                   LPC_order           /* I    LPC order                               */\r
 );\r
 \r
index 316aa9d..6cca1f4 100644 (file)
@@ -142,7 +142,12 @@ void SKP_Silk_noise_shape_analysis_FLP(
     /* CONTROL SNR  */\r
     /****************/\r
     /* Reduce SNR_dB values if recent bitstream has exceeded TargetRate */\r
-    psEncCtrl->current_SNR_dB = psEnc->SNR_dB - 0.05f * psEnc->BufferedInChannel_ms;\r
+    psEncCtrl->current_SNR_dB = psEnc->SNR_dB - 0.1f * psEnc->BufferedInChannel_ms;\r
+\r
+    /* Reduce SNR for 10 ms frames */\r
+    if( psEnc->sCmn.nb_subfr == 2 ) {\r
+        psEncCtrl->current_SNR_dB -= 1.5f;\r
+    }\r
 \r
     /* Reduce SNR_dB if inband FEC used */\r
     if( psEnc->speech_activity > LBRR_SPEECH_ACTIVITY_THRES ) {\r
@@ -158,10 +163,12 @@ void SKP_Silk_noise_shape_analysis_FLP(
     /* Coding quality level, between 0.0 and 1.0 */\r
     psEncCtrl->coding_quality = SKP_sigmoid( 0.25f * ( psEncCtrl->current_SNR_dB - 18.0f ) );\r
 \r
-    /* Reduce coding SNR during low speech activity */\r
-    b = 1.0f - psEnc->speech_activity;\r
-    SNR_adj_dB = psEncCtrl->current_SNR_dB - \r
-        BG_SNR_DECR_dB * psEncCtrl->coding_quality * ( 0.5f + 0.5f * psEncCtrl->input_quality ) * b * b;\r
+    SNR_adj_dB = psEncCtrl->current_SNR_dB;\r
+    if( psEnc->sCmn.useCBR == 0 ) {\r
+        /* Reduce coding SNR during low speech activity */\r
+        b = 1.0f - psEnc->speech_activity;\r
+        SNR_adj_dB -= BG_SNR_DECR_dB * psEncCtrl->coding_quality * ( 0.5f + 0.5f * psEncCtrl->input_quality ) * b * b;\r
+    }\r
 \r
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {\r
         /* Reduce gains for periodic signals */\r
@@ -290,18 +297,15 @@ void SKP_Silk_noise_shape_analysis_FLP(
     /*****************/\r
     /* Gain tweaking */\r
     /*****************/\r
-    /* Increase gains during low speech activity and put lower limit on gains */\r
-    gain_mult = ( SKP_float )pow( 2.0f, -0.16f * SNR_adj_dB );\r
-    gain_add  = ( SKP_float )pow( 2.0f,  0.16f * NOISE_FLOOR_dB ) + \r
-                ( SKP_float )pow( 2.0f,  0.16f * RELATIVE_MIN_GAIN_dB ) * psEnc->avgGain;\r
+    /* Increase gains during low speech activity */\r
+    gain_mult = (SKP_float)pow( 2.0f, -0.16f * SNR_adj_dB );\r
+    gain_add  = (SKP_float)pow( 2.0f,  0.16f * MIN_QGAIN_DB );\r
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\r
         psEncCtrl->Gains[ k ] *= gain_mult;\r
         psEncCtrl->Gains[ k ] += gain_add;\r
-        psEnc->avgGain += psEnc->speech_activity * GAIN_SMOOTHING_COEF * ( psEncCtrl->Gains[ k ] - psEnc->avgGain );\r
     }\r
 \r
     gain_mult = 1.0f + INPUT_TILT + psEncCtrl->coding_quality * HIGH_RATE_INPUT_TILT;\r
-\r
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\r
         psEncCtrl->GainsPre[ k ] *= gain_mult;\r
     }\r
@@ -311,6 +315,7 @@ void SKP_Silk_noise_shape_analysis_FLP(
     /************************************************/\r
     /* Less low frequency shaping for noisy inputs */\r
     strength = LOW_FREQ_SHAPING * ( 1.0f + LOW_QUALITY_LOW_FREQ_SHAPING_DECR * ( psEncCtrl->input_quality_bands[ 0 ] - 1.0f ) );\r
+    strength *= psEnc->speech_activity;\r
     if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {\r
         /* Reduce low frequencies quantization noise for periodic signals, depending on pitch lag */\r
         /*f = 400; freqz([1, -0.98 + 2e-4 * f], [1, -0.97 + 7e-4 * f], 2^12, Fs); axis([0, 1000, -10, 1])*/\r
index 106d72f..80ec457 100644 (file)
@@ -116,9 +116,9 @@ void SKP_Silk_prefilter_FLP(
 \r
         /* Noise shape parameters */\r
         HarmShapeGain = psEncCtrl->HarmShapeGain[ k ] * ( 1.0f - psEncCtrl->HarmBoost[ k ] );\r
-        HarmShapeFIR[ 0 ] = SKP_Silk_HarmShapeFIR_FLP[ 0 ] * HarmShapeGain;\r
-        HarmShapeFIR[ 1 ] = SKP_Silk_HarmShapeFIR_FLP[ 1 ] * HarmShapeGain;\r
-        HarmShapeFIR[ 2 ] = SKP_Silk_HarmShapeFIR_FLP[ 2 ] * HarmShapeGain;\r
+        HarmShapeFIR[ 0 ] = 0.25f               * HarmShapeGain;\r
+        HarmShapeFIR[ 1 ] = 32767.0f / 65536.0f * HarmShapeGain;\r
+        HarmShapeFIR[ 2 ] = 0.25f               * HarmShapeGain;\r
         Tilt      =  psEncCtrl->Tilt[ k ];\r
         LF_MA_shp =  psEncCtrl->LF_MA_shp[ k ];\r
         LF_AR_shp =  psEncCtrl->LF_AR_shp[ k ];\r
index e1ceff5..6989955 100644 (file)
@@ -38,7 +38,7 @@ void SKP_Silk_process_NLSFs_FLP(
     SKP_int     doInterpolate;\r
     SKP_float   pNLSFW[ MAX_LPC_ORDER ];\r
     SKP_float   NLSF_mu, NLSF_mu_fluc_red, i_sqr, NLSF_interpolation_factor = 0.0f;\r
-    const SKP_Silk_NLSF_CB_FLP *psNLSF_CB_FLP;\r
+    const SKP_Silk_NLSF_CB_struct *psNLSF_CB;\r
 \r
     /* Used only for NLSF interpolation */\r
     SKP_float   pNLSF0_temp[  MAX_LPC_ORDER ];\r
@@ -81,10 +81,10 @@ void SKP_Silk_process_NLSFs_FLP(
     }\r
 \r
     /* Set pointer to the NLSF codebook for the current signal type and LPC order */\r
-    psNLSF_CB_FLP = psEnc->psNLSF_CB_FLP[ psEncCtrl->sCmn.sigtype ];\r
+    psNLSF_CB = psEnc->sCmn.psNLSF_CB[ psEncCtrl->sCmn.sigtype ];\r
 \r
     /* Quantize NLSF parameters given the trained NLSF codebooks */\r
-    SKP_Silk_NLSF_MSVQ_encode_FLP( psEncCtrl->sCmn.NLSFIndices, pNLSF, psNLSF_CB_FLP, psEnc->sPred.prev_NLSFq, pNLSFW, NLSF_mu, \r
+    SKP_Silk_NLSF_MSVQ_encode_FLP( psEncCtrl->sCmn.NLSFIndices, pNLSF, psNLSF_CB, psEnc->sPred.prev_NLSFq, pNLSFW, NLSF_mu, \r
         NLSF_mu_fluc_red, psEnc->sCmn.NLSF_MSVQ_Survivors, psEnc->sCmn.predictLPCOrder, psEnc->sCmn.first_frame_after_reset );\r
 \r
     /* Convert quantized NLSFs back to LPC coefficients */\r
index 520d1b5..5b2852d 100644 (file)
@@ -65,6 +65,7 @@ void SKP_Silk_process_gains_FLP(
     /* Noise shaping quantization */\r
     SKP_Silk_gains_quant( psEncCtrl->sCmn.GainsIndices, pGains_Q16, \r
             &psShapeSt->LastGainIndex, psEnc->sCmn.nFramesInPayloadBuf, psEnc->sCmn.nb_subfr );\r
+\r
     /* Overwrite unquantized gains with quantized gains and convert back to Q0 from Q16 */\r
     for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {\r
         psEncCtrl->Gains[ k ] = pGains_Q16[ k ] / 65536.0f;\r
diff --git a/src_FLP/SKP_Silk_quant_LTP_gains_FLP.c b/src_FLP/SKP_Silk_quant_LTP_gains_FLP.c
deleted file mode 100644 (file)
index 8353117..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/***********************************************************************\r
-Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
-Redistribution and use in source and binary forms, with or without \r
-modification, (subject to the limitations in the disclaimer below) \r
-are permitted provided that the following conditions are met:\r
-- Redistributions of source code must retain the above copyright notice,\r
-this list of conditions and the following disclaimer.\r
-- Redistributions in binary form must reproduce the above copyright \r
-notice, this list of conditions and the following disclaimer in the \r
-documentation and/or other materials provided with the distribution.\r
-- Neither the name of Skype Limited, nor the names of specific \r
-contributors, may be used to endorse or promote products derived from \r
-this software without specific prior written permission.\r
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
-BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
-CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-***********************************************************************/\r
-\r
-#include "SKP_Silk_main_FLP.h"\r
-\r
-#define Q14_CONVERSION_FAC                              6.1035e-005f // 1 / 2^14\r
-\r
-void SKP_Silk_quant_LTP_gains_FLP(\r
-          SKP_float B[ MAX_NB_SUBFR * LTP_ORDER ],          /* I/O  (Un-)quantized LTP gains                */\r
-          SKP_int   cbk_index[ MAX_NB_SUBFR ],              /* O    Codebook index                          */\r
-          SKP_int   *periodicity_index,                     /* O    Periodicity index                       */\r
-    const SKP_float W[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ],  /* I    Error weights                           */\r
-    const SKP_float mu,                                     /* I    Mu value (R/D tradeoff)                 */\r
-    const SKP_int   lowComplexity,                          /* I    Flag for low complexity                 */\r
-    const SKP_int   nb_subfr                                /* I    number of subframes                     */\r
-)\r
-{\r
-    SKP_int             j, k, temp_idx[ MAX_NB_SUBFR ], cbk_size;\r
-    const SKP_uint16    *cdf_ptr;\r
-    const SKP_int16     *cl_ptr;\r
-    const SKP_int16     *cbk_ptr_Q14;\r
-    const SKP_float     *b_ptr, *W_ptr;\r
-    SKP_float           rate_dist_subfr, rate_dist, min_rate_dist;\r
-\r
-\r
-\r
-    /***************************************************/\r
-    /* Iterate over different codebooks with different */\r
-    /* rates/distortions, and choose best */\r
-    /***************************************************/\r
-    min_rate_dist = SKP_float_MAX;\r
-    for( k = 0; k < 3; k++ ) {\r
-        cdf_ptr     = SKP_Silk_LTP_gain_CDF_ptrs[     k ];\r
-        cl_ptr      = SKP_Silk_LTP_gain_BITS_Q6_ptrs[ k ];\r
-        cbk_ptr_Q14 = SKP_Silk_LTP_vq_ptrs_Q14[       k ];\r
-        cbk_size    = SKP_Silk_LTP_vq_sizes[          k ];\r
-\r
-        /* Setup pointer to first subframe */\r
-        W_ptr = W;\r
-        b_ptr = B;\r
-\r
-        rate_dist = 0.0f;\r
-        for( j = 0; j < nb_subfr; j++ ) {\r
-\r
-            SKP_Silk_VQ_WMat_EC_FLP(\r
-                &temp_idx[ j ],         /* O    index of best codebook vector                           */\r
-                &rate_dist_subfr,       /* O    best weighted quantization error + mu * rate            */\r
-                b_ptr,                  /* I    input vector to be quantized                            */\r
-                W_ptr,                  /* I    weighting matrix                                        */\r
-                cbk_ptr_Q14,            /* I    codebook                                                */\r
-                cl_ptr,                 /* I    code length for each codebook vector                    */\r
-                mu,                     /* I    tradeoff between weighted error and rate                */\r
-                cbk_size                /* I    number of vectors in codebook                           */\r
-            );\r
-\r
-            rate_dist += rate_dist_subfr;\r
-\r
-            b_ptr += LTP_ORDER;\r
-            W_ptr += LTP_ORDER * LTP_ORDER;\r
-        }\r
-\r
-        if( rate_dist < min_rate_dist ) {\r
-            min_rate_dist = rate_dist;\r
-            SKP_memcpy( cbk_index, temp_idx, nb_subfr * sizeof( SKP_int ) );\r
-            *periodicity_index = k;\r
-        }\r
-\r
-        /* Break early in low-complexity mode if rate distortion is below threshold */\r
-        if( lowComplexity && ( rate_dist * 16384.0f < ( SKP_float )SKP_Silk_LTP_gain_middle_avg_RD_Q14 ) ) {\r
-            break;\r
-        }\r
-    }\r
-\r
-    cbk_ptr_Q14 = SKP_Silk_LTP_vq_ptrs_Q14[ *periodicity_index ];\r
-    for( j = 0; j < nb_subfr; j++ ) {\r
-        SKP_short2float_array( &B[ j * LTP_ORDER ],\r
-            &cbk_ptr_Q14[ cbk_index[ j ] * LTP_ORDER ],\r
-            LTP_ORDER );\r
-    }\r
-\r
-    for( j = 0; j < nb_subfr * LTP_ORDER; j++ ) {\r
-        B[ j ] *= Q14_CONVERSION_FAC;\r
-    }\r
-\r
-}\r
-\r
index d30cbca..b2dd926 100644 (file)
@@ -70,29 +70,6 @@ typedef struct {
     SKP_float   prev_NLSFq[ MAX_LPC_ORDER ];        /* Previously quantized NLSF vector     */\r
 } SKP_Silk_predict_state_FLP;\r
 \r
-/*******************************************/\r
-/* Structure containing NLSF MSVQ codebook */\r
-/*******************************************/\r
-/* structure for one stage of MSVQ */\r
-typedef struct {\r
-    const SKP_int32     nVectors;\r
-    const SKP_float     *CB;\r
-    const SKP_float     *Rates;\r
-} SKP_Silk_NLSF_CBS_FLP;\r
-\r
-typedef struct {\r
-    const SKP_int32                         nStages;\r
-\r
-    /* fields for (de)quantizing */\r
-    const SKP_Silk_NLSF_CBS_FLP *CBStages;\r
-    const SKP_float                         *NDeltaMin;\r
-\r
-    /* fields for arithmetic (de)coding */\r
-    const SKP_uint16                        *CDF;\r
-    const SKP_uint16 * const                *StartPtr;\r
-    const SKP_int                           *MiddleIx;\r
-} SKP_Silk_NLSF_CB_FLP;\r
-\r
 /********************************/\r
 /* Encoder state FLP            */\r
 /********************************/\r
@@ -111,9 +88,7 @@ typedef struct {
     /* Buffer for find pitch and noise shape analysis */\r
     SKP_float                           x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ];/* Buffer for find pitch and noise shape analysis */\r
     SKP_float                           LTPCorr;                    /* Normalized correlation from pitch lag estimator */\r
-    SKP_float                           mu_LTP;                     /* Rate-distortion tradeoff in LTP quantization */\r
     SKP_float                           SNR_dB;                     /* Quality setting */\r
-    SKP_float                           avgGain;                    /* average gain during active speech */\r
     SKP_float                           BufferedInChannel_ms;       /* Simulated number of ms buffer in channel because of exceeded TargetRate_bps */\r
     SKP_float                           speech_activity;            /* Speech activity */\r
 \r
@@ -122,8 +97,6 @@ typedef struct {
     SKP_float                           HPLTPredCodGain;\r
 \r
     SKP_float                           inBandFEC_SNR_comp;         /* Compensation to SNR_DB when using inband FEC Voiced */\r
-\r
-    const SKP_Silk_NLSF_CB_FLP  *psNLSF_CB_FLP[ 2 ];        /* Pointers to voiced/unvoiced NLSF codebooks */\r
 } SKP_Silk_encoder_state_FLP;\r
 \r
 \r
diff --git a/src_FLP/SKP_Silk_tables_FLP.h b/src_FLP/SKP_Silk_tables_FLP.h
deleted file mode 100644 (file)
index cabc526..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/***********************************************************************\r
-Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
-Redistribution and use in source and binary forms, with or without \r
-modification, (subject to the limitations in the disclaimer below) \r
-are permitted provided that the following conditions are met:\r
-- Redistributions of source code must retain the above copyright notice,\r
-this list of conditions and the following disclaimer.\r
-- Redistributions in binary form must reproduce the above copyright \r
-notice, this list of conditions and the following disclaimer in the \r
-documentation and/or other materials provided with the distribution.\r
-- Neither the name of Skype Limited, nor the names of specific \r
-contributors, may be used to endorse or promote products derived from \r
-this software without specific prior written permission.\r
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
-BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
-CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-***********************************************************************/\r
-\r
-#ifndef SKP_SILK_TABLES_FLP_H\r
-#define SKP_SILK_TABLES_FLP_H\r
-\r
-#include "SKP_Silk_structs_FLP.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif\r
-\r
-/* filters */\r
-extern const SKP_float SKP_Silk_HarmShapeFIR_FLP[ HARM_SHAPE_FIR_TAPS ];\r
-\r
-/* Table of quantization offset values */\r
-extern const SKP_float SKP_Silk_Quantization_Offsets[ 2 ][ 2 ];\r
-\r
-/* NLSF codebooks */\r
-extern const SKP_Silk_NLSF_CB_FLP SKP_Silk_NLSF_CB0_16_FLP, SKP_Silk_NLSF_CB1_16_FLP;\r
-extern const SKP_Silk_NLSF_CB_FLP SKP_Silk_NLSF_CB0_10_FLP, SKP_Silk_NLSF_CB1_10_FLP;\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
diff --git a/src_FLP/SKP_Silk_tables_NLSF_CB0_10_FLP.c b/src_FLP/SKP_Silk_tables_NLSF_CB0_10_FLP.c
deleted file mode 100644 (file)
index e25b085..0000000
+++ /dev/null
@@ -1,784 +0,0 @@
-/***********************************************************************\r
-Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
-Redistribution and use in source and binary forms, with or without \r
-modification, (subject to the limitations in the disclaimer below) \r
-are permitted provided that the following conditions are met:\r
-- Redistributions of source code must retain the above copyright notice,\r
-this list of conditions and the following disclaimer.\r
-- Redistributions in binary form must reproduce the above copyright \r
-notice, this list of conditions and the following disclaimer in the \r
-documentation and/or other materials provided with the distribution.\r
-- Neither the name of Skype Limited, nor the names of specific \r
-contributors, may be used to endorse or promote products derived from \r
-this software without specific prior written permission.\r
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
-BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
-CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-***********************************************************************/\r
-\r
-/**********************************************/\r
-/* This file has been automatically generated */\r
-/*                                            */\r
-/* ROM usage:  5.68 kB                        */\r
-/**********************************************/\r
-\r
-#include "SKP_Silk_tables_FLP.h"\r
-#include "SKP_Silk_tables_NLSF_CB0_10.h"\r
-\r
-const SKP_float SKP_Silk_NLSF_MSVQ_CB0_10_rates[ NLSF_MSVQ_CB0_10_VECTORS ] =\r
-{\r
-      4.75000000000000000000f,      4.75000000000000000000f,\r
-      4.87500000000000000000f,      5.12500000000000000000f,\r
-      5.37500000000000000000f,      5.37500000000000000000f,\r
-      5.43750000000000000000f,      5.43750000000000000000f,\r
-      5.43750000000000000000f,      5.50000000000000000000f,\r
-      5.50000000000000000000f,      5.50000000000000000000f,\r
-      5.56250000000000000000f,      5.56250000000000000000f,\r
-      5.62500000000000000000f,      5.62500000000000000000f,\r
-      5.62500000000000000000f,      5.68750000000000000000f,\r
-      5.75000000000000000000f,      5.75000000000000000000f,\r
-      5.75000000000000000000f,      5.87500000000000000000f,\r
-      5.87500000000000000000f,      5.87500000000000000000f,\r
-      5.93750000000000000000f,      5.93750000000000000000f,\r
-      6.00000000000000000000f,      6.00000000000000000000f,\r
-      6.00000000000000000000f,      6.06250000000000000000f,\r
-      6.06250000000000000000f,      6.06250000000000000000f,\r
-      6.12500000000000000000f,      6.12500000000000000000f,\r
-      6.12500000000000000000f,      6.12500000000000000000f,\r
-      6.12500000000000000000f,      6.18750000000000000000f,\r
-      6.18750000000000000000f,      6.25000000000000000000f,\r
-      6.25000000000000000000f,      6.25000000000000000000f,\r
-      6.31250000000000000000f,      6.31250000000000000000f,\r
-      6.31250000000000000000f,      6.37500000000000000000f,\r
-      6.37500000000000000000f,      6.37500000000000000000f,\r
-      6.43750000000000000000f,      6.43750000000000000000f,\r
-      6.43750000000000000000f,      6.50000000000000000000f,\r
-      6.75000000000000000000f,      6.75000000000000000000f,\r
-      6.75000000000000000000f,      7.12500000000000000000f,\r
-      7.56250000000000000000f,      7.68750000000000000000f,\r
-      8.00000000000000000000f,      8.00000000000000000000f,\r
-      8.00000000000000000000f,      8.00000000000000000000f,\r
-      8.00000000000000000000f,      8.00000000000000000000f,\r
-      3.68750000000000000000f,      3.68750000000000000000f,\r
-      3.75000000000000000000f,      3.81250000000000000000f,\r
-      3.93750000000000000000f,      3.93750000000000000000f,\r
-      3.93750000000000000000f,      3.93750000000000000000f,\r
-      3.93750000000000000000f,      4.06250000000000000000f,\r
-      4.12500000000000000000f,      4.18750000000000000000f,\r
-      4.18750000000000000000f,      4.18750000000000000000f,\r
-      4.50000000000000000000f,      4.56250000000000000000f,\r
-      2.87500000000000000000f,      2.87500000000000000000f,\r
-      3.00000000000000000000f,      3.00000000000000000000f,\r
-      3.00000000000000000000f,      3.06250000000000000000f,\r
-      3.12500000000000000000f,      3.12500000000000000000f,\r
-      2.68750000000000000000f,      2.87500000000000000000f,\r
-      2.93750000000000000000f,      2.93750000000000000000f,\r
-      3.00000000000000000000f,      3.06250000000000000000f,\r
-      3.25000000000000000000f,      3.31250000000000000000f,\r
-      2.87500000000000000000f,      2.93750000000000000000f,\r
-      2.93750000000000000000f,      2.93750000000000000000f,\r
-      3.06250000000000000000f,      3.06250000000000000000f,\r
-      3.06250000000000000000f,      3.06250000000000000000f,\r
-      2.87500000000000000000f,      2.93750000000000000000f,\r
-      3.00000000000000000000f,      3.00000000000000000000f,\r
-      3.00000000000000000000f,      3.06250000000000000000f,\r
-      3.06250000000000000000f,      3.12500000000000000000f,\r
-      3.75000000000000000000f,      3.75000000000000000000f,\r
-      3.81250000000000000000f,      3.81250000000000000000f,\r
-      3.81250000000000000000f,      3.81250000000000000000f,\r
-      3.87500000000000000000f,      3.93750000000000000000f,\r
-      4.00000000000000000000f,      4.00000000000000000000f,\r
-      4.06250000000000000000f,      4.18750000000000000000f,\r
-      4.18750000000000000000f,      4.31250000000000000000f,\r
-      4.31250000000000000000f,      4.75000000000000000000f\r
-};\r
-\r
-const SKP_float SKP_Silk_NLSF_MSVQ_CB0_10_ndelta_min[ 10 + 1 ] =\r
-{\r
-      0.01687622070312500000f,\r
-      0.00015258789062500000f,\r
-      0.00067138671874999989f,\r
-      0.00057983398437500000f,\r
-      0.00009155273437500000f,\r
-      0.00009155273437500000f,\r
-      0.00549316406250000000f,\r
-      0.00494384765625000000f,\r
-      0.00933837890625000000f,\r
-      0.00521850585937500000f,\r
-      0.03024291992187500000f\r
-};\r
-\r
-const SKP_float SKP_Silk_NLSF_MSVQ_CB0_10[ 10 * NLSF_MSVQ_CB0_10_VECTORS ] =\r
-{\r
-     -0.42187500000000000000f,     -0.35156250000000000000f,\r
-     -0.27734375000000000000f,     -0.19140625000000000000f,\r
-     -0.09375000000000000000f,     -0.01953125000000000000f,\r
-      0.08203125000000000000f,      0.18750000000000000000f,\r
-      0.29296875000000000000f,      0.38671875000000006000f,\r
-     -0.42187500000000000000f,     -0.38671875000000006000f,\r
-     -0.29687500000000000000f,     -0.22265625000000000000f,\r
-     -0.15234375000000000000f,     -0.02734375000000000000f,\r
-      0.07812500000000000000f,      0.19531250000000000000f,\r
-      0.29687500000000000000f,      0.38281250000000000000f,\r
-     -0.41015625000000000000f,     -0.37890625000000000000f,\r
-     -0.32421875000000006000f,     -0.19140625000000000000f,\r
-     -0.07421875000000000000f,     -0.02734375000000000000f,\r
-      0.10546875000000000000f,      0.18359375000000000000f,\r
-      0.26171875000000000000f,      0.39843750000000000000f,\r
-     -0.37890625000000000000f,     -0.35156250000000000000f,\r
-     -0.29296875000000000000f,     -0.19140625000000000000f,\r
-     -0.02343750000000000000f,      0.02343750000000000000f,\r
-      0.10546875000000000000f,      0.21484375000000000000f,\r
-      0.28515625000000000000f,      0.37109375000000000000f,\r
-     -0.37109375000000000000f,     -0.34765625000000000000f,\r
-     -0.28125000000000000000f,     -0.15625000000000000000f,\r
-     -0.10937500000000000000f,     -0.04296874999999999300f,\r
-      0.08203125000000000000f,      0.14453125000000000000f,\r
-      0.27343750000000000000f,      0.33593750000000000000f,\r
-     -0.40234375000000000000f,     -0.37890625000000000000f,\r
-     -0.32031250000000000000f,     -0.18750000000000000000f,\r
-      0.03125000000000000000f,      0.08203125000000000000f,\r
-      0.14062500000000000000f,      0.21875000000000000000f,\r
-      0.28906250000000000000f,      0.39453125000000000000f,\r
-     -0.40234375000000000000f,     -0.37500000000000000000f,\r
-     -0.31640625000000000000f,     -0.12890625000000000000f,\r
-     -0.07421875000000000000f,     -0.01171875000000000000f,\r
-      0.10937500000000000000f,      0.16015625000000000000f,\r
-      0.33593750000000000000f,      0.39843750000000000000f,\r
-     -0.43359375000000000000f,     -0.39843750000000000000f,\r
-     -0.33203125000000000000f,     -0.24218750000000000000f,\r
-     -0.14843750000000000000f,     -0.08203125000000000000f,\r
-      0.04296874999999999300f,      0.16015625000000000000f,\r
-      0.25781250000000000000f,      0.37109375000000000000f,\r
-     -0.34374999999999994000f,     -0.32031250000000000000f,\r
-     -0.24609375000000000000f,     -0.10937500000000000000f,\r
-     -0.03906250000000000000f,      0.00390625000000000000f,\r
-      0.13671875000000000000f,      0.20703125000000000000f,\r
-      0.28515625000000000000f,      0.40234375000000000000f,\r
-     -0.39453125000000000000f,     -0.37500000000000000000f,\r
-     -0.26171875000000000000f,     -0.06640625000000000000f,\r
-     -0.01562500000000000000f,      0.03906250000000000000f,\r
-      0.11718749999999999000f,      0.17578125000000000000f,\r
-      0.33593750000000000000f,      0.40234375000000000000f,\r
-     -0.36718750000000000000f,     -0.33984375000000000000f,\r
-     -0.27343750000000000000f,     -0.21484375000000000000f,\r
-     -0.17187499999999997000f,     -0.09765625000000000000f,\r
-      0.14453125000000000000f,      0.21484375000000000000f,\r
-      0.28515625000000000000f,      0.40625000000000006000f,\r
-     -0.38281250000000000000f,     -0.35937500000000000000f,\r
-     -0.27734375000000000000f,     -0.14453125000000000000f,\r
-     -0.08984375000000000000f,     -0.03906250000000000000f,\r
-      0.14453125000000000000f,      0.21093750000000000000f,\r
-      0.28515625000000000000f,      0.40625000000000006000f,\r
-     -0.44531250000000000000f,     -0.42187500000000000000f,\r
-     -0.30859375000000000000f,     -0.19140625000000000000f,\r
-     -0.07812500000000000000f,      0.00781250000000000000f,\r
-      0.11328125000000000000f,      0.21093750000000000000f,\r
-      0.31250000000000000000f,      0.40234375000000000000f,\r
-     -0.41796875000000000000f,     -0.38671875000000006000f,\r
-     -0.33593750000000000000f,     -0.23437499999999997000f,\r
-     -0.02734375000000000000f,      0.04296874999999999300f,\r
-      0.10546875000000000000f,      0.19140625000000000000f,\r
-      0.26171875000000000000f,      0.37109375000000000000f,\r
-     -0.39062500000000000000f,     -0.36718750000000000000f,\r
-     -0.29687500000000000000f,     -0.15625000000000000000f,\r
-     -0.01953125000000000000f,      0.02343750000000000000f,\r
-      0.10156250000000001000f,      0.16796875000000000000f,\r
-      0.24218750000000000000f,      0.39843750000000000000f,\r
-     -0.34374999999999994000f,     -0.30859375000000000000f,\r
-     -0.25000000000000000000f,     -0.17187499999999997000f,\r
-     -0.10937500000000000000f,     -0.05859374999999999300f,\r
-      0.10156250000000001000f,      0.16796875000000000000f,\r
-      0.25000000000000000000f,      0.40625000000000006000f,\r
-     -0.40234375000000000000f,     -0.38281250000000000000f,\r
-     -0.27734375000000000000f,     -0.10156250000000001000f,\r
-     -0.05468750000000000000f,      0.01562500000000000000f,\r
-      0.08984375000000000000f,      0.16796875000000000000f,\r
-      0.28125000000000000000f,      0.33984375000000000000f,\r
-     -0.42968750000000000000f,     -0.40234375000000000000f,\r
-     -0.32421875000000006000f,     -0.22656250000000000000f,\r
-     -0.10546875000000000000f,     -0.01953125000000000000f,\r
-      0.06250000000000000000f,      0.13671875000000000000f,\r
-      0.22656250000000000000f,      0.35937500000000000000f,\r
-     -0.40234375000000000000f,     -0.36718750000000000000f,\r
-     -0.30859375000000000000f,     -0.24218750000000000000f,\r
-     -0.08203125000000000000f,     -0.02734375000000000000f,\r
-      0.04687500000000000000f,      0.20312500000000003000f,\r
-      0.26953125000000000000f,      0.34374999999999994000f,\r
-     -0.41796875000000000000f,     -0.38281250000000000000f,\r
-     -0.32812500000000000000f,     -0.17187499999999997000f,\r
-     -0.11328125000000000000f,     -0.04687500000000000000f,\r
-      0.03515625000000000000f,      0.10937500000000000000f,\r
-      0.28515625000000000000f,      0.35156250000000000000f,\r
-     -0.38671875000000006000f,     -0.36328124999999994000f,\r
-     -0.26562500000000000000f,     -0.12500000000000000000f,\r
-     -0.07421875000000000000f,     -0.01953125000000000000f,\r
-      0.04687500000000000000f,      0.10937500000000000000f,\r
-      0.33593750000000000000f,      0.40625000000000006000f,\r
-     -0.39062500000000000000f,     -0.35546875000000000000f,\r
-     -0.29296875000000000000f,     -0.21484375000000000000f,\r
-     -0.15625000000000000000f,     -0.10156250000000001000f,\r
-      0.07812500000000000000f,      0.15625000000000000000f,\r
-      0.22656250000000000000f,      0.39453125000000000000f,\r
-     -0.39062500000000000000f,     -0.36718750000000000000f,\r
-     -0.28515625000000000000f,     -0.23437499999999997000f,\r
-     -0.19140625000000000000f,     -0.00390625000000000000f,\r
-      0.07031250000000000000f,      0.14062500000000000000f,\r
-      0.32421875000000006000f,      0.37500000000000000000f,\r
-     -0.41406250000000000000f,     -0.37890625000000000000f,\r
-     -0.26953125000000000000f,     -0.18359375000000000000f,\r
-     -0.09765625000000000000f,      0.04296874999999999300f,\r
-      0.12109375000000000000f,      0.17968750000000000000f,\r
-      0.25390625000000000000f,      0.34765625000000000000f,\r
-     -0.36328124999999994000f,     -0.33984375000000000000f,\r
-     -0.26953125000000000000f,     -0.17968750000000000000f,\r
-     -0.12500000000000000000f,     -0.07031250000000000000f,\r
-     -0.00781250000000000000f,      0.05468750000000000000f,\r
-      0.28906250000000000000f,      0.40234375000000000000f,\r
-     -0.36328124999999994000f,     -0.33984375000000000000f,\r
-     -0.25390625000000000000f,     -0.11328125000000000000f,\r
-      0.02343750000000000000f,      0.07031250000000000000f,\r
-      0.14843750000000000000f,      0.22265625000000000000f,\r
-      0.28906250000000000000f,      0.39843750000000000000f,\r
-     -0.35937500000000000000f,     -0.33203125000000000000f,\r
-     -0.25781250000000000000f,     -0.21093750000000000000f,\r
-     -0.16796875000000000000f,     -0.01562500000000000000f,\r
-      0.12500000000000000000f,      0.17578125000000000000f,\r
-      0.34374999999999994000f,      0.40625000000000006000f,\r
-     -0.42187500000000000000f,     -0.38671875000000006000f,\r
-     -0.33203125000000000000f,     -0.19531250000000000000f,\r
-     -0.13671875000000000000f,     -0.07421875000000000000f,\r
-      0.11328125000000000000f,      0.16015625000000000000f,\r
-      0.32812500000000000000f,      0.39843750000000000000f,\r
-     -0.37890625000000000000f,     -0.35156250000000000000f,\r
-     -0.28515625000000000000f,     -0.22265625000000000000f,\r
-     -0.18750000000000000000f,     -0.09375000000000000000f,\r
-      0.08203125000000000000f,      0.13671875000000000000f,\r
-      0.30859375000000000000f,      0.36718750000000000000f,\r
-     -0.32812500000000000000f,     -0.29687500000000000000f,\r
-     -0.22265625000000000000f,     -0.15625000000000000000f,\r
-     -0.11328125000000000000f,     -0.04296874999999999300f,\r
-      0.16015625000000000000f,      0.23437499999999997000f,\r
-      0.31250000000000000000f,      0.40625000000000006000f,\r
-     -0.39062500000000000000f,     -0.36718750000000000000f,\r
-     -0.29296875000000000000f,     -0.25000000000000000000f,\r
-     -0.19921875000000000000f,      0.00781250000000000000f,\r
-      0.07812500000000000000f,      0.17578125000000000000f,\r
-      0.26562500000000000000f,      0.33203125000000000000f,\r
-     -0.39062500000000000000f,     -0.36718750000000000000f,\r
-     -0.24218750000000000000f,     -0.16015625000000000000f,\r
-     -0.11718749999999999000f,      0.05078125000000000700f,\r
-      0.12109375000000000000f,      0.20312500000000003000f,\r
-      0.33203125000000000000f,      0.39453125000000000000f,\r
-     -0.37109375000000000000f,     -0.33593750000000000000f,\r
-     -0.27343750000000000000f,     -0.20312500000000003000f,\r
-     -0.14843750000000000000f,     -0.08984375000000000000f,\r
-      0.07031250000000000000f,      0.25000000000000000000f,\r
-      0.32421875000000006000f,      0.39453125000000000000f,\r
-     -0.44531250000000000000f,     -0.42187500000000000000f,\r
-     -0.36718750000000000000f,     -0.26953125000000000000f,\r
-     -0.12109375000000000000f,     -0.01953125000000000000f,\r
-      0.09375000000000000000f,      0.17968750000000000000f,\r
-      0.28125000000000000000f,      0.38671875000000006000f,\r
-     -0.39062500000000000000f,     -0.37109375000000000000f,\r
-     -0.21093750000000000000f,     -0.14843750000000000000f,\r
-     -0.10156250000000001000f,     -0.03906250000000000000f,\r
-      0.01171875000000000000f,      0.19921875000000000000f,\r
-      0.29296875000000000000f,      0.34765625000000000000f,\r
-     -0.40625000000000006000f,     -0.38281250000000000000f,\r
-     -0.28515625000000000000f,     -0.12109375000000000000f,\r
-      0.07031250000000000000f,      0.12109375000000000000f,\r
-      0.17968750000000000000f,      0.25390625000000000000f,\r
-      0.32031250000000000000f,      0.41015625000000000000f,\r
-     -0.35156250000000000000f,     -0.32812500000000000000f,\r
-     -0.24218750000000000000f,     -0.19921875000000000000f,\r
-     -0.14843750000000000000f,      0.01171875000000000000f,\r
-      0.09765625000000000000f,      0.17187499999999997000f,\r
-      0.28125000000000000000f,      0.33593750000000000000f,\r
-     -0.42578124999999994000f,     -0.40234375000000000000f,\r
-     -0.32421875000000006000f,     -0.11328125000000000000f,\r
-      0.00781250000000000000f,      0.04296874999999999300f,\r
-      0.14843750000000000000f,      0.20703125000000000000f,\r
-      0.32812500000000000000f,      0.39453125000000000000f,\r
-     -0.33593750000000000000f,     -0.29296875000000000000f,\r
-     -0.23828125000000000000f,     -0.17968750000000000000f,\r
-     -0.06640625000000000000f,     -0.01562500000000000000f,\r
-      0.07031250000000000000f,      0.20312500000000003000f,\r
-      0.26953125000000000000f,      0.35546875000000000000f,\r
-     -0.42578124999999994000f,     -0.39062500000000000000f,\r
-     -0.32421875000000006000f,     -0.21093750000000000000f,\r
-     -0.03906250000000000000f,      0.00390625000000000000f,\r
-      0.07421875000000000000f,      0.13671875000000000000f,\r
-      0.31640625000000000000f,      0.39062500000000000000f,\r
-     -0.39453125000000000000f,     -0.37109375000000000000f,\r
-     -0.30468750000000000000f,     -0.26562500000000000000f,\r
-     -0.22656250000000000000f,     -0.06250000000000000000f,\r
-      0.15234375000000000000f,      0.21875000000000000000f,\r
-      0.33203125000000000000f,      0.40234375000000000000f,\r
-     -0.33984375000000000000f,     -0.31250000000000000000f,\r
-     -0.22656250000000000000f,     -0.16015625000000000000f,\r
-     -0.11328125000000000000f,     -0.02734375000000000000f,\r
-      0.05468750000000000000f,      0.11718749999999999000f,\r
-      0.33593750000000000000f,      0.40625000000000006000f,\r
-     -0.41015625000000000000f,     -0.38671875000000006000f,\r
-     -0.23828125000000000000f,     -0.02734375000000000000f,\r
-      0.02343750000000000000f,      0.08203125000000000000f,\r
-      0.17187499999999997000f,      0.23828125000000000000f,\r
-      0.33984375000000000000f,      0.39843750000000000000f,\r
-     -0.33593750000000000000f,     -0.31250000000000000000f,\r
-     -0.18750000000000000000f,     -0.11718749999999999000f,\r
-     -0.07031250000000000000f,      0.01953125000000000000f,\r
-      0.09765625000000000000f,      0.16796875000000000000f,\r
-      0.32031250000000000000f,      0.37890625000000000000f,\r
-     -0.38281250000000000000f,     -0.35937500000000000000f,\r
-     -0.25781250000000000000f,     -0.19140625000000000000f,\r
-     -0.14062500000000000000f,     -0.05078125000000000700f,\r
-      0.00000000000000000000f,      0.13671875000000000000f,\r
-      0.23046875000000000000f,      0.30859375000000000000f,\r
-     -0.38281250000000000000f,     -0.36328124999999994000f,\r
-     -0.25781250000000000000f,     -0.20312500000000003000f,\r
-     -0.15625000000000000000f,     -0.09375000000000000000f,\r
-     -0.04687500000000000000f,      0.17968750000000000000f,\r
-      0.31640625000000000000f,      0.38281250000000000000f,\r
-     -0.41796875000000000000f,     -0.37109375000000000000f,\r
-     -0.25000000000000000000f,     -0.15234375000000000000f,\r
-     -0.05468750000000000000f,      0.05468750000000000000f,\r
-      0.16406250000000000000f,      0.25390625000000000000f,\r
-      0.34374999999999994000f,      0.41406250000000000000f,\r
-     -0.40625000000000006000f,     -0.37500000000000000000f,\r
-     -0.32031250000000000000f,     -0.25390625000000000000f,\r
-     -0.21093750000000000000f,     -0.13671875000000000000f,\r
-      0.08203125000000000000f,      0.19921875000000000000f,\r
-      0.28125000000000000000f,      0.38671875000000006000f,\r
-     -0.36718750000000000000f,     -0.33984375000000000000f,\r
-     -0.28906250000000000000f,     -0.23046875000000000000f,\r
-     -0.08203125000000000000f,     -0.03906250000000000000f,\r
-      0.05468750000000000000f,      0.13671875000000000000f,\r
-      0.22656250000000000000f,      0.37500000000000000000f,\r
-     -0.42187500000000000000f,     -0.39062500000000000000f,\r
-     -0.33593750000000000000f,     -0.27734375000000000000f,\r
-     -0.23046875000000000000f,     -0.06250000000000000000f,\r
-      0.07812500000000000000f,      0.16015625000000000000f,\r
-      0.28906250000000000000f,      0.37890625000000000000f,\r
-     -0.40234375000000000000f,     -0.37109375000000000000f,\r
-     -0.31250000000000000000f,     -0.22265625000000000000f,\r
-     -0.17578125000000000000f,     -0.09375000000000000000f,\r
-     -0.02343750000000000000f,      0.07421875000000000000f,\r
-      0.25781250000000000000f,      0.34765625000000000000f,\r
-     -0.38671875000000006000f,     -0.36328124999999994000f,\r
-     -0.28906250000000000000f,     -0.25390625000000000000f,\r
-     -0.19531250000000000000f,      0.07812500000000000000f,\r
-      0.15625000000000000000f,      0.22265625000000000000f,\r
-      0.33203125000000000000f,      0.38281250000000000000f,\r
-     -0.39843750000000000000f,     -0.37500000000000000000f,\r
-     -0.16015625000000000000f,     -0.08203125000000000000f,\r
-     -0.04296874999999999300f,      0.03515625000000000000f,\r
-      0.09765625000000000000f,      0.23046875000000000000f,\r
-      0.32421875000000006000f,      0.38281250000000000000f,\r
-     -0.36718750000000000000f,     -0.33984375000000000000f,\r
-     -0.27734375000000000000f,     -0.23046875000000000000f,\r
-     -0.18359375000000000000f,     -0.03125000000000000000f,\r
-      0.19531250000000000000f,      0.26562500000000000000f,\r
-      0.33593750000000000000f,      0.41015625000000000000f,\r
-     -0.42187500000000000000f,     -0.39453125000000000000f,\r
-     -0.32812500000000000000f,     -0.23046875000000000000f,\r
-     -0.04296874999999999300f,      0.11328125000000000000f,\r
-      0.17187499999999997000f,      0.23828125000000000000f,\r
-      0.32031250000000000000f,      0.38671875000000006000f,\r
-     -0.38281250000000000000f,     -0.36718750000000000000f,\r
-     -0.32031250000000000000f,     -0.28515625000000000000f,\r
-     -0.10156250000000001000f,      0.02343750000000000000f,\r
-      0.11718749999999999000f,      0.20703125000000000000f,\r
-      0.30859375000000000000f,      0.38281250000000000000f,\r
-     -0.33203125000000000000f,     -0.27734375000000000000f,\r
-     -0.14453125000000000000f,     -0.04687500000000000000f,\r
-      0.01171875000000000000f,      0.08593749999999998600f,\r
-      0.16015625000000000000f,      0.23828125000000000000f,\r
-      0.33203125000000000000f,      0.39062500000000000000f,\r
-     -0.33203125000000000000f,     -0.30859375000000000000f,\r
-     -0.25781250000000000000f,     -0.21484375000000000000f,\r
-     -0.07421875000000000000f,      0.06640625000000000000f,\r
-      0.12890625000000000000f,      0.21875000000000000000f,\r
-      0.32421875000000006000f,      0.37890625000000000000f,\r
-     -0.28125000000000000000f,     -0.25781250000000000000f,\r
-     -0.23437499999999997000f,     -0.22265625000000000000f,\r
-     -0.19531250000000000000f,      0.01562500000000000000f,\r
-      0.10156250000000001000f,      0.20312500000000003000f,\r
-      0.30859375000000000000f,      0.40234375000000000000f,\r
-     -0.37109375000000000000f,     -0.28906250000000000000f,\r
-     -0.12109375000000000000f,     -0.07031250000000000000f,\r
-     -0.04296874999999999300f,     -0.02343750000000000000f,\r
-      0.03515625000000000000f,      0.20312500000000003000f,\r
-      0.30078125000000000000f,      0.39062500000000000000f,\r
-     -0.30468750000000000000f,     -0.29296875000000000000f,\r
-     -0.26562500000000000000f,     -0.19921875000000000000f,\r
-     -0.16796875000000000000f,     -0.14843750000000000000f,\r
-      0.04687500000000000000f,      0.17578125000000000000f,\r
-      0.28906250000000000000f,      0.39062500000000000000f,\r
-     -0.38671875000000006000f,     -0.26562500000000000000f,\r
-     -0.15625000000000000000f,     -0.12890625000000000000f,\r
-     -0.09375000000000000000f,     -0.06250000000000000000f,\r
-      0.08984375000000000000f,      0.22656250000000000000f,\r
-      0.30859375000000000000f,      0.37890625000000000000f,\r
-     -0.38671875000000006000f,     -0.18750000000000000000f,\r
-     -0.16406250000000000000f,     -0.15625000000000000000f,\r
-     -0.14062500000000000000f,     -0.07421875000000000000f,\r
-      0.10156250000000001000f,      0.20312500000000003000f,\r
-      0.31250000000000000000f,      0.41015625000000000000f,\r
-     -0.28515625000000000000f,     -0.26953125000000000000f,\r
-     -0.24218750000000000000f,     -0.16796875000000000000f,\r
-     -0.12109375000000000000f,     -0.09765625000000000000f,\r
-      0.08203125000000000000f,      0.18750000000000000000f,\r
-      0.29687500000000000000f,      0.39453125000000000000f,\r
-      0.03125000000000000000f,      0.02734375000000000000f,\r
-      0.01953125000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-     -0.03125000000000000000f,     -0.04296874999999999300f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.02343750000000000000f,\r
-     -0.01562500000000000000f,     -0.02734375000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.02343750000000000000f,      0.01953125000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.03125000000000000000f,\r
-      0.01953125000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.03125000000000000000f,      0.01953125000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.03515625000000000000f,     -0.05078125000000000700f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.01562500000000000000f,     -0.00390625000000000000f,\r
-      0.03515625000000000000f,      0.01562500000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-     -0.03515625000000000000f,      0.01562500000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-      0.04296874999999999300f,      0.02734375000000000000f,\r
-      0.01562500000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,     -0.04296874999999999300f,\r
-      0.01562500000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.01953125000000000000f,\r
-      0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.04687500000000000000f,      0.03125000000000000000f,\r
-      0.01953125000000000000f,      0.01171875000000000000f,\r
-     -0.00390625000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.01562500000000000000f,\r
-     -0.01953125000000000000f,     -0.02343750000000000000f,\r
-     -0.05078125000000000700f,      0.01953125000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01953125000000000000f,     -0.01953125000000000000f,\r
-     -0.03906250000000000000f,      0.03125000000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.01171875000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-     -0.01953125000000000000f,     -0.00781250000000000000f,\r
-     -0.01953125000000000000f,     -0.03125000000000000000f,\r
-      0.03906250000000000000f,      0.01953125000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,     -0.01953125000000000000f,\r
-     -0.03515625000000000000f,      0.04687500000000000000f,\r
-      0.02343750000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.01953125000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.04687500000000000000f,\r
-      0.03125000000000000000f,      0.01562500000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.01953125000000000000f,     -0.02734375000000000000f,\r
-      0.02343750000000000000f,      0.01171875000000000000f,\r
-     -0.00781250000000000000f,     -0.01171875000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.01562500000000000000f,\r
-     -0.03125000000000000000f,      0.02734375000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,     -0.01171875000000000000f,\r
-     -0.01171875000000000000f,      0.01953125000000000000f,\r
-      0.01562500000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.01171875000000000000f,\r
-     -0.01171875000000000000f,     -0.02734375000000000000f,\r
-      0.02343750000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.02343750000000000000f,\r
-      0.01171875000000000000f,      0.02343750000000000000f,\r
-      0.02343750000000000000f,      0.01171875000000000000f,\r
-      0.01562500000000000000f,      0.01953125000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.01953125000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.01562500000000000000f,\r
-     -0.01562500000000000000f,     -0.02734375000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.01562500000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.02734375000000000000f,\r
-     -0.00390625000000000000f,      0.02343750000000000000f,\r
-     -0.01562500000000000000f,     -0.01562500000000000000f,\r
-     -0.01953125000000000000f,     -0.01953125000000000000f,\r
-     -0.01562500000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.01171875000000000000f,\r
-     -0.03906250000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.02734375000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.02343750000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.01562500000000000000f,     -0.01562500000000000000f,\r
-     -0.00390625000000000000f,     -0.01562500000000000000f,\r
-      0.01171875000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,     -0.01953125000000000000f,\r
-      0.01953125000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.01953125000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.01562500000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.01953125000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.02734375000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.01562500000000000000f,\r
-      0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.01953125000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01171875000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,     -0.01171875000000000000f,\r
-     -0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.01953125000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.01953125000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01171875000000000000f,\r
-     -0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.01171875000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,     -0.01171875000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.01171875000000000000f,\r
-     -0.01171875000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.01171875000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.01953125000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.01562500000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.01953125000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.01171875000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f\r
-};\r
-\r
-const SKP_Silk_NLSF_CBS_FLP SKP_Silk_NLSF_CB0_10_Stage_info_FLP[ NLSF_MSVQ_CB0_10_STAGES ] =\r
-{\r
-        {  64, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 *   0 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[   0 ] },\r
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 *  64 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[  64 ] },\r
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 *  80 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[  80 ] },\r
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 *  88 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[  88 ] },\r
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 *  96 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[  96 ] },\r
-        {   8, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 * 104 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[ 104 ] },\r
-        {  16, &SKP_Silk_NLSF_MSVQ_CB0_10[ 10 * 112 ], &SKP_Silk_NLSF_MSVQ_CB0_10_rates[ 112 ] }\r
-};\r
-\r
-const SKP_Silk_NLSF_CB_FLP SKP_Silk_NLSF_CB0_10_FLP =\r
-{\r
-        NLSF_MSVQ_CB0_10_STAGES,\r
-        SKP_Silk_NLSF_CB0_10_Stage_info_FLP,\r
-        SKP_Silk_NLSF_MSVQ_CB0_10_ndelta_min,\r
-        SKP_Silk_NLSF_MSVQ_CB0_10_CDF,\r
-        SKP_Silk_NLSF_MSVQ_CB0_10_CDF_start_ptr,\r
-        SKP_Silk_NLSF_MSVQ_CB0_10_CDF_middle_idx\r
-};\r
-\r
diff --git a/src_FLP/SKP_Silk_tables_NLSF_CB0_16_FLP.c b/src_FLP/SKP_Silk_tables_NLSF_CB0_16_FLP.c
deleted file mode 100644 (file)
index f7a7c27..0000000
+++ /dev/null
@@ -1,1381 +0,0 @@
-/***********************************************************************\r
-Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
-Redistribution and use in source and binary forms, with or without \r
-modification, (subject to the limitations in the disclaimer below) \r
-are permitted provided that the following conditions are met:\r
-- Redistributions of source code must retain the above copyright notice,\r
-this list of conditions and the following disclaimer.\r
-- Redistributions in binary form must reproduce the above copyright \r
-notice, this list of conditions and the following disclaimer in the \r
-documentation and/or other materials provided with the distribution.\r
-- Neither the name of Skype Limited, nor the names of specific \r
-contributors, may be used to endorse or promote products derived from \r
-this software without specific prior written permission.\r
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
-BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
-CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-***********************************************************************/\r
-\r
-/**********************************************/\r
-/* This file has been automatically generated */\r
-/*                                            */\r
-/* ROM usage: 10.40 kB                        */\r
-/**********************************************/\r
-\r
-#include "SKP_Silk_tables_FLP.h"\r
-#include "SKP_Silk_tables_NLSF_CB0_16.h"\r
-\r
-const SKP_float SKP_Silk_NLSF_MSVQ_CB0_16_rates[ NLSF_MSVQ_CB0_16_VECTORS ] =\r
-{\r
-      4.62500000000000000000f,      4.75000000000000000000f,\r
-      4.81250000000000000000f,      5.06250000000000000000f,\r
-      5.25000000000000000000f,      5.25000000000000000000f,\r
-      5.31250000000000000000f,      5.50000000000000000000f,\r
-      5.56250000000000000000f,      5.56250000000000000000f,\r
-      5.56250000000000000000f,      5.62500000000000000000f,\r
-      5.75000000000000000000f,      5.81250000000000000000f,\r
-      5.81250000000000000000f,      5.81250000000000000000f,\r
-      5.87500000000000000000f,      5.87500000000000000000f,\r
-      5.87500000000000000000f,      5.87500000000000000000f,\r
-      5.93750000000000000000f,      5.93750000000000000000f,\r
-      5.93750000000000000000f,      6.00000000000000000000f,\r
-      6.00000000000000000000f,      6.00000000000000000000f,\r
-      6.00000000000000000000f,      6.06250000000000000000f,\r
-      6.06250000000000000000f,      6.12500000000000000000f,\r
-      6.12500000000000000000f,      6.12500000000000000000f,\r
-      6.12500000000000000000f,      6.18750000000000000000f,\r
-      6.18750000000000000000f,      6.18750000000000000000f,\r
-      6.25000000000000000000f,      6.25000000000000000000f,\r
-      6.25000000000000000000f,      6.25000000000000000000f,\r
-      6.25000000000000000000f,      6.31250000000000000000f,\r
-      6.31250000000000000000f,      6.31250000000000000000f,\r
-      6.37500000000000000000f,      6.37500000000000000000f,\r
-      6.43750000000000000000f,      6.50000000000000000000f,\r
-      6.50000000000000000000f,      6.56250000000000000000f,\r
-      6.62500000000000000000f,      6.68750000000000000000f,\r
-      6.68750000000000000000f,      6.68750000000000000000f,\r
-      6.68750000000000000000f,      6.75000000000000000000f,\r
-      6.75000000000000000000f,      6.81250000000000000000f,\r
-      6.81250000000000000000f,      6.93750000000000000000f,\r
-      6.93750000000000000000f,      7.12500000000000000000f,\r
-      7.37500000000000000000f,      7.75000000000000000000f,\r
-      3.56250000000000000000f,      3.62500000000000000000f,\r
-      3.62500000000000000000f,      3.75000000000000000000f,\r
-      3.81250000000000000000f,      3.93750000000000000000f,\r
-      4.06250000000000000000f,      4.06250000000000000000f,\r
-      4.12500000000000000000f,      4.12500000000000000000f,\r
-      4.18750000000000000000f,      4.18750000000000000000f,\r
-      4.25000000000000000000f,      4.31250000000000000000f,\r
-      4.37500000000000000000f,      4.37500000000000000000f,\r
-      2.62500000000000000000f,      2.93750000000000000000f,\r
-      2.93750000000000000000f,      3.00000000000000000000f,\r
-      3.00000000000000000000f,      3.18750000000000000000f,\r
-      3.18750000000000000000f,      3.25000000000000000000f,\r
-      2.87500000000000000000f,      2.87500000000000000000f,\r
-      2.93750000000000000000f,      2.93750000000000000000f,\r
-      3.00000000000000000000f,      3.00000000000000000000f,\r
-      3.06250000000000000000f,      3.31250000000000000000f,\r
-      2.75000000000000000000f,      2.75000000000000000000f,\r
-      3.00000000000000000000f,      3.00000000000000000000f,\r
-      3.06250000000000000000f,      3.06250000000000000000f,\r
-      3.18750000000000000000f,      3.25000000000000000000f,\r
-      2.81250000000000000000f,      2.81250000000000000000f,\r
-      2.87500000000000000000f,      2.87500000000000000000f,\r
-      3.06250000000000000000f,      3.06250000000000000000f,\r
-      3.25000000000000000000f,      3.31250000000000000000f,\r
-      2.81250000000000000000f,      2.93750000000000000000f,\r
-      2.93750000000000000000f,      2.93750000000000000000f,\r
-      3.00000000000000000000f,      3.06250000000000000000f,\r
-      3.12500000000000000000f,      3.25000000000000000000f,\r
-      2.87500000000000000000f,      2.87500000000000000000f,\r
-      2.87500000000000000000f,      2.93750000000000000000f,\r
-      3.00000000000000000000f,      3.12500000000000000000f,\r
-      3.18750000000000000000f,      3.18750000000000000000f,\r
-      2.87500000000000000000f,      2.93750000000000000000f,\r
-      3.00000000000000000000f,      3.00000000000000000000f,\r
-      3.00000000000000000000f,      3.00000000000000000000f,\r
-      3.00000000000000000000f,      3.18750000000000000000f,\r
-      3.75000000000000000000f,      3.75000000000000000000f,\r
-      3.81250000000000000000f,      3.87500000000000000000f,\r
-      3.93750000000000000000f,      3.93750000000000000000f,\r
-      3.93750000000000000000f,      4.00000000000000000000f,\r
-      4.00000000000000000000f,      4.06250000000000000000f,\r
-      4.06250000000000000000f,      4.12500000000000000000f,\r
-      4.12500000000000000000f,      4.12500000000000000000f,\r
-      4.31250000000000000000f,      4.37500000000000000000f\r
-};\r
-\r
-const SKP_float SKP_Silk_NLSF_MSVQ_CB0_16_ndelta_min[ 16 + 1 ] =\r
-{\r
-      0.00720214843750000000f,\r
-      0.00012207031250000000f,\r
-      0.00228881835937500000f,\r
-      0.00009155273437500000f,\r
-      0.00009155273437500000f,\r
-      0.00015258789062500000f,\r
-      0.00350952148437500040f,\r
-      0.00289916992187500000f,\r
-      0.00344848632812500000f,\r
-      0.00421142578125000000f,\r
-      0.00537109374999999910f,\r
-      0.00515747070312500000f,\r
-      0.00759887695312500000f,\r
-      0.00781250000000000000f,\r
-      0.00827026367187500000f,\r
-      0.00802612304687500000f,\r
-      0.01922607421875000000f\r
-};\r
-\r
-const SKP_float SKP_Silk_NLSF_MSVQ_CB0_16[ 16 * NLSF_MSVQ_CB0_16_VECTORS ] =\r
-{\r
-     -0.45703125000000000000f,     -0.41406250000000000000f,\r
-     -0.36718750000000000000f,     -0.31640625000000000000f,\r
-     -0.25390625000000000000f,     -0.20312500000000003000f,\r
-     -0.14453125000000000000f,     -0.08593749999999998600f,\r
-     -0.01953125000000000000f,      0.04296874999999999300f,\r
-      0.10546875000000000000f,      0.16406250000000000000f,\r
-      0.23046875000000000000f,      0.29296875000000000000f,\r
-      0.35546875000000000000f,      0.41406250000000000000f,\r
-     -0.46874999999999994000f,     -0.45312500000000000000f,\r
-     -0.39062500000000000000f,     -0.32812500000000000000f,\r
-     -0.26171875000000000000f,     -0.19140625000000000000f,\r
-     -0.12500000000000000000f,     -0.06250000000000000000f,\r
-      0.00000000000000000000f,      0.05859374999999999300f,\r
-      0.11718749999999999000f,      0.17968750000000000000f,\r
-      0.24218750000000000000f,      0.30078125000000000000f,\r
-      0.36718750000000000000f,      0.42578124999999994000f,\r
-     -0.47265625000000000000f,     -0.45312500000000000000f,\r
-     -0.39843750000000000000f,     -0.33203125000000000000f,\r
-     -0.27734375000000000000f,     -0.22656250000000000000f,\r
-     -0.15234375000000000000f,     -0.09375000000000000000f,\r
-     -0.01953125000000000000f,      0.03906250000000000000f,\r
-      0.11328125000000000000f,      0.17578125000000000000f,\r
-      0.23828125000000000000f,      0.30078125000000000000f,\r
-      0.35937500000000000000f,      0.41796875000000000000f,\r
-     -0.46874999999999994000f,     -0.45312500000000000000f,\r
-     -0.36718750000000000000f,     -0.32421875000000006000f,\r
-     -0.26953125000000000000f,     -0.22265625000000000000f,\r
-     -0.17968750000000000000f,     -0.09765625000000000000f,\r
-     -0.02734375000000000000f,      0.03906250000000000000f,\r
-      0.10546875000000000000f,      0.16406250000000000000f,\r
-      0.22656250000000000000f,      0.29296875000000000000f,\r
-      0.35546875000000000000f,      0.41796875000000000000f,\r
-     -0.44531250000000000000f,     -0.42578124999999994000f,\r
-     -0.36718750000000000000f,     -0.30859375000000000000f,\r
-     -0.25781250000000000000f,     -0.20312500000000003000f,\r
-     -0.13671875000000000000f,     -0.07031250000000000000f,\r
-     -0.01562500000000000000f,      0.03515625000000000000f,\r
-      0.10156250000000001000f,      0.15625000000000000000f,\r
-      0.20703125000000000000f,      0.25390625000000000000f,\r
-      0.31640625000000000000f,      0.35937500000000000000f,\r
-     -0.44531250000000000000f,     -0.42187500000000000000f,\r
-     -0.37500000000000000000f,     -0.28906250000000000000f,\r
-     -0.24218750000000000000f,     -0.19531250000000000000f,\r
-     -0.13281250000000000000f,     -0.07031250000000000000f,\r
-      0.00000000000000000000f,      0.07031250000000000000f,\r
-      0.12890625000000000000f,      0.18359375000000000000f,\r
-      0.23828125000000000000f,      0.30078125000000000000f,\r
-      0.36718750000000000000f,      0.41796875000000000000f,\r
-     -0.45312500000000000000f,     -0.42578124999999994000f,\r
-     -0.38671875000000006000f,     -0.32812500000000000000f,\r
-     -0.27734375000000000000f,     -0.23437499999999997000f,\r
-     -0.17187499999999997000f,     -0.11718749999999999000f,\r
-     -0.03515625000000000000f,      0.01953125000000000000f,\r
-      0.07031250000000000000f,      0.12890625000000000000f,\r
-      0.20312500000000003000f,      0.27343750000000000000f,\r
-      0.34374999999999994000f,      0.41406250000000000000f,\r
-     -0.46484375000000000000f,     -0.44531250000000000000f,\r
-     -0.38671875000000006000f,     -0.34765625000000000000f,\r
-     -0.27734375000000000000f,     -0.23437499999999997000f,\r
-     -0.19531250000000000000f,     -0.14453125000000000000f,\r
-     -0.01562500000000000000f,      0.04687500000000000000f,\r
-      0.10937500000000000000f,      0.17968750000000000000f,\r
-      0.23437499999999997000f,      0.30078125000000000000f,\r
-      0.35546875000000000000f,      0.41406250000000000000f,\r
-     -0.44140625000000000000f,     -0.42578124999999994000f,\r
-     -0.33984375000000000000f,     -0.30468750000000000000f,\r
-     -0.26171875000000000000f,     -0.20312500000000003000f,\r
-     -0.15625000000000000000f,     -0.07421875000000000000f,\r
-     -0.03125000000000000000f,      0.04687500000000000000f,\r
-      0.11328125000000000000f,      0.16796875000000000000f,\r
-      0.22656250000000000000f,      0.29296875000000000000f,\r
-      0.36718750000000000000f,      0.44140625000000000000f,\r
-     -0.46484375000000000000f,     -0.44531250000000000000f,\r
-     -0.34374999999999994000f,     -0.30078125000000000000f,\r
-     -0.24609375000000000000f,     -0.19140625000000000000f,\r
-     -0.14062500000000000000f,     -0.08984375000000000000f,\r
-      0.00390625000000000000f,      0.06640625000000000000f,\r
-      0.12890625000000000000f,      0.19921875000000000000f,\r
-      0.26562500000000000000f,      0.31640625000000000000f,\r
-      0.37890625000000000000f,      0.42578124999999994000f,\r
-     -0.46484375000000000000f,     -0.44531250000000000000f,\r
-     -0.39453125000000000000f,     -0.34374999999999994000f,\r
-     -0.27734375000000000000f,     -0.22265625000000000000f,\r
-     -0.16406250000000000000f,     -0.06250000000000000000f,\r
-     -0.00390625000000000000f,      0.04296874999999999300f,\r
-      0.09375000000000000000f,      0.14843750000000000000f,\r
-      0.21093750000000000000f,      0.26953125000000000000f,\r
-      0.35156250000000000000f,      0.42968750000000000000f,\r
-     -0.45312500000000000000f,     -0.40234375000000000000f,\r
-     -0.33593750000000000000f,     -0.28515625000000000000f,\r
-     -0.22265625000000000000f,     -0.16796875000000000000f,\r
-     -0.10546875000000000000f,     -0.05078125000000000700f,\r
-      0.00781250000000000000f,      0.06250000000000000000f,\r
-      0.12109375000000000000f,      0.17578125000000000000f,\r
-      0.23828125000000000000f,      0.29687500000000000000f,\r
-      0.35937500000000000000f,      0.42187500000000000000f,\r
-     -0.45312500000000000000f,     -0.43750000000000000000f,\r
-     -0.39062500000000000000f,     -0.30078125000000000000f,\r
-     -0.26562500000000000000f,     -0.19921875000000000000f,\r
-     -0.16015625000000000000f,     -0.08593749999999998600f,\r
-     -0.04296874999999999300f,      0.00000000000000000000f,\r
-      0.06250000000000000000f,      0.14453125000000000000f,\r
-      0.21875000000000000000f,      0.28125000000000000000f,\r
-      0.34374999999999994000f,      0.40625000000000006000f,\r
-     -0.46093750000000000000f,     -0.44140625000000000000f,\r
-     -0.37500000000000000000f,     -0.32812500000000000000f,\r
-     -0.26953125000000000000f,     -0.21484375000000000000f,\r
-     -0.16406250000000000000f,     -0.11718749999999999000f,\r
-     -0.04687500000000000000f,      0.06640625000000000000f,\r
-      0.12890625000000000000f,      0.19921875000000000000f,\r
-      0.27343750000000000000f,      0.32421875000000006000f,\r
-      0.38281250000000000000f,      0.42968750000000000000f,\r
-     -0.42578124999999994000f,     -0.40625000000000006000f,\r
-     -0.35937500000000000000f,     -0.31250000000000000000f,\r
-     -0.26171875000000000000f,     -0.21875000000000000000f,\r
-     -0.16015625000000000000f,     -0.10937500000000000000f,\r
-     -0.05078125000000000700f,      0.00000000000000000000f,\r
-      0.05468750000000000000f,      0.10937500000000000000f,\r
-      0.16796875000000000000f,      0.23437499999999997000f,\r
-      0.33203125000000000000f,      0.40625000000000006000f,\r
-     -0.43750000000000000000f,     -0.41796875000000000000f,\r
-     -0.37109375000000000000f,     -0.32031250000000000000f,\r
-     -0.27734375000000000000f,     -0.22265625000000000000f,\r
-     -0.17578125000000000000f,     -0.10156250000000001000f,\r
-     -0.04296874999999999300f,      0.00390625000000000000f,\r
-      0.10546875000000000000f,      0.16015625000000000000f,\r
-      0.20703125000000000000f,      0.25781250000000000000f,\r
-      0.32812500000000000000f,      0.40625000000000006000f,\r
-     -0.44921875000000006000f,     -0.43359375000000000000f,\r
-     -0.38671875000000006000f,     -0.35937500000000000000f,\r
-     -0.24609375000000000000f,     -0.20312500000000003000f,\r
-     -0.15234375000000000000f,     -0.09375000000000000000f,\r
-     -0.05078125000000000700f,      0.01953125000000000000f,\r
-      0.10546875000000000000f,      0.16406250000000000000f,\r
-      0.23437499999999997000f,      0.30468750000000000000f,\r
-      0.36328124999999994000f,      0.42578124999999994000f,\r
-     -0.43750000000000000000f,     -0.42187500000000000000f,\r
-     -0.37500000000000000000f,     -0.34765625000000000000f,\r
-     -0.30078125000000000000f,     -0.19921875000000000000f,\r
-     -0.16015625000000000000f,     -0.08593749999999998600f,\r
-     -0.04296874999999999300f,      0.05078125000000000700f,\r
-      0.12109375000000000000f,      0.17187499999999997000f,\r
-      0.22265625000000000000f,      0.28125000000000000000f,\r
-      0.33984375000000000000f,      0.41015625000000000000f,\r
-     -0.43359375000000000000f,     -0.41796875000000000000f,\r
-     -0.37109375000000000000f,     -0.33984375000000000000f,\r
-     -0.30078125000000000000f,     -0.19140625000000000000f,\r
-     -0.14843750000000000000f,     -0.09375000000000000000f,\r
-     -0.03906250000000000000f,      0.00000000000000000000f,\r
-      0.05859374999999999300f,      0.11718749999999999000f,\r
-      0.21093750000000000000f,      0.29296875000000000000f,\r
-      0.36328124999999994000f,      0.41796875000000000000f,\r
-     -0.41796875000000000000f,     -0.40234375000000000000f,\r
-     -0.36328124999999994000f,     -0.28906250000000000000f,\r
-     -0.20312500000000003000f,     -0.17187499999999997000f,\r
-     -0.12109375000000000000f,     -0.06250000000000000000f,\r
-     -0.01171875000000000000f,      0.03906250000000000000f,\r
-      0.12890625000000000000f,      0.17578125000000000000f,\r
-      0.22656250000000000000f,      0.27734375000000000000f,\r
-      0.33203125000000000000f,      0.38281250000000000000f,\r
-     -0.44921875000000006000f,     -0.43359375000000000000f,\r
-     -0.38281250000000000000f,     -0.28125000000000000000f,\r
-     -0.23437499999999997000f,     -0.19140625000000000000f,\r
-     -0.13671875000000000000f,     -0.09375000000000000000f,\r
-      0.00390625000000000000f,      0.04296874999999999300f,\r
-      0.09765625000000000000f,      0.14843750000000000000f,\r
-      0.21875000000000000000f,      0.31640625000000000000f,\r
-      0.38281250000000000000f,      0.43750000000000000000f,\r
-     -0.45312500000000000000f,     -0.43750000000000000000f,\r
-     -0.39843750000000000000f,     -0.27343750000000000000f,\r
-     -0.23046875000000000000f,     -0.19140625000000000000f,\r
-     -0.14062500000000000000f,     -0.09765625000000000000f,\r
-     -0.02734375000000000000f,      0.01953125000000000000f,\r
-      0.06640625000000000000f,      0.11718749999999999000f,\r
-      0.18750000000000000000f,      0.25781250000000000000f,\r
-      0.33984375000000000000f,      0.40234375000000000000f,\r
-     -0.44140625000000000000f,     -0.42578124999999994000f,\r
-     -0.36718750000000000000f,     -0.33593750000000000000f,\r
-     -0.29296875000000000000f,     -0.25000000000000000000f,\r
-     -0.20312500000000003000f,     -0.09375000000000000000f,\r
-     -0.05468750000000000000f,      0.02343750000000000000f,\r
-      0.08984375000000000000f,      0.16796875000000000000f,\r
-      0.23828125000000000000f,      0.30078125000000000000f,\r
-      0.35937500000000000000f,      0.42187500000000000000f,\r
-     -0.46093750000000000000f,     -0.43750000000000000000f,\r
-     -0.39062500000000000000f,     -0.35156250000000000000f,\r
-     -0.25390625000000000000f,     -0.20703125000000000000f,\r
-     -0.15234375000000000000f,     -0.08593749999999998600f,\r
-      0.02343750000000000000f,      0.07031250000000000000f,\r
-      0.12500000000000000000f,      0.19140625000000000000f,\r
-      0.26171875000000000000f,      0.31640625000000000000f,\r
-      0.37890625000000000000f,      0.42578124999999994000f,\r
-     -0.45312500000000000000f,     -0.42578124999999994000f,\r
-     -0.38671875000000006000f,     -0.31250000000000000000f,\r
-     -0.26953125000000000000f,     -0.21484375000000000000f,\r
-     -0.16015625000000000000f,     -0.10546875000000000000f,\r
-     -0.04296874999999999300f,      0.01171875000000000000f,\r
-      0.08984375000000000000f,      0.15625000000000000000f,\r
-      0.23828125000000000000f,      0.31250000000000000000f,\r
-      0.39453125000000000000f,      0.44140625000000000000f,\r
-     -0.42968750000000000000f,     -0.41406250000000000000f,\r
-     -0.35937500000000000000f,     -0.32812500000000000000f,\r
-     -0.28515625000000000000f,     -0.16406250000000000000f,\r
-     -0.12109375000000000000f,     -0.06640625000000000000f,\r
-     -0.00390625000000000000f,      0.03906250000000000000f,\r
-      0.10156250000000001000f,      0.14453125000000000000f,\r
-      0.19921875000000000000f,      0.29687500000000000000f,\r
-      0.38671875000000006000f,      0.44140625000000000000f,\r
-     -0.45312500000000000000f,     -0.42968750000000000000f,\r
-     -0.36328124999999994000f,     -0.29296875000000000000f,\r
-     -0.22265625000000000000f,     -0.16015625000000000000f,\r
-     -0.08203125000000000000f,     -0.02343750000000000000f,\r
-      0.03906250000000000000f,      0.09765625000000000000f,\r
-      0.15625000000000000000f,      0.21093750000000000000f,\r
-      0.26562500000000000000f,      0.32031250000000000000f,\r
-      0.37500000000000000000f,      0.42968750000000000000f,\r
-     -0.45312500000000000000f,     -0.43359375000000000000f,\r
-     -0.39062500000000000000f,     -0.35937500000000000000f,\r
-     -0.31640625000000000000f,     -0.17968750000000000000f,\r
-     -0.12500000000000000000f,     -0.07421875000000000000f,\r
-     -0.01953125000000000000f,      0.02734375000000000000f,\r
-      0.09765625000000000000f,      0.16406250000000000000f,\r
-      0.22656250000000000000f,      0.28906250000000000000f,\r
-      0.35937500000000000000f,      0.41796875000000000000f,\r
-     -0.43750000000000000000f,     -0.42578124999999994000f,\r
-     -0.33593750000000000000f,     -0.30468750000000000000f,\r
-     -0.26562500000000000000f,     -0.21875000000000000000f,\r
-     -0.17578125000000000000f,     -0.08593749999999998600f,\r
-     -0.05078125000000000700f,     -0.00390625000000000000f,\r
-      0.05078125000000000700f,      0.12500000000000000000f,\r
-      0.22656250000000000000f,      0.30468750000000000000f,\r
-      0.35546875000000000000f,      0.41796875000000000000f,\r
-     -0.42187500000000000000f,     -0.40625000000000006000f,\r
-     -0.34765625000000000000f,     -0.29687500000000000000f,\r
-     -0.25781250000000000000f,     -0.20312500000000003000f,\r
-     -0.14843750000000000000f,     -0.10156250000000001000f,\r
-     -0.02734375000000000000f,      0.01562500000000000000f,\r
-      0.07031250000000000000f,      0.11718749999999999000f,\r
-      0.16796875000000000000f,      0.28906250000000000000f,\r
-      0.38281250000000000000f,      0.43750000000000000000f,\r
-     -0.44531250000000000000f,     -0.42968750000000000000f,\r
-     -0.32031250000000000000f,     -0.28125000000000000000f,\r
-     -0.23828125000000000000f,     -0.19531250000000000000f,\r
-     -0.14453125000000000000f,     -0.07812500000000000000f,\r
-     -0.04296874999999999300f,      0.00390625000000000000f,\r
-      0.06640625000000000000f,      0.17968750000000000000f,\r
-      0.24218750000000000000f,      0.30468750000000000000f,\r
-      0.36328124999999994000f,      0.43750000000000000000f,\r
-     -0.43750000000000000000f,     -0.42187500000000000000f,\r
-     -0.38671875000000006000f,     -0.30078125000000000000f,\r
-     -0.25781250000000000000f,     -0.22656250000000000000f,\r
-     -0.12890625000000000000f,     -0.08593749999999998600f,\r
-     -0.04296874999999999300f,      0.05078125000000000700f,\r
-      0.09765625000000000000f,      0.13671875000000000000f,\r
-      0.18359375000000000000f,      0.25000000000000000000f,\r
-      0.33984375000000000000f,      0.42187500000000000000f,\r
-     -0.44140625000000000000f,     -0.42578124999999994000f,\r
-     -0.37500000000000000000f,     -0.27343750000000000000f,\r
-     -0.23046875000000000000f,     -0.19140625000000000000f,\r
-     -0.13671875000000000000f,     -0.09375000000000000000f,\r
-     -0.02343750000000000000f,      0.02734375000000000000f,\r
-      0.07421875000000000000f,      0.13281250000000000000f,\r
-      0.25390625000000000000f,      0.30859375000000000000f,\r
-      0.36718750000000000000f,      0.41406250000000000000f,\r
-     -0.44921875000000006000f,     -0.43359375000000000000f,\r
-     -0.37500000000000000000f,     -0.33203125000000000000f,\r
-     -0.28125000000000000000f,     -0.23046875000000000000f,\r
-     -0.18359375000000000000f,     -0.12890625000000000000f,\r
-     -0.07812500000000000000f,     -0.03125000000000000000f,\r
-      0.03125000000000000000f,      0.13671875000000000000f,\r
-      0.21875000000000000000f,      0.28906250000000000000f,\r
-      0.35937500000000000000f,      0.42968750000000000000f,\r
-     -0.43359375000000000000f,     -0.42187500000000000000f,\r
-     -0.35937500000000000000f,     -0.25390625000000000000f,\r
-     -0.21093750000000000000f,     -0.17578125000000000000f,\r
-     -0.12109375000000000000f,     -0.07812500000000000000f,\r
-     -0.00781250000000000000f,      0.04296874999999999300f,\r
-      0.08984375000000000000f,      0.13281250000000000000f,\r
-      0.18359375000000000000f,      0.24609375000000000000f,\r
-      0.37500000000000000000f,      0.44531250000000000000f,\r
-     -0.44140625000000000000f,     -0.42187500000000000000f,\r
-     -0.38281250000000000000f,     -0.33984375000000000000f,\r
-     -0.30859375000000000000f,     -0.26562500000000000000f,\r
-     -0.12500000000000000000f,     -0.07421875000000000000f,\r
-     -0.01953125000000000000f,      0.04687500000000000000f,\r
-      0.09765625000000000000f,      0.16015625000000000000f,\r
-      0.23437499999999997000f,      0.30078125000000000000f,\r
-      0.37500000000000000000f,      0.42578124999999994000f,\r
-     -0.44921875000000006000f,     -0.42578124999999994000f,\r
-     -0.37500000000000000000f,     -0.32031250000000000000f,\r
-     -0.22656250000000000000f,     -0.18750000000000000000f,\r
-     -0.13281250000000000000f,     -0.06640625000000000000f,\r
-     -0.01562500000000000000f,      0.03515625000000000000f,\r
-      0.14062500000000000000f,      0.19531250000000000000f,\r
-      0.25390625000000000000f,      0.30859375000000000000f,\r
-      0.37890625000000000000f,      0.42578124999999994000f,\r
-     -0.44921875000000006000f,     -0.42968750000000000000f,\r
-     -0.39062500000000000000f,     -0.34374999999999994000f,\r
-     -0.21875000000000000000f,     -0.17578125000000000000f,\r
-     -0.13281250000000000000f,     -0.08203125000000000000f,\r
-     -0.02734375000000000000f,      0.02734375000000000000f,\r
-      0.09375000000000000000f,      0.14453125000000000000f,\r
-      0.19531250000000000000f,      0.25000000000000000000f,\r
-      0.33593750000000000000f,      0.41796875000000000000f,\r
-     -0.40625000000000006000f,     -0.38281250000000000000f,\r
-     -0.34374999999999994000f,     -0.30078125000000000000f,\r
-     -0.23437499999999997000f,     -0.19921875000000000000f,\r
-     -0.14453125000000000000f,     -0.07031250000000000000f,\r
-     -0.01171875000000000000f,      0.03125000000000000000f,\r
-      0.09765625000000000000f,      0.15625000000000000000f,\r
-      0.20703125000000000000f,      0.26562500000000000000f,\r
-      0.35546875000000000000f,      0.41796875000000000000f,\r
-     -0.46093750000000000000f,     -0.44140625000000000000f,\r
-     -0.37890625000000000000f,     -0.33203125000000000000f,\r
-     -0.28906250000000000000f,     -0.24218750000000000000f,\r
-     -0.19921875000000000000f,     -0.15625000000000000000f,\r
-     -0.09765625000000000000f,      0.01562500000000000000f,\r
-      0.09375000000000000000f,      0.15625000000000000000f,\r
-      0.22265625000000000000f,      0.29296875000000000000f,\r
-      0.35937500000000000000f,      0.42578124999999994000f,\r
-     -0.41796875000000000000f,     -0.40234375000000000000f,\r
-     -0.35937500000000000000f,     -0.32421875000000006000f,\r
-     -0.28906250000000000000f,     -0.24218750000000000000f,\r
-     -0.10937500000000000000f,     -0.07031250000000000000f,\r
-     -0.01562500000000000000f,      0.03515625000000000000f,\r
-      0.08593749999999998600f,      0.13281250000000000000f,\r
-      0.19531250000000000000f,      0.26171875000000000000f,\r
-      0.33984375000000000000f,      0.41796875000000000000f,\r
-     -0.45312500000000000000f,     -0.43750000000000000000f,\r
-     -0.29296875000000000000f,     -0.26171875000000000000f,\r
-     -0.21875000000000000000f,     -0.17578125000000000000f,\r
-     -0.12109375000000000000f,     -0.06250000000000000000f,\r
-     -0.01953125000000000000f,      0.03906250000000000000f,\r
-      0.11718749999999999000f,      0.17578125000000000000f,\r
-      0.24609375000000000000f,      0.30859375000000000000f,\r
-      0.37500000000000000000f,      0.43359375000000000000f,\r
-     -0.41406250000000000000f,     -0.39843750000000000000f,\r
-     -0.34374999999999994000f,     -0.30078125000000000000f,\r
-     -0.26562500000000000000f,     -0.20312500000000003000f,\r
-     -0.14843750000000000000f,     -0.09765625000000000000f,\r
-     -0.01562500000000000000f,      0.02734375000000000000f,\r
-      0.08984375000000000000f,      0.14062500000000000000f,\r
-      0.25781250000000000000f,      0.32812500000000000000f,\r
-      0.38281250000000000000f,      0.43359375000000000000f,\r
-     -0.40234375000000000000f,     -0.38671875000000006000f,\r
-     -0.33984375000000000000f,     -0.29687500000000000000f,\r
-     -0.25781250000000000000f,     -0.21875000000000000000f,\r
-     -0.11328125000000000000f,     -0.05078125000000000700f,\r
-      0.00000000000000000000f,      0.05468750000000000000f,\r
-      0.12109375000000000000f,      0.16406250000000000000f,\r
-      0.22265625000000000000f,      0.27734375000000000000f,\r
-      0.33203125000000000000f,      0.37500000000000000000f,\r
-     -0.44531250000000000000f,     -0.43359375000000000000f,\r
-     -0.35546875000000000000f,     -0.22656250000000000000f,\r
-     -0.18359375000000000000f,     -0.14843750000000000000f,\r
-     -0.10156250000000001000f,     -0.05468750000000000000f,\r
-      0.01171875000000000000f,      0.05078125000000000700f,\r
-      0.10156250000000001000f,      0.15625000000000000000f,\r
-      0.24218750000000000000f,      0.31250000000000000000f,\r
-      0.37500000000000000000f,      0.42968750000000000000f,\r
-     -0.44531250000000000000f,     -0.42968750000000000000f,\r
-     -0.35156250000000000000f,     -0.32421875000000006000f,\r
-     -0.28125000000000000000f,     -0.25000000000000000000f,\r
-     -0.14062500000000000000f,     -0.09375000000000000000f,\r
-     -0.05078125000000000700f,      0.02343750000000000000f,\r
-      0.10937500000000000000f,      0.19140625000000000000f,\r
-      0.25781250000000000000f,      0.31640625000000000000f,\r
-      0.37890625000000000000f,      0.43750000000000000000f,\r
-     -0.42578124999999994000f,     -0.41015625000000000000f,\r
-     -0.35546875000000000000f,     -0.32031250000000000000f,\r
-     -0.27734375000000000000f,     -0.19921875000000000000f,\r
-     -0.14843750000000000000f,     -0.09375000000000000000f,\r
-     -0.03906250000000000000f,      0.00390625000000000000f,\r
-      0.07812500000000000000f,      0.19140625000000000000f,\r
-      0.25000000000000000000f,      0.30468750000000000000f,\r
-      0.35546875000000000000f,      0.41406250000000000000f,\r
-     -0.43359375000000000000f,     -0.41796875000000000000f,\r
-     -0.35156250000000000000f,     -0.32031250000000000000f,\r
-     -0.27343750000000000000f,     -0.23437499999999997000f,\r
-     -0.19140625000000000000f,     -0.04687500000000000000f,\r
-      0.00000000000000000000f,      0.04296874999999999300f,\r
-      0.09765625000000000000f,      0.14453125000000000000f,\r
-      0.23437499999999997000f,      0.32031250000000000000f,\r
-      0.39453125000000000000f,      0.44531250000000000000f,\r
-     -0.43359375000000000000f,     -0.41796875000000000000f,\r
-     -0.36328124999999994000f,     -0.28125000000000000000f,\r
-     -0.16406250000000000000f,     -0.11718749999999999000f,\r
-     -0.07812500000000000000f,     -0.03125000000000000000f,\r
-      0.01562500000000000000f,      0.06250000000000000000f,\r
-      0.13281250000000000000f,      0.17968750000000000000f,\r
-      0.22656250000000000000f,      0.27343750000000000000f,\r
-      0.33203125000000000000f,      0.38281250000000000000f,\r
-     -0.43750000000000000000f,     -0.42578124999999994000f,\r
-     -0.31250000000000000000f,     -0.25390625000000000000f,\r
-     -0.21875000000000000000f,     -0.17187499999999997000f,\r
-     -0.12890625000000000000f,     -0.06640625000000000000f,\r
-     -0.01171875000000000000f,      0.03125000000000000000f,\r
-      0.07812500000000000000f,      0.12109375000000000000f,\r
-      0.19140625000000000000f,      0.30859375000000000000f,\r
-      0.38281250000000000000f,      0.43750000000000000000f,\r
-     -0.40625000000000006000f,     -0.38281250000000000000f,\r
-     -0.32812500000000000000f,     -0.28125000000000000000f,\r
-     -0.23046875000000000000f,     -0.17578125000000000000f,\r
-     -0.12109375000000000000f,     -0.07031250000000000000f,\r
-     -0.00390625000000000000f,      0.04687500000000000000f,\r
-      0.12109375000000000000f,      0.18359375000000000000f,\r
-      0.25000000000000000000f,      0.31640625000000000000f,\r
-      0.38281250000000000000f,      0.42968750000000000000f,\r
-     -0.42968750000000000000f,     -0.41406250000000000000f,\r
-     -0.35937500000000000000f,     -0.30859375000000000000f,\r
-     -0.27343750000000000000f,     -0.23046875000000000000f,\r
-     -0.19140625000000000000f,     -0.15234375000000000000f,\r
-     -0.00390625000000000000f,      0.04296874999999999300f,\r
-      0.08593749999999998600f,      0.13671875000000000000f,\r
-      0.20312500000000003000f,      0.26953125000000000000f,\r
-      0.34765625000000000000f,      0.42578124999999994000f,\r
-     -0.44140625000000000000f,     -0.42578124999999994000f,\r
-     -0.39453125000000000000f,     -0.37109375000000000000f,\r
-     -0.21875000000000000000f,     -0.17187499999999997000f,\r
-     -0.11328125000000000000f,     -0.06250000000000000000f,\r
-     -0.00781250000000000000f,      0.07031250000000000000f,\r
-      0.12890625000000000000f,      0.18750000000000000000f,\r
-      0.24609375000000000000f,      0.30468750000000000000f,\r
-      0.37109375000000000000f,      0.42968750000000000000f,\r
-     -0.42578124999999994000f,     -0.41406250000000000000f,\r
-     -0.36718750000000000000f,     -0.33984375000000000000f,\r
-     -0.28906250000000000000f,     -0.16015625000000000000f,\r
-     -0.11328125000000000000f,     -0.05468750000000000000f,\r
-      0.00390625000000000000f,      0.05078125000000000700f,\r
-      0.10937500000000000000f,      0.18359375000000000000f,\r
-      0.26953125000000000000f,      0.32812500000000000000f,\r
-      0.38671875000000006000f,      0.43359375000000000000f,\r
-     -0.44921875000000006000f,     -0.42968750000000000000f,\r
-     -0.39453125000000000000f,     -0.32812500000000000000f,\r
-     -0.19531250000000000000f,     -0.12500000000000000000f,\r
-     -0.08593749999999998600f,     -0.04296874999999999300f,\r
-      0.00390625000000000000f,      0.05078125000000000700f,\r
-      0.11718749999999999000f,      0.17578125000000000000f,\r
-      0.22656250000000000000f,      0.28125000000000000000f,\r
-      0.34765625000000000000f,      0.41796875000000000000f,\r
-     -0.41406250000000000000f,     -0.39843750000000000000f,\r
-     -0.34765625000000000000f,     -0.29296875000000000000f,\r
-     -0.25000000000000000000f,     -0.21484375000000000000f,\r
-     -0.17187499999999997000f,     -0.13281250000000000000f,\r
-     -0.05078125000000000700f,      0.06250000000000000000f,\r
-      0.12500000000000000000f,      0.16796875000000000000f,\r
-      0.23046875000000000000f,      0.28515625000000000000f,\r
-      0.33593750000000000000f,      0.39062500000000000000f,\r
-     -0.43359375000000000000f,     -0.41796875000000000000f,\r
-     -0.36718750000000000000f,     -0.27343750000000000000f,\r
-     -0.21484375000000000000f,     -0.17968750000000000000f,\r
-     -0.12890625000000000000f,     -0.08203125000000000000f,\r
-     -0.02734375000000000000f,      0.01953125000000000000f,\r
-      0.07421875000000000000f,      0.12109375000000000000f,\r
-      0.16796875000000000000f,      0.21484375000000000000f,\r
-      0.27343750000000000000f,      0.40234375000000000000f,\r
-     -0.39843750000000000000f,     -0.37890625000000000000f,\r
-     -0.31250000000000000000f,     -0.27734375000000000000f,\r
-     -0.23437499999999997000f,     -0.19140625000000000000f,\r
-     -0.14062500000000000000f,     -0.09375000000000000000f,\r
-     -0.03125000000000000000f,      0.01562500000000000000f,\r
-      0.07421875000000000000f,      0.12500000000000000000f,\r
-      0.18750000000000000000f,      0.24609375000000000000f,\r
-      0.30859375000000000000f,      0.39062500000000000000f,\r
-     -0.44140625000000000000f,     -0.42578124999999994000f,\r
-     -0.35156250000000000000f,     -0.29687500000000000000f,\r
-     -0.25781250000000000000f,     -0.20703125000000000000f,\r
-     -0.16015625000000000000f,     -0.11328125000000000000f,\r
-     -0.06250000000000000000f,     -0.02734375000000000000f,\r
-      0.01953125000000000000f,      0.05859374999999999300f,\r
-      0.16406250000000000000f,      0.26953125000000000000f,\r
-      0.34765625000000000000f,      0.42187500000000000000f,\r
-     -0.42187500000000000000f,     -0.41015625000000000000f,\r
-     -0.36328124999999994000f,     -0.33203125000000000000f,\r
-     -0.29687500000000000000f,     -0.24218750000000000000f,\r
-     -0.08984375000000000000f,     -0.03125000000000000000f,\r
-      0.01562500000000000000f,      0.07031250000000000000f,\r
-      0.12890625000000000000f,      0.17578125000000000000f,\r
-      0.23437499999999997000f,      0.28906250000000000000f,\r
-      0.35156250000000000000f,      0.41015625000000000000f,\r
-     -0.44531250000000000000f,     -0.42968750000000000000f,\r
-     -0.34765625000000000000f,     -0.23828125000000000000f,\r
-     -0.20312500000000003000f,     -0.16406250000000000000f,\r
-     -0.11718749999999999000f,     -0.07031250000000000000f,\r
-     -0.01562500000000000000f,      0.05078125000000000700f,\r
-      0.10156250000000001000f,      0.15234375000000000000f,\r
-      0.20703125000000000000f,      0.26171875000000000000f,\r
-      0.31640625000000000000f,      0.37500000000000000000f,\r
-     -0.38671875000000006000f,     -0.37109375000000000000f,\r
-     -0.33593750000000000000f,     -0.30078125000000000000f,\r
-     -0.26953125000000000000f,     -0.23437499999999997000f,\r
-     -0.12500000000000000000f,     -0.05859374999999999300f,\r
-     -0.00781250000000000000f,      0.05859374999999999300f,\r
-      0.13671875000000000000f,      0.18359375000000000000f,\r
-      0.25000000000000000000f,      0.31250000000000000000f,\r
-      0.37500000000000000000f,      0.42968750000000000000f,\r
-     -0.44921875000000006000f,     -0.41015625000000000000f,\r
-     -0.31250000000000000000f,     -0.23828125000000000000f,\r
-     -0.16796875000000000000f,     -0.10546875000000000000f,\r
-     -0.05468750000000000000f,     -0.00390625000000000000f,\r
-      0.05078125000000000700f,      0.10156250000000001000f,\r
-      0.15625000000000000000f,      0.20703125000000000000f,\r
-      0.26171875000000000000f,      0.31250000000000000000f,\r
-      0.37109375000000000000f,      0.42968750000000000000f,\r
-     -0.39062500000000000000f,     -0.35546875000000000000f,\r
-     -0.28125000000000000000f,     -0.23046875000000000000f,\r
-     -0.18750000000000000000f,     -0.14843750000000000000f,\r
-     -0.09765625000000000000f,     -0.05078125000000000700f,\r
-      0.00390625000000000000f,      0.05859374999999999300f,\r
-      0.10937500000000000000f,      0.15234375000000000000f,\r
-      0.22656250000000000000f,      0.29296875000000000000f,\r
-      0.35546875000000000000f,      0.41015625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-     -0.01953125000000000000f,     -0.01953125000000000000f,\r
-     -0.02734375000000000000f,     -0.03125000000000000000f,\r
-     -0.01953125000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,     -0.02343750000000000000f,\r
-     -0.03125000000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.01562500000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.01171875000000000000f,     -0.01171875000000000000f,\r
-     -0.02343750000000000000f,      0.01562500000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.03515625000000000000f,      0.02734375000000000000f,\r
-      0.01562500000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,     -0.00781250000000000000f,\r
-     -0.01953125000000000000f,     -0.02343750000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.01562500000000000000f,     -0.03125000000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.01171875000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-     -0.01953125000000000000f,     -0.02734375000000000000f,\r
-     -0.03515625000000000000f,      0.01562500000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,     -0.01171875000000000000f,\r
-     -0.00390625000000000000f,      0.03515625000000000000f,\r
-      0.02734375000000000000f,      0.02343750000000000000f,\r
-      0.01953125000000000000f,      0.01562500000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.01562500000000000000f,      0.01562500000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.03125000000000000000f,      0.03125000000000000000f,\r
-      0.02343750000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.02343750000000000000f,\r
-      0.02343750000000000000f,      0.02343750000000000000f,\r
-      0.02734375000000000000f,      0.02343750000000000000f,\r
-      0.01562500000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,     -0.01562500000000000000f,\r
-     -0.02734375000000000000f,     -0.03906250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01562500000000000000f,     -0.01953125000000000000f,\r
-      0.03125000000000000000f,      0.01953125000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,     -0.01171875000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01171875000000000000f,\r
-     -0.02343750000000000000f,     -0.03906250000000000000f,\r
-     -0.03906250000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,     -0.01953125000000000000f,\r
-     -0.03125000000000000000f,     -0.03515625000000000000f,\r
-      0.01562500000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01171875000000000000f,\r
-      0.03906250000000000000f,      0.03515625000000000000f,\r
-      0.02734375000000000000f,      0.01562500000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.01171875000000000000f,\r
-     -0.01171875000000000000f,     -0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-      0.03515625000000000000f,      0.02734375000000000000f,\r
-      0.01562500000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,     -0.01171875000000000000f,\r
-     -0.01171875000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.01562500000000000000f,\r
-     -0.01171875000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.01171875000000000000f,      0.01562500000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,     -0.01953125000000000000f,\r
-     -0.02343750000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.01562500000000000000f,     -0.01562500000000000000f,\r
-      0.01562500000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-     -0.01562500000000000000f,      0.01953125000000000000f,\r
-      0.01562500000000000000f,      0.01171875000000000000f,\r
-      0.01562500000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.01171875000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-     -0.01171875000000000000f,     -0.01953125000000000000f,\r
-     -0.02734375000000000000f,      0.01953125000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.02343750000000000000f,     -0.02734375000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.02734375000000000000f,      0.01953125000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.01953125000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,     -0.01953125000000000000f,\r
-      0.01562500000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-      0.01171875000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.01562500000000000000f,     -0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,     -0.01562500000000000000f,\r
-      0.01562500000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,     -0.02343750000000000000f,\r
-      0.01562500000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.01562500000000000000f,\r
-      0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.01562500000000000000f,     -0.02343750000000000000f,\r
-      0.01562500000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.01562500000000000000f,      0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01562500000000000000f,      0.01562500000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,     -0.01171875000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.01171875000000000000f,      0.01562500000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.01562500000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01562500000000000000f,      0.01953125000000000000f,\r
-      0.01562500000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.01171875000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.01953125000000000000f,      0.01171875000000000000f,\r
-      0.01171875000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,      0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.01562500000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.01562500000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.01562500000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.01562500000000000000f,\r
-      0.00781250000000000000f,      0.01562500000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.01171875000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.01171875000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.01171875000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.01171875000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.01171875000000000000f,\r
-      0.01171875000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.01171875000000000000f,      0.01562500000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00781250000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,     -0.01171875000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-     -0.00781250000000000000f,     -0.00781250000000000000f,\r
-      0.00781250000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00781250000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.01171875000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00781250000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00000000000000000000f,     -0.00390625000000000000f,\r
-      0.00000000000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00000000000000000000f,      0.00390625000000000000f,\r
-      0.00781250000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,      0.00390625000000000000f,\r
-      0.00390625000000000000f,      0.00000000000000000000f,\r
-     -0.00781250000000000000f,      0.00000000000000000000f,\r
-     -0.00390625000000000000f,     -0.00390625000000000000f,\r