├── .cproject ├── .gitignore ├── .mxproject ├── .project ├── Drivers ├── CMSIS │ ├── Device │ │ └── ST │ │ │ └── STM32L4xx │ │ │ └── Include │ │ │ ├── stm32l496xx.h │ │ │ ├── stm32l4xx.h │ │ │ └── system_stm32l4xx.h │ ├── Include │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_cm0.h │ │ ├── core_cm0plus.h │ │ ├── core_cm1.h │ │ ├── core_cm23.h │ │ ├── core_cm3.h │ │ ├── core_cm33.h │ │ ├── core_cm4.h │ │ ├── core_cm7.h │ │ ├── core_sc000.h │ │ ├── core_sc300.h │ │ ├── mpu_armv7.h │ │ ├── mpu_armv8.h │ │ └── tz_context.h │ └── Source │ │ ├── CommonTables │ │ ├── arm_common_tables.c │ │ └── arm_const_structs.c │ │ ├── ComplexMathFunctions │ │ ├── arm_cmplx_conj_f32.c │ │ ├── arm_cmplx_conj_q15.c │ │ ├── arm_cmplx_conj_q31.c │ │ ├── arm_cmplx_dot_prod_f32.c │ │ ├── arm_cmplx_dot_prod_q15.c │ │ ├── arm_cmplx_dot_prod_q31.c │ │ ├── arm_cmplx_mag_f32.c │ │ ├── arm_cmplx_mag_q15.c │ │ ├── arm_cmplx_mag_q31.c │ │ ├── arm_cmplx_mag_squared_f32.c │ │ ├── arm_cmplx_mag_squared_q15.c │ │ ├── arm_cmplx_mag_squared_q31.c │ │ ├── arm_cmplx_mult_cmplx_f32.c │ │ ├── arm_cmplx_mult_cmplx_q15.c │ │ ├── arm_cmplx_mult_cmplx_q31.c │ │ ├── arm_cmplx_mult_real_f32.c │ │ ├── arm_cmplx_mult_real_q15.c │ │ └── arm_cmplx_mult_real_q31.c │ │ ├── FilteringFunctions │ │ ├── arm_fir_decimate_f32.c │ │ ├── arm_fir_decimate_fast_q15.c │ │ ├── arm_fir_decimate_fast_q31.c │ │ ├── arm_fir_decimate_init_f32.c │ │ ├── arm_fir_decimate_init_q15.c │ │ ├── arm_fir_decimate_init_q31.c │ │ ├── arm_fir_decimate_q15.c │ │ ├── arm_fir_decimate_q31.c │ │ ├── arm_fir_f32.c │ │ ├── arm_fir_fast_q15.c │ │ ├── arm_fir_fast_q31.c │ │ ├── arm_fir_init_f32.c │ │ ├── arm_fir_init_q15.c │ │ ├── arm_fir_init_q31.c │ │ ├── arm_fir_init_q7.c │ │ ├── arm_fir_interpolate_f32.c │ │ ├── arm_fir_interpolate_init_f32.c │ │ ├── arm_fir_interpolate_init_q15.c │ │ ├── arm_fir_interpolate_init_q31.c │ │ ├── arm_fir_interpolate_q15.c │ │ ├── arm_fir_interpolate_q31.c │ │ ├── arm_fir_lattice_f32.c │ │ ├── arm_fir_lattice_init_f32.c │ │ ├── arm_fir_lattice_init_q15.c │ │ ├── arm_fir_lattice_init_q31.c │ │ ├── arm_fir_lattice_q15.c │ │ ├── arm_fir_lattice_q31.c │ │ ├── arm_fir_q15.c │ │ ├── arm_fir_q31.c │ │ ├── arm_fir_q7.c │ │ ├── arm_fir_sparse_f32.c │ │ ├── arm_fir_sparse_init_f32.c │ │ ├── arm_fir_sparse_init_q15.c │ │ ├── arm_fir_sparse_init_q31.c │ │ ├── arm_fir_sparse_init_q7.c │ │ ├── arm_fir_sparse_q15.c │ │ ├── arm_fir_sparse_q31.c │ │ └── arm_fir_sparse_q7.c │ │ ├── StatisticsFunctions │ │ ├── arm_max_f32.c │ │ ├── arm_max_q15.c │ │ ├── arm_max_q31.c │ │ ├── arm_max_q7.c │ │ ├── arm_mean_f32.c │ │ ├── arm_mean_q15.c │ │ ├── arm_mean_q31.c │ │ ├── arm_mean_q7.c │ │ ├── arm_min_f32.c │ │ ├── arm_min_q15.c │ │ ├── arm_min_q31.c │ │ ├── arm_min_q7.c │ │ ├── arm_power_f32.c │ │ ├── arm_power_q15.c │ │ ├── arm_power_q31.c │ │ ├── arm_power_q7.c │ │ ├── arm_rms_f32.c │ │ ├── arm_rms_q15.c │ │ ├── arm_rms_q31.c │ │ ├── arm_std_f32.c │ │ ├── arm_std_q15.c │ │ ├── arm_std_q31.c │ │ ├── arm_var_f32.c │ │ ├── arm_var_q15.c │ │ └── arm_var_q31.c │ │ ├── SupportFunctions │ │ ├── arm_copy_f32.c │ │ ├── arm_copy_q15.c │ │ ├── arm_copy_q31.c │ │ ├── arm_copy_q7.c │ │ ├── arm_fill_f32.c │ │ ├── arm_fill_q15.c │ │ ├── arm_fill_q31.c │ │ ├── arm_fill_q7.c │ │ ├── arm_float_to_q15.c │ │ ├── arm_float_to_q31.c │ │ ├── arm_float_to_q7.c │ │ ├── arm_q15_to_float.c │ │ ├── arm_q15_to_q31.c │ │ ├── arm_q15_to_q7.c │ │ ├── arm_q31_to_float.c │ │ ├── arm_q31_to_q15.c │ │ ├── arm_q31_to_q7.c │ │ ├── arm_q7_to_float.c │ │ ├── arm_q7_to_q15.c │ │ └── arm_q7_to_q31.c │ │ └── TransformFunctions │ │ ├── arm_bitreversal.c │ │ ├── arm_bitreversal2.S │ │ ├── arm_cfft_f32.c │ │ ├── arm_cfft_q15.c │ │ ├── arm_cfft_q31.c │ │ ├── arm_cfft_radix2_f32.c │ │ ├── arm_cfft_radix2_init_f32.c │ │ ├── arm_cfft_radix2_init_q15.c │ │ ├── arm_cfft_radix2_init_q31.c │ │ ├── arm_cfft_radix2_q15.c │ │ ├── arm_cfft_radix2_q31.c │ │ ├── arm_cfft_radix4_f32.c │ │ ├── arm_cfft_radix4_init_f32.c │ │ ├── arm_cfft_radix4_init_q15.c │ │ ├── arm_cfft_radix4_init_q31.c │ │ ├── arm_cfft_radix4_q15.c │ │ ├── arm_cfft_radix4_q31.c │ │ ├── arm_cfft_radix8_f32.c │ │ ├── arm_dct4_f32.c │ │ ├── arm_dct4_init_f32.c │ │ ├── arm_dct4_init_q15.c │ │ ├── arm_dct4_init_q31.c │ │ ├── arm_dct4_q15.c │ │ ├── arm_dct4_q31.c │ │ ├── arm_rfft_f32.c │ │ ├── arm_rfft_fast_f32.c │ │ ├── arm_rfft_fast_init_f32.c │ │ ├── arm_rfft_init_f32.c │ │ ├── arm_rfft_init_q15.c │ │ ├── arm_rfft_init_q31.c │ │ ├── arm_rfft_q15.c │ │ └── arm_rfft_q31.c └── STM32L4xx_HAL_Driver │ ├── Inc │ ├── Legacy │ │ └── stm32_hal_legacy.h │ ├── stm32l4xx_hal.h │ ├── stm32l4xx_hal_adc.h │ ├── stm32l4xx_hal_adc_ex.h │ ├── stm32l4xx_hal_can.h │ ├── stm32l4xx_hal_cortex.h │ ├── stm32l4xx_hal_def.h │ ├── stm32l4xx_hal_dfsdm.h │ ├── stm32l4xx_hal_dma.h │ ├── stm32l4xx_hal_dma_ex.h │ ├── stm32l4xx_hal_exti.h │ ├── stm32l4xx_hal_flash.h │ ├── stm32l4xx_hal_flash_ex.h │ ├── stm32l4xx_hal_flash_ramfunc.h │ ├── stm32l4xx_hal_gpio.h │ ├── stm32l4xx_hal_gpio_ex.h │ ├── stm32l4xx_hal_i2c.h │ ├── stm32l4xx_hal_i2c_ex.h │ ├── stm32l4xx_hal_iwdg.h │ ├── stm32l4xx_hal_pwr.h │ ├── stm32l4xx_hal_pwr_ex.h │ ├── stm32l4xx_hal_rcc.h │ ├── stm32l4xx_hal_rcc_ex.h │ ├── stm32l4xx_hal_rng.h │ ├── stm32l4xx_hal_tim.h │ ├── stm32l4xx_hal_tim_ex.h │ ├── stm32l4xx_ll_adc.h │ ├── stm32l4xx_ll_bus.h │ ├── stm32l4xx_ll_cortex.h │ ├── stm32l4xx_ll_crs.h │ ├── stm32l4xx_ll_dac.h │ ├── stm32l4xx_ll_dma.h │ ├── stm32l4xx_ll_dmamux.h │ ├── stm32l4xx_ll_exti.h │ ├── stm32l4xx_ll_gpio.h │ ├── stm32l4xx_ll_pwr.h │ ├── stm32l4xx_ll_rcc.h │ ├── stm32l4xx_ll_system.h │ ├── stm32l4xx_ll_usart.h │ └── stm32l4xx_ll_utils.h │ └── Src │ ├── stm32l4xx_hal.c │ ├── stm32l4xx_hal_adc.c │ ├── stm32l4xx_hal_adc_ex.c │ ├── stm32l4xx_hal_can.c │ ├── stm32l4xx_hal_cortex.c │ ├── stm32l4xx_hal_dfsdm.c │ ├── stm32l4xx_hal_dma.c │ ├── stm32l4xx_hal_dma_ex.c │ ├── stm32l4xx_hal_exti.c │ ├── stm32l4xx_hal_flash.c │ ├── stm32l4xx_hal_flash_ex.c │ ├── stm32l4xx_hal_flash_ramfunc.c │ ├── stm32l4xx_hal_gpio.c │ ├── stm32l4xx_hal_i2c.c │ ├── stm32l4xx_hal_i2c_ex.c │ ├── stm32l4xx_hal_iwdg.c │ ├── stm32l4xx_hal_pwr.c │ ├── stm32l4xx_hal_pwr_ex.c │ ├── stm32l4xx_hal_rcc.c │ ├── stm32l4xx_hal_rcc_ex.c │ ├── stm32l4xx_hal_rng.c │ ├── stm32l4xx_hal_tim.c │ ├── stm32l4xx_hal_tim_ex.c │ ├── stm32l4xx_ll_dac.c │ ├── stm32l4xx_ll_dma.c │ ├── stm32l4xx_ll_exti.c │ ├── stm32l4xx_ll_gpio.c │ ├── stm32l4xx_ll_rcc.c │ ├── stm32l4xx_ll_usart.c │ └── stm32l4xx_ll_utils.c ├── Inc ├── adc.h ├── arm_common_tables.h ├── arm_const_structs.h ├── arm_math.h ├── buf_stack.h ├── can.h ├── can_cmd.h ├── config.h ├── dac.h ├── dfsdm.h ├── din.h ├── dma.h ├── eeprom.h ├── eeprom2.h ├── fit_processing.h ├── flash_interface.h ├── frame_stack.h ├── gpio.h ├── iwdg.h ├── main.h ├── rng.h ├── stm32_assert.h ├── stm32l4xx_hal_conf.h ├── stm32l4xx_it.h ├── sys.h ├── tim.h ├── uart.h ├── uart1_protocol.h ├── usart.h └── wave_example.h ├── STM32L496RG_FLASH.ld ├── Src ├── adc.c ├── buf_stack.c ├── can.c ├── can_cmd.c ├── can_tx_stack.c ├── can_tx_stack.h ├── dac.c ├── dfsdm.c ├── din.c ├── dma.c ├── eeprom.c ├── eeprom2.c ├── fit_processing.c ├── flash_interface.c ├── frame_stack.c ├── gpio.c ├── iwdg.c ├── main.c ├── rng.c ├── stm32l4xx_hal_msp.c ├── stm32l4xx_it.c ├── sys.c ├── syscalls.c ├── system_stm32l4xx.c ├── tim.c ├── uart.c ├── uart1_protocol.c └── usart.c ├── VoipPoint.elf.launch ├── VoipPoint.ioc ├── opus-1.3 ├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── Makefile.am ├── Makefile.in ├── Makefile.mips ├── Makefile.unix ├── NEWS ├── README ├── aclocal.m4 ├── celt │ ├── _kiss_fft_guts.h │ ├── arch.h │ ├── arm │ │ ├── arm2gnu.pl │ │ ├── arm_celt_map.c │ │ ├── armcpu.c │ │ ├── armcpu.h │ │ ├── armopts.s.in │ │ ├── celt_fft_ne10.c │ │ ├── celt_mdct_ne10.c │ │ ├── celt_neon_intr.c │ │ ├── celt_pitch_xcorr_arm-gnu.S │ │ ├── celt_pitch_xcorr_arm.s │ │ ├── fft_arm.h │ │ ├── fixed_arm64.h │ │ ├── fixed_armv4.h │ │ ├── fixed_armv5e.h │ │ ├── kiss_fft_armv4.h │ │ ├── kiss_fft_armv5e.h │ │ ├── mdct_arm.h │ │ ├── pitch_arm.h │ │ └── pitch_neon_intr.c │ ├── bands.c │ ├── bands.h │ ├── celt.c │ ├── celt.h │ ├── celt_decoder.c │ ├── celt_encoder.c │ ├── celt_lpc.c │ ├── celt_lpc.h │ ├── cpu_support.h │ ├── cwrs.c │ ├── cwrs.h │ ├── ecintrin.h │ ├── entcode.c │ ├── entcode.h │ ├── entdec.c │ ├── entdec.h │ ├── entenc.c │ ├── entenc.h │ ├── fixed_debug.h │ ├── fixed_generic.h │ ├── float_cast.h │ ├── kiss_fft.c │ ├── kiss_fft.h │ ├── laplace.c │ ├── laplace.h │ ├── mathops.c │ ├── mathops.h │ ├── mdct.c │ ├── mdct.h │ ├── mfrngcod.h │ ├── mips │ │ ├── celt_mipsr1.h │ │ ├── fixed_generic_mipsr1.h │ │ ├── kiss_fft_mipsr1.h │ │ ├── mdct_mipsr1.h │ │ ├── pitch_mipsr1.h │ │ └── vq_mipsr1.h │ ├── modes.c │ ├── modes.h │ ├── opus_custom_demo.c │ ├── os_support.h │ ├── pitch.c │ ├── pitch.h │ ├── quant_bands.c │ ├── quant_bands.h │ ├── rate.c │ ├── rate.h │ ├── stack_alloc.h │ ├── static_modes_fixed.h │ ├── static_modes_fixed_arm_ne10.h │ ├── static_modes_float.h │ ├── static_modes_float_arm_ne10.h │ ├── tests │ │ ├── test_unit_cwrs32.c │ │ ├── test_unit_dft.c │ │ ├── test_unit_entropy.c │ │ ├── test_unit_laplace.c │ │ ├── test_unit_mathops.c │ │ ├── test_unit_mdct.c │ │ ├── test_unit_rotation.c │ │ └── test_unit_types.c │ ├── vq.c │ ├── vq.h │ └── x86 │ │ ├── celt_lpc_sse.h │ │ ├── celt_lpc_sse4_1.c │ │ ├── pitch_sse.c │ │ ├── pitch_sse.h │ │ ├── pitch_sse2.c │ │ ├── pitch_sse4_1.c │ │ ├── vq_sse.h │ │ ├── vq_sse2.c │ │ ├── x86_celt_map.c │ │ ├── x86cpu.c │ │ └── x86cpu.h ├── celt_headers.mk ├── celt_sources.mk ├── compile ├── config.guess ├── config.h.in ├── config.sub ├── configure ├── configure.ac ├── depcomp ├── doc │ ├── Doxyfile.in │ ├── Makefile.am │ ├── Makefile.in │ ├── TODO │ ├── customdoxygen.css │ ├── footer.html │ ├── header.html │ ├── opus_logo.svg │ └── trivial_example.c ├── include │ ├── opus.h │ ├── opus_custom.h │ ├── opus_defines.h │ ├── opus_multistream.h │ ├── opus_projection.h │ └── opus_types.h ├── install-sh ├── ltmain.sh ├── m4 │ ├── as-gcc-inline-assembly.m4 │ ├── ax_add_fortify_source.m4 │ ├── libtool.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ ├── lt~obsolete.m4 │ └── opus-intrinsics.m4 ├── missing ├── opus-uninstalled.pc.in ├── opus.m4 ├── opus.pc.in ├── opus_headers.mk ├── opus_sources.mk ├── package_version ├── silk │ ├── A2NLSF.c │ ├── API.h │ ├── CNG.c │ ├── HP_variable_cutoff.c │ ├── Inlines.h │ ├── LPC_analysis_filter.c │ ├── LPC_fit.c │ ├── LPC_inv_pred_gain.c │ ├── LP_variable_cutoff.c │ ├── MacroCount.h │ ├── MacroDebug.h │ ├── NLSF2A.c │ ├── NLSF_VQ.c │ ├── NLSF_VQ_weights_laroia.c │ ├── NLSF_decode.c │ ├── NLSF_del_dec_quant.c │ ├── NLSF_encode.c │ ├── NLSF_stabilize.c │ ├── NLSF_unpack.c │ ├── NSQ.c │ ├── NSQ.h │ ├── NSQ_del_dec.c │ ├── PLC.c │ ├── PLC.h │ ├── SigProc_FIX.h │ ├── VAD.c │ ├── VQ_WMat_EC.c │ ├── ana_filt_bank_1.c │ ├── arm │ │ ├── LPC_inv_pred_gain_arm.h │ │ ├── LPC_inv_pred_gain_neon_intr.c │ │ ├── NSQ_del_dec_arm.h │ │ ├── NSQ_del_dec_neon_intr.c │ │ ├── NSQ_neon.c │ │ ├── NSQ_neon.h │ │ ├── SigProc_FIX_armv4.h │ │ ├── SigProc_FIX_armv5e.h │ │ ├── arm_silk_map.c │ │ ├── biquad_alt_arm.h │ │ ├── biquad_alt_neon_intr.c │ │ ├── macros_arm64.h │ │ ├── macros_armv4.h │ │ └── macros_armv5e.h │ ├── biquad_alt.c │ ├── bwexpander.c │ ├── bwexpander_32.c │ ├── check_control_input.c │ ├── code_signs.c │ ├── control.h │ ├── control_SNR.c │ ├── control_audio_bandwidth.c │ ├── control_codec.c │ ├── debug.c │ ├── debug.h │ ├── dec_API.c │ ├── decode_core.c │ ├── decode_frame.c │ ├── decode_indices.c │ ├── decode_parameters.c │ ├── decode_pitch.c │ ├── decode_pulses.c │ ├── decoder_set_fs.c │ ├── define.h │ ├── enc_API.c │ ├── encode_indices.c │ ├── encode_pulses.c │ ├── errors.h │ ├── fixed │ │ ├── LTP_analysis_filter_FIX.c │ │ ├── LTP_scale_ctrl_FIX.c │ │ ├── apply_sine_window_FIX.c │ │ ├── arm │ │ │ ├── warped_autocorrelation_FIX_arm.h │ │ │ └── warped_autocorrelation_FIX_neon_intr.c │ │ ├── autocorr_FIX.c │ │ ├── burg_modified_FIX.c │ │ ├── corrMatrix_FIX.c │ │ ├── encode_frame_FIX.c │ │ ├── find_LPC_FIX.c │ │ ├── find_LTP_FIX.c │ │ ├── find_pitch_lags_FIX.c │ │ ├── find_pred_coefs_FIX.c │ │ ├── k2a_FIX.c │ │ ├── k2a_Q16_FIX.c │ │ ├── main_FIX.h │ │ ├── mips │ │ │ ├── noise_shape_analysis_FIX_mipsr1.h │ │ │ └── warped_autocorrelation_FIX_mipsr1.h │ │ ├── noise_shape_analysis_FIX.c │ │ ├── pitch_analysis_core_FIX.c │ │ ├── process_gains_FIX.c │ │ ├── regularize_correlations_FIX.c │ │ ├── residual_energy16_FIX.c │ │ ├── residual_energy_FIX.c │ │ ├── schur64_FIX.c │ │ ├── schur_FIX.c │ │ ├── structs_FIX.h │ │ ├── vector_ops_FIX.c │ │ ├── warped_autocorrelation_FIX.c │ │ └── x86 │ │ │ ├── burg_modified_FIX_sse4_1.c │ │ │ └── vector_ops_FIX_sse4_1.c │ ├── float │ │ ├── LPC_analysis_filter_FLP.c │ │ ├── LPC_inv_pred_gain_FLP.c │ │ ├── LTP_analysis_filter_FLP.c │ │ ├── LTP_scale_ctrl_FLP.c │ │ ├── SigProc_FLP.h │ │ ├── apply_sine_window_FLP.c │ │ ├── autocorrelation_FLP.c │ │ ├── burg_modified_FLP.c │ │ ├── bwexpander_FLP.c │ │ ├── corrMatrix_FLP.c │ │ ├── encode_frame_FLP.c │ │ ├── energy_FLP.c │ │ ├── find_LPC_FLP.c │ │ ├── find_LTP_FLP.c │ │ ├── find_pitch_lags_FLP.c │ │ ├── find_pred_coefs_FLP.c │ │ ├── inner_product_FLP.c │ │ ├── k2a_FLP.c │ │ ├── main_FLP.h │ │ ├── noise_shape_analysis_FLP.c │ │ ├── pitch_analysis_core_FLP.c │ │ ├── process_gains_FLP.c │ │ ├── regularize_correlations_FLP.c │ │ ├── residual_energy_FLP.c │ │ ├── scale_copy_vector_FLP.c │ │ ├── scale_vector_FLP.c │ │ ├── schur_FLP.c │ │ ├── sort_FLP.c │ │ ├── structs_FLP.h │ │ ├── warped_autocorrelation_FLP.c │ │ └── wrappers_FLP.c │ ├── gain_quant.c │ ├── init_decoder.c │ ├── init_encoder.c │ ├── inner_prod_aligned.c │ ├── interpolate.c │ ├── lin2log.c │ ├── log2lin.c │ ├── macros.h │ ├── main.h │ ├── mips │ │ ├── NSQ_del_dec_mipsr1.h │ │ ├── macros_mipsr1.h │ │ └── sigproc_fix_mipsr1.h │ ├── pitch_est_defines.h │ ├── pitch_est_tables.c │ ├── process_NLSFs.c │ ├── quant_LTP_gains.c │ ├── resampler.c │ ├── resampler_down2.c │ ├── resampler_down2_3.c │ ├── resampler_private.h │ ├── resampler_private_AR2.c │ ├── resampler_private_IIR_FIR.c │ ├── resampler_private_down_FIR.c │ ├── resampler_private_up2_HQ.c │ ├── resampler_rom.c │ ├── resampler_rom.h │ ├── resampler_structs.h │ ├── shell_coder.c │ ├── sigm_Q15.c │ ├── sort.c │ ├── stereo_LR_to_MS.c │ ├── stereo_MS_to_LR.c │ ├── stereo_decode_pred.c │ ├── stereo_encode_pred.c │ ├── stereo_find_predictor.c │ ├── stereo_quant_pred.c │ ├── structs.h │ ├── sum_sqr_shift.c │ ├── table_LSF_cos.c │ ├── tables.h │ ├── tables_LTP.c │ ├── tables_NLSF_CB_NB_MB.c │ ├── tables_NLSF_CB_WB.c │ ├── tables_gain.c │ ├── tables_other.c │ ├── tables_pitch_lag.c │ ├── tables_pulses_per_block.c │ ├── tests │ │ └── test_unit_LPC_inv_pred_gain.c │ ├── tuning_parameters.h │ ├── typedef.h │ └── x86 │ │ ├── NSQ_del_dec_sse4_1.c │ │ ├── NSQ_sse4_1.c │ │ ├── SigProc_FIX_sse.h │ │ ├── VAD_sse4_1.c │ │ ├── VQ_WMat_EC_sse4_1.c │ │ ├── main_sse.h │ │ └── x86_silk_map.c ├── silk_headers.mk ├── silk_sources.mk ├── src │ ├── analysis.c │ ├── analysis.h │ ├── mapping_matrix.c │ ├── mapping_matrix.h │ ├── mlp.c │ ├── mlp.h │ ├── mlp_data.c │ ├── opus.c │ ├── opus_compare.c │ ├── opus_decoder.c │ ├── opus_demo.c │ ├── opus_encoder.c │ ├── opus_multistream.c │ ├── opus_multistream_decoder.c │ ├── opus_multistream_encoder.c │ ├── opus_private.h │ ├── opus_projection_decoder.c │ ├── opus_projection_encoder.c │ ├── repacketizer.c │ ├── repacketizer_demo.c │ └── tansig_table.h ├── test-driver ├── tests │ ├── opus_encode_regressions.c │ ├── run_vectors.sh │ ├── test_opus_api.c │ ├── test_opus_common.h │ ├── test_opus_decode.c │ ├── test_opus_encode.c │ ├── test_opus_padding.c │ └── test_opus_projection.c └── win32 │ ├── VS2015 │ ├── common.props │ ├── opus.sln │ ├── opus.vcxproj │ ├── opus.vcxproj.filters │ ├── opus_demo.vcxproj │ ├── opus_demo.vcxproj.filters │ ├── test_opus_api.vcxproj │ ├── test_opus_api.vcxproj.filters │ ├── test_opus_decode.vcxproj │ ├── test_opus_decode.vcxproj.filters │ ├── test_opus_encode.vcxproj │ └── test_opus_encode.vcxproj.filters │ ├── config.h │ └── genversion.bat └── startup └── startup_stm32l496xx.s /.gitignore: -------------------------------------------------------------------------------- 1 | Debug/ 2 | Release/ 3 | .settings/ 4 | .metadata/ 5 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | VoipPoint 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | ?children? 14 | ?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|\|| 15 | 16 | 17 | ?name? 18 | 19 | 20 | 21 | org.eclipse.cdt.make.core.append_environment 22 | true 23 | 24 | 25 | org.eclipse.cdt.make.core.buildArguments 26 | 27 | 28 | 29 | org.eclipse.cdt.make.core.buildCommand 30 | make 31 | 32 | 33 | org.eclipse.cdt.make.core.buildLocation 34 | ${workspace_loc:/STM32100B-EVAL/Debug} 35 | 36 | 37 | org.eclipse.cdt.make.core.contents 38 | org.eclipse.cdt.make.core.activeConfigSettings 39 | 40 | 41 | org.eclipse.cdt.make.core.enableAutoBuild 42 | false 43 | 44 | 45 | org.eclipse.cdt.make.core.enableCleanBuild 46 | true 47 | 48 | 49 | org.eclipse.cdt.make.core.enableFullBuild 50 | true 51 | 52 | 53 | org.eclipse.cdt.make.core.stopOnError 54 | true 55 | 56 | 57 | org.eclipse.cdt.make.core.useDefaultBuildCmd 58 | true 59 | 60 | 61 | 62 | 63 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 64 | 65 | 66 | 67 | 68 | 69 | org.eclipse.cdt.core.cnature 70 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 71 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l496xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l496xx.h -------------------------------------------------------------------------------- /Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h -------------------------------------------------------------------------------- /Drivers/CMSIS/Device/ST/STM32L4xx/Include/system_stm32l4xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32l4xx.h 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M4 Device System Source File for STM32L4xx devices. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /** @addtogroup CMSIS 21 | * @{ 22 | */ 23 | 24 | /** @addtogroup stm32l4xx_system 25 | * @{ 26 | */ 27 | 28 | /** 29 | * @brief Define to prevent recursive inclusion 30 | */ 31 | #ifndef __SYSTEM_STM32L4XX_H 32 | #define __SYSTEM_STM32L4XX_H 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @addtogroup STM32L4xx_System_Includes 39 | * @{ 40 | */ 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | 47 | /** @addtogroup STM32L4xx_System_Exported_Variables 48 | * @{ 49 | */ 50 | /* The SystemCoreClock variable is updated in three ways: 51 | 1) by calling CMSIS function SystemCoreClockUpdate() 52 | 2) by calling HAL API function HAL_RCC_GetSysClockFreq() 53 | 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency 54 | Note: If you use this function to configure the system clock; then there 55 | is no need to call the 2 first functions listed above, since SystemCoreClock 56 | variable is updated automatically. 57 | */ 58 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 59 | 60 | extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */ 61 | extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */ 62 | extern const uint32_t MSIRangeTable[12]; /*!< MSI ranges table values */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @addtogroup STM32L4xx_System_Exported_Constants 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @addtogroup STM32L4xx_System_Exported_Macros 77 | * @{ 78 | */ 79 | 80 | /** 81 | * @} 82 | */ 83 | 84 | /** @addtogroup STM32L4xx_System_Exported_Functions 85 | * @{ 86 | */ 87 | 88 | extern void SystemInit(void); 89 | extern void SystemCoreClockUpdate(void); 90 | /** 91 | * @} 92 | */ 93 | 94 | #ifdef __cplusplus 95 | } 96 | #endif 97 | 98 | #endif /*__SYSTEM_STM32L4XX_H */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | /** 105 | * @} 106 | */ 107 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 108 | -------------------------------------------------------------------------------- /Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /Drivers/CMSIS/Include/tz_context.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * @file tz_context.h 3 | * @brief Context Management for Armv8-M TrustZone 4 | * @version V1.0.1 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef TZ_CONTEXT_H 32 | #define TZ_CONTEXT_H 33 | 34 | #include 35 | 36 | #ifndef TZ_MODULEID_T 37 | #define TZ_MODULEID_T 38 | /// \details Data type that identifies secure software modules called by a process. 39 | typedef uint32_t TZ_ModuleId_t; 40 | #endif 41 | 42 | /// \details TZ Memory ID identifies an allocated memory slot. 43 | typedef uint32_t TZ_MemoryId_t; 44 | 45 | /// Initialize secure context memory system 46 | /// \return execution status (1: success, 0: error) 47 | uint32_t TZ_InitContextSystem_S (void); 48 | 49 | /// Allocate context memory for calling secure software modules in TrustZone 50 | /// \param[in] module identifies software modules called from non-secure mode 51 | /// \return value != 0 id TrustZone memory slot identifier 52 | /// \return value 0 no memory available or internal error 53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); 54 | 55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S 56 | /// \param[in] id TrustZone memory slot identifier 57 | /// \return execution status (1: success, 0: error) 58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); 59 | 60 | /// Load secure context (called on RTOS thread context switch) 61 | /// \param[in] id TrustZone memory slot identifier 62 | /// \return execution status (1: success, 0: error) 63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); 64 | 65 | /// Store secure context (called on RTOS thread context switch) 66 | /// \param[in] id TrustZone memory slot identifier 67 | /// \return execution status (1: success, 0: error) 68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); 69 | 70 | #endif // TZ_CONTEXT_H 71 | -------------------------------------------------------------------------------- /Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ramfunc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32l4xx_hal_flash_ramfunc.h 4 | * @author MCD Application Team 5 | * @brief Header file of FLASH RAMFUNC driver. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32L4xx_FLASH_RAMFUNC_H 22 | #define __STM32L4xx_FLASH_RAMFUNC_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32l4xx_hal_def.h" 30 | 31 | /** @addtogroup STM32L4xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup FLASH_RAMFUNC 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported macro ------------------------------------------------------------*/ 41 | /* Exported functions --------------------------------------------------------*/ 42 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions 43 | * @{ 44 | */ 45 | 46 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions_Group1 47 | * @{ 48 | */ 49 | /* Peripheral Control functions ************************************************/ 50 | __RAM_FUNC HAL_FLASHEx_EnableRunPowerDown(void); 51 | __RAM_FUNC HAL_FLASHEx_DisableRunPowerDown(void); 52 | #if defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx) 53 | __RAM_FUNC HAL_FLASHEx_OB_DBankConfig(uint32_t DBankConfig); 54 | #endif 55 | /** 56 | * @} 57 | */ 58 | 59 | /** 60 | * @} 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** 68 | * @} 69 | */ 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif /* __STM32L4xx_FLASH_RAMFUNC_H */ 76 | 77 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 78 | -------------------------------------------------------------------------------- /Inc/adc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : ADC.h 4 | * Description : This file provides code for the configuration 5 | * of the ADC instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __adc_H 21 | #define __adc_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern ADC_HandleTypeDef hadc1; 34 | 35 | /* USER CODE BEGIN Private defines */ 36 | 37 | /* USER CODE END Private defines */ 38 | 39 | void MX_ADC1_Init(void); 40 | 41 | /* USER CODE BEGIN Prototypes */ 42 | 43 | /* USER CODE END Prototypes */ 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | #endif /*__ adc_H */ 49 | 50 | /** 51 | * @} 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 59 | -------------------------------------------------------------------------------- /Inc/buf_stack.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/buf_stack.h -------------------------------------------------------------------------------- /Inc/can.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : CAN.h 4 | * Description : This file provides code for the configuration 5 | * of the CAN instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __can_H 21 | #define __can_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern CAN_HandleTypeDef hcan1; 34 | extern CAN_HandleTypeDef hcan2; 35 | 36 | /* USER CODE BEGIN Private defines */ 37 | 38 | /* USER CODE END Private defines */ 39 | 40 | void MX_CAN1_Init(void); 41 | void MX_CAN2_Init(void); 42 | 43 | /* USER CODE BEGIN Prototypes */ 44 | 45 | /* USER CODE END Prototypes */ 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | #endif /*__ can_H */ 51 | 52 | /** 53 | * @} 54 | */ 55 | 56 | /** 57 | * @} 58 | */ 59 | 60 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 61 | -------------------------------------------------------------------------------- /Inc/can_cmd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/can_cmd.h -------------------------------------------------------------------------------- /Inc/config.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file config.h 4 | * @author Central Labs 5 | * @version V 1.0.0 6 | * @date 09-Mar-2018 7 | * @brief Header for opus codec configuration. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2017 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | #ifndef CONFIG_H 39 | #define CONFIG_H 40 | 41 | #include "opus.h" 42 | #include 43 | 44 | extern void *pvPortMalloc( size_t xSize ); 45 | extern void vPortFree( void *pv ); 46 | 47 | /* Variable leng arays */ 48 | #define VAR_ARRAYS 49 | 50 | /* Comment out the next line for floating-point code */ 51 | #define FIXED_POINT 1 52 | 53 | #define OPUS_BUILD 1 54 | //#define OPUS_HAVE_RTCD 1 55 | 56 | /*static OPUS_INLINE void *opus_alloc (size_t size) 57 | { 58 | return pvPortMalloc(size); 59 | } 60 | 61 | static OPUS_INLINE void opus_free (void *ptr) 62 | { 63 | vPortFree(ptr); 64 | }*/ 65 | 66 | #endif /* CONFIG_H */ 67 | 68 | -------------------------------------------------------------------------------- /Inc/dac.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : DAC.h 4 | * Description : This file provides code for the configuration 5 | * of the DAC instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __dac_H 21 | #define __dac_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | /* USER CODE BEGIN Private defines */ 34 | 35 | /* USER CODE END Private defines */ 36 | 37 | void MX_DAC1_Init(void); 38 | 39 | /* USER CODE BEGIN Prototypes */ 40 | 41 | /* USER CODE END Prototypes */ 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /*__ dac_H */ 47 | 48 | /** 49 | * @} 50 | */ 51 | 52 | /** 53 | * @} 54 | */ 55 | 56 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 57 | -------------------------------------------------------------------------------- /Inc/dfsdm.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : DFSDM.h 4 | * Description : This file provides code for the configuration 5 | * of the DFSDM instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __dfsdm_H 21 | #define __dfsdm_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern DFSDM_Filter_HandleTypeDef hdfsdm1_filter0; 34 | extern DFSDM_Channel_HandleTypeDef hdfsdm1_channel0; 35 | 36 | /* USER CODE BEGIN Private defines */ 37 | 38 | /* USER CODE END Private defines */ 39 | 40 | void MX_DFSDM1_Init(void); 41 | 42 | /* USER CODE BEGIN Prototypes */ 43 | 44 | /* USER CODE END Prototypes */ 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | #endif /*__ dfsdm_H */ 50 | 51 | /** 52 | * @} 53 | */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 60 | -------------------------------------------------------------------------------- /Inc/din.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/din.h -------------------------------------------------------------------------------- /Inc/dma.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : dma.h 4 | * Description : This file contains all the function prototypes for 5 | * the dma.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __dma_H 21 | #define __dma_H 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | #include "main.h" 29 | 30 | /* DMA memory to memory transfer handles -------------------------------------*/ 31 | 32 | /* USER CODE BEGIN Includes */ 33 | 34 | /* USER CODE END Includes */ 35 | 36 | /* USER CODE BEGIN Private defines */ 37 | 38 | /* USER CODE END Private defines */ 39 | 40 | void MX_DMA_Init(void); 41 | 42 | /* USER CODE BEGIN Prototypes */ 43 | 44 | /* USER CODE END Prototypes */ 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* __dma_H */ 51 | 52 | /** 53 | * @} 54 | */ 55 | 56 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 57 | -------------------------------------------------------------------------------- /Inc/eeprom.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/eeprom.h -------------------------------------------------------------------------------- /Inc/eeprom2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/eeprom2.h -------------------------------------------------------------------------------- /Inc/fit_processing.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/fit_processing.h -------------------------------------------------------------------------------- /Inc/frame_stack.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/frame_stack.h -------------------------------------------------------------------------------- /Inc/gpio.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : gpio.h 4 | * Description : This file contains all the functions prototypes for 5 | * the gpio 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __gpio_H 22 | #define __gpio_H 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | #include "main.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* USER CODE BEGIN Private defines */ 35 | 36 | /* USER CODE END Private defines */ 37 | 38 | void MX_GPIO_Init(void); 39 | 40 | /* USER CODE BEGIN Prototypes */ 41 | 42 | /* USER CODE END Prototypes */ 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | #endif /*__ pinoutConfig_H */ 48 | 49 | /** 50 | * @} 51 | */ 52 | 53 | /** 54 | * @} 55 | */ 56 | 57 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 58 | -------------------------------------------------------------------------------- /Inc/iwdg.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : IWDG.h 4 | * Description : This file provides code for the configuration 5 | * of the IWDG instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __iwdg_H 21 | #define __iwdg_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern IWDG_HandleTypeDef hiwdg; 34 | 35 | /* USER CODE BEGIN Private defines */ 36 | 37 | /* USER CODE END Private defines */ 38 | 39 | void MX_IWDG_Init(void); 40 | 41 | /* USER CODE BEGIN Prototypes */ 42 | 43 | /* USER CODE END Prototypes */ 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | #endif /*__ iwdg_H */ 49 | 50 | /** 51 | * @} 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 59 | -------------------------------------------------------------------------------- /Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2019 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under BSD 3-Clause license, 14 | * the "License"; You may not use this file except in compliance with the 15 | * License. You may obtain a copy of the License at: 16 | * opensource.org/licenses/BSD-3-Clause 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __MAIN_H 24 | #define __MAIN_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32l4xx_hal.h" 32 | #include "stm32l4xx_ll_dac.h" 33 | #include "stm32l4xx_ll_usart.h" 34 | #include "stm32l4xx_ll_rcc.h" 35 | #include "stm32l4xx_ll_bus.h" 36 | #include "stm32l4xx_ll_cortex.h" 37 | #include "stm32l4xx_ll_system.h" 38 | #include "stm32l4xx_ll_utils.h" 39 | #include "stm32l4xx_ll_pwr.h" 40 | #include "stm32l4xx_ll_gpio.h" 41 | #include "stm32l4xx_ll_dma.h" 42 | 43 | #include "stm32l4xx_ll_exti.h" 44 | 45 | /* Private includes ----------------------------------------------------------*/ 46 | /* USER CODE BEGIN Includes */ 47 | 48 | /* USER CODE END Includes */ 49 | 50 | /* Exported types ------------------------------------------------------------*/ 51 | /* USER CODE BEGIN ET */ 52 | 53 | /* USER CODE END ET */ 54 | 55 | /* Exported constants --------------------------------------------------------*/ 56 | /* USER CODE BEGIN EC */ 57 | 58 | /* USER CODE END EC */ 59 | 60 | /* Exported macro ------------------------------------------------------------*/ 61 | /* USER CODE BEGIN EM */ 62 | 63 | /* USER CODE END EM */ 64 | 65 | /* Exported functions prototypes ---------------------------------------------*/ 66 | void Error_Handler(void); 67 | 68 | /* USER CODE BEGIN EFP */ 69 | 70 | /* USER CODE END EFP */ 71 | 72 | /* Private defines -----------------------------------------------------------*/ 73 | #define SDZ_Pin GPIO_PIN_13 74 | #define SDZ_GPIO_Port GPIOC 75 | #define MUTE_Pin GPIO_PIN_14 76 | #define MUTE_GPIO_Port GPIOC 77 | #define FAULTZ_Pin GPIO_PIN_15 78 | #define FAULTZ_GPIO_Port GPIOC 79 | #define CAN1_EN_Pin GPIO_PIN_8 80 | #define CAN1_EN_GPIO_Port GPIOA 81 | #define LED_Pin GPIO_PIN_12 82 | #define LED_GPIO_Port GPIOC 83 | #define CAN2_EN_Pin GPIO_PIN_4 84 | #define CAN2_EN_GPIO_Port GPIOB 85 | /* USER CODE BEGIN Private defines */ 86 | 87 | /* USER CODE END Private defines */ 88 | 89 | #ifdef __cplusplus 90 | } 91 | #endif 92 | 93 | #endif /* __MAIN_H */ 94 | 95 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 96 | -------------------------------------------------------------------------------- /Inc/rng.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : RNG.h 4 | * Description : This file provides code for the configuration 5 | * of the RNG instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __rng_H 21 | #define __rng_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern RNG_HandleTypeDef hrng; 34 | 35 | /* USER CODE BEGIN Private defines */ 36 | 37 | /* USER CODE END Private defines */ 38 | 39 | void MX_RNG_Init(void); 40 | 41 | /* USER CODE BEGIN Prototypes */ 42 | 43 | /* USER CODE END Prototypes */ 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | #endif /*__ rng_H */ 49 | 50 | /** 51 | * @} 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 59 | -------------------------------------------------------------------------------- /Inc/stm32_assert.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32_assert.h 4 | * @brief STM32 assert file. 5 | ****************************************************************************** 6 | * @attention 7 | * 8 | *

© Copyright (c) 2019 STMicroelectronics. 9 | * All rights reserved.

10 | * 11 | * This software component is licensed by ST under BSD 3-Clause license, 12 | * the "License"; You may not use this file except in compliance with the 13 | * License. You may obtain a copy of the License at: 14 | * opensource.org/licenses/BSD-3-Clause 15 | * 16 | ****************************************************************************** 17 | */ 18 | 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __STM32_ASSERT_H 21 | #define __STM32_ASSERT_H 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Exported types ------------------------------------------------------------*/ 28 | /* Exported constants --------------------------------------------------------*/ 29 | /* Includes ------------------------------------------------------------------*/ 30 | /* Exported macro ------------------------------------------------------------*/ 31 | #ifdef USE_FULL_ASSERT 32 | /** 33 | * @brief The assert_param macro is used for function's parameters check. 34 | * @param expr: If expr is false, it calls assert_failed function 35 | * which reports the name of the source file and the source 36 | * line number of the call that failed. 37 | * If expr is true, it returns no value. 38 | * @retval None 39 | */ 40 | #define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__)) 41 | /* Exported functions ------------------------------------------------------- */ 42 | void assert_failed(char* file, uint32_t line); 43 | #else 44 | #define assert_param(expr) ((void)0U) 45 | #endif /* USE_FULL_ASSERT */ 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* __STM32_ASSERT_H */ 52 | 53 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 54 | -------------------------------------------------------------------------------- /Inc/stm32l4xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32l4xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32L4xx_IT_H 23 | #define __STM32L4xx_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Private includes ----------------------------------------------------------*/ 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | /* USER CODE BEGIN ET */ 36 | 37 | /* USER CODE END ET */ 38 | 39 | /* Exported constants --------------------------------------------------------*/ 40 | /* USER CODE BEGIN EC */ 41 | 42 | /* USER CODE END EC */ 43 | 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* USER CODE BEGIN EM */ 46 | 47 | /* USER CODE END EM */ 48 | 49 | /* Exported functions prototypes ---------------------------------------------*/ 50 | void NMI_Handler(void); 51 | void HardFault_Handler(void); 52 | void MemManage_Handler(void); 53 | void BusFault_Handler(void); 54 | void UsageFault_Handler(void); 55 | void SVC_Handler(void); 56 | void DebugMon_Handler(void); 57 | void PendSV_Handler(void); 58 | void SysTick_Handler(void); 59 | void DMA1_Channel1_IRQHandler(void); 60 | void DMA1_Channel3_IRQHandler(void); 61 | void DMA1_Channel4_IRQHandler(void); 62 | void CAN1_RX0_IRQHandler(void); 63 | void USART1_IRQHandler(void); 64 | void TIM6_DAC_IRQHandler(void); 65 | void DMA2_Channel6_IRQHandler(void); 66 | void CAN2_RX0_IRQHandler(void); 67 | /* USER CODE BEGIN EFP */ 68 | 69 | /* USER CODE END EFP */ 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif /* __STM32L4xx_IT_H */ 76 | 77 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 78 | -------------------------------------------------------------------------------- /Inc/sys.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : SYS.h 4 | * Description : This file provides code for the configuration 5 | * of the SYS instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __sys_H 21 | #define __sys_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | /* USER CODE BEGIN Private defines */ 34 | 35 | /* USER CODE END Private defines */ 36 | 37 | void MX_SYS_Init(void); 38 | 39 | /* USER CODE BEGIN Prototypes */ 40 | 41 | /* USER CODE END Prototypes */ 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /*__ sys_H */ 47 | 48 | /** 49 | * @} 50 | */ 51 | 52 | /** 53 | * @} 54 | */ 55 | 56 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 57 | -------------------------------------------------------------------------------- /Inc/tim.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : TIM.h 4 | * Description : This file provides code for the configuration 5 | * of the TIM instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __tim_H 21 | #define __tim_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern TIM_HandleTypeDef htim6; 34 | 35 | /* USER CODE BEGIN Private defines */ 36 | 37 | /* USER CODE END Private defines */ 38 | 39 | void MX_TIM6_Init(void); 40 | 41 | /* USER CODE BEGIN Prototypes */ 42 | 43 | /* USER CODE END Prototypes */ 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | #endif /*__ tim_H */ 49 | 50 | /** 51 | * @} 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 59 | -------------------------------------------------------------------------------- /Inc/uart.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/uart.h -------------------------------------------------------------------------------- /Inc/uart1_protocol.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/uart1_protocol.h -------------------------------------------------------------------------------- /Inc/usart.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : USART.h 4 | * Description : This file provides code for the configuration 5 | * of the USART instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __usart_H 21 | #define __usart_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | /* USER CODE BEGIN Private defines */ 34 | 35 | /* USER CODE END Private defines */ 36 | 37 | void MX_USART1_UART_Init(void); 38 | 39 | /* USER CODE BEGIN Prototypes */ 40 | 41 | /* USER CODE END Prototypes */ 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /*__ usart_H */ 47 | 48 | /** 49 | * @} 50 | */ 51 | 52 | /** 53 | * @} 54 | */ 55 | 56 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 57 | -------------------------------------------------------------------------------- /Inc/wave_example.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Inc/wave_example.h -------------------------------------------------------------------------------- /Src/buf_stack.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/buf_stack.c -------------------------------------------------------------------------------- /Src/can_cmd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/can_cmd.c -------------------------------------------------------------------------------- /Src/can_tx_stack.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/can_tx_stack.h -------------------------------------------------------------------------------- /Src/din.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/din.c -------------------------------------------------------------------------------- /Src/dma.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : dma.c 4 | * Description : This file provides code for the configuration 5 | * of all the requested memory to memory DMA transfers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "dma.h" 22 | 23 | /* USER CODE BEGIN 0 */ 24 | 25 | /* USER CODE END 0 */ 26 | 27 | /*----------------------------------------------------------------------------*/ 28 | /* Configure DMA */ 29 | /*----------------------------------------------------------------------------*/ 30 | 31 | /* USER CODE BEGIN 1 */ 32 | 33 | /* USER CODE END 1 */ 34 | 35 | /** 36 | * Enable DMA controller clock 37 | */ 38 | void MX_DMA_Init(void) 39 | { 40 | 41 | /* DMA controller clock enable */ 42 | __HAL_RCC_DMA1_CLK_ENABLE(); 43 | __HAL_RCC_DMA2_CLK_ENABLE(); 44 | 45 | /* DMA interrupt init */ 46 | /* DMA1_Channel1_IRQn interrupt configuration */ 47 | HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 0, 0); 48 | HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn); 49 | /* DMA1_Channel3_IRQn interrupt configuration */ 50 | NVIC_SetPriority(DMA1_Channel3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),0, 0)); 51 | NVIC_EnableIRQ(DMA1_Channel3_IRQn); 52 | /* DMA1_Channel4_IRQn interrupt configuration */ 53 | HAL_NVIC_SetPriority(DMA1_Channel4_IRQn, 0, 0); 54 | HAL_NVIC_EnableIRQ(DMA1_Channel4_IRQn); 55 | /* DMA2_Channel6_IRQn interrupt configuration */ 56 | NVIC_SetPriority(DMA2_Channel6_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),0, 0)); 57 | NVIC_EnableIRQ(DMA2_Channel6_IRQn); 58 | 59 | } 60 | 61 | /* USER CODE BEGIN 2 */ 62 | 63 | /* USER CODE END 2 */ 64 | 65 | /** 66 | * @} 67 | */ 68 | 69 | /** 70 | * @} 71 | */ 72 | 73 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 74 | -------------------------------------------------------------------------------- /Src/eeprom.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/eeprom.c -------------------------------------------------------------------------------- /Src/eeprom2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/eeprom2.c -------------------------------------------------------------------------------- /Src/fit_processing.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/fit_processing.c -------------------------------------------------------------------------------- /Src/frame_stack.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/frame_stack.c -------------------------------------------------------------------------------- /Src/iwdg.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : IWDG.c 4 | * Description : This file provides code for the configuration 5 | * of the IWDG instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "iwdg.h" 22 | 23 | /* USER CODE BEGIN 0 */ 24 | 25 | /* USER CODE END 0 */ 26 | 27 | IWDG_HandleTypeDef hiwdg; 28 | 29 | /* IWDG init function */ 30 | void MX_IWDG_Init(void) 31 | { 32 | 33 | hiwdg.Instance = IWDG; 34 | hiwdg.Init.Prescaler = IWDG_PRESCALER_4; 35 | hiwdg.Init.Window = 4095; 36 | hiwdg.Init.Reload = 4095; 37 | if (HAL_IWDG_Init(&hiwdg) != HAL_OK) 38 | { 39 | Error_Handler(); 40 | } 41 | 42 | } 43 | 44 | /* USER CODE BEGIN 1 */ 45 | 46 | /* USER CODE END 1 */ 47 | 48 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 49 | -------------------------------------------------------------------------------- /Src/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/main.c -------------------------------------------------------------------------------- /Src/rng.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : RNG.c 4 | * Description : This file provides code for the configuration 5 | * of the RNG instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "rng.h" 22 | 23 | /* USER CODE BEGIN 0 */ 24 | 25 | /* USER CODE END 0 */ 26 | 27 | RNG_HandleTypeDef hrng; 28 | 29 | /* RNG init function */ 30 | void MX_RNG_Init(void) 31 | { 32 | 33 | hrng.Instance = RNG; 34 | if (HAL_RNG_Init(&hrng) != HAL_OK) 35 | { 36 | Error_Handler(); 37 | } 38 | 39 | } 40 | 41 | void HAL_RNG_MspInit(RNG_HandleTypeDef* rngHandle) 42 | { 43 | 44 | if(rngHandle->Instance==RNG) 45 | { 46 | /* USER CODE BEGIN RNG_MspInit 0 */ 47 | 48 | /* USER CODE END RNG_MspInit 0 */ 49 | /* RNG clock enable */ 50 | __HAL_RCC_RNG_CLK_ENABLE(); 51 | /* USER CODE BEGIN RNG_MspInit 1 */ 52 | 53 | /* USER CODE END RNG_MspInit 1 */ 54 | } 55 | } 56 | 57 | void HAL_RNG_MspDeInit(RNG_HandleTypeDef* rngHandle) 58 | { 59 | 60 | if(rngHandle->Instance==RNG) 61 | { 62 | /* USER CODE BEGIN RNG_MspDeInit 0 */ 63 | 64 | /* USER CODE END RNG_MspDeInit 0 */ 65 | /* Peripheral clock disable */ 66 | __HAL_RCC_RNG_CLK_DISABLE(); 67 | /* USER CODE BEGIN RNG_MspDeInit 1 */ 68 | 69 | /* USER CODE END RNG_MspDeInit 1 */ 70 | } 71 | } 72 | 73 | /* USER CODE BEGIN 1 */ 74 | 75 | /* USER CODE END 1 */ 76 | 77 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 78 | -------------------------------------------------------------------------------- /Src/stm32l4xx_hal_msp.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * File Name : stm32l4xx_hal_msp.c 5 | * Description : This file provides code for the MSP Initialization 6 | * and de-Initialization codes. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2019 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under BSD 3-Clause license, 14 | * the "License"; You may not use this file except in compliance with the 15 | * License. You may obtain a copy of the License at: 16 | * opensource.org/licenses/BSD-3-Clause 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | #include "main.h" 24 | /* USER CODE BEGIN Includes */ 25 | 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN Define */ 35 | 36 | /* USER CODE END Define */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN Macro */ 40 | 41 | /* USER CODE END Macro */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* External functions --------------------------------------------------------*/ 54 | /* USER CODE BEGIN ExternalFunctions */ 55 | 56 | /* USER CODE END ExternalFunctions */ 57 | 58 | /* USER CODE BEGIN 0 */ 59 | 60 | /* USER CODE END 0 */ 61 | /** 62 | * Initializes the Global MSP. 63 | */ 64 | void HAL_MspInit(void) 65 | { 66 | /* USER CODE BEGIN MspInit 0 */ 67 | 68 | /* USER CODE END MspInit 0 */ 69 | 70 | __HAL_RCC_SYSCFG_CLK_ENABLE(); 71 | __HAL_RCC_PWR_CLK_ENABLE(); 72 | 73 | /* System interrupt init*/ 74 | 75 | /* USER CODE BEGIN MspInit 1 */ 76 | 77 | /* USER CODE END MspInit 1 */ 78 | } 79 | 80 | /* USER CODE BEGIN 1 */ 81 | 82 | /* USER CODE END 1 */ 83 | 84 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 85 | -------------------------------------------------------------------------------- /Src/stm32l4xx_it.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/stm32l4xx_it.c -------------------------------------------------------------------------------- /Src/sys.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : SYS.c 4 | * Description : This file provides code for the configuration 5 | * of the SYS instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2019 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "sys.h" 22 | 23 | /* USER CODE BEGIN 0 */ 24 | 25 | /* USER CODE END 0 */ 26 | 27 | /* SYS init function */ 28 | void MX_SYS_Init(void) 29 | { 30 | 31 | } 32 | 33 | /* USER CODE BEGIN 1 */ 34 | 35 | /* USER CODE END 1 */ 36 | 37 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 38 | -------------------------------------------------------------------------------- /Src/syscalls.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/syscalls.c -------------------------------------------------------------------------------- /Src/uart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/uart.c -------------------------------------------------------------------------------- /Src/uart1_protocol.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/Src/uart1_protocol.c -------------------------------------------------------------------------------- /opus-1.3/AUTHORS: -------------------------------------------------------------------------------- 1 | Jean-Marc Valin (jmvalin@jmvalin.ca) 2 | Koen Vos (koenvos74@gmail.com) 3 | Timothy Terriberry (tterribe@xiph.org) 4 | Karsten Vandborg Sorensen (karsten.vandborg.sorensen@skype.net) 5 | Soren Skak Jensen (ssjensen@gn.com) 6 | Gregory Maxwell (greg@xiph.org) 7 | -------------------------------------------------------------------------------- /opus-1.3/COPYING: -------------------------------------------------------------------------------- 1 | Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, 2 | Jean-Marc Valin, Timothy B. Terriberry, 3 | CSIRO, Gregory Maxwell, Mark Borgerding, 4 | Erik de Castro Lopo 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | - Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | - Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 18 | names of specific contributors, may be used to endorse or promote 19 | products derived from this software without specific prior written 20 | permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 26 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | Opus is subject to the royalty-free patent licenses which are 35 | specified at: 36 | 37 | Xiph.Org Foundation: 38 | https://datatracker.ietf.org/ipr/1524/ 39 | 40 | Microsoft Corporation: 41 | https://datatracker.ietf.org/ipr/1914/ 42 | 43 | Broadcom Corporation: 44 | https://datatracker.ietf.org/ipr/1526/ 45 | -------------------------------------------------------------------------------- /opus-1.3/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/opus-1.3/ChangeLog -------------------------------------------------------------------------------- /opus-1.3/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atikbif/VOIPPoint/f990848ef06e688de61a9caa64acdf13e26c2bd1/opus-1.3/NEWS -------------------------------------------------------------------------------- /opus-1.3/celt/arm/armcpu.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 Xiph.Org Foundation 2 | * Copyright (c) 2013 Parrot */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #if !defined(ARMCPU_H) 29 | # define ARMCPU_H 30 | 31 | # if defined(OPUS_ARM_MAY_HAVE_EDSP) 32 | # define MAY_HAVE_EDSP(name) name ## _edsp 33 | # else 34 | # define MAY_HAVE_EDSP(name) name ## _c 35 | # endif 36 | 37 | # if defined(OPUS_ARM_MAY_HAVE_MEDIA) 38 | # define MAY_HAVE_MEDIA(name) name ## _media 39 | # else 40 | # define MAY_HAVE_MEDIA(name) MAY_HAVE_EDSP(name) 41 | # endif 42 | 43 | # if defined(OPUS_ARM_MAY_HAVE_NEON) 44 | # define MAY_HAVE_NEON(name) name ## _neon 45 | # else 46 | # define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name) 47 | # endif 48 | 49 | # if defined(OPUS_ARM_PRESUME_EDSP) 50 | # define PRESUME_EDSP(name) name ## _edsp 51 | # else 52 | # define PRESUME_EDSP(name) name ## _c 53 | # endif 54 | 55 | # if defined(OPUS_ARM_PRESUME_MEDIA) 56 | # define PRESUME_MEDIA(name) name ## _media 57 | # else 58 | # define PRESUME_MEDIA(name) PRESUME_EDSP(name) 59 | # endif 60 | 61 | # if defined(OPUS_ARM_PRESUME_NEON) 62 | # define PRESUME_NEON(name) name ## _neon 63 | # else 64 | # define PRESUME_NEON(name) PRESUME_MEDIA(name) 65 | # endif 66 | 67 | # if defined(OPUS_HAVE_RTCD) 68 | int opus_select_arch(void); 69 | 70 | #define OPUS_ARCH_ARM_V4 (0) 71 | #define OPUS_ARCH_ARM_EDSP (1) 72 | #define OPUS_ARCH_ARM_MEDIA (2) 73 | #define OPUS_ARCH_ARM_NEON (3) 74 | 75 | # endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /opus-1.3/celt/arm/armopts.s.in: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013 Mozilla Corporation */ 2 | /* 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 18 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | ; Set the following to 1 if we have EDSP instructions 28 | ; (LDRD/STRD, etc., ARMv5E and later). 29 | OPUS_ARM_MAY_HAVE_EDSP * @OPUS_ARM_MAY_HAVE_EDSP@ 30 | 31 | ; Set the following to 1 if we have ARMv6 media instructions. 32 | OPUS_ARM_MAY_HAVE_MEDIA * @OPUS_ARM_MAY_HAVE_MEDIA@ 33 | 34 | ; Set the following to 1 if we have NEON (some ARMv7) 35 | OPUS_ARM_MAY_HAVE_NEON * @OPUS_ARM_MAY_HAVE_NEON@ 36 | 37 | END 38 | -------------------------------------------------------------------------------- /opus-1.3/celt/arm/fft_arm.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015 Xiph.Org Foundation 2 | Written by Viswanath Puttagunta */ 3 | /** 4 | @file fft_arm.h 5 | @brief ARM Neon Intrinsic optimizations for fft using NE10 library 6 | */ 7 | 8 | /* 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions 11 | are met: 12 | 13 | - Redistributions of source code must retain the above copyright 14 | notice, this list of conditions and the following disclaimer. 15 | 16 | - Redistributions in binary form must reproduce the above copyright 17 | notice, this list of conditions and the following disclaimer in the 18 | documentation and/or other materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 24 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | 34 | #if !defined(FFT_ARM_H) 35 | #define FFT_ARM_H 36 | 37 | #include "kiss_fft.h" 38 | 39 | #if defined(HAVE_ARM_NE10) 40 | 41 | int opus_fft_alloc_arm_neon(kiss_fft_state *st); 42 | void opus_fft_free_arm_neon(kiss_fft_state *st); 43 | 44 | void opus_fft_neon(const kiss_fft_state *st, 45 | const kiss_fft_cpx *fin, 46 | kiss_fft_cpx *fout); 47 | 48 | void opus_ifft_neon(const kiss_fft_state *st, 49 | const kiss_fft_cpx *fin, 50 | kiss_fft_cpx *fout); 51 | 52 | #if !defined(OPUS_HAVE_RTCD) 53 | #define OVERRIDE_OPUS_FFT (1) 54 | 55 | #define opus_fft_alloc_arch(_st, arch) \ 56 | ((void)(arch), opus_fft_alloc_arm_neon(_st)) 57 | 58 | #define opus_fft_free_arch(_st, arch) \ 59 | ((void)(arch), opus_fft_free_arm_neon(_st)) 60 | 61 | #define opus_fft(_st, _fin, _fout, arch) \ 62 | ((void)(arch), opus_fft_neon(_st, _fin, _fout)) 63 | 64 | #define opus_ifft(_st, _fin, _fout, arch) \ 65 | ((void)(arch), opus_ifft_neon(_st, _fin, _fout)) 66 | 67 | #endif /* OPUS_HAVE_RTCD */ 68 | 69 | #endif /* HAVE_ARM_NE10 */ 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /opus-1.3/celt/arm/fixed_arm64.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2015 Vidyo */ 2 | /* 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 18 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef FIXED_ARM64_H 28 | #define FIXED_ARM64_H 29 | 30 | #include 31 | 32 | #undef SIG2WORD16 33 | #define SIG2WORD16(x) (vqmovns_s32(PSHR32((x), SIG_SHIFT))) 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /opus-1.3/celt/arm/mdct_arm.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015 Xiph.Org Foundation 2 | Written by Viswanath Puttagunta */ 3 | /** 4 | @file arm_mdct.h 5 | @brief ARM Neon Intrinsic optimizations for mdct using NE10 library 6 | */ 7 | 8 | /* 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions 11 | are met: 12 | 13 | - Redistributions of source code must retain the above copyright 14 | notice, this list of conditions and the following disclaimer. 15 | 16 | - Redistributions in binary form must reproduce the above copyright 17 | notice, this list of conditions and the following disclaimer in the 18 | documentation and/or other materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 24 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #if !defined(MDCT_ARM_H) 34 | #define MDCT_ARM_H 35 | 36 | #include "mdct.h" 37 | 38 | #if defined(HAVE_ARM_NE10) 39 | /** Compute a forward MDCT and scale by 4/N, trashes the input array */ 40 | void clt_mdct_forward_neon(const mdct_lookup *l, kiss_fft_scalar *in, 41 | kiss_fft_scalar * OPUS_RESTRICT out, 42 | const opus_val16 *window, int overlap, 43 | int shift, int stride, int arch); 44 | 45 | void clt_mdct_backward_neon(const mdct_lookup *l, kiss_fft_scalar *in, 46 | kiss_fft_scalar * OPUS_RESTRICT out, 47 | const opus_val16 *window, int overlap, 48 | int shift, int stride, int arch); 49 | 50 | #if !defined(OPUS_HAVE_RTCD) 51 | #define OVERRIDE_OPUS_MDCT (1) 52 | #define clt_mdct_forward(_l, _in, _out, _window, _int, _shift, _stride, _arch) \ 53 | clt_mdct_forward_neon(_l, _in, _out, _window, _int, _shift, _stride, _arch) 54 | #define clt_mdct_backward(_l, _in, _out, _window, _int, _shift, _stride, _arch) \ 55 | clt_mdct_backward_neon(_l, _in, _out, _window, _int, _shift, _stride, _arch) 56 | #endif /* OPUS_HAVE_RTCD */ 57 | #endif /* HAVE_ARM_NE10 */ 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /opus-1.3/celt/celt_lpc.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009-2010 Xiph.Org Foundation 2 | Written by Jean-Marc Valin */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef PLC_H 29 | #define PLC_H 30 | 31 | #include "arch.h" 32 | #include "cpu_support.h" 33 | 34 | #if defined(OPUS_X86_MAY_HAVE_SSE4_1) 35 | #include "x86/celt_lpc_sse.h" 36 | #endif 37 | 38 | #define LPC_ORDER 24 39 | 40 | void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p); 41 | 42 | void celt_fir_c( 43 | const opus_val16 *x, 44 | const opus_val16 *num, 45 | opus_val16 *y, 46 | int N, 47 | int ord, 48 | int arch); 49 | 50 | #if !defined(OVERRIDE_CELT_FIR) 51 | #define celt_fir(x, num, y, N, ord, arch) \ 52 | (celt_fir_c(x, num, y, N, ord, arch)) 53 | #endif 54 | 55 | void celt_iir(const opus_val32 *x, 56 | const opus_val16 *den, 57 | opus_val32 *y, 58 | int N, 59 | int ord, 60 | opus_val16 *mem, 61 | int arch); 62 | 63 | int _celt_autocorr(const opus_val16 *x, opus_val32 *ac, 64 | const opus_val16 *window, int overlap, int lag, int n, int arch); 65 | 66 | #endif /* PLC_H */ 67 | -------------------------------------------------------------------------------- /opus-1.3/celt/cpu_support.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 Xiph.Org Foundation 2 | * Copyright (c) 2013 Parrot */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef CPU_SUPPORT_H 29 | #define CPU_SUPPORT_H 30 | 31 | #include "opus_types.h" 32 | #include "opus_defines.h" 33 | 34 | #if defined(OPUS_HAVE_RTCD) && \ 35 | (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)) 36 | #include "arm/armcpu.h" 37 | 38 | /* We currently support 4 ARM variants: 39 | * arch[0] -> ARMv4 40 | * arch[1] -> ARMv5E 41 | * arch[2] -> ARMv6 42 | * arch[3] -> NEON 43 | */ 44 | #define OPUS_ARCHMASK 3 45 | 46 | #elif (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ 47 | (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ 48 | (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ 49 | (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) 50 | 51 | #include "x86/x86cpu.h" 52 | /* We currently support 5 x86 variants: 53 | * arch[0] -> non-sse 54 | * arch[1] -> sse 55 | * arch[2] -> sse2 56 | * arch[3] -> sse4.1 57 | * arch[4] -> avx 58 | */ 59 | #define OPUS_ARCHMASK 7 60 | int opus_select_arch(void); 61 | 62 | #else 63 | #define OPUS_ARCHMASK 0 64 | 65 | static OPUS_INLINE int opus_select_arch(void) 66 | { 67 | return 0; 68 | } 69 | #endif 70 | #endif 71 | -------------------------------------------------------------------------------- /opus-1.3/celt/cwrs.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2008 CSIRO 2 | Copyright (c) 2007-2009 Xiph.Org Foundation 3 | Copyright (c) 2007-2009 Timothy B. Terriberry 4 | Written by Timothy B. Terriberry and Jean-Marc Valin */ 5 | /* 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | - Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | - Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 21 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef CWRS_H 31 | #define CWRS_H 32 | 33 | #include "arch.h" 34 | #include "stack_alloc.h" 35 | #include "entenc.h" 36 | #include "entdec.h" 37 | 38 | #ifdef CUSTOM_MODES 39 | int log2_frac(opus_uint32 val, int frac); 40 | #endif 41 | 42 | void get_required_bits(opus_int16 *bits, int N, int K, int frac); 43 | 44 | void encode_pulses(const int *_y, int N, int K, ec_enc *enc); 45 | 46 | opus_val32 decode_pulses(int *_y, int N, int K, ec_dec *dec); 47 | 48 | #endif /* CWRS_H */ 49 | -------------------------------------------------------------------------------- /opus-1.3/celt/laplace.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007 CSIRO 2 | Copyright (c) 2007-2009 Xiph.Org Foundation 3 | Written by Jean-Marc Valin */ 4 | /* 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 20 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #include "entenc.h" 30 | #include "entdec.h" 31 | 32 | /** Encode a value that is assumed to be the realisation of a 33 | Laplace-distributed random process 34 | @param enc Entropy encoder state 35 | @param value Value to encode 36 | @param fs Probability of 0, multiplied by 32768 37 | @param decay Probability of the value +/- 1, multiplied by 16384 38 | */ 39 | void ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay); 40 | 41 | /** Decode a value that is assumed to be the realisation of a 42 | Laplace-distributed random process 43 | @param dec Entropy decoder state 44 | @param fs Probability of 0, multiplied by 32768 45 | @param decay Probability of the value +/- 1, multiplied by 16384 46 | @return Value decoded 47 | */ 48 | int ec_laplace_decode(ec_dec *dec, unsigned fs, int decay); 49 | -------------------------------------------------------------------------------- /opus-1.3/celt/mfrngcod.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2001-2008 Timothy B. Terriberry 2 | Copyright (c) 2008-2009 Xiph.Org Foundation */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #if !defined(_mfrngcode_H) 29 | # define _mfrngcode_H (1) 30 | # include "entcode.h" 31 | 32 | /*Constants used by the entropy encoder/decoder.*/ 33 | 34 | /*The number of bits to output at a time.*/ 35 | # define EC_SYM_BITS (8) 36 | /*The total number of bits in each of the state registers.*/ 37 | # define EC_CODE_BITS (32) 38 | /*The maximum symbol value.*/ 39 | # define EC_SYM_MAX ((1U<>EC_SYM_BITS) 46 | /*The number of bits available for the last, partial symbol in the code field.*/ 47 | # define EC_CODE_EXTRA ((EC_CODE_BITS-2)%EC_SYM_BITS+1) 48 | #endif 49 | -------------------------------------------------------------------------------- /opus-1.3/celt/modes.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2008 CSIRO 2 | Copyright (c) 2007-2009 Xiph.Org Foundation 3 | Copyright (c) 2008 Gregory Maxwell 4 | Written by Jean-Marc Valin and Gregory Maxwell */ 5 | /* 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | - Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | - Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 21 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef MODES_H 31 | #define MODES_H 32 | 33 | #include "opus_types.h" 34 | #include "celt.h" 35 | #include "arch.h" 36 | #include "mdct.h" 37 | #include "entenc.h" 38 | #include "entdec.h" 39 | 40 | #define MAX_PERIOD 1024 41 | 42 | typedef struct { 43 | int size; 44 | const opus_int16 *index; 45 | const unsigned char *bits; 46 | const unsigned char *caps; 47 | } PulseCache; 48 | 49 | /** Mode definition (opaque) 50 | @brief Mode definition 51 | */ 52 | struct OpusCustomMode { 53 | opus_int32 Fs; 54 | int overlap; 55 | 56 | int nbEBands; 57 | int effEBands; 58 | opus_val16 preemph[4]; 59 | const opus_int16 *eBands; /**< Definition for each "pseudo-critical band" */ 60 | 61 | int maxLM; 62 | int nbShortMdcts; 63 | int shortMdctSize; 64 | 65 | int nbAllocVectors; /**< Number of lines in the matrix below */ 66 | const unsigned char *allocVectors; /**< Number of bits in each band for several rates */ 67 | const opus_int16 *logN; 68 | 69 | const opus_val16 *window; 70 | mdct_lookup mdct; 71 | PulseCache cache; 72 | }; 73 | 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /opus-1.3/celt/tests/test_unit_laplace.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation 2 | Written by Jean-Marc Valin and Timothy B. Terriberry */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include 33 | #include 34 | #define CELT_C 35 | #include "laplace.h" 36 | #include "stack_alloc.h" 37 | 38 | #include "entenc.c" 39 | #include "entdec.c" 40 | #include "entcode.c" 41 | #include "laplace.c" 42 | 43 | #define DATA_SIZE 40000 44 | 45 | int ec_laplace_get_start_freq(int decay) 46 | { 47 | opus_uint32 ft = 32768 - LAPLACE_MINP*(2*LAPLACE_NMIN+1); 48 | int fs = (ft*(16384-decay))/(16384+decay); 49 | return fs+LAPLACE_MINP; 50 | } 51 | 52 | int main(void) 53 | { 54 | int i; 55 | int ret = 0; 56 | ec_enc enc; 57 | ec_dec dec; 58 | unsigned char *ptr; 59 | int val[10000], decay[10000]; 60 | ALLOC_STACK; 61 | ptr = (unsigned char *)malloc(DATA_SIZE); 62 | ec_enc_init(&enc,ptr,DATA_SIZE); 63 | 64 | val[0] = 3; decay[0] = 6000; 65 | val[1] = 0; decay[1] = 5800; 66 | val[2] = -1; decay[2] = 5600; 67 | for (i=3;i<10000;i++) 68 | { 69 | val[i] = rand()%15-7; 70 | decay[i] = rand()%11000+5000; 71 | } 72 | for (i=0;i<10000;i++) 73 | ec_laplace_encode(&enc, &val[i], 74 | ec_laplace_get_start_freq(decay[i]), decay[i]); 75 | 76 | ec_enc_done(&enc); 77 | 78 | ec_dec_init(&dec,ec_get_buffer(&enc),ec_range_bytes(&enc)); 79 | 80 | for (i=0;i<10000;i++) 81 | { 82 | int d = ec_laplace_decode(&dec, 83 | ec_laplace_get_start_freq(decay[i]), decay[i]); 84 | if (d != val[i]) 85 | { 86 | fprintf (stderr, "Got %d instead of %d\n", d, val[i]); 87 | ret = 1; 88 | } 89 | } 90 | 91 | free(ptr); 92 | return ret; 93 | } 94 | -------------------------------------------------------------------------------- /opus-1.3/celt/tests/test_unit_rotation.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008-2011 Xiph.Org Foundation 2 | Written by Jean-Marc Valin */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #ifndef CUSTOM_MODES 33 | #define CUSTOM_MODES 34 | #endif 35 | 36 | #include 37 | #include 38 | #include "vq.h" 39 | #include "bands.h" 40 | #include "stack_alloc.h" 41 | #include 42 | 43 | 44 | #define MAX_SIZE 100 45 | 46 | int ret=0; 47 | void test_rotation(int N, int K) 48 | { 49 | int i; 50 | double err = 0, ener = 0, snr, snr0; 51 | opus_val16 x0[MAX_SIZE]; 52 | opus_val16 x1[MAX_SIZE]; 53 | for (i=0;i 20) 72 | { 73 | fprintf(stderr, "FAIL!\n"); 74 | ret = 1; 75 | } 76 | } 77 | 78 | int main(void) 79 | { 80 | ALLOC_STACK; 81 | test_rotation(15, 3); 82 | test_rotation(23, 5); 83 | test_rotation(50, 3); 84 | test_rotation(80, 1); 85 | return ret; 86 | } 87 | -------------------------------------------------------------------------------- /opus-1.3/celt/tests/test_unit_types.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008-2011 Xiph.Org Foundation 2 | Written by Jean-Marc Valin */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "opus_types.h" 33 | #include 34 | 35 | int main(void) 36 | { 37 | opus_int16 i = 1; 38 | i <<= 14; 39 | if (i>>14 != 1) 40 | { 41 | fprintf(stderr, "opus_int16 isn't 16 bits\n"); 42 | return 1; 43 | } 44 | if (sizeof(opus_int16)*2 != sizeof(opus_int32)) 45 | { 46 | fprintf(stderr, "16*2 != 32\n"); 47 | return 1; 48 | } 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /opus-1.3/celt/x86/celt_lpc_sse.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, Cisco Systems, INC 2 | Written by XiangMingZhu WeiZhou MinPeng YanWang 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef CELT_LPC_SSE_H 29 | #define CELT_LPC_SSE_H 30 | 31 | #ifdef HAVE_CONFIG_H 32 | #include "config.h" 33 | #endif 34 | 35 | #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) 36 | #define OVERRIDE_CELT_FIR 37 | 38 | void celt_fir_sse4_1( 39 | const opus_val16 *x, 40 | const opus_val16 *num, 41 | opus_val16 *y, 42 | int N, 43 | int ord, 44 | int arch); 45 | 46 | #if defined(OPUS_X86_PRESUME_SSE4_1) 47 | #define celt_fir(x, num, y, N, ord, arch) \ 48 | ((void)arch, celt_fir_sse4_1(x, num, y, N, ord, arch)) 49 | 50 | #else 51 | 52 | extern void (*const CELT_FIR_IMPL[OPUS_ARCHMASK + 1])( 53 | const opus_val16 *x, 54 | const opus_val16 *num, 55 | opus_val16 *y, 56 | int N, 57 | int ord, 58 | int arch); 59 | 60 | # define celt_fir(x, num, y, N, ord, arch) \ 61 | ((*CELT_FIR_IMPL[(arch) & OPUS_ARCHMASK])(x, num, y, N, ord, arch)) 62 | 63 | #endif 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /opus-1.3/celt/x86/celt_lpc_sse4_1.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, Cisco Systems, INC 2 | Written by XiangMingZhu WeiZhou MinPeng YanWang 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include 33 | #include 34 | #include 35 | #include "celt_lpc.h" 36 | #include "stack_alloc.h" 37 | #include "mathops.h" 38 | #include "pitch.h" 39 | #include "x86cpu.h" 40 | 41 | #if defined(FIXED_POINT) 42 | 43 | void celt_fir_sse4_1(const opus_val16 *x, 44 | const opus_val16 *num, 45 | opus_val16 *y, 46 | int N, 47 | int ord, 48 | int arch) 49 | { 50 | int i,j; 51 | VARDECL(opus_val16, rnum); 52 | 53 | __m128i vecNoA; 54 | opus_int32 noA ; 55 | SAVE_STACK; 56 | 57 | ALLOC(rnum, ord, opus_val16); 58 | for(i=0;i> 1; 61 | vecNoA = _mm_set_epi32(noA, noA, noA, noA); 62 | 63 | for (i=0;i 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 23 | 24 | 25 |
14 | For more information visit the Opus Website. 15 | 17 | 22 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /opus-1.3/doc/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $projectname: $title 7 | $title 8 | 9 | 10 | $treeview 11 | $search 12 | $mathjax 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 37 | 38 | 39 | 40 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
27 |
Opus
28 |
30 | 33 | 35 |
31 |
$projectbrief
32 |
$projectnumber 34 |
36 |
41 |
$projectbrief
42 |
$searchbox
53 |
54 | 55 | -------------------------------------------------------------------------------- /opus-1.3/m4/ax_add_fortify_source.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # Modified from https://www.gnu.org/software/autoconf-archive/ax_add_fortify_source.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_ADD_FORTIFY_SOURCE 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check whether -D_FORTIFY_SOURCE=2 can be added to CFLAGS without macro 12 | # redefinition warnings. Some distributions (such as Gentoo Linux) enable 13 | # _FORTIFY_SOURCE globally in their compilers, leading to unnecessary 14 | # warnings in the form of 15 | # 16 | # :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] 17 | # : note: this is the location of the previous definition 18 | # 19 | # which is a problem if -Werror is enabled. This macro checks whether 20 | # _FORTIFY_SOURCE is already defined, and if not, adds -D_FORTIFY_SOURCE=2 21 | # to CFLAGS. 22 | # 23 | # LICENSE 24 | # 25 | # Copyright (c) 2017 David Seifert 26 | # 27 | # Copying and distribution of this file, with or without modification, are 28 | # permitted in any medium without royalty provided the copyright notice 29 | # and this notice are preserved. This file is offered as-is, without any 30 | # warranty. 31 | 32 | #serial 1 33 | 34 | AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[ 35 | AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 to CFLAGS]) 36 | AC_LINK_IFELSE([ 37 | AC_LANG_SOURCE( 38 | [[ 39 | int main() { 40 | #ifndef _FORTIFY_SOURCE 41 | return 0; 42 | #else 43 | this_is_an_error; 44 | #endif 45 | } 46 | ]] 47 | )], [ 48 | AC_MSG_RESULT([yes]) 49 | CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" 50 | ], [ 51 | AC_MSG_RESULT([no]) 52 | ]) 53 | ]) 54 | -------------------------------------------------------------------------------- /opus-1.3/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /opus-1.3/m4/opus-intrinsics.m4: -------------------------------------------------------------------------------- 1 | dnl opus-intrinsics.m4 2 | dnl macro for testing for support for compiler intrinsics, either by default or with a compiler flag 3 | 4 | dnl OPUS_CHECK_INTRINSICS(NAME-OF-INTRINSICS, COMPILER-FLAG-FOR-INTRINSICS, VAR-IF-PRESENT, VAR-IF-DEFAULT, TEST-PROGRAM-HEADER, TEST-PROGRAM-BODY) 5 | AC_DEFUN([OPUS_CHECK_INTRINSICS], 6 | [ 7 | AC_MSG_CHECKING([if compiler supports $1 intrinsics]) 8 | AC_LINK_IFELSE( 9 | [AC_LANG_PROGRAM($5, $6)], 10 | [ 11 | $3=1 12 | $4=1 13 | AC_MSG_RESULT([yes]) 14 | ],[ 15 | $4=0 16 | AC_MSG_RESULT([no]) 17 | AC_MSG_CHECKING([if compiler supports $1 intrinsics with $2]) 18 | save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $2" 19 | AC_LINK_IFELSE([AC_LANG_PROGRAM($5, $6)], 20 | [ 21 | AC_MSG_RESULT([yes]) 22 | $3=1 23 | ],[ 24 | AC_MSG_RESULT([no]) 25 | $3=0 26 | ]) 27 | CFLAGS="$save_CFLAGS" 28 | ]) 29 | ]) 30 | -------------------------------------------------------------------------------- /opus-1.3/opus-uninstalled.pc.in: -------------------------------------------------------------------------------- 1 | # Opus codec reference implementation uninstalled pkg-config file 2 | 3 | libdir=${pcfiledir}/.libs 4 | includedir=${pcfiledir} 5 | 6 | Name: opus uninstalled 7 | Description: Opus IETF audio codec (not installed, @PC_BUILD@) 8 | Version: @VERSION@ 9 | Requires: 10 | Conflicts: 11 | Libs: ${libdir}/libopus.la @LIBM@ 12 | Cflags: -I${pcfiledir}/@top_srcdir@/include 13 | -------------------------------------------------------------------------------- /opus-1.3/opus.pc.in: -------------------------------------------------------------------------------- 1 | # Opus codec reference implementation pkg-config file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: Opus 9 | Description: Opus IETF audio codec (@PC_BUILD@ build) 10 | URL: https://opus-codec.org/ 11 | Version: @VERSION@ 12 | Requires: 13 | Conflicts: 14 | Libs: -L${libdir} -lopus 15 | Libs.private: @LIBM@ 16 | Cflags: -I${includedir}/opus 17 | -------------------------------------------------------------------------------- /opus-1.3/opus_headers.mk: -------------------------------------------------------------------------------- 1 | OPUS_HEAD = \ 2 | include/opus.h \ 3 | include/opus_multistream.h \ 4 | include/opus_projection.h \ 5 | src/opus_private.h \ 6 | src/analysis.h \ 7 | src/mapping_matrix.h \ 8 | src/mlp.h \ 9 | src/tansig_table.h 10 | -------------------------------------------------------------------------------- /opus-1.3/opus_sources.mk: -------------------------------------------------------------------------------- 1 | OPUS_SOURCES = src/opus.c \ 2 | src/opus_decoder.c \ 3 | src/opus_encoder.c \ 4 | src/opus_multistream.c \ 5 | src/opus_multistream_encoder.c \ 6 | src/opus_multistream_decoder.c \ 7 | src/repacketizer.c \ 8 | src/opus_projection_encoder.c \ 9 | src/opus_projection_decoder.c \ 10 | src/mapping_matrix.c 11 | 12 | OPUS_SOURCES_FLOAT = \ 13 | src/analysis.c \ 14 | src/mlp.c \ 15 | src/mlp_data.c 16 | -------------------------------------------------------------------------------- /opus-1.3/package_version: -------------------------------------------------------------------------------- 1 | PACKAGE_VERSION="1.3" 2 | -------------------------------------------------------------------------------- /opus-1.3/silk/NLSF_unpack.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "main.h" 33 | 34 | /* Unpack predictor values and indices for entropy coding tables */ 35 | void silk_NLSF_unpack( 36 | opus_int16 ec_ix[], /* O Indices to entropy tables [ LPC_ORDER ] */ 37 | opus_uint8 pred_Q8[], /* O LSF predictor [ LPC_ORDER ] */ 38 | const silk_NLSF_CB_struct *psNLSF_CB, /* I Codebook object */ 39 | const opus_int CB1_index /* I Index of vector in first LSF codebook */ 40 | ) 41 | { 42 | opus_int i; 43 | opus_uint8 entry; 44 | const opus_uint8 *ec_sel_ptr; 45 | 46 | ec_sel_ptr = &psNLSF_CB->ec_sel[ CB1_index * psNLSF_CB->order / 2 ]; 47 | for( i = 0; i < psNLSF_CB->order; i += 2 ) { 48 | entry = *ec_sel_ptr++; 49 | ec_ix [ i ] = silk_SMULBB( silk_RSHIFT( entry, 1 ) & 7, 2 * NLSF_QUANT_MAX_AMPLITUDE + 1 ); 50 | pred_Q8[ i ] = psNLSF_CB->pred_Q8[ i + ( entry & 1 ) * ( psNLSF_CB->order - 1 ) ]; 51 | ec_ix [ i + 1 ] = silk_SMULBB( silk_RSHIFT( entry, 5 ) & 7, 2 * NLSF_QUANT_MAX_AMPLITUDE + 1 ); 52 | pred_Q8[ i + 1 ] = psNLSF_CB->pred_Q8[ i + ( silk_RSHIFT( entry, 4 ) & 1 ) * ( psNLSF_CB->order - 1 ) + 1 ]; 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /opus-1.3/silk/arm/SigProc_FIX_armv4.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (C) 2013 Xiph.Org Foundation and contributors 3 | Copyright (c) 2013 Parrot 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | - Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | - Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 13 | names of specific contributors, may be used to endorse or promote 14 | products derived from this software without specific prior written 15 | permission. 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | ***********************************************************************/ 28 | 29 | #ifndef SILK_SIGPROC_FIX_ARMv4_H 30 | #define SILK_SIGPROC_FIX_ARMv4_H 31 | 32 | #undef silk_MLA 33 | static OPUS_INLINE opus_int32 silk_MLA_armv4(opus_int32 a, opus_int32 b, 34 | opus_int32 c) 35 | { 36 | opus_int32 res; 37 | __asm__( 38 | "#silk_MLA\n\t" 39 | "mla %0, %1, %2, %3\n\t" 40 | : "=&r"(res) 41 | : "r"(b), "r"(c), "r"(a) 42 | ); 43 | return res; 44 | } 45 | #define silk_MLA(a, b, c) (silk_MLA_armv4(a, b, c)) 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /opus-1.3/silk/arm/SigProc_FIX_armv5e.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Copyright (c) 2013 Parrot 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | - Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | - Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 13 | names of specific contributors, may be used to endorse or promote 14 | products derived from this software without specific prior written 15 | permission. 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | ***********************************************************************/ 28 | 29 | #ifndef SILK_SIGPROC_FIX_ARMv5E_H 30 | #define SILK_SIGPROC_FIX_ARMv5E_H 31 | 32 | #undef silk_SMULTT 33 | static OPUS_INLINE opus_int32 silk_SMULTT_armv5e(opus_int32 a, opus_int32 b) 34 | { 35 | opus_int32 res; 36 | __asm__( 37 | "#silk_SMULTT\n\t" 38 | "smultt %0, %1, %2\n\t" 39 | : "=r"(res) 40 | : "%r"(a), "r"(b) 41 | ); 42 | return res; 43 | } 44 | #define silk_SMULTT(a, b) (silk_SMULTT_armv5e(a, b)) 45 | 46 | #undef silk_SMLATT 47 | static OPUS_INLINE opus_int32 silk_SMLATT_armv5e(opus_int32 a, opus_int32 b, 48 | opus_int32 c) 49 | { 50 | opus_int32 res; 51 | __asm__( 52 | "#silk_SMLATT\n\t" 53 | "smlatt %0, %1, %2, %3\n\t" 54 | : "=r"(res) 55 | : "%r"(b), "r"(c), "r"(a) 56 | ); 57 | return res; 58 | } 59 | #define silk_SMLATT(a, b, c) (silk_SMLATT_armv5e(a, b, c)) 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /opus-1.3/silk/arm/macros_arm64.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (C) 2015 Vidyo 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifndef SILK_MACROS_ARM64_H 29 | #define SILK_MACROS_ARM64_H 30 | 31 | #include 32 | 33 | #undef silk_ADD_SAT32 34 | #define silk_ADD_SAT32(a, b) (vqadds_s32((a), (b))) 35 | 36 | #undef silk_SUB_SAT32 37 | #define silk_SUB_SAT32(a, b) (vqsubs_s32((a), (b))) 38 | 39 | #endif /* SILK_MACROS_ARM64_H */ 40 | -------------------------------------------------------------------------------- /opus-1.3/silk/bwexpander.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | 34 | /* Chirp (bandwidth expand) LP AR filter */ 35 | void silk_bwexpander( 36 | opus_int16 *ar, /* I/O AR filter to be expanded (without leading 1) */ 37 | const opus_int d, /* I Length of ar */ 38 | opus_int32 chirp_Q16 /* I Chirp factor (typically in the range 0 to 1) */ 39 | ) 40 | { 41 | opus_int i; 42 | opus_int32 chirp_minus_one_Q16 = chirp_Q16 - 65536; 43 | 44 | /* NB: Dont use silk_SMULWB, instead of silk_RSHIFT_ROUND( silk_MUL(), 16 ), below. */ 45 | /* Bias in silk_SMULWB can lead to unstable filters */ 46 | for( i = 0; i < d - 1; i++ ) { 47 | ar[ i ] = (opus_int16)silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, ar[ i ] ), 16 ); 48 | chirp_Q16 += silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, chirp_minus_one_Q16 ), 16 ); 49 | } 50 | ar[ d - 1 ] = (opus_int16)silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, ar[ d - 1 ] ), 16 ); 51 | } 52 | -------------------------------------------------------------------------------- /opus-1.3/silk/bwexpander_32.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | 34 | /* Chirp (bandwidth expand) LP AR filter */ 35 | void silk_bwexpander_32( 36 | opus_int32 *ar, /* I/O AR filter to be expanded (without leading 1) */ 37 | const opus_int d, /* I Length of ar */ 38 | opus_int32 chirp_Q16 /* I Chirp factor in Q16 */ 39 | ) 40 | { 41 | opus_int i; 42 | opus_int32 chirp_minus_one_Q16 = chirp_Q16 - 65536; 43 | 44 | for( i = 0; i < d - 1; i++ ) { 45 | ar[ i ] = silk_SMULWW( chirp_Q16, ar[ i ] ); 46 | chirp_Q16 += silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, chirp_minus_one_Q16 ), 16 ); 47 | } 48 | ar[ d - 1 ] = silk_SMULWW( chirp_Q16, ar[ d - 1 ] ); 49 | } 50 | 51 | -------------------------------------------------------------------------------- /opus-1.3/silk/fixed/LTP_scale_ctrl_FIX.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "main_FIX.h" 33 | 34 | /* Calculation of LTP state scaling */ 35 | void silk_LTP_scale_ctrl_FIX( 36 | silk_encoder_state_FIX *psEnc, /* I/O encoder state */ 37 | silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control */ 38 | opus_int condCoding /* I The type of conditional coding to use */ 39 | ) 40 | { 41 | opus_int round_loss; 42 | 43 | if( condCoding == CODE_INDEPENDENTLY ) { 44 | /* Only scale if first frame in packet */ 45 | round_loss = psEnc->sCmn.PacketLoss_perc + psEnc->sCmn.nFramesPerPacket; 46 | psEnc->sCmn.indices.LTP_scaleIndex = (opus_int8)silk_LIMIT( 47 | silk_SMULWB( silk_SMULBB( round_loss, psEncCtrl->LTPredCodGain_Q7 ), SILK_FIX_CONST( 0.1, 9 ) ), 0, 2 ); 48 | } else { 49 | /* Default is minimum scaling */ 50 | psEnc->sCmn.indices.LTP_scaleIndex = 0; 51 | } 52 | psEncCtrl->LTP_scale_Q14 = silk_LTPScales_table_Q14[ psEnc->sCmn.indices.LTP_scaleIndex ]; 53 | } 54 | -------------------------------------------------------------------------------- /opus-1.3/silk/fixed/autocorr_FIX.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | #include "celt_lpc.h" 34 | 35 | /* Compute autocorrelation */ 36 | void silk_autocorr( 37 | opus_int32 *results, /* O Result (length correlationCount) */ 38 | opus_int *scale, /* O Scaling of the correlation vector */ 39 | const opus_int16 *inputData, /* I Input data to correlate */ 40 | const opus_int inputDataSize, /* I Length of input */ 41 | const opus_int correlationCount, /* I Number of correlation taps to compute */ 42 | int arch /* I Run-time architecture */ 43 | ) 44 | { 45 | opus_int corrCount; 46 | corrCount = silk_min_int( inputDataSize, correlationCount ); 47 | *scale = _celt_autocorr(inputData, results, NULL, 0, corrCount-1, inputDataSize, arch); 48 | } 49 | -------------------------------------------------------------------------------- /opus-1.3/silk/fixed/k2a_FIX.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | 34 | /* Step up function, converts reflection coefficients to prediction coefficients */ 35 | void silk_k2a( 36 | opus_int32 *A_Q24, /* O Prediction coefficients [order] Q24 */ 37 | const opus_int16 *rc_Q15, /* I Reflection coefficients [order] Q15 */ 38 | const opus_int32 order /* I Prediction order */ 39 | ) 40 | { 41 | opus_int k, n; 42 | opus_int32 rc, tmp1, tmp2; 43 | 44 | for( k = 0; k < order; k++ ) { 45 | rc = rc_Q15[ k ]; 46 | for( n = 0; n < (k + 1) >> 1; n++ ) { 47 | tmp1 = A_Q24[ n ]; 48 | tmp2 = A_Q24[ k - n - 1 ]; 49 | A_Q24[ n ] = silk_SMLAWB( tmp1, silk_LSHIFT( tmp2, 1 ), rc ); 50 | A_Q24[ k - n - 1 ] = silk_SMLAWB( tmp2, silk_LSHIFT( tmp1, 1 ), rc ); 51 | } 52 | A_Q24[ k ] = -silk_LSHIFT( (opus_int32)rc_Q15[ k ], 9 ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /opus-1.3/silk/fixed/k2a_Q16_FIX.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | 34 | /* Step up function, converts reflection coefficients to prediction coefficients */ 35 | void silk_k2a_Q16( 36 | opus_int32 *A_Q24, /* O Prediction coefficients [order] Q24 */ 37 | const opus_int32 *rc_Q16, /* I Reflection coefficients [order] Q16 */ 38 | const opus_int32 order /* I Prediction order */ 39 | ) 40 | { 41 | opus_int k, n; 42 | opus_int32 rc, tmp1, tmp2; 43 | 44 | for( k = 0; k < order; k++ ) { 45 | rc = rc_Q16[ k ]; 46 | for( n = 0; n < (k + 1) >> 1; n++ ) { 47 | tmp1 = A_Q24[ n ]; 48 | tmp2 = A_Q24[ k - n - 1 ]; 49 | A_Q24[ n ] = silk_SMLAWW( tmp1, tmp2, rc ); 50 | A_Q24[ k - n - 1 ] = silk_SMLAWW( tmp2, tmp1, rc ); 51 | } 52 | A_Q24[ k ] = -silk_LSHIFT( rc, 8 ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /opus-1.3/silk/fixed/regularize_correlations_FIX.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "main_FIX.h" 33 | 34 | /* Add noise to matrix diagonal */ 35 | void silk_regularize_correlations_FIX( 36 | opus_int32 *XX, /* I/O Correlation matrices */ 37 | opus_int32 *xx, /* I/O Correlation values */ 38 | opus_int32 noise, /* I Noise to add */ 39 | opus_int D /* I Dimension of XX */ 40 | ) 41 | { 42 | opus_int i; 43 | for( i = 0; i < D; i++ ) { 44 | matrix_ptr( &XX[ 0 ], i, i, D ) = silk_ADD32( matrix_ptr( &XX[ 0 ], i, i, D ), noise ); 45 | } 46 | xx[ 0 ] += noise; 47 | } 48 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/LTP_scale_ctrl_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "main_FLP.h" 33 | 34 | void silk_LTP_scale_ctrl_FLP( 35 | silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ 36 | silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */ 37 | opus_int condCoding /* I The type of conditional coding to use */ 38 | ) 39 | { 40 | opus_int round_loss; 41 | 42 | if( condCoding == CODE_INDEPENDENTLY ) { 43 | /* Only scale if first frame in packet */ 44 | round_loss = psEnc->sCmn.PacketLoss_perc + psEnc->sCmn.nFramesPerPacket; 45 | psEnc->sCmn.indices.LTP_scaleIndex = (opus_int8)silk_LIMIT( round_loss * psEncCtrl->LTPredCodGain * 0.1f, 0.0f, 2.0f ); 46 | } else { 47 | /* Default is minimum scaling */ 48 | psEnc->sCmn.indices.LTP_scaleIndex = 0; 49 | } 50 | 51 | psEncCtrl->LTP_scale = (silk_float)silk_LTPScales_table_Q14[ psEnc->sCmn.indices.LTP_scaleIndex ] / 16384.0f; 52 | } 53 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/autocorrelation_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "typedef.h" 33 | #include "SigProc_FLP.h" 34 | 35 | /* compute autocorrelation */ 36 | void silk_autocorrelation_FLP( 37 | silk_float *results, /* O result (length correlationCount) */ 38 | const silk_float *inputData, /* I input data to correlate */ 39 | opus_int inputDataSize, /* I length of input */ 40 | opus_int correlationCount /* I number of correlation taps to compute */ 41 | ) 42 | { 43 | opus_int i; 44 | 45 | if( correlationCount > inputDataSize ) { 46 | correlationCount = inputDataSize; 47 | } 48 | 49 | for( i = 0; i < correlationCount; i++ ) { 50 | results[ i ] = (silk_float)silk_inner_product_FLP( inputData, inputData + i, inputDataSize - i ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/bwexpander_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FLP.h" 33 | 34 | /* Chirp (bw expand) LP AR filter */ 35 | void silk_bwexpander_FLP( 36 | silk_float *ar, /* I/O AR filter to be expanded (without leading 1) */ 37 | const opus_int d, /* I length of ar */ 38 | const silk_float chirp /* I chirp factor (typically in range (0..1) ) */ 39 | ) 40 | { 41 | opus_int i; 42 | silk_float cfac = chirp; 43 | 44 | for( i = 0; i < d - 1; i++ ) { 45 | ar[ i ] *= cfac; 46 | cfac *= chirp; 47 | } 48 | ar[ d - 1 ] *= cfac; 49 | } 50 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/energy_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FLP.h" 33 | 34 | /* sum of squares of a silk_float array, with result as double */ 35 | double silk_energy_FLP( 36 | const silk_float *data, 37 | opus_int dataSize 38 | ) 39 | { 40 | opus_int i; 41 | double result; 42 | 43 | /* 4x unrolled loop */ 44 | result = 0.0; 45 | for( i = 0; i < dataSize - 3; i += 4 ) { 46 | result += data[ i + 0 ] * (double)data[ i + 0 ] + 47 | data[ i + 1 ] * (double)data[ i + 1 ] + 48 | data[ i + 2 ] * (double)data[ i + 2 ] + 49 | data[ i + 3 ] * (double)data[ i + 3 ]; 50 | } 51 | 52 | /* add any remaining products */ 53 | for( ; i < dataSize; i++ ) { 54 | result += data[ i ] * (double)data[ i ]; 55 | } 56 | 57 | silk_assert( result >= 0.0 ); 58 | return result; 59 | } 60 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/inner_product_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FLP.h" 33 | 34 | /* inner product of two silk_float arrays, with result as double */ 35 | double silk_inner_product_FLP( 36 | const silk_float *data1, 37 | const silk_float *data2, 38 | opus_int dataSize 39 | ) 40 | { 41 | opus_int i; 42 | double result; 43 | 44 | /* 4x unrolled loop */ 45 | result = 0.0; 46 | for( i = 0; i < dataSize - 3; i += 4 ) { 47 | result += data1[ i + 0 ] * (double)data2[ i + 0 ] + 48 | data1[ i + 1 ] * (double)data2[ i + 1 ] + 49 | data1[ i + 2 ] * (double)data2[ i + 2 ] + 50 | data1[ i + 3 ] * (double)data2[ i + 3 ]; 51 | } 52 | 53 | /* add any remaining products */ 54 | for( ; i < dataSize; i++ ) { 55 | result += data1[ i ] * (double)data2[ i ]; 56 | } 57 | 58 | return result; 59 | } 60 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/k2a_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FLP.h" 33 | 34 | /* step up function, converts reflection coefficients to prediction coefficients */ 35 | void silk_k2a_FLP( 36 | silk_float *A, /* O prediction coefficients [order] */ 37 | const silk_float *rc, /* I reflection coefficients [order] */ 38 | opus_int32 order /* I prediction order */ 39 | ) 40 | { 41 | opus_int k, n; 42 | silk_float rck, tmp1, tmp2; 43 | 44 | for( k = 0; k < order; k++ ) { 45 | rck = rc[ k ]; 46 | for( n = 0; n < (k + 1) >> 1; n++ ) { 47 | tmp1 = A[ n ]; 48 | tmp2 = A[ k - n - 1 ]; 49 | A[ n ] = tmp1 + tmp2 * rck; 50 | A[ k - n - 1 ] = tmp2 + tmp1 * rck; 51 | } 52 | A[ k ] = -rck; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/regularize_correlations_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "main_FLP.h" 33 | 34 | /* Add noise to matrix diagonal */ 35 | void silk_regularize_correlations_FLP( 36 | silk_float *XX, /* I/O Correlation matrices */ 37 | silk_float *xx, /* I/O Correlation values */ 38 | const silk_float noise, /* I Noise energy to add */ 39 | const opus_int D /* I Dimension of XX */ 40 | ) 41 | { 42 | opus_int i; 43 | 44 | for( i = 0; i < D; i++ ) { 45 | matrix_ptr( &XX[ 0 ], i, i, D ) += noise; 46 | } 47 | xx[ 0 ] += noise; 48 | } 49 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/scale_copy_vector_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FLP.h" 33 | 34 | /* copy and multiply a vector by a constant */ 35 | void silk_scale_copy_vector_FLP( 36 | silk_float *data_out, 37 | const silk_float *data_in, 38 | silk_float gain, 39 | opus_int dataSize 40 | ) 41 | { 42 | opus_int i, dataSize4; 43 | 44 | /* 4x unrolled loop */ 45 | dataSize4 = dataSize & 0xFFFC; 46 | for( i = 0; i < dataSize4; i += 4 ) { 47 | data_out[ i + 0 ] = gain * data_in[ i + 0 ]; 48 | data_out[ i + 1 ] = gain * data_in[ i + 1 ]; 49 | data_out[ i + 2 ] = gain * data_in[ i + 2 ]; 50 | data_out[ i + 3 ] = gain * data_in[ i + 3 ]; 51 | } 52 | 53 | /* any remaining elements */ 54 | for( ; i < dataSize; i++ ) { 55 | data_out[ i ] = gain * data_in[ i ]; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /opus-1.3/silk/float/scale_vector_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FLP.h" 33 | 34 | /* multiply a vector by a constant */ 35 | void silk_scale_vector_FLP( 36 | silk_float *data1, 37 | silk_float gain, 38 | opus_int dataSize 39 | ) 40 | { 41 | opus_int i, dataSize4; 42 | 43 | /* 4x unrolled loop */ 44 | dataSize4 = dataSize & 0xFFFC; 45 | for( i = 0; i < dataSize4; i += 4 ) { 46 | data1[ i + 0 ] *= gain; 47 | data1[ i + 1 ] *= gain; 48 | data1[ i + 2 ] *= gain; 49 | data1[ i + 3 ] *= gain; 50 | } 51 | 52 | /* any remaining elements */ 53 | for( ; i < dataSize; i++ ) { 54 | data1[ i ] *= gain; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /opus-1.3/silk/init_decoder.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "main.h" 33 | 34 | /************************/ 35 | /* Init Decoder State */ 36 | /************************/ 37 | opus_int silk_init_decoder( 38 | silk_decoder_state *psDec /* I/O Decoder state pointer */ 39 | ) 40 | { 41 | /* Clear the entire encoder state, except anything copied */ 42 | silk_memset( psDec, 0, sizeof( silk_decoder_state ) ); 43 | 44 | /* Used to deactivate LSF interpolation */ 45 | psDec->first_frame_after_reset = 1; 46 | psDec->prev_gain_Q16 = 65536; 47 | psDec->arch = opus_select_arch(); 48 | 49 | /* Reset CNG state */ 50 | silk_CNG_Reset( psDec ); 51 | 52 | /* Reset PLC state */ 53 | silk_PLC_Reset( psDec ); 54 | 55 | return(0); 56 | } 57 | 58 | -------------------------------------------------------------------------------- /opus-1.3/silk/init_encoder.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | #ifdef FIXED_POINT 32 | #include "main_FIX.h" 33 | #else 34 | #include "main_FLP.h" 35 | #endif 36 | #include "tuning_parameters.h" 37 | #include "cpu_support.h" 38 | 39 | /*********************************/ 40 | /* Initialize Silk Encoder state */ 41 | /*********************************/ 42 | opus_int silk_init_encoder( 43 | silk_encoder_state_Fxx *psEnc, /* I/O Pointer to Silk FIX encoder state */ 44 | int arch /* I Run-time architecture */ 45 | ) 46 | { 47 | opus_int ret = 0; 48 | 49 | /* Clear the entire encoder state */ 50 | silk_memset( psEnc, 0, sizeof( silk_encoder_state_Fxx ) ); 51 | 52 | psEnc->sCmn.arch = arch; 53 | 54 | psEnc->sCmn.variable_HP_smth1_Q15 = silk_LSHIFT( silk_lin2log( SILK_FIX_CONST( VARIABLE_HP_MIN_CUTOFF_HZ, 16 ) ) - ( 16 << 7 ), 8 ); 55 | psEnc->sCmn.variable_HP_smth2_Q15 = psEnc->sCmn.variable_HP_smth1_Q15; 56 | 57 | /* Used to deactivate LSF interpolation, pitch prediction */ 58 | psEnc->sCmn.first_frame_after_reset = 1; 59 | 60 | /* Initialize Silk VAD */ 61 | ret += silk_VAD_Init( &psEnc->sCmn.sVAD ); 62 | 63 | return ret; 64 | } 65 | -------------------------------------------------------------------------------- /opus-1.3/silk/inner_prod_aligned.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | 34 | opus_int32 silk_inner_prod_aligned_scale( 35 | const opus_int16 *const inVec1, /* I input vector 1 */ 36 | const opus_int16 *const inVec2, /* I input vector 2 */ 37 | const opus_int scale, /* I number of bits to shift */ 38 | const opus_int len /* I vector lengths */ 39 | ) 40 | { 41 | opus_int i; 42 | opus_int32 sum = 0; 43 | for( i = 0; i < len; i++ ) { 44 | sum = silk_ADD_RSHIFT32( sum, silk_SMULBB( inVec1[ i ], inVec2[ i ] ), scale ); 45 | } 46 | return sum; 47 | } 48 | -------------------------------------------------------------------------------- /opus-1.3/silk/interpolate.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "main.h" 33 | 34 | /* Interpolate two vectors */ 35 | void silk_interpolate( 36 | opus_int16 xi[ MAX_LPC_ORDER ], /* O interpolated vector */ 37 | const opus_int16 x0[ MAX_LPC_ORDER ], /* I first vector */ 38 | const opus_int16 x1[ MAX_LPC_ORDER ], /* I second vector */ 39 | const opus_int ifact_Q2, /* I interp. factor, weight on 2nd vector */ 40 | const opus_int d /* I number of parameters */ 41 | ) 42 | { 43 | opus_int i; 44 | 45 | celt_assert( ifact_Q2 >= 0 ); 46 | celt_assert( ifact_Q2 <= 4 ); 47 | 48 | for( i = 0; i < d; i++ ) { 49 | xi[ i ] = (opus_int16)silk_ADD_RSHIFT( x0[ i ], silk_SMULBB( x1[ i ] - x0[ i ], ifact_Q2 ), 2 ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /opus-1.3/silk/lin2log.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | /* Approximation of 128 * log2() (very close inverse of silk_log2lin()) */ 34 | /* Convert input to a log scale */ 35 | opus_int32 silk_lin2log( 36 | const opus_int32 inLin /* I input in linear scale */ 37 | ) 38 | { 39 | opus_int32 lz, frac_Q7; 40 | 41 | silk_CLZ_FRAC( inLin, &lz, &frac_Q7 ); 42 | 43 | /* Piece-wise parabolic approximation */ 44 | return silk_ADD_LSHIFT32( silk_SMLAWB( frac_Q7, silk_MUL( frac_Q7, 128 - frac_Q7 ), 179 ), 31 - lz, 7 ); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /opus-1.3/silk/log2lin.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | 34 | /* Approximation of 2^() (very close inverse of silk_lin2log()) */ 35 | /* Convert input to a linear scale */ 36 | opus_int32 silk_log2lin( 37 | const opus_int32 inLog_Q7 /* I input on log scale */ 38 | ) 39 | { 40 | opus_int32 out, frac_Q7; 41 | 42 | if( inLog_Q7 < 0 ) { 43 | return 0; 44 | } else if ( inLog_Q7 >= 3967 ) { 45 | return silk_int32_MAX; 46 | } 47 | 48 | out = silk_LSHIFT( 1, silk_RSHIFT( inLog_Q7, 7 ) ); 49 | frac_Q7 = inLog_Q7 & 0x7F; 50 | if( inLog_Q7 < 2048 ) { 51 | /* Piece-wise parabolic approximation */ 52 | out = silk_ADD_RSHIFT32( out, silk_MUL( out, silk_SMLAWB( frac_Q7, silk_SMULBB( frac_Q7, 128 - frac_Q7 ), -174 ) ), 7 ); 53 | } else { 54 | /* Piece-wise parabolic approximation */ 55 | out = silk_MLA( out, silk_RSHIFT( out, 7 ), silk_SMLAWB( frac_Q7, silk_SMULBB( frac_Q7, 128 - frac_Q7 ), -174 ) ); 56 | } 57 | return out; 58 | } 59 | -------------------------------------------------------------------------------- /opus-1.3/silk/mips/sigproc_fix_mipsr1.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifndef SILK_SIGPROC_FIX_MIPSR1_H 29 | #define SILK_SIGPROC_FIX_MIPSR1_H 30 | 31 | #undef silk_SAT16 32 | static inline short int silk_SAT16(int a) 33 | { 34 | int c; 35 | c = __builtin_mips_shll_s_w(a, 16); 36 | c = c>>16; 37 | 38 | return c; 39 | } 40 | 41 | #undef silk_LSHIFT_SAT32 42 | static inline int silk_LSHIFT_SAT32(int a, int shift) 43 | { 44 | int r; 45 | 46 | r = __builtin_mips_shll_s_w(a, shift); 47 | 48 | return r; 49 | } 50 | 51 | #undef silk_RSHIFT_ROUND 52 | static inline int silk_RSHIFT_ROUND(int a, int shift) 53 | { 54 | int r; 55 | 56 | r = __builtin_mips_shra_r_w(a, shift); 57 | return r; 58 | } 59 | 60 | #endif /* SILK_SIGPROC_FIX_MIPSR1_H */ 61 | -------------------------------------------------------------------------------- /opus-1.3/silk/resampler_private_AR2.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | #include "resampler_private.h" 34 | 35 | /* Second order AR filter with single delay elements */ 36 | void silk_resampler_private_AR2( 37 | opus_int32 S[], /* I/O State vector [ 2 ] */ 38 | opus_int32 out_Q8[], /* O Output signal */ 39 | const opus_int16 in[], /* I Input signal */ 40 | const opus_int16 A_Q14[], /* I AR coefficients, Q14 */ 41 | opus_int32 len /* I Signal length */ 42 | ) 43 | { 44 | opus_int32 k; 45 | opus_int32 out32; 46 | 47 | for( k = 0; k < len; k++ ) { 48 | out32 = silk_ADD_LSHIFT32( S[ 0 ], (opus_int32)in[ k ], 8 ); 49 | out_Q8[ k ] = out32; 50 | out32 = silk_LSHIFT( out32, 2 ); 51 | S[ 0 ] = silk_SMLAWB( S[ 1 ], out32, A_Q14[ 0 ] ); 52 | S[ 1 ] = silk_SMULWB( out32, A_Q14[ 1 ] ); 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /opus-1.3/silk/resampler_structs.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifndef SILK_RESAMPLER_STRUCTS_H 29 | #define SILK_RESAMPLER_STRUCTS_H 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #define SILK_RESAMPLER_MAX_FIR_ORDER 36 36 | #define SILK_RESAMPLER_MAX_IIR_ORDER 6 37 | 38 | typedef struct _silk_resampler_state_struct{ 39 | opus_int32 sIIR[ SILK_RESAMPLER_MAX_IIR_ORDER ]; /* this must be the first element of this struct */ 40 | union{ 41 | opus_int32 i32[ SILK_RESAMPLER_MAX_FIR_ORDER ]; 42 | opus_int16 i16[ SILK_RESAMPLER_MAX_FIR_ORDER ]; 43 | } sFIR; 44 | opus_int16 delayBuf[ 48 ]; 45 | opus_int resampler_function; 46 | opus_int batchSize; 47 | opus_int32 invRatio_Q16; 48 | opus_int FIR_Order; 49 | opus_int FIR_Fracs; 50 | opus_int Fs_in_kHz; 51 | opus_int Fs_out_kHz; 52 | opus_int inputDelay; 53 | const opus_int16 *Coefs; 54 | } silk_resampler_state_struct; 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #endif /* SILK_RESAMPLER_STRUCTS_H */ 60 | 61 | -------------------------------------------------------------------------------- /opus-1.3/silk/stereo_encode_pred.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "main.h" 33 | 34 | /* Entropy code the mid/side quantization indices */ 35 | void silk_stereo_encode_pred( 36 | ec_enc *psRangeEnc, /* I/O Compressor data structure */ 37 | opus_int8 ix[ 2 ][ 3 ] /* I Quantization indices */ 38 | ) 39 | { 40 | opus_int n; 41 | 42 | /* Entropy coding */ 43 | n = 5 * ix[ 0 ][ 2 ] + ix[ 1 ][ 2 ]; 44 | celt_assert( n < 25 ); 45 | ec_enc_icdf( psRangeEnc, n, silk_stereo_pred_joint_iCDF, 8 ); 46 | for( n = 0; n < 2; n++ ) { 47 | celt_assert( ix[ n ][ 0 ] < 3 ); 48 | celt_assert( ix[ n ][ 1 ] < STEREO_QUANT_SUB_STEPS ); 49 | ec_enc_icdf( psRangeEnc, ix[ n ][ 0 ], silk_uniform3_iCDF, 8 ); 50 | ec_enc_icdf( psRangeEnc, ix[ n ][ 1 ], silk_uniform5_iCDF, 8 ); 51 | } 52 | } 53 | 54 | /* Entropy code the mid-only flag */ 55 | void silk_stereo_encode_mid_only( 56 | ec_enc *psRangeEnc, /* I/O Compressor data structure */ 57 | opus_int8 mid_only_flag 58 | ) 59 | { 60 | /* Encode flag that only mid channel is coded */ 61 | ec_enc_icdf( psRangeEnc, mid_only_flag, silk_stereo_only_code_mid_iCDF, 8 ); 62 | } 63 | -------------------------------------------------------------------------------- /opus-1.3/silk/tables_gain.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "tables.h" 33 | 34 | #ifdef __cplusplus 35 | extern "C" 36 | { 37 | #endif 38 | 39 | const opus_uint8 silk_gain_iCDF[ 3 ][ N_LEVELS_QGAIN / 8 ] = 40 | { 41 | { 42 | 224, 112, 44, 15, 3, 2, 1, 0 43 | }, 44 | { 45 | 254, 237, 192, 132, 70, 23, 4, 0 46 | }, 47 | { 48 | 255, 252, 226, 155, 61, 11, 2, 0 49 | } 50 | }; 51 | 52 | const opus_uint8 silk_delta_gain_iCDF[ MAX_DELTA_GAIN_QUANT - MIN_DELTA_GAIN_QUANT + 1 ] = { 53 | 250, 245, 234, 203, 71, 50, 42, 38, 54 | 35, 33, 31, 29, 28, 27, 26, 25, 55 | 24, 23, 22, 21, 20, 19, 18, 17, 56 | 16, 15, 14, 13, 12, 11, 10, 9, 57 | 8, 7, 6, 5, 4, 3, 2, 1, 58 | 0 59 | }; 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | -------------------------------------------------------------------------------- /opus-1.3/silk_headers.mk: -------------------------------------------------------------------------------- 1 | SILK_HEAD = \ 2 | silk/debug.h \ 3 | silk/control.h \ 4 | silk/errors.h \ 5 | silk/API.h \ 6 | silk/typedef.h \ 7 | silk/define.h \ 8 | silk/main.h \ 9 | silk/x86/main_sse.h \ 10 | silk/PLC.h \ 11 | silk/structs.h \ 12 | silk/tables.h \ 13 | silk/tuning_parameters.h \ 14 | silk/Inlines.h \ 15 | silk/MacroCount.h \ 16 | silk/MacroDebug.h \ 17 | silk/macros.h \ 18 | silk/NSQ.h \ 19 | silk/pitch_est_defines.h \ 20 | silk/resampler_private.h \ 21 | silk/resampler_rom.h \ 22 | silk/resampler_structs.h \ 23 | silk/SigProc_FIX.h \ 24 | silk/x86/SigProc_FIX_sse.h \ 25 | silk/arm/biquad_alt_arm.h \ 26 | silk/arm/LPC_inv_pred_gain_arm.h \ 27 | silk/arm/macros_armv4.h \ 28 | silk/arm/macros_armv5e.h \ 29 | silk/arm/macros_arm64.h \ 30 | silk/arm/SigProc_FIX_armv4.h \ 31 | silk/arm/SigProc_FIX_armv5e.h \ 32 | silk/arm/NSQ_del_dec_arm.h \ 33 | silk/arm/NSQ_neon.h \ 34 | silk/fixed/main_FIX.h \ 35 | silk/fixed/structs_FIX.h \ 36 | silk/fixed/arm/warped_autocorrelation_FIX_arm.h \ 37 | silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h \ 38 | silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h \ 39 | silk/float/main_FLP.h \ 40 | silk/float/structs_FLP.h \ 41 | silk/float/SigProc_FLP.h \ 42 | silk/mips/macros_mipsr1.h \ 43 | silk/mips/NSQ_del_dec_mipsr1.h \ 44 | silk/mips/sigproc_fix_mipsr1.h 45 | -------------------------------------------------------------------------------- /opus-1.3/src/mlp.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2017 Jean-Marc Valin */ 2 | /* 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 18 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef _MLP_H_ 28 | #define _MLP_H_ 29 | 30 | #include "opus_types.h" 31 | 32 | #define WEIGHTS_SCALE (1.f/128) 33 | 34 | #define MAX_NEURONS 32 35 | 36 | typedef struct { 37 | const opus_int8 *bias; 38 | const opus_int8 *input_weights; 39 | int nb_inputs; 40 | int nb_neurons; 41 | int sigmoid; 42 | } DenseLayer; 43 | 44 | typedef struct { 45 | const opus_int8 *bias; 46 | const opus_int8 *input_weights; 47 | const opus_int8 *recurrent_weights; 48 | int nb_inputs; 49 | int nb_neurons; 50 | } GRULayer; 51 | 52 | extern const DenseLayer layer0; 53 | extern const GRULayer layer1; 54 | extern const DenseLayer layer2; 55 | 56 | void compute_dense(const DenseLayer *layer, float *output, const float *input); 57 | 58 | void compute_gru(const GRULayer *gru, float *state, const float *input); 59 | 60 | #endif /* _MLP_H_ */ 61 | -------------------------------------------------------------------------------- /opus-1.3/src/opus_multistream.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Xiph.Org Foundation 2 | Written by Jean-Marc Valin */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "opus_multistream.h" 33 | #include "opus.h" 34 | #include "opus_private.h" 35 | #include "stack_alloc.h" 36 | #include 37 | #include "float_cast.h" 38 | #include "os_support.h" 39 | 40 | 41 | int validate_layout(const ChannelLayout *layout) 42 | { 43 | int i, max_channel; 44 | 45 | max_channel = layout->nb_streams+layout->nb_coupled_streams; 46 | if (max_channel>255) 47 | return 0; 48 | for (i=0;inb_channels;i++) 49 | { 50 | if (layout->mapping[i] >= max_channel && layout->mapping[i] != 255) 51 | return 0; 52 | } 53 | return 1; 54 | } 55 | 56 | 57 | int get_left_channel(const ChannelLayout *layout, int stream_id, int prev) 58 | { 59 | int i; 60 | i = (prev<0) ? 0 : prev+1; 61 | for (;inb_channels;i++) 62 | { 63 | if (layout->mapping[i]==stream_id*2) 64 | return i; 65 | } 66 | return -1; 67 | } 68 | 69 | int get_right_channel(const ChannelLayout *layout, int stream_id, int prev) 70 | { 71 | int i; 72 | i = (prev<0) ? 0 : prev+1; 73 | for (;inb_channels;i++) 74 | { 75 | if (layout->mapping[i]==stream_id*2+1) 76 | return i; 77 | } 78 | return -1; 79 | } 80 | 81 | int get_mono_channel(const ChannelLayout *layout, int stream_id, int prev) 82 | { 83 | int i; 84 | i = (prev<0) ? 0 : prev+1; 85 | for (;inb_channels;i++) 86 | { 87 | if (layout->mapping[i]==stream_id+layout->nb_coupled_streams) 88 | return i; 89 | } 90 | return -1; 91 | } 92 | 93 | -------------------------------------------------------------------------------- /opus-1.3/src/tansig_table.h: -------------------------------------------------------------------------------- 1 | /* This file is auto-generated by gen_tables */ 2 | 3 | static const float tansig_table[201] = { 4 | 0.000000f, 0.039979f, 0.079830f, 0.119427f, 0.158649f, 5 | 0.197375f, 0.235496f, 0.272905f, 0.309507f, 0.345214f, 6 | 0.379949f, 0.413644f, 0.446244f, 0.477700f, 0.507977f, 7 | 0.537050f, 0.564900f, 0.591519f, 0.616909f, 0.641077f, 8 | 0.664037f, 0.685809f, 0.706419f, 0.725897f, 0.744277f, 9 | 0.761594f, 0.777888f, 0.793199f, 0.807569f, 0.821040f, 10 | 0.833655f, 0.845456f, 0.856485f, 0.866784f, 0.876393f, 11 | 0.885352f, 0.893698f, 0.901468f, 0.908698f, 0.915420f, 12 | 0.921669f, 0.927473f, 0.932862f, 0.937863f, 0.942503f, 13 | 0.946806f, 0.950795f, 0.954492f, 0.957917f, 0.961090f, 14 | 0.964028f, 0.966747f, 0.969265f, 0.971594f, 0.973749f, 15 | 0.975743f, 0.977587f, 0.979293f, 0.980869f, 0.982327f, 16 | 0.983675f, 0.984921f, 0.986072f, 0.987136f, 0.988119f, 17 | 0.989027f, 0.989867f, 0.990642f, 0.991359f, 0.992020f, 18 | 0.992631f, 0.993196f, 0.993718f, 0.994199f, 0.994644f, 19 | 0.995055f, 0.995434f, 0.995784f, 0.996108f, 0.996407f, 20 | 0.996682f, 0.996937f, 0.997172f, 0.997389f, 0.997590f, 21 | 0.997775f, 0.997946f, 0.998104f, 0.998249f, 0.998384f, 22 | 0.998508f, 0.998623f, 0.998728f, 0.998826f, 0.998916f, 23 | 0.999000f, 0.999076f, 0.999147f, 0.999213f, 0.999273f, 24 | 0.999329f, 0.999381f, 0.999428f, 0.999472f, 0.999513f, 25 | 0.999550f, 0.999585f, 0.999617f, 0.999646f, 0.999673f, 26 | 0.999699f, 0.999722f, 0.999743f, 0.999763f, 0.999781f, 27 | 0.999798f, 0.999813f, 0.999828f, 0.999841f, 0.999853f, 28 | 0.999865f, 0.999875f, 0.999885f, 0.999893f, 0.999902f, 29 | 0.999909f, 0.999916f, 0.999923f, 0.999929f, 0.999934f, 30 | 0.999939f, 0.999944f, 0.999948f, 0.999952f, 0.999956f, 31 | 0.999959f, 0.999962f, 0.999965f, 0.999968f, 0.999970f, 32 | 0.999973f, 0.999975f, 0.999977f, 0.999978f, 0.999980f, 33 | 0.999982f, 0.999983f, 0.999984f, 0.999986f, 0.999987f, 34 | 0.999988f, 0.999989f, 0.999990f, 0.999990f, 0.999991f, 35 | 0.999992f, 0.999992f, 0.999993f, 0.999994f, 0.999994f, 36 | 0.999994f, 0.999995f, 0.999995f, 0.999996f, 0.999996f, 37 | 0.999996f, 0.999997f, 0.999997f, 0.999997f, 0.999997f, 38 | 0.999997f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 39 | 0.999998f, 0.999998f, 0.999999f, 0.999999f, 0.999999f, 40 | 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 41 | 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 42 | 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 43 | 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 44 | 1.000000f, 45 | }; 46 | -------------------------------------------------------------------------------- /opus-1.3/tests/test_opus_padding.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Xiph.Org Foundation 2 | Written by Jüri Aedla and Ralph Giles */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | /* Check for overflow in reading the padding length. 29 | * http://lists.xiph.org/pipermail/opus/2012-November/001834.html 30 | */ 31 | 32 | #include 33 | #include 34 | #include 35 | #include "opus.h" 36 | #include "test_opus_common.h" 37 | 38 | #define PACKETSIZE 16909318 39 | #define CHANNELS 2 40 | #define FRAMESIZE 5760 41 | 42 | int test_overflow(void) 43 | { 44 | OpusDecoder *decoder; 45 | int result; 46 | int error; 47 | 48 | unsigned char *in = malloc(PACKETSIZE); 49 | opus_int16 *out = malloc(FRAMESIZE*CHANNELS*sizeof(*out)); 50 | 51 | fprintf(stderr, " Checking for padding overflow... "); 52 | if (!in || !out) { 53 | fprintf(stderr, "FAIL (out of memory)\n"); 54 | return -1; 55 | } 56 | in[0] = 0xff; 57 | in[1] = 0x41; 58 | memset(in + 2, 0xff, PACKETSIZE - 3); 59 | in[PACKETSIZE-1] = 0x0b; 60 | 61 | decoder = opus_decoder_create(48000, CHANNELS, &error); 62 | result = opus_decode(decoder, in, PACKETSIZE, out, FRAMESIZE, 0); 63 | opus_decoder_destroy(decoder); 64 | 65 | free(in); 66 | free(out); 67 | 68 | if (result != OPUS_INVALID_PACKET) { 69 | fprintf(stderr, "FAIL!\n"); 70 | test_failed(); 71 | } 72 | 73 | fprintf(stderr, "OK.\n"); 74 | 75 | return 1; 76 | } 77 | 78 | int main(void) 79 | { 80 | const char *oversion; 81 | int tests = 0;; 82 | 83 | iseed = 0; 84 | oversion = opus_get_version_string(); 85 | if (!oversion) test_failed(); 86 | fprintf(stderr, "Testing %s padding.\n", oversion); 87 | 88 | tests += test_overflow(); 89 | 90 | fprintf(stderr, "All padding tests passed.\n"); 91 | 92 | return 0; 93 | } 94 | -------------------------------------------------------------------------------- /opus-1.3/win32/VS2015/opus_demo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /opus-1.3/win32/VS2015/test_opus_api.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /opus-1.3/win32/VS2015/test_opus_decode.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4a0dd677-931f-4728-afe5-b761149fc7eb} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /opus-1.3/win32/VS2015/test_opus_encode.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {546c8d9a-103e-4f78-972b-b44e8d3c8aba} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | Source Files 15 | 16 | 17 | -------------------------------------------------------------------------------- /opus-1.3/win32/config.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifndef CONFIG_H 29 | #define CONFIG_H 30 | 31 | #define USE_ALLOCA 1 32 | 33 | /* Comment out the next line for floating-point code */ 34 | /*#define FIXED_POINT 1 */ 35 | 36 | #define OPUS_BUILD 1 37 | 38 | #if defined(_M_IX86) || defined(_M_X64) 39 | /* Can always compile SSE intrinsics (no special compiler flags necessary) */ 40 | #define OPUS_X86_MAY_HAVE_SSE 41 | #define OPUS_X86_MAY_HAVE_SSE2 42 | #define OPUS_X86_MAY_HAVE_SSE4_1 43 | 44 | /* Presume SSE functions, if compiled to use SSE/SSE2/AVX (note that AMD64 implies SSE2, and AVX 45 | implies SSE4.1) */ 46 | #if defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 1)) || defined(__AVX__) 47 | #define OPUS_X86_PRESUME_SSE 1 48 | #endif 49 | #if defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__AVX__) 50 | #define OPUS_X86_PRESUME_SSE2 1 51 | #endif 52 | #if defined(__AVX__) 53 | #define OPUS_X86_PRESUME_SSE4_1 1 54 | #endif 55 | 56 | #if !defined(OPUS_X86_PRESUME_SSE4_1) || !defined(OPUS_X86_PRESUME_SSE2) || !defined(OPUS_X86_PRESUME_SSE) 57 | #define OPUS_HAVE_RTCD 1 58 | #endif 59 | 60 | #endif 61 | 62 | #include "version.h" 63 | 64 | #endif /* CONFIG_H */ 65 | -------------------------------------------------------------------------------- /opus-1.3/win32/genversion.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal enableextensions enabledelayedexpansion 4 | 5 | for /f %%v in ('cd "%~dp0.." ^&^& git status ^>NUL 2^>NUL ^&^& git describe --tags --match "v*" --dirty 2^>NUL') do set version=%%v 6 | 7 | if not "%version%"=="" set version=!version:~1! && goto :gotversion 8 | 9 | if exist "%~dp0..\package_version" goto :getversion 10 | 11 | echo Git cannot be found, nor can package_version. Generating unknown version. 12 | 13 | set version=unknown 14 | 15 | goto :gotversion 16 | 17 | :getversion 18 | 19 | for /f "delims== tokens=2" %%v in (%~dps0..\package_version) do set version=%%v 20 | set version=!version:"=! 21 | 22 | :gotversion 23 | 24 | set version=!version: =! 25 | set version_out=#define %~2 "%version%" 26 | 27 | echo %version_out%> "%~1_temp" 28 | 29 | echo n | comp "%~1_temp" "%~1" > NUL 2> NUL 30 | 31 | if not errorlevel 1 goto exit 32 | 33 | copy /y "%~1_temp" "%~1" 34 | 35 | :exit 36 | 37 | del "%~1_temp" 38 | --------------------------------------------------------------------------------