Update SILK code using the CELT range coder
authorKoen Vos <koen.vos@skype.net>
Wed, 30 Jun 2010 14:41:17 +0000 (10:41 -0400)
committerJean-Marc Valin <jean-marc.valin@octasic.com>
Wed, 30 Jun 2010 14:41:17 +0000 (10:41 -0400)
251 files changed:
AUTHORS [deleted file]
ChangeLog [deleted file]
INSTALL [deleted file]
Makefile [new file with mode: 0644]
Makefile.am [deleted file]
NEWS [deleted file]
README [deleted file]
Silk_FIX.sln [new file with mode: 0644]
Silk_FLP.sln [new file with mode: 0644]
Silk_SDK.sln [deleted file]
configure.gnu [deleted file]
configure.in [deleted file]
interface/SKP_Silk_SDK_API.h
interface/SKP_Silk_control.h
interface/SKP_Silk_errors.h
interface/SKP_debug.h [new file with mode: 0644]
readme.txt
src/SKP_Silk_common_pitch_est_defines.h [deleted file]
src/SKP_Silk_control_codec_FIX.c [deleted file]
src/SKP_Silk_dec_API.c [deleted file]
src/SKP_Silk_decode_parameters.c [deleted file]
src/SKP_Silk_enc_API.c [deleted file]
src/SKP_Silk_encode_parameters.c [deleted file]
src/SKP_Silk_find_pred_coefs_FIX.c [deleted file]
src/SKP_Silk_macros.h [deleted file]
src/SKP_Silk_range_coder.c [deleted file]
src/SKP_Silk_resample_1_2.c [deleted file]
src/SKP_Silk_resample_1_3.c [deleted file]
src/SKP_Silk_resample_2_3_coarse.c [deleted file]
src/SKP_Silk_resample_2_3_coarsest.c [deleted file]
src/SKP_Silk_resample_2_3_rom.c [deleted file]
src/SKP_Silk_resample_3_1.c [deleted file]
src/SKP_Silk_resample_3_4.c [deleted file]
src/SKP_Silk_resample_4_3.c [deleted file]
src/SKP_Silk_resample_rom.h [deleted file]
src/SKP_Silk_tables_sign.c [deleted file]
src/Silk_FIX.2008.vcproj [deleted file]
src/Silk_FIX.2010.vcxproj [deleted file]
src/Silk_FIX.vcproj [deleted file]
src_FIX/SKP_Silk_HP_variable_cutoff_FIX.c [moved from src/SKP_Silk_HP_variable_cutoff_FIX.c with 94% similarity]
src_FIX/SKP_Silk_LTP_analysis_filter_FIX.c [moved from src/SKP_Silk_LTP_analysis_filter_FIX.c with 66% similarity]
src_FIX/SKP_Silk_LTP_scale_ctrl_FIX.c [moved from src/SKP_Silk_LTP_scale_ctrl_FIX.c with 96% similarity]
src_FIX/SKP_Silk_NLSF_MSVQ_encode_FIX.c [moved from src/SKP_Silk_NLSF_MSVQ_encode_FIX.c with 91% similarity]
src_FIX/SKP_Silk_NLSF_VQ_rate_distortion_FIX.c [moved from src/SKP_Silk_NLSF_VQ_rate_distortion_FIX.c with 100% similarity]
src_FIX/SKP_Silk_NLSF_VQ_sum_error_FIX.c [moved from src/SKP_Silk_NLSF_VQ_sum_error_FIX.c with 100% similarity]
src_FIX/SKP_Silk_VQ_nearest_neighbor_FIX.c [moved from src/SKP_Silk_VQ_nearest_neighbor_FIX.c with 60% similarity]
src_FIX/SKP_Silk_control_codec_FIX.c [new file with mode: 0644]
src_FIX/SKP_Silk_corrMatrix_FIX.c [moved from src/SKP_Silk_corrMatrix_FIX.c with 100% similarity]
src_FIX/SKP_Silk_define_FIX.h [moved from src/SKP_Silk_define_FIX.h with 90% similarity]
src_FIX/SKP_Silk_encode_frame_FIX.c [moved from src/SKP_Silk_encode_frame_FIX.c with 58% similarity]
src_FIX/SKP_Silk_find_LPC_FIX.c [moved from src/SKP_Silk_find_LPC_FIX.c with 91% similarity]
src_FIX/SKP_Silk_find_LTP_FIX.c [moved from src/SKP_Silk_find_LTP_FIX.c with 82% similarity]
src_FIX/SKP_Silk_find_pitch_lags_FIX.c [moved from src/SKP_Silk_find_pitch_lags_FIX.c with 85% similarity]
src_FIX/SKP_Silk_find_pred_coefs_FIX.c [new file with mode: 0644]
src_FIX/SKP_Silk_init_encoder_FIX.c [moved from src/SKP_Silk_init_encoder_FIX.c with 86% similarity]
src_FIX/SKP_Silk_main_FIX.h [moved from src/SKP_Silk_main_FIX.h with 72% similarity]
src_FIX/SKP_Silk_noise_shape_analysis_FIX.c [moved from src/SKP_Silk_noise_shape_analysis_FIX.c with 68% similarity]
src_FIX/SKP_Silk_perceptual_parameters_FIX.h [new file with mode: 0644]
src_FIX/SKP_Silk_prefilter_FIX.c [moved from src/SKP_Silk_prefilter_FIX.c with 68% similarity]
src_FIX/SKP_Silk_process_NLSFs_FIX.c [moved from src/SKP_Silk_process_NLSFs_FIX.c with 100% similarity]
src_FIX/SKP_Silk_process_gains_FIX.c [moved from src/SKP_Silk_process_gains_FIX.c with 92% similarity]
src_FIX/SKP_Silk_quant_LTP_gains_FIX.c [moved from src/SKP_Silk_quant_LTP_gains_FIX.c with 76% similarity]
src_FIX/SKP_Silk_regularize_correlations_FIX.c [moved from src/SKP_Silk_regularize_correlations_FIX.c with 100% similarity]
src_FIX/SKP_Silk_residual_energy16_FIX.c [moved from src/SKP_Silk_residual_energy16_FIX.c with 100% similarity]
src_FIX/SKP_Silk_residual_energy_FIX.c [moved from src/SKP_Silk_residual_energy_FIX.c with 66% similarity]
src_FIX/SKP_Silk_solve_LS_FIX.c [moved from src/SKP_Silk_solve_LS_FIX.c with 100% similarity]
src_FIX/SKP_Silk_structs_FIX.h [moved from src/SKP_Silk_structs_FIX.h with 72% similarity]
src_FIX/SKP_Silk_warped_autocorrelation_FIX.c [new file with mode: 0644]
src_FIX/Silk_FIX.vcproj [new file with mode: 0644]
src_FLP/SKP_Silk_HP_variable_cutoff_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_LPC_analysis_filter_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_LTP_analysis_filter_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_LTP_scale_ctrl_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_NLSF_MSVQ_decode_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_NLSF_MSVQ_encode_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_NLSF_VQ_rate_distortion_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_NLSF_VQ_sum_error_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_NLSF_VQ_weights_laroia_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_VQ_nearest_neighbor_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_apply_sine_window_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_assembler_FLP.h [moved from COPYING with 79% similarity]
src_FLP/SKP_Silk_control_codec_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_corrMatrix_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_define_FLP.h [new file with mode: 0644]
src_FLP/SKP_Silk_encode_frame_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_find_LPC_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_find_LTP_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_find_pitch_lags_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_find_pred_coefs_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_init_encoder_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_main_FLP.h [new file with mode: 0644]
src_FLP/SKP_Silk_noise_shape_analysis_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_prefilter_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_process_NLSFs_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_process_gains_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_quant_LTP_gains_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_regularize_correlations_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_residual_energy_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_solve_LS_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_structs_FLP.h [new file with mode: 0644]
src_FLP/SKP_Silk_tables_FLP.h [new file with mode: 0644]
src_FLP/SKP_Silk_tables_NLSF_CB0_10_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_tables_NLSF_CB0_16_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_tables_NLSF_CB1_10_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_tables_NLSF_CB1_16_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_tables_other_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_warped_autocorrelation_FLP.c [new file with mode: 0644]
src_FLP/SKP_Silk_wrappers_FLP.c [new file with mode: 0644]
src_FLP/Silk_FLP.vcproj [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_A2NLSF.c [moved from src/SKP_Silk_A2NLSF.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_Inlines.h [moved from src/SKP_Silk_Inlines.h with 90% similarity]
src_SigProc_FIX/SKP_Silk_LPC_inv_pred_gain.c [moved from src/SKP_Silk_LPC_inv_pred_gain.c with 69% similarity]
src_SigProc_FIX/SKP_Silk_LPC_stabilize.c [moved from src/SKP_Silk_LPC_stabilize.c with 94% similarity]
src_SigProc_FIX/SKP_Silk_LPC_synthesis_filter.c [moved from src/SKP_Silk_LPC_synthesis_filter.c with 66% similarity]
src_SigProc_FIX/SKP_Silk_LPC_synthesis_order16.c [moved from src/SKP_Silk_LPC_synthesis_order16.c with 55% similarity]
src_SigProc_FIX/SKP_Silk_LSF_cos_table.c [moved from src/SKP_Silk_LSF_cos_table.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_MA.c [moved from src/SKP_Silk_MA.c with 57% similarity]
src_SigProc_FIX/SKP_Silk_MacroCount.h [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_MacroDebug.h [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_NLSF2A.c [moved from src/SKP_Silk_NLSF2A.c with 93% similarity]
src_SigProc_FIX/SKP_Silk_NLSF_VQ_weights_laroia.c [moved from src/SKP_Silk_NLSF_VQ_weights_laroia.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_NLSF_stabilize.c [moved from src/SKP_Silk_NLSF_stabilize.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_SigProc_FIX.h [moved from src/SKP_Silk_SigProc_FIX.h with 79% similarity]
src_SigProc_FIX/SKP_Silk_allpass_int.c [moved from src/SKP_Silk_allpass_int.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_ana_filt_bank_1.c [moved from src/SKP_Silk_ana_filt_bank_1.c with 63% similarity]
src_SigProc_FIX/SKP_Silk_apply_sine_window.c [moved from src/SKP_Silk_apply_sine_window.c with 89% similarity]
src_SigProc_FIX/SKP_Silk_array_maxabs.c [moved from src/SKP_Silk_array_maxabs.c with 91% similarity]
src_SigProc_FIX/SKP_Silk_autocorr.c [moved from src/SKP_Silk_autocorr.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_biquad.c [moved from src/SKP_Silk_biquad.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_biquad_alt.c [moved from src/SKP_Silk_biquad_alt.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_burg_modified.c [moved from src/SKP_Silk_burg_modified.c with 95% similarity]
src_SigProc_FIX/SKP_Silk_bwexpander.c [moved from src/SKP_Silk_bwexpander.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_bwexpander_32.c [moved from src/SKP_Silk_bwexpander_32.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_common_pitch_est_defines.h [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_decode_pitch.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_inner_prod_aligned.c [moved from src/SKP_Silk_inner_prod_aligned.c with 95% similarity]
src_SigProc_FIX/SKP_Silk_k2a.c [moved from src/SKP_Silk_k2a.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_k2a_Q16.c [moved from src/SKP_Silk_k2a_Q16.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_lin2log.c [moved from src/SKP_Silk_lin2log.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_log2lin.c [moved from src/SKP_Silk_log2lin.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_lowpass_int.c [moved from src/SKP_Silk_lowpass_int.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_lowpass_short.c [moved from src/SKP_Silk_lowpass_short.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_macros.h [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_pitch_analysis_core.c [moved from src/SKP_Silk_pitch_analysis_core.c with 66% similarity]
src_SigProc_FIX/SKP_Silk_pitch_est_defines.h [moved from src/SKP_Silk_pitch_est_defines.h with 84% similarity]
src_SigProc_FIX/SKP_Silk_pitch_est_tables.c [moved from src/SKP_Silk_pitch_est_tables.c with 72% similarity]
src_SigProc_FIX/SKP_Silk_resampler.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_down2.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_down2_3.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_down3.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_private.h [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_private_AR2.c [moved from src/SKP_Silk_resample_3_2_rom.c with 62% similarity]
src_SigProc_FIX/SKP_Silk_resampler_private_ARMA4.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_private_IIR_FIR.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_private_copy.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_private_down4.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_private_down_FIR.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_private_up2_HQ.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_private_up4.c [moved from src/SKP_Silk_resample_2_1_coarse.c with 51% similarity]
src_SigProc_FIX/SKP_Silk_resampler_rom.c [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_rom.h [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_structs.h [new file with mode: 0644]
src_SigProc_FIX/SKP_Silk_resampler_up2.c [moved from src/SKP_Silk_resample_1_2_coarse.c with 54% similarity]
src_SigProc_FIX/SKP_Silk_scale_copy_vector16.c [moved from src/SKP_Silk_scale_copy_vector16.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_scale_vector.c [moved from src/SKP_Silk_scale_vector.c with 86% similarity]
src_SigProc_FIX/SKP_Silk_schur.c [moved from src/SKP_Silk_schur.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_schur64.c [moved from src/SKP_Silk_schur64.c with 96% similarity]
src_SigProc_FIX/SKP_Silk_sigm_Q15.c [moved from src/SKP_Silk_sigm_Q15.c with 100% similarity]
src_SigProc_FIX/SKP_Silk_sort.c [moved from src/SKP_Silk_sort.c with 65% similarity]
src_SigProc_FIX/SKP_Silk_sum_sqr_shift.c [moved from src/SKP_Silk_sum_sqr_shift.c with 97% similarity]
src_SigProc_FIX/SigProc_FIX.vcproj [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_LPC_inv_pred_gain_FLP.c [moved from src/SKP_Silk_resample_2_3.c with 54% similarity]
src_SigProc_FLP/SKP_Silk_NLSF_VQ_weights_laroia_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_SigProc_FLP.h [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_allpass_int_FLP.c [moved from src/SKP_Silk_resample_3_2.c with 55% similarity]
src_SigProc_FLP/SKP_Silk_autocorrelation_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_burg_modified_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_bwexpander_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_decimate2_coarse_FLP.c [moved from src/SKP_Silk_resample_1_2_coarsest.c with 56% similarity]
src_SigProc_FLP/SKP_Silk_decimate2_coarsest_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_energy_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_inner_product_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_k2a_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_levinsondurbin_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_pitch_analysis_core_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_pitch_est_defines_FLP.h [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_scale_copy_vector_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_scale_vector_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_schur_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SKP_Silk_sort_FLP.c [new file with mode: 0644]
src_SigProc_FLP/SigProc_FLP.vcproj [new file with mode: 0644]
src_common/SKP_Silk_CNG.c [moved from src/SKP_Silk_CNG.c with 94% similarity]
src_common/SKP_Silk_LBRR_reset.c [moved from src/SKP_Silk_LBRR_reset.c with 100% similarity]
src_common/SKP_Silk_LP_variable_cutoff.c [moved from src/SKP_Silk_LP_variable_cutoff.c with 94% similarity]
src_common/SKP_Silk_NLSF2A_stable.c [moved from src/SKP_Silk_NLSF2A_stable.c with 100% similarity]
src_common/SKP_Silk_NLSF_MSVQ_decode.c [moved from src/SKP_Silk_NLSF_MSVQ_decode.c with 100% similarity]
src_common/SKP_Silk_NSQ.c [moved from src/SKP_Silk_NSQ.c with 66% similarity]
src_common/SKP_Silk_NSQ_del_dec.c [moved from src/SKP_Silk_NSQ_del_dec.c with 77% similarity]
src_common/SKP_Silk_PLC.c [moved from src/SKP_Silk_PLC.c with 86% similarity]
src_common/SKP_Silk_PLC.h [moved from src/SKP_Silk_PLC.h with 95% similarity]
src_common/SKP_Silk_VAD.c [moved from src/SKP_Silk_VAD.c with 83% similarity]
src_common/SKP_Silk_code_signs.c [moved from src/SKP_Silk_code_signs.c with 92% similarity]
src_common/SKP_Silk_create_init_destroy.c [moved from src/SKP_Silk_create_init_destroy.c with 92% similarity]
src_common/SKP_Silk_dec_SDK_API.c [new file with mode: 0644]
src_common/SKP_Silk_decode_core.c [moved from src/SKP_Silk_decode_core.c with 57% similarity]
src_common/SKP_Silk_decode_frame.c [moved from src/SKP_Silk_decode_frame.c with 79% similarity]
src_common/SKP_Silk_decode_indices_v4.c [moved from src/SKP_Silk_decode_indices_v4.c with 91% similarity]
src_common/SKP_Silk_decode_parameters_v4.c [moved from src/SKP_Silk_decode_parameters_v4.c with 89% similarity]
src_common/SKP_Silk_decode_pulses.c [moved from src/SKP_Silk_decode_pulses.c with 92% similarity]
src_common/SKP_Silk_decoder_set_fs.c [moved from src/SKP_Silk_decoder_set_fs.c with 86% similarity]
src_common/SKP_Silk_define.h [moved from src/SKP_Silk_define.h with 77% similarity]
src_common/SKP_Silk_detect_SWB_input.c [moved from src/SKP_Silk_detect_SWB_input.c with 96% similarity]
src_common/SKP_Silk_enc_API.c [new file with mode: 0644]
src_common/SKP_Silk_encode_parameters_v4.c [moved from src/SKP_Silk_encode_parameters_v4.c with 71% similarity]
src_common/SKP_Silk_encode_pulses.c [moved from src/SKP_Silk_encode_pulses.c with 81% similarity]
src_common/SKP_Silk_gain_quant.c [moved from src/SKP_Silk_gain_quant.c with 71% similarity]
src_common/SKP_Silk_interpolate.c [moved from src/SKP_Silk_interpolate.c with 100% similarity]
src_common/SKP_Silk_main.h [moved from src/SKP_Silk_main.h with 78% similarity]
src_common/SKP_Silk_perceptual_parameters.h [moved from src/SKP_Silk_perceptual_parameters_FIX.h with 60% similarity]
src_common/SKP_Silk_pulses_to_bytes.c [moved from src/SKP_Silk_pulses_to_bytes.c with 85% similarity]
src_common/SKP_Silk_range_coder.c [new file with mode: 0644]
src_common/SKP_Silk_shell_coder.c [moved from src/SKP_Silk_shell_coder.c with 100% similarity]
src_common/SKP_Silk_structs.h [moved from src/SKP_Silk_structs.h with 84% similarity]
src_common/SKP_Silk_tables.h [moved from src/SKP_Silk_tables.h with 95% similarity]
src_common/SKP_Silk_tables_LTP.c [moved from src/SKP_Silk_tables_LTP.c with 100% similarity]
src_common/SKP_Silk_tables_NLSF_CB0_10.c [moved from src/SKP_Silk_tables_NLSF_CB0_10.c with 97% similarity]
src_common/SKP_Silk_tables_NLSF_CB0_10.h [moved from src/SKP_Silk_tables_NLSF_CB0_10.h with 100% similarity]
src_common/SKP_Silk_tables_NLSF_CB0_16.c [moved from src/SKP_Silk_tables_NLSF_CB0_16.c with 98% similarity]
src_common/SKP_Silk_tables_NLSF_CB0_16.h [moved from src/SKP_Silk_tables_NLSF_CB0_16.h with 100% similarity]
src_common/SKP_Silk_tables_NLSF_CB1_10.c [moved from src/SKP_Silk_tables_NLSF_CB1_10.c with 96% similarity]
src_common/SKP_Silk_tables_NLSF_CB1_10.h [moved from src/SKP_Silk_tables_NLSF_CB1_10.h with 100% similarity]
src_common/SKP_Silk_tables_NLSF_CB1_16.c [moved from src/SKP_Silk_tables_NLSF_CB1_16.c with 98% similarity]
src_common/SKP_Silk_tables_NLSF_CB1_16.h [moved from src/SKP_Silk_tables_NLSF_CB1_16.h with 100% similarity]
src_common/SKP_Silk_tables_gain.c [moved from src/SKP_Silk_tables_gain.c with 100% similarity]
src_common/SKP_Silk_tables_other.c [moved from src/SKP_Silk_tables_other.c with 95% similarity]
src_common/SKP_Silk_tables_pitch_lag.c [moved from src/SKP_Silk_tables_pitch_lag.c with 100% similarity]
src_common/SKP_Silk_tables_pulses_per_block.c [moved from src/SKP_Silk_tables_pulses_per_block.c with 100% similarity]
src_common/SKP_Silk_tables_sign.c [new file with mode: 0644]
src_common/SKP_Silk_tables_type_offset.c [moved from src/SKP_Silk_tables_type_offset.c with 100% similarity]
src_common/Silk_Common.vcproj [new file with mode: 0644]
src_common/Silk_CommonFLP.vcproj [new file with mode: 0644]
test/Dec_SDK.vcproj
test/Dec_SDK.vcproj.SKYPE-KOEN.koen.user [new file with mode: 0644]
test/Decoder.c
test/Enc_SDK.vcproj
test/Enc_SDK.vcproj.SKYPE-KOEN.koen.user [new file with mode: 0644]
test/Encoder.c
test/SKP_debug.c [new file with mode: 0644]
test/SignalCompare.vcproj
test/SignalCompare.vcproj.SKYPE-KOEN.koen.user [new file with mode: 0644]
test/signalCompare.c

diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/INSTALL b/INSTALL
deleted file mode 100644 (file)
index 23e5f25..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,236 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-These are generic installation instructions.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.)
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
-
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-Compilers and Options
-=====================
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
-
-Installation Names
-==================
-
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).  Here is a another example:
-
-     /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
-
-`configure' Invocation
-======================
-
-`configure' recognizes the following options to control how it operates.
-
-`--help'
-`-h'
-     Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..d86fd26
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,122 @@
+#                                      \r
+# Makefile for Silk SDK                        \r
+#\r
+# Copyright (c) 2010, Skype Limited\r
+# All rights reserved.\r
+#\r
+\r
+#Platform detection and settings\r
+\r
+BUILD_OS := $(shell uname | sed -e 's/^.*Darwin.*/MacOS-X/ ; s/^.*CYGWIN.*/Windows/')\r
+\r
+BUILD_ARCHITECTURE := $(shell uname -m | sed -e 's/i686/i386/')\r
+\r
+EXESUFFIX = \r
+LIBPREFIX = lib\r
+LIBSUFFIX = .a\r
+OBJSUFFIX = .o\r
+\r
+CC     = $(TOOLCHAIN_PREFIX)gcc$(TOOLCHAIN_SUFFIX)\r
+AR     = $(TOOLCHAIN_PREFIX)ar\r
+RANLIB = $(TOOLCHAIN_PREFIX)ranlib\r
+CP     = $(TOOLCHAIN_PREFIX)cp\r
+\r
+cflags-from-defines    = $(addprefix -D,$(1))\r
+cflags-from-includes   = $(addprefix -I,$(1))\r
+ldflags-from-ldlibdirs = $(addprefix -L,$(1))\r
+ldlibs-from-libs       = $(addprefix -l,$(1))\r
+\r
+CFLAGS += -Wall -enable-threads -O3\r
+\r
+CFLAGS  += $(call cflags-from-defines,$(CDEFINES))\r
+CFLAGS  += $(call cflags-from-includes,$(CINCLUDES))\r
+LDFLAGS += $(call ldflags-from-ldlibdirs,$(LDLIBDIRS))\r
+LDLIBS  += $(call ldlibs-from-libs,$(LIBS))\r
+\r
+COMPILE.c.cmdline   = $(CC) -c $(CFLAGS) -o $@ $<\r
+LINK.o.cmdline      = $(LINK.o) -lm $^ $(LDLIBS) -o $@$(EXESUFFIX) \r
+ARCHIVE.cmdline     = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@\r
+\r
+%$(OBJSUFFIX):%.c\r
+       $(COMPILE.c.cmdline)\r
+\r
+ifneq (,$(filter FIXED_POINT, $(CDEFINES)))\r
+\r
+# Directives\r
+\r
+CINCLUDES += interface src_common src_fix src_SigProc_FIX test\r
+\r
+# VPATH e.g. VPATH = src:../headers\r
+VPATH = ./ \\r
+        interface \\r
+         src_common \\r
+         src_fix \\r
+         src_SigProc_FIX \\r
+        test \r
+\r
+SRCS_C = $(wildcard src_common/*.c src_fix/*.c src_SigProc_FIX/*.c )\r
+\r
+else\r
+\r
+# Directives\r
+\r
+CINCLUDES += interface src_common src_fix src_SigProc_FIX src_SigProc_FLP test\r
+\r
+# VPATH e.g. VPATH = src:../headers\r
+VPATH = ./ \\r
+        interface \\r
+         src_common \\r
+         src_flp \\r
+         src_SigProc_FIX \\r
+         src_SigProc_FLP \\r
+        test \r
+\r
+SRCS_C = $(wildcard src_common/*.c src_flp/*.c src_SigProc_FIX/*.c  src_SigProc_FLP/*.c )\r
+\r
+endif\r
+\r
+# Variable definitions\r
+LIB_NAME = SKP_SILK_SDK\r
+TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX)\r
+\r
+\r
+OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C))\r
+\r
+ENCODER_SRCS_C = test/Encoder.c test/SKP_debug.c\r
+ENCODER_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(ENCODER_SRCS_C))\r
+\r
+DECODER_SRCS_C = test/Decoder.c test/SKP_debug.c\r
+DECODER_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(DECODER_SRCS_C))\r
+\r
+SIGNALCMP_SRCS_C = test/signalCompare.c\r
+SIGNALCMP_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SIGNALCMP_SRCS_C))\r
+\r
+LIBS = \\r
+       $(LIB_NAME)\r
+\r
+LDLIBDIRS = ./\r
+\r
+# Rules\r
+default: all\r
+\r
+all: $(TARGET) encoder decoder signalcompare\r
+\r
+lib: $(TARGET)\r
+\r
+$(TARGET): $(OBJS)\r
+       $(ARCHIVE.cmdline)\r
+\r
+encoder$(EXESUFFIX): $(ENCODER_OBJS)   \r
+       $(LINK.o.cmdline)\r
+\r
+decoder$(EXESUFFIX): $(DECODER_OBJS)   \r
+       $(LINK.o.cmdline)\r
+\r
+signalcompare$(EXESUFFIX): $(SIGNALCMP_OBJS)   \r
+       $(LINK.o.cmdline)\r
+\r
+clean:\r
+       $(RM) $(TARGET)* $(OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) \\r
+                 $(SIGNALCMP_OBJS) $(TEST_OBJS) \\r
+                 encoder$(EXESUFFIX) decoder$(EXESUFFIX) signalcompare$(EXESUFFIX)\r
+\r
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644 (file)
index 2a681e8..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-
-AM_CFLAGS = -Isrc -Iinterface -fPIC -Wall -O3 
-AUTOMAKE_OPTS = gnu
-NAME = libSKP_SILK_SDK
-AM_CPPFLAGS = $(AM_CFLAGS)
-
-EXTRA_DIST = Silk_SDK.sln \
-src/Silk_FIX.vcproj \
-test/Encoder.c \
-test/Enc_SDK.vcproj \
-test/Decoder.c \
-test/Dec_SDK.vcproj \
-test/signalCompare.c \
-test/SignalCompare.vcproj 
-
-lib_LTLIBRARIES        = libSKP_SILK_SDK.la
-libSKP_SILK_SDK_la_SOURCES = src/SKP_Silk_A2NLSF.c \
-src/SKP_Silk_allpass_int.c \
-src/SKP_Silk_ana_filt_bank_1.c \
-src/SKP_Silk_apply_sine_window.c \
-src/SKP_Silk_array_maxabs.c \
-src/SKP_Silk_autocorr.c \
-src/SKP_Silk_biquad_alt.c \
-src/SKP_Silk_biquad.c \
-src/SKP_Silk_burg_modified.c \
-src/SKP_Silk_bwexpander_32.c \
-src/SKP_Silk_bwexpander.c \
-src/SKP_Silk_CNG.c \
-src/SKP_Silk_code_signs.c \
-src/SKP_Silk_control_codec_FIX.c \
-src/SKP_Silk_corrMatrix_FIX.c \
-src/SKP_Silk_create_init_destroy.c \
-src/SKP_Silk_dec_API.c \
-src/SKP_Silk_decode_core.c \
-src/SKP_Silk_decode_frame.c \
-src/SKP_Silk_decode_indices_v4.c \
-src/SKP_Silk_decode_parameters.c \
-src/SKP_Silk_decode_parameters_v4.c \
-src/SKP_Silk_decode_pulses.c \
-src/SKP_Silk_decoder_set_fs.c \
-src/SKP_Silk_detect_SWB_input.c \
-src/SKP_Silk_enc_API.c \
-src/SKP_Silk_encode_frame_FIX.c \
-src/SKP_Silk_encode_parameters.c \
-src/SKP_Silk_encode_parameters_v4.c \
-src/SKP_Silk_encode_pulses.c \
-src/SKP_Silk_find_LPC_FIX.c \
-src/SKP_Silk_find_LTP_FIX.c \
-src/SKP_Silk_find_pitch_lags_FIX.c \
-src/SKP_Silk_find_pred_coefs_FIX.c \
-src/SKP_Silk_gain_quant.c \
-src/SKP_Silk_HP_variable_cutoff_FIX.c \
-src/SKP_Silk_init_encoder_FIX.c \
-src/SKP_Silk_inner_prod_aligned.c \
-src/SKP_Silk_interpolate.c \
-src/SKP_Silk_k2a.c \
-src/SKP_Silk_k2a_Q16.c \
-src/SKP_Silk_LBRR_reset.c \
-src/SKP_Silk_lin2log.c \
-src/SKP_Silk_log2lin.c \
-src/SKP_Silk_lowpass_int.c \
-src/SKP_Silk_lowpass_short.c \
-src/SKP_Silk_LPC_inv_pred_gain.c \
-src/SKP_Silk_LPC_stabilize.c \
-src/SKP_Silk_LPC_synthesis_filter.c \
-src/SKP_Silk_LPC_synthesis_order16.c \
-src/SKP_Silk_LP_variable_cutoff.c \
-src/SKP_Silk_LSF_cos_table.c \
-src/SKP_Silk_LTP_analysis_filter_FIX.c \
-src/SKP_Silk_LTP_scale_ctrl_FIX.c \
-src/SKP_Silk_MA.c \
-src/SKP_Silk_NLSF2A.c \
-src/SKP_Silk_NLSF2A_stable.c \
-src/SKP_Silk_NLSF_MSVQ_decode.c \
-src/SKP_Silk_NLSF_MSVQ_encode_FIX.c \
-src/SKP_Silk_NLSF_stabilize.c \
-src/SKP_Silk_NLSF_VQ_rate_distortion_FIX.c \
-src/SKP_Silk_NLSF_VQ_sum_error_FIX.c \
-src/SKP_Silk_NLSF_VQ_weights_laroia.c \
-src/SKP_Silk_noise_shape_analysis_FIX.c \
-src/SKP_Silk_NSQ.c \
-src/SKP_Silk_NSQ_del_dec.c \
-src/SKP_Silk_pitch_analysis_core.c \
-src/SKP_Silk_pitch_est_tables.c \
-src/SKP_Silk_PLC.c \
-src/SKP_Silk_prefilter_FIX.c \
-src/SKP_Silk_process_gains_FIX.c \
-src/SKP_Silk_process_NLSFs_FIX.c \
-src/SKP_Silk_pulses_to_bytes.c \
-src/SKP_Silk_quant_LTP_gains_FIX.c \
-src/SKP_Silk_range_coder.c \
-src/SKP_Silk_regularize_correlations_FIX.c \
-src/SKP_Silk_resample_1_2.c \
-src/SKP_Silk_resample_1_2_coarse.c \
-src/SKP_Silk_resample_1_2_coarsest.c \
-src/SKP_Silk_resample_1_3.c \
-src/SKP_Silk_resample_2_1_coarse.c \
-src/SKP_Silk_resample_2_3.c \
-src/SKP_Silk_resample_2_3_coarse.c \
-src/SKP_Silk_resample_2_3_coarsest.c \
-src/SKP_Silk_resample_2_3_rom.c \
-src/SKP_Silk_resample_3_1.c \
-src/SKP_Silk_resample_3_2.c \
-src/SKP_Silk_resample_3_2_rom.c \
-src/SKP_Silk_resample_3_4.c \
-src/SKP_Silk_resample_4_3.c \
-src/SKP_Silk_residual_energy16_FIX.c \
-src/SKP_Silk_residual_energy_FIX.c \
-src/SKP_Silk_scale_copy_vector16.c \
-src/SKP_Silk_scale_vector.c \
-src/SKP_Silk_schur64.c \
-src/SKP_Silk_schur.c \
-src/SKP_Silk_shell_coder.c \
-src/SKP_Silk_sigm_Q15.c \
-src/SKP_Silk_solve_LS_FIX.c \
-src/SKP_Silk_sort.c \
-src/SKP_Silk_sum_sqr_shift.c \
-src/SKP_Silk_tables_gain.c \
-src/SKP_Silk_tables_LTP.c \
-src/SKP_Silk_tables_NLSF_CB0_10.c \
-src/SKP_Silk_tables_NLSF_CB0_16.c \
-src/SKP_Silk_tables_NLSF_CB1_10.c \
-src/SKP_Silk_tables_NLSF_CB1_16.c \
-src/SKP_Silk_tables_other.c \
-src/SKP_Silk_tables_pitch_lag.c \
-src/SKP_Silk_tables_pulses_per_block.c \
-src/SKP_Silk_tables_sign.c \
-src/SKP_Silk_tables_type_offset.c \
-src/SKP_Silk_VAD.c \
-src/SKP_Silk_VQ_nearest_neighbor_FIX.c 
-
-
-libSKP_SILK_SDK_la_CFLAGS = $(AM_CFLAGS)
-libSKP_SILK_SDK_la_LDFLAGS = $(LIBS)
-
-library_includedir = $(prefix)/include/silk
-library_include_HEADERS        = src/SKP_Silk_common_pitch_est_defines.h \
-src/SKP_Silk_define_FIX.h \
-src/SKP_Silk_define.h \
-src/SKP_Silk_Inlines.h \
-src/SKP_Silk_macros.h \
-src/SKP_Silk_main_FIX.h \
-src/SKP_Silk_main.h \
-src/SKP_Silk_perceptual_parameters_FIX.h \
-src/SKP_Silk_pitch_est_defines.h \
-src/SKP_Silk_PLC.h \
-src/SKP_Silk_resample_rom.h \
-src/SKP_Silk_SigProc_FIX.h \
-src/SKP_Silk_structs_FIX.h \
-src/SKP_Silk_structs.h \
-src/SKP_Silk_tables.h \
-src/SKP_Silk_tables_NLSF_CB0_10.h \
-src/SKP_Silk_tables_NLSF_CB0_16.h \
-src/SKP_Silk_tables_NLSF_CB1_10.h \
-src/SKP_Silk_tables_NLSF_CB1_16.h \
-interface/SKP_Silk_control.h \
-interface/SKP_Silk_errors.h \
-interface/SKP_Silk_SDK_API.h \
-interface/SKP_Silk_typedef.h 
-
-bin_PROGRAMS = Encoder Decoder signalCompare
-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 $(top_builddir)/interface/SKP_Silk_SDK_API.h
-Decoder_LDADD = $(lib_LTLIBRARIES) 
-Decoder_LDFLAGS = $(LIBS)
-
-signalCompare_SOURCES = test/signalCompare.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
-signalCompare_LDADD = $(lib_LTLIBRARIES) 
-signalCompare_LDFLAGS = $(LIBS)
diff --git a/NEWS b/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/README b/README
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/Silk_FIX.sln b/Silk_FIX.sln
new file mode 100644 (file)
index 0000000..478d196
--- /dev/null
@@ -0,0 +1,91 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dec", "test\Dec_SDK.vcproj", "{82685D7F-0589-42BD-877C-31A952D53A8E}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74} = {2769AFC5-8FC2-42E8-803C-528ACBA89C74}\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758} = {0E29E502-AB22-4147-93A1-AC91528ED758}\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {56B91D01-9150-4BBF-AFA1-5B68AB991B76}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SignalCompare", "test\SignalCompare.vcproj", "{7FE8F544-9175-40C3-A187-7F15CE9A75D8}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74} = {2769AFC5-8FC2-42E8-803C-528ACBA89C74}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Enc", "test\Enc_SDK.vcproj", "{6D97A8EF-5724-4D85-8BF4-C583714BBA78}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74} = {2769AFC5-8FC2-42E8-803C-528ACBA89C74}\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758} = {0E29E502-AB22-4147-93A1-AC91528ED758}\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {56B91D01-9150-4BBF-AFA1-5B68AB991B76}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Silk_FIX", "src_FIX\Silk_FIX.vcproj", "{56B91D01-9150-4BBF-AFA1-5B68AB991B76}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758} = {0E29E502-AB22-4147-93A1-AC91528ED758}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SigProc_FIX", "src_SigProc_FIX\SigProc_FIX.vcproj", "{2769AFC5-8FC2-42E8-803C-528ACBA89C74}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Silk_Common", "src_common\Silk_Common.vcproj", "{0E29E502-AB22-4147-93A1-AC91528ED758}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93} = {8181D6A1-DE19-4A5C-9B96-E10A18068C93}\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74} = {2769AFC5-8FC2-42E8-803C-528ACBA89C74}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcelt", "..\..\celt-0.8.0\libcelt\libcelt.vcproj", "{8181D6A1-DE19-4A5C-9B96-E10A18068C93}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug MCD|Win32 = Debug MCD|Win32\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug|Win32.Build.0 = Debug|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Release|Win32.ActiveCfg = Release|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Release|Win32.Build.0 = Release|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug|Win32.Build.0 = Debug|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Release|Win32.ActiveCfg = Release|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Release|Win32.Build.0 = Release|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug|Win32.Build.0 = Debug|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Release|Win32.ActiveCfg = Release|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Release|Win32.Build.0 = Release|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|Win32.Build.0 = Debug|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|Win32.ActiveCfg = Release|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|Win32.Build.0 = Release|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Debug|Win32.Build.0 = Debug|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Release|Win32.ActiveCfg = Release|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Release|Win32.Build.0 = Release|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Debug|Win32.Build.0 = Debug|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Release|Win32.ActiveCfg = Release|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Release|Win32.Build.0 = Release|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Debug MCD|Win32.ActiveCfg = Debug MCD|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Debug MCD|Win32.Build.0 = Debug MCD|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Debug|Win32.Build.0 = Debug|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Release|Win32.ActiveCfg = Release|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/Silk_FLP.sln b/Silk_FLP.sln
new file mode 100644 (file)
index 0000000..9b51189
--- /dev/null
@@ -0,0 +1,99 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dec", "test\Dec_SDK.vcproj", "{82685D7F-0589-42BD-877C-31A952D53A8E}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74} = {2769AFC5-8FC2-42E8-803C-528ACBA89C74}\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758} = {0E29E502-AB22-4147-93A1-AC91528ED758}\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {56B91D01-9150-4BBF-AFA1-5B68AB991B76}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SignalCompare", "test\SignalCompare.vcproj", "{7FE8F544-9175-40C3-A187-7F15CE9A75D8}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Enc", "test\Enc_SDK.vcproj", "{6D97A8EF-5724-4D85-8BF4-C583714BBA78}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74} = {2769AFC5-8FC2-42E8-803C-528ACBA89C74}\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926} = {793D0EC2-8554-4674-9A97-F25DE5DBE926}\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758} = {0E29E502-AB22-4147-93A1-AC91528ED758}\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {56B91D01-9150-4BBF-AFA1-5B68AB991B76}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SigProc_FIX", "src_SigProc_FIX\SigProc_FIX.vcproj", "{2769AFC5-8FC2-42E8-803C-528ACBA89C74}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Silk_FLP", "src_FLP\Silk_FLP.vcproj", "{56B91D01-9150-4BBF-AFA1-5B68AB991B76}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926} = {793D0EC2-8554-4674-9A97-F25DE5DBE926}\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758} = {0E29E502-AB22-4147-93A1-AC91528ED758}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SigProc_FLP", "src_SigProc_FLP\SigProc_FLP.vcproj", "{793D0EC2-8554-4674-9A97-F25DE5DBE926}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Silk_Common", "src_common\Silk_CommonFLP.vcproj", "{0E29E502-AB22-4147-93A1-AC91528ED758}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93} = {8181D6A1-DE19-4A5C-9B96-E10A18068C93}\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74} = {2769AFC5-8FC2-42E8-803C-528ACBA89C74}\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926} = {793D0EC2-8554-4674-9A97-F25DE5DBE926}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcelt", "..\..\celt-0.8.0\libcelt\libcelt.vcproj", "{8181D6A1-DE19-4A5C-9B96-E10A18068C93}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug MCD|Win32 = Debug MCD|Win32\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug|Win32.Build.0 = Debug|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Release|Win32.ActiveCfg = Release|Win32\r
+               {82685D7F-0589-42BD-877C-31A952D53A8E}.Release|Win32.Build.0 = Release|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug|Win32.Build.0 = Debug|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Release|Win32.ActiveCfg = Release|Win32\r
+               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Release|Win32.Build.0 = Release|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug|Win32.Build.0 = Debug|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Release|Win32.ActiveCfg = Release|Win32\r
+               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Release|Win32.Build.0 = Release|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Debug|Win32.Build.0 = Debug|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Release|Win32.ActiveCfg = Release|Win32\r
+               {2769AFC5-8FC2-42E8-803C-528ACBA89C74}.Release|Win32.Build.0 = Release|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|Win32.Build.0 = Debug|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|Win32.ActiveCfg = Release|Win32\r
+               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|Win32.Build.0 = Release|Win32\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926}.Debug|Win32.Build.0 = Debug|Win32\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926}.Release|Win32.ActiveCfg = Release|Win32\r
+               {793D0EC2-8554-4674-9A97-F25DE5DBE926}.Release|Win32.Build.0 = Release|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Debug MCD|Win32.ActiveCfg = Debug|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Debug MCD|Win32.Build.0 = Debug|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Debug|Win32.Build.0 = Debug|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Release|Win32.ActiveCfg = Release|Win32\r
+               {0E29E502-AB22-4147-93A1-AC91528ED758}.Release|Win32.Build.0 = Release|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Debug MCD|Win32.ActiveCfg = Debug MCD|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Debug MCD|Win32.Build.0 = Debug MCD|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Debug|Win32.Build.0 = Debug|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Release|Win32.ActiveCfg = Release|Win32\r
+               {8181D6A1-DE19-4A5C-9B96-E10A18068C93}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/Silk_SDK.sln b/Silk_SDK.sln
deleted file mode 100644 (file)
index ab0dd8d..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-\r
-Microsoft Visual Studio Solution File, Format Version 9.00\r
-# Visual Studio 2005\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Silk_FIX", "src\Silk_FIX.vcproj", "{56B91D01-9150-4BBF-AFA1-5B68AB991B76}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dec_SDK", "test\Dec_SDK.vcproj", "{82685D7F-0589-42BD-877C-31A952D53A8E}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {56B91D01-9150-4BBF-AFA1-5B68AB991B76}\r
-       EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SignalCompare", "test\SignalCompare.vcproj", "{7FE8F544-9175-40C3-A187-7F15CE9A75D8}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Enc_SDK", "test\Enc_SDK.vcproj", "{6D97A8EF-5724-4D85-8BF4-C583714BBA78}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {56B91D01-9150-4BBF-AFA1-5B68AB991B76}\r
-       EndProjectSection\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug|Win32 = Debug|Win32\r
-               Release|Win32 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|Win32.Build.0 = Debug|Win32\r
-               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|Win32.ActiveCfg = Release|Win32\r
-               {56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|Win32.Build.0 = Release|Win32\r
-               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {82685D7F-0589-42BD-877C-31A952D53A8E}.Debug|Win32.Build.0 = Debug|Win32\r
-               {82685D7F-0589-42BD-877C-31A952D53A8E}.Release|Win32.ActiveCfg = Release|Win32\r
-               {82685D7F-0589-42BD-877C-31A952D53A8E}.Release|Win32.Build.0 = Release|Win32\r
-               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Debug|Win32.Build.0 = Debug|Win32\r
-               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Release|Win32.ActiveCfg = Release|Win32\r
-               {7FE8F544-9175-40C3-A187-7F15CE9A75D8}.Release|Win32.Build.0 = Release|Win32\r
-               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Debug|Win32.Build.0 = Debug|Win32\r
-               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Release|Win32.ActiveCfg = Release|Win32\r
-               {6D97A8EF-5724-4D85-8BF4-C583714BBA78}.Release|Win32.Build.0 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(SolutionProperties) = preSolution\r
-               HideSolutionNode = FALSE\r
-       EndGlobalSection\r
-EndGlobal\r
diff --git a/configure.gnu b/configure.gnu
deleted file mode 100755 (executable)
index c78238d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-srcpath=$(dirname $0 2>/dev/null )  || srcpath="." 
-$srcpath/configure "$@" --disable-shared --with-pic
-
diff --git a/configure.in b/configure.in
deleted file mode 100644 (file)
index bd71b65..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.59])
-AC_INIT(libSKP_SILK_SDK, 1.0.2, brian@freeswitch.org, libSKP_SILK_SDK)
-AM_INIT_AUTOMAKE(libSKP_SILK_SDK,1.0.2)
-
-# Checks for programs.
-AC_PROG_CC
-AC_PROG_LIBTOOL
-
-# Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([float.h stdint.h stdlib.h string.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-
-# Checks for library functions.
-AC_FUNC_MALLOC
-AC_CHECK_LIB([m],[pow])
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
index cb31db2..e266780 100644 (file)
@@ -39,7 +39,7 @@ extern "C"
 \r
 #define SILK_MAX_FRAMES_PER_PACKET  5\r
 \r
-/* Struct for TOC (Table Of Contents) */\r
+/* Struct for TOC (Table of Contents) */\r
 typedef struct {\r
     SKP_int     framesInPacket;                             /* Number of 20 ms frames in packet     */\r
     SKP_int     fs_kHz;                                     /* Sampling frequency in packet         */\r
@@ -56,14 +56,14 @@ typedef struct {
 /***********************************************/\r
 /* Get size in bytes of the Silk encoder state */\r
 /***********************************************/\r
-SKP_int SKP_Silk_SDK_Get_Encoder_Size( \r
+SKP_int SKP_Silk_SDK_Get_Encoder_Size(                  /* O:   Returns error code                              */\r
     SKP_int32                           *encSizeBytes   /* O:   Number of bytes in SILK encoder state           */\r
 );\r
 \r
 /*************************/\r
 /* Init or reset encoder */\r
 /*************************/\r
-SKP_int SKP_Silk_SDK_InitEncoder(\r
+SKP_int SKP_Silk_SDK_InitEncoder(                       /* O:   Returns error code                              */\r
     void                                *encState,      /* I/O: State                                           */\r
     SKP_SILK_SDK_EncControlStruct       *encStatus      /* O:   Encoder Status                                  */\r
 );\r
@@ -71,7 +71,7 @@ SKP_int SKP_Silk_SDK_InitEncoder(
 /***************************************/\r
 /* Read control structure from encoder */\r
 /***************************************/\r
-SKP_int SKP_Silk_SDK_QueryEncoder(\r
+SKP_int SKP_Silk_SDK_QueryEncoder(                      /* O:   Returns error code                              */\r
     const void                          *encState,      /* I:   State                                           */\r
     SKP_SILK_SDK_EncControlStruct       *encStatus      /* O:   Encoder Status                                  */\r
 );\r
@@ -79,13 +79,13 @@ SKP_int SKP_Silk_SDK_QueryEncoder(
 /**************************/\r
 /* Encode frame with Silk */\r
 /**************************/\r
-SKP_int SKP_Silk_SDK_Encode( \r
+SKP_int SKP_Silk_SDK_Encode(                            /* O:   Returns error code                              */\r
     void                                *encState,      /* I/O: State                                           */\r
     const SKP_SILK_SDK_EncControlStruct *encControl,    /* I:   Control status                                  */\r
     const SKP_int16                     *samplesIn,     /* I:   Speech sample input vector                      */\r
     SKP_int                             nSamplesIn,     /* I:   Number of samples in input vector               */\r
     SKP_uint8                           *outData,       /* O:   Encoded output vector                           */\r
-    SKP_int16                           *nBytesOut      /* I/O: Number of Bytes in outData (input: Max Bytes)   */\r
+    SKP_int16                           *nBytesOut      /* I/O: Number of bytes in outData (input: Max bytes)   */\r
 );\r
 \r
 /****************************************/\r
@@ -95,26 +95,26 @@ SKP_int SKP_Silk_SDK_Encode(
 /***********************************************/\r
 /* Get size in bytes of the Silk decoder state */\r
 /***********************************************/\r
-SKP_int SKP_Silk_SDK_Get_Decoder_Size( \r
+SKP_int SKP_Silk_SDK_Get_Decoder_Size(                  /* O:   Returns error code                              */\r
     SKP_int32                           *decSizeBytes   /* O:   Number of bytes in SILK decoder state           */\r
 );\r
 \r
 /*************************/\r
 /* Init or Reset decoder */\r
 /*************************/\r
-SKP_int SKP_Silk_SDK_InitDecoder( \r
+SKP_int SKP_Silk_SDK_InitDecoder(                       /* O:   Returns error code                              */\r
     void                                *decState       /* I/O: State                                           */\r
 );\r
 \r
 /******************/\r
 /* Decode a frame */\r
 /******************/\r
-SKP_int SKP_Silk_SDK_Decode(\r
+SKP_int SKP_Silk_SDK_Decode(                            /* O:   Returns error code                              */\r
     void*                               decState,       /* I/O: State                                           */\r
     SKP_SILK_SDK_DecControlStruct*      decControl,     /* I/O: Control Structure                               */\r
     SKP_int                             lostFlag,       /* I:   0: no loss, 1 loss                              */\r
     const SKP_uint8                     *inData,        /* I:   Encoded input vector                            */\r
-    const SKP_int                       nBytesIn,       /* I:   Number of input Bytes                           */\r
+    const SKP_int                       nBytesIn,       /* I:   Number of input bytes                           */\r
     SKP_int16                           *samplesOut,    /* O:   Decoded output speech vector                    */\r
     SKP_int16                           *nSamplesOut    /* I/O: Number of samples (vector/decoded)              */\r
 );\r
@@ -123,22 +123,20 @@ SKP_int SKP_Silk_SDK_Decode(
 /* Find Low Bit Rate Redundancy (LBRR) information in a packet */\r
 /***************************************************************/\r
 void SKP_Silk_SDK_search_for_LBRR(\r
-    void                                *decState,      /* I:   Decoder state, to select bitstream version only */\r
     const SKP_uint8                     *inData,        /* I:   Encoded input vector                            */\r
-    const SKP_int16                     nBytesIn,       /* I:   Number of input Bytes                           */\r
+    const SKP_int16                     nBytesIn,       /* I:   Number of input bytes                           */\r
     SKP_int                             lost_offset,    /* I:   Offset from lost packet                         */\r
     SKP_uint8                           *LBRRData,      /* O:   LBRR payload                                    */\r
     SKP_int16                           *nLBRRBytes     /* O:   Number of LBRR Bytes                            */\r
 );\r
 \r
-/************************************/\r
-/* Get type of content for a packet */\r
-/************************************/\r
+/**************************************/\r
+/* Get table of contents for a packet */\r
+/**************************************/\r
 void SKP_Silk_SDK_get_TOC(\r
-    void                                       *decState,      /* I:   Decoder state, to select bitstream version only */\r
     const SKP_uint8                     *inData,        /* I:   Encoded input vector                            */\r
     const SKP_int16                     nBytesIn,       /* I:   Number of input bytes                           */\r
-    SKP_Silk_TOC_struct                 *Silk_TOC       /* O:   Type of content                                 */\r
+    SKP_Silk_TOC_struct                 *Silk_TOC       /* O:   Table of contents                               */\r
 );\r
 \r
 /**************************/\r
index 2bd056f..b0fdc15 100644 (file)
@@ -39,8 +39,11 @@ extern "C"
 /* Structure for controlling encoder operation */\r
 /***********************************************/\r
 typedef struct {\r
-    /* I:   Sampling rate in Hertz; 8000/12000/16000/24000                                  */\r
-    SKP_int32 sampleRate;\r
+    /* I:   Input signal sampling rate in Hertz; 8000/12000/16000/24000                     */\r
+    SKP_int32 API_sampleRate;\r
+\r
+    /* I:   Maximum internal sampling rate in Hertz; 8000/12000/16000/24000                 */\r
+    SKP_int32 maxInternalSampleRate;\r
 \r
     /* I:   Number of samples per packet; must be equivalent of 20, 40, 60, 80 or 100 ms    */\r
     SKP_int packetSize;\r
@@ -48,7 +51,7 @@ typedef struct {
     /* I:   Bitrate during active speech in bits/second; internally limited                 */\r
     SKP_int32 bitRate;                        \r
 \r
-    /* I:   Uplink Packet loss in pct (0...100)                                             */\r
+    /* I:   Uplink packet loss in percent (0-100)                                           */\r
     SKP_int packetLossPercentage;\r
     \r
     /* I:   Complexity mode; 0 is lowest; 1 is medium and 2 is highest complexity           */\r
@@ -57,7 +60,7 @@ typedef struct {
     /* I:   Flag to enable in-band Forward Error Correction (FEC); 0/1                      */\r
     SKP_int useInBandFEC;\r
 \r
-    /* I:   Flag to enable Discontinous Transmission; 0/1                                   */\r
+    /* I:   Flag to enable discontinuous transmission (DTX); 0/1                            */\r
     SKP_int useDTX;\r
 } SKP_SILK_SDK_EncControlStruct;\r
 \r
@@ -65,8 +68,8 @@ typedef struct {
 /* Structure for controlling decoder operation and reading decoder status */\r
 /**************************************************************************/\r
 typedef struct {\r
-    /* I:   Sampling rate in Hertz; 8000/12000/16000/24000                                  */\r
-    SKP_int32 sampleRate;\r
+    /* I:   Output signal sampling rate in Hertz; 8000/12000/16000/24000                    */\r
+    SKP_int32 API_sampleRate;\r
 \r
     /* O:   Number of samples per frame                                                     */\r
     SKP_int frameSize;\r
index 99b837c..475f493 100644 (file)
@@ -36,48 +36,45 @@ extern "C"
 /******************/\r
 /* Error messages */\r
 /******************/\r
-#define SKP_SILK_NO_ERROR                                 0\r
+#define SKP_SILK_NO_ERROR                               0\r
 \r
 /**************************/\r
 /* Encoder error messages */\r
 /**************************/\r
 \r
-/* Input length is not a multiplum of 10 ms, \r
-   or length is longer than the packet length */\r
-#define SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES         -1\r
+/* Input length is not a multiplum of 10 ms, or length is longer than the packet length */\r
+#define SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES        -1\r
 \r
-/* Sampling frequency not 8000, 12000, 16000 \r
-   or 24000 Hertz */\r
-#define SKP_SILK_ENC_FS_NOT_SUPPORTED                    -2\r
+/* Sampling frequency not 8000, 12000, 16000 or 24000 Hertz */\r
+#define SKP_SILK_ENC_FS_NOT_SUPPORTED                   -2\r
 \r
 /* Packet size not 20, 40, 60, 80 or 100 ms */\r
-#define SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED           -3\r
+#define SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED          -3\r
 \r
 /* Allocated payload buffer too short */\r
-#define SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT               -4\r
+#define SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT              -4\r
 \r
 /* Loss rate not between 0 and 100 percent */\r
-#define SKP_SILK_ENC_WRONG_LOSS_RATE                     -5\r
+#define SKP_SILK_ENC_INVALID_LOSS_RATE                  -5\r
 \r
 /* Complexity setting not valid, use 0, 1 or 2 */\r
-#define SKP_SILK_ENC_WRONG_COMPLEXITY_SETTING            -6\r
+#define SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING         -6\r
 \r
 /* Inband FEC setting not valid, use 0 or 1 */\r
-#define SKP_SILK_ENC_WRONG_INBAND_FEC_SETTING            -7\r
+#define SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING         -7\r
 \r
 /* DTX setting not valid, use 0 or 1 */\r
-#define SKP_SILK_ENC_WRONG_DTX_SETTING                   -8\r
+#define SKP_SILK_ENC_INVALID_DTX_SETTING                -8\r
 \r
 /* Internal encoder error */\r
-#define SKP_SILK_ENC_INTERNAL_ERROR                      -9\r
+#define SKP_SILK_ENC_INTERNAL_ERROR                     -9\r
 \r
 /**************************/\r
 /* Decoder error messages */\r
 /**************************/\r
 \r
-/* Output sampling frequency lower than internal \r
-   decoded sampling frequency */\r
-#define SKP_SILK_DEC_WRONG_SAMPLING_FREQUENCY           -10\r
+/* Output sampling frequency lower than internal decoded sampling frequency */\r
+#define SKP_SILK_DEC_INVALID_SAMPLING_FREQUENCY         -10\r
 \r
 /* Payload size exceeded the maximum allowed 1024 bytes */\r
 #define SKP_SILK_DEC_PAYLOAD_TOO_LARGE                  -11\r
@@ -85,7 +82,6 @@ extern "C"
 /* Payload has bit errors */\r
 #define SKP_SILK_DEC_PAYLOAD_ERROR                      -12\r
 \r
-\r
 #ifdef __cplusplus\r
 }\r
 #endif\r
diff --git a/interface/SKP_debug.h b/interface/SKP_debug.h
new file mode 100644 (file)
index 0000000..d55ca95
--- /dev/null
@@ -0,0 +1,293 @@
+/***********************************************************************\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
+/*                                                                      *\r
+ * SKP_debug.h                                                          *\r
+ *                                                                      *\r
+ * This contains code to help debugging                                 *\r
+ *                                                                      *\r
+ * Copyright 2009 (c), Skype Limited                                    *\r
+ * Date: 090629                                                         *\r
+ *                                                                      */\r
+#ifndef _SKP_DEBUG_H_\r
+#define _SKP_DEBUG_H_\r
+\r
+#ifdef _WIN32\r
+#define _CRT_SECURE_NO_DEPRECATE    1\r
+#endif\r
+\r
+#include "SKP_Silk_typedef.h"\r
+#include <stdio.h>      /* file writing */\r
+#include <string.h>     /* strcpy, strcmp */\r
+\r
+#ifdef  __cplusplus\r
+extern "C"\r
+{\r
+#endif\r
+\r
+unsigned long GetHighResolutionTime(); /* O: time in usec*/\r
+\r
+/* make SKP_DEBUG dependent on compiler's _DEBUG */\r
+#if defined _WIN32\r
+    #ifdef _DEBUG\r
+        #define SKP_DEBUG  1\r
+    #else\r
+        #define SKP_DEBUG  0\r
+    #endif\r
+\r
+    /* overrule the above */\r
+    #if 0\r
+    //  #define NO_ASSERTS\r
+    #undef  SKP_DEBUG  \r
+    #define SKP_DEBUG  1\r
+    #endif\r
+#else\r
+    #define SKP_DEBUG  0\r
+#endif\r
+\r
+/* Flag for using timers */\r
+#define SKP_TIC_TOC 1\r
+\r
+#if SKP_TIC_TOC\r
+\r
+#if (defined(_WIN32) || defined(_WINCE)) \r
+#include <windows.h>    /* timer */\r
+#pragma warning( disable : 4996 )       // stop bitching about strcpy in TIC()\r
+#else   // Linux or Mac\r
+#include <sys/time.h>\r
+#endif\r
+\r
+/*********************************/\r
+/* timer functions for profiling */\r
+/*********************************/\r
+/* example:                                                         */\r
+/*                                                                  */\r
+/* TIC(LPC)                                                         */\r
+/* do_LPC(in_vec, order, acoef);    // do LPC analysis              */\r
+/* TOC(LPC)                                                         */\r
+/*                                                                  */\r
+/* and call the following just before exiting (from main)           */\r
+/*                                                                  */\r
+/* SKP_TimerSave("SKP_TimingData.txt");                             */\r
+/*                                                                  */\r
+/* results are now in SKP_TimingData.txt                            */\r
+\r
+void SKP_TimerSave(char *file_name);\r
+\r
+/* max number of timers (in different locations) */\r
+#define SKP_NUM_TIMERS_MAX                  50\r
+/* max length of name tags in TIC(..), TOC(..) */\r
+#define SKP_NUM_TIMERS_MAX_TAG_LEN          30\r
+\r
+extern int           SKP_Timer_nTimers;\r
+extern int           SKP_Timer_depth_ctr;\r
+extern char          SKP_Timer_tags[SKP_NUM_TIMERS_MAX][SKP_NUM_TIMERS_MAX_TAG_LEN];\r
+#ifdef _WIN32\r
+extern LARGE_INTEGER SKP_Timer_start[SKP_NUM_TIMERS_MAX];\r
+#else\r
+extern unsigned long SKP_Timer_start[SKP_NUM_TIMERS_MAX];\r
+#endif  \r
+extern unsigned int  SKP_Timer_cnt[SKP_NUM_TIMERS_MAX];\r
+extern SKP_int64     SKP_Timer_sum[SKP_NUM_TIMERS_MAX];\r
+extern SKP_int64     SKP_Timer_max[SKP_NUM_TIMERS_MAX];\r
+extern SKP_int64     SKP_Timer_min[SKP_NUM_TIMERS_MAX];\r
+extern SKP_int64     SKP_Timer_depth[SKP_NUM_TIMERS_MAX];\r
+\r
+/* WARNING: TIC()/TOC can measure only up to 0.1 seconds at a time */\r
+#ifdef _WIN32\r
+#define TIC(TAG_NAME) {                                     \\r
+    static int init = 0;                                    \\r
+    static int ID = -1;                                     \\r
+    if( init == 0 )                                         \\r
+    {                                                       \\r
+        int k;                                              \\r
+        init = 1;                                           \\r
+        for( k = 0; k < SKP_Timer_nTimers; k++ ) {          \\r
+            if( strcmp(SKP_Timer_tags[k], #TAG_NAME) == 0 ) {   \\r
+                ID = k;                                     \\r
+                break;                                      \\r
+            }                                               \\r
+        }                                                   \\r
+        if (ID == -1) {                                     \\r
+            ID = SKP_Timer_nTimers;                         \\r
+            SKP_Timer_nTimers++;                            \\r
+            SKP_Timer_depth[ID] = SKP_Timer_depth_ctr;      \\r
+            strcpy(SKP_Timer_tags[ID], #TAG_NAME);          \\r
+            SKP_Timer_cnt[ID] = 0;                          \\r
+            SKP_Timer_sum[ID] = 0;                          \\r
+            SKP_Timer_min[ID] = 0xFFFFFFFF;                 \\r
+            SKP_Timer_max[ID] = 0;                          \\r
+        }                                                   \\r
+    }                                                       \\r
+    SKP_Timer_depth_ctr++;                                  \\r
+    QueryPerformanceCounter(&SKP_Timer_start[ID]);          \\r
+}\r
+#else\r
+#define TIC(TAG_NAME) {                                     \\r
+    static int init = 0;                                    \\r
+    static int ID = -1;                                     \\r
+    if( init == 0 )                                         \\r
+    {                                                       \\r
+        int k;                                              \\r
+        init = 1;                                           \\r
+        for( k = 0; k < SKP_Timer_nTimers; k++ ) {          \\r
+        if( strcmp(SKP_Timer_tags[k], #TAG_NAME) == 0 ) {   \\r
+                ID = k;                                     \\r
+                break;                                      \\r
+            }                                               \\r
+        }                                                   \\r
+        if (ID == -1) {                                     \\r
+            ID = SKP_Timer_nTimers;                         \\r
+            SKP_Timer_nTimers++;                            \\r
+            SKP_Timer_depth[ID] = SKP_Timer_depth_ctr;      \\r
+            strcpy(SKP_Timer_tags[ID], #TAG_NAME);          \\r
+            SKP_Timer_cnt[ID] = 0;                          \\r
+            SKP_Timer_sum[ID] = 0;                          \\r
+            SKP_Timer_min[ID] = 0xFFFFFFFF;                 \\r
+            SKP_Timer_max[ID] = 0;                          \\r
+        }                                                   \\r
+    }                                                       \\r
+    SKP_Timer_depth_ctr++;                                  \\r
+    SKP_Timer_start[ID] = GetHighResolutionTime();          \\r
+}\r
+#endif\r
+\r
+#ifdef _WIN32\r
+#define TOC(TAG_NAME) {                                             \\r
+    LARGE_INTEGER lpPerformanceCount;                               \\r
+    static int init = 0;                                            \\r
+    static int ID = 0;                                              \\r
+    if( init == 0 )                                                 \\r
+    {                                                               \\r
+        int k;                                                      \\r
+        init = 1;                                                   \\r
+        for( k = 0; k < SKP_Timer_nTimers; k++ ) {                  \\r
+            if( strcmp(SKP_Timer_tags[k], #TAG_NAME) == 0 ) {       \\r
+                ID = k;                                             \\r
+                break;                                              \\r
+            }                                                       \\r
+        }                                                           \\r
+    }                                                               \\r
+    QueryPerformanceCounter(&lpPerformanceCount);                   \\r
+    lpPerformanceCount.QuadPart -= SKP_Timer_start[ID].QuadPart;    \\r
+    if((lpPerformanceCount.QuadPart < 100000000) &&                 \\r
+        (lpPerformanceCount.QuadPart >= 0)) {                       \\r
+        SKP_Timer_cnt[ID]++;                                        \\r
+        SKP_Timer_sum[ID] += lpPerformanceCount.QuadPart;           \\r
+        if( lpPerformanceCount.QuadPart > SKP_Timer_max[ID] )       \\r
+            SKP_Timer_max[ID] = lpPerformanceCount.QuadPart;        \\r
+        if( lpPerformanceCount.QuadPart < SKP_Timer_min[ID] )       \\r
+            SKP_Timer_min[ID] = lpPerformanceCount.QuadPart;        \\r
+    }                                                               \\r
+    SKP_Timer_depth_ctr--;                                          \\r
+}\r
+#else\r
+#define TOC(TAG_NAME) {                                             \\r
+    unsigned long endTime;                                          \\r
+    static int init = 0;                                            \\r
+    static int ID = 0;                                              \\r
+    if( init == 0 )                                                 \\r
+    {                                                               \\r
+        int k;                                                      \\r
+        init = 1;                                                   \\r
+        for( k = 0; k < SKP_Timer_nTimers; k++ ) {                  \\r
+            if( strcmp(SKP_Timer_tags[k], #TAG_NAME) == 0 ) {       \\r
+                ID = k;                                             \\r
+                break;                                              \\r
+            }                                                       \\r
+        }                                                           \\r
+    }                                                               \\r
+    endTime = GetHighResolutionTime();                              \\r
+    endTime -= SKP_Timer_start[ID];                                 \\r
+    if((endTime < 100000000) &&                                     \\r
+        (endTime >= 0)) {                                           \\r
+        SKP_Timer_cnt[ID]++;                                        \\r
+        SKP_Timer_sum[ID] += endTime;                               \\r
+        if( endTime > SKP_Timer_max[ID] )                           \\r
+            SKP_Timer_max[ID] = endTime;                            \\r
+        if( endTime < SKP_Timer_min[ID] )                           \\r
+            SKP_Timer_min[ID] = endTime;                            \\r
+    }                                                               \\r
+        SKP_Timer_depth_ctr--;                                      \\r
+}\r
+#endif\r
+\r
+#else /* SKP_TIC_TOC */\r
+\r
+/* define macros as empty strings */\r
+#define TIC(TAG_NAME)\r
+#define TOC(TAG_NAME)\r
+#define SKP_TimerSave(FILE_NAME)\r
+\r
+#endif /* SKP_TIC_TOC */\r
+\r
+\r
+\r
+#if SKP_DEBUG\r
+/************************************/\r
+/* write data to file for debugging */\r
+/************************************/\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
+\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
+#else\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
+}\r
+#endif\r
+\r
+/* micro sec */\r
+#define SKP_GETTIME(void)       time = (SKP_int64) GetHighResolutionTime();     \r
+\r
+#else /* SKP_DEBUG */\r
+\r
+/* 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
+\r
+#endif /* SKP_DEBUG */\r
+\r
+#ifdef  __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* _SKP_DEBUG_H_ */\r
index 11cf531..9c826b0 100644 (file)
@@ -8,7 +8,7 @@ Date: 09/03/2010 (Format: DD/MM/YYYY)
 \r
 I. Description\r
 \r
-This package contains files for compiling and testing the fixed\r
+This package contains files for compilation and evaluation of the fixed\r
 point SILK SDK library. The following is included in this package:\r
 \r
     o Source code for the fixed point SILK SDK library\r
diff --git a/src/SKP_Silk_common_pitch_est_defines.h b/src/SKP_Silk_common_pitch_est_defines.h
deleted file mode 100644 (file)
index 2e001f4..0000000
+++ /dev/null
@@ -1,76 +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 SIGPROC_COMMON_PITCH_EST_DEFINES_H\r
-#define SIGPROC_COMMON_PITCH_EST_DEFINES_H\r
-\r
-#include "SKP_Silk_SigProc_FIX.h"\r
-\r
-/************************************************************/\r
-/* Definitions For Fix pitch estimator                      */\r
-/************************************************************/\r
-\r
-#define PITCH_EST_MAX_FS_KHZ                24 /* Maximum sampling frequency used */\r
-\r
-#define PITCH_EST_FRAME_LENGTH_MS           40 /* 40 ms */\r
-\r
-#define PITCH_EST_MAX_FRAME_LENGTH          (PITCH_EST_FRAME_LENGTH_MS * PITCH_EST_MAX_FS_KHZ)\r
-#define PITCH_EST_MAX_FRAME_LENGTH_ST_1     (PITCH_EST_MAX_FRAME_LENGTH >> 2)\r
-#define PITCH_EST_MAX_FRAME_LENGTH_ST_2     (PITCH_EST_MAX_FRAME_LENGTH >> 1)\r
-#define PITCH_EST_MAX_SF_FRAME_LENGTH       (PITCH_EST_SUB_FRAME * PITCH_EST_MAX_FS_KHZ)\r
-\r
-#define PITCH_EST_MAX_LAG_MS                18            /* 18 ms -> 56 Hz */\r
-#define PITCH_EST_MIN_LAG_MS                2            /* 2 ms -> 500 Hz */\r
-#define PITCH_EST_MAX_LAG                   (PITCH_EST_MAX_LAG_MS * PITCH_EST_MAX_FS_KHZ)\r
-#define PITCH_EST_MIN_LAG                   (PITCH_EST_MIN_LAG_MS * PITCH_EST_MAX_FS_KHZ)\r
-\r
-#define PITCH_EST_NB_SUBFR                  4\r
-\r
-#define PITCH_EST_D_SRCH_LENGTH             24\r
-\r
-#define PITCH_EST_MAX_DECIMATE_STATE_LENGTH 7\r
-\r
-#define PITCH_EST_NB_STAGE3_LAGS            5\r
-\r
-#define PITCH_EST_NB_CBKS_STAGE2            3\r
-#define PITCH_EST_NB_CBKS_STAGE2_EXT        11\r
-\r
-#define PITCH_EST_CB_mn2                    1\r
-#define PITCH_EST_CB_mx2                    2\r
-\r
-#define PITCH_EST_NB_CBKS_STAGE3_MAX        34\r
-#define PITCH_EST_NB_CBKS_STAGE3_MID        24\r
-#define PITCH_EST_NB_CBKS_STAGE3_MIN        16\r
-\r
-extern const SKP_int16 SKP_Silk_CB_lags_stage2[PITCH_EST_NB_SUBFR][PITCH_EST_NB_CBKS_STAGE2_EXT];\r
-extern const SKP_int16 SKP_Silk_CB_lags_stage3[PITCH_EST_NB_SUBFR][PITCH_EST_NB_CBKS_STAGE3_MAX];\r
-extern const SKP_int16 SKP_Silk_Lag_range_stage3[ SigProc_PITCH_EST_MAX_COMPLEX + 1 ] [ PITCH_EST_NB_SUBFR ][ 2 ];\r
-extern const SKP_int16 SKP_Silk_cbk_sizes_stage3[ SigProc_PITCH_EST_MAX_COMPLEX + 1 ];\r
-extern const SKP_int16 SKP_Silk_cbk_offsets_stage3[ SigProc_PITCH_EST_MAX_COMPLEX + 1 ];\r
-\r
-#endif\r
-\r
diff --git a/src/SKP_Silk_control_codec_FIX.c b/src/SKP_Silk_control_codec_FIX.c
deleted file mode 100644 (file)
index e4f6442..0000000
+++ /dev/null
@@ -1,656 +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_FIX.h"\r
-\r
-/* Control encoder SNR */\r
-SKP_int SKP_Silk_control_encoder_FIX( \r
-    SKP_Silk_encoder_state_FIX  *psEnc,             /* I/O  Pointer to Silk encoder state                   */\r
-    const SKP_int               API_fs_kHz,         /* I    External (API) sampling rate (kHz)              */\r
-    const SKP_int               PacketSize_ms,      /* I    Packet length (ms)                              */\r
-    SKP_int32                   TargetRate_bps,     /* I    Target max bitrate (bps) (used if SNR_dB == 0)  */\r
-    const SKP_int               PacketLoss_perc,    /* I    Packet loss rate (in percent)                   */\r
-    const SKP_int               INBandFec_enabled,  /* I    Enable (1) / disable (0) inband FEC             */\r
-    const SKP_int               DTX_enabled,        /* I    Enable / disable DTX                            */\r
-    const SKP_int               InputFramesize_ms,  /* I    Inputframe in ms                                */\r
-    const SKP_int               Complexity          /* I    Complexity (0->low; 1->medium; 2->high)         */\r
-)\r
-{\r
-    SKP_int32 LBRRRate_thres_bps;\r
-    SKP_int   k, fs_kHz, ret = 0;\r
-    SKP_int32 frac_Q6;\r
-    const SKP_int32 *rateTable;\r
-\r
-    /* State machine for the SWB/WB switching */\r
-    fs_kHz = psEnc->sCmn.fs_kHz;\r
-    \r
-    /* Only switch during low speech activity, when no frames are sitting in the payload buffer */\r
-    if( API_fs_kHz == 8 || fs_kHz == 0 || API_fs_kHz < fs_kHz ) {\r
-        // Switching is not possible, encoder just initialized, or internal mode higher than external\r
-        fs_kHz = API_fs_kHz;\r
-    } else {\r
-\r
-        /* Resample all valid data in x_buf. Resampling the last part gets rid of a click, 5ms after switching  */\r
-        /* this is because the same state is used when downsampling in API.c and is then up to date             */\r
-        /* the click immidiatly after switching is most of the time still there                                 */\r
-\r
-        if( psEnc->sCmn.fs_kHz == 24 ) {\r
-            /* Accumulate the difference between the target rate and limit */\r
-            if( psEnc->sCmn.fs_kHz_changed == 0 ) {\r
-                psEnc->sCmn.bitrateDiff += SKP_MUL( InputFramesize_ms, TargetRate_bps - SWB2WB_BITRATE_BPS_INITIAL );\r
-            } else {\r
-                psEnc->sCmn.bitrateDiff += SKP_MUL( InputFramesize_ms, TargetRate_bps - SWB2WB_BITRATE_BPS );\r
-            }\r
-            psEnc->sCmn.bitrateDiff = SKP_min( psEnc->sCmn.bitrateDiff, 0 );\r
-\r
-            /* Check if we should switch from 24 to 16 kHz */\r
-#if SWITCH_TRANSITION_FILTERING\r
-            if( ( psEnc->sCmn.sLP.transition_frame_no == 0 ) && /* Transition phase not active */\r
-                ( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD || psEnc->sCmn.sSWBdetect.WB_detected == 1 ) &&\r
-                ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-                psEnc->sCmn.sLP.transition_frame_no = 1; /* Begin transition phase */\r
-                psEnc->sCmn.sLP.mode = 0; /* Switch down */\r
-            }\r
-\r
-            if( ( psEnc->sCmn.sLP.transition_frame_no >= TRANSITION_FRAMES_DOWN ) && ( psEnc->sCmn.sLP.mode == 0 ) && /* Transition phase complete, ready to switch */\r
-#else\r
-            if( ( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD || psEnc->sCmn.sSWBdetect.WB_detected == 1 ) &&\r
-#endif\r
-                ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-\r
-                    SKP_int16 x_buf[    2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; \r
-                    SKP_int16 x_bufout[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ];\r
-                    \r
-                    psEnc->sCmn.bitrateDiff = 0;\r
-                    fs_kHz = 16;\r
-\r
-                    SKP_memcpy( x_buf, psEnc->x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-                    SKP_memset( psEnc->sCmn.resample24To16state, 0, sizeof( psEnc->sCmn.resample24To16state ) );\r
-                    \r
-#if LOW_COMPLEXITY_ONLY\r
-                    {\r
-                        SKP_int16 scratch[ ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) + SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ];\r
-                        SKP_Silk_resample_2_3_coarse( &x_bufout[ 0 ], psEnc->sCmn.resample24To16state, &x_buf[ 0 ], SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape, (SKP_int16*)scratch );\r
-                    }\r
-#else\r
-                    SKP_Silk_resample_2_3( &x_bufout[ 0 ], psEnc->sCmn.resample24To16state, &x_buf[ 0 ], SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-#endif\r
-\r
-                    /* set the first frame to zero, no performance difference was noticed though */\r
-                    SKP_memset( x_bufout, 0, 320 * sizeof( SKP_int16 ) );\r
-                    SKP_memcpy( psEnc->x_buf, x_bufout, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-#if SWITCH_TRANSITION_FILTERING\r
-                    psEnc->sCmn.sLP.transition_frame_no = 0; /* Transition phase complete */\r
-#endif\r
-            }\r
-        } else if( psEnc->sCmn.fs_kHz == 16 ) {\r
-\r
-            /* Check if we should switch from 16 to 24 kHz */\r
-#if SWITCH_TRANSITION_FILTERING\r
-            if( ( psEnc->sCmn.sLP.transition_frame_no == 0 ) && /* No transition phase running, ready to switch */\r
-#else\r
-            if(\r
-#endif\r
-                ( API_fs_kHz > psEnc->sCmn.fs_kHz && TargetRate_bps >= WB2SWB_BITRATE_BPS && psEnc->sCmn.sSWBdetect.WB_detected == 0 ) && \r
-                ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-\r
-                SKP_int16 x_buf[          2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; \r
-                SKP_int16 x_bufout[ 3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) / 2 ]; \r
-                SKP_int32 resample16To24state[ 11 ];\r
-\r
-                psEnc->sCmn.bitrateDiff = 0;\r
-                fs_kHz = 24;\r
-                \r
-                SKP_memcpy( x_buf, psEnc->x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-                SKP_memset( resample16To24state, 0, sizeof(resample16To24state) );\r
-                \r
-                SKP_Silk_resample_3_2( &x_bufout[ 0 ], resample16To24state, &x_buf[ 0 ], SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-\r
-                /* set the first frame to zero, no performance difference was noticed though */\r
-                SKP_memset( x_bufout, 0, 480 * sizeof( SKP_int16 ) );\r
-                SKP_memcpy( psEnc->x_buf, x_bufout, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-#if SWITCH_TRANSITION_FILTERING\r
-                psEnc->sCmn.sLP.mode = 1; /* Switch up */\r
-#endif\r
-            } else { \r
-                /* accumulate the difference between the target rate and limit */\r
-                psEnc->sCmn.bitrateDiff += SKP_MUL( InputFramesize_ms, TargetRate_bps - WB2MB_BITRATE_BPS );\r
-                psEnc->sCmn.bitrateDiff = SKP_min( psEnc->sCmn.bitrateDiff, 0 );\r
-\r
-                /* Check if we should switch from 16 to 12 kHz */\r
-#if SWITCH_TRANSITION_FILTERING\r
-                if( ( psEnc->sCmn.sLP.transition_frame_no == 0 ) && /* Transition phase not active */\r
-                    ( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ) &&\r
-                    ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-                    psEnc->sCmn.sLP.transition_frame_no = 1; /* Begin transition phase */\r
-                    psEnc->sCmn.sLP.mode = 0; /* Switch down */\r
-                }\r
-\r
-                if( ( psEnc->sCmn.sLP.transition_frame_no >= TRANSITION_FRAMES_DOWN ) && ( psEnc->sCmn.sLP.mode == 0 ) && /* Transition phase complete, ready to switch */\r
-#else\r
-                if( ( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ) &&\r
-#endif\r
-                    ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-\r
-                    SKP_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; \r
-\r
-                    SKP_memcpy( x_buf, psEnc->x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-    \r
-                    psEnc->sCmn.bitrateDiff = 0;\r
-                    fs_kHz = 12;\r
-                    \r
-                    if( API_fs_kHz == 24 ) {\r
-\r
-                        /* Intermediate upsampling of x_bufFIX from 16 to 24 kHz */\r
-                        SKP_int16 x_buf24[ 3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) / 2 ]; \r
-                        SKP_int32 scratch[    3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ];\r
-                        SKP_int32 resample16To24state[ 11 ];\r
-\r
-                        SKP_memset( resample16To24state, 0, sizeof( resample16To24state ) );\r
-                        SKP_Silk_resample_3_2( &x_buf24[ 0 ], resample16To24state, &x_buf[ 0 ], SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-\r
-                        /* Update the state of the resampler used in API.c, from 24 to 12 kHz */\r
-                        SKP_memset( psEnc->sCmn.resample24To12state, 0, sizeof( psEnc->sCmn.resample24To12state ) );\r
-                        SKP_Silk_resample_1_2_coarse( &x_buf24[ 0 ], psEnc->sCmn.resample24To12state, &x_buf[ 0 ], scratch, SKP_RSHIFT( SKP_SMULBB( 3, SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape ), 2 ) );\r
-\r
-                        /* set the first frame to zero, no performance difference was noticed though */\r
-                        SKP_memset( x_buf, 0, 240 * sizeof( SKP_int16 ) );\r
-                        SKP_memcpy( psEnc->x_buf, x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-                    } else if( API_fs_kHz == 16 ) {\r
-                        SKP_int16 x_bufout[ 3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) / 4 ]; \r
-                        SKP_memset( psEnc->sCmn.resample16To12state, 0, sizeof( psEnc->sCmn.resample16To12state ) );\r
-                        \r
-                        SKP_Silk_resample_3_4( &x_bufout[ 0 ], psEnc->sCmn.resample16To12state, &x_buf[ 0 ], SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-                    \r
-                        /* set the first frame to zero, no performance difference was noticed though */\r
-                        SKP_memset( x_bufout, 0, 240 * sizeof( SKP_int16 ) );\r
-                        SKP_memcpy( psEnc->x_buf, x_bufout, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-                    }\r
-#if SWITCH_TRANSITION_FILTERING\r
-                    psEnc->sCmn.sLP.transition_frame_no = 0; /* Transition phase complete */\r
-#endif\r
-                }\r
-            }\r
-        } else if( psEnc->sCmn.fs_kHz == 12 ) {\r
-        \r
-            /* Check if we should switch from 12 to 16 kHz */\r
-#if SWITCH_TRANSITION_FILTERING\r
-            if( ( psEnc->sCmn.sLP.transition_frame_no == 0 ) && /* No transition phase running, ready to switch */\r
-#else\r
-            if(\r
-#endif\r
-                ( API_fs_kHz > psEnc->sCmn.fs_kHz && TargetRate_bps >= MB2WB_BITRATE_BPS ) &&\r
-                ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-\r
-                SKP_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; \r
-\r
-                SKP_memcpy( x_buf, psEnc->x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-                psEnc->sCmn.bitrateDiff = 0;\r
-                fs_kHz = 16;\r
-\r
-                /* Reset state of the resampler to be used */\r
-                if( API_fs_kHz == 24 ) {\r
-            \r
-                    SKP_int16 x_bufout[ 2 * 2 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) / 3 ]; \r
-\r
-                    /* Intermediate upsampling of x_bufFIX from 12 to 24 kHz */\r
-                    SKP_int16 x_buf24[ 2 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ]; \r
-                    SKP_int32 scratch[    3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ];\r
-                    SKP_int32 resample12To24state[6];\r
-\r
-                    SKP_memset( resample12To24state, 0, sizeof( resample12To24state ) );\r
-                    SKP_Silk_resample_2_1_coarse( &x_buf[ 0 ], resample12To24state, &x_buf24[ 0 ], scratch, SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-\r
-                    SKP_memset( psEnc->sCmn.resample24To16state, 0, sizeof( psEnc->sCmn.resample24To16state ) );\r
-                \r
-#if LOW_COMPLEXITY_ONLY\r
-                    SKP_assert( sizeof( SKP_int16 ) * ( 2 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) + SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ) <= sizeof( scratch ) );\r
-                    SKP_Silk_resample_2_3_coarse( &x_bufout[ 0 ], psEnc->sCmn.resample24To16state, &x_buf24[ 0 ], SKP_LSHIFT( SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape, 1 ), (SKP_int16*)scratch );\r
-#else\r
-                    SKP_Silk_resample_2_3( &x_bufout[ 0 ], psEnc->sCmn.resample24To16state, &x_buf24[ 0 ], SKP_LSHIFT( SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape, 1 ) );\r
-#endif\r
-                \r
-                    /* set the first frame to zero, no performance difference was noticed though */\r
-                    SKP_memset( x_bufout, 0, 320 * sizeof( SKP_int16 ) );\r
-                    SKP_memcpy( psEnc->x_buf, x_bufout, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-                }\r
-#if SWITCH_TRANSITION_FILTERING\r
-                psEnc->sCmn.sLP.mode = 1; /* Switch up */\r
-#endif\r
-            } else { \r
-                /* accumulate the difference between the target rate and limit */\r
-                psEnc->sCmn.bitrateDiff += SKP_MUL( InputFramesize_ms, TargetRate_bps - MB2NB_BITRATE_BPS );\r
-                psEnc->sCmn.bitrateDiff  = SKP_min( psEnc->sCmn.bitrateDiff, 0 );\r
-\r
-                /* Check if we should switch from 12 to 8 kHz */\r
-#if SWITCH_TRANSITION_FILTERING\r
-                if( ( psEnc->sCmn.sLP.transition_frame_no == 0 ) && /* Transition phase not active */\r
-                    ( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ) &&\r
-                    ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-                    psEnc->sCmn.sLP.transition_frame_no = 1; /* Begin transition phase */\r
-                    psEnc->sCmn.sLP.mode = 0; /* Switch down */\r
-                }\r
-\r
-                if( ( psEnc->sCmn.sLP.transition_frame_no >= TRANSITION_FRAMES_DOWN ) && ( psEnc->sCmn.sLP.mode == 0 ) &&\r
-#else\r
-                if( ( psEnc->sCmn.bitrateDiff <= -ACCUM_BITS_DIFF_THRESHOLD ) &&\r
-#endif\r
-                    ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-                \r
-                    SKP_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; \r
-\r
-                    SKP_memcpy( x_buf, psEnc->x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-                    psEnc->sCmn.bitrateDiff = 0;\r
-                    fs_kHz = 8;\r
-\r
-                    if( API_fs_kHz == 24 ) {\r
-\r
-                        SKP_int32 scratch[    3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ];\r
-                        /* Intermediate upsampling of x_buf from 12 to 24 kHz */\r
-                        SKP_int16 x_buf24[ 2 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ];\r
-                        SKP_int32 resample12To24state[ 6 ];\r
-\r
-                        SKP_memset( resample12To24state, 0, sizeof( resample12To24state ) );\r
-                        SKP_Silk_resample_2_1_coarse( &x_buf[ 0 ], resample12To24state, &x_buf24[ 0 ], scratch, SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-\r
-                        /* Update the state of the resampler used in API.c, from 24 to 8 kHz */\r
-                        SKP_memset( psEnc->sCmn.resample24To8state, 0, sizeof( psEnc->sCmn.resample24To8state ) );\r
-                        SKP_Silk_resample_1_3( &x_buf[ 0 ], psEnc->sCmn.resample24To8state, &x_buf24[ 0 ], SKP_LSHIFT( SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape, 1 ) );\r
-\r
-                        /* set the first frame to zero, no performance difference was noticed though */\r
-                        SKP_memset( x_buf, 0, 160 * sizeof( SKP_int16 ) );\r
-                        SKP_memcpy( psEnc->x_buf, x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-                    } else if( API_fs_kHz == 16 ) {\r
-                        /* Intermediate upsampling of x_bufFIX from 12 to 16 kHz */\r
-                        SKP_int16 x_buf16[  3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) / 2 ]; \r
-                        SKP_int32 resample12To16state[11];\r
-                        \r
-                        SKP_memset( resample12To16state, 0, sizeof( resample12To16state ) );\r
-                        SKP_Silk_resample_3_2( &x_buf16[ 0 ], resample12To16state, &x_buf[ 0 ], SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-                        \r
-                        /* set the first frame to zero, no performance difference was noticed though */\r
-                        SKP_memset( x_buf, 0, 160 * sizeof( SKP_int16 ) );\r
-                        SKP_memcpy( psEnc->x_buf, x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-                    } else if( API_fs_kHz == 12 ) {\r
-                        SKP_int16 x_bufout[ 2 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) / 3 ]; \r
-                        SKP_memset( psEnc->sCmn.resample12To8state, 0, sizeof( psEnc->sCmn.resample12To8state ) );\r
-#if LOW_COMPLEXITY_ONLY\r
-                        {\r
-                            SKP_int16 scratch[ ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) + SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ];\r
-                            SKP_Silk_resample_2_3_coarse( &x_bufout[ 0 ], psEnc->sCmn.resample12To8state, &x_buf[ 0 ], \r
-                                SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape, scratch );\r
-                        }\r
-#else\r
-                        SKP_Silk_resample_2_3( &x_bufout[ 0 ], psEnc->sCmn.resample12To8state, &x_buf[ 0 ], SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-#endif\r
-                        /* set the first frame to zero, no performance difference was noticed though */\r
-                        SKP_memset( x_bufout, 0, 160 * sizeof( SKP_int16 ) );\r
-                        SKP_memcpy( psEnc->x_buf, x_bufout, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-                    }\r
-#if SWITCH_TRANSITION_FILTERING\r
-                    psEnc->sCmn.sLP.transition_frame_no = 0; /* Transition phase complete */\r
-#endif\r
-                }\r
-            }\r
-        } else if( psEnc->sCmn.fs_kHz == 8 ) {\r
-\r
-            /* Check if we should switch from 8 to 12 kHz */\r
-#if SWITCH_TRANSITION_FILTERING\r
-            if( ( psEnc->sCmn.sLP.transition_frame_no == 0 ) && /* No transition phase running, ready to switch */\r
-#else\r
-            if(\r
-#endif\r
-                ( API_fs_kHz > psEnc->sCmn.fs_kHz && TargetRate_bps >= NB2MB_BITRATE_BPS ) &&\r
-                ( psEnc->speech_activity_Q8 < 128 && psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-\r
-                SKP_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; \r
-\r
-                SKP_memcpy( x_buf, psEnc->x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-\r
-                psEnc->sCmn.bitrateDiff = 0;\r
-                fs_kHz = 12;\r
-\r
-                /* Reset state of the resampler to be used */\r
-                if( API_fs_kHz == 24 ) {\r
-                    SKP_int16 x_buf24[  3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ]; \r
-                    SKP_int32 scratch[ 3 * 3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) / 2 ];\r
-                    SKP_int32 resample8To24state[ 7 ];\r
-\r
-                    /* Intermediate upsampling of x_bufFIX from 8 to 24 kHz */\r
-                    SKP_memset( resample8To24state, 0, sizeof( resample8To24state ) );\r
-                    SKP_Silk_resample_3_1( &x_buf24[ 0 ], resample8To24state, &x_buf[ 0 ], SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-\r
-                    SKP_memset( psEnc->sCmn.resample24To12state, 0, sizeof( psEnc->sCmn.resample24To12state ) );\r
-                \r
-                    SKP_Silk_resample_1_2_coarse( &x_buf24[ 0 ], psEnc->sCmn.resample24To12state, &x_buf[ 0 ], scratch, SKP_RSHIFT( SKP_SMULBB( 3, SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape ), 1 ) );\r
-                \r
-                    /* set the first frame to zero, no performance difference was noticed though */\r
-                    SKP_memset( x_buf, 0, 240 * sizeof( SKP_int16 ) );\r
-                    SKP_memcpy( psEnc->x_buf, x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-                \r
-                } else if( API_fs_kHz == 16 ) {\r
-                    SKP_int16 x_buf16[ 2 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ]; \r
-                    SKP_int32 scratch[ 3 * ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) ];\r
-                    SKP_int32 resample8To16state[ 6 ];\r
-\r
-                    /* Intermediate upsampling of x_bufFIX from 8 to 16 kHz */\r
-                    SKP_memset( resample8To16state, 0, sizeof( resample8To16state ) );\r
-                    SKP_Silk_resample_2_1_coarse( &x_buf[ 0 ], resample8To16state, &x_buf16[ 0 ], scratch, SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape );\r
-\r
-                    SKP_memset( psEnc->sCmn.resample16To12state, 0, sizeof( psEnc->sCmn.resample16To12state ) );\r
-                \r
-                    SKP_Silk_resample_3_4( &x_buf[ 0 ], psEnc->sCmn.resample16To12state, &x_buf16[ 0 ], SKP_LSHIFT( SKP_LSHIFT( psEnc->sCmn.frame_length, 1 ) + psEnc->sCmn.la_shape, 1 ) );\r
-                \r
-                    /* set the first frame to zero, no performance difference was noticed though */\r
-                    SKP_memset( x_buf, 0, 240 * sizeof( SKP_int16 ) );\r
-                    SKP_memcpy( psEnc->x_buf, x_buf, ( 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ) * sizeof( SKP_int16 ) );\r
-                }\r
-#if SWITCH_TRANSITION_FILTERING\r
-                psEnc->sCmn.sLP.mode = 1; /* Switch up */\r
-#endif\r
-            } \r
-        } else {\r
-            // Internal sample frequency not supported!\r
-            SKP_assert( 0 );\r
-        }\r
-    }\r
-\r
-#if SWITCH_TRANSITION_FILTERING\r
-    /* After switching up, stop transition filter during speech inactivity */\r
-    if( ( psEnc->sCmn.sLP.mode == 1 ) &&\r
-        ( psEnc->sCmn.sLP.transition_frame_no >= TRANSITION_FRAMES_UP ) && \r
-        ( psEnc->speech_activity_Q8 < 128 ) && \r
-        ( psEnc->sCmn.nFramesInPayloadBuf == 0 ) ) {\r
-        \r
-        psEnc->sCmn.sLP.transition_frame_no = 0;\r
-\r
-        /* Reset transition filter state */\r
-        SKP_memset( psEnc->sCmn.sLP.In_LP_State, 0, 2 * sizeof( SKP_int32 ) );\r
-    }\r
-#endif\r
-\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
-#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
-            /* Begin transition phase */\r
-            psEnc->sCmn.sLP.transition_frame_no = 1;\r
-        } else {\r
-            /* End transition phase */\r
-            psEnc->sCmn.sLP.transition_frame_no = 0;\r
-        }\r
-#endif\r
-        psEnc->sCmn.inputBufIx          = 0;\r
-        psEnc->sCmn.nFramesInPayloadBuf = 0;\r
-        psEnc->sCmn.nBytesInPayloadBuf  = 0;\r
-        psEnc->sCmn.oldest_LBRR_idx     = 0;\r
-        psEnc->sCmn.TargetRate_bps      = 0; /* ensures that psEnc->SNR_dB is recomputed */\r
-\r
-        SKP_memset( psEnc->sPred.prev_NLSFq_Q15, 0, MAX_LPC_ORDER * sizeof( SKP_int ) );\r
-\r
-        /* Initialize non-zero parameters */\r
-        psEnc->sCmn.prevLag                 = 100;\r
-        psEnc->sCmn.prev_sigtype            = SIG_TYPE_UNVOICED;\r
-        psEnc->sCmn.first_frame_after_reset = 1;\r
-        psEnc->sPrefilt.lagPrev             = 100;\r
-        psEnc->sShape.LastGainIndex        = 1;\r
-        psEnc->sNSQ.lagPrev                = 100;\r
-        psEnc->sNSQ.prev_inv_gain_Q16      = 65536;\r
-        psEnc->sNSQ_LBRR.prev_inv_gain_Q16 = 65536;\r
-        psEnc->sCmn.fs_kHz = fs_kHz;\r
-        if( psEnc->sCmn.fs_kHz == 8 ) {\r
-            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
-        } 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
-        }\r
-        psEnc->sCmn.frame_length   = SKP_SMULBB( FRAME_LENGTH_MS, fs_kHz );\r
-        psEnc->sCmn.subfr_length   = SKP_DIV32_16( psEnc->sCmn.frame_length, NB_SUBFR );\r
-        psEnc->sCmn.la_pitch       = SKP_SMULBB( LA_PITCH_MS, fs_kHz );\r
-        psEnc->sCmn.la_shape       = SKP_SMULBB( LA_SHAPE_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
-        psEnc->sPred.pitch_LPC_win_length = SKP_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz );\r
-        if( psEnc->sCmn.fs_kHz == 24 ) {\r
-            psEnc->mu_LTP_Q8 = MU_LTP_QUANT_SWB_Q8;\r
-        } else if( psEnc->sCmn.fs_kHz == 16 ) {\r
-            psEnc->mu_LTP_Q8 = MU_LTP_QUANT_WB_Q8;\r
-        } else if( psEnc->sCmn.fs_kHz == 12 ) {\r
-            psEnc->mu_LTP_Q8 = MU_LTP_QUANT_MB_Q8;\r
-        } else {\r
-            psEnc->mu_LTP_Q8 = MU_LTP_QUANT_NB_Q8;\r
-        }\r
-        psEnc->sCmn.fs_kHz_changed = 1;\r
-        \r
-        /* Check that settings are valid */\r
-        SKP_assert( ( psEnc->sCmn.subfr_length * NB_SUBFR ) == psEnc->sCmn.frame_length );\r
-    } \r
-   \r
-    /* Set encoding complexity */\r
-    if( Complexity == 0 || LOW_COMPLEXITY_ONLY ) {\r
-        /* Low complexity */\r
-        psEnc->sCmn.Complexity                  = 0;\r
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_LC_MODE;\r
-        psEnc->pitchEstimationThreshold_Q16     = FIND_PITCH_CORRELATION_THRESHOLD_Q16_LC_MODE;\r
-        psEnc->sCmn.pitchEstimationLPCOrder     = 8;\r
-        psEnc->sCmn.shapingLPCOrder             = 12;\r
-        psEnc->sCmn.nStatesDelayedDecision      = 1;\r
-        psEnc->NoiseShapingQuantizer            = SKP_Silk_NSQ;\r
-        psEnc->sCmn.useInterpolatedNLSFs        = 0;\r
-        psEnc->sCmn.LTPQuantLowComplexity       = 1;\r
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS_LC_MODE;\r
-    } else if( Complexity == 1 ) {\r
-        /* Medium complexity */\r
-        psEnc->sCmn.Complexity                  = 1;\r
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_MC_MODE;\r
-        psEnc->pitchEstimationThreshold_Q16     = FIND_PITCH_CORRELATION_THRESHOLD_Q16_MC_MODE;\r
-        psEnc->sCmn.pitchEstimationLPCOrder     = 12;\r
-        psEnc->sCmn.shapingLPCOrder             = 16;\r
-        psEnc->sCmn.nStatesDelayedDecision      = 2;\r
-        psEnc->NoiseShapingQuantizer            = SKP_Silk_NSQ_del_dec;\r
-        psEnc->sCmn.useInterpolatedNLSFs        = 0;\r
-        psEnc->sCmn.LTPQuantLowComplexity       = 0;\r
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS_MC_MODE;\r
-    } else if( Complexity == 2 ) {\r
-        /* High complexity */\r
-        psEnc->sCmn.Complexity                  = 2;\r
-        psEnc->sCmn.pitchEstimationComplexity   = PITCH_EST_COMPLEXITY_HC_MODE;\r
-        psEnc->pitchEstimationThreshold_Q16     = FIND_PITCH_CORRELATION_THRESHOLD_Q16_HC_MODE;\r
-        psEnc->sCmn.pitchEstimationLPCOrder     = 16;\r
-        psEnc->sCmn.shapingLPCOrder             = 16;\r
-        psEnc->sCmn.nStatesDelayedDecision      = 4;\r
-        psEnc->NoiseShapingQuantizer            = SKP_Silk_NSQ_del_dec;\r
-        psEnc->sCmn.useInterpolatedNLSFs        = 1;\r
-        psEnc->sCmn.LTPQuantLowComplexity       = 0;\r
-        psEnc->sCmn.NLSF_MSVQ_Survivors         = MAX_NLSF_MSVQ_SURVIVORS;\r
-    } else {\r
-        ret = SKP_SILK_ENC_WRONG_COMPLEXITY_SETTING;\r
-    }\r
-\r
-    /* Dont have higher Pitch estimation LPC order than predict LPC order */\r
-    psEnc->sCmn.pitchEstimationLPCOrder = SKP_min_int( psEnc->sCmn.pitchEstimationLPCOrder, psEnc->sCmn.predictLPCOrder );\r
-\r
-    SKP_assert( psEnc->sCmn.pitchEstimationLPCOrder <= FIND_PITCH_LPC_ORDER_MAX );\r
-    SKP_assert( psEnc->sCmn.shapingLPCOrder         <= SHAPE_LPC_ORDER_MAX );\r
-    SKP_assert( psEnc->sCmn.nStatesDelayedDecision  <= DEL_DEC_STATES_MAX );\r
-\r
-    /* Set bitrate/coding quality */\r
-    TargetRate_bps = SKP_min( TargetRate_bps, 100000 );\r
-    if( psEnc->sCmn.fs_kHz == 8 ) {\r
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_NB_BPS );\r
-    } else if( psEnc->sCmn.fs_kHz == 12 ) {\r
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_MB_BPS );\r
-    } else if( psEnc->sCmn.fs_kHz == 16 ) {\r
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_WB_BPS );\r
-    } else {\r
-        TargetRate_bps = SKP_max( TargetRate_bps, MIN_TARGET_RATE_SWB_BPS );\r
-    }\r
-    if( TargetRate_bps != psEnc->sCmn.TargetRate_bps ) {\r
-        psEnc->sCmn.TargetRate_bps = TargetRate_bps;\r
-\r
-        /* if new TargetRate_bps, translate to SNR_dB value */\r
-        if( psEnc->sCmn.fs_kHz == 8 ) {\r
-            rateTable = TargetRate_table_NB;\r
-        } else if( psEnc->sCmn.fs_kHz == 12 ) {\r
-            rateTable = TargetRate_table_MB;\r
-        } else if( psEnc->sCmn.fs_kHz == 16 ) {\r
-            rateTable = TargetRate_table_WB;\r
-        } else {\r
-            rateTable = TargetRate_table_SWB;\r
-        }\r
-        for( k = 1; k < TARGET_RATE_TAB_SZ; k++ ) {\r
-            /* find bitrate interval in table and interpolate */\r
-            if( TargetRate_bps < rateTable[ k ] ) {\r
-                frac_Q6 = SKP_DIV32( SKP_LSHIFT( TargetRate_bps - rateTable[ k - 1 ], 6 ), rateTable[ k ] - rateTable[ k - 1 ] );\r
-                psEnc->SNR_dB_Q7 = SKP_LSHIFT( SNR_table_Q1[ k - 1 ], 6 ) + SKP_MUL( frac_Q6, SNR_table_Q1[ k ] - SNR_table_Q1[ k - 1 ] );\r
-                break;\r
-            }\r
-        }\r
-    }\r
-\r
-    /* Set packet size */\r
-    if( ( PacketSize_ms !=  20 ) && \r
-        ( PacketSize_ms !=  40 ) && \r
-        ( PacketSize_ms !=  60 ) && \r
-        ( PacketSize_ms !=  80 ) && \r
-        ( PacketSize_ms != 100 ) ) {\r
-        ret = SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED;\r
-    } else {\r
-        if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) {\r
-            psEnc->sCmn.PacketSize_ms = PacketSize_ms;\r
-\r
-            /* Packet length changes. Reset LBRR buffer */\r
-            SKP_Silk_LBRR_reset( &psEnc->sCmn );\r
-        }\r
-    }\r
-\r
-    /* Set packet loss rate measured by farend */\r
-    if( ( PacketLoss_perc < 0 ) || ( PacketLoss_perc > 100 ) ) {\r
-        ret = SKP_SILK_ENC_WRONG_LOSS_RATE;\r
-    }\r
-    psEnc->sCmn.PacketLoss_perc = PacketLoss_perc;\r
-\r
-#if USE_LBRR\r
-    if( INBandFec_enabled < 0 || INBandFec_enabled > 1 ) {\r
-        ret = SKP_SILK_ENC_WRONG_INBAND_FEC_SETTING;\r
-    }\r
-    \r
-    /* Only change settings if first frame in packet */\r
-    if( psEnc->sCmn.nFramesInPayloadBuf == 0 ) {\r
-        \r
-        psEnc->sCmn.LBRR_enabled = INBandFec_enabled;\r
-        if( psEnc->sCmn.fs_kHz == 8 ) {\r
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 9000;\r
-        } else if( psEnc->sCmn.fs_kHz == 12 ) {\r
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 6000;;\r
-        } else if( psEnc->sCmn.fs_kHz == 16 ) {\r
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS - 3000;\r
-        } else {\r
-            LBRRRate_thres_bps = INBAND_FEC_MIN_RATE_BPS;\r
-        }\r
-\r
-        if( psEnc->sCmn.TargetRate_bps >= LBRRRate_thres_bps ) {\r
-            /* Set gain increase / rate reduction for LBRR usage */\r
-            /* Coarse tuned with pesq for now. */\r
-            /* Linear regression coefs G = 8 - 0.5 * loss */\r
-            /* Meaning that at 16% loss main rate and redundant rate is the same, -> G = 0 */\r
-            psEnc->sCmn.LBRR_GainIncreases = SKP_max_int( 8 - SKP_RSHIFT( psEnc->sCmn.PacketLoss_perc, 1 ), 0 );\r
-\r
-            /* Set main stream rate compensation */\r
-            if( psEnc->sCmn.LBRR_enabled && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) {\r
-                /* Tuned to give aprox same mean / weighted bitrate as no inband FEC */\r
-                psEnc->inBandFEC_SNR_comp_Q8 = ( 6 << 8 ) - SKP_LSHIFT( psEnc->sCmn.LBRR_GainIncreases, 7 );\r
-            } else {\r
-                psEnc->inBandFEC_SNR_comp_Q8 = 0;\r
-                psEnc->sCmn.LBRR_enabled     = 0;\r
-            }\r
-        } else {\r
-            psEnc->inBandFEC_SNR_comp_Q8     = 0;\r
-            psEnc->sCmn.LBRR_enabled         = 0;\r
-        }\r
-    }\r
-#else\r
-    psEnc->sCmn.LBRR_enabled = 0;\r
-#endif\r
-\r
-    /* Set DTX mode */\r
-    if( DTX_enabled < 0 || DTX_enabled > 1 ) {\r
-        ret = SKP_SILK_ENC_WRONG_DTX_SETTING;\r
-    }\r
-    psEnc->sCmn.useDTX = DTX_enabled;\r
-    \r
-    return ret;\r
-}\r
-\r
-/* Control low bitrate redundancy usage */\r
-void SKP_Silk_LBRR_ctrl_FIX(\r
-    SKP_Silk_encoder_state_FIX      *psEnc,     /* I/O  encoder state                               */\r
-    SKP_Silk_encoder_control_FIX    *psEncCtrl  /* I/O  encoder control                             */\r
-)\r
-{\r
-    SKP_int LBRR_usage;\r
-\r
-    if( psEnc->sCmn.LBRR_enabled ) {\r
-        /* Control LBRR */\r
-\r
-        /* Usage Control based on sensitivity and packet loss caracteristics */\r
-        /* For now only enable adding to next for active frames. Make more complex later */\r
-        LBRR_usage = SKP_SILK_NO_LBRR;\r
-        if( psEnc->speech_activity_Q8 > LBRR_SPEECH_ACTIVITY_THRES_Q8 && psEnc->sCmn.PacketLoss_perc > LBRR_LOSS_THRES ) { // nb! maybe multiply loss prob and speech activity \r
-            //if( psEnc->PacketLoss_burst > BURST_THRES )\r
-            //  psEncCtrl->LBRR_usage = SKP_SILK_ADD_LBRR_TO_PLUS2;\r
-            //} else {\r
-                LBRR_usage = SKP_SILK_ADD_LBRR_TO_PLUS1;//SKP_SILK_NO_LBRR\r
-            //}\r
-        }\r
-        psEncCtrl->sCmn.LBRR_usage = LBRR_usage;\r
-    } else {\r
-        psEncCtrl->sCmn.LBRR_usage = SKP_SILK_NO_LBRR;\r
-    }\r
-}\r
diff --git a/src/SKP_Silk_dec_API.c b/src/SKP_Silk_dec_API.c
deleted file mode 100644 (file)
index 70f7d31..0000000
+++ /dev/null
@@ -1,343 +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_SDK_API.h"\r
-#include "SKP_Silk_main_FIX.h"\r
-\r
-/*********************/\r
-/* Decoder functions */\r
-/*********************/\r
-\r
-SKP_int SKP_Silk_SDK_Get_Decoder_Size( SKP_int32 *decSizeBytes ) \r
-{\r
-    SKP_int ret = 0;\r
-\r
-    *decSizeBytes = sizeof( SKP_Silk_decoder_state );\r
-\r
-    return ret;\r
-}\r
-\r
-/* Reset decoder state */\r
-SKP_int SKP_Silk_SDK_InitDecoder(\r
-    void* decState                                      /* I/O: State                                          */\r
-)\r
-{\r
-    SKP_int ret = 0;\r
-    SKP_Silk_decoder_state *struc;\r
-\r
-    struc = (SKP_Silk_decoder_state *)decState;\r
-\r
-    ret  = SKP_Silk_init_decoder( struc );\r
-\r
-    return ret;\r
-}\r
-\r
-/* Decode a frame */\r
-SKP_int SKP_Silk_SDK_Decode(\r
-    void*                               decState,       /* I/O: State                                           */\r
-    SKP_SILK_SDK_DecControlStruct*      decControl,     /* I/O: Control structure                               */\r
-    SKP_int                             lostFlag,       /* I:   0: no loss, 1 loss                              */\r
-    const SKP_uint8                     *inData,        /* I:   Encoded input vector                            */\r
-    const SKP_int                       nBytesIn,       /* I:   Number of input Bytes                           */\r
-    SKP_int16                           *samplesOut,    /* O:   Decoded output speech vector                    */\r
-    SKP_int16                           *nSamplesOut    /* I/O: Number of samples (vector/decoded)              */\r
-)\r
-{\r
-    SKP_int ret = 0, used_bytes, prev_fs_kHz;\r
-    SKP_Silk_decoder_state *psDec;\r
-\r
-    psDec = (SKP_Silk_decoder_state *)decState;\r
-\r
-    /**********************************/\r
-    /* Test if first frame in payload */\r
-    /**********************************/\r
-    if( psDec->moreInternalDecoderFrames == 0 ) {\r
-        /* First Frame in Payload */\r
-        psDec->nFramesDecoded = 0;  /* Used to count frames in packet */\r
-    }\r
-\r
-    if( psDec->moreInternalDecoderFrames == 0 &&    /* First frame in packet    */\r
-        lostFlag == 0 &&                            /* Not packet loss          */\r
-        nBytesIn > MAX_ARITHM_BYTES ) {             /* Too long payload         */\r
-            /* Avoid trying to decode a too large packet */\r
-            lostFlag = 1;\r
-            ret = SKP_SILK_DEC_PAYLOAD_TOO_LARGE;\r
-    }\r
-            \r
-    /* Save previous sample frequency */\r
-    prev_fs_kHz = psDec->fs_kHz;\r
-    \r
-    /* Call decoder for one frame */\r
-    ret += SKP_Silk_decode_frame( psDec, samplesOut, nSamplesOut, inData, nBytesIn, \r
-            lostFlag, &used_bytes );\r
-    \r
-    if( used_bytes ) { /* Only Call if not a packet loss */\r
-        if( psDec->nBytesLeft > 0 && psDec->FrameTermination == SKP_SILK_MORE_FRAMES && psDec->nFramesDecoded < 5 ) {\r
-            /* We have more frames in the Payload */\r
-            psDec->moreInternalDecoderFrames = 1;\r
-        } else {\r
-            /* Last frame in Payload */\r
-            psDec->moreInternalDecoderFrames = 0;\r
-            psDec->nFramesInPacket = psDec->nFramesDecoded;\r
-        \r
-            /* Track inband FEC usage */\r
-            if( psDec->vadFlag == VOICE_ACTIVITY ) {\r
-                if( psDec->FrameTermination == SKP_SILK_LAST_FRAME ) {\r
-                    psDec->no_FEC_counter++;\r
-                    if( psDec->no_FEC_counter > NO_LBRR_THRES ) {\r
-                        psDec->inband_FEC_offset = 0;\r
-                    }\r
-                } else if( psDec->FrameTermination == SKP_SILK_LBRR_VER1 ) {\r
-                    psDec->inband_FEC_offset = 1; /* FEC info with 1 packet delay */\r
-                    psDec->no_FEC_counter    = 0;\r
-                } else if( psDec->FrameTermination == SKP_SILK_LBRR_VER2 ) {\r
-                    psDec->inband_FEC_offset = 2; /* FEC info with 2 packets delay */\r
-                    psDec->no_FEC_counter    = 0;\r
-                }\r
-            }\r
-        }\r
-    }\r
-\r
-    if( psDec->fs_kHz * 1000 > decControl->sampleRate ) {\r
-        ret = SKP_SILK_DEC_WRONG_SAMPLING_FREQUENCY;\r
-    }\r
-\r
-    /* Do any resampling if needed */\r
-    if( psDec->fs_kHz * 1000 != decControl->sampleRate ) { \r
-        SKP_int16 samplesOut_tmp[ 2 * MAX_FRAME_LENGTH ];\r
-        SKP_int32 scratch[        3 * MAX_FRAME_LENGTH ];\r
-\r
-        /* Copy to a tmpbuffer as the resampling writes to samplesOut */\r
-        memcpy( samplesOut_tmp, samplesOut, *nSamplesOut * sizeof( SKP_int16 ) ); \r
-\r
-        /* Clear resampler state when switching internal sampling frequency */\r
-        if( prev_fs_kHz != psDec->fs_kHz ) {\r
-            SKP_memset( psDec->resampleState, 0, sizeof( psDec->resampleState ) );\r
-        }\r
-\r
-        if( psDec->fs_kHz == 16 && decControl->sampleRate == 24000 ) { \r
-            /* Resample from 16 kHz to 24 kHz */\r
-            SKP_Silk_resample_3_2( samplesOut, psDec->resampleState, samplesOut_tmp, *nSamplesOut );\r
-        } else if( psDec->fs_kHz == 12 && decControl->sampleRate == 24000 ) { \r
-            /* Resample from 12 kHz to 24 kHz */\r
-            SKP_Silk_resample_2_1_coarse( samplesOut_tmp, psDec->resampleState, samplesOut, scratch, *nSamplesOut );\r
-        } else if( psDec->fs_kHz == 8 && decControl->sampleRate == 24000 ) { \r
-            /* Resample from 8 kHz to 24 kHz */\r
-            SKP_Silk_resample_3_1( samplesOut, psDec->resampleState, samplesOut_tmp, *nSamplesOut );\r
-        } else if( psDec->fs_kHz == 12 && decControl->sampleRate == 16000 ) { \r
-            /* Resample from 12 kHz to 16 kHz */\r
-            SKP_Silk_resample_4_3( samplesOut, psDec->resampleState, samplesOut_tmp, *nSamplesOut );\r
-        } else if( psDec->fs_kHz == 8 && decControl->sampleRate == 16000 ) { \r
-            /* Resample from 8 kHz to 16 kHz */\r
-            SKP_Silk_resample_2_1_coarse( samplesOut_tmp, psDec->resampleState, samplesOut, scratch, *nSamplesOut );\r
-        } else if( psDec->fs_kHz == 8 && decControl->sampleRate == 12000 ) { \r
-            /* Resample from 8 kHz to 12 kHz */\r
-            SKP_Silk_resample_3_2( samplesOut, psDec->resampleState, samplesOut_tmp, *nSamplesOut );\r
-        }\r
-\r
-        *nSamplesOut = SKP_DIV32( ( SKP_int32 )*nSamplesOut * decControl->sampleRate, psDec->fs_kHz * 1000 );\r
-    }\r
-\r
-    /* Copy all parameters that are needed out of internal structure to the control stucture */\r
-    decControl->frameSize                 = ( SKP_int )psDec->frame_length;\r
-    decControl->framesPerPacket           = ( SKP_int )psDec->nFramesInPacket;\r
-    decControl->inBandFECOffset           = ( SKP_int )psDec->inband_FEC_offset;\r
-    decControl->moreInternalDecoderFrames = ( SKP_int )psDec->moreInternalDecoderFrames;\r
-\r
-    return ret;\r
-}\r
-\r
-/* Function to find LBRR information in a packet */\r
-void SKP_Silk_SDK_search_for_LBRR(\r
-    void                                       *decState,      /* I:   Decoder state, to select bitstream version only */\r
-    const SKP_uint8                     *inData,        /* I:   Encoded input vector                            */\r
-    const SKP_int16                     nBytesIn,       /* I:   Number of input Bytes                           */\r
-    SKP_int                             lost_offset,    /* I:   Offset from lost packet                         */\r
-    SKP_uint8                           *LBRRData,      /* O:   LBRR payload                                    */\r
-    SKP_int16                           *nLBRRBytes     /* O:   Number of LBRR Bytes                            */\r
-)\r
-{\r
-    SKP_Silk_decoder_state   *psDec;\r
-    SKP_Silk_decoder_state   sDec; // Local decoder state to avoid interfering with running decoder */\r
-    SKP_Silk_decoder_control sDecCtrl;\r
-    SKP_int i, TempQ[ MAX_FRAME_LENGTH ];\r
-\r
-    psDec = ( SKP_Silk_decoder_state * )decState;\r
-\r
-    if( lost_offset < 1 || lost_offset > MAX_LBRR_DELAY ) {\r
-        /* No useful FEC in this packet */\r
-        *nLBRRBytes = 0;\r
-        return;\r
-    }\r
-\r
-    sDec.nFramesDecoded = 0;\r
-    sDec.fs_kHz         = 0; /* Force update parameters LPC_order etc */\r
-    SKP_memset( sDec.prevNLSF_Q15, 0, MAX_LPC_ORDER * sizeof( SKP_int ) );\r
-    SKP_Silk_range_dec_init( &sDec.sRC, inData, ( SKP_int32 )nBytesIn );\r
-\r
-    if( psDec->bitstream_v == BIT_STREAM_V4 ) { /* Silk_v4 payload */\r
-        /* Decode all parameter indices for the whole packet*/\r
-        SKP_Silk_decode_indices_v4( &sDec );\r
-\r
-        /* Is there usable LBRR in this packet */\r
-        *nLBRRBytes = 0;\r
-        if( ( sDec.FrameTermination - 1 ) & lost_offset && sDec.FrameTermination > 0 && sDec.nBytesLeft >= 0 ) {\r
-            /* The wanted FEC is present in the packet */\r
-            for( i = 0; i < sDec.nFramesInPacket; i++ ) {\r
-                SKP_Silk_decode_parameters_v4( &sDec, &sDecCtrl, TempQ, 0 );\r
-                \r
-                if( sDec.nBytesLeft <= 0 || sDec.sRC.error ) {\r
-                    /* Corrupt stream */\r
-                    LBRRData = NULL;\r
-                    *nLBRRBytes = 0;\r
-                    break;\r
-                } else {\r
-                    sDec.nFramesDecoded++;\r
-                }\r
-            }\r
-        \r
-            if( LBRRData != NULL ) {\r
-                /* The wanted FEC is present in the packet */\r
-                *nLBRRBytes = sDec.nBytesLeft;\r
-                SKP_memcpy( LBRRData, &inData[ nBytesIn - sDec.nBytesLeft ], sDec.nBytesLeft * sizeof( SKP_uint8 ) );\r
-            }\r
-        }\r
-    } else { /* Silk_v3 payload */\r
-        while(1) {\r
-            SKP_Silk_decode_parameters( &sDec, &sDecCtrl, TempQ, 0 );\r
-\r
-            if( sDec.sRC.error ) {\r
-                /* Corrupt stream */\r
-                *nLBRRBytes = 0;\r
-                return;\r
-            };\r
-\r
-            if( ( sDec.FrameTermination - 1 ) & lost_offset && sDec.FrameTermination > 0 && sDec.nBytesLeft >= 0 ) {\r
-                /* The wanted FEC is present in the packet */\r
-                *nLBRRBytes = sDec.nBytesLeft;\r
-                SKP_memcpy( LBRRData, &inData[ nBytesIn - sDec.nBytesLeft ], sDec.nBytesLeft * sizeof( SKP_uint8 ) );\r
-                break;\r
-            }\r
-            if( sDec.nBytesLeft > 0 && sDec.FrameTermination == SKP_SILK_MORE_FRAMES ) {\r
-                sDec.nFramesDecoded++;\r
-            } else {\r
-                LBRRData = NULL;\r
-                *nLBRRBytes = 0;\r
-                break;\r
-            }\r
-        }\r
-    }\r
-}\r
-\r
-/* Getting type of content for a packet */\r
-void SKP_Silk_SDK_get_TOC(\r
-    void                                *decState,      /* I/O: Decoder state, to select bitstream version only */\r
-    const SKP_uint8                     *inData,        /* I:   Encoded input vector                            */\r
-    const SKP_int16                     nBytesIn,       /* I:   Number of input bytes                           */\r
-    SKP_Silk_TOC_struct                 *Silk_TOC       /* O:   Type of content                                 */\r
-)\r
-{\r
-    SKP_Silk_decoder_state      *psDec;\r
-    SKP_Silk_decoder_state      sDec; // Local Decoder state to avoid interfering with running decoder */\r
-    SKP_Silk_decoder_control    sDecCtrl;\r
-    SKP_int i, TempQ[ MAX_FRAME_LENGTH ];\r
-\r
-    psDec = (SKP_Silk_decoder_state *)decState;\r
-\r
-    sDec.nFramesDecoded = 0;\r
-    sDec.fs_kHz         = 0; /* Force update parameters LPC_order etc */\r
-    SKP_Silk_range_dec_init( &sDec.sRC, inData, ( SKP_int32 )nBytesIn );\r
-\r
-    if( psDec->bitstream_v == BIT_STREAM_V4 ) { /* Silk_v4 payload */\r
-        /* Decode all parameter indices for the whole packet*/\r
-        SKP_Silk_decode_indices_v4( &sDec );\r
-        \r
-        if( sDec.nFramesInPacket > SILK_MAX_FRAMES_PER_PACKET || sDec.sRC.error ) {\r
-            /* Corrupt packet */\r
-            SKP_memset( Silk_TOC, 0, sizeof( SKP_Silk_TOC_struct ) );\r
-            Silk_TOC->corrupt = 1;\r
-        } else {\r
-            Silk_TOC->corrupt = 0;\r
-            Silk_TOC->framesInPacket = sDec.nFramesInPacket;\r
-            Silk_TOC->fs_kHz         = sDec.fs_kHz;\r
-            if( sDec.FrameTermination == SKP_SILK_LAST_FRAME ) {\r
-                Silk_TOC->inbandLBRR = sDec.FrameTermination;\r
-            } else {\r
-                Silk_TOC->inbandLBRR = sDec.FrameTermination - 1;\r
-            }\r
-            /* Copy data */\r
-            for( i = 0; i < sDec.nFramesInPacket; i++ ) {\r
-                Silk_TOC->vadFlags[ i ]     = sDec.vadFlagBuf[ i ];\r
-                Silk_TOC->sigtypeFlags[ i ] = sDec.sigtype[ i ];\r
-            }\r
-        }\r
-    } else { /* Silk_v3 payload */\r
-        Silk_TOC->corrupt = 0;\r
-        while( 1 ) {\r
-            SKP_Silk_decode_parameters( &sDec, &sDecCtrl, TempQ, 0 );\r
-            \r
-            Silk_TOC->vadFlags[     sDec.nFramesDecoded ] = sDec.vadFlag;\r
-            Silk_TOC->sigtypeFlags[ sDec.nFramesDecoded ] = sDecCtrl.sigtype;\r
-\r
-            if( sDec.sRC.error ) {\r
-                /* Corrupt stream */\r
-                Silk_TOC->corrupt = 1;\r
-                break;\r
-            };\r
-\r
-            if( sDec.nBytesLeft > 0 && sDec.FrameTermination == SKP_SILK_MORE_FRAMES ) {\r
-                sDec.nFramesDecoded++;\r
-            } else {\r
-                break;\r
-            }\r
-        }\r
-        if( Silk_TOC->corrupt || sDec.FrameTermination == SKP_SILK_MORE_FRAMES || \r
-            sDec.nFramesInPacket > SILK_MAX_FRAMES_PER_PACKET ) {\r
-            /* Corrupt packet */\r
-            SKP_memset( Silk_TOC, 0, sizeof( SKP_Silk_TOC_struct ) );\r
-            Silk_TOC->corrupt = 1;\r
-        } else {\r
-            Silk_TOC->framesInPacket = sDec.nFramesDecoded;\r
-            Silk_TOC->fs_kHz         = sDec.fs_kHz;\r
-            if( sDec.FrameTermination == SKP_SILK_LAST_FRAME ) {\r
-                Silk_TOC->inbandLBRR = sDec.FrameTermination;\r
-            } else {\r
-                Silk_TOC->inbandLBRR = sDec.FrameTermination - 1;\r
-            }\r
-        }\r
-    }\r
-}\r
-\r
-/**************************/\r
-/* Get the version number */\r
-/**************************/\r
-/* Return a pointer to string specifying the version */ \r
-const char *SKP_Silk_SDK_get_version()\r
-{\r
-    static const char version[] = "1.0.2";\r
-    return version;\r
-}\r
diff --git a/src/SKP_Silk_decode_parameters.c b/src/SKP_Silk_decode_parameters.c
deleted file mode 100644 (file)
index d585395..0000000
+++ /dev/null
@@ -1,243 +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.h"\r
-\r
-/* Decode parameters from payload */\r
-void SKP_Silk_decode_parameters(\r
-    SKP_Silk_decoder_state      *psDec,             /* I/O  State                                       */\r
-    SKP_Silk_decoder_control    *psDecCtrl,         /* I/O  Decoder control                             */\r
-    SKP_int                     q[],                /* O    Excitation signal                           */\r
-    const SKP_int               fullDecoding        /* I    Flag to tell if only arithmetic decoding    */\r
-)\r
-{\r
-    SKP_int   i, k, Ix, fs_kHz_dec, nBytesUsed;\r
-    SKP_int   Ixs[ NB_SUBFR ];\r
-    SKP_int   GainsIndices[ NB_SUBFR ];\r
-    SKP_int   NLSFIndices[ NLSF_MSVQ_MAX_CB_STAGES ];\r
-    SKP_int   pNLSF_Q15[ MAX_LPC_ORDER ], pNLSF0_Q15[ MAX_LPC_ORDER ];\r
-    const SKP_int16 *cbk_ptr_Q14;\r
-    const SKP_Silk_NLSF_CB_struct *psNLSF_CB = NULL;\r
-    SKP_Silk_range_coder_state  *psRC = &psDec->sRC;\r
-\r
-    /************************/\r
-    /* Decode sampling rate */\r
-    /************************/\r
-    /* only done for first frame of packet */\r
-    if( psDec->nFramesDecoded == 0 ) {\r
-        SKP_Silk_range_decoder( &Ix, psRC, SKP_Silk_SamplingRates_CDF, SKP_Silk_SamplingRates_offset );\r
-\r
-        /* check that sampling rate is supported */\r
-        if( Ix < 0 || Ix > 3 ) {\r
-            psRC->error = RANGE_CODER_ILLEGAL_SAMPLING_RATE;\r
-            return;\r
-        }\r
-        fs_kHz_dec = SKP_Silk_SamplingRates_table[ Ix ];\r
-        SKP_Silk_decoder_set_fs( psDec, fs_kHz_dec );\r
-    }\r
-\r
-    /*******************************************/\r
-    /* Decode signal type and quantizer offset */\r
-    /*******************************************/\r
-    if( psDec->nFramesDecoded == 0 ) {\r
-        /* first frame in packet: independent coding */\r
-        SKP_Silk_range_decoder( &Ix, psRC, SKP_Silk_type_offset_CDF, SKP_Silk_type_offset_CDF_offset );\r
-    } else {\r
-        /* condidtional coding */\r
-        SKP_Silk_range_decoder( &Ix, psRC, SKP_Silk_type_offset_joint_CDF[ psDec->typeOffsetPrev ], \r
-                SKP_Silk_type_offset_CDF_offset );\r
-    }\r
-    psDecCtrl->sigtype         = SKP_RSHIFT( Ix, 1 );\r
-    psDecCtrl->QuantOffsetType = Ix & 1;\r
-    psDec->typeOffsetPrev      = Ix;\r
-\r
-    /****************/\r
-    /* Decode gains */\r
-    /****************/\r
-    /* first subframe */    \r
-    if( psDec->nFramesDecoded == 0 ) {\r
-        /* first frame in packet: independent coding */\r
-        SKP_Silk_range_decoder( &GainsIndices[ 0 ], psRC, SKP_Silk_gain_CDF[ psDecCtrl->sigtype ], SKP_Silk_gain_CDF_offset );\r
-    } else {\r
-        /* condidtional coding */\r
-        SKP_Silk_range_decoder( &GainsIndices[ 0 ], psRC, SKP_Silk_delta_gain_CDF, SKP_Silk_delta_gain_CDF_offset );\r
-    }\r
-\r
-    /* remaining subframes */\r
-    for( i = 1; i < NB_SUBFR; i++ ) {\r
-        SKP_Silk_range_decoder( &GainsIndices[ i ], psRC, SKP_Silk_delta_gain_CDF, SKP_Silk_delta_gain_CDF_offset );\r
-    }\r
-    \r
-    /* Dequant Gains */\r
-    SKP_Silk_gains_dequant( psDecCtrl->Gains_Q16, GainsIndices, &psDec->LastGainIndex, psDec->nFramesDecoded );\r
-    /****************/\r
-    /* Decode NLSFs */\r
-    /****************/\r
-    /* Set pointer to NLSF VQ CB for the current signal type */\r
-    psNLSF_CB = psDec->psNLSF_CB[ psDecCtrl->sigtype ];\r
-\r
-    /* Arithmetically decode NLSF path */\r
-    SKP_Silk_range_decoder_multi( NLSFIndices, psRC, psNLSF_CB->StartPtr, psNLSF_CB->MiddleIx, psNLSF_CB->nStages );\r
-\r
-    /* From the NLSF path, decode an NLSF vector */\r
-    SKP_Silk_NLSF_MSVQ_decode( pNLSF_Q15, psNLSF_CB, NLSFIndices, psDec->LPC_order );\r
-\r
-    /************************************/\r
-    /* Decode NLSF interpolation factor */\r
-    /************************************/\r
-    SKP_Silk_range_decoder( &psDecCtrl->NLSFInterpCoef_Q2, psRC, SKP_Silk_NLSF_interpolation_factor_CDF, \r
-        SKP_Silk_NLSF_interpolation_factor_offset );\r
-    \r
-    /* If just reset, e.g., because internal Fs changed, do not allow interpolation */\r
-    /* improves the case of packet loss in the first frame after a switch           */\r
-    if( psDec->first_frame_after_reset == 1 ) {\r
-        psDecCtrl->NLSFInterpCoef_Q2 = 4;\r
-    }\r
-\r
-    if( fullDecoding ) {\r
-        /* Convert NLSF parameters to AR prediction filter coefficients */\r
-        SKP_Silk_NLSF2A_stable( psDecCtrl->PredCoef_Q12[ 1 ], pNLSF_Q15, psDec->LPC_order );\r
-\r
-        if( psDecCtrl->NLSFInterpCoef_Q2 < 4 ) {\r
-            /* Calculation of the interpolated NLSF0 vector from the interpolation factor, */ \r
-            /* the previous NLSF1, and the current NLSF1                                   */\r
-            for( i = 0; i < psDec->LPC_order; i++ ) {\r
-                pNLSF0_Q15[ i ] = psDec->prevNLSF_Q15[ i ] + SKP_RSHIFT( SKP_MUL( psDecCtrl->NLSFInterpCoef_Q2, \r
-                    ( pNLSF_Q15[ i ] - psDec->prevNLSF_Q15[ i ] ) ), 2 );\r
-            }\r
-\r
-            /* Convert NLSF parameters to AR prediction filter coefficients */\r
-            SKP_Silk_NLSF2A_stable( psDecCtrl->PredCoef_Q12[ 0 ], pNLSF0_Q15, psDec->LPC_order );\r
-        } else {\r
-            /* Copy LPC coefficients for first half from second half */\r
-            SKP_memcpy( psDecCtrl->PredCoef_Q12[ 0 ], psDecCtrl->PredCoef_Q12[ 1 ], \r
-                psDec->LPC_order * sizeof( SKP_int16 ) );\r
-        }\r
-    }\r
-\r
-    SKP_memcpy( psDec->prevNLSF_Q15, pNLSF_Q15, psDec->LPC_order * sizeof( SKP_int ) );\r
-\r
-    /* After a packet loss do BWE of LPC coefs */\r
-    if( psDec->lossCnt ) {\r
-        SKP_Silk_bwexpander( psDecCtrl->PredCoef_Q12[ 0 ], psDec->LPC_order, BWE_AFTER_LOSS_Q16 );\r
-        SKP_Silk_bwexpander( psDecCtrl->PredCoef_Q12[ 1 ], psDec->LPC_order, BWE_AFTER_LOSS_Q16 );\r
-    }\r
-\r
-    if( psDecCtrl->sigtype == SIG_TYPE_VOICED ) {\r
-        /*********************/\r
-        /* Decode pitch lags */\r
-        /*********************/\r
-        /* Get lag index */\r
-        if( psDec->fs_kHz == 8 ) {\r
-            SKP_Silk_range_decoder( &Ixs[ 0 ], psRC, SKP_Silk_pitch_lag_NB_CDF,  SKP_Silk_pitch_lag_NB_CDF_offset );\r
-        } else if( psDec->fs_kHz == 12 ) {\r
-            SKP_Silk_range_decoder( &Ixs[ 0 ], psRC, SKP_Silk_pitch_lag_MB_CDF,  SKP_Silk_pitch_lag_MB_CDF_offset );\r
-        } else if( psDec->fs_kHz == 16 ) {\r
-            SKP_Silk_range_decoder( &Ixs[ 0 ], psRC, SKP_Silk_pitch_lag_WB_CDF,  SKP_Silk_pitch_lag_WB_CDF_offset );\r
-        } else {\r
-            SKP_Silk_range_decoder( &Ixs[ 0 ], psRC, SKP_Silk_pitch_lag_SWB_CDF, SKP_Silk_pitch_lag_SWB_CDF_offset );\r
-        }\r
-        \r
-        /* Get countour index */\r
-        if( psDec->fs_kHz == 8 ) {\r
-            /* Less codevectors used in 8 khz mode */\r
-            SKP_Silk_range_decoder( &Ixs[ 1 ], psRC, SKP_Silk_pitch_contour_NB_CDF, SKP_Silk_pitch_contour_NB_CDF_offset );\r
-        } else {\r
-            /* Joint for 12, 16, and 24 khz */\r
-            SKP_Silk_range_decoder( &Ixs[ 1 ], psRC, SKP_Silk_pitch_contour_CDF, SKP_Silk_pitch_contour_CDF_offset );\r
-        }\r
-        \r
-        /* Decode pitch values */\r
-        SKP_Silk_decode_pitch( Ixs[ 0 ], Ixs[ 1 ], psDecCtrl->pitchL, psDec->fs_kHz );\r
-\r
-        /********************/\r
-        /* Decode LTP gains */\r
-        /********************/\r
-        /* Decode PERIndex value */\r
-        SKP_Silk_range_decoder( &psDecCtrl->PERIndex, psRC, SKP_Silk_LTP_per_index_CDF, \r
-                SKP_Silk_LTP_per_index_CDF_offset );\r
-\r
-        /* Decode Codebook Index */\r
-        cbk_ptr_Q14 = SKP_Silk_LTP_vq_ptrs_Q14[ psDecCtrl->PERIndex ]; // set pointer to start of codebook\r
-        \r
-        for( k = 0; k < NB_SUBFR; k++ ) {\r
-            SKP_Silk_range_decoder( &Ix, psRC, SKP_Silk_LTP_gain_CDF_ptrs[ psDecCtrl->PERIndex ], \r
-                SKP_Silk_LTP_gain_CDF_offsets[ psDecCtrl->PERIndex ] );\r
-\r
-            for( i = 0; i < LTP_ORDER; i++ ) {\r
-                psDecCtrl->LTPCoef_Q14[ SKP_SMULBB( k, LTP_ORDER ) + i ] = cbk_ptr_Q14[ SKP_SMULBB( Ix, LTP_ORDER ) + i ];\r
-            }\r
-        }\r
-\r
-        /**********************/\r
-        /* Decode LTP scaling */\r
-        /**********************/\r
-        SKP_Silk_range_decoder( &Ix, psRC, SKP_Silk_LTPscale_CDF, SKP_Silk_LTPscale_offset );\r
-        psDecCtrl->LTP_scale_Q14 = SKP_Silk_LTPScales_table_Q14[ Ix ];\r
-    } else {\r
-        SKP_memset( psDecCtrl->pitchL,      0, NB_SUBFR * sizeof( SKP_int ) );\r
-        SKP_memset( psDecCtrl->LTPCoef_Q14, 0, NB_SUBFR * LTP_ORDER * sizeof( SKP_int16 ) );\r
-        psDecCtrl->PERIndex      = 0;\r
-        psDecCtrl->LTP_scale_Q14 = 0;\r
-    }\r
-\r
-    /***************/\r
-    /* Decode seed */\r
-    /***************/\r
-    SKP_Silk_range_decoder( &Ix, psRC, SKP_Silk_Seed_CDF, SKP_Silk_Seed_offset );\r
-    psDecCtrl->Seed = ( SKP_int32 )Ix;\r
-    /*********************************************/\r
-    /* Decode quantization indices of excitation */\r
-    /*********************************************/\r
-    SKP_Silk_decode_pulses( psRC, psDecCtrl, q, psDec->frame_length );\r
-\r
-    /*********************************************/\r
-    /* Decode VAD flag                           */\r
-    /*********************************************/\r
-    SKP_Silk_range_decoder( &psDec->vadFlag, psRC, SKP_Silk_vadflag_CDF, SKP_Silk_vadflag_offset );\r
-\r
-    /**************************************/\r
-    /* Decode Frame termination indicator */\r
-    /**************************************/\r
-    SKP_Silk_range_decoder( &psDec->FrameTermination, psRC, SKP_Silk_FrameTermination_CDF, SKP_Silk_FrameTermination_offset );\r
-\r
-    /****************************************/\r
-    /* get number of bytes used so far      */\r
-    /****************************************/\r
-    SKP_Silk_range_coder_get_length( psRC, &nBytesUsed );\r
-    psDec->nBytesLeft = psRC->bufferLength - nBytesUsed;\r
-    if( psDec->nBytesLeft < 0 ) {\r
-        psRC->error = RANGE_CODER_READ_BEYOND_BUFFER;\r
-    }\r
-\r
-    /****************************************/\r
-    /* check remaining bits in last byte    */\r
-    /****************************************/\r
-    if( psDec->nBytesLeft == 0 ) {\r
-        SKP_Silk_range_coder_check_after_decoding( psRC );\r
-    }\r
-}\r
diff --git a/src/SKP_Silk_enc_API.c b/src/SKP_Silk_enc_API.c
deleted file mode 100644 (file)
index 0bf6038..0000000
+++ /dev/null
@@ -1,268 +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
-#include "SKP_Silk_define.h"\r
-#include "SKP_Silk_main_FIX.h"\r
-#include "SKP_Silk_SDK_API.h"\r
-#include "SKP_Silk_control.h"\r
-#include "SKP_Silk_typedef.h"\r
-#include "SKP_Silk_structs.h"\r
-#define SKP_Silk_EncodeControlStruct SKP_SILK_SDK_EncControlStruct\r
-\r
-/****************************************/\r
-/* Encoder functions                    */\r
-/****************************************/\r
-\r
-SKP_int SKP_Silk_SDK_Get_Encoder_Size( SKP_int *encSizeBytes )\r
-{\r
-    SKP_int ret = 0;\r
-    \r
-    *encSizeBytes = sizeof( SKP_Silk_encoder_state_FIX );\r
-    \r
-    return ret;\r
-}\r
-\r
-\r
-/***************************************/\r
-/* Read control structure from encoder */\r
-/***************************************/\r
-SKP_int SKP_Silk_SDK_QueryEncoder(\r
-    const void *encState,                       /* I:   State Vector                                    */\r
-    SKP_Silk_EncodeControlStruct *encStatus     /* O:   Control Structure                               */\r
-)\r
-{\r
-    SKP_Silk_encoder_state_FIX *psEnc;\r
-    SKP_int ret = 0;    \r
-\r
-    psEnc = ( SKP_Silk_encoder_state_FIX* )encState;\r
-\r
-    encStatus->sampleRate = ( unsigned short )SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 );                       /* convert kHz -> Hz */ \r
-    encStatus->packetSize = ( unsigned short )SKP_SMULBB( psEnc->sCmn.fs_kHz, psEnc->sCmn.PacketSize_ms );  /* convert samples -> ms */\r
-    encStatus->bitRate    = ( unsigned short )psEnc->sCmn.TargetRate_bps;\r
-    encStatus->packetLossPercentage = psEnc->sCmn.PacketLoss_perc;\r
-    encStatus->complexity           = psEnc->sCmn.Complexity;\r
-\r
-    return ret;\r
-}\r
-\r
-/*************************/\r
-/* Init or Reset encoder */\r
-/*************************/\r
-SKP_int SKP_Silk_SDK_InitEncoder(\r
-    void                            *encState,          /* I/O: State                                           */\r
-    SKP_Silk_EncodeControlStruct    *encStatus          /* O:   Control structure                               */\r
-)\r
-{\r
-    SKP_Silk_encoder_state_FIX *psEnc;\r
-    SKP_int ret = 0;\r
-\r
-        \r
-    psEnc = ( SKP_Silk_encoder_state_FIX* )encState;\r
-\r
-    /* Reset Encoder */\r
-    if( ret += SKP_Silk_init_encoder_FIX( psEnc ) ) {\r
-        SKP_assert( 0 );\r
-    }\r
-\r
-    /* Read Control structure */\r
-    if( ret += SKP_Silk_SDK_QueryEncoder( encState, encStatus ) ) {\r
-        SKP_assert( 0 );\r
-    }\r
-\r
-\r
-    return ret;\r
-}\r
-\r
-/**************************/\r
-/* Encode frame with Silk */\r
-/**************************/\r
-SKP_int SKP_Silk_SDK_Encode( \r
-    void                                *encState,      /* I/O: State                                           */\r
-    const SKP_Silk_EncodeControlStruct  *encControl,    /* I:   Control structure                               */\r
-    const SKP_int16                     *samplesIn,     /* I:   Speech sample input vector                      */\r
-    SKP_int                             nSamplesIn,     /* I:   Number of samples in input vector               */\r
-    SKP_uint8                           *outData,       /* O:   Encoded output vector                           */\r
-    SKP_int16                           *nBytesOut      /* I/O: Number of bytes in outData (input: Max bytes)   */\r
-)\r
-{\r
-    SKP_int   API_fs_kHz, PacketSize_ms, PacketLoss_perc, UseInBandFec, UseDTX, ret = 0;\r
-    SKP_int   nSamplesToBuffer, Complexity, input_ms, nSamplesFromInput = 0;\r
-    SKP_int32 TargetRate_bps;\r
-    SKP_int16 MaxBytesOut;\r
-    SKP_Silk_encoder_state_FIX *psEnc = ( SKP_Silk_encoder_state_FIX* )encState;\r
-\r
-\r
-    SKP_assert( encControl != NULL );\r
-\r
-    /* Check sampling frequency first, to avoid divide by zero later */\r
-    if( ( encControl->sampleRate !=  8000 ) && ( encControl->sampleRate != 12000 ) && \r
-        ( encControl->sampleRate != 16000 ) && ( encControl->sampleRate != 24000 ) ) {\r
-        ret = SKP_SILK_ENC_FS_NOT_SUPPORTED;\r
-        SKP_assert( 0 );\r
-        return( ret );\r
-    }\r
-\r
-    /* Set Encoder parameters from Control structure */\r
-    API_fs_kHz      = SKP_DIV32_16( ( SKP_int )encControl->sampleRate, 1000 );          /* convert Hz -> kHz */\r
-    PacketSize_ms   = SKP_DIV32_16( ( SKP_int )encControl->packetSize, API_fs_kHz );    /* convert samples -> ms */\r
-    TargetRate_bps  =             ( SKP_int32 )encControl->bitRate;\r
-    PacketLoss_perc =               ( SKP_int )encControl->packetLossPercentage;\r
-    UseInBandFec    =               ( SKP_int )encControl->useInBandFEC;\r
-    Complexity      =               ( SKP_int )encControl->complexity;\r
-    UseDTX          =               ( SKP_int )encControl->useDTX;\r
-\r
-    /* Only accept input lengths that are multiplum of 10 ms */\r
-    input_ms = SKP_DIV32_16( nSamplesIn, API_fs_kHz );\r
-    if( ( input_ms % 10) != 0 || nSamplesIn < 0 ) {\r
-        ret = SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;\r
-        SKP_assert( 0 );\r
-        return( ret );\r
-    }\r
-\r
-    /* Make sure no more than one packet can be produced */\r
-    if( nSamplesIn > SKP_SMULBB( psEnc->sCmn.PacketSize_ms, API_fs_kHz ) ) {\r
-        ret = SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;\r
-        SKP_assert( 0 );\r
-        return( ret );\r
-    }\r
-\r
-    if( ( ret = SKP_Silk_control_encoder_FIX( psEnc, API_fs_kHz, PacketSize_ms, TargetRate_bps, \r
-                    PacketLoss_perc, UseInBandFec, UseDTX, input_ms, Complexity ) ) != 0 ) {\r
-        SKP_assert( 0 );\r
-        return( ret );\r
-    }\r
-\r
-    /* Detect energy above 8 kHz */\r
-    if( encControl->sampleRate == 24000 && psEnc->sCmn.sSWBdetect.SWB_detected == 0 && psEnc->sCmn.sSWBdetect.WB_detected == 0 ) {\r
-        SKP_Silk_detect_SWB_input( &psEnc->sCmn.sSWBdetect, samplesIn, ( SKP_int )nSamplesIn );\r
-    }\r
-\r
-    /* Input buffering/resampling and encoding */\r
-    MaxBytesOut = 0;                    /* return 0 output bytes if no encoder called */\r
-    while( 1 ) {\r
-        /* Resample/buffer */\r
-        nSamplesToBuffer = psEnc->sCmn.frame_length - psEnc->sCmn.inputBufIx;\r
-        if( encControl->sampleRate == SKP_SMULBB( psEnc->sCmn.fs_kHz, 1000 ) ) { \r
-            /* Same sample frequency - copy the data */\r
-            nSamplesToBuffer  = SKP_min_int( nSamplesToBuffer, nSamplesIn );\r
-            nSamplesFromInput = nSamplesToBuffer;\r
-            SKP_memcpy( &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], samplesIn, SKP_SMULBB( nSamplesToBuffer, sizeof( SKP_int16 ) ) );\r
-        } else if( encControl->sampleRate == 24000 && psEnc->sCmn.fs_kHz == 16 ) {\r
-            /* Resample the data from 24 kHz to 16 kHz */\r
-            nSamplesToBuffer  = SKP_min_int( nSamplesToBuffer, SKP_SMULWB( SKP_LSHIFT( nSamplesIn, 1 ), 21846 ) ); // 21846 = ceil(2/3)*2^15\r
-            nSamplesFromInput = SKP_RSHIFT( SKP_SMULBB( nSamplesToBuffer, 3 ), 1 );\r
-#if LOW_COMPLEXITY_ONLY\r
-            {\r
-                SKP_int16 scratch[ MAX_FRAME_LENGTH + SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ];\r
-                SKP_assert( nSamplesFromInput <= MAX_FRAME_LENGTH );\r
-                SKP_Silk_resample_2_3_coarse( &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], psEnc->sCmn.resample24To16state, \r
-                    samplesIn, nSamplesFromInput, scratch );\r
-            }\r
-#else\r
-            SKP_Silk_resample_2_3( &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], psEnc->sCmn.resample24To16state, \r
-                samplesIn, nSamplesFromInput );\r
-#endif\r
-        } else if( encControl->sampleRate == 24000 && psEnc->sCmn.fs_kHz == 12 ) {\r
-            SKP_int32 scratch[ 3 * MAX_FRAME_LENGTH ];\r
-            /* Resample the data from 24 kHz to 12 kHz */\r
-            nSamplesToBuffer  = SKP_min_int( nSamplesToBuffer, SKP_RSHIFT( nSamplesIn, 1 ) );\r
-            nSamplesFromInput = SKP_LSHIFT16( nSamplesToBuffer, 1 );\r
-            SKP_Silk_resample_1_2_coarse( samplesIn, psEnc->sCmn.resample24To12state, \r
-                &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], scratch, nSamplesToBuffer );\r
-        } else if( encControl->sampleRate == 24000 && psEnc->sCmn.fs_kHz == 8 ) {\r
-            /* Resample the data from 24 kHz to 8 kHz */\r
-            nSamplesToBuffer  = SKP_min_int( nSamplesToBuffer, SKP_DIV32_16( nSamplesIn, 3 ) );\r
-            nSamplesFromInput = SKP_SMULBB( nSamplesToBuffer, 3 );\r
-            SKP_Silk_resample_1_3( &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], psEnc->sCmn.resample24To8state, \r
-                samplesIn, nSamplesFromInput);\r
-        } else if( encControl->sampleRate == 16000 && psEnc->sCmn.fs_kHz == 12 ) {\r
-            /* Resample the data from 16 kHz to 12 kHz */\r
-            nSamplesToBuffer  = SKP_min_int( nSamplesToBuffer, SKP_RSHIFT( SKP_SMULBB( nSamplesIn, 3 ), 2 ) );\r
-            nSamplesFromInput = SKP_SMULWB( SKP_LSHIFT16( nSamplesToBuffer, 2 ), 21846 ); // 21846 = ceil((1/3)*2^16)\r
-            SKP_Silk_resample_3_4( &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], psEnc->sCmn.resample16To12state, \r
-                samplesIn, nSamplesFromInput );\r
-        } else if( encControl->sampleRate == 16000 && psEnc->sCmn.fs_kHz == 8 ) {\r
-            SKP_int32 scratch[ 3 * MAX_FRAME_LENGTH ];\r
-            /* Resample the data from 16 kHz to 8 kHz */\r
-            nSamplesToBuffer  = SKP_min_int( nSamplesToBuffer, SKP_RSHIFT( nSamplesIn, 1 ) );\r
-            nSamplesFromInput = SKP_LSHIFT16( nSamplesToBuffer, 1 );\r
-            SKP_Silk_resample_1_2_coarse( samplesIn, psEnc->sCmn.resample16To8state, \r
-                &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], scratch, nSamplesToBuffer );\r
-        } else if( encControl->sampleRate == 12000 && psEnc->sCmn.fs_kHz == 8 ) {\r
-            /* Resample the data from 12 kHz to 8 kHz */\r
-            nSamplesToBuffer  = SKP_min_int( nSamplesToBuffer, SKP_SMULWB( SKP_LSHIFT( nSamplesIn, 1 ), 21846 ) );\r
-            nSamplesFromInput = SKP_RSHIFT( SKP_SMULBB( nSamplesToBuffer, 3 ), 1 );\r
-#if LOW_COMPLEXITY_ONLY\r
-            {\r
-                SKP_int16 scratch[ MAX_FRAME_LENGTH + SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ];\r
-                SKP_assert( nSamplesFromInput <= MAX_FRAME_LENGTH );\r
-                SKP_Silk_resample_2_3_coarse( &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], psEnc->sCmn.resample12To8state, \r
-                    samplesIn, nSamplesFromInput, scratch );\r
-            }\r
-#else\r
-            SKP_Silk_resample_2_3( &psEnc->sCmn.inputBuf[ psEnc->sCmn.inputBufIx ], psEnc->sCmn.resample12To8state, \r
-                samplesIn, nSamplesFromInput );\r
-#endif\r
-        }\r
-        samplesIn  += nSamplesFromInput;\r
-        nSamplesIn -= nSamplesFromInput;\r
-        psEnc->sCmn.inputBufIx += nSamplesToBuffer;\r
-\r
-        /* Silk encoder */\r
-        if( psEnc->sCmn.inputBufIx >= psEnc->sCmn.frame_length ) {\r
-            /* Enough data in input buffer, so encode */\r
-            if( MaxBytesOut == 0 ) {\r
-                /* No payload obtained so far */\r
-                MaxBytesOut = *nBytesOut;\r
-                if( ( ret = SKP_Silk_encode_frame_FIX( psEnc, outData, &MaxBytesOut, psEnc->sCmn.inputBuf ) ) != 0 ) {\r
-                    SKP_assert( 0 );\r
-                }\r
-            } else {\r
-                /* outData already contains a payload */\r
-                if( ( ret = SKP_Silk_encode_frame_FIX( psEnc, outData, nBytesOut, psEnc->sCmn.inputBuf ) ) != 0 ) {\r
-                    SKP_assert( 0 );\r
-                }\r
-                /* Check that no second payload was created */\r
-                SKP_assert( *nBytesOut == 0 );\r
-            }\r
-            psEnc->sCmn.inputBufIx = 0;\r
-        } else {\r
-            break;\r
-        }\r
-    }\r
-\r
-    *nBytesOut = MaxBytesOut;\r
-    if( psEnc->sCmn.useDTX && psEnc->sCmn.inDTX ) {\r
-        /* Dtx simulation */\r
-        *nBytesOut = 0;\r
-    }\r
-\r
-\r
-    return ret;\r
-}\r
-\r
diff --git a/src/SKP_Silk_encode_parameters.c b/src/SKP_Silk_encode_parameters.c
deleted file mode 100644 (file)
index 4af3551..0000000
+++ /dev/null
@@ -1,167 +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.h"\r
-\r
-/*******************************************/\r
-/* Encode parameters to create the payload */\r
-/*******************************************/\r
-void SKP_Silk_encode_parameters(\r
-    SKP_Silk_encoder_state          *psEncC,        /* I/O  Encoder state                   */\r
-    SKP_Silk_encoder_control        *psEncCtrlC,    /* I/O  Encoder control                 */\r
-    SKP_Silk_range_coder_state      *psRC,          /* I/O  Range encoder state             */\r
-    const SKP_int                   *q              /* I    Quantization indices            */\r
-)\r
-{\r
-    SKP_int   i, k, typeOffset;\r
-    const SKP_Silk_NLSF_CB_struct *psNLSF_CB;\r
-\r
-\r
-    /************************/\r
-    /* Encode sampling rate */\r
-    /************************/\r
-    /* only done for first frame in packet */\r
-    if( psEncC->nFramesInPayloadBuf == 0 ) {\r
-        \r
-        /* Initialize arithmetic coder */\r
-        SKP_Silk_range_enc_init( &psEncC->sRC );\r
-        psEncC->nBytesInPayloadBuf = 0;\r
-\r
-        /* get sampling rate index */\r
-        for( i = 0; i < 3; i++ ) {\r
-            if( SKP_Silk_SamplingRates_table[ i ] == psEncC->fs_kHz ) {\r
-                break;\r
-            }\r
-        }\r
-        SKP_Silk_range_encoder( psRC, i, SKP_Silk_SamplingRates_CDF );\r
-    }\r
-\r
-    /*******************************************/\r
-    /* Encode signal type and quantizer offset */\r
-    /*******************************************/\r
-    typeOffset = 2 * psEncCtrlC->sigtype + psEncCtrlC->QuantOffsetType;\r
-    if( psEncC->nFramesInPayloadBuf == 0 ) {\r
-        /* first frame in packet: independent coding */\r
-        SKP_Silk_range_encoder( psRC, typeOffset, SKP_Silk_type_offset_CDF );\r
-    } else {\r
-        /* condidtional coding */\r
-        SKP_Silk_range_encoder( psRC, typeOffset, SKP_Silk_type_offset_joint_CDF[ psEncC->typeOffsetPrev ] );\r
-    }\r
-    psEncC->typeOffsetPrev = typeOffset;\r
-\r
-    /****************/\r
-    /* Encode gains */\r
-    /****************/\r
-    /* first subframe */\r
-    if( psEncC->nFramesInPayloadBuf == 0 ) {\r
-        /* first frame in packet: independent coding */\r
-        SKP_Silk_range_encoder( psRC, psEncCtrlC->GainsIndices[ 0 ], SKP_Silk_gain_CDF[ psEncCtrlC->sigtype ] );\r
-    } else {\r
-        /* condidtional coding */\r
-        SKP_Silk_range_encoder( psRC, psEncCtrlC->GainsIndices[ 0 ], SKP_Silk_delta_gain_CDF );\r
-    }\r
-\r
-    /* remaining subframes */\r
-    for( i = 1; i < NB_SUBFR; i++ ) {\r
-        SKP_Silk_range_encoder( psRC, psEncCtrlC->GainsIndices[ i ], SKP_Silk_delta_gain_CDF );\r
-    }\r
-\r
-\r
-    /****************/\r
-    /* Encode NLSFs */\r
-    /****************/\r
-    /* Range encoding of the NLSF path */\r
-    psNLSF_CB = psEncC->psNLSF_CB[ psEncCtrlC->sigtype ];\r
-    SKP_Silk_range_encoder_multi( psRC, psEncCtrlC->NLSFIndices, psNLSF_CB->StartPtr, psNLSF_CB->nStages );\r
-\r
-    /* Encode NLSF interpolation factor */\r
-    SKP_assert( psEncC->useInterpolatedNLSFs == 1 || psEncCtrlC->NLSFInterpCoef_Q2 == ( 1 << 2 ) );\r
-    SKP_Silk_range_encoder( psRC, psEncCtrlC->NLSFInterpCoef_Q2, SKP_Silk_NLSF_interpolation_factor_CDF );\r
-\r
-\r
-    if( psEncCtrlC->sigtype == SIG_TYPE_VOICED ) {\r
-        /*********************/\r
-        /* Encode pitch lags */\r
-        /*********************/\r
-\r
-\r
-        /* lag index */\r
-        if( psEncC->fs_kHz == 8 ) {\r
-            SKP_Silk_range_encoder( psRC, psEncCtrlC->lagIndex, SKP_Silk_pitch_lag_NB_CDF );\r
-        } else if( psEncC->fs_kHz == 12 ) {\r
-            SKP_Silk_range_encoder( psRC, psEncCtrlC->lagIndex, SKP_Silk_pitch_lag_MB_CDF );\r
-        } else if( psEncC->fs_kHz == 16 ) {\r
-            SKP_Silk_range_encoder( psRC, psEncCtrlC->lagIndex, SKP_Silk_pitch_lag_WB_CDF );\r
-        } else {\r
-            SKP_Silk_range_encoder( psRC, psEncCtrlC->lagIndex, SKP_Silk_pitch_lag_SWB_CDF );\r
-        }\r
-\r
-\r
-        /* countour index */\r
-        if( psEncC->fs_kHz == 8 ) {\r
-            /* Less codevectors used in 8 khz mode */\r
-            SKP_Silk_range_encoder( psRC, psEncCtrlC->contourIndex, SKP_Silk_pitch_contour_NB_CDF );\r
-        } else {\r
-            /* Joint for 12, 16, 24 khz */\r
-            SKP_Silk_range_encoder( psRC, psEncCtrlC->contourIndex, SKP_Silk_pitch_contour_CDF );\r
-        }\r
-\r
-        /********************/\r
-        /* Encode LTP gains */\r
-        /********************/\r
-\r
-        /* PERIndex value */\r
-        SKP_Silk_range_encoder( psRC, psEncCtrlC->PERIndex, SKP_Silk_LTP_per_index_CDF );\r
-\r
-        /* Codebook Indices */\r
-        for( k = 0; k < NB_SUBFR; k++ ) {\r
-            SKP_Silk_range_encoder( psRC, psEncCtrlC->LTPIndex[ k ], SKP_Silk_LTP_gain_CDF_ptrs[ psEncCtrlC->PERIndex ] );\r
-        }\r
-\r
-        /**********************/\r
-        /* Encode LTP scaling */\r
-        /**********************/\r
-        SKP_Silk_range_encoder( psRC, psEncCtrlC->LTP_scaleIndex, SKP_Silk_LTPscale_CDF );\r
-    }\r
-\r
-\r
-    /***************/\r
-    /* Encode seed */\r
-    /***************/\r
-    SKP_Silk_range_encoder( psRC, psEncCtrlC->Seed, SKP_Silk_Seed_CDF );\r
-\r
-    /*********************************************/\r
-    /* Encode quantization indices of excitation */\r
-    /*********************************************/\r
-    SKP_Silk_encode_pulses( psRC, psEncCtrlC->sigtype, psEncCtrlC->QuantOffsetType, q, psEncC->frame_length );\r
-\r
-\r
-    /*********************************************/\r
-    /* Encode VAD flag                           */\r
-    /*********************************************/\r
-    SKP_Silk_range_encoder( psRC, psEncC->vadFlag, SKP_Silk_vadflag_CDF );\r
-}\r
diff --git a/src/SKP_Silk_find_pred_coefs_FIX.c b/src/SKP_Silk_find_pred_coefs_FIX.c
deleted file mode 100644 (file)
index 57b091e..0000000
+++ /dev/null
@@ -1,148 +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_FIX.h"\r
-\r
-\r
-#define VARQ        1 // EXPERIMENTAL\r
-#define Qx          0 // EXPERIMENTAL\r
-\r
-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
-)\r
-{\r
-    SKP_int         i;\r
-    SKP_int32       WLTP[ NB_SUBFR * LTP_ORDER * LTP_ORDER ];\r
-    SKP_int32       invGains_Q16[ NB_SUBFR ], local_gains_Qx[ NB_SUBFR ], Wght_Q15[ NB_SUBFR ];\r
-    SKP_int         NLSF_Q15[ MAX_LPC_ORDER ];\r
-    const SKP_int16 *x_ptr;\r
-    SKP_int16       *x_pre_ptr, LPC_in_pre[ NB_SUBFR * MAX_LPC_ORDER + MAX_FRAME_LENGTH ];\r
-\r
-    SKP_int32       tmp, min_gain_Q16;\r
-#if !VARQ\r
-    SKP_int         LZ;\r
-#endif\r
-    SKP_int         LTP_corrs_rshift[ NB_SUBFR ];\r
-\r
-\r
-    /* weighting for weighted least squares */\r
-    min_gain_Q16 = SKP_int32_MAX >> 6;\r
-    for( i = 0; i < NB_SUBFR; i++ ) {\r
-        min_gain_Q16 = SKP_min( min_gain_Q16, psEncCtrl->Gains_Q16[ i ] );\r
-    }\r
-#if !VARQ\r
-    LZ = SKP_Silk_CLZ32( min_gain_Q16 ) - 1;\r
-    LZ = SKP_LIMIT( LZ, 0, 16 );\r
-    min_gain_Q16 = SKP_RSHIFT( min_gain_Q16, 2 ); /* Ensure that maximum invGains_Q16 is within range of a 16 bit int */\r
-#endif\r
-    for( i = 0; i < NB_SUBFR; i++ ) {\r
-        /* Divide to Q16 */\r
-        SKP_assert( psEncCtrl->Gains_Q16[ i ] > 0 );\r
-#if VARQ\r
-        /* Invert and normalize gains, and ensure that maximum invGains_Q16 is within range of a 16 bit int */\r
-        invGains_Q16[ i ] = SKP_DIV32_varQ( min_gain_Q16, psEncCtrl->Gains_Q16[ i ], 16 - 2 );\r
-#else\r
-        invGains_Q16[ i ] = SKP_DIV32( SKP_LSHIFT( min_gain_Q16, LZ ), SKP_RSHIFT( psEncCtrl->Gains_Q16[ i ], 16 - LZ ) );\r
-#endif\r
-\r
-        /* Ensure Wght_Q15 a minimum value 1 */\r
-        invGains_Q16[ i ] = SKP_max( invGains_Q16[ i ], 363 ); \r
-        \r
-        /* Square the inverted gains */\r
-        SKP_assert( invGains_Q16[ i ] == SKP_SAT16( invGains_Q16[ i ] ) );\r
-        tmp = SKP_SMULWB( invGains_Q16[ i ], invGains_Q16[ i ] );\r
-        Wght_Q15[ i ] = SKP_RSHIFT( tmp, 1 );\r
-\r
-        /* Invert the inverted and normalized gains */\r
-        local_gains_Qx[ i ] = SKP_DIV32( ( 1 << ( 16 + Qx ) ), invGains_Q16[ i ] );\r
-    }\r
-\r
-    if( psEncCtrl->sCmn.sigtype == SIG_TYPE_VOICED ) {\r
-        /**********/\r
-        /* VOICED */\r
-        /**********/\r
-        SKP_assert( psEnc->sCmn.frame_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->sCmn.pitchL[ 0 ] + LTP_ORDER / 2 );\r
-\r
-        /* LTP analysis */\r
-        SKP_Silk_find_LTP_FIX( psEncCtrl->LTPCoef_Q14, WLTP, &psEncCtrl->LTPredCodGain_Q7, res_pitch, \r
-            res_pitch + SKP_RSHIFT( psEnc->sCmn.frame_length, 1 ), psEncCtrl->sCmn.pitchL, Wght_Q15, \r
-            psEnc->sCmn.subfr_length, psEnc->sCmn.frame_length, LTP_corrs_rshift );\r
-\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 );\r
-\r
-        /* Control LTP scaling */\r
-        SKP_Silk_LTP_scale_ctrl_FIX( psEnc, psEncCtrl );\r
-\r
-        /* Create LTP residual */\r
-        SKP_Silk_LTP_analysis_filter_FIX( LPC_in_pre, psEnc->x_buf + psEnc->sCmn.frame_length - psEnc->sCmn.predictLPCOrder, \r
-            psEncCtrl->LTPCoef_Q14, psEncCtrl->sCmn.pitchL, invGains_Q16, 16, psEnc->sCmn.subfr_length, psEnc->sCmn.predictLPCOrder );\r
-\r
-    } else {\r
-        /************/\r
-        /* UNVOICED */\r
-        /************/\r
-        /* Create signal with prepended subframes, scaled by inverse gains */\r
-        x_ptr     = psEnc->x_buf + psEnc->sCmn.frame_length - psEnc->sCmn.predictLPCOrder;\r
-        x_pre_ptr = LPC_in_pre;\r
-        for( i = 0; i < NB_SUBFR; i++ ) {\r
-            SKP_Silk_scale_copy_vector16( x_pre_ptr, x_ptr, invGains_Q16[ i ], \r
-                psEnc->sCmn.subfr_length + psEnc->sCmn.predictLPCOrder );\r
-            x_pre_ptr += psEnc->sCmn.subfr_length + psEnc->sCmn.predictLPCOrder;\r
-            x_ptr     += psEnc->sCmn.subfr_length;\r
-        }\r
-\r
-        SKP_memset( psEncCtrl->LTPCoef_Q14, 0, NB_SUBFR * LTP_ORDER * sizeof( SKP_int16 ) );\r
-        psEncCtrl->LTPredCodGain_Q7 = 0;\r
-    }\r
-\r
-    /* LPC_in_pre contains the LTP-filtered input for voiced, and the unfiltered input for unvoiced */\r
-    TIC(FIND_LPC)\r
-    SKP_Silk_find_LPC_FIX( NLSF_Q15, &psEncCtrl->sCmn.NLSFInterpCoef_Q2, psEnc->sPred.prev_NLSFq_Q15, \r
-        psEnc->sCmn.useInterpolatedNLSFs * ( 1 - psEnc->sCmn.first_frame_after_reset ), psEnc->sCmn.predictLPCOrder, \r
-        LPC_in_pre, psEnc->sCmn.subfr_length + psEnc->sCmn.predictLPCOrder );\r
-    TOC(FIND_LPC)\r
-\r
-\r
-    /* Quantize LSFs */\r
-    TIC(PROCESS_LSFS)\r
-        SKP_Silk_process_NLSFs_FIX( psEnc, psEncCtrl, NLSF_Q15 );\r
-    TOC(PROCESS_LSFS)\r
-\r
-    /* Calculate residual energy using quantized LPC coefficients */\r
-    SKP_Silk_residual_energy_FIX( psEncCtrl->ResNrg, psEncCtrl->ResNrgQ, LPC_in_pre, psEncCtrl->PredCoef_Q12, local_gains_Qx, Qx,\r
-        psEnc->sCmn.subfr_length, psEnc->sCmn.predictLPCOrder );\r
-\r
-    /* Copy to prediction struct for use in next frame for fluctuation reduction */\r
-    SKP_memcpy( psEnc->sPred.prev_NLSFq_Q15, NLSF_Q15, psEnc->sCmn.predictLPCOrder * sizeof( SKP_int ) );\r
-\r
-}\r
-\r
diff --git a/src/SKP_Silk_macros.h b/src/SKP_Silk_macros.h
deleted file mode 100644 (file)
index c42aa76..0000000
+++ /dev/null
@@ -1,122 +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_API_C_H_\r
-#define _SKP_SILK_API_C_H_\r
-\r
-// This is an inline header file for general platform.\r
-\r
-// (a32 * (SKP_int32)((SKP_int16)(b32))) >> 16 output have to be 32bit int\r
-#define SKP_SMULWB(a32, b32)                   ((((a32) >> 16) * (SKP_int32)((SKP_int16)(b32))) + ((((a32) & 0x0000FFFF) * (SKP_int32)((SKP_int16)(b32))) >> 16))\r
-\r
-// a32 + (b32 * (SKP_int32)((SKP_int16)(c32))) >> 16 output have to be 32bit int\r
-#define SKP_SMLAWB(a32, b32, c32)              ((a32) + ((((b32) >> 16) * (SKP_int32)((SKP_int16)(c32))) + ((((b32) & 0x0000FFFF) * (SKP_int32)((SKP_int16)(c32))) >> 16)))\r
-\r
-// (a32 * (b32 >> 16)) >> 16\r
-#define SKP_SMULWT(a32, b32)                   (((a32) >> 16) * ((b32) >> 16) + ((((a32) & 0x0000FFFF) * ((b32) >> 16)) >> 16))\r
-\r
-// a32 + (b32 * (c32 >> 16)) >> 16\r
-#define SKP_SMLAWT(a32, b32, c32)              ((a32) + (((b32) >> 16) * ((c32) >> 16)) + ((((b32) & 0x0000FFFF) * ((c32) >> 16)) >> 16))\r
-\r
-// (SKP_int32)((SKP_int16)(a3))) * (SKP_int32)((SKP_int16)(b32)) output have to be 32bit int\r
-#define SKP_SMULBB(a32, b32)                   ((SKP_int32)((SKP_int16)(a32)) * (SKP_int32)((SKP_int16)(b32)))\r
-\r
-// a32 + (SKP_int32)((SKP_int16)(b32)) * (SKP_int32)((SKP_int16)(c32)) output have to be 32bit int\r
-#define SKP_SMLABB(a32, b32, c32)              ((a32) + ((SKP_int32)((SKP_int16)(b32))) * (SKP_int32)((SKP_int16)(c32)))\r
-\r
-// (SKP_int32)((SKP_int16)(a32)) * (b32 >> 16)\r
-#define SKP_SMULBT(a32, b32)                   ((SKP_int32)((SKP_int16)(a32)) * ((b32) >> 16))\r
-\r
-// a32 + (SKP_int32)((SKP_int16)(b32)) * (c32 >> 16)\r
-#define SKP_SMLABT(a32, b32, c32)              ((a32) + ((SKP_int32)((SKP_int16)(b32))) * ((c32) >> 16))\r
-\r
-// a64 + (b32 * c32)\r
-#define SKP_SMLAL(a64, b32, c32)               (SKP_ADD64((a64), ((SKP_int64)(b32) * (SKP_int64)(c32))))\r
-\r
-// (a32 * b32) >> 16\r
-#define SKP_SMULWW(a32, b32)                   SKP_MLA(SKP_SMULWB((a32), (b32)), (a32), SKP_RSHIFT_ROUND((b32), 16))\r
-\r
-// a32 + ((b32 * c32) >> 16)\r
-#define SKP_SMLAWW(a32, b32, c32)              SKP_MLA(SKP_SMLAWB((a32), (b32), (c32)), (b32), SKP_RSHIFT_ROUND((c32), 16))\r
-\r
-/* add/subtract with output saturated */\r
-#define SKP_ADD_SAT32(a, b)                            ((((a) + (b)) & 0x80000000) == 0 ?                                                              \\r
-                                                                               ((((a) & (b)) & 0x80000000) != 0 ? SKP_int32_MIN : (a)+(b)) :   \\r
-                                                                               ((((a) | (b)) & 0x80000000) == 0 ? SKP_int32_MAX : (a)+(b)) )\r
-\r
-#define SKP_SUB_SAT32(a, b)                            ((((a)-(b)) & 0x80000000) == 0 ?                                                                                \\r
-                                                                               (( (a) & ((b)^0x80000000) & 0x80000000) ? SKP_int32_MIN : (a)-(b)) :    \\r
-                                                                               ((((a)^0x80000000) & (b)  & 0x80000000) ? SKP_int32_MAX : (a)-(b)) )\r
-       \r
-SKP_INLINE SKP_int32 SKP_Silk_CLZ16(SKP_int16 in16)\r
-{\r
-       SKP_int32 out32 = 0;\r
-       if( in16 == 0 ) {\r
-               return 16;\r
-       }\r
-       /* test nibbles */\r
-       if( in16 & 0xFF00 ) {\r
-               if( in16 & 0xF000 )     {\r
-                       in16 >>= 12;\r
-               } else {\r
-                       out32 += 4;\r
-                       in16 >>= 8;\r
-               }\r
-       } else {\r
-               if( in16 & 0xFFF0 )     {\r
-                       out32 += 8;\r
-                       in16 >>= 4;\r
-               } else {\r
-                       out32 += 12;\r
-               }\r
-       }\r
-       /* test bits and return */\r
-       if( in16 & 0xC ) {\r
-               if( in16 & 0x8 )\r
-                       return out32 + 0;\r
-               else\r
-                       return out32 + 1;\r
-       } else {\r
-               if( in16 & 0xE )\r
-                       return out32 + 2;\r
-               else\r
-                       return out32 + 3;\r
-       }\r
-}\r
-\r
-SKP_INLINE SKP_int32 SKP_Silk_CLZ32(SKP_int32 in32)\r
-{\r
-       /* test highest 16 bits and convert to SKP_int16 */\r
-       if( in32 & 0xFFFF0000 ) {\r
-               return SKP_Silk_CLZ16((SKP_int16)(in32 >> 16));\r
-       } else {\r
-               return SKP_Silk_CLZ16((SKP_int16)in32) + 16;\r
-       }\r
-}\r
-\r
-#endif //_SKP_SILK_API_C_H_\r
-\r
diff --git a/src/SKP_Silk_range_coder.c b/src/SKP_Silk_range_coder.c
deleted file mode 100644 (file)
index b42fa42..0000000
+++ /dev/null
@@ -1,372 +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.h"\r
-\r
-/* Range encoder for one symbol */\r
-void SKP_Silk_range_encoder(\r
-    SKP_Silk_range_coder_state      *psRC,              /* I/O  compressor data structure                   */\r
-    const SKP_int                   data,               /* I    uncompressed data                           */\r
-    const SKP_uint16                prob[]              /* I    cumulative density functions                */\r
-)\r
-{\r
-    SKP_uint32 low_Q16, high_Q16;\r
-    SKP_uint32 base_tmp, range_Q32;\r
-\r
-    /* Copy structure data */\r
-    SKP_uint32 base_Q32  = psRC->base_Q32;\r
-    SKP_uint32 range_Q16 = psRC->range_Q16;\r
-    SKP_int32  bufferIx  = psRC->bufferIx;\r
-    SKP_uint8  *buffer   = psRC->buffer;\r
-\r
-    if( psRC->error ) {\r
-        return;\r
-    }\r
-\r
-    /* Update interval */\r
-    low_Q16  = prob[ data ];\r
-    high_Q16 = prob[ data + 1 ];\r
-    base_tmp = base_Q32; /* save current base, to test for carry */\r
-    base_Q32 += SKP_MUL_uint( range_Q16, low_Q16 );\r
-    range_Q32 = SKP_MUL_uint( range_Q16, high_Q16 - low_Q16 );\r
-\r
-    /* Check for carry */\r
-    if( base_Q32 < base_tmp ) {\r
-        /* Propagate carry in buffer */\r
-        SKP_int bufferIx_tmp = bufferIx;\r
-        while( ( ++buffer[ --bufferIx_tmp ] ) == 0 );\r
-    }\r
-\r
-    /* Check normalization */\r
-    if( range_Q32 & 0xFF000000 ) {\r
-        /* No normalization */\r
-        range_Q16 = SKP_RSHIFT_uint( range_Q32, 16 );\r
-    } else {\r
-        if( range_Q32 & 0xFFFF0000 ) {\r
-            /* Normalization of 8 bits shift */\r
-            range_Q16 = SKP_RSHIFT_uint( range_Q32, 8 );\r
-        } else {\r
-            /* Normalization of 16 bits shift */\r
-            range_Q16 = range_Q32;\r
-            /* Make sure not to write beyond buffer */\r
-            if( bufferIx >= psRC->bufferLength ) {\r
-                psRC->error = RANGE_CODER_WRITE_BEYOND_BUFFER;\r
-                return;\r
-            }\r
-            /* Write one byte to buffer */\r
-            buffer[ bufferIx++ ] = (SKP_uint8)( SKP_RSHIFT_uint( base_Q32, 24 ) );\r
-            base_Q32 = SKP_LSHIFT_ovflw( base_Q32, 8 );\r
-        }\r
-        /* Make sure not to write beyond buffer */\r
-        if( bufferIx >= psRC->bufferLength ) {\r
-            psRC->error = RANGE_CODER_WRITE_BEYOND_BUFFER;\r
-            return;\r
-        }\r
-        /* Write one byte to buffer */\r
-        buffer[ bufferIx++ ] = (SKP_uint8)( SKP_RSHIFT_uint( base_Q32, 24 ) );\r
-        base_Q32 = SKP_LSHIFT_ovflw( base_Q32, 8 );\r
-    }\r
-\r
-    /* Copy structure data back */\r
-    psRC->base_Q32  = base_Q32;\r
-    psRC->range_Q16 = range_Q16;\r
-    psRC->bufferIx  = bufferIx;\r
-}\r
-\r
-/* Range encoder for multiple symbols */\r
-void SKP_Silk_range_encoder_multi(\r
-    SKP_Silk_range_coder_state      *psRC,              /* I/O  compressor data structure                   */\r
-    const SKP_int                   data[],             /* I    uncompressed data    [nSymbols]             */\r
-    const SKP_uint16 * const        prob[],             /* I    cumulative density functions                */\r
-    const SKP_int                   nSymbols            /* I    number of data symbols                      */\r
-)\r
-{\r
-    SKP_int k;\r
-    for( k = 0; k < nSymbols; k++ ) {\r
-        SKP_Silk_range_encoder( psRC, data[ k ], prob[ k ] );\r
-    }\r
-}\r
-\r
-/* Range decoder for one symbol */\r
-void SKP_Silk_range_decoder(\r
-    SKP_int                         data[],             /* O    uncompressed data                           */\r
-    SKP_Silk_range_coder_state      *psRC,              /* I/O  compressor data structure                   */\r
-    const SKP_uint16                prob[],             /* I    cumulative density function                 */\r
-    SKP_int                         probIx              /* I    initial (middle) entry of cdf               */\r
-)\r
-{\r
-    SKP_uint32 low_Q16, high_Q16;\r
-    SKP_uint32 base_tmp, range_Q32;\r
-\r
-    /* Copy structure data */\r
-    SKP_uint32 base_Q32  = psRC->base_Q32;\r
-    SKP_uint32 range_Q16 = psRC->range_Q16;\r
-    SKP_int32  bufferIx  = psRC->bufferIx;\r
-    SKP_uint8  *buffer   = &psRC->buffer[ 4 ];\r
-\r
-    if( psRC->error ) {\r
-        /* Set output to zero */\r
-        *data = 0;\r
-        return;\r
-    }\r
-\r
-    high_Q16 = prob[ probIx ];\r
-    base_tmp = SKP_MUL_uint( range_Q16, high_Q16 );\r
-    if( base_tmp > base_Q32 ) {\r
-        while( 1 ) {\r
-            low_Q16 = prob[ --probIx ];\r
-            base_tmp = SKP_MUL_uint( range_Q16, low_Q16 );\r
-            if( base_tmp <= base_Q32 ) {\r
-                break;\r
-            }\r
-            high_Q16 = low_Q16;\r
-            /* Test for out of range */\r
-            if( high_Q16 == 0 ) {\r
-                psRC->error = RANGE_CODER_CDF_OUT_OF_RANGE;\r
-                /* Set output to zero */\r
-                *data = 0;\r
-                return;\r
-            }\r
-        }\r
-    } else {\r
-        while( 1 ) {\r
-            low_Q16  = high_Q16;\r
-            high_Q16 = prob[ ++probIx ];\r
-            base_tmp = SKP_MUL_uint( range_Q16, high_Q16 );\r
-            if( base_tmp > base_Q32 ) {\r
-                probIx--;\r
-                break;\r
-            }\r
-            /* Test for out of range */\r
-            if( high_Q16 == 0xFFFF ) {\r
-                psRC->error = RANGE_CODER_CDF_OUT_OF_RANGE;\r
-                /* Set output to zero */\r
-                *data = 0;\r
-                return;\r
-            }\r
-        }\r
-    }\r
-    *data = probIx;\r
-    base_Q32 -= SKP_MUL_uint( range_Q16, low_Q16 );\r
-    range_Q32 = SKP_MUL_uint( range_Q16, high_Q16 - low_Q16 );\r
-\r
-    /* Check normalization */\r
-    if( range_Q32 & 0xFF000000 ) {\r
-        /* No normalization */\r
-        range_Q16 = SKP_RSHIFT_uint( range_Q32, 16 );\r
-    } else {\r
-        if( range_Q32 & 0xFFFF0000 ) {\r
-            /* Normalization of 8 bits shift */\r
-            range_Q16 = SKP_RSHIFT_uint( range_Q32, 8 );\r
-            /* Check for errors */\r
-            if( SKP_RSHIFT_uint( base_Q32, 24 ) ) {\r
-                psRC->error = RANGE_CODER_NORMALIZATION_FAILED;\r
-                /* Set output to zero */\r
-                *data = 0;\r
-                return;\r
-            }\r
-        } else {\r
-            /* Normalization of 16 bits shift */\r
-            range_Q16 = range_Q32;\r
-            /* Check for errors */\r
-            if( SKP_RSHIFT( base_Q32, 16 ) ) {\r
-                psRC->error = RANGE_CODER_NORMALIZATION_FAILED;\r
-                /* Set output to zero */\r
-                *data = 0;\r
-                return;\r
-            }\r
-            /* Update base */\r
-            base_Q32 = SKP_LSHIFT_uint( base_Q32, 8 );\r
-            /* Make sure not to read beyond buffer */\r
-            if( bufferIx < psRC->bufferLength ) {\r
-                /* Read one byte from buffer */\r
-                base_Q32 |= (SKP_uint32)buffer[ bufferIx++ ];\r
-            }\r
-        }\r
-        /* Update base */\r
-        base_Q32 = SKP_LSHIFT_uint( base_Q32, 8 );\r
-        /* Make sure not to read beyond buffer */\r
-        if( bufferIx < psRC->bufferLength ) {\r
-            /* Read one byte from buffer */\r
-            base_Q32 |= (SKP_uint32)buffer[ bufferIx++ ];\r
-        }\r
-    }\r
-\r
-    /* Check for zero interval length */\r
-    if( range_Q16 == 0 ) {\r
-        psRC->error = RANGE_CODER_ZERO_INTERVAL_WIDTH;\r
-        /* Set output to zero */\r
-        *data = 0;\r
-        return;\r
-    }\r
-\r
-    /* Copy structure data back */\r
-    psRC->base_Q32  = base_Q32;\r
-    psRC->range_Q16 = range_Q16;\r
-    psRC->bufferIx  = bufferIx;\r
-}\r
-\r
-/* Range decoder for multiple symbols */\r
-void SKP_Silk_range_decoder_multi(\r
-    SKP_int                         data[],             /* O    uncompressed data                [nSymbols] */\r
-    SKP_Silk_range_coder_state      *psRC,              /* I/O  compressor data structure                   */\r
-    const SKP_uint16 * const        prob[],             /* I    cumulative density functions                */\r
-    const SKP_int                   probStartIx[],      /* I    initial (middle) entries of cdfs [nSymbols] */\r
-    const SKP_int                   nSymbols            /* I    number of data symbols                      */\r
-)\r
-{\r
-    SKP_int k;\r
-    for( k = 0; k < nSymbols; k++ ) {\r
-        SKP_Silk_range_decoder( &data[ k ], psRC, prob[ k ], probStartIx[ k ] );\r
-    }\r
-}\r
-\r
-/* Initialize range encoder */\r
-void SKP_Silk_range_enc_init(\r
-    SKP_Silk_range_coder_state      *psRC               /* O    compressor data structure                   */\r
-)\r
-{\r
-    /* Initialize structure */\r
-    psRC->bufferLength = MAX_ARITHM_BYTES;\r
-    psRC->range_Q16    = 0x0000FFFF;\r
-    psRC->bufferIx     = 0;\r
-    psRC->base_Q32     = 0;\r
-    psRC->error        = 0;\r
-}\r
-\r
-/* Initialize range decoder */\r
-void SKP_Silk_range_dec_init(\r
-    SKP_Silk_range_coder_state      *psRC,              /* O    compressor data structure                   */\r
-    const SKP_uint8                 buffer[],           /* I    buffer for compressed data [bufferLength]   */\r
-    const SKP_int32                 bufferLength        /* I    buffer length (in bytes)                    */\r
-)\r
-{\r
-    /* check input */\r
-    if( bufferLength > MAX_ARITHM_BYTES ) {\r
-        psRC->error = RANGE_CODER_DEC_PAYLOAD_TOO_LONG;\r
-        return;\r
-    }\r
-    /* Initialize structure */\r
-    /* Copy to internal buffer */\r
-    SKP_memcpy( psRC->buffer, buffer, bufferLength * sizeof( SKP_uint8 ) ); \r
-    psRC->bufferLength = bufferLength;\r
-    psRC->bufferIx = 0;\r
-    psRC->base_Q32 = \r
-        SKP_LSHIFT_uint( (SKP_uint32)buffer[ 0 ], 24 ) | \r
-        SKP_LSHIFT_uint( (SKP_uint32)buffer[ 1 ], 16 ) | \r
-        SKP_LSHIFT_uint( (SKP_uint32)buffer[ 2 ],  8 ) | \r
-                         (SKP_uint32)buffer[ 3 ];\r
-    psRC->range_Q16 = 0x0000FFFF;\r
-    psRC->error     = 0;\r
-}\r
-\r
-/* Determine length of bitstream */\r
-SKP_int SKP_Silk_range_coder_get_length(                /* O    returns number of BITS in stream            */\r
-    const SKP_Silk_range_coder_state    *psRC,          /* I    compressed data structure                   */\r
-    SKP_int                             *nBytes         /* O    number of BYTES in stream                   */\r
-)\r
-{\r
-    SKP_int nBits;\r
-\r
-    /* Number of additional bits (1..9) required to be stored to stream */\r
-    nBits = SKP_LSHIFT( psRC->bufferIx, 3 ) + SKP_Silk_CLZ32( psRC->range_Q16 - 1 ) - 14;\r
-\r
-    *nBytes = SKP_RSHIFT( nBits + 7, 3 );\r
-\r
-    /* Return number of bits in bitstream */\r
-    return nBits;\r
-}\r
-\r
-/* Write shortest uniquely decodable stream to buffer, and determine its length */\r
-void SKP_Silk_range_enc_wrap_up(\r
-    SKP_Silk_range_coder_state      *psRC               /* I/O  compressed data structure                   */\r
-)\r
-{\r
-    SKP_int bufferIx_tmp, bits_to_store, bits_in_stream, nBytes, mask;\r
-    SKP_uint32 base_Q24;\r
-\r
-    /* Lower limit of interval, shifted 8 bits to the right */\r
-    base_Q24 = SKP_RSHIFT_uint( psRC->base_Q32, 8 );\r
-\r
-    bits_in_stream = SKP_Silk_range_coder_get_length( psRC, &nBytes );\r
-\r
-    /* Number of additional bits (1..9) required to be stored to stream */\r
-    bits_to_store = bits_in_stream - SKP_LSHIFT( psRC->bufferIx, 3 );\r
-    /* Round up to required resolution */\r
-    base_Q24 += SKP_RSHIFT_uint(  0x00800000, bits_to_store - 1 );\r
-    base_Q24 &= SKP_LSHIFT_ovflw( 0xFFFFFFFF, 24 - bits_to_store );\r
-\r
-    /* Check for carry */\r
-    if( base_Q24 & 0x01000000 ) {\r
-        /* Propagate carry in buffer */\r
-        bufferIx_tmp = psRC->bufferIx;\r
-        while( ( ++( psRC->buffer[ --bufferIx_tmp ] ) ) == 0 );\r
-    }\r
-\r
-    /* Store to stream, making sure not to write beyond buffer */\r
-    if( psRC->bufferIx < psRC->bufferLength ) {\r
-        psRC->buffer[ psRC->bufferIx++ ] = (SKP_uint8)SKP_RSHIFT_uint( base_Q24, 16 );\r
-        if( bits_to_store > 8 ) {\r
-            if( psRC->bufferIx < psRC->bufferLength ) {\r
-                psRC->buffer[ psRC->bufferIx++ ] = (SKP_uint8)SKP_RSHIFT_uint( base_Q24, 8 );\r
-            }\r
-        }\r
-    }\r
-\r
-    /* Fill up any remaining bits in the last byte with 1s */\r
-    if( bits_in_stream & 7 ) {\r
-        mask = SKP_RSHIFT( 0xFF, bits_in_stream & 7 );\r
-        if( nBytes - 1 < psRC->bufferLength ) {\r
-            psRC->buffer[ nBytes - 1 ] |= mask;\r
-        }\r
-    }\r
-}\r
-\r
-/* Check that any remaining bits in the last byte are set to 1 */\r
-void SKP_Silk_range_coder_check_after_decoding(\r
-    SKP_Silk_range_coder_state      *psRC               /* I/O  compressed data structure                   */\r
-)\r
-{\r
-    SKP_int bits_in_stream, nBytes, mask;\r
-\r
-    bits_in_stream = SKP_Silk_range_coder_get_length( psRC, &nBytes );\r
-\r
-    /* Make sure not to read beyond buffer */\r
-    if( nBytes - 1 >= psRC->bufferLength ) {\r
-        psRC->error = RANGE_CODER_DECODER_CHECK_FAILED;\r
-        return;\r
-    }\r
-\r
-    /* Test any remaining bits in last byte */\r
-    if( bits_in_stream & 7 ) {\r
-        mask = SKP_RSHIFT( 0xFF, bits_in_stream & 7 );\r
-        if( ( psRC->buffer[ nBytes - 1 ] & mask ) != mask ) {\r
-            psRC->error = RANGE_CODER_DECODER_CHECK_FAILED;\r
-            return;\r
-        }\r
-    }\r
-}\r
diff --git a/src/SKP_Silk_resample_1_2.c b/src/SKP_Silk_resample_1_2.c
deleted file mode 100644 (file)
index 712e32d..0000000
+++ /dev/null
@@ -1,77 +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
- * SKP_Silk_resample_1_2                                              *\r
- *                                                                      *\r
- * Downsample by a factor 2                                             *\r
- *                                                                      *\r
- * Copyright 2006 (c), Skype Limited                                    *\r
- * Date: 060221                                                         *\r
- *                                                                      */\r
-#include "SKP_Silk_SigProc_FIX.h"\r
-\r
-/* Coefficients for 2-fold resampling */\r
-static SKP_int16 A20_Resample_1_2[ 3 ] = { 1254, 10102, 22898 };\r
-static SKP_int16 A21_Resample_1_2[ 3 ] = { 4810, 16371, 29374 };\r
-\r
-\r
-/* Downsample by a factor 2 */\r
-void SKP_Silk_resample_1_2(\r
-    const SKP_int16      *in,            /* I:   16 kHz signal [2*len]   */\r
-    SKP_int32            *S,             /* I/O: State vector [6]        */\r
-    SKP_int16            *out,           /* O:   8 kHz signal [len]      */\r
-    SKP_int32            *scratch,       /* I:   Scratch memory [4*len]  */\r
-    const SKP_int32      len             /* I:   Number of OUTPUT samples*/\r
-)\r
-{\r
-    SKP_int32    k, idx;\r
-\r
-    /* De-interleave allpass inputs, and convert Q15 -> Q25 */\r
-    for( k = 0; k < len; k++ ) {\r
-        idx = SKP_LSHIFT( k, 1 );\r
-        scratch[ k ]       = SKP_LSHIFT( (SKP_int32)in[ idx     ], 10 );\r
-        scratch[ k + len ] = SKP_LSHIFT( (SKP_int32)in[ idx + 1 ], 10 );\r
-    }\r
-\r
-    idx = SKP_LSHIFT( len, 1 );\r
-\r
-    /* Allpass filters */\r
-    SKP_Silk_allpass_int( scratch,             S,     A21_Resample_1_2[ 0 ], scratch + idx,       len );\r
-    SKP_Silk_allpass_int( scratch + idx,       S + 1, A21_Resample_1_2[ 1 ], scratch + idx + len, len );\r
-    SKP_Silk_allpass_int( scratch + idx + len, S + 2, A21_Resample_1_2[ 2 ], scratch,             len );\r
-\r
-    SKP_Silk_allpass_int( scratch + len,       S + 3, A20_Resample_1_2[ 0 ], scratch + idx,       len );\r
-    SKP_Silk_allpass_int( scratch + idx,       S + 4, A20_Resample_1_2[ 1 ], scratch + idx + len, len );\r
-    SKP_Silk_allpass_int( scratch + idx + len, S + 5, A20_Resample_1_2[ 2 ], scratch + len,       len );\r
-\r
-    /* Add two allpass outputs */\r
-    for( k = 0; k < len; k++ ) {\r
-        out[ k ] = (SKP_int16)SKP_SAT16( SKP_RSHIFT_ROUND( scratch[ k ] + scratch[ k + len ], 11 ) );\r
-    }\r
-}\r
-\r
diff --git a/src/SKP_Silk_resample_1_3.c b/src/SKP_Silk_resample_1_3.c
deleted file mode 100644 (file)
index 0f77412..0000000
+++ /dev/null
@@ -1,101 +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
- * SKP_Silk_resample_1_3.c                                            *\r
- *                                                                      *\r
- * Downsamples by a factor 3                                            *\r
- *                                                                      *\r
- * Copyright 2008 (c), Skype Limited                                    *\r
- * Date: 081113                                                         *\r
- *                                                                      */\r
-#include "SKP_Silk_SigProc_FIX.h"\r
-\r
-#define OUT_SUBFR_LEN        80\r
-\r
-/* Downsamples by a factor 3 */\r
-void SKP_Silk_resample_1_3(\r
-    SKP_int16            *out,       /* O:   Fs_low signal  [inLen/3]                */\r
-    SKP_int32            *S,         /* I/O: State vector   [7]                      */\r
-    const SKP_int16      *in,        /* I:   Fs_high signal [inLen]                  */\r
-    const SKP_int32      inLen       /* I:   Input length, must be a multiple of 3   */\r
-)\r
-{\r
-    SKP_int      k, outLen, LSubFrameIn, LSubFrameOut;\r
-    SKP_int32    out_tmp, limit = 102258000; // (102258000 + 1560) * 21 * 2^(-16) = 32767.5\r
-    SKP_int32    scratch0[ 3 * OUT_SUBFR_LEN ];\r
-    SKP_int32    scratch10[ OUT_SUBFR_LEN ], scratch11[ OUT_SUBFR_LEN ], scratch12[ OUT_SUBFR_LEN ];\r
-    /* coefficients for 3-fold resampling */\r
-    const SKP_int16 A30[ 2 ] = {  1773, 17818 };\r
-    const SKP_int16 A31[ 2 ] = {  4942, 25677 };\r
-    const SKP_int16 A32[ 2 ] = { 11786, 29304 };\r
-\r
-    /* Check that input is multiple of 3 */\r
-    SKP_assert( inLen % 3 == 0 );\r
-\r
-    outLen = SKP_DIV32_16( inLen, 3 );\r
-    while( outLen > 0 ) {\r
-        LSubFrameOut = SKP_min_int( OUT_SUBFR_LEN, outLen );\r
-        LSubFrameIn  = SKP_SMULBB( 3, LSubFrameOut );\r
-\r
-        /* Low-pass filter, Q15 -> Q25 */\r
-        SKP_Silk_lowpass_short( in, S, scratch0, LSubFrameIn );\r
-\r
-        /* De-interleave three allpass inputs */\r
-        for( k = 0; k < LSubFrameOut; k++ ) {\r
-            scratch10[ k ] = scratch0[ 3 * k     ];\r
-            scratch11[ k ] = scratch0[ 3 * k + 1 ];\r
-            scratch12[ k ] = scratch0[ 3 * k + 2 ];\r
-        }\r
-\r
-        /* Allpass filters */\r
-        SKP_Silk_allpass_int( scratch10, S + 1, A32[ 0 ], scratch0,  LSubFrameOut );\r
-        SKP_Silk_allpass_int( scratch0,  S + 2, A32[ 1 ], scratch10, LSubFrameOut );\r
-\r
-        SKP_Silk_allpass_int( scratch11, S + 3, A31[ 0 ], scratch0,  LSubFrameOut );\r
-        SKP_Silk_allpass_int( scratch0,  S + 4, A31[ 1 ], scratch11, LSubFrameOut );\r
-\r
-        SKP_Silk_allpass_int( scratch12, S + 5, A30[ 0 ], scratch0,  LSubFrameOut );\r
-        SKP_Silk_allpass_int( scratch0,  S + 6, A30[ 1 ], scratch12, LSubFrameOut );\r
-\r
-        /* Add three allpass outputs */\r
-        for( k = 0; k < LSubFrameOut; k++ ) {\r
-            out_tmp = scratch10[ k ] + scratch11[ k ] + scratch12[ k ];\r
-            if( out_tmp - limit > 0 ) {\r
-                out[ k ] = SKP_int16_MAX;\r
-            } else if( out_tmp + limit < 0 ) {\r
-                out[ k ] = SKP_int16_MIN;\r
-            } else {\r
-                out[ k ] = (SKP_int16) SKP_SMULWB( out_tmp + 1560, 21 );\r
-            }\r
-        }\r
-\r
-        in     += LSubFrameIn;\r
-        out    += LSubFrameOut;\r
-        outLen -= LSubFrameOut;\r
-    }\r
-}\r
diff --git a/src/SKP_Silk_resample_2_3_coarse.c b/src/SKP_Silk_resample_2_3_coarse.c
deleted file mode 100644 (file)
index 76c597b..0000000
+++ /dev/null
@@ -1,112 +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
- * File Name:   SKP_Silk_resample_2_3_coarse.c                        *\r
- *                                                                      *\r
- * Description: Linear phase FIR polyphase implementation of resampling *\r
- *                                                                      *\r
- * Copyright 2009 (c), Skype Limited                                    *\r
- * All rights reserved.                                                 *\r
- *                                                                      *\r
- * Date: 090423                                                         *\r
- *                                                                      */\r
-\r
-#include "SKP_Silk_SigProc_FIX.h"\r
-#include "SKP_Silk_resample_rom.h"\r
-\r
-/* Resamples input data with a factor 2/3 */\r
-void SKP_Silk_resample_2_3_coarse( \r
-    SKP_int16           *out,           /* O:   Output signal                                                                   */\r
-    SKP_int16           *S,             /* I/O: Resampler state [ SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ]               */\r
-    const SKP_int16     *in,            /* I:   Input signal                                                                    */\r
-    const SKP_int       frameLenIn,     /* I:   Number of input samples                                                         */\r
-    SKP_int16           *scratch        /* I:   Scratch memory [ frameLenIn + SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ]   */\r
-)\r
-{\r
-    SKP_int32 n, ind, interpol_ind, tmp, index_Q16;\r
-    SKP_int16 *in_ptr;\r
-    SKP_int   frameLenOut;\r
-    const SKP_int16 *interpol_ptr;\r
-\r
-    /* Copy buffered samples to start of scratch */\r
-    SKP_memcpy( scratch, S, ( SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ) * sizeof( SKP_int16 ) );\r
-    \r
-    /* Then append by the input signal */\r
-    SKP_memcpy( &scratch[ SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ], in, frameLenIn * sizeof( SKP_int16 ) ); \r
-\r
-    frameLenOut = SKP_DIV32_16( SKP_MUL( 2, frameLenIn ), 3 );\r
-    index_Q16 = 0;\r
-\r
-    SKP_assert( frameLenIn == ( ( frameLenOut * 3 ) / 2 ) );\r
-    \r
-    /* Interpolate */\r
-    for( n = frameLenOut; n > 0; n-- ) {\r
-\r
-        /* Integer part */\r
-        ind = SKP_RSHIFT( index_Q16, 16 );\r
-\r
-        /* Pointer to buffered input */\r
-        in_ptr = scratch + ind;\r
-\r
-        /* Fractional part */\r
-        interpol_ind = ( SKP_SMULWB( index_Q16, SigProc_Resample_2_3_coarse_NUM_INTERPOLATORS ) & \r
-                       ( SigProc_Resample_2_3_coarse_NUM_INTERPOLATORS - 1 ) );\r
-\r
-        /* Pointer to FIR taps */\r
-        interpol_ptr = SigProc_Resample_2_3_coarse_INTERPOL[ interpol_ind ];\r
-\r
-        /* Interpolate */\r
-        /* Hardcoded for 32 FIR taps */\r
-        SKP_assert( SigProc_Resample_2_3_coarse_NUM_FIR_COEFS == 32 );\r
-        tmp = (SKP_int32)interpol_ptr[  0 ] * in_ptr[  0 ] + (SKP_int32)interpol_ptr[  1 ] * in_ptr[  1 ] +\r
-              (SKP_int32)interpol_ptr[  2 ] * in_ptr[  2 ] + (SKP_int32)interpol_ptr[  3 ] * in_ptr[  3 ] +\r
-              (SKP_int32)interpol_ptr[  4 ] * in_ptr[  4 ] + (SKP_int32)interpol_ptr[  5 ] * in_ptr[  5 ] +\r
-              (SKP_int32)interpol_ptr[  6 ] * in_ptr[  6 ] + (SKP_int32)interpol_ptr[  7 ] * in_ptr[  7 ] +\r
-              (SKP_int32)interpol_ptr[  8 ] * in_ptr[  8 ] + (SKP_int32)interpol_ptr[  9 ] * in_ptr[  9 ] +\r
-              (SKP_int32)interpol_ptr[ 10 ] * in_ptr[ 10 ] + (SKP_int32)interpol_ptr[ 11 ] * in_ptr[ 11 ] +\r
-              (SKP_int32)interpol_ptr[ 12 ] * in_ptr[ 12 ] + (SKP_int32)interpol_ptr[ 13 ] * in_ptr[ 13 ] +\r
-              (SKP_int32)interpol_ptr[ 14 ] * in_ptr[ 14 ] + (SKP_int32)interpol_ptr[ 15 ] * in_ptr[ 15 ] +\r
-              (SKP_int32)interpol_ptr[ 16 ] * in_ptr[ 16 ] + (SKP_int32)interpol_ptr[ 17 ] * in_ptr[ 17 ] +\r
-              (SKP_int32)interpol_ptr[ 18 ] * in_ptr[ 18 ] + (SKP_int32)interpol_ptr[ 19 ] * in_ptr[ 19 ] +\r
-              (SKP_int32)interpol_ptr[ 20 ] * in_ptr[ 20 ] + (SKP_int32)interpol_ptr[ 21 ] * in_ptr[ 21 ] +\r
-              (SKP_int32)interpol_ptr[ 22 ] * in_ptr[ 22 ] + (SKP_int32)interpol_ptr[ 23 ] * in_ptr[ 23 ] +\r
-              (SKP_int32)interpol_ptr[ 24 ] * in_ptr[ 24 ] + (SKP_int32)interpol_ptr[ 25 ] * in_ptr[ 25 ] +\r
-              (SKP_int32)interpol_ptr[ 26 ] * in_ptr[ 26 ] + (SKP_int32)interpol_ptr[ 27 ] * in_ptr[ 27 ] +\r
-              (SKP_int32)interpol_ptr[ 28 ] * in_ptr[ 28 ] + (SKP_int32)interpol_ptr[ 29 ] * in_ptr[ 29 ];\r
-\r
-        /* Round, saturate and store to output array */\r
-        *out++ = (SKP_int16)SKP_SAT16( SKP_RSHIFT_ROUND( tmp, 15 ) );\r
-\r
-        /* Update index */\r
-        index_Q16 += ( ( 1 << 16 ) + ( 1 << 15 ) ); // (3/2)_Q0;\r
-    }\r
-\r
-    /* Move last part of input signal to the sample buffer to prepare for the next call */\r
-    SKP_memcpy( S, &in[ frameLenIn - ( SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ) ],\r
-                ( SigProc_Resample_2_3_coarse_NUM_FIR_COEFS - 1 ) * sizeof( SKP_int16 ) );\r
-}\r
diff --git a/src/SKP_Silk_resample_2_3_coarsest.c b/src/SKP_Silk_resample_2_3_coarsest.c
deleted file mode 100644 (file)
index 6a57eaa..0000000
+++ /dev/null
@@ -1,131 +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
- * File Name:   SKP_Silk_resample_2_3_coarsest.c                      *\r
- *                                                                      *\r
- * Description: Linear phase FIR polyphase implementation of resampling *\r
- *                                                                      *\r
- * Copyright 2009 (c), Skype Limited                                    *\r
- * All rights reserved.                                                 *\r
- *                                                                      *\r
- * Date: 090423                                                         *\r
- *                                                                      */\r
-\r
-#include "SKP_Silk_SigProc_FIX.h"\r
-#include "SKP_Silk_resample_rom.h"\r
-\r
-/* Resamples input data with a factor 2/3 */\r
-void SKP_Silk_resample_2_3_coarsest( \r
-    SKP_int16           *out,           /* O:   Output signal                                                                   */\r
-    SKP_int16           *S,             /* I/O: Resampler state [ SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS - 1 ]             */\r
-    const SKP_int16     *in,            /* I:   Input signal                                                                    */\r
-    const SKP_int       frameLenIn,     /* I:   Number of input samples                                                         */\r
-    SKP_int16           *scratch        /* I:   Scratch memory [ frameLenIn + SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS - 1 ] */\r
-)\r
-{\r
-    SKP_int32 n, ind, interpol_ind, tmp, index_Q16;\r
-    SKP_int16 *in_ptr;\r
-    SKP_int   frameLenOut;\r
-    const SKP_int16 *interpol_ptr;\r
-#if ( EMBEDDED_ARM>=6 ) && defined (__GNUC__)\r
-    SKP_int32   in_val, interpol_val;\r
-#endif\r
-\r
-    /* Copy buffered samples to start of scratch */\r
-    SKP_memcpy( scratch, S, ( SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS - 1 ) * sizeof( SKP_int16 ) );    \r
-    \r
-    /* Then append by the input signal */\r
-    SKP_memcpy( &scratch[ SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS - 1 ], in, frameLenIn * sizeof( SKP_int16 ) ); \r
-\r
-    frameLenOut = SKP_SMULWB( SKP_LSHIFT( (SKP_int32)frameLenIn, 1 ), 21846 ); // 21846_Q15 = (2/3)_Q0 rounded _up_\r
-    index_Q16 = 0;\r
-\r
-    SKP_assert( frameLenIn == ( ( frameLenOut * 3 ) / 2 ) );\r
-    \r
-    /* Interpolate */\r
-    for( n = frameLenOut; n > 0; n-- ) {\r
-\r
-        /* Integer part */\r
-        ind = SKP_RSHIFT( index_Q16, 16 );\r
-\r
-        /* Pointer to buffered input */\r
-        in_ptr = scratch + ind;\r
-\r
-        /* Fractional part */\r
-        interpol_ind = ( SKP_SMULWB( index_Q16, SigProc_Resample_2_3_coarsest_NUM_INTERPOLATORS ) & \r
-                       ( SigProc_Resample_2_3_coarsest_NUM_INTERPOLATORS - 1 ) );\r
-\r
-        /* Pointer to FIR taps */\r
-        interpol_ptr = SigProc_Resample_2_3_coarsest_INTERPOL[ interpol_ind ];\r
-\r
-        /* Interpolate: Hardcoded for 10 FIR taps */\r
-#if ( EMBEDDED_ARM>=6 ) && defined (__GNUC__)       /*It doesn't improve efficiency on iphone.*/\r
-        /*tmp = SKP_SMUAD(    *((SKP_int32 *)interpol_ptr)++, *((SKP_int32 *)in_ptr)++);\r
-        tmp = SKP_SMLAD( tmp, *((SKP_int32 *)interpol_ptr)++, *((SKP_int32 *)in_ptr)++);\r
-        tmp = SKP_SMLAD( tmp, *((SKP_int32 *)interpol_ptr),   *((SKP_int32 *)in_ptr)  );*/\r
-        __asm__ __volatile__ (  "ldr    %1, [%3], #4 \n\t"\r
-                                "ldr    %2, [%4], #4 \n\t"\r
-                                "smuad  %0, %1, %2 \n\t"\r
-                                "ldr    %1, [%3], #4 \n\t"\r
-                                "ldr    %2, [%4], #4 \n\t"\r
-                                "smlad  %0, %1, %2, %0\n\t"\r
-                                "ldr    %1, [%3], #4 \n\t"\r
-                                "ldr    %2, [%4], #4 \n\t"\r
-                                "smlad  %0, %1, %2, %0\n\t"\r
-                                "ldr    %1, [%3], #4 \n\t"\r
-                                "ldr    %2, [%4], #4 \n\t"\r
-                                "smlad  %0, %1, %2, %0\n\t"\r
-                                "ldr    %1, [%3] \n\t"\r
-                                "ldr    %2, [%4] \n\t"\r
-                                "smlad  %0, %1, %2, %0\n\t"\r
-                                : "=r" (tmp), "=r" (interpol_val), "=r" (in_val), "=r" (interpol_ptr), "=r" (in_ptr) \r
-                                : "3" (interpol_ptr), "4" (in_ptr));    \r
-#else\r
-        SKP_assert( SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS == 10 );\r
-        tmp = SKP_SMULBB(      interpol_ptr[ 0 ], in_ptr[ 0 ] );\r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 1 ], in_ptr[ 1 ] ); \r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 2 ], in_ptr[ 2 ] );    \r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 3 ], in_ptr[ 3 ] );    \r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 4 ], in_ptr[ 4 ] );    \r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 5 ], in_ptr[ 5 ] );    \r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 6 ], in_ptr[ 6 ] );    \r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 7 ], in_ptr[ 7 ] );    \r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 8 ], in_ptr[ 8 ] );    \r
-        tmp = SKP_SMLABB( tmp, interpol_ptr[ 9 ], in_ptr[ 9 ] );\r
-#endif\r
-        /* Round, saturate and store to output array */\r
-        *out++ = (SKP_int16)SKP_SAT16( SKP_RSHIFT_ROUND( tmp, 15 ) );\r
-\r
-        /* Update index */\r
-        index_Q16 += ( ( 1 << 16 ) + ( 1 << 15 ) ); // (3/2)_Q0;\r
-    }\r
-\r
-    /* Move last part of input signal to the sample buffer to prepare for the next call */\r
-    SKP_memcpy( S, &in[ frameLenIn - ( SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS - 1 ) ],\r
-                ( SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS - 1 ) * sizeof( SKP_int16 ) );\r
-}\r
diff --git a/src/SKP_Silk_resample_2_3_rom.c b/src/SKP_Silk_resample_2_3_rom.c
deleted file mode 100644 (file)
index 2c396a9..0000000
+++ /dev/null
@@ -1,50 +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
- * File Name:    SKP_Silk_resample_2_3_rom.c                          *\r
- *                                                                      *\r
- * Description: Filter coefficients for FIR polyphase resampling        *\r
- *                                                                      *\r
- * Copyright 2009 (c), Skype Limited                                    *\r
- * All rights reserved.                                                 *\r
- *                                                                      *\r
- * Date: 090424                                                         *\r
- *                                                                      */\r
-\r
-#include "SKP_Silk_resample_rom.h"\r
-\r
-const SKP_int16 SigProc_Resample_2_3_coarse_INTERPOL[ SigProc_Resample_2_3_coarse_NUM_INTERPOLATORS ][ SigProc_Resample_2_3_coarse_NUM_FIR_COEFS ] = {\r
-    {    0,   -74,   109,     0,  -234,   329,     0,  -610,   813,     0, -1437,  1954,     0, -4358,  8953, 21845,  8953, -4358,     0,  1954, -1437,     0,   813,  -610,     0,   329,  -234,     0,   109,   -74,     0,    45 },\r
-    {   48,   -62,     0,   133,  -195,     0,   386,  -526,     0,   936, -1243,     0,  2311, -3417,     0, 18026, 18026,     0, -3417,  2311,     0, -1243,   936,     0,  -526,   386,     0,  -195,   133,     0,   -62,    48 },\r
-};\r
-\r
-const SKP_int16 SigProc_Resample_2_3_coarsest_INTERPOL[ SigProc_Resample_2_3_coarsest_NUM_INTERPOLATORS ][ SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS ] = {\r
-    {  379,     0, -3081,  8239, 21845,  8239, -3081,     0,   379,  -145 },\r
-    {    0,   696, -1951,     0, 17659, 17659,     0, -1951,   696,     0 },\r
-};\r
-\r
diff --git a/src/SKP_Silk_resample_3_1.c b/src/SKP_Silk_resample_3_1.c
deleted file mode 100644 (file)
index 5272bb8..0000000
+++ /dev/null
@@ -1,100 +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
- * SKP_Silk_resample_3_1.c                                            *\r
- *                                                                      *\r
- * Upsamples by a factor 3                                              *\r
- *                                                                      *\r
- * Copyright 2008 (c), Skype Limited                                    *\r
- * Date: 081113                                                         *\r
- *                                                                      */\r
-#include "SKP_Silk_SigProc_FIX.h"\r
-\r
-#define IN_SUBFR_LEN_RESAMPLE_3_1       40\r
-\r
-/* Resamples by a factor 3/1 */\r
-void SKP_Silk_resample_3_1(\r
-    SKP_int16           *out,       /* O:   Fs_high signal [inLen*3]        */\r
-    SKP_int32           *S,         /* I/O: State vector   [7]              */\r
-    const SKP_int16     *in,        /* I:   Fs_low signal  [inLen]          */\r
-    const SKP_int32     inLen       /* I:   Input length                    */\r
-)\r
-{\r
-    SKP_int     k, LSubFrameIn, LSubFrameOut;\r
-    SKP_int32   out_tmp, idx, inLenTmp = inLen;\r
-    SKP_int32   scratch00[    IN_SUBFR_LEN_RESAMPLE_3_1 ];\r
-    SKP_int32   scratch0[ 3 * IN_SUBFR_LEN_RESAMPLE_3_1 ];\r
-    SKP_int32   scratch1[ 3 * IN_SUBFR_LEN_RESAMPLE_3_1 ];\r
-    \r
-    /* Coefficients for 3-fold resampling */\r
-    const SKP_int16 A30[ 2 ] = {  1773, 17818 };\r
-    const SKP_int16 A31[ 2 ] = {  4942, 25677 };\r
-    const SKP_int16 A32[ 2 ] = { 11786, 29304 };\r
-\r
-    while( inLenTmp > 0 ) {\r
-        LSubFrameIn  = SKP_min_int( IN_SUBFR_LEN_RESAMPLE_3_1, inLenTmp );\r
-        LSubFrameOut = SKP_SMULBB( 3, LSubFrameIn );\r
-\r
-        /* Convert Q15 -> Q25 */\r
-        for( k = 0; k < LSubFrameIn; k++ ) {\r
-            scratch00[k] = SKP_LSHIFT( (SKP_int32)in[ k ], 10 );\r
-        }\r
-\r
-        /* Allpass filtering */\r
-        /* Scratch size: 2 * 3* LSubFrame * sizeof(SKP_int32) */\r
-        SKP_Silk_allpass_int( scratch00, S + 1, A30[ 0 ], scratch1, LSubFrameIn );\r
-        SKP_Silk_allpass_int( scratch1,  S + 2, A30[ 1 ], scratch0, LSubFrameIn );\r
-\r
-        SKP_Silk_allpass_int( scratch00, S + 3, A31[ 0 ], scratch1, LSubFrameIn );\r
-        SKP_Silk_allpass_int( scratch1,  S + 4, A31[ 1 ], scratch0 +     IN_SUBFR_LEN_RESAMPLE_3_1, LSubFrameIn );\r
-\r
-        SKP_Silk_allpass_int( scratch00, S + 5, A32[ 0 ], scratch1, LSubFrameIn );\r
-        SKP_Silk_allpass_int( scratch1,  S + 6, A32[ 1 ], scratch0 + 2 * IN_SUBFR_LEN_RESAMPLE_3_1, LSubFrameIn );\r
-\r
-        /* Interleave three allpass outputs */\r
-        for( k = 0; k < LSubFrameIn; k++ ) {\r
-            idx = SKP_SMULBB( 3, k );\r
-            scratch1[ idx     ] = scratch0[ k ];\r
-            scratch1[ idx + 1 ] = scratch0[ k +     IN_SUBFR_LEN_RESAMPLE_3_1 ];\r
-            scratch1[ idx + 2 ] = scratch0[ k + 2 * IN_SUBFR_LEN_RESAMPLE_3_1 ];\r
-        }\r
-\r
-        /* Low-pass filtering */\r
-        SKP_Silk_lowpass_int( scratch1, S, scratch0, LSubFrameOut );\r
-\r
-        /* Saturate and convert to SKP_int16 */\r
-        for( k = 0; k < LSubFrameOut; k++ ) {\r
-            out_tmp  = scratch0[ k ];\r
-            out[ k ] = (SKP_int16) SKP_SAT16( SKP_RSHIFT_ROUND( out_tmp, 10 ) );\r
-        }\r
-\r
-        in       += LSubFrameIn;\r
-        inLenTmp -= LSubFrameIn;\r
-        out      += LSubFrameOut;\r
-    }\r
-}\r
diff --git a/src/SKP_Silk_resample_3_4.c b/src/SKP_Silk_resample_3_4.c
deleted file mode 100644 (file)
index 4b83a7a..0000000
+++ /dev/null
@@ -1,79 +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
- * File Name:    SKP_Silk_resample_3_4.c                              *\r
- *                                                                      *\r
- * Resamples by a factor 3/4                                            *\r
- *                                                                      *\r
- * Copyright 2009 (c), Skype Limited                                    *\r
- * All rights reserved.                                                 *\r
- *                                                                      *\r
- * Date: 090408                                                         *\r
- *                                                                      */\r
-\r
-#include "SKP_Silk_SigProc_FIX.h"\r
-\r
-#define IN_SUBFR_LEN_RESAMPLE_3_4        80\r
-\r
-/* Resamples by a factor 3/4 */\r
-void SKP_Silk_resample_3_4(\r
-    SKP_int16            *out,       /* O:   Fs_high signal  [inLen*3/4]              */\r
-    SKP_int32            *S,         /* I/O: State vector    [7+2+6]                  */\r
-    const SKP_int16      *in,        /* I:   Fs_low signal   [inLen]                  */\r
-    SKP_int              inLen       /* I:   Input length, must be a multiple of 4    */\r
-)\r
-{\r
-    SKP_int      LSubFrameIn, LSubFrameOut;\r
-    SKP_int16    outH[      3 * IN_SUBFR_LEN_RESAMPLE_3_4 ];\r
-    SKP_int16    outL[    ( 3 * IN_SUBFR_LEN_RESAMPLE_3_4 ) / 2 ];\r
-    SKP_int32    scratch[ ( 9 * IN_SUBFR_LEN_RESAMPLE_3_4 ) / 2 ];\r
-\r
-    /* Check that input is multiple of 4 */\r
-    SKP_assert( inLen % 4 == 0 );\r
-\r
-    while( inLen > 0 ) {\r
-        LSubFrameIn  = SKP_min_int( IN_SUBFR_LEN_RESAMPLE_3_4, inLen );\r
-        LSubFrameOut = SKP_SMULWB( 49152, LSubFrameIn );\r
-\r
-        /* Upsample by a factor 3 */\r
-        SKP_Silk_resample_3_1( outH, &S[ 0 ], in, LSubFrameIn );\r
-        \r
-        /* Downsample by a factor 2 twice */\r
-        /* Scratch size needs to be: 3 * 2 * LSubFrameOut * sizeof( SKP_int32 ) */\r
-        /* I: state vector [2], scratch memory [3*len] */\r
-        SKP_Silk_resample_1_2_coarsest( outH, &S[ 7 ], outL, scratch, SKP_LSHIFT( LSubFrameOut, 1 ) ); \r
-        \r
-        /* Scratch size needs to be: 3 * LSubFrameOut * sizeof( SKP_int32 ) */\r
-        /* I: state vector [6], scratch memory [3*len]    */\r
-        SKP_Silk_resample_1_2_coarse( outL, &S[ 9 ], out, scratch, LSubFrameOut );\r
-\r
-        in    += LSubFrameIn;\r
-        out   += LSubFrameOut;\r
-        inLen -= LSubFrameIn;\r
-    }\r
-}\r
diff --git a/src/SKP_Silk_resample_4_3.c b/src/SKP_Silk_resample_4_3.c
deleted file mode 100644 (file)
index f5c4f4d..0000000
+++ /dev/null
@@ -1,77 +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
- * File Name:    SKP_Silk_resample_4_3.c                              *\r
- *                                                                      *\r
- * Resamples by a factor 4/3                                            *\r
- *                                                                      *\r
- * Copyright 2009 (c), Skype Limited                                    *\r
- * All rights reserved.                                                 *\r
- *                                                                      *\r
- * Date: 090407                                                         *\r
- *                                                                      */\r
-\r
-#include "SKP_Silk_SigProc_FIX.h"\r
-\r
-#define OUT_SUBFR_LEN        80\r
-\r
-/* Resamples by a factor 4/3 */\r
-void SKP_Silk_resample_4_3(\r
-    SKP_int16            *out,       /* O:   Fs_low signal    [inLen * 4/3]           */\r
-    SKP_int32            *S,         /* I/O: State vector    [7+4+4]                  */\r
-    const SKP_int16      *in,        /* I:   Fs_high signal    [inLen]                */\r
-    const SKP_int        inLen       /* I:   input length, must be a multiple of 3    */\r
-) \r
-{\r
-    SKP_int      outLen, LSubFrameIn, LSubFrameOut;\r
-    SKP_int16    outH[    3 * OUT_SUBFR_LEN ];\r
-    SKP_int16    outHH[   6 * OUT_SUBFR_LEN ];\r
-    SKP_int32    scratch[ 9 * OUT_SUBFR_LEN / 2 ];\r
-\r
-    /* Check that input is multiple of 3 */\r
-    SKP_assert( inLen % 3 == 0 );\r
-\r
-    outLen = SKP_DIV32_16( SKP_LSHIFT( inLen, 2 ), 3 );\r
-    while( outLen > 0 ) {\r
-        LSubFrameOut = SKP_min_int( OUT_SUBFR_LEN, outLen );\r
-        LSubFrameIn  = SKP_SMULWB( 49152, LSubFrameOut );\r
-\r
-        /* Upsample two times by a factor 2 */\r
-        /* Scratch size needs to be: 3 * LSubFrameIn * sizeof( SKP_int32 ) */\r
-        SKP_Silk_resample_2_1_coarse( in,   &S[ 0 ], outH,  scratch,             LSubFrameIn      );\r
-        /* Scratch size needs to be: 6 * LSubFrameIn * sizeof( SKP_int32 ) */\r
-        SKP_Silk_resample_2_1_coarse( outH, &S[ 4 ], outHH, scratch, SKP_LSHIFT( LSubFrameIn, 1 ) );\r
-        \r
-        /* Downsample by a factor 3 */\r
-        SKP_Silk_resample_1_3( out, &S[ 8 ], outHH, SKP_LSHIFT( LSubFrameIn, 2 ) );\r
-\r
-        in     += LSubFrameIn;\r
-        out    += LSubFrameOut;\r
-        outLen -= LSubFrameOut;\r
-    }\r
-}\r
diff --git a/src/SKP_Silk_resample_rom.h b/src/SKP_Silk_resample_rom.h
deleted file mode 100644 (file)
index 9a32648..0000000
+++ /dev/null
@@ -1,107 +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
- * File Name:  SKP_Silk_resample_rom.h                                                         *\r
- *                                                                                                                                             *\r
- * Description: Header file for FIR resampling of                                              *\r
- *                             32 and 44 kHz input                                                                     *\r
- *                                                                      *\r
- * Copyright 2007 (c), Skype Limited                                    *\r
- * All rights reserved.                                                                                                        *\r
- *                                                                                                                                             *\r
- * Date: 070807                                                         *\r
- *                                                                      */\r
-\r
-#ifndef _SKP_SILK_FIX_RESAMPLE_ROM_H_\r
-#define _SKP_SILK_FIX_RESAMPLE_ROM_H_\r
-\r
-#include "SKP_Silk_typedef.h"\r
-\r
-#ifdef  __cplusplus\r
-extern "C"\r
-{\r
-#endif\r
-\r
-#define SigProc_Resample_bw_1_4_NUM_INTERPOLATORS_LOG2                         7\r
-#define SigProc_Resample_bw_1_4_NUM_INTERPOLATORS                                      (1 << SigProc_Resample_bw_1_4_NUM_INTERPOLATORS_LOG2)\r
-#define SigProc_Resample_bw_1_4_NUM_FIR_COEFS                                          6 \r
-\r
-extern const SKP_int16 SigProc_Resample_bw_1_4_INTERPOL[SigProc_Resample_bw_1_4_NUM_INTERPOLATORS][SigProc_Resample_bw_1_4_NUM_FIR_COEFS];\r
-\r
-\r
-#define SigProc_Resample_bw_80_441_NUM_INTERPOLATORS_LOG2                      6\r
-#define SigProc_Resample_bw_80_441_NUM_INTERPOLATORS                           (1 << SigProc_Resample_bw_80_441_NUM_INTERPOLATORS_LOG2)\r
-#define SigProc_Resample_bw_80_441_NUM_FIR_COEFS                                       4 \r
-\r
-extern const SKP_int16 SigProc_Resample_bw_80_441_INTERPOL[SigProc_Resample_bw_80_441_NUM_INTERPOLATORS][SigProc_Resample_bw_80_441_NUM_FIR_COEFS];\r
-\r
-#define SigProc_Resample_2_3_coarse_NUM_INTERPOLATORS                           2\r
-#define SigProc_Resample_2_3_coarse_NUM_FIR_COEFS                                      32\r
-\r
-extern const SKP_int16 SigProc_Resample_2_3_coarse_INTERPOL[SigProc_Resample_2_3_coarse_NUM_INTERPOLATORS][SigProc_Resample_2_3_coarse_NUM_FIR_COEFS];\r
-\r
-#define SigProc_Resample_2_3_coarsest_NUM_INTERPOLATORS                                 2\r
-#define SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS                                    10\r
-\r
-extern const SKP_int16 SigProc_Resample_2_3_coarsest_INTERPOL[SigProc_Resample_2_3_coarsest_NUM_INTERPOLATORS][SigProc_Resample_2_3_coarsest_NUM_FIR_COEFS];\r
-\r
-#define SigProc_Resample_3_2_coarse_NUM_INTERPOLATORS                           3\r
-#define SigProc_Resample_3_2_coarse_NUM_FIR_COEFS                                       8\r
-\r
-extern const SKP_int16 SigProc_Resample_3_2_coarse_INTERPOL[SigProc_Resample_3_2_coarse_NUM_INTERPOLATORS][SigProc_Resample_3_2_coarse_NUM_FIR_COEFS];\r
-\r
-#define SigProc_Resample_147_40_NUM_INTERPOLATORS                                       147\r
-#define SigProc_Resample_147_40_NUM_FIR_COEFS                                           20\r
-\r
-extern const SKP_int16 SigProc_Resample_147_40_INTERPOL[SigProc_Resample_147_40_NUM_INTERPOLATORS][SigProc_Resample_147_40_NUM_FIR_COEFS];\r
-\r
-#define SigProc_Resample_147_40_alt_NUM_INTERPOLATORS                           147\r
-#define SigProc_Resample_147_40_alt_NUM_FIR_COEFS                                       10\r
-\r
-extern const SKP_int16 SigProc_Resample_147_40_alt_INTERPOL[SigProc_Resample_147_40_alt_NUM_INTERPOLATORS][SigProc_Resample_147_40_alt_NUM_FIR_COEFS];\r
-\r
-#define SigProc_Resample_147_40_coarse_NUM_INTERPOLATORS                        147\r
-#define SigProc_Resample_147_40_coarse_NUM_FIR_COEFS                            16\r
-\r
-extern const SKP_int16 SigProc_Resample_147_40_coarse_INTERPOL[SigProc_Resample_147_40_coarse_NUM_INTERPOLATORS][SigProc_Resample_147_40_coarse_NUM_FIR_COEFS];\r
-\r
-#define SigProc_Resample_40_147_NUM_INTERPOLATORS                                       40\r
-#define SigProc_Resample_40_147_NUM_FIR_COEFS                                           60\r
-\r
-extern const SKP_int16 SigProc_Resample_40_147_INTERPOL[SigProc_Resample_40_147_NUM_INTERPOLATORS][SigProc_Resample_40_147_NUM_FIR_COEFS];\r
-\r
-#define SigProc_Resample_40_147_coarse_NUM_INTERPOLATORS                        40\r
-#define SigProc_Resample_40_147_coarse_NUM_FIR_COEFS                            30\r
-\r
-extern const SKP_int16 SigProc_Resample_40_147_coarse_INTERPOL[SigProc_Resample_40_147_coarse_NUM_INTERPOLATORS][SigProc_Resample_40_147_coarse_NUM_FIR_COEFS];\r
-\r
-#ifdef  __cplusplus\r
-}\r
-#endif\r
-\r
-#endif // _SKP_SILK_FIX_RESAMPLE_ROM_H_\r
diff --git a/src/SKP_Silk_tables_sign.c b/src/SKP_Silk_tables_sign.c
deleted file mode 100644 (file)
index 5ada010..0000000
+++ /dev/null
@@ -1,141 +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_tables.h"\r
-\r
-const SKP_uint16 SKP_Silk_sign_CDF[ 36 ][ 3 ] = \r
-{\r
-{\r
-         0,  37840,  65535\r
-},\r
-{\r
-         0,  36944,  65535\r
-},\r
-{\r
-         0,  36251,  65535\r
-},\r
-{\r
-         0,  35304,  65535\r
-},\r
-{\r
-         0,  34715,  65535\r
-},\r
-{\r
-         0,  35503,  65535\r
-},\r
-{\r
-         0,  34529,  65535\r
-},\r
-{\r
-         0,  34296,  65535\r
-},\r
-{\r
-         0,  34016,  65535\r
-},\r
-{\r
-         0,  47659,  65535\r
-},\r
-{\r
-         0,  44945,  65535\r
-},\r
-{\r
-         0,  42503,  65535\r
-},\r
-{\r
-         0,  40235,  65535\r
-},\r
-{\r
-         0,  38569,  65535\r
-},\r
-{\r
-         0,  40254,  65535\r
-},\r
-{\r
-         0,  37851,  65535\r
-},\r
-{\r
-         0,  37243,  65535\r
-},\r
-{\r
-         0,  36595,  65535\r
-},\r
-{\r
-         0,  43410,  65535\r
-},\r
-{\r
-         0,  44121,  65535\r
-},\r
-{\r
-         0,  43127,  65535\r
-},\r
-{\r
-         0,  40978,  65535\r
-},\r
-{\r
-         0,  38845,  65535\r
-},\r
-{\r
-         0,  40433,  65535\r
-},\r
-{\r
-         0,  38252,  65535\r
-},\r
-{\r
-         0,  37795,  65535\r
-},\r
-{\r
-         0,  36637,  65535\r
-},\r
-{\r
-         0,  59159,  65535\r
-},\r
-{\r
-         0,  55630,  65535\r
-},\r
-{\r
-         0,  51806,  65535\r
-},\r
-{\r
-         0,  48073,  65535\r
-},\r
-{\r
-         0,  45036,  65535\r
-},\r
-{\r
-         0,  48416,  65535\r
-},\r
-{\r
-         0,  43857,  65535\r
-},\r
-{\r
-         0,  42678,  65535\r
-},\r
-{\r
-         0,  41146,  65535\r
-}\r
-};\r
-\r
diff --git a/src/Silk_FIX.2008.vcproj b/src/Silk_FIX.2008.vcproj
deleted file mode 100644 (file)
index 5368179..0000000
+++ /dev/null
@@ -1,837 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9.00"\r
-       Name="Silk_FIX"\r
-       ProjectGUID="{56B91D01-9150-4BBF-AFA1-5B68AB991B76}"\r
-       RootNamespace="Silk"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform