From 995dcb610cd5c28bfa0007fd566a619ad512abf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 12 Oct 2016 20:37:38 +0200 Subject: [PATCH] ogg/vorbis/opus/speex: Make them modules and unbundle thirdparty libs Took the opportunity to undo the Godot changed made to the opus source. The opus module should eventually be built in its own environment to avoid polluting others with too many include dirs and defines. TODO: Fix the platform/ stuff for opus. (cherry picked from commit d9a291f6411f2e571c181da0ac89f550ba73f681) speex module was only added while cherry-picking, as speex is removed in the master branch but we don't want to break compatibility in 2.1.x. Unbundling wasn't done as the module uses the internal speex_free, so it would require some more work. --- SConstruct | 17 +- drivers/SCsub | 9 - drivers/ogg/SCsub | 9 - drivers/opus/SCsub | 196 --------- drivers/register_driver_types.cpp | 73 ---- drivers/speex/SCsub | 55 --- drivers/vorbis/SCsub | 36 -- modules/ogg/SCsub | 20 + modules/ogg/config.py | 6 + modules/ogg/register_types.cpp | 35 ++ modules/ogg/register_types.h | 30 ++ modules/opus/SCsub | 211 ++++++++++ .../opus/audio_stream_opus.cpp | 0 {drivers => modules}/opus/audio_stream_opus.h | 8 +- modules/opus/config.py | 6 + modules/opus/register_types.cpp | 45 +++ modules/opus/register_types.h | 30 ++ modules/speex/SCsub | 66 +++ .../speex/audio_stream_speex.cpp | 0 .../speex/audio_stream_speex.h | 5 +- modules/speex/config.py | 6 + modules/speex/register_types.cpp | 45 +++ modules/speex/register_types.h | 30 ++ modules/vorbis/SCsub | 44 ++ .../vorbis/audio_stream_ogg_vorbis.cpp | 0 .../vorbis/audio_stream_ogg_vorbis.h | 6 +- modules/vorbis/config.py | 6 + modules/vorbis/register_types.cpp | 45 +++ modules/vorbis/register_types.h | 30 ++ platform/android/detect.py | 3 +- platform/iphone/detect.py | 3 +- platform/javascript/detect.py | 7 +- platform/x11/detect.py | 11 + thirdparty/README.md | 47 +++ {drivers/ogg => thirdparty/libogg}/COPYING | 0 {drivers/ogg => thirdparty/libogg}/bitwise.c | 0 {drivers/ogg => thirdparty/libogg}/framing.c | 0 .../libogg}/ogg/config_types.h | 0 {drivers => thirdparty/libogg}/ogg/ogg.h | 0 {drivers => thirdparty/libogg}/ogg/os_types.h | 0 .../vorbis => thirdparty/libvorbis}/COPYING | 0 .../libvorbis}/analysis.c | 0 .../libvorbis}/backends.h | 0 .../vorbis => thirdparty/libvorbis}/barkmel.c | 0 .../vorbis => thirdparty/libvorbis}/bitrate.c | 0 .../vorbis => thirdparty/libvorbis}/bitrate.h | 0 .../vorbis => thirdparty/libvorbis}/block.c | 0 .../libvorbis}/books/coupled/res_books_51.h | 0 .../books/coupled/res_books_stereo.h | 0 .../libvorbis}/books/floor/floor_books.h | 0 .../books/uncoupled/res_books_uncoupled.h | 0 .../libvorbis}/codebook.c | 0 .../libvorbis}/codebook.h | 0 .../libvorbis}/codec_internal.h | 0 .../libvorbis}/envelope.c | 0 .../libvorbis}/envelope.h | 0 .../vorbis => thirdparty/libvorbis}/floor0.c | 0 .../vorbis => thirdparty/libvorbis}/floor1.c | 0 .../libvorbis}/highlevel.h | 0 .../vorbis => thirdparty/libvorbis}/info.c | 0 .../vorbis => thirdparty/libvorbis}/lookup.c | 0 .../vorbis => thirdparty/libvorbis}/lookup.h | 0 .../libvorbis}/lookup_data.h | 0 .../vorbis => thirdparty/libvorbis}/lpc.c | 0 .../vorbis => thirdparty/libvorbis}/lpc.h | 0 .../vorbis => thirdparty/libvorbis}/lsp.c | 0 .../vorbis => thirdparty/libvorbis}/lsp.h | 0 .../libvorbis}/mapping0.c | 0 .../vorbis => thirdparty/libvorbis}/masking.h | 0 .../vorbis => thirdparty/libvorbis}/mdct.c | 0 .../vorbis => thirdparty/libvorbis}/mdct.h | 0 .../vorbis => thirdparty/libvorbis}/misc.h | 0 .../libvorbis}/modes/floor_all.h | 0 .../libvorbis}/modes/psych_11.h | 0 .../libvorbis}/modes/psych_16.h | 0 .../libvorbis}/modes/psych_44.h | 0 .../libvorbis}/modes/psych_8.h | 0 .../libvorbis}/modes/residue_16.h | 0 .../libvorbis}/modes/residue_44.h | 0 .../libvorbis}/modes/residue_44p51.h | 0 .../libvorbis}/modes/residue_44u.h | 0 .../libvorbis}/modes/residue_8.h | 0 .../libvorbis}/modes/setup_11.h | 0 .../libvorbis}/modes/setup_16.h | 0 .../libvorbis}/modes/setup_22.h | 0 .../libvorbis}/modes/setup_32.h | 0 .../libvorbis}/modes/setup_44.h | 0 .../libvorbis}/modes/setup_44p51.h | 0 .../libvorbis}/modes/setup_44u.h | 0 .../libvorbis}/modes/setup_8.h | 0 .../libvorbis}/modes/setup_X.h | 0 {drivers/vorbis => thirdparty/libvorbis}/os.h | 0 .../vorbis => thirdparty/libvorbis}/psy.c | 0 .../vorbis => thirdparty/libvorbis}/psy.h | 0 .../vorbis => thirdparty/libvorbis}/psytune.c | 0 .../libvorbis}/registry.c | 0 .../libvorbis}/registry.h | 0 .../vorbis => thirdparty/libvorbis}/res0.c | 0 .../vorbis => thirdparty/libvorbis}/scales.h | 0 .../libvorbis}/sharedbook.c | 0 .../vorbis => thirdparty/libvorbis}/smallft.c | 0 .../vorbis => thirdparty/libvorbis}/smallft.h | 0 .../libvorbis}/synthesis.c | 0 .../vorbis => thirdparty/libvorbis}/tone.c | 0 .../libvorbis}/vorbis/codec.h | 0 .../libvorbis}/vorbis/vorbisenc.h | 0 .../libvorbis}/vorbis/vorbisfile.h | 0 .../libvorbis}/vorbisenc.c | 0 .../libvorbis}/vorbisfile.c | 0 .../vorbis => thirdparty/libvorbis}/window.c | 0 .../vorbis => thirdparty/libvorbis}/window.h | 0 {drivers => thirdparty}/opus/COPYING | 0 {drivers => thirdparty}/opus/analysis.c | 29 +- {drivers => thirdparty}/opus/analysis.h | 4 +- .../opus/celt/_kiss_fft_guts.h | 14 +- {drivers => thirdparty}/opus/celt/arch.h | 16 +- .../opus/celt/arm/arm2gnu.pl | 0 .../opus/celt/arm/arm_celt_map.c | 11 +- .../opus/celt/arm/armcpu.c | 13 +- .../opus/celt/arm/armcpu.h | 0 .../opus/celt/arm/armopts.s.in | 0 .../opus/celt/arm/celt_ne10_fft.c | 10 +- .../opus/celt/arm/celt_ne10_mdct.c | 12 +- .../opus/celt/arm/celt_neon_intr.c | 7 +- .../opus/celt/arm/celt_pitch_xcorr_arm-gnu.S | 0 .../opus/celt/arm/celt_pitch_xcorr_arm.s | 0 .../opus/celt/arm/fft_arm.h | 4 +- thirdparty/opus/celt/arm/fixed_arm64.h | 35 ++ .../opus/celt/arm/fixed_armv4.h | 0 .../opus/celt/arm/fixed_armv5e.h | 2 +- .../opus/celt/arm/kiss_fft_armv4.h | 2 +- .../opus/celt/arm/kiss_fft_armv5e.h | 2 +- .../opus/celt/arm/mdct_arm.h | 4 +- .../opus/celt/arm/pitch_arm.h | 2 +- {drivers => thirdparty}/opus/celt/bands.c | 49 +-- {drivers => thirdparty}/opus/celt/bands.h | 10 +- {drivers => thirdparty}/opus/celt/celt.c | 37 +- {drivers => thirdparty}/opus/celt/celt.h | 12 +- .../opus/celt/celt_decoder.c | 51 +-- .../opus/celt/celt_encoder.c | 63 +-- {drivers => thirdparty}/opus/celt/celt_lpc.c | 23 +- {drivers => thirdparty}/opus/celt/celt_lpc.h | 6 +- .../opus/celt/cpu_support.h | 8 +- {drivers => thirdparty}/opus/celt/cwrs.c | 13 +- {drivers => thirdparty}/opus/celt/cwrs.h | 8 +- {drivers => thirdparty}/opus/celt/ecintrin.h | 4 +- {drivers => thirdparty}/opus/celt/entcode.c | 9 +- {drivers => thirdparty}/opus/celt/entcode.h | 6 +- {drivers => thirdparty}/opus/celt/entdec.c | 13 +- {drivers => thirdparty}/opus/celt/entdec.h | 2 +- {drivers => thirdparty}/opus/celt/entenc.c | 13 +- {drivers => thirdparty}/opus/celt/entenc.h | 2 +- .../opus/celt/fixed_debug.h | 2 +- .../opus/celt/fixed_generic.h | 2 +- .../opus/celt/float_cast.h | 2 +- {drivers => thirdparty}/opus/celt/kiss_fft.c | 24 +- {drivers => thirdparty}/opus/celt/kiss_fft.h | 12 +- {drivers => thirdparty}/opus/celt/laplace.c | 9 +- {drivers => thirdparty}/opus/celt/laplace.h | 4 +- {drivers => thirdparty}/opus/celt/mathops.c | 9 +- {drivers => thirdparty}/opus/celt/mathops.h | 14 +- {drivers => thirdparty}/opus/celt/mdct.c | 20 +- {drivers => thirdparty}/opus/celt/mdct.h | 8 +- {drivers => thirdparty}/opus/celt/mfrngcod.h | 2 +- .../opus/celt/mips/celt_mipsr1.h | 33 +- .../opus/celt/mips/fixed_generic_mipsr1.h | 0 .../opus/celt/mips/kiss_fft_mipsr1.h | 4 +- .../opus/celt/mips/mdct_mipsr1.h | 18 +- .../opus/celt/mips/pitch_mipsr1.h | 0 .../opus/celt/mips/vq_mipsr1.h | 13 +- {drivers => thirdparty}/opus/celt/modes.c | 27 +- {drivers => thirdparty}/opus/celt/modes.h | 12 +- .../opus/celt/opus_custom_demo.c | 9 +- .../opus/celt/os_support.h | 4 +- {drivers => thirdparty}/opus/celt/pitch.c | 65 +-- {drivers => thirdparty}/opus/celt/pitch.h | 14 +- .../opus/celt/quant_bands.c | 41 +- .../opus/celt/quant_bands.h | 12 +- {drivers => thirdparty}/opus/celt/rate.c | 17 +- {drivers => thirdparty}/opus/celt/rate.h | 4 +- .../opus/celt/stack_alloc.h | 6 +- .../opus/celt/static_modes_fixed.h | 6 +- .../opus/celt/static_modes_fixed_arm_ne10.h | 0 .../opus/celt/static_modes_float.h | 6 +- .../opus/celt/static_modes_float_arm_ne10.h | 0 thirdparty/opus/celt/tests/test_unit_cwrs32.c | 161 ++++++++ thirdparty/opus/celt/tests/test_unit_dft.c | 189 +++++++++ .../opus/celt/tests/test_unit_entropy.c | 382 ++++++++++++++++++ .../opus/celt/tests/test_unit_laplace.c | 93 +++++ .../opus/celt/tests/test_unit_mathops.c | 304 ++++++++++++++ thirdparty/opus/celt/tests/test_unit_mdct.c | 230 +++++++++++ .../opus/celt/tests/test_unit_rotation.c | 120 ++++++ thirdparty/opus/celt/tests/test_unit_types.c | 50 +++ {drivers => thirdparty}/opus/celt/vq.c | 41 +- {drivers => thirdparty}/opus/celt/vq.h | 8 +- .../opus/celt/x86/celt_lpc_sse.c | 15 +- .../opus/celt/x86/celt_lpc_sse.h | 5 +- .../opus/celt/x86/pitch_sse.c | 17 +- .../opus/celt/x86/pitch_sse.h | 5 +- .../opus/celt/x86/pitch_sse2.c | 15 +- .../opus/celt/x86/pitch_sse4_1.c | 17 +- .../opus/celt/x86/x86_celt_map.c | 13 +- .../opus/celt/x86/x86cpu.c | 15 +- .../opus/celt/x86/x86cpu.h | 0 .../opus_config.h => thirdparty/opus/config.h | 0 {drivers => thirdparty}/opus/http.c | 8 +- {drivers => thirdparty}/opus/info.c | 6 +- {drivers => thirdparty}/opus/internal.c | 6 +- {drivers => thirdparty}/opus/internal.h | 2 +- {drivers => thirdparty}/opus/mlp.c | 17 +- {drivers => thirdparty}/opus/mlp.h | 2 +- {drivers => thirdparty}/opus/mlp_data.c | 7 +- {drivers => thirdparty}/opus/opus.c | 9 +- {drivers => thirdparty}/opus/opus.h | 4 +- {drivers => thirdparty}/opus/opus_compare.c | 0 {drivers => thirdparty}/opus/opus_custom.h | 2 +- {drivers => thirdparty}/opus/opus_decoder.c | 43 +- {drivers => thirdparty}/opus/opus_defines.h | 2 +- {drivers => thirdparty}/opus/opus_encoder.c | 67 +-- .../opus/opus_multistream.c | 17 +- .../opus/opus_multistream.h | 2 +- .../opus/opus_multistream_decoder.c | 19 +- .../opus/opus_multistream_encoder.c | 37 +- {drivers => thirdparty}/opus/opus_private.h | 6 +- {drivers => thirdparty}/opus/opus_types.h | 0 {drivers => thirdparty}/opus/opusfile.c | 8 +- {drivers => thirdparty}/opus/opusfile.h | 2 +- {drivers => thirdparty}/opus/repacketizer.c | 11 +- .../opus/repacketizer_demo.c | 7 +- {drivers => thirdparty}/opus/silk/A2NLSF.c | 9 +- {drivers => thirdparty}/opus/silk/API.h | 10 +- {drivers => thirdparty}/opus/silk/CNG.c | 9 +- .../opus/silk/HP_variable_cutoff.c | 15 +- {drivers => thirdparty}/opus/silk/Inlines.h | 0 .../opus/silk/LPC_analysis_filter.c | 13 +- .../opus/silk/LPC_inv_pred_gain.c | 9 +- .../opus/silk/LP_variable_cutoff.c | 7 +- .../opus/silk/MacroCount.h | 0 .../opus/silk/MacroDebug.h | 0 {drivers => thirdparty}/opus/silk/NLSF2A.c | 9 +- {drivers => thirdparty}/opus/silk/NLSF_VQ.c | 7 +- .../opus/silk/NLSF_VQ_weights_laroia.c | 9 +- .../opus/silk/NLSF_decode.c | 7 +- .../opus/silk/NLSF_del_dec_quant.c | 7 +- .../opus/silk/NLSF_encode.c | 9 +- .../opus/silk/NLSF_stabilize.c | 7 +- .../opus/silk/NLSF_unpack.c | 7 +- {drivers => thirdparty}/opus/silk/NSQ.c | 9 +- thirdparty/opus/silk/NSQ.h | 101 +++++ .../opus/silk/NSQ_del_dec.c | 11 +- {drivers => thirdparty}/opus/silk/PLC.c | 11 +- {drivers => thirdparty}/opus/silk/PLC.h | 2 +- .../opus/silk/SigProc_FIX.h | 22 +- {drivers => thirdparty}/opus/silk/VAD.c | 9 +- .../opus/silk/VQ_WMat_EC.c | 7 +- .../opus/silk/ana_filt_bank_1.c | 7 +- thirdparty/opus/silk/arm/NSQ_neon.c | 112 +++++ thirdparty/opus/silk/arm/NSQ_neon.h | 113 ++++++ .../opus/silk/arm/SigProc_FIX_armv4.h | 0 .../opus/silk/arm/SigProc_FIX_armv5e.h | 0 thirdparty/opus/silk/arm/arm_silk_map.c | 55 +++ thirdparty/opus/silk/arm/macros_arm64.h | 39 ++ .../opus/silk/arm/macros_armv4.h | 0 .../opus/silk/arm/macros_armv5e.h | 0 .../opus/silk/biquad_alt.c | 7 +- .../opus/silk/bwexpander.c | 7 +- .../opus/silk/bwexpander_32.c | 7 +- .../opus/silk/check_control_input.c | 11 +- .../opus/silk/code_signs.c | 7 +- {drivers => thirdparty}/opus/silk/control.h | 2 +- .../opus/silk/control_SNR.c | 9 +- .../opus/silk/control_audio_bandwidth.c | 9 +- .../opus/silk/control_codec.c | 23 +- {drivers => thirdparty}/opus/silk/debug.c | 9 +- {drivers => thirdparty}/opus/silk/debug.h | 2 +- {drivers => thirdparty}/opus/silk/dec_API.c | 13 +- .../opus/silk/decode_core.c | 9 +- .../opus/silk/decode_frame.c | 11 +- .../opus/silk/decode_indices.c | 7 +- .../opus/silk/decode_parameters.c | 7 +- .../opus/silk/decode_pitch.c | 9 +- .../opus/silk/decode_pulses.c | 7 +- .../opus/silk/decoder_set_fs.c | 7 +- {drivers => thirdparty}/opus/silk/define.h | 4 +- {drivers => thirdparty}/opus/silk/enc_API.c | 25 +- .../opus/silk/encode_indices.c | 7 +- .../opus/silk/encode_pulses.c | 9 +- {drivers => thirdparty}/opus/silk/errors.h | 0 .../opus/silk/fixed/LTP_analysis_filter_FIX.c | 7 +- .../opus/silk/fixed/LTP_scale_ctrl_FIX.c | 7 +- .../opus/silk/fixed/apply_sine_window_FIX.c | 7 +- .../opus/silk/fixed/autocorr_FIX.c | 9 +- .../opus/silk/fixed/burg_modified_FIX.c | 13 +- .../opus/silk/fixed/corrMatrix_FIX.c | 7 +- .../opus/silk/fixed/encode_frame_FIX.c | 11 +- .../opus/silk/fixed/find_LPC_FIX.c | 11 +- .../opus/silk/fixed/find_LTP_FIX.c | 9 +- .../opus/silk/fixed/find_pitch_lags_FIX.c | 11 +- .../opus/silk/fixed/find_pred_coefs_FIX.c | 9 +- .../opus/silk/fixed/k2a_FIX.c | 7 +- .../opus/silk/fixed/k2a_Q16_FIX.c | 7 +- .../opus/silk/fixed/main_FIX.h | 14 +- .../mips/noise_shape_analysis_FIX_mipsr1.h | 0 .../silk/fixed/mips/prefilter_FIX_mipsr1.h | 11 +- .../mips/warped_autocorrelation_FIX_mipsr1.h | 7 +- .../silk/fixed/noise_shape_analysis_FIX.c | 13 +- .../opus/silk/fixed/pitch_analysis_core_FIX.c | 15 +- .../opus/silk/fixed/prefilter_FIX.c | 13 +- .../opus/silk/fixed/process_gains_FIX.c | 9 +- .../silk/fixed/regularize_correlations_FIX.c | 7 +- .../opus/silk/fixed/residual_energy16_FIX.c | 7 +- .../opus/silk/fixed/residual_energy_FIX.c | 9 +- .../opus/silk/fixed/schur64_FIX.c | 7 +- .../opus/silk/fixed/schur_FIX.c | 7 +- .../opus/silk/fixed/solve_LS_FIX.c | 11 +- .../opus/silk/fixed/structs_FIX.h | 6 +- .../opus/silk/fixed/vector_ops_FIX.c | 11 +- .../silk/fixed/warped_autocorrelation_FIX.c | 9 +- .../silk/fixed/x86/burg_modified_FIX_sse.c | 15 +- .../opus/silk/fixed/x86/prefilter_FIX_sse.c | 9 +- .../opus/silk/fixed/x86/vector_ops_FIX_sse.c | 11 +- .../opus/silk/float/LPC_analysis_filter_FLP.c | 7 +- .../opus/silk/float/LPC_inv_pred_gain_FLP.c | 9 +- .../opus/silk/float/LTP_analysis_filter_FLP.c | 7 +- .../opus/silk/float/LTP_scale_ctrl_FLP.c | 7 +- .../opus/silk/float/SigProc_FLP.h | 4 +- .../opus/silk/float/apply_sine_window_FLP.c | 7 +- .../opus/silk/float/autocorrelation_FLP.c | 9 +- .../opus/silk/float/burg_modified_FLP.c | 11 +- .../opus/silk/float/bwexpander_FLP.c | 7 +- .../opus/silk/float/corrMatrix_FLP.c | 7 +- .../opus/silk/float/encode_frame_FLP.c | 9 +- .../opus/silk/float/energy_FLP.c | 7 +- .../opus/silk/float/find_LPC_FLP.c | 11 +- .../opus/silk/float/find_LTP_FLP.c | 9 +- .../opus/silk/float/find_pitch_lags_FLP.c | 9 +- .../opus/silk/float/find_pred_coefs_FLP.c | 7 +- .../opus/silk/float/inner_product_FLP.c | 7 +- .../opus/silk/float/k2a_FLP.c | 7 +- .../opus/silk/float/levinsondurbin_FLP.c | 7 +- .../opus/silk/float/main_FLP.h | 14 +- .../silk/float/noise_shape_analysis_FLP.c | 9 +- .../opus/silk/float/pitch_analysis_core_FLP.c | 13 +- .../opus/silk/float/prefilter_FLP.c | 9 +- .../opus/silk/float/process_gains_FLP.c | 9 +- .../silk/float/regularize_correlations_FLP.c | 7 +- .../opus/silk/float/residual_energy_FLP.c | 7 +- .../opus/silk/float/scale_copy_vector_FLP.c | 7 +- .../opus/silk/float/scale_vector_FLP.c | 7 +- .../opus/silk/float/schur_FLP.c | 7 +- .../opus/silk/float/solve_LS_FLP.c | 9 +- .../opus/silk/float/sort_FLP.c | 9 +- .../opus/silk/float/structs_FLP.h | 6 +- .../silk/float/warped_autocorrelation_FLP.c | 7 +- .../opus/silk/float/wrappers_FLP.c | 7 +- .../opus/silk/gain_quant.c | 7 +- .../opus/silk/init_decoder.c | 7 +- .../opus/silk/init_encoder.c | 17 +- .../opus/silk/inner_prod_aligned.c | 7 +- .../opus/silk/interpolate.c | 7 +- {drivers => thirdparty}/opus/silk/lin2log.c | 7 +- {drivers => thirdparty}/opus/silk/log2lin.c | 7 +- {drivers => thirdparty}/opus/silk/macros.h | 17 +- {drivers => thirdparty}/opus/silk/main.h | 20 +- .../opus/silk/mips/NSQ_del_dec_mipsr1.h | 9 +- .../opus/silk/mips/macros_mipsr1.h | 0 .../opus/silk/mips/sigproc_fix_mipsr1.h | 0 .../opus/silk/pitch_est_defines.h | 2 +- .../opus/silk/pitch_est_tables.c | 9 +- .../opus/silk/process_NLSFs.c | 7 +- .../opus/silk/quant_LTP_gains.c | 9 +- {drivers => thirdparty}/opus/silk/resampler.c | 7 +- .../opus/silk/resampler_down2.c | 9 +- .../opus/silk/resampler_down2_3.c | 11 +- .../opus/silk/resampler_private.h | 6 +- .../opus/silk/resampler_private_AR2.c | 9 +- .../opus/silk/resampler_private_IIR_FIR.c | 11 +- .../opus/silk/resampler_private_down_FIR.c | 11 +- .../opus/silk/resampler_private_up2_HQ.c | 9 +- .../opus/silk/resampler_rom.c | 7 +- .../opus/silk/resampler_rom.h | 4 +- .../opus/silk/resampler_structs.h | 0 .../opus/silk/shell_coder.c | 7 +- {drivers => thirdparty}/opus/silk/sigm_Q15.c | 7 +- {drivers => thirdparty}/opus/silk/sort.c | 9 +- .../opus/silk/stereo_LR_to_MS.c | 9 +- .../opus/silk/stereo_MS_to_LR.c | 7 +- .../opus/silk/stereo_decode_pred.c | 7 +- .../opus/silk/stereo_encode_pred.c | 7 +- .../opus/silk/stereo_find_predictor.c | 7 +- .../opus/silk/stereo_quant_pred.c | 7 +- {drivers => thirdparty}/opus/silk/structs.h | 10 +- .../opus/silk/sum_sqr_shift.c | 7 +- .../opus/silk/table_LSF_cos.c | 7 +- {drivers => thirdparty}/opus/silk/tables.h | 4 +- .../opus/silk/tables_LTP.c | 7 +- .../opus/silk/tables_NLSF_CB_NB_MB.c | 7 +- .../opus/silk/tables_NLSF_CB_WB.c | 7 +- .../opus/silk/tables_gain.c | 7 +- .../opus/silk/tables_other.c | 11 +- .../opus/silk/tables_pitch_lag.c | 7 +- .../opus/silk/tables_pulses_per_block.c | 7 +- .../opus/silk/tuning_parameters.h | 0 {drivers => thirdparty}/opus/silk/typedef.h | 6 +- .../opus/silk/x86/NSQ_del_dec_sse.c | 11 +- .../opus/silk/x86/NSQ_sse.c | 11 +- .../opus/silk/x86/SigProc_FIX_sse.h | 5 +- .../opus/silk/x86/VAD_sse.c | 9 +- .../opus/silk/x86/VQ_WMat_EC_sse.c | 9 +- .../opus/silk/x86/main_sse.h | 5 +- .../opus/silk/x86/x86_silk_map.c | 17 +- {drivers => thirdparty}/opus/stream.c | 6 +- {drivers => thirdparty}/opus/tansig_table.h | 0 {drivers => thirdparty}/opus/wincerts.c | 7 +- {drivers => thirdparty}/opus/winerrno.h | 0 thirdparty/speex/COPYING | 35 ++ .../speex/_kiss_fft_guts.h | 0 {drivers => thirdparty}/speex/arch.h | 0 {drivers => thirdparty}/speex/bits.c | 0 {drivers => thirdparty}/speex/buffer.c | 0 {drivers => thirdparty}/speex/cb_search.c | 0 {drivers => thirdparty}/speex/cb_search.h | 0 .../speex/cb_search_arm4.h | 0 .../speex/cb_search_bfin.h | 0 {drivers => thirdparty}/speex/cb_search_sse.h | 0 {drivers => thirdparty}/speex/config.h | 0 .../speex/echo_diagnostic.m | 0 .../speex/exc_10_16_table.c | 0 .../speex/exc_10_32_table.c | 0 .../speex/exc_20_32_table.c | 0 .../speex/exc_5_256_table.c | 0 .../speex/exc_5_64_table.c | 0 .../speex/exc_8_128_table.c | 0 {drivers => thirdparty}/speex/fftwrap.c | 0 {drivers => thirdparty}/speex/fftwrap.h | 0 {drivers => thirdparty}/speex/filterbank.c | 0 {drivers => thirdparty}/speex/filterbank.h | 0 {drivers => thirdparty}/speex/filters.c | 0 {drivers => thirdparty}/speex/filters.h | 0 {drivers => thirdparty}/speex/filters_arm4.h | 0 {drivers => thirdparty}/speex/filters_bfin.h | 0 {drivers => thirdparty}/speex/filters_sse.h | 0 {drivers => thirdparty}/speex/fixed_arm4.h | 0 {drivers => thirdparty}/speex/fixed_arm5e.h | 0 {drivers => thirdparty}/speex/fixed_bfin.h | 0 {drivers => thirdparty}/speex/fixed_debug.h | 0 {drivers => thirdparty}/speex/fixed_generic.h | 0 {drivers => thirdparty}/speex/gain_table.c | 0 .../speex/gain_table_lbr.c | 0 .../speex/hexc_10_32_table.c | 0 {drivers => thirdparty}/speex/hexc_table.c | 0 .../speex/high_lsp_tables.c | 0 {drivers => thirdparty}/speex/jitter.c | 0 {drivers => thirdparty}/speex/kiss_fft.c | 0 {drivers => thirdparty}/speex/kiss_fft.h | 0 {drivers => thirdparty}/speex/kiss_fftr.c | 0 {drivers => thirdparty}/speex/kiss_fftr.h | 0 {drivers => thirdparty}/speex/lpc.c | 0 {drivers => thirdparty}/speex/lpc.h | 0 {drivers => thirdparty}/speex/lpc_bfin.h | 0 {drivers => thirdparty}/speex/lsp.c | 0 {drivers => thirdparty}/speex/lsp.h | 0 {drivers => thirdparty}/speex/lsp_bfin.h | 0 {drivers => thirdparty}/speex/lsp_tables_nb.c | 0 {drivers => thirdparty}/speex/ltp.c | 0 {drivers => thirdparty}/speex/ltp.h | 0 {drivers => thirdparty}/speex/ltp_arm4.h | 0 {drivers => thirdparty}/speex/ltp_bfin.h | 0 {drivers => thirdparty}/speex/ltp_sse.h | 0 {drivers => thirdparty}/speex/math_approx.h | 0 {drivers => thirdparty}/speex/mdf.c | 0 {drivers => thirdparty}/speex/misc_bfin.h | 0 {drivers => thirdparty}/speex/modes.c | 0 {drivers => thirdparty}/speex/modes.h | 0 {drivers => thirdparty}/speex/modes_wb.c | 0 {drivers => thirdparty}/speex/nb_celp.c | 0 {drivers => thirdparty}/speex/nb_celp.h | 0 {drivers => thirdparty}/speex/os_support.h | 0 {drivers => thirdparty}/speex/preprocess.c | 0 {drivers => thirdparty}/speex/pseudofloat.h | 0 {drivers => thirdparty}/speex/quant_lsp.c | 0 {drivers => thirdparty}/speex/quant_lsp.h | 0 .../speex/quant_lsp_bfin.h | 0 {drivers => thirdparty}/speex/resample.c | 0 {drivers => thirdparty}/speex/resample_sse.h | 0 {drivers => thirdparty}/speex/sb_celp.c | 0 {drivers => thirdparty}/speex/sb_celp.h | 0 {drivers => thirdparty}/speex/scal.c | 0 {drivers => thirdparty}/speex/smallft.c | 0 {drivers => thirdparty}/speex/smallft.h | 0 {drivers => thirdparty}/speex/speex.c | 0 {drivers => thirdparty/speex}/speex/speex.h | 0 .../speex}/speex/speex_bits.h | 0 .../speex}/speex/speex_buffer.h | 0 .../speex}/speex/speex_callbacks.h | 0 .../speex}/speex/speex_config_types.h | 0 .../speex}/speex/speex_echo.h | 0 .../speex}/speex/speex_header.h | 0 .../speex}/speex/speex_jitter.h | 0 .../speex}/speex/speex_preprocess.h | 0 .../speex}/speex/speex_resampler.h | 0 .../speex}/speex/speex_stereo.h | 0 .../speex}/speex/speex_types.h | 0 {drivers => thirdparty}/speex/speex_bind.cpp | 0 {drivers => thirdparty}/speex/speex_bind.h | 0 .../speex/speex_callbacks.c | 0 {drivers => thirdparty}/speex/speex_header.c | 0 {drivers => thirdparty}/speex/stack_alloc.h | 0 {drivers => thirdparty}/speex/stereo.c | 0 {drivers => thirdparty}/speex/vbr.c | 0 {drivers => thirdparty}/speex/vbr.h | 0 {drivers => thirdparty}/speex/vorbis_psy.h | 0 {drivers => thirdparty}/speex/vq.c | 0 {drivers => thirdparty}/speex/vq.h | 0 {drivers => thirdparty}/speex/vq_arm4.h | 0 {drivers => thirdparty}/speex/vq_bfin.h | 0 {drivers => thirdparty}/speex/vq_sse.h | 0 {drivers => thirdparty}/speex/window.c | 0 518 files changed, 4423 insertions(+), 1482 deletions(-) delete mode 100644 drivers/ogg/SCsub delete mode 100644 drivers/opus/SCsub delete mode 100644 drivers/speex/SCsub delete mode 100644 drivers/vorbis/SCsub create mode 100644 modules/ogg/SCsub create mode 100644 modules/ogg/config.py create mode 100644 modules/ogg/register_types.cpp create mode 100644 modules/ogg/register_types.h create mode 100644 modules/opus/SCsub rename {drivers => modules}/opus/audio_stream_opus.cpp (100%) rename {drivers => modules}/opus/audio_stream_opus.h (98%) create mode 100644 modules/opus/config.py create mode 100644 modules/opus/register_types.cpp create mode 100644 modules/opus/register_types.h create mode 100644 modules/speex/SCsub rename {drivers => modules}/speex/audio_stream_speex.cpp (100%) rename {drivers => modules}/speex/audio_stream_speex.h (95%) create mode 100644 modules/speex/config.py create mode 100644 modules/speex/register_types.cpp create mode 100644 modules/speex/register_types.h create mode 100644 modules/vorbis/SCsub rename {drivers => modules}/vorbis/audio_stream_ogg_vorbis.cpp (100%) rename {drivers => modules}/vorbis/audio_stream_ogg_vorbis.h (99%) create mode 100644 modules/vorbis/config.py create mode 100644 modules/vorbis/register_types.cpp create mode 100644 modules/vorbis/register_types.h rename {drivers/ogg => thirdparty/libogg}/COPYING (100%) rename {drivers/ogg => thirdparty/libogg}/bitwise.c (100%) rename {drivers/ogg => thirdparty/libogg}/framing.c (100%) rename {drivers => thirdparty/libogg}/ogg/config_types.h (100%) rename {drivers => thirdparty/libogg}/ogg/ogg.h (100%) rename {drivers => thirdparty/libogg}/ogg/os_types.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/COPYING (100%) rename {drivers/vorbis => thirdparty/libvorbis}/analysis.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/backends.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/barkmel.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/bitrate.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/bitrate.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/block.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/books/coupled/res_books_51.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/books/coupled/res_books_stereo.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/books/floor/floor_books.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/books/uncoupled/res_books_uncoupled.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/codebook.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/codebook.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/codec_internal.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/envelope.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/envelope.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/floor0.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/floor1.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/highlevel.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/info.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lookup.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lookup.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lookup_data.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lpc.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lpc.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lsp.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lsp.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/mapping0.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/masking.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/mdct.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/mdct.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/misc.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/floor_all.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/psych_11.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/psych_16.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/psych_44.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/psych_8.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_16.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_44.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_44p51.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_44u.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_8.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_11.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_16.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_22.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_32.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_44.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_44p51.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_44u.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_8.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_X.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/os.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/psy.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/psy.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/psytune.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/registry.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/registry.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/res0.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/scales.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/sharedbook.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/smallft.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/smallft.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/synthesis.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/tone.c (100%) rename {drivers => thirdparty/libvorbis}/vorbis/codec.h (100%) rename {drivers => thirdparty/libvorbis}/vorbis/vorbisenc.h (100%) rename {drivers => thirdparty/libvorbis}/vorbis/vorbisfile.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/vorbisenc.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/vorbisfile.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/window.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/window.h (100%) rename {drivers => thirdparty}/opus/COPYING (100%) rename {drivers => thirdparty}/opus/analysis.c (98%) rename {drivers => thirdparty}/opus/analysis.h (98%) rename {drivers => thirdparty}/opus/celt/_kiss_fft_guts.h (96%) rename {drivers => thirdparty}/opus/celt/arch.h (96%) rename {drivers => thirdparty}/opus/celt/arm/arm2gnu.pl (100%) rename {drivers => thirdparty}/opus/celt/arm/arm_celt_map.c (97%) rename {drivers => thirdparty}/opus/celt/arm/armcpu.c (96%) rename {drivers => thirdparty}/opus/celt/arm/armcpu.h (100%) rename {drivers => thirdparty}/opus/celt/arm/armopts.s.in (100%) rename {drivers => thirdparty}/opus/celt/arm/celt_ne10_fft.c (97%) rename {drivers => thirdparty}/opus/celt/arm/celt_ne10_mdct.c (97%) rename {drivers => thirdparty}/opus/celt/arm/celt_neon_intr.c (99%) rename {drivers => thirdparty}/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S (100%) rename {drivers => thirdparty}/opus/celt/arm/celt_pitch_xcorr_arm.s (100%) rename {drivers => thirdparty}/opus/celt/arm/fft_arm.h (97%) create mode 100644 thirdparty/opus/celt/arm/fixed_arm64.h rename {drivers => thirdparty}/opus/celt/arm/fixed_armv4.h (100%) rename {drivers => thirdparty}/opus/celt/arm/fixed_armv5e.h (99%) rename {drivers => thirdparty}/opus/celt/arm/kiss_fft_armv4.h (99%) rename {drivers => thirdparty}/opus/celt/arm/kiss_fft_armv5e.h (99%) rename {drivers => thirdparty}/opus/celt/arm/mdct_arm.h (97%) rename {drivers => thirdparty}/opus/celt/arm/pitch_arm.h (98%) rename {drivers => thirdparty}/opus/celt/bands.c (98%) rename {drivers => thirdparty}/opus/celt/bands.h (97%) rename {drivers => thirdparty}/opus/celt/celt.c (93%) rename {drivers => thirdparty}/opus/celt/celt.h (97%) rename {drivers => thirdparty}/opus/celt/celt_decoder.c (98%) rename {drivers => thirdparty}/opus/celt/celt_encoder.c (98%) rename {drivers => thirdparty}/opus/celt/celt_lpc.c (96%) rename {drivers => thirdparty}/opus/celt/celt_lpc.h (95%) rename {drivers => thirdparty}/opus/celt/cpu_support.h (94%) rename {drivers => thirdparty}/opus/celt/cwrs.c (99%) rename {drivers => thirdparty}/opus/celt/cwrs.h (93%) rename {drivers => thirdparty}/opus/celt/ecintrin.h (98%) rename {drivers => thirdparty}/opus/celt/entcode.c (98%) rename {drivers => thirdparty}/opus/celt/entcode.h (98%) rename {drivers => thirdparty}/opus/celt/entdec.c (98%) rename {drivers => thirdparty}/opus/celt/entdec.h (99%) rename {drivers => thirdparty}/opus/celt/entenc.c (98%) rename {drivers => thirdparty}/opus/celt/entenc.h (99%) rename {drivers => thirdparty}/opus/celt/fixed_debug.h (99%) rename {drivers => thirdparty}/opus/celt/fixed_generic.h (99%) rename {drivers => thirdparty}/opus/celt/float_cast.h (99%) rename {drivers => thirdparty}/opus/celt/kiss_fft.c (98%) rename {drivers => thirdparty}/opus/celt/kiss_fft.h (97%) rename {drivers => thirdparty}/opus/celt/laplace.c (97%) rename {drivers => thirdparty}/opus/celt/laplace.h (97%) rename {drivers => thirdparty}/opus/celt/mathops.c (98%) rename {drivers => thirdparty}/opus/celt/mathops.h (97%) rename {drivers => thirdparty}/opus/celt/mdct.c (97%) rename {drivers => thirdparty}/opus/celt/mdct.h (97%) rename {drivers => thirdparty}/opus/celt/mfrngcod.h (98%) rename {drivers => thirdparty}/opus/celt/mips/celt_mipsr1.h (91%) rename {drivers => thirdparty}/opus/celt/mips/fixed_generic_mipsr1.h (100%) rename {drivers => thirdparty}/opus/celt/mips/kiss_fft_mipsr1.h (99%) rename {drivers => thirdparty}/opus/celt/mips/mdct_mipsr1.h (97%) rename {drivers => thirdparty}/opus/celt/mips/pitch_mipsr1.h (100%) rename {drivers => thirdparty}/opus/celt/mips/vq_mipsr1.h (96%) rename {drivers => thirdparty}/opus/celt/modes.c (97%) rename {drivers => thirdparty}/opus/celt/modes.h (93%) rename {drivers => thirdparty}/opus/celt/opus_custom_demo.c (98%) rename {drivers => thirdparty}/opus/celt/os_support.h (98%) rename {drivers => thirdparty}/opus/celt/pitch.c (94%) rename {drivers => thirdparty}/opus/celt/pitch.h (96%) rename {drivers => thirdparty}/opus/celt/quant_bands.c (97%) rename {drivers => thirdparty}/opus/celt/quant_bands.h (94%) rename {drivers => thirdparty}/opus/celt/rate.c (99%) rename {drivers => thirdparty}/opus/celt/rate.h (98%) rename {drivers => thirdparty}/opus/celt/stack_alloc.h (98%) rename {drivers => thirdparty}/opus/celt/static_modes_fixed.h (99%) rename {drivers => thirdparty}/opus/celt/static_modes_fixed_arm_ne10.h (100%) rename {drivers => thirdparty}/opus/celt/static_modes_float.h (99%) rename {drivers => thirdparty}/opus/celt/static_modes_float_arm_ne10.h (100%) create mode 100644 thirdparty/opus/celt/tests/test_unit_cwrs32.c create mode 100644 thirdparty/opus/celt/tests/test_unit_dft.c create mode 100644 thirdparty/opus/celt/tests/test_unit_entropy.c create mode 100644 thirdparty/opus/celt/tests/test_unit_laplace.c create mode 100644 thirdparty/opus/celt/tests/test_unit_mathops.c create mode 100644 thirdparty/opus/celt/tests/test_unit_mdct.c create mode 100644 thirdparty/opus/celt/tests/test_unit_rotation.c create mode 100644 thirdparty/opus/celt/tests/test_unit_types.c rename {drivers => thirdparty}/opus/celt/vq.c (95%) rename {drivers => thirdparty}/opus/celt/vq.h (95%) rename {drivers => thirdparty}/opus/celt/x86/celt_lpc_sse.c (94%) rename {drivers => thirdparty}/opus/celt/x86/celt_lpc_sse.h (97%) rename {drivers => thirdparty}/opus/celt/x86/pitch_sse.c (96%) rename {drivers => thirdparty}/opus/celt/x86/pitch_sse.h (99%) rename {drivers => thirdparty}/opus/celt/x86/pitch_sse2.c (94%) rename {drivers => thirdparty}/opus/celt/x86/pitch_sse4_1.c (96%) rename {drivers => thirdparty}/opus/celt/x86/x86_celt_map.c (96%) rename {drivers => thirdparty}/opus/celt/x86/x86cpu.c (95%) rename {drivers => thirdparty}/opus/celt/x86/x86cpu.h (100%) rename drivers/opus/opus_config.h => thirdparty/opus/config.h (100%) rename {drivers => thirdparty}/opus/http.c (99%) rename {drivers => thirdparty}/opus/info.c (99%) rename {drivers => thirdparty}/opus/internal.c (95%) rename {drivers => thirdparty}/opus/internal.h (99%) rename {drivers => thirdparty}/opus/mlp.c (95%) rename {drivers => thirdparty}/opus/mlp.h (98%) rename {drivers => thirdparty}/opus/mlp_data.c (98%) rename {drivers => thirdparty}/opus/opus.c (99%) rename {drivers => thirdparty}/opus/opus.h (99%) rename {drivers => thirdparty}/opus/opus_compare.c (100%) rename {drivers => thirdparty}/opus/opus_custom.h (99%) rename {drivers => thirdparty}/opus/opus_decoder.c (98%) rename {drivers => thirdparty}/opus/opus_defines.h (99%) rename {drivers => thirdparty}/opus/opus_encoder.c (98%) rename {drivers => thirdparty}/opus/opus_multistream.c (91%) rename {drivers => thirdparty}/opus/opus_multistream.h (99%) rename {drivers => thirdparty}/opus/opus_multistream_decoder.c (98%) rename {drivers => thirdparty}/opus/opus_multistream_encoder.c (98%) rename {drivers => thirdparty}/opus/opus_private.h (98%) rename {drivers => thirdparty}/opus/opus_types.h (100%) rename {drivers => thirdparty}/opus/opusfile.c (99%) rename {drivers => thirdparty}/opus/opusfile.h (99%) rename {drivers => thirdparty}/opus/repacketizer.c (98%) rename {drivers => thirdparty}/opus/repacketizer_demo.c (98%) rename {drivers => thirdparty}/opus/silk/A2NLSF.c (99%) rename {drivers => thirdparty}/opus/silk/API.h (97%) rename {drivers => thirdparty}/opus/silk/CNG.c (99%) rename {drivers => thirdparty}/opus/silk/HP_variable_cutoff.c (95%) rename {drivers => thirdparty}/opus/silk/Inlines.h (100%) rename {drivers => thirdparty}/opus/silk/LPC_analysis_filter.c (96%) rename {drivers => thirdparty}/opus/silk/LPC_inv_pred_gain.c (98%) rename {drivers => thirdparty}/opus/silk/LP_variable_cutoff.c (98%) rename {drivers => thirdparty}/opus/silk/MacroCount.h (100%) rename {drivers => thirdparty}/opus/silk/MacroDebug.h (100%) rename {drivers => thirdparty}/opus/silk/NLSF2A.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_VQ.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_VQ_weights_laroia.c (97%) rename {drivers => thirdparty}/opus/silk/NLSF_decode.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_del_dec_quant.c (99%) rename {drivers => thirdparty}/opus/silk/NLSF_encode.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_stabilize.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_unpack.c (97%) rename {drivers => thirdparty}/opus/silk/NSQ.c (99%) create mode 100644 thirdparty/opus/silk/NSQ.h rename {drivers => thirdparty}/opus/silk/NSQ_del_dec.c (99%) rename {drivers => thirdparty}/opus/silk/PLC.c (99%) rename {drivers => thirdparty}/opus/silk/PLC.h (99%) rename {drivers => thirdparty}/opus/silk/SigProc_FIX.h (98%) rename {drivers => thirdparty}/opus/silk/VAD.c (99%) rename {drivers => thirdparty}/opus/silk/VQ_WMat_EC.c (98%) rename {drivers => thirdparty}/opus/silk/ana_filt_bank_1.c (98%) create mode 100644 thirdparty/opus/silk/arm/NSQ_neon.c create mode 100644 thirdparty/opus/silk/arm/NSQ_neon.h rename {drivers => thirdparty}/opus/silk/arm/SigProc_FIX_armv4.h (100%) rename {drivers => thirdparty}/opus/silk/arm/SigProc_FIX_armv5e.h (100%) create mode 100644 thirdparty/opus/silk/arm/arm_silk_map.c create mode 100644 thirdparty/opus/silk/arm/macros_arm64.h rename {drivers => thirdparty}/opus/silk/arm/macros_armv4.h (100%) rename {drivers => thirdparty}/opus/silk/arm/macros_armv5e.h (100%) rename {drivers => thirdparty}/opus/silk/biquad_alt.c (98%) rename {drivers => thirdparty}/opus/silk/bwexpander.c (97%) rename {drivers => thirdparty}/opus/silk/bwexpander_32.c (97%) rename {drivers => thirdparty}/opus/silk/check_control_input.c (97%) rename {drivers => thirdparty}/opus/silk/code_signs.c (98%) rename {drivers => thirdparty}/opus/silk/control.h (99%) rename {drivers => thirdparty}/opus/silk/control_SNR.c (97%) rename {drivers => thirdparty}/opus/silk/control_audio_bandwidth.c (98%) rename {drivers => thirdparty}/opus/silk/control_codec.c (98%) rename {drivers => thirdparty}/opus/silk/debug.c (98%) rename {drivers => thirdparty}/opus/silk/debug.h (99%) rename {drivers => thirdparty}/opus/silk/dec_API.c (99%) rename {drivers => thirdparty}/opus/silk/decode_core.c (99%) rename {drivers => thirdparty}/opus/silk/decode_frame.c (98%) rename {drivers => thirdparty}/opus/silk/decode_indices.c (99%) rename {drivers => thirdparty}/opus/silk/decode_parameters.c (98%) rename {drivers => thirdparty}/opus/silk/decode_pitch.c (97%) rename {drivers => thirdparty}/opus/silk/decode_pulses.c (98%) rename {drivers => thirdparty}/opus/silk/decoder_set_fs.c (98%) rename {drivers => thirdparty}/opus/silk/define.h (99%) rename {drivers => thirdparty}/opus/silk/enc_API.c (98%) rename {drivers => thirdparty}/opus/silk/encode_indices.c (99%) rename {drivers => thirdparty}/opus/silk/encode_pulses.c (98%) rename {drivers => thirdparty}/opus/silk/errors.h (100%) rename {drivers => thirdparty}/opus/silk/fixed/LTP_analysis_filter_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/LTP_scale_ctrl_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/apply_sine_window_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/autocorr_FIX.c (96%) rename {drivers => thirdparty}/opus/silk/fixed/burg_modified_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/corrMatrix_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/encode_frame_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/find_LPC_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/find_LTP_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/find_pitch_lags_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/find_pred_coefs_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/k2a_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/k2a_Q16_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/main_FIX.h (99%) rename {drivers => thirdparty}/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h (100%) rename {drivers => thirdparty}/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h (98%) rename {drivers => thirdparty}/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h (99%) rename {drivers => thirdparty}/opus/silk/fixed/noise_shape_analysis_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/pitch_analysis_core_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/prefilter_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/process_gains_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/regularize_correlations_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/residual_energy16_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/residual_energy_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/schur64_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/schur_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/solve_LS_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/structs_FIX.h (98%) rename {drivers => thirdparty}/opus/silk/fixed/vector_ops_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/warped_autocorrelation_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/x86/burg_modified_FIX_sse.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/x86/prefilter_FIX_sse.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/x86/vector_ops_FIX_sse.c (96%) rename {drivers => thirdparty}/opus/silk/float/LPC_analysis_filter_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/float/LPC_inv_pred_gain_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/LTP_analysis_filter_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/LTP_scale_ctrl_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/SigProc_FLP.h (99%) rename {drivers => thirdparty}/opus/silk/float/apply_sine_window_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/autocorrelation_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/burg_modified_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/bwexpander_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/corrMatrix_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/encode_frame_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/float/energy_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/find_LPC_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/find_LTP_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/find_pitch_lags_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/find_pred_coefs_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/inner_product_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/k2a_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/levinsondurbin_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/main_FLP.h (98%) rename {drivers => thirdparty}/opus/silk/float/noise_shape_analysis_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/float/pitch_analysis_core_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/float/prefilter_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/process_gains_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/regularize_correlations_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/residual_energy_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/scale_copy_vector_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/scale_vector_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/schur_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/solve_LS_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/sort_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/structs_FLP.h (98%) rename {drivers => thirdparty}/opus/silk/float/warped_autocorrelation_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/wrappers_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/gain_quant.c (99%) rename {drivers => thirdparty}/opus/silk/init_decoder.c (97%) rename {drivers => thirdparty}/opus/silk/init_encoder.c (92%) rename {drivers => thirdparty}/opus/silk/inner_prod_aligned.c (96%) rename {drivers => thirdparty}/opus/silk/interpolate.c (97%) rename {drivers => thirdparty}/opus/silk/lin2log.c (96%) rename {drivers => thirdparty}/opus/silk/log2lin.c (97%) rename {drivers => thirdparty}/opus/silk/macros.h (96%) rename {drivers => thirdparty}/opus/silk/main.h (99%) rename {drivers => thirdparty}/opus/silk/mips/NSQ_del_dec_mipsr1.h (99%) rename {drivers => thirdparty}/opus/silk/mips/macros_mipsr1.h (100%) rename {drivers => thirdparty}/opus/silk/mips/sigproc_fix_mipsr1.h (100%) rename {drivers => thirdparty}/opus/silk/pitch_est_defines.h (99%) rename {drivers => thirdparty}/opus/silk/pitch_est_tables.c (97%) rename {drivers => thirdparty}/opus/silk/process_NLSFs.c (98%) rename {drivers => thirdparty}/opus/silk/quant_LTP_gains.c (98%) rename {drivers => thirdparty}/opus/silk/resampler.c (99%) rename {drivers => thirdparty}/opus/silk/resampler_down2.c (97%) rename {drivers => thirdparty}/opus/silk/resampler_down2_3.c (97%) rename {drivers => thirdparty}/opus/silk/resampler_private.h (97%) rename {drivers => thirdparty}/opus/silk/resampler_private_AR2.c (96%) rename {drivers => thirdparty}/opus/silk/resampler_private_IIR_FIR.c (97%) rename {drivers => thirdparty}/opus/silk/resampler_private_down_FIR.c (98%) rename {drivers => thirdparty}/opus/silk/resampler_private_up2_HQ.c (98%) rename {drivers => thirdparty}/opus/silk/resampler_rom.c (98%) rename {drivers => thirdparty}/opus/silk/resampler_rom.h (97%) rename {drivers => thirdparty}/opus/silk/resampler_structs.h (100%) rename {drivers => thirdparty}/opus/silk/shell_coder.c (99%) rename {drivers => thirdparty}/opus/silk/sigm_Q15.c (97%) rename {drivers => thirdparty}/opus/silk/sort.c (98%) rename {drivers => thirdparty}/opus/silk/stereo_LR_to_MS.c (99%) rename {drivers => thirdparty}/opus/silk/stereo_MS_to_LR.c (98%) rename {drivers => thirdparty}/opus/silk/stereo_decode_pred.c (98%) rename {drivers => thirdparty}/opus/silk/stereo_encode_pred.c (97%) rename {drivers => thirdparty}/opus/silk/stereo_find_predictor.c (98%) rename {drivers => thirdparty}/opus/silk/stereo_quant_pred.c (98%) rename {drivers => thirdparty}/opus/silk/structs.h (99%) rename {drivers => thirdparty}/opus/silk/sum_sqr_shift.c (97%) rename {drivers => thirdparty}/opus/silk/table_LSF_cos.c (98%) rename {drivers => thirdparty}/opus/silk/tables.h (99%) rename {drivers => thirdparty}/opus/silk/tables_LTP.c (99%) rename {drivers => thirdparty}/opus/silk/tables_NLSF_CB_NB_MB.c (99%) rename {drivers => thirdparty}/opus/silk/tables_NLSF_CB_WB.c (99%) rename {drivers => thirdparty}/opus/silk/tables_gain.c (97%) rename {drivers => thirdparty}/opus/silk/tables_other.c (97%) rename {drivers => thirdparty}/opus/silk/tables_pitch_lag.c (97%) rename {drivers => thirdparty}/opus/silk/tables_pulses_per_block.c (99%) rename {drivers => thirdparty}/opus/silk/tuning_parameters.h (100%) rename {drivers => thirdparty}/opus/silk/typedef.h (97%) rename {drivers => thirdparty}/opus/silk/x86/NSQ_del_dec_sse.c (99%) rename {drivers => thirdparty}/opus/silk/x86/NSQ_sse.c (99%) rename {drivers => thirdparty}/opus/silk/x86/SigProc_FIX_sse.h (99%) rename {drivers => thirdparty}/opus/silk/x86/VAD_sse.c (99%) rename {drivers => thirdparty}/opus/silk/x86/VQ_WMat_EC_sse.c (98%) rename {drivers => thirdparty}/opus/silk/x86/main_sse.h (99%) rename {drivers => thirdparty}/opus/silk/x86/x86_silk_map.c (97%) rename {drivers => thirdparty}/opus/stream.c (99%) rename {drivers => thirdparty}/opus/tansig_table.h (100%) rename {drivers => thirdparty}/opus/wincerts.c (98%) rename {drivers => thirdparty}/opus/winerrno.h (100%) create mode 100644 thirdparty/speex/COPYING rename {drivers => thirdparty}/speex/_kiss_fft_guts.h (100%) rename {drivers => thirdparty}/speex/arch.h (100%) rename {drivers => thirdparty}/speex/bits.c (100%) rename {drivers => thirdparty}/speex/buffer.c (100%) rename {drivers => thirdparty}/speex/cb_search.c (100%) rename {drivers => thirdparty}/speex/cb_search.h (100%) rename {drivers => thirdparty}/speex/cb_search_arm4.h (100%) rename {drivers => thirdparty}/speex/cb_search_bfin.h (100%) rename {drivers => thirdparty}/speex/cb_search_sse.h (100%) rename {drivers => thirdparty}/speex/config.h (100%) rename {drivers => thirdparty}/speex/echo_diagnostic.m (100%) rename {drivers => thirdparty}/speex/exc_10_16_table.c (100%) rename {drivers => thirdparty}/speex/exc_10_32_table.c (100%) rename {drivers => thirdparty}/speex/exc_20_32_table.c (100%) rename {drivers => thirdparty}/speex/exc_5_256_table.c (100%) rename {drivers => thirdparty}/speex/exc_5_64_table.c (100%) rename {drivers => thirdparty}/speex/exc_8_128_table.c (100%) rename {drivers => thirdparty}/speex/fftwrap.c (100%) rename {drivers => thirdparty}/speex/fftwrap.h (100%) rename {drivers => thirdparty}/speex/filterbank.c (100%) rename {drivers => thirdparty}/speex/filterbank.h (100%) rename {drivers => thirdparty}/speex/filters.c (100%) rename {drivers => thirdparty}/speex/filters.h (100%) rename {drivers => thirdparty}/speex/filters_arm4.h (100%) rename {drivers => thirdparty}/speex/filters_bfin.h (100%) rename {drivers => thirdparty}/speex/filters_sse.h (100%) rename {drivers => thirdparty}/speex/fixed_arm4.h (100%) rename {drivers => thirdparty}/speex/fixed_arm5e.h (100%) rename {drivers => thirdparty}/speex/fixed_bfin.h (100%) rename {drivers => thirdparty}/speex/fixed_debug.h (100%) rename {drivers => thirdparty}/speex/fixed_generic.h (100%) rename {drivers => thirdparty}/speex/gain_table.c (100%) rename {drivers => thirdparty}/speex/gain_table_lbr.c (100%) rename {drivers => thirdparty}/speex/hexc_10_32_table.c (100%) rename {drivers => thirdparty}/speex/hexc_table.c (100%) rename {drivers => thirdparty}/speex/high_lsp_tables.c (100%) rename {drivers => thirdparty}/speex/jitter.c (100%) rename {drivers => thirdparty}/speex/kiss_fft.c (100%) rename {drivers => thirdparty}/speex/kiss_fft.h (100%) rename {drivers => thirdparty}/speex/kiss_fftr.c (100%) rename {drivers => thirdparty}/speex/kiss_fftr.h (100%) rename {drivers => thirdparty}/speex/lpc.c (100%) rename {drivers => thirdparty}/speex/lpc.h (100%) rename {drivers => thirdparty}/speex/lpc_bfin.h (100%) rename {drivers => thirdparty}/speex/lsp.c (100%) rename {drivers => thirdparty}/speex/lsp.h (100%) rename {drivers => thirdparty}/speex/lsp_bfin.h (100%) rename {drivers => thirdparty}/speex/lsp_tables_nb.c (100%) rename {drivers => thirdparty}/speex/ltp.c (100%) rename {drivers => thirdparty}/speex/ltp.h (100%) rename {drivers => thirdparty}/speex/ltp_arm4.h (100%) rename {drivers => thirdparty}/speex/ltp_bfin.h (100%) rename {drivers => thirdparty}/speex/ltp_sse.h (100%) rename {drivers => thirdparty}/speex/math_approx.h (100%) rename {drivers => thirdparty}/speex/mdf.c (100%) rename {drivers => thirdparty}/speex/misc_bfin.h (100%) rename {drivers => thirdparty}/speex/modes.c (100%) rename {drivers => thirdparty}/speex/modes.h (100%) rename {drivers => thirdparty}/speex/modes_wb.c (100%) rename {drivers => thirdparty}/speex/nb_celp.c (100%) rename {drivers => thirdparty}/speex/nb_celp.h (100%) rename {drivers => thirdparty}/speex/os_support.h (100%) rename {drivers => thirdparty}/speex/preprocess.c (100%) rename {drivers => thirdparty}/speex/pseudofloat.h (100%) rename {drivers => thirdparty}/speex/quant_lsp.c (100%) rename {drivers => thirdparty}/speex/quant_lsp.h (100%) rename {drivers => thirdparty}/speex/quant_lsp_bfin.h (100%) rename {drivers => thirdparty}/speex/resample.c (100%) rename {drivers => thirdparty}/speex/resample_sse.h (100%) rename {drivers => thirdparty}/speex/sb_celp.c (100%) rename {drivers => thirdparty}/speex/sb_celp.h (100%) rename {drivers => thirdparty}/speex/scal.c (100%) rename {drivers => thirdparty}/speex/smallft.c (100%) rename {drivers => thirdparty}/speex/smallft.h (100%) rename {drivers => thirdparty}/speex/speex.c (100%) rename {drivers => thirdparty/speex}/speex/speex.h (100%) rename {drivers => thirdparty/speex}/speex/speex_bits.h (100%) rename {drivers => thirdparty/speex}/speex/speex_buffer.h (100%) rename {drivers => thirdparty/speex}/speex/speex_callbacks.h (100%) rename {drivers => thirdparty/speex}/speex/speex_config_types.h (100%) rename {drivers => thirdparty/speex}/speex/speex_echo.h (100%) rename {drivers => thirdparty/speex}/speex/speex_header.h (100%) rename {drivers => thirdparty/speex}/speex/speex_jitter.h (100%) rename {drivers => thirdparty/speex}/speex/speex_preprocess.h (100%) rename {drivers => thirdparty/speex}/speex/speex_resampler.h (100%) rename {drivers => thirdparty/speex}/speex/speex_stereo.h (100%) rename {drivers => thirdparty/speex}/speex/speex_types.h (100%) rename {drivers => thirdparty}/speex/speex_bind.cpp (100%) rename {drivers => thirdparty}/speex/speex_bind.h (100%) rename {drivers => thirdparty}/speex/speex_callbacks.c (100%) rename {drivers => thirdparty}/speex/speex_header.c (100%) rename {drivers => thirdparty}/speex/stack_alloc.h (100%) rename {drivers => thirdparty}/speex/stereo.c (100%) rename {drivers => thirdparty}/speex/vbr.c (100%) rename {drivers => thirdparty}/speex/vbr.h (100%) rename {drivers => thirdparty}/speex/vorbis_psy.h (100%) rename {drivers => thirdparty}/speex/vq.c (100%) rename {drivers => thirdparty}/speex/vq.h (100%) rename {drivers => thirdparty}/speex/vq_arm4.h (100%) rename {drivers => thirdparty}/speex/vq_bfin.h (100%) rename {drivers => thirdparty}/speex/vq_sse.h (100%) rename {drivers => thirdparty}/speex/window.c (100%) diff --git a/SConstruct b/SConstruct index 43b9bb604eb..1c58034cb42 100644 --- a/SConstruct +++ b/SConstruct @@ -120,14 +120,18 @@ opts.Add('platform','Platform: '+str(platform_list)+'.',"") opts.Add('p','Platform (same as platform=).',"") opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes') opts.Add('gdscript','Build GDSCript support: (yes/no)','yes') -opts.Add('vorbis','Build Ogg Vorbis Support: (yes/no)','yes') -opts.Add('opus','Build Opus Audio Format Support: (yes/no)','yes') +opts.Add('libogg','Ogg library for ogg container support (system/builtin)','builtin') +opts.Add('libvorbis','Ogg Vorbis library for vorbis support (system/builtin)','builtin') +opts.Add('opus','Opus and opusfile library for Opus format support: (system/builtin)','builtin') opts.Add('minizip','Build Minizip Archive Support: (yes/no)','yes') opts.Add('squish','Squish BC Texture Compression in editor (yes/no)','yes') opts.Add('theora','Theora Video (yes/no)','yes') opts.Add('theoralib','Theora Video (yes/no)','no') opts.Add('freetype','Freetype support in editor','builtin') -opts.Add('speex','Speex Audio (yes/no)','yes') +# (akien) Unbundling would require work in audio_stream_speex.{cpp,h}, but since speex was +# removed in 3.0+ and this is only to preserve compatibility in 2.1, I haven't worked on it. +# Patches welcome if anyone cares :) +opts.Add('speex','Speex library for speex support','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') opts.Add('libwebp','libwebp library for webp module (system/builtin)','builtin') @@ -336,19 +340,12 @@ if selected_platform in platform_list: if (env_base['squish']=='yes'): env.Append(CPPFLAGS=['-DSQUISH_ENABLED']); - if (env['vorbis']=='yes'): - env.Append(CPPFLAGS=['-DVORBIS_ENABLED']); - if (env['opus']=='yes'): - env.Append(CPPFLAGS=['-DOPUS_ENABLED']); - if (env['theora']=='yes'): env['theoralib']='yes' env.Append(CPPFLAGS=['-DTHEORA_ENABLED']); if (env['theoralib']=='yes'): env.Append(CPPFLAGS=['-DTHEORALIB_ENABLED']); - if (env['speex']=='yes'): - env.Append(CPPFLAGS=['-DSPEEX_ENABLED']); if (env['tools']=='yes'): env.Append(CPPFLAGS=['-DTOOLS_ENABLED']) diff --git a/drivers/SCsub b/drivers/SCsub index 842619260ab..c66c78a1b1e 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -4,7 +4,6 @@ env_drivers = env.Clone() env.drivers_sources=[] #env.add_source_files(env.drivers_sources,"*.cpp") -env_drivers.Append(CPPPATH=["vorbis"]) Export('env_drivers') @@ -31,19 +30,11 @@ if (env["builtin_zlib"]=="yes"): SConscript("rtaudio/SCsub"); SConscript("nrex/SCsub"); SConscript("chibi/SCsub"); -if (env["vorbis"]=="yes" or env["speex"]=="yes" or env["theoralib"]=="yes" or env["opus"]=="yes"): - SConscript("ogg/SCsub"); -if (env["vorbis"]=="yes"): - SConscript("vorbis/SCsub"); -if (env["opus"]=="yes"): - SConscript('opus/SCsub'); if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); if (env["theoralib"]=="yes"): SConscript("theora/SCsub"); -if (env['speex']=='yes'): - SConscript("speex/SCsub"); if (env['musepack']=='yes'): SConscript("mpc/SCsub"); if (env["squish"]=="yes" and env["tools"]=="yes"): diff --git a/drivers/ogg/SCsub b/drivers/ogg/SCsub deleted file mode 100644 index 3ee1bb6408c..00000000000 --- a/drivers/ogg/SCsub +++ /dev/null @@ -1,9 +0,0 @@ -Import('env') - -ogg_sources = [ - - "ogg/bitwise.c", - "ogg/framing.c", -] - -env.drivers_sources+=ogg_sources diff --git a/drivers/opus/SCsub b/drivers/opus/SCsub deleted file mode 100644 index bed8b496fcf..00000000000 --- a/drivers/opus/SCsub +++ /dev/null @@ -1,196 +0,0 @@ -Import('env') - -opus_sources = [ - "opus/audio_stream_opus.cpp", -] - -opus_sources_silk=[] - -opus_sources_lib = [ - "opus/silk/tables_other.c", - "opus/silk/sum_sqr_shift.c", - "opus/silk/PLC.c", - "opus/silk/dec_API.c", - "opus/silk/decode_pulses.c", - "opus/silk/inner_prod_aligned.c", - "opus/silk/init_encoder.c", - "opus/silk/interpolate.c", - "opus/silk/stereo_encode_pred.c", - "opus/silk/decode_frame.c", - "opus/silk/NLSF_del_dec_quant.c", - "opus/silk/VAD.c", - "opus/silk/resampler_private_AR2.c", - "opus/silk/NLSF_unpack.c", - "opus/silk/resampler_down2.c", - "opus/silk/sort.c", - "opus/silk/resampler_private_IIR_FIR.c", - "opus/silk/resampler_down2_3.c", - "opus/silk/resampler_private_up2_HQ.c", - "opus/silk/tables_gain.c", - "opus/silk/stereo_find_predictor.c", - "opus/silk/stereo_quant_pred.c", - "opus/silk/NLSF_stabilize.c", - "opus/silk/ana_filt_bank_1.c", - "opus/silk/check_control_input.c", - "opus/silk/bwexpander.c", - "opus/silk/A2NLSF.c", - "opus/silk/LPC_inv_pred_gain.c", - "opus/silk/log2lin.c", - "opus/silk/process_NLSFs.c", - "opus/silk/sigm_Q15.c", - "opus/silk/VQ_WMat_EC.c", - "opus/silk/quant_LTP_gains.c", - "opus/silk/resampler_private_down_FIR.c", - "opus/silk/NLSF_decode.c", - "opus/silk/control_codec.c", - "opus/silk/NLSF_VQ_weights_laroia.c", - "opus/silk/decode_pitch.c", - "opus/silk/stereo_decode_pred.c", - "opus/silk/tables_pulses_per_block.c", - "opus/silk/init_decoder.c", - "opus/silk/table_LSF_cos.c", - "opus/silk/decode_core.c", - "opus/silk/code_signs.c", - "opus/silk/enc_API.c", - "opus/silk/tables_LTP.c", - "opus/silk/pitch_est_tables.c", - "opus/silk/biquad_alt.c", - "opus/silk/encode_indices.c", - "opus/silk/tables_NLSF_CB_WB.c", - "opus/silk/debug.c", - "opus/silk/decode_parameters.c", - "opus/silk/tables_pitch_lag.c", - "opus/silk/NLSF2A.c", - "opus/silk/resampler.c", - "opus/silk/decode_indices.c", - "opus/silk/NLSF_VQ.c", - "opus/silk/bwexpander_32.c", - "opus/silk/tables_NLSF_CB_NB_MB.c", - "opus/silk/encode_pulses.c", - "opus/silk/NSQ_del_dec.c", - "opus/silk/control_SNR.c", - "opus/silk/shell_coder.c", - "opus/silk/NLSF_encode.c", - "opus/silk/stereo_MS_to_LR.c", - "opus/silk/stereo_LR_to_MS.c", - "opus/silk/HP_variable_cutoff.c", - "opus/silk/LPC_analysis_filter.c", - "opus/silk/CNG.c", - "opus/silk/decoder_set_fs.c", - "opus/silk/resampler_rom.c", - "opus/silk/control_audio_bandwidth.c", - "opus/silk/lin2log.c", - "opus/silk/LP_variable_cutoff.c", - "opus/silk/NSQ.c", - "opus/silk/gain_quant.c", - "opus/celt/laplace.c", - "opus/celt/vq.c", - "opus/celt/quant_bands.c", - "opus/celt/kiss_fft.c", - "opus/celt/entcode.c", - "opus/celt/entenc.c", - "opus/celt/celt_lpc.c", - "opus/celt/pitch.c", - "opus/celt/rate.c", - "opus/celt/mathops.c", - #"opus/celt/arm/armcpu.c", - #"opus/celt/arm/celt_neon_intr.c", - #"opus/celt/arm/celt_ne10_mdct.c", - #"opus/celt/arm/celt_ne10_fft.c", - #"opus/celt/arm/arm_celt_map.c", - "opus/celt/celt_encoder.c", - "opus/celt/celt.c", - "opus/celt/bands.c", - "opus/celt/cwrs.c", - "opus/celt/entdec.c", - "opus/celt/celt_decoder.c", - "opus/celt/mdct.c", - "opus/celt/modes.c", - "opus/repacketizer.c", - "opus/mlp_data.c", - "opus/opus_multistream.c", - "opus/opusfile.c", - "opus/opus_encoder.c", - "opus/analysis.c", - "opus/mlp.c", - "opus/info.c", - "opus/stream.c", - "opus/opus_decoder.c", - "opus/internal.c", - "opus/wincerts.c", - "opus/opus.c", - "opus/opus_multistream_encoder.c", - "opus/http.c", - "opus/opus_multistream_decoder.c" -] - -if("opus_fixed_point" in env and env.opus_fixed_point=="yes"): - env.Append(CFLAGS=["-DOPUS_FIXED_POINT"]) - opus_sources_silk = [ - "opus/silk/fixed/schur64_FIX.c", - "opus/silk/fixed/residual_energy16_FIX.c", - "opus/silk/fixed/encode_frame_FIX.c", - "opus/silk/fixed/regularize_correlations_FIX.c", - "opus/silk/fixed/apply_sine_window_FIX.c", - "opus/silk/fixed/solve_LS_FIX.c", - "opus/silk/fixed/schur_FIX.c", - "opus/silk/fixed/pitch_analysis_core_FIX.c", - "opus/silk/fixed/noise_shape_analysis_FIX.c", - "opus/silk/fixed/find_LTP_FIX.c", - "opus/silk/fixed/vector_ops_FIX.c", - "opus/silk/fixed/autocorr_FIX.c", - "opus/silk/fixed/warped_autocorrelation_FIX.c", - "opus/silk/fixed/find_pitch_lags_FIX.c", - "opus/silk/fixed/k2a_Q16_FIX.c", - "opus/silk/fixed/LTP_scale_ctrl_FIX.c", - "opus/silk/fixed/corrMatrix_FIX.c", - "opus/silk/fixed/prefilter_FIX.c", - "opus/silk/fixed/find_LPC_FIX.c", - "opus/silk/fixed/residual_energy_FIX.c", - "opus/silk/fixed/process_gains_FIX.c", - "opus/silk/fixed/LTP_analysis_filter_FIX.c", - "opus/silk/fixed/k2a_FIX.c", - "opus/silk/fixed/burg_modified_FIX.c", - "opus/silk/fixed/find_pred_coefs_FIX.c" - ] -else: - opus_sources_silk = [ - "opus/silk/float/LTP_scale_ctrl_FLP.c", - "opus/silk/float/regularize_correlations_FLP.c", - "opus/silk/float/corrMatrix_FLP.c", - "opus/silk/float/LPC_analysis_filter_FLP.c", - "opus/silk/float/levinsondurbin_FLP.c", - "opus/silk/float/schur_FLP.c", - "opus/silk/float/scale_vector_FLP.c", - "opus/silk/float/apply_sine_window_FLP.c", - "opus/silk/float/pitch_analysis_core_FLP.c", - "opus/silk/float/wrappers_FLP.c", - "opus/silk/float/bwexpander_FLP.c", - "opus/silk/float/warped_autocorrelation_FLP.c", - "opus/silk/float/solve_LS_FLP.c", - "opus/silk/float/find_LPC_FLP.c", - "opus/silk/float/autocorrelation_FLP.c", - "opus/silk/float/find_pred_coefs_FLP.c", - "opus/silk/float/find_pitch_lags_FLP.c", - "opus/silk/float/burg_modified_FLP.c", - "opus/silk/float/find_LTP_FLP.c", - "opus/silk/float/energy_FLP.c", - "opus/silk/float/sort_FLP.c", - "opus/silk/float/LPC_inv_pred_gain_FLP.c", - "opus/silk/float/k2a_FLP.c", - "opus/silk/float/noise_shape_analysis_FLP.c", - "opus/silk/float/inner_product_FLP.c", - "opus/silk/float/process_gains_FLP.c", - "opus/silk/float/encode_frame_FLP.c", - "opus/silk/float/scale_copy_vector_FLP.c", - "opus/silk/float/residual_energy_FLP.c", - "opus/silk/float/LTP_analysis_filter_FLP.c", - "opus/silk/float/prefilter_FLP.c" - ] - - -env.drivers_sources+=opus_sources_silk -env.drivers_sources+=opus_sources_lib -env.drivers_sources+=opus_sources - -Export('env') diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 7d0805d238a..14af9ac1a6d 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -45,22 +45,6 @@ #include "platform/windows/export/export.h" #endif -#ifdef TREMOR_ENABLED -#include "teora/audio_stream_ogg.h" -#endif - -#ifdef VORBIS_ENABLED -#include "vorbis/audio_stream_ogg_vorbis.h" -#endif - -#ifdef OPUS_ENABLED -#include "opus/audio_stream_opus.h" -#endif - -#ifdef SPEEX_ENABLED -#include "speex/audio_stream_speex.h" -#endif - #ifdef THEORA_ENABLED #include "theora/video_stream_theora.h" #endif @@ -75,22 +59,6 @@ static ImageLoaderPNG *image_loader_png=NULL; static ResourceSaverPNG *resource_saver_png=NULL; -#ifdef TREMOR_ENABLED -static ResourceFormatLoaderAudioStreamOGG *vorbis_stream_loader=NULL; -#endif - -#ifdef VORBIS_ENABLED -static ResourceFormatLoaderAudioStreamOGGVorbis *vorbis_stream_loader=NULL; -#endif - -#ifdef OPUS_ENABLED -static ResourceFormatLoaderAudioStreamOpus *opus_stream_loader=NULL; -#endif - -#ifdef SPEEX_ENABLED -static ResourceFormatLoaderAudioStreamSpeex *speex_stream_loader=NULL; -#endif - #ifdef THEORA_ENABLED static ResourceFormatLoaderVideoStreamTheora* theora_stream_loader = NULL; #endif @@ -126,35 +94,11 @@ void unregister_core_driver_types() { void register_driver_types() { -#ifdef TREMOR_ENABLED - vorbis_stream_loader=memnew( ResourceFormatLoaderAudioStreamOGG ); - ResourceLoader::add_resource_format_loader(vorbis_stream_loader ); - ObjectTypeDB::register_type(); -#endif - -#ifdef VORBIS_ENABLED - vorbis_stream_loader=memnew( ResourceFormatLoaderAudioStreamOGGVorbis ); - ResourceLoader::add_resource_format_loader(vorbis_stream_loader ); - ObjectTypeDB::register_type(); -#endif - -#ifdef OPUS_ENABLED - opus_stream_loader=memnew( ResourceFormatLoaderAudioStreamOpus ); - ResourceLoader::add_resource_format_loader( opus_stream_loader ); - ObjectTypeDB::register_type(); -#endif - #ifdef TOOLS_ENABLED Geometry::_decompose_func=b2d_decompose; #endif -#ifdef SPEEX_ENABLED - speex_stream_loader=memnew( ResourceFormatLoaderAudioStreamSpeex ); - ResourceLoader::add_resource_format_loader(speex_stream_loader); - ObjectTypeDB::register_type(); -#endif - #ifdef MUSEPACK_ENABLED mpc_stream_loader=memnew( ResourceFormatLoaderAudioStreamMPC ); @@ -188,23 +132,6 @@ void register_driver_types() { void unregister_driver_types() { - -#ifdef TREMOR_ENABLED - memdelete( vorbis_stream_loader ); -#endif - -#ifdef VORBIS_ENABLED - memdelete( vorbis_stream_loader ); -#endif - -#ifdef OPUS_ENABLED - memdelete( opus_stream_loader ); -#endif - -#ifdef SPEEX_ENABLED - memdelete( speex_stream_loader ); -#endif - #ifdef THEORA_ENABLED memdelete (theora_stream_loader); #endif diff --git a/drivers/speex/SCsub b/drivers/speex/SCsub deleted file mode 100644 index 5094b259a2a..00000000000 --- a/drivers/speex/SCsub +++ /dev/null @@ -1,55 +0,0 @@ -Import('env') - - - - -speex_sources = [\ -"speex/bits.c",\ -"speex/buffer.c",\ -"speex/cb_search.c",\ -"speex/exc_10_16_table.c",\ -"speex/exc_10_32_table.c",\ -"speex/exc_20_32_table.c",\ -"speex/exc_5_256_table.c",\ -"speex/exc_5_64_table.c",\ -"speex/exc_8_128_table.c",\ -"speex/fftwrap.c",\ -"speex/filterbank.c",\ -"speex/filters.c",\ -"speex/gain_table.c",\ -"speex/gain_table_lbr.c",\ -"speex/hexc_10_32_table.c",\ -"speex/hexc_table.c",\ -"speex/high_lsp_tables.c",\ -"speex/jitter.c",\ -"speex/kiss_fft.c",\ -"speex/kiss_fftr.c",\ -"speex/lpc.c",\ -"speex/lsp.c",\ -"speex/lsp_tables_nb.c",\ -"speex/ltp.c",\ -"speex/mdf.c",\ -"speex/modes.c",\ -"speex/modes_wb.c",\ -"speex/nb_celp.c",\ -"speex/preprocess.c",\ -"speex/quant_lsp.c",\ -"speex/resample.c",\ -"speex/sb_celp.c",\ -"speex/scal.c",\ -"speex/smallft.c",\ -"speex/speex.c",\ -"speex/speex_callbacks.c",\ -"speex/speex_header.c",\ -"speex/stereo.c",\ -"speex/vbr.c",\ -"speex/vq.c",\ -"speex/window.c",\ -"speex/audio_stream_speex.cpp", -] - -env.drivers_sources+=speex_sources - -#env.add_source_files(env.drivers_sources, speex_sources) - -Export('env') diff --git a/drivers/vorbis/SCsub b/drivers/vorbis/SCsub deleted file mode 100644 index 4afafcc4ba2..00000000000 --- a/drivers/vorbis/SCsub +++ /dev/null @@ -1,36 +0,0 @@ -Import('env') - -sources = [ - "vorbis/audio_stream_ogg_vorbis.cpp", -] - -sources_lib = [ - #"vorbis/analysis.c", - #"vorbis/barkmel.c", - "vorbis/bitrate.c", - "vorbis/block.c", - "vorbis/codebook.c", - "vorbis/envelope.c", - "vorbis/floor0.c", - "vorbis/floor1.c", - "vorbis/info.c", - "vorbis/lookup.c", - "vorbis/lpc.c", - "vorbis/lsp.c", - "vorbis/mapping0.c", - "vorbis/mdct.c", - "vorbis/psy.c", - #"vorbis/psytune.c", - "vorbis/registry.c", - "vorbis/res0.c", - "vorbis/sharedbook.c", - "vorbis/smallft.c", - "vorbis/synthesis.c", - #"vorbis/tone.c", - #"vorbis/vorbisenc.c", - "vorbis/vorbisfile.c", - "vorbis/window.c", -] - -env.drivers_sources += sources -env.drivers_sources += sources_lib diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub new file mode 100644 index 00000000000..42d593f88e4 --- /dev/null +++ b/modules/ogg/SCsub @@ -0,0 +1,20 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +if (env["libogg"] != "system"): # builtin + thirdparty_dir = "#thirdparty/libogg/" + thirdparty_libogg_sources = [ + "bitwise.c", + "framing.c", + ] + thirdparty_libogg_sources = [thirdparty_dir + file for file in thirdparty_libogg_sources] + + env_modules.add_source_files(env.modules_sources, thirdparty_libogg_sources) + env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/ogg/config.py b/modules/ogg/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/ogg/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp new file mode 100644 index 00000000000..823ca510caa --- /dev/null +++ b/modules/ogg/register_types.cpp @@ -0,0 +1,35 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +// Dummy module as libogg is needed by other modules (vorbis, theora, opus, ...) + +void register_ogg_types() {} + +void unregister_ogg_types() {} diff --git a/modules/ogg/register_types.h b/modules/ogg/register_types.h new file mode 100644 index 00000000000..b5268a1df41 --- /dev/null +++ b/modules/ogg/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_ogg_types(); +void unregister_ogg_types(); diff --git a/modules/opus/SCsub b/modules/opus/SCsub new file mode 100644 index 00000000000..a18e008fe0b --- /dev/null +++ b/modules/opus/SCsub @@ -0,0 +1,211 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +if (env["opus"] != "system"): # builtin + thirdparty_dir = "#thirdparty/opus/" + + thirdparty_opus_sources = [ + "silk/tables_other.c", + "silk/sum_sqr_shift.c", + "silk/PLC.c", + "silk/dec_API.c", + "silk/decode_pulses.c", + "silk/inner_prod_aligned.c", + "silk/init_encoder.c", + "silk/interpolate.c", + "silk/stereo_encode_pred.c", + "silk/decode_frame.c", + "silk/NLSF_del_dec_quant.c", + "silk/VAD.c", + "silk/resampler_private_AR2.c", + "silk/NLSF_unpack.c", + "silk/resampler_down2.c", + "silk/sort.c", + "silk/resampler_private_IIR_FIR.c", + "silk/resampler_down2_3.c", + "silk/resampler_private_up2_HQ.c", + "silk/tables_gain.c", + "silk/stereo_find_predictor.c", + "silk/stereo_quant_pred.c", + "silk/NLSF_stabilize.c", + "silk/ana_filt_bank_1.c", + "silk/check_control_input.c", + "silk/bwexpander.c", + "silk/A2NLSF.c", + "silk/LPC_inv_pred_gain.c", + "silk/log2lin.c", + "silk/process_NLSFs.c", + "silk/sigm_Q15.c", + "silk/VQ_WMat_EC.c", + "silk/quant_LTP_gains.c", + "silk/resampler_private_down_FIR.c", + "silk/NLSF_decode.c", + "silk/control_codec.c", + "silk/NLSF_VQ_weights_laroia.c", + "silk/decode_pitch.c", + "silk/stereo_decode_pred.c", + "silk/tables_pulses_per_block.c", + "silk/init_decoder.c", + "silk/table_LSF_cos.c", + "silk/decode_core.c", + "silk/code_signs.c", + "silk/enc_API.c", + "silk/tables_LTP.c", + "silk/pitch_est_tables.c", + "silk/biquad_alt.c", + "silk/encode_indices.c", + "silk/tables_NLSF_CB_WB.c", + "silk/debug.c", + "silk/decode_parameters.c", + "silk/tables_pitch_lag.c", + "silk/NLSF2A.c", + "silk/resampler.c", + "silk/decode_indices.c", + "silk/NLSF_VQ.c", + "silk/bwexpander_32.c", + "silk/tables_NLSF_CB_NB_MB.c", + "silk/encode_pulses.c", + "silk/NSQ_del_dec.c", + "silk/control_SNR.c", + "silk/shell_coder.c", + "silk/NLSF_encode.c", + "silk/stereo_MS_to_LR.c", + "silk/stereo_LR_to_MS.c", + "silk/HP_variable_cutoff.c", + "silk/LPC_analysis_filter.c", + "silk/CNG.c", + "silk/decoder_set_fs.c", + "silk/resampler_rom.c", + "silk/control_audio_bandwidth.c", + "silk/lin2log.c", + "silk/LP_variable_cutoff.c", + "silk/NSQ.c", + "silk/gain_quant.c", + "celt/laplace.c", + "celt/vq.c", + "celt/quant_bands.c", + "celt/kiss_fft.c", + "celt/entcode.c", + "celt/entenc.c", + "celt/celt_lpc.c", + "celt/pitch.c", + "celt/rate.c", + "celt/mathops.c", + #"celt/arm/armcpu.c", + #"celt/arm/celt_neon_intr.c", + #"celt/arm/celt_ne10_mdct.c", + #"celt/arm/celt_ne10_fft.c", + #"celt/arm/arm_celt_map.c", + "celt/celt_encoder.c", + "celt/celt.c", + "celt/bands.c", + "celt/cwrs.c", + "celt/entdec.c", + "celt/celt_decoder.c", + "celt/mdct.c", + "celt/modes.c", + "repacketizer.c", + "mlp_data.c", + "opus_multistream.c", + "opusfile.c", + "opus_encoder.c", + "analysis.c", + "mlp.c", + "info.c", + "stream.c", + "opus_decoder.c", + "internal.c", + "wincerts.c", + "opus.c", + "opus_multistream_encoder.c", + "http.c", + "opus_multistream_decoder.c" + ] + + opus_sources_silk = [] + + if("opus_fixed_point" in env and env.opus_fixed_point=="yes"): + env_modules.Append(CFLAGS = ["-DFIXED_POINT"]) + opus_sources_silk = [ + "silk/fixed/schur64_FIX.c", + "silk/fixed/residual_energy16_FIX.c", + "silk/fixed/encode_frame_FIX.c", + "silk/fixed/regularize_correlations_FIX.c", + "silk/fixed/apply_sine_window_FIX.c", + "silk/fixed/solve_LS_FIX.c", + "silk/fixed/schur_FIX.c", + "silk/fixed/pitch_analysis_core_FIX.c", + "silk/fixed/noise_shape_analysis_FIX.c", + "silk/fixed/find_LTP_FIX.c", + "silk/fixed/vector_ops_FIX.c", + "silk/fixed/autocorr_FIX.c", + "silk/fixed/warped_autocorrelation_FIX.c", + "silk/fixed/find_pitch_lags_FIX.c", + "silk/fixed/k2a_Q16_FIX.c", + "silk/fixed/LTP_scale_ctrl_FIX.c", + "silk/fixed/corrMatrix_FIX.c", + "silk/fixed/prefilter_FIX.c", + "silk/fixed/find_LPC_FIX.c", + "silk/fixed/residual_energy_FIX.c", + "silk/fixed/process_gains_FIX.c", + "silk/fixed/LTP_analysis_filter_FIX.c", + "silk/fixed/k2a_FIX.c", + "silk/fixed/burg_modified_FIX.c", + "silk/fixed/find_pred_coefs_FIX.c" + ] + else: + opus_sources_silk = [ + "silk/float/LTP_scale_ctrl_FLP.c", + "silk/float/regularize_correlations_FLP.c", + "silk/float/corrMatrix_FLP.c", + "silk/float/LPC_analysis_filter_FLP.c", + "silk/float/levinsondurbin_FLP.c", + "silk/float/schur_FLP.c", + "silk/float/scale_vector_FLP.c", + "silk/float/apply_sine_window_FLP.c", + "silk/float/pitch_analysis_core_FLP.c", + "silk/float/wrappers_FLP.c", + "silk/float/bwexpander_FLP.c", + "silk/float/warped_autocorrelation_FLP.c", + "silk/float/solve_LS_FLP.c", + "silk/float/find_LPC_FLP.c", + "silk/float/autocorrelation_FLP.c", + "silk/float/find_pred_coefs_FLP.c", + "silk/float/find_pitch_lags_FLP.c", + "silk/float/burg_modified_FLP.c", + "silk/float/find_LTP_FLP.c", + "silk/float/energy_FLP.c", + "silk/float/sort_FLP.c", + "silk/float/LPC_inv_pred_gain_FLP.c", + "silk/float/k2a_FLP.c", + "silk/float/noise_shape_analysis_FLP.c", + "silk/float/inner_product_FLP.c", + "silk/float/process_gains_FLP.c", + "silk/float/encode_frame_FLP.c", + "silk/float/scale_copy_vector_FLP.c", + "silk/float/residual_energy_FLP.c", + "silk/float/LTP_analysis_filter_FLP.c", + "silk/float/prefilter_FLP.c" + ] + + thirdparty_opus_sources = [thirdparty_dir + file for file in thirdparty_opus_sources + opus_sources_silk] + + env_modules.add_source_files(env.modules_sources, thirdparty_opus_sources) + # FIXME: Clone the environment to make a env_opus and not pollute the modules env + env_modules.Append(CFLAGS=["-DHAVE_CONFIG_H"]) + + thirdparty_include_paths = [ + "", + "celt", + "silk", + "silk/fixed", + "silk/float", + ] + env_modules.Append(CPPPATH = [thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) + +# Module files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/drivers/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp similarity index 100% rename from drivers/opus/audio_stream_opus.cpp rename to modules/opus/audio_stream_opus.cpp diff --git a/drivers/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h similarity index 98% rename from drivers/opus/audio_stream_opus.h rename to modules/opus/audio_stream_opus.h index fc5531470d1..4da66fe1672 100644 --- a/drivers/opus/audio_stream_opus.h +++ b/modules/opus/audio_stream_opus.h @@ -32,11 +32,11 @@ #ifndef AUDIO_STREAM_OPUS_H #define AUDIO_STREAM_OPUS_H -#include "scene/resources/audio_stream.h" -#include "opus/opusfile.h" -#include "opus/internal.h" -#include "os/file_access.h" #include "io/resource_loader.h" +#include "os/file_access.h" +#include "scene/resources/audio_stream.h" + +#include class AudioStreamPlaybackOpus : public AudioStreamPlayback { diff --git a/modules/opus/config.py b/modules/opus/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/opus/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/opus/register_types.cpp b/modules/opus/register_types.cpp new file mode 100644 index 00000000000..a4d71a52c77 --- /dev/null +++ b/modules/opus/register_types.cpp @@ -0,0 +1,45 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "audio_stream_opus.h" + +static ResourceFormatLoaderAudioStreamOpus *opus_stream_loader = NULL; + +void register_opus_types() { + + opus_stream_loader = memnew( ResourceFormatLoaderAudioStreamOpus ); + ResourceLoader::add_resource_format_loader(opus_stream_loader); + ObjectTypeDB::register_type(); +} + +void unregister_opus_types() { + + memdelete( opus_stream_loader ); +} diff --git a/modules/opus/register_types.h b/modules/opus/register_types.h new file mode 100644 index 00000000000..f4386c373a7 --- /dev/null +++ b/modules/opus/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_opus_types(); +void unregister_opus_types(); diff --git a/modules/speex/SCsub b/modules/speex/SCsub new file mode 100644 index 00000000000..dce26bf4c2a --- /dev/null +++ b/modules/speex/SCsub @@ -0,0 +1,66 @@ +#!/usr/bin/env python + +Import('env') +Import('env_modules') + +env_speex = env_modules.Clone() + +# Thirdparty source files +if (env["speex"] != "system"): # builtin + thirdparty_dir = "#thirdparty/speex/" + + thirdparty_sources = [ + "bits.c", + "buffer.c", + "cb_search.c", + "exc_10_16_table.c", + "exc_10_32_table.c", + "exc_20_32_table.c", + "exc_5_256_table.c", + "exc_5_64_table.c", + "exc_8_128_table.c", + "fftwrap.c", + "filterbank.c", + "filters.c", + "gain_table.c", + "gain_table_lbr.c", + "hexc_10_32_table.c", + "hexc_table.c", + "high_lsp_tables.c", + "jitter.c", + "kiss_fft.c", + "kiss_fftr.c", + "lpc.c", + "lsp.c", + "lsp_tables_nb.c", + "ltp.c", + "mdf.c", + "modes.c", + "modes_wb.c", + "nb_celp.c", + "preprocess.c", + "quant_lsp.c", + "resample.c", + "sb_celp.c", + "scal.c", + "smallft.c", + "speex.c", + "speex_callbacks.c", + "speex_header.c", + "stereo.c", + "vbr.c", + "vq.c", + "window.c", + ] + + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + + env_speex.add_source_files(env.modules_sources, thirdparty_sources) + env_speex.Append(CPPPATH = [thirdparty_dir]) + + # also requires libogg + if (env["libogg"] != "system"): # builtin + env_speex.Append(CPPPATH = ["#thirdparty/libogg"]) + +# Module files +env_speex.add_source_files(env.modules_sources, "*.cpp") diff --git a/drivers/speex/audio_stream_speex.cpp b/modules/speex/audio_stream_speex.cpp similarity index 100% rename from drivers/speex/audio_stream_speex.cpp rename to modules/speex/audio_stream_speex.cpp diff --git a/drivers/speex/audio_stream_speex.h b/modules/speex/audio_stream_speex.h similarity index 95% rename from drivers/speex/audio_stream_speex.h rename to modules/speex/audio_stream_speex.h index 491c593e474..e321d770585 100644 --- a/drivers/speex/audio_stream_speex.h +++ b/modules/speex/audio_stream_speex.h @@ -30,7 +30,6 @@ #define AUDIO_STREAM_SPEEX_H #include "scene/resources/audio_stream.h" -#include "speex/speex.h" #include "os/file_access.h" #include "io/resource_loader.h" #include "os/thread_safe.h" @@ -39,6 +38,10 @@ #include #include #include +// (akien) Prevents unbundling properly, but it's only for 2.1.x as speex +// is dropped in 3.0+, so don't want to lose too much time on this. +// Needed for speex_free (internal). +#include "thirdparty/speex/os_support.h" #include diff --git a/modules/speex/config.py b/modules/speex/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/speex/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/speex/register_types.cpp b/modules/speex/register_types.cpp new file mode 100644 index 00000000000..fc8f87c78ae --- /dev/null +++ b/modules/speex/register_types.cpp @@ -0,0 +1,45 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "audio_stream_speex.h" + +static ResourceFormatLoaderAudioStreamSpeex *speex_stream_loader = NULL; + +void register_speex_types() { + + speex_stream_loader = memnew( ResourceFormatLoaderAudioStreamSpeex ); + ResourceLoader::add_resource_format_loader(speex_stream_loader); + ObjectTypeDB::register_type(); +} + +void unregister_speex_types() { + + memdelete( speex_stream_loader ); +} diff --git a/modules/speex/register_types.h b/modules/speex/register_types.h new file mode 100644 index 00000000000..c93384e7142 --- /dev/null +++ b/modules/speex/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_speex_types(); +void unregister_speex_types(); diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub new file mode 100644 index 00000000000..5427348c394 --- /dev/null +++ b/modules/vorbis/SCsub @@ -0,0 +1,44 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +if (env["libvorbis"] != "system"): # builtin + thirdparty_dir = "#thirdparty/libvorbis/" + thirdparty_libvorbis_sources = [ + #"analysis.c", + #"barkmel.c", + "bitrate.c", + "block.c", + "codebook.c", + "envelope.c", + "floor0.c", + "floor1.c", + "info.c", + "lookup.c", + "lpc.c", + "lsp.c", + "mapping0.c", + "mdct.c", + "psy.c", + #"psytune.c", + "registry.c", + "res0.c", + "sharedbook.c", + "smallft.c", + "synthesis.c", + #"tone.c", + #"vorbisenc.c", + "vorbisfile.c", + "window.c", + ] + + thirdparty_libvorbis_sources = [thirdparty_dir + file for file in thirdparty_libvorbis_sources] + + env_modules.add_source_files(env.modules_sources, thirdparty_libvorbis_sources) + env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/drivers/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp similarity index 100% rename from drivers/vorbis/audio_stream_ogg_vorbis.cpp rename to modules/vorbis/audio_stream_ogg_vorbis.cpp diff --git a/drivers/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h similarity index 99% rename from drivers/vorbis/audio_stream_ogg_vorbis.h rename to modules/vorbis/audio_stream_ogg_vorbis.h index bb4d521c1e2..8d8d7392b5d 100644 --- a/drivers/vorbis/audio_stream_ogg_vorbis.h +++ b/modules/vorbis/audio_stream_ogg_vorbis.h @@ -29,12 +29,12 @@ #ifndef AUDIO_STREAM_OGG_VORBIS_H #define AUDIO_STREAM_OGG_VORBIS_H -#include "scene/resources/audio_stream.h" -#include "vorbis/vorbisfile.h" -#include "os/file_access.h" #include "io/resource_loader.h" +#include "os/file_access.h" #include "os/thread_safe.h" +#include "scene/resources/audio_stream.h" +#include class AudioStreamPlaybackOGGVorbis : public AudioStreamPlayback { diff --git a/modules/vorbis/config.py b/modules/vorbis/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/vorbis/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/vorbis/register_types.cpp b/modules/vorbis/register_types.cpp new file mode 100644 index 00000000000..ae63b5af3c4 --- /dev/null +++ b/modules/vorbis/register_types.cpp @@ -0,0 +1,45 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "audio_stream_ogg_vorbis.h" + +static ResourceFormatLoaderAudioStreamOGGVorbis *vorbis_stream_loader = NULL; + +void register_vorbis_types() { + + vorbis_stream_loader = memnew( ResourceFormatLoaderAudioStreamOGGVorbis ); + ResourceLoader::add_resource_format_loader(vorbis_stream_loader); + ObjectTypeDB::register_type(); +} + +void unregister_vorbis_types() { + + memdelete( vorbis_stream_loader ); +} diff --git a/modules/vorbis/register_types.h b/modules/vorbis/register_types.h new file mode 100644 index 00000000000..6baaed7ce88 --- /dev/null +++ b/modules/vorbis/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_vorbis_types(); +void unregister_vorbis_types(); diff --git a/platform/android/detect.py b/platform/android/detect.py index a5640f9507e..a94aae3c29d 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -204,7 +204,8 @@ def configure(env): env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED', '-DNO_FCNTL','-DMPC_FIXED_POINT']) # env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED','-DMPC_FIXED_POINT']) - if(env["opus"]=="yes"): + # TODO: Move that to opus module's config + if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"): if (env["android_arch"]=="armv6" or env["android_arch"]=="armv7"): env.Append(CFLAGS=["-DOPUS_ARM_OPT"]) env.opus_fixed_point="yes" diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 9cb52d45612..3de0ba0db9d 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -165,7 +165,8 @@ def configure(env): env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate' env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DMPC_FIXED_POINT']) - if(env["opus"]=="yes"): + # TODO: Move that to opus module's config + if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"): env.opus_fixed_point="yes" if env["arch"]=="x86": pass diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 3ff299c5b9b..6f96aa33714 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -28,7 +28,7 @@ def get_flags(): ('theora', 'no'), ('musepack', 'no'), ('squish', 'no'), - ('speex', 'no'), + ('module_speex_enabled', 'no'), ('etc1', 'no'), ] @@ -70,8 +70,9 @@ def configure(env): #env.Append(CCFLAGS=['-D_DEBUG', '-Wall', '-g4', '-DDEBUG_ENABLED']) env.Append(CPPFLAGS=['-DDEBUG_MEMORY_ALLOC']) - if(env["opus"]=="yes"): - env.opus_fixed_point="yes" + # TODO: Move that to opus module's config + if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"): + env.opus_fixed_point = "yes" env.Append(CPPFLAGS=["-fno-exceptions",'-DNO_SAFE_CAST','-fno-rtti']) env.Append(CPPFLAGS=['-DJAVASCRIPT_ENABLED', '-DUNIX_ENABLED', '-DPTHREAD_NO_RENAME', '-DNO_FCNTL','-DMPC_FIXED_POINT','-DTYPED_METHOD_BIND','-DNO_THREADS']) diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 94429f91b0b..2e646feda62 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -154,6 +154,17 @@ def configure(env): + if (env["libogg"] == "system"): + env.ParseConfig('pkg-config ogg --cflags --libs') + + if (env["libvorbis"] == "system"): + env["libogg"] = "system" # Needed to link against system libvorbis + env.ParseConfig('pkg-config vorbis vorbisfile ogg --cflags --libs') + + if (env["opus"] == "system"): + env["libogg"] = "system" # Needed to link against system opus + env.ParseConfig('pkg-config opus opusfile ogg --cflags --libs') + env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) diff --git a/thirdparty/README.md b/thirdparty/README.md index 969b5be6ab5..6bfd9adf805 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -12,6 +12,19 @@ Files extracted from upstream source: - jpgd.{c,h} +## libogg + +- Upstream: https://www.xiph.org/ogg +- Version: 1.3.2 +- License: BSD-3-Clause + +Files extracted from upstream source: + +- src/\*.c +- include/ogg/\*.h in ogg/ +- COPYING + + ## libpng - Upstream: http://libpng.org/pub/png/libpng.html @@ -27,6 +40,19 @@ Files extracted from upstream source: - scripts/pnglibconf.h.prebuilt as pnglibconf.h +## libvorbis + +- Upstream: https://www.xiph.org/vorbis +- Version: 1.3.5 +- License: BSD-3-Clause + +Files extracted from upstream source: + +- src/\* except from: lookups.pl, Makefile.\* +- include/vorbis/\*.h as vorbis/ +- COPYING + + ## libwebp - Upstream: https://chromium.googlesource.com/webm/libwebp/ @@ -43,6 +69,20 @@ changes to ensure they build for Javascript/HTML5. Those changes are marked with `// -- GODOT --` comments. +## opus + +- Upstream: https://opus-codec.org +- Version: 1.1.2 (opus) and 0.7 (opusfile) +- License: BSD-3-Clause + +Files extracted from upstream source: + +- all .c and .h files in src/ (both opus and opusfile), + except opus_demo.c +- all .h files in include/ (both opus and opusfile) +- COPYING + + ## pvrtccompressor - Upstream: https://bitbucket.org/jthlim/pvrtccompressor @@ -64,3 +104,10 @@ Files extracted from upstream source: Files extracted from upstream source: - all of them: rg_etc1.{cpp,h} + + +## speex + +- Upstream: http://speex.org/ +- Version: 1.2rc1? +- License: BSD-3-Clause diff --git a/drivers/ogg/COPYING b/thirdparty/libogg/COPYING similarity index 100% rename from drivers/ogg/COPYING rename to thirdparty/libogg/COPYING diff --git a/drivers/ogg/bitwise.c b/thirdparty/libogg/bitwise.c similarity index 100% rename from drivers/ogg/bitwise.c rename to thirdparty/libogg/bitwise.c diff --git a/drivers/ogg/framing.c b/thirdparty/libogg/framing.c similarity index 100% rename from drivers/ogg/framing.c rename to thirdparty/libogg/framing.c diff --git a/drivers/ogg/config_types.h b/thirdparty/libogg/ogg/config_types.h similarity index 100% rename from drivers/ogg/config_types.h rename to thirdparty/libogg/ogg/config_types.h diff --git a/drivers/ogg/ogg.h b/thirdparty/libogg/ogg/ogg.h similarity index 100% rename from drivers/ogg/ogg.h rename to thirdparty/libogg/ogg/ogg.h diff --git a/drivers/ogg/os_types.h b/thirdparty/libogg/ogg/os_types.h similarity index 100% rename from drivers/ogg/os_types.h rename to thirdparty/libogg/ogg/os_types.h diff --git a/drivers/vorbis/COPYING b/thirdparty/libvorbis/COPYING similarity index 100% rename from drivers/vorbis/COPYING rename to thirdparty/libvorbis/COPYING diff --git a/drivers/vorbis/analysis.c b/thirdparty/libvorbis/analysis.c similarity index 100% rename from drivers/vorbis/analysis.c rename to thirdparty/libvorbis/analysis.c diff --git a/drivers/vorbis/backends.h b/thirdparty/libvorbis/backends.h similarity index 100% rename from drivers/vorbis/backends.h rename to thirdparty/libvorbis/backends.h diff --git a/drivers/vorbis/barkmel.c b/thirdparty/libvorbis/barkmel.c similarity index 100% rename from drivers/vorbis/barkmel.c rename to thirdparty/libvorbis/barkmel.c diff --git a/drivers/vorbis/bitrate.c b/thirdparty/libvorbis/bitrate.c similarity index 100% rename from drivers/vorbis/bitrate.c rename to thirdparty/libvorbis/bitrate.c diff --git a/drivers/vorbis/bitrate.h b/thirdparty/libvorbis/bitrate.h similarity index 100% rename from drivers/vorbis/bitrate.h rename to thirdparty/libvorbis/bitrate.h diff --git a/drivers/vorbis/block.c b/thirdparty/libvorbis/block.c similarity index 100% rename from drivers/vorbis/block.c rename to thirdparty/libvorbis/block.c diff --git a/drivers/vorbis/books/coupled/res_books_51.h b/thirdparty/libvorbis/books/coupled/res_books_51.h similarity index 100% rename from drivers/vorbis/books/coupled/res_books_51.h rename to thirdparty/libvorbis/books/coupled/res_books_51.h diff --git a/drivers/vorbis/books/coupled/res_books_stereo.h b/thirdparty/libvorbis/books/coupled/res_books_stereo.h similarity index 100% rename from drivers/vorbis/books/coupled/res_books_stereo.h rename to thirdparty/libvorbis/books/coupled/res_books_stereo.h diff --git a/drivers/vorbis/books/floor/floor_books.h b/thirdparty/libvorbis/books/floor/floor_books.h similarity index 100% rename from drivers/vorbis/books/floor/floor_books.h rename to thirdparty/libvorbis/books/floor/floor_books.h diff --git a/drivers/vorbis/books/uncoupled/res_books_uncoupled.h b/thirdparty/libvorbis/books/uncoupled/res_books_uncoupled.h similarity index 100% rename from drivers/vorbis/books/uncoupled/res_books_uncoupled.h rename to thirdparty/libvorbis/books/uncoupled/res_books_uncoupled.h diff --git a/drivers/vorbis/codebook.c b/thirdparty/libvorbis/codebook.c similarity index 100% rename from drivers/vorbis/codebook.c rename to thirdparty/libvorbis/codebook.c diff --git a/drivers/vorbis/codebook.h b/thirdparty/libvorbis/codebook.h similarity index 100% rename from drivers/vorbis/codebook.h rename to thirdparty/libvorbis/codebook.h diff --git a/drivers/vorbis/codec_internal.h b/thirdparty/libvorbis/codec_internal.h similarity index 100% rename from drivers/vorbis/codec_internal.h rename to thirdparty/libvorbis/codec_internal.h diff --git a/drivers/vorbis/envelope.c b/thirdparty/libvorbis/envelope.c similarity index 100% rename from drivers/vorbis/envelope.c rename to thirdparty/libvorbis/envelope.c diff --git a/drivers/vorbis/envelope.h b/thirdparty/libvorbis/envelope.h similarity index 100% rename from drivers/vorbis/envelope.h rename to thirdparty/libvorbis/envelope.h diff --git a/drivers/vorbis/floor0.c b/thirdparty/libvorbis/floor0.c similarity index 100% rename from drivers/vorbis/floor0.c rename to thirdparty/libvorbis/floor0.c diff --git a/drivers/vorbis/floor1.c b/thirdparty/libvorbis/floor1.c similarity index 100% rename from drivers/vorbis/floor1.c rename to thirdparty/libvorbis/floor1.c diff --git a/drivers/vorbis/highlevel.h b/thirdparty/libvorbis/highlevel.h similarity index 100% rename from drivers/vorbis/highlevel.h rename to thirdparty/libvorbis/highlevel.h diff --git a/drivers/vorbis/info.c b/thirdparty/libvorbis/info.c similarity index 100% rename from drivers/vorbis/info.c rename to thirdparty/libvorbis/info.c diff --git a/drivers/vorbis/lookup.c b/thirdparty/libvorbis/lookup.c similarity index 100% rename from drivers/vorbis/lookup.c rename to thirdparty/libvorbis/lookup.c diff --git a/drivers/vorbis/lookup.h b/thirdparty/libvorbis/lookup.h similarity index 100% rename from drivers/vorbis/lookup.h rename to thirdparty/libvorbis/lookup.h diff --git a/drivers/vorbis/lookup_data.h b/thirdparty/libvorbis/lookup_data.h similarity index 100% rename from drivers/vorbis/lookup_data.h rename to thirdparty/libvorbis/lookup_data.h diff --git a/drivers/vorbis/lpc.c b/thirdparty/libvorbis/lpc.c similarity index 100% rename from drivers/vorbis/lpc.c rename to thirdparty/libvorbis/lpc.c diff --git a/drivers/vorbis/lpc.h b/thirdparty/libvorbis/lpc.h similarity index 100% rename from drivers/vorbis/lpc.h rename to thirdparty/libvorbis/lpc.h diff --git a/drivers/vorbis/lsp.c b/thirdparty/libvorbis/lsp.c similarity index 100% rename from drivers/vorbis/lsp.c rename to thirdparty/libvorbis/lsp.c diff --git a/drivers/vorbis/lsp.h b/thirdparty/libvorbis/lsp.h similarity index 100% rename from drivers/vorbis/lsp.h rename to thirdparty/libvorbis/lsp.h diff --git a/drivers/vorbis/mapping0.c b/thirdparty/libvorbis/mapping0.c similarity index 100% rename from drivers/vorbis/mapping0.c rename to thirdparty/libvorbis/mapping0.c diff --git a/drivers/vorbis/masking.h b/thirdparty/libvorbis/masking.h similarity index 100% rename from drivers/vorbis/masking.h rename to thirdparty/libvorbis/masking.h diff --git a/drivers/vorbis/mdct.c b/thirdparty/libvorbis/mdct.c similarity index 100% rename from drivers/vorbis/mdct.c rename to thirdparty/libvorbis/mdct.c diff --git a/drivers/vorbis/mdct.h b/thirdparty/libvorbis/mdct.h similarity index 100% rename from drivers/vorbis/mdct.h rename to thirdparty/libvorbis/mdct.h diff --git a/drivers/vorbis/misc.h b/thirdparty/libvorbis/misc.h similarity index 100% rename from drivers/vorbis/misc.h rename to thirdparty/libvorbis/misc.h diff --git a/drivers/vorbis/modes/floor_all.h b/thirdparty/libvorbis/modes/floor_all.h similarity index 100% rename from drivers/vorbis/modes/floor_all.h rename to thirdparty/libvorbis/modes/floor_all.h diff --git a/drivers/vorbis/modes/psych_11.h b/thirdparty/libvorbis/modes/psych_11.h similarity index 100% rename from drivers/vorbis/modes/psych_11.h rename to thirdparty/libvorbis/modes/psych_11.h diff --git a/drivers/vorbis/modes/psych_16.h b/thirdparty/libvorbis/modes/psych_16.h similarity index 100% rename from drivers/vorbis/modes/psych_16.h rename to thirdparty/libvorbis/modes/psych_16.h diff --git a/drivers/vorbis/modes/psych_44.h b/thirdparty/libvorbis/modes/psych_44.h similarity index 100% rename from drivers/vorbis/modes/psych_44.h rename to thirdparty/libvorbis/modes/psych_44.h diff --git a/drivers/vorbis/modes/psych_8.h b/thirdparty/libvorbis/modes/psych_8.h similarity index 100% rename from drivers/vorbis/modes/psych_8.h rename to thirdparty/libvorbis/modes/psych_8.h diff --git a/drivers/vorbis/modes/residue_16.h b/thirdparty/libvorbis/modes/residue_16.h similarity index 100% rename from drivers/vorbis/modes/residue_16.h rename to thirdparty/libvorbis/modes/residue_16.h diff --git a/drivers/vorbis/modes/residue_44.h b/thirdparty/libvorbis/modes/residue_44.h similarity index 100% rename from drivers/vorbis/modes/residue_44.h rename to thirdparty/libvorbis/modes/residue_44.h diff --git a/drivers/vorbis/modes/residue_44p51.h b/thirdparty/libvorbis/modes/residue_44p51.h similarity index 100% rename from drivers/vorbis/modes/residue_44p51.h rename to thirdparty/libvorbis/modes/residue_44p51.h diff --git a/drivers/vorbis/modes/residue_44u.h b/thirdparty/libvorbis/modes/residue_44u.h similarity index 100% rename from drivers/vorbis/modes/residue_44u.h rename to thirdparty/libvorbis/modes/residue_44u.h diff --git a/drivers/vorbis/modes/residue_8.h b/thirdparty/libvorbis/modes/residue_8.h similarity index 100% rename from drivers/vorbis/modes/residue_8.h rename to thirdparty/libvorbis/modes/residue_8.h diff --git a/drivers/vorbis/modes/setup_11.h b/thirdparty/libvorbis/modes/setup_11.h similarity index 100% rename from drivers/vorbis/modes/setup_11.h rename to thirdparty/libvorbis/modes/setup_11.h diff --git a/drivers/vorbis/modes/setup_16.h b/thirdparty/libvorbis/modes/setup_16.h similarity index 100% rename from drivers/vorbis/modes/setup_16.h rename to thirdparty/libvorbis/modes/setup_16.h diff --git a/drivers/vorbis/modes/setup_22.h b/thirdparty/libvorbis/modes/setup_22.h similarity index 100% rename from drivers/vorbis/modes/setup_22.h rename to thirdparty/libvorbis/modes/setup_22.h diff --git a/drivers/vorbis/modes/setup_32.h b/thirdparty/libvorbis/modes/setup_32.h similarity index 100% rename from drivers/vorbis/modes/setup_32.h rename to thirdparty/libvorbis/modes/setup_32.h diff --git a/drivers/vorbis/modes/setup_44.h b/thirdparty/libvorbis/modes/setup_44.h similarity index 100% rename from drivers/vorbis/modes/setup_44.h rename to thirdparty/libvorbis/modes/setup_44.h diff --git a/drivers/vorbis/modes/setup_44p51.h b/thirdparty/libvorbis/modes/setup_44p51.h similarity index 100% rename from drivers/vorbis/modes/setup_44p51.h rename to thirdparty/libvorbis/modes/setup_44p51.h diff --git a/drivers/vorbis/modes/setup_44u.h b/thirdparty/libvorbis/modes/setup_44u.h similarity index 100% rename from drivers/vorbis/modes/setup_44u.h rename to thirdparty/libvorbis/modes/setup_44u.h diff --git a/drivers/vorbis/modes/setup_8.h b/thirdparty/libvorbis/modes/setup_8.h similarity index 100% rename from drivers/vorbis/modes/setup_8.h rename to thirdparty/libvorbis/modes/setup_8.h diff --git a/drivers/vorbis/modes/setup_X.h b/thirdparty/libvorbis/modes/setup_X.h similarity index 100% rename from drivers/vorbis/modes/setup_X.h rename to thirdparty/libvorbis/modes/setup_X.h diff --git a/drivers/vorbis/os.h b/thirdparty/libvorbis/os.h similarity index 100% rename from drivers/vorbis/os.h rename to thirdparty/libvorbis/os.h diff --git a/drivers/vorbis/psy.c b/thirdparty/libvorbis/psy.c similarity index 100% rename from drivers/vorbis/psy.c rename to thirdparty/libvorbis/psy.c diff --git a/drivers/vorbis/psy.h b/thirdparty/libvorbis/psy.h similarity index 100% rename from drivers/vorbis/psy.h rename to thirdparty/libvorbis/psy.h diff --git a/drivers/vorbis/psytune.c b/thirdparty/libvorbis/psytune.c similarity index 100% rename from drivers/vorbis/psytune.c rename to thirdparty/libvorbis/psytune.c diff --git a/drivers/vorbis/registry.c b/thirdparty/libvorbis/registry.c similarity index 100% rename from drivers/vorbis/registry.c rename to thirdparty/libvorbis/registry.c diff --git a/drivers/vorbis/registry.h b/thirdparty/libvorbis/registry.h similarity index 100% rename from drivers/vorbis/registry.h rename to thirdparty/libvorbis/registry.h diff --git a/drivers/vorbis/res0.c b/thirdparty/libvorbis/res0.c similarity index 100% rename from drivers/vorbis/res0.c rename to thirdparty/libvorbis/res0.c diff --git a/drivers/vorbis/scales.h b/thirdparty/libvorbis/scales.h similarity index 100% rename from drivers/vorbis/scales.h rename to thirdparty/libvorbis/scales.h diff --git a/drivers/vorbis/sharedbook.c b/thirdparty/libvorbis/sharedbook.c similarity index 100% rename from drivers/vorbis/sharedbook.c rename to thirdparty/libvorbis/sharedbook.c diff --git a/drivers/vorbis/smallft.c b/thirdparty/libvorbis/smallft.c similarity index 100% rename from drivers/vorbis/smallft.c rename to thirdparty/libvorbis/smallft.c diff --git a/drivers/vorbis/smallft.h b/thirdparty/libvorbis/smallft.h similarity index 100% rename from drivers/vorbis/smallft.h rename to thirdparty/libvorbis/smallft.h diff --git a/drivers/vorbis/synthesis.c b/thirdparty/libvorbis/synthesis.c similarity index 100% rename from drivers/vorbis/synthesis.c rename to thirdparty/libvorbis/synthesis.c diff --git a/drivers/vorbis/tone.c b/thirdparty/libvorbis/tone.c similarity index 100% rename from drivers/vorbis/tone.c rename to thirdparty/libvorbis/tone.c diff --git a/drivers/vorbis/codec.h b/thirdparty/libvorbis/vorbis/codec.h similarity index 100% rename from drivers/vorbis/codec.h rename to thirdparty/libvorbis/vorbis/codec.h diff --git a/drivers/vorbis/vorbisenc.h b/thirdparty/libvorbis/vorbis/vorbisenc.h similarity index 100% rename from drivers/vorbis/vorbisenc.h rename to thirdparty/libvorbis/vorbis/vorbisenc.h diff --git a/drivers/vorbis/vorbisfile.h b/thirdparty/libvorbis/vorbis/vorbisfile.h similarity index 100% rename from drivers/vorbis/vorbisfile.h rename to thirdparty/libvorbis/vorbis/vorbisfile.h diff --git a/drivers/vorbis/vorbisenc.c b/thirdparty/libvorbis/vorbisenc.c similarity index 100% rename from drivers/vorbis/vorbisenc.c rename to thirdparty/libvorbis/vorbisenc.c diff --git a/drivers/vorbis/vorbisfile.c b/thirdparty/libvorbis/vorbisfile.c similarity index 100% rename from drivers/vorbis/vorbisfile.c rename to thirdparty/libvorbis/vorbisfile.c diff --git a/drivers/vorbis/window.c b/thirdparty/libvorbis/window.c similarity index 100% rename from drivers/vorbis/window.c rename to thirdparty/libvorbis/window.c diff --git a/drivers/vorbis/window.h b/thirdparty/libvorbis/window.h similarity index 100% rename from drivers/vorbis/window.h rename to thirdparty/libvorbis/window.h diff --git a/drivers/opus/COPYING b/thirdparty/opus/COPYING similarity index 100% rename from drivers/opus/COPYING rename to thirdparty/opus/COPYING diff --git a/drivers/opus/analysis.c b/thirdparty/opus/analysis.c similarity index 98% rename from drivers/opus/analysis.c rename to thirdparty/opus/analysis.c index 6a0cd301132..360ebcc8ddb 100644 --- a/drivers/opus/analysis.c +++ b/thirdparty/opus/analysis.c @@ -24,17 +24,20 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/celt.h" -#include "opus/celt/modes.h" -#include "opus/celt/arch.h" -#include "opus/celt/quant_bands.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "kiss_fft.h" +#include "celt.h" +#include "modes.h" +#include "arch.h" +#include "quant_bands.h" #include -#include "opus/analysis.h" -#include "opus/mlp.h" -#include "opus/celt/stack_alloc.h" +#include "analysis.h" +#include "mlp.h" +#include "stack_alloc.h" #ifndef M_PI #define M_PI 3.141592653 @@ -273,7 +276,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt downmix(x, &tonal->inmem[240], remaining, offset+ANALYSIS_BUF_SIZE-tonal->mem_fill, c1, c2, C); tonal->mem_fill = 240 + remaining; opus_fft(kfft, in, out, tonal->arch); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT /* If there's any NaN on the input, the entire output will be NaN, so we only need to check one value. */ if (celt_isnan(out[0].r)) { @@ -345,7 +348,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt { float binE = out[i].r*(float)out[i].r + out[N-i].r*(float)out[N-i].r + out[i].i*(float)out[i].i + out[N-i].i*(float)out[N-i].i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* FIXME: It's probably best to change the BFCC filter initial state instead */ binE *= 5.55e-17f; #endif @@ -353,7 +356,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt tE += binE*tonality[i]; nE += binE*2.f*(.5f-noisiness[i]); } -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT /* Check for extreme band energies that could cause NaNs later. */ if (!(E<1e9f) || celt_isnan(E)) { @@ -411,7 +414,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt bandwidth = 0; maxE = 0; noise_floor = 5.7e-4f/(1<<(IMAX(0,lsb_depth-8))); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT noise_floor *= 1<<(15+SIG_SHIFT); #endif noise_floor *= noise_floor; diff --git a/drivers/opus/analysis.h b/thirdparty/opus/analysis.h similarity index 98% rename from drivers/opus/analysis.h rename to thirdparty/opus/analysis.h index 9d81164e254..9eae56a5253 100644 --- a/drivers/opus/analysis.h +++ b/thirdparty/opus/analysis.h @@ -28,8 +28,8 @@ #ifndef ANALYSIS_H #define ANALYSIS_H -#include "opus/celt/celt.h" -#include "opus/opus_private.h" +#include "celt.h" +#include "opus_private.h" #define NB_FRAMES 8 #define NB_TBANDS 18 diff --git a/drivers/opus/celt/_kiss_fft_guts.h b/thirdparty/opus/celt/_kiss_fft_guts.h similarity index 96% rename from drivers/opus/celt/_kiss_fft_guts.h rename to thirdparty/opus/celt/_kiss_fft_guts.h index a41f9a1a05a..5e3d58fd664 100644 --- a/drivers/opus/celt/_kiss_fft_guts.h +++ b/thirdparty/opus/celt/_kiss_fft_guts.h @@ -33,7 +33,7 @@ defines kiss_fft_scalar as either short or a float type and defines typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */ -#include "opus/celt/kiss_fft.h" +#include "kiss_fft.h" /* Explanation of macros dealing with complex math: @@ -44,8 +44,8 @@ C_SUBFROM( res , a) : res -= a C_ADDTO( res , a) : res += a * */ -#ifdef OPUS_FIXED_POINT -#include "opus/celt/arch.h" +#ifdef FIXED_POINT +#include "arch.h" #define SAMP_MAX 2147483647 @@ -91,14 +91,14 @@ }while(0) #if defined(OPUS_ARM_INLINE_ASM) -#include "opus/celt/arm/kiss_fft_armv4.h" +#include "arm/kiss_fft_armv4.h" #endif #if defined(OPUS_ARM_INLINE_EDSP) -#include "opus/celt/arm/kiss_fft_armv5e.h" +#include "arm/kiss_fft_armv5e.h" #endif #if defined(MIPSr1_ASM) -#include "opus/celt/mips/kiss_fft_mipsr1.h" +#include "mips/kiss_fft_mipsr1.h" #endif #else /* not FIXED_POINT*/ @@ -151,7 +151,7 @@ }while(0) #endif /* C_ADD defined */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /*# define KISS_FFT_COS(phase) TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase)))) # define KISS_FFT_SIN(phase) TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))*/ # define KISS_FFT_COS(phase) floor(.5+TWID_MAX*cos (phase)) diff --git a/drivers/opus/celt/arch.h b/thirdparty/opus/celt/arch.h similarity index 96% rename from drivers/opus/celt/arch.h rename to thirdparty/opus/celt/arch.h index 7fb036e9fea..9f74ddd2671 100644 --- a/drivers/opus/celt/arch.h +++ b/thirdparty/opus/celt/arch.h @@ -34,8 +34,8 @@ #ifndef ARCH_H #define ARCH_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" # if !defined(__GNUC_PREREQ) # if defined(__GNUC__)&&defined(__GNUC_MINOR__) @@ -80,7 +80,7 @@ static OPUS_INLINE void _celt_fatal(const char *str, const char *file, int line) #define PRINT_MIPS(file) -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT typedef opus_int16 opus_val16; typedef opus_int32 opus_val32; @@ -113,15 +113,15 @@ static OPUS_INLINE opus_int16 SAT16(opus_int32 x) { } #ifdef FIXED_DEBUG -#include "opus/celt/fixed_debug.h" +#include "fixed_debug.h" #else -#include "opus/celt/fixed_generic.h" +#include "fixed_generic.h" #ifdef OPUS_ARM_INLINE_EDSP -#include "opus/celt/arm/fixed_armv5e.h" +#include "arm/fixed_armv5e.h" #elif defined (OPUS_ARM_INLINE_ASM) -#include "opus/celt/arm/fixed_armv4.h" +#include "arm/fixed_armv4.h" #elif defined (BFIN_ASM) #include "fixed_bfin.h" #elif defined (TI_C5X_ASM) @@ -231,7 +231,7 @@ static OPUS_INLINE int celt_isnan(float x) #endif /* !FIXED_POINT */ #ifndef GLOBAL_STACK_SIZE -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #define GLOBAL_STACK_SIZE 100000 #else #define GLOBAL_STACK_SIZE 100000 diff --git a/drivers/opus/celt/arm/arm2gnu.pl b/thirdparty/opus/celt/arm/arm2gnu.pl similarity index 100% rename from drivers/opus/celt/arm/arm2gnu.pl rename to thirdparty/opus/celt/arm/arm2gnu.pl diff --git a/drivers/opus/celt/arm/arm_celt_map.c b/thirdparty/opus/celt/arm/arm_celt_map.c similarity index 97% rename from drivers/opus/celt/arm/arm_celt_map.c rename to thirdparty/opus/celt/arm/arm_celt_map.c index 92c83c1763f..ee6c2447866 100644 --- a/drivers/opus/celt/arm/arm_celt_map.c +++ b/thirdparty/opus/celt/arm/arm_celt_map.c @@ -24,11 +24,14 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/pitch.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/mdct.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pitch.h" +#include "kiss_fft.h" +#include "mdct.h" #if defined(OPUS_HAVE_RTCD) diff --git a/drivers/opus/celt/arm/armcpu.c b/thirdparty/opus/celt/arm/armcpu.c similarity index 96% rename from drivers/opus/celt/arm/armcpu.c rename to thirdparty/opus/celt/arm/armcpu.c index ac8ad2ec14a..5e5d10c3444 100644 --- a/drivers/opus/celt/arm/armcpu.c +++ b/thirdparty/opus/celt/arm/armcpu.c @@ -26,14 +26,17 @@ */ /* Original code from libtheora modified to suit to Opus */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #ifdef OPUS_HAVE_RTCD -#include "opus/celt/arm/armcpu.h" -#include "opus/celt/cpu_support.h" -#include "opus/celt/os_support.h" -#include "opus/opus_types.h" +#include "armcpu.h" +#include "cpu_support.h" +#include "os_support.h" +#include "opus_types.h" #define OPUS_CPU_ARM_V4 (1) #define OPUS_CPU_ARM_EDSP (1<<1) diff --git a/drivers/opus/celt/arm/armcpu.h b/thirdparty/opus/celt/arm/armcpu.h similarity index 100% rename from drivers/opus/celt/arm/armcpu.h rename to thirdparty/opus/celt/arm/armcpu.h diff --git a/drivers/opus/celt/arm/armopts.s.in b/thirdparty/opus/celt/arm/armopts.s.in similarity index 100% rename from drivers/opus/celt/arm/armopts.s.in rename to thirdparty/opus/celt/arm/armopts.s.in diff --git a/drivers/opus/celt/arm/celt_ne10_fft.c b/thirdparty/opus/celt/arm/celt_ne10_fft.c similarity index 97% rename from drivers/opus/celt/arm/celt_ne10_fft.c rename to thirdparty/opus/celt/arm/celt_ne10_fft.c index e57d23ee1d0..42d96a71176 100644 --- a/drivers/opus/celt/arm/celt_ne10_fft.c +++ b/thirdparty/opus/celt/arm/celt_ne10_fft.c @@ -31,14 +31,16 @@ */ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #endif #include #include -#include "opus/celt/os_support.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/stack_alloc.h" +#include "os_support.h" +#include "kiss_fft.h" +#include "stack_alloc.h" #if !defined(FIXED_POINT) # define NE10_FFT_ALLOC_C2C_TYPE_NEON ne10_fft_alloc_c2c_float32_neon diff --git a/drivers/opus/celt/arm/celt_ne10_mdct.c b/thirdparty/opus/celt/arm/celt_ne10_mdct.c similarity index 97% rename from drivers/opus/celt/arm/celt_ne10_mdct.c rename to thirdparty/opus/celt/arm/celt_ne10_mdct.c index eb407b674f3..293c3efd7a2 100644 --- a/drivers/opus/celt/arm/celt_ne10_mdct.c +++ b/thirdparty/opus/celt/arm/celt_ne10_mdct.c @@ -31,13 +31,15 @@ */ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #endif -#include "opus/celt/kiss_fft.h" -#include "opus/celt/_kiss_fft_guts.h" -#include "opus/celt/mdct.h" -#include "opus/celt/stack_alloc.h" +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" +#include "mdct.h" +#include "stack_alloc.h" void clt_mdct_forward_neon(const mdct_lookup *l, kiss_fft_scalar *in, diff --git a/drivers/opus/celt/arm/celt_neon_intr.c b/thirdparty/opus/celt/arm/celt_neon_intr.c similarity index 99% rename from drivers/opus/celt/arm/celt_neon_intr.c rename to thirdparty/opus/celt/arm/celt_neon_intr.c index 82b69586447..47dce15ba5f 100644 --- a/drivers/opus/celt/arm/celt_neon_intr.c +++ b/thirdparty/opus/celt/arm/celt_neon_intr.c @@ -29,10 +29,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/pitch.h" +#include "../pitch.h" #if !defined(FIXED_POINT) /* diff --git a/drivers/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S b/thirdparty/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S similarity index 100% rename from drivers/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S rename to thirdparty/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S diff --git a/drivers/opus/celt/arm/celt_pitch_xcorr_arm.s b/thirdparty/opus/celt/arm/celt_pitch_xcorr_arm.s similarity index 100% rename from drivers/opus/celt/arm/celt_pitch_xcorr_arm.s rename to thirdparty/opus/celt/arm/celt_pitch_xcorr_arm.s diff --git a/drivers/opus/celt/arm/fft_arm.h b/thirdparty/opus/celt/arm/fft_arm.h similarity index 97% rename from drivers/opus/celt/arm/fft_arm.h rename to thirdparty/opus/celt/arm/fft_arm.h index c99458b4afa..0cb55d8e22d 100644 --- a/drivers/opus/celt/arm/fft_arm.h +++ b/thirdparty/opus/celt/arm/fft_arm.h @@ -34,8 +34,8 @@ #if !defined(FFT_ARM_H) #define FFT_ARM_H -#include "opus/opus_config.h" -#include "opus/celt/kiss_fft.h" +#include "config.h" +#include "kiss_fft.h" #if defined(HAVE_ARM_NE10) diff --git a/thirdparty/opus/celt/arm/fixed_arm64.h b/thirdparty/opus/celt/arm/fixed_arm64.h new file mode 100644 index 00000000000..c6fbd3db2c1 --- /dev/null +++ b/thirdparty/opus/celt/arm/fixed_arm64.h @@ -0,0 +1,35 @@ +/* Copyright (C) 2015 Vidyo */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef FIXED_ARM64_H +#define FIXED_ARM64_H + +#include + +#undef SIG2WORD16 +#define SIG2WORD16(x) (vqmovns_s32(PSHR32((x), SIG_SHIFT))) + +#endif diff --git a/drivers/opus/celt/arm/fixed_armv4.h b/thirdparty/opus/celt/arm/fixed_armv4.h similarity index 100% rename from drivers/opus/celt/arm/fixed_armv4.h rename to thirdparty/opus/celt/arm/fixed_armv4.h diff --git a/drivers/opus/celt/arm/fixed_armv5e.h b/thirdparty/opus/celt/arm/fixed_armv5e.h similarity index 99% rename from drivers/opus/celt/arm/fixed_armv5e.h rename to thirdparty/opus/celt/arm/fixed_armv5e.h index 2db23262e85..36a63211013 100644 --- a/drivers/opus/celt/arm/fixed_armv5e.h +++ b/thirdparty/opus/celt/arm/fixed_armv5e.h @@ -30,7 +30,7 @@ #ifndef FIXED_ARMv5E_H #define FIXED_ARMv5E_H -#include "opus/celt/arm/fixed_armv4.h" +#include "fixed_armv4.h" /** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ #undef MULT16_32_Q16 diff --git a/drivers/opus/celt/arm/kiss_fft_armv4.h b/thirdparty/opus/celt/arm/kiss_fft_armv4.h similarity index 99% rename from drivers/opus/celt/arm/kiss_fft_armv4.h rename to thirdparty/opus/celt/arm/kiss_fft_armv4.h index 0f5617324d1..e4faad6f2b9 100644 --- a/drivers/opus/celt/arm/kiss_fft_armv4.h +++ b/thirdparty/opus/celt/arm/kiss_fft_armv4.h @@ -30,7 +30,7 @@ #error "This file should only be included from _kiss_fft_guts.h" #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #undef C_MUL #define C_MUL(m,a,b) \ diff --git a/drivers/opus/celt/arm/kiss_fft_armv5e.h b/thirdparty/opus/celt/arm/kiss_fft_armv5e.h similarity index 99% rename from drivers/opus/celt/arm/kiss_fft_armv5e.h rename to thirdparty/opus/celt/arm/kiss_fft_armv5e.h index 0ab75fbc585..9eca183d77d 100644 --- a/drivers/opus/celt/arm/kiss_fft_armv5e.h +++ b/thirdparty/opus/celt/arm/kiss_fft_armv5e.h @@ -30,7 +30,7 @@ #error "This file should only be included from _kiss_fft_guts.h" #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #if defined(__thumb__)||defined(__thumb2__) #define LDRD_CONS "Q" diff --git a/drivers/opus/celt/arm/mdct_arm.h b/thirdparty/opus/celt/arm/mdct_arm.h similarity index 97% rename from drivers/opus/celt/arm/mdct_arm.h rename to thirdparty/opus/celt/arm/mdct_arm.h index faf3c8acab8..49cbb445760 100644 --- a/drivers/opus/celt/arm/mdct_arm.h +++ b/thirdparty/opus/celt/arm/mdct_arm.h @@ -33,8 +33,8 @@ #if !defined(MDCT_ARM_H) #define MDCT_ARM_H -#include "opus/opus_config.h" -#include "opus/celt/mdct.h" +#include "config.h" +#include "mdct.h" #if defined(HAVE_ARM_NE10) /** Compute a forward MDCT and scale by 4/N, trashes the input array */ diff --git a/drivers/opus/celt/arm/pitch_arm.h b/thirdparty/opus/celt/arm/pitch_arm.h similarity index 98% rename from drivers/opus/celt/arm/pitch_arm.h rename to thirdparty/opus/celt/arm/pitch_arm.h index 996fbc7fd90..8626ed75b94 100644 --- a/drivers/opus/celt/arm/pitch_arm.h +++ b/thirdparty/opus/celt/arm/pitch_arm.h @@ -28,7 +28,7 @@ #if !defined(PITCH_ARM_H) # define PITCH_ARM_H -# include "opus/celt/arm/armcpu.h" +# include "armcpu.h" # if defined(FIXED_POINT) diff --git a/drivers/opus/celt/bands.c b/thirdparty/opus/celt/bands.c similarity index 98% rename from drivers/opus/celt/bands.c rename to thirdparty/opus/celt/bands.c index bdd87dd3272..25f229e2673 100644 --- a/drivers/opus/celt/bands.c +++ b/thirdparty/opus/celt/bands.c @@ -26,19 +26,22 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/vq.h" -#include "opus/celt/cwrs.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/rate.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/pitch.h" +#include "bands.h" +#include "modes.h" +#include "vq.h" +#include "cwrs.h" +#include "stack_alloc.h" +#include "os_support.h" +#include "mathops.h" +#include "rate.h" +#include "quant_bands.h" +#include "pitch.h" int hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus_val16 *hysteresis, int N, int prev) { @@ -87,7 +90,7 @@ static int bitexact_log2tan(int isin,int icos) -FRAC_MUL16(icos, FRAC_MUL16(icos, -2597) + 7932); } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Compute the amplitude (sqrt energy) in each of the bands */ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM) { @@ -216,13 +219,13 @@ void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X, int j, band_end; opus_val16 g; opus_val16 lg; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift; #endif j=M*eBands[i]; band_end = M*eBands[i+1]; lg = ADD16(bandLogE[i], SHL16((opus_val16)eMeans[i],6)); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT g = celt_exp2(lg); #else /* Handle the integer part of the log energy */ @@ -271,7 +274,7 @@ void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_mas int N0; opus_val16 thresh, sqrt_1; int depth; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift; opus_val32 thresh32; #endif @@ -281,7 +284,7 @@ void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_mas celt_assert(pulses[i]>=0); depth = celt_udiv(1+pulses[i], (m->eBands[i+1]-m->eBands[i]))>>LM; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT thresh32 = SHR32(celt_exp2(-SHL16(depth, 10-BITRES)),1); thresh = MULT16_32_Q15(QCONST16(0.5f, 15), MIN32(32767,thresh32)); { @@ -314,7 +317,7 @@ void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_mas Ediff = EXTEND32(logE[c*m->nbEBands+i])-EXTEND32(MIN16(prev1,prev2)); Ediff = MAX32(0, Ediff); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (Ediff < 16384) { opus_val32 r32 = SHR32(celt_exp2(-EXTRACT16(Ediff)),1); @@ -364,7 +367,7 @@ static void intensity_stereo(const CELTMode *m, celt_norm * OPUS_RESTRICT X, con opus_val16 a1, a2; opus_val16 left, right; opus_val16 norm; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift = celt_zlog2(MAX32(bandE[i], bandE[i+m->nbEBands]))-13; #endif left = VSHR32(bandE[i],shift); @@ -401,7 +404,7 @@ static void stereo_merge(celt_norm * OPUS_RESTRICT X, celt_norm * OPUS_RESTRICT opus_val32 xp=0, side=0; opus_val32 El, Er; opus_val16 mid2; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int kl, kr; #endif opus_val32 t, lgain, rgain; @@ -420,7 +423,7 @@ static void stereo_merge(celt_norm * OPUS_RESTRICT X, celt_norm * OPUS_RESTRICT return; } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT kl = celt_ilog2(El)>>1; kr = celt_ilog2(Er)>>1; #endif @@ -429,7 +432,7 @@ static void stereo_merge(celt_norm * OPUS_RESTRICT X, celt_norm * OPUS_RESTRICT t = VSHR32(Er, (kr-7)<<1); rgain = celt_rsqrt_norm(t); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (kl < 7) kl = 7; if (kr < 7) @@ -939,7 +942,7 @@ static unsigned quant_partition(struct band_ctx *ctx, celt_norm *X, delta = sctx.delta; itheta = sctx.itheta; qalloc = sctx.qalloc; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT mid = imid; side = iside; #else @@ -1237,7 +1240,7 @@ static unsigned quant_band_stereo(struct band_ctx *ctx, celt_norm *X, celt_norm delta = sctx.delta; itheta = sctx.itheta; qalloc = sctx.qalloc; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT mid = imid; side = iside; #else diff --git a/drivers/opus/celt/bands.h b/thirdparty/opus/celt/bands.h similarity index 97% rename from drivers/opus/celt/bands.h rename to thirdparty/opus/celt/bands.h index eb7ea4cc249..e8bef4bad0e 100644 --- a/drivers/opus/celt/bands.h +++ b/thirdparty/opus/celt/bands.h @@ -30,11 +30,11 @@ #ifndef BANDS_H #define BANDS_H -#include "opus/celt/arch.h" -#include "opus/celt/modes.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" -#include "opus/celt/rate.h" +#include "arch.h" +#include "modes.h" +#include "entenc.h" +#include "entdec.h" +#include "rate.h" /** Compute the amplitude (sqrt energy) in each of the bands * @param m Mode data diff --git a/drivers/opus/celt/celt.c b/thirdparty/opus/celt/celt.c similarity index 93% rename from drivers/opus/celt/celt.c rename to thirdparty/opus/celt/celt.c index 4a16651441c..b121c51a1fa 100644 --- a/drivers/opus/celt/celt.c +++ b/thirdparty/opus/celt/celt.c @@ -26,33 +26,36 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define CELT_C -#include "opus/celt/os_support.h" -#include "opus/celt/mdct.h" +#include "os_support.h" +#include "mdct.h" #include -#include "opus/celt/celt.h" -#include "opus/celt/pitch.h" -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/entcode.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/float_cast.h" +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/vq.h" +#include "celt_lpc.h" +#include "vq.h" #ifndef PACKAGE_VERSION #define PACKAGE_VERSION "unknown" #endif #if defined(MIPSr1_ASM) -#include "opus/celt/mips/celt_mipsr1.h" +#include "mips/celt_mipsr1.h" #endif @@ -286,7 +289,7 @@ const char *opus_get_version_string(void) /* Applications may rely on the presence of this substring in the version string to determine if they have a fixed-point or floating-point build at runtime. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT "-fixed" #endif #ifdef FUZZING diff --git a/drivers/opus/celt/celt.h b/thirdparty/opus/celt/celt.h similarity index 97% rename from drivers/opus/celt/celt.h rename to thirdparty/opus/celt/celt.h index 72814dc0def..a423b95046a 100644 --- a/drivers/opus/celt/celt.h +++ b/thirdparty/opus/celt/celt.h @@ -35,12 +35,12 @@ #ifndef CELT_H #define CELT_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" -#include "opus/opus_custom.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" -#include "opus/celt/arch.h" +#include "opus_types.h" +#include "opus_defines.h" +#include "opus_custom.h" +#include "entenc.h" +#include "entdec.h" +#include "arch.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/celt/celt_decoder.c b/thirdparty/opus/celt/celt_decoder.c similarity index 98% rename from drivers/opus/celt/celt_decoder.c rename to thirdparty/opus/celt/celt_decoder.c index 88072ed1107..b688f2a4e3f 100644 --- a/drivers/opus/celt/celt_decoder.c +++ b/thirdparty/opus/celt/celt_decoder.c @@ -26,27 +26,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define CELT_DECODER_C -#include "opus/celt/cpu_support.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mdct.h" +#include "cpu_support.h" +#include "os_support.h" +#include "mdct.h" #include -#include "opus/celt/celt.h" -#include "opus/celt/pitch.h" -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/entcode.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/float_cast.h" +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/vq.h" +#include "celt_lpc.h" +#include "vq.h" #if defined(SMALL_FOOTPRINT) && defined(FIXED_POINT) #define NORM_ALIASING_HACK @@ -188,7 +191,7 @@ void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, c opus_val16 coef0; VARDECL(celt_sig, scratch); SAVE_STACK; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT (void)accum; celt_assert(accum==0); #endif @@ -230,7 +233,7 @@ void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, c apply_downsampling=1; } else { /* Shortcut for the standard (non-custom modes) case */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (accum) { for (j=0;jarch); /* Add a noise floor of -40 dB. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ac[0] += SHR32(ac[0],13); #else ac[0] *= 1.0001f; @@ -552,7 +555,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) for (i=1;i<=LPC_ORDER;i++) { /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); #else ac[i] -= ac[i]*(0.008f*0.008f)*i*i; @@ -583,7 +586,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) { opus_val32 E1=1, E2=1; int decay_length; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift = IMAX(0,2*celt_zlog2(celt_maxabs16(&exc[MAX_PERIOD-exc_length], exc_length))-20); #endif decay_length = exc_length>>1; @@ -655,7 +658,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) S2 += SHR32(MULT16_16(tmp, tmp), 8); } /* This checks for an "explosion" in the synthesis. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (!(S1 > SHR32(S2,2))) #else /* The float test is written this way to catch NaNs in the output @@ -1071,7 +1074,7 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat #ifdef CUSTOM_MODES -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_custom_decode(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_int16 * OPUS_RESTRICT pcm, int frame_size) { return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL, 0); diff --git a/drivers/opus/celt/celt_encoder.c b/thirdparty/opus/celt/celt_encoder.c similarity index 98% rename from drivers/opus/celt/celt_encoder.c rename to thirdparty/opus/celt/celt_encoder.c index 9099bcd278f..41fbfd49c83 100644 --- a/drivers/opus/celt/celt_encoder.c +++ b/thirdparty/opus/celt/celt_encoder.c @@ -26,27 +26,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define CELT_ENCODER_C -#include "opus/celt/cpu_support.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mdct.h" +#include "cpu_support.h" +#include "os_support.h" +#include "mdct.h" #include -#include "opus/celt/celt.h" -#include "opus/celt/pitch.h" -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/entcode.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/float_cast.h" +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/vq.h" +#include "celt_lpc.h" +#include "vq.h" /** Encoder state @@ -259,7 +262,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int opus_val32 x,y; x = SHR32(in[i+c*len],SIG_SHIFT); y = ADD32(mem0, x); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT mem0 = mem1 + y - SHL32(x,1); mem1 = x - SHR32(y,1); #else @@ -273,7 +276,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int /* First few samples are bad because we don't propagate the memory */ OPUS_CLEAR(tmp, 12); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Normalize tmp to max range */ { int shift=0; @@ -294,7 +297,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int { opus_val16 x2 = PSHR32(MULT16_16(tmp[2*i],tmp[2*i]) + MULT16_16(tmp[2*i+1],tmp[2*i+1]),16); mean += x2; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* FIXME: Use PSHR16() instead */ tmp[i] = mem0 + PSHR32(x2-mem0,4); #else @@ -308,7 +311,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int /* Backward pass to compute the pre-echo threshold */ for (i=len2-1;i>=0;i--) { -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* FIXME: Use PSHR16() instead */ tmp[i] = mem0 + PSHR32(tmp[i]-mem0,3); #else @@ -325,7 +328,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int /* As a compromise with the old transient detector, frame energy is the geometric mean of the energy and half the max */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Costs two sqrt() to avoid overflows */ mean = MULT16_16(celt_sqrt(mean), celt_sqrt(MULT16_16(maxE,len2>>1))); #else @@ -339,7 +342,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int for (i=12;iprefilter_gain)prefilter_gain; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT qg = ((gain1+1536)>>10)/3-1; #else qg = (int)floor(.5f+gain1*32/3)-1; @@ -1279,7 +1282,7 @@ static int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32 if ((!has_surround_mask||lfe) && (constrained_vbr || bitrate<64000)) { opus_val16 rate_factor; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT rate_factor = MAX16(0,(bitrate-32000)); #else rate_factor = MAX16(0,(1.f/32768)*(bitrate-32000)); @@ -1509,7 +1512,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, sample_max=MAX32(st->overlap_max, celt_maxabs16(pcm, C*(N-overlap)/st->upsample)); st->overlap_max=celt_maxabs16(pcm+C*(N-overlap)/st->upsample, C*overlap/st->upsample); sample_max=MAX32(sample_max, st->overlap_max); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT silence = (sample_max==0); #else silence = (sample_max <= (opus_val16)1/(1<lsb_depth)); @@ -1539,7 +1542,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, } c=0; do { int need_clip=0; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT need_clip = st->clip && sample_max>65536.f; #endif celt_preemphasis(pcm+c, in+c*(N+overlap)+overlap, N, CC, st->upsample, @@ -2156,7 +2159,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, #ifdef CUSTOM_MODES -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_custom_encode(CELTEncoder * OPUS_RESTRICT st, const opus_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) { return celt_encode_with_ec(st, pcm, frame_size, compressed, nbCompressedBytes, NULL); diff --git a/drivers/opus/celt/celt_lpc.c b/thirdparty/opus/celt/celt_lpc.c similarity index 96% rename from drivers/opus/celt/celt_lpc.c rename to thirdparty/opus/celt/celt_lpc.c index 5b8c01021fe..f02145af0d4 100644 --- a/drivers/opus/celt/celt_lpc.c +++ b/thirdparty/opus/celt/celt_lpc.c @@ -24,12 +24,15 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" void _celt_lpc( opus_val16 *_lpc, /* out: [0...p-1] LPC coefficients */ @@ -40,7 +43,7 @@ int p int i, j; opus_val32 r; opus_val32 error = ac[0]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 lpc[LPC_ORDER]; #else float *lpc = _lpc; @@ -70,7 +73,7 @@ int p error = error - MULT32_32_Q31(MULT32_32_Q31(r,r),error); /* Bail out once we get 30 dB gain */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (error ARMv4 @@ -48,7 +48,7 @@ (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) -#include "opus/celt/x86/x86cpu.h" +#include "x86/x86cpu.h" /* We currently support 5 x86 variants: * arch[0] -> non-sse * arch[1] -> sse diff --git a/drivers/opus/celt/cwrs.c b/thirdparty/opus/celt/cwrs.c similarity index 99% rename from drivers/opus/celt/cwrs.c rename to thirdparty/opus/celt/cwrs.c index 983d4580a9f..2fa9f89cd6c 100644 --- a/drivers/opus/celt/cwrs.c +++ b/thirdparty/opus/celt/cwrs.c @@ -26,12 +26,15 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/os_support.h" -#include "opus/celt/cwrs.h" -#include "opus/celt/mathops.h" -#include "opus/celt/arch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "os_support.h" +#include "cwrs.h" +#include "mathops.h" +#include "arch.h" #ifdef CUSTOM_MODES diff --git a/drivers/opus/celt/cwrs.h b/thirdparty/opus/celt/cwrs.h similarity index 93% rename from drivers/opus/celt/cwrs.h rename to thirdparty/opus/celt/cwrs.h index f0ea844e5ea..7cd47174593 100644 --- a/drivers/opus/celt/cwrs.h +++ b/thirdparty/opus/celt/cwrs.h @@ -30,10 +30,10 @@ #ifndef CWRS_H #define CWRS_H -#include "opus/celt/arch.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "arch.h" +#include "stack_alloc.h" +#include "entenc.h" +#include "entdec.h" #ifdef CUSTOM_MODES int log2_frac(opus_uint32 val, int frac); diff --git a/drivers/opus/celt/ecintrin.h b/thirdparty/opus/celt/ecintrin.h similarity index 98% rename from drivers/opus/celt/ecintrin.h rename to thirdparty/opus/celt/ecintrin.h index 6ed8fb280e6..2263cff6bdf 100644 --- a/drivers/opus/celt/ecintrin.h +++ b/thirdparty/opus/celt/ecintrin.h @@ -26,10 +26,10 @@ */ /*Some common macros for potential platform-specific optimization.*/ -#include "opus/opus_types.h" +#include "opus_types.h" #include #include -#include "opus/celt/arch.h" +#include "arch.h" #if !defined(_ecintrin_H) # define _ecintrin_H (1) diff --git a/drivers/opus/celt/entcode.c b/thirdparty/opus/celt/entcode.c similarity index 98% rename from drivers/opus/celt/entcode.c rename to thirdparty/opus/celt/entcode.c index d1c6b25c7f6..70f32016ece 100644 --- a/drivers/opus/celt/entcode.c +++ b/thirdparty/opus/celt/entcode.c @@ -24,10 +24,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/entcode.h" -#include "opus/celt/arch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "entcode.h" +#include "arch.h" #if !defined(EC_CLZ) /*This is a fallback for systems where we don't know how to access diff --git a/drivers/opus/celt/entcode.h b/thirdparty/opus/celt/entcode.h similarity index 98% rename from drivers/opus/celt/entcode.h rename to thirdparty/opus/celt/entcode.h index 4d736d4dca8..13d6c84ef0f 100644 --- a/drivers/opus/celt/entcode.h +++ b/thirdparty/opus/celt/entcode.h @@ -25,14 +25,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" #if !defined(_entcode_H) # define _entcode_H (1) # include # include -# include "opus/celt/ecintrin.h" +# include "ecintrin.h" extern const opus_uint32 SMALL_DIV_TABLE[129]; diff --git a/drivers/opus/celt/entdec.c b/thirdparty/opus/celt/entdec.c similarity index 98% rename from drivers/opus/celt/entdec.c rename to thirdparty/opus/celt/entdec.c index fdc49c92c1a..0b3433ed8b9 100644 --- a/drivers/opus/celt/entdec.c +++ b/thirdparty/opus/celt/entdec.c @@ -24,13 +24,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/os_support.h" -#include "opus/celt/arch.h" -#include "opus/celt/entdec.h" -#include "opus/celt/mfrngcod.h" +#include "os_support.h" +#include "arch.h" +#include "entdec.h" +#include "mfrngcod.h" /*A range decoder. This is an entropy decoder based upon \cite{Mar79}, which is itself a diff --git a/drivers/opus/celt/entdec.h b/thirdparty/opus/celt/entdec.h similarity index 99% rename from drivers/opus/celt/entdec.h rename to thirdparty/opus/celt/entdec.h index fda60ab3268..d8ab3187308 100644 --- a/drivers/opus/celt/entdec.h +++ b/thirdparty/opus/celt/entdec.h @@ -28,7 +28,7 @@ #if !defined(_entdec_H) # define _entdec_H (1) # include -# include "opus/celt/entcode.h" +# include "entcode.h" /*Initializes the decoder. _buf: The input buffer to use. diff --git a/drivers/opus/celt/entenc.c b/thirdparty/opus/celt/entenc.c similarity index 98% rename from drivers/opus/celt/entenc.c rename to thirdparty/opus/celt/entenc.c index da7f2c8e624..f1750d25b84 100644 --- a/drivers/opus/celt/entenc.c +++ b/thirdparty/opus/celt/entenc.c @@ -24,11 +24,14 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/os_support.h" -#include "opus/celt/arch.h" -#include "opus/celt/entenc.h" -#include "opus/celt/mfrngcod.h" + +#if defined(HAVE_CONFIG_H) +# include "config.h" +#endif +#include "os_support.h" +#include "arch.h" +#include "entenc.h" +#include "mfrngcod.h" /*A range encoder. See entdec.c and the references for implementation details \cite{Mar79,MNW98}. diff --git a/drivers/opus/celt/entenc.h b/thirdparty/opus/celt/entenc.h similarity index 99% rename from drivers/opus/celt/entenc.h rename to thirdparty/opus/celt/entenc.h index 3f4a3acc93f..796bc4d5727 100644 --- a/drivers/opus/celt/entenc.h +++ b/thirdparty/opus/celt/entenc.h @@ -28,7 +28,7 @@ #if !defined(_entenc_H) # define _entenc_H (1) # include -# include "opus/celt/entcode.h" +# include "entcode.h" /*Initializes the encoder. _buf: The buffer to store output bytes in. diff --git a/drivers/opus/celt/fixed_debug.h b/thirdparty/opus/celt/fixed_debug.h similarity index 99% rename from drivers/opus/celt/fixed_debug.h rename to thirdparty/opus/celt/fixed_debug.h index 3b8d5ef7a92..d28227f5dc7 100644 --- a/drivers/opus/celt/fixed_debug.h +++ b/thirdparty/opus/celt/fixed_debug.h @@ -33,7 +33,7 @@ #define FIXED_DEBUG_H #include -#include "opus/opus_defines.h" +#include "opus_defines.h" #ifdef CELT_C OPUS_EXPORT opus_int64 celt_mips=0; diff --git a/drivers/opus/celt/fixed_generic.h b/thirdparty/opus/celt/fixed_generic.h similarity index 99% rename from drivers/opus/celt/fixed_generic.h rename to thirdparty/opus/celt/fixed_generic.h index 71ab048e4a7..ac67d37ce8c 100644 --- a/drivers/opus/celt/fixed_generic.h +++ b/thirdparty/opus/celt/fixed_generic.h @@ -136,7 +136,7 @@ #define DIV32(a,b) (((opus_val32)(a))/((opus_val32)(b))) #if defined(MIPSr1_ASM) -#include "opus/celt/mips/fixed_generic_mipsr1.h" +#include "mips/fixed_generic_mipsr1.h" #endif static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x) diff --git a/drivers/opus/celt/float_cast.h b/thirdparty/opus/celt/float_cast.h similarity index 99% rename from drivers/opus/celt/float_cast.h rename to thirdparty/opus/celt/float_cast.h index 36a1bfe6712..ed5a39b5433 100644 --- a/drivers/opus/celt/float_cast.h +++ b/thirdparty/opus/celt/float_cast.h @@ -30,7 +30,7 @@ #define FLOAT_CAST_H -#include "opus/celt/arch.h" +#include "arch.h" /*============================================================================ ** On Intel Pentium processors (especially PIII and probably P4), converting diff --git a/drivers/opus/celt/kiss_fft.c b/thirdparty/opus/celt/kiss_fft.c similarity index 98% rename from drivers/opus/celt/kiss_fft.c rename to thirdparty/opus/celt/kiss_fft.c index cf8d049fa18..4ed37d2bb76 100644 --- a/drivers/opus/celt/kiss_fft.c +++ b/thirdparty/opus/celt/kiss_fft.c @@ -30,14 +30,16 @@ heavily modified to better suit Opus */ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif #endif -#include "opus/celt/_kiss_fft_guts.h" -#include "opus/celt/arch.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/stack_alloc.h" +#include "_kiss_fft_guts.h" +#include "arch.h" +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" /* The guts header contains all the multiplication and addition macros that are defined for complex numbers. It also delares the kf_ internal functions. @@ -188,7 +190,7 @@ static void kf_bfly3( kiss_twiddle_cpx epi3; kiss_fft_cpx * Fout_beg = Fout; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT epi3.r = -16384; epi3.i = -28378; #else @@ -246,7 +248,7 @@ static void kf_bfly5( kiss_twiddle_cpx ya,yb; kiss_fft_cpx * Fout_beg = Fout; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ya.r = 10126; ya.i = -31164; yb.r = -26510; @@ -407,7 +409,7 @@ int kf_factor(int n,opus_int16 * facbuf) static void compute_twiddles(kiss_twiddle_cpx *twiddles, int nfft) { int i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT for (i=0;infft=nfft; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT st->scale_shift = celt_ilog2(st->nfft); if (st->nfft == 1<scale_shift) st->scale = Q15ONE; @@ -568,7 +570,7 @@ void opus_fft_c(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *f { int i; opus_val16 scale; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Allows us to scale with MULT16_32_Q16(), which is faster than MULT16_32_Q15() on ARM. */ int scale_shift = st->scale_shift-1; diff --git a/drivers/opus/celt/kiss_fft.h b/thirdparty/opus/celt/kiss_fft.h similarity index 97% rename from drivers/opus/celt/kiss_fft.h rename to thirdparty/opus/celt/kiss_fft.h index 6229044c437..bffa2bfad63 100644 --- a/drivers/opus/celt/kiss_fft.h +++ b/thirdparty/opus/celt/kiss_fft.h @@ -31,8 +31,8 @@ #include #include -#include "opus/celt/arch.h" -#include "opus/celt/cpu_support.h" +#include "arch.h" +#include "cpu_support.h" #ifdef __cplusplus extern "C" { @@ -46,8 +46,8 @@ extern "C" { #define KISS_FFT_MALLOC opus_alloc #endif -#ifdef OPUS_FIXED_POINT -#include "opus/celt/arch.h" +#ifdef FIXED_POINT +#include "arch.h" # define kiss_fft_scalar opus_int32 # define kiss_twiddle_scalar opus_int16 @@ -86,7 +86,7 @@ typedef struct arch_fft_state{ typedef struct kiss_fft_state{ int nfft; opus_val16 scale; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int scale_shift; #endif int shift; @@ -97,7 +97,7 @@ typedef struct kiss_fft_state{ } kiss_fft_state; #if defined(HAVE_ARM_NE10) -#include "opus/celt/arm/fft_arm.h" +#include "arm/fft_arm.h" #endif /*typedef struct kiss_fft_state* kiss_fft_cfg;*/ diff --git a/drivers/opus/celt/laplace.c b/thirdparty/opus/celt/laplace.c similarity index 97% rename from drivers/opus/celt/laplace.c rename to thirdparty/opus/celt/laplace.c index 5bc956af457..a7bca874b6e 100644 --- a/drivers/opus/celt/laplace.c +++ b/thirdparty/opus/celt/laplace.c @@ -25,10 +25,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/laplace.h" -#include "opus/celt/mathops.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "laplace.h" +#include "mathops.h" /* The minimum probability of an energy delta (out of 32768). */ #define LAPLACE_LOG_MINP (0) diff --git a/drivers/opus/celt/laplace.h b/thirdparty/opus/celt/laplace.h similarity index 97% rename from drivers/opus/celt/laplace.h rename to thirdparty/opus/celt/laplace.h index 9efcc73aa2d..46c14b5da58 100644 --- a/drivers/opus/celt/laplace.h +++ b/thirdparty/opus/celt/laplace.h @@ -26,8 +26,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "entenc.h" +#include "entdec.h" /** Encode a value that is assumed to be the realisation of a Laplace-distributed random process diff --git a/drivers/opus/celt/mathops.c b/thirdparty/opus/celt/mathops.c similarity index 98% rename from drivers/opus/celt/mathops.c rename to thirdparty/opus/celt/mathops.c index 3f7c1a8bdd9..3f8c5dcc0e1 100644 --- a/drivers/opus/celt/mathops.c +++ b/thirdparty/opus/celt/mathops.c @@ -30,9 +30,12 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/mathops.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mathops.h" /*Compute floor(sqrt(_val)) with exact arithmetic. This has been tested on all possible 32-bit inputs.*/ @@ -61,7 +64,7 @@ unsigned isqrt32(opus_uint32 _val){ return g; } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 frac_div32(opus_val32 a, opus_val32 b) { diff --git a/drivers/opus/celt/mathops.h b/thirdparty/opus/celt/mathops.h similarity index 97% rename from drivers/opus/celt/mathops.h rename to thirdparty/opus/celt/mathops.h index a008d71e185..a0525a96103 100644 --- a/drivers/opus/celt/mathops.h +++ b/thirdparty/opus/celt/mathops.h @@ -34,9 +34,9 @@ #ifndef MATHOPS_H #define MATHOPS_H -#include "opus/celt/arch.h" -#include "opus/celt/entcode.h" -#include "opus/celt/os_support.h" +#include "arch.h" +#include "entcode.h" +#include "os_support.h" /* Multiplies two 16-bit fractional values. Bit-exactness of this macro is important */ #define FRAC_MUL16(a,b) ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15) @@ -59,7 +59,7 @@ static OPUS_INLINE opus_val32 celt_maxabs16(const opus_val16 *x, int len) #endif #ifndef OVERRIDE_CELT_MAXABS32 -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT static OPUS_INLINE opus_val32 celt_maxabs32(const opus_val32 *x, int len) { int i; @@ -78,7 +78,7 @@ static OPUS_INLINE opus_val32 celt_maxabs32(const opus_val32 *x, int len) #endif -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT #define PI 3.141592653f #define celt_sqrt(x) ((float)sqrt(x)) @@ -139,9 +139,9 @@ static OPUS_INLINE float celt_exp2(float x) #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT -#include "opus/celt/os_support.h" +#include "os_support.h" #ifndef OVERRIDE_CELT_ILOG2 /** Integer log in base2. Undefined for zero and negative numbers */ diff --git a/drivers/opus/celt/mdct.c b/thirdparty/opus/celt/mdct.c similarity index 97% rename from drivers/opus/celt/mdct.c rename to thirdparty/opus/celt/mdct.c index 641a20e49ac..5315ad11a37 100644 --- a/drivers/opus/celt/mdct.c +++ b/thirdparty/opus/celt/mdct.c @@ -40,19 +40,21 @@ */ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #endif -#include "opus/celt/mdct.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/_kiss_fft_guts.h" +#include "mdct.h" +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" #include -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/stack_alloc.h" +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" #if defined(MIPSr1_ASM) -#include "opus/celt/mips/mdct_mipsr1.h" +#include "mips/mdct_mipsr1.h" #endif @@ -124,7 +126,7 @@ void clt_mdct_forward_c(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scal const kiss_fft_state *st = l->kfft[shift]; const kiss_twiddle_scalar *trig; opus_val16 scale; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Allows us to scale with MULT16_32_Q16(), which is faster than MULT16_32_Q15() on ARM. */ int scale_shift = st->scale_shift-1; diff --git a/drivers/opus/celt/mdct.h b/thirdparty/opus/celt/mdct.h similarity index 97% rename from drivers/opus/celt/mdct.h rename to thirdparty/opus/celt/mdct.h index 2ec98a92e55..160ae4e0f3b 100644 --- a/drivers/opus/celt/mdct.h +++ b/thirdparty/opus/celt/mdct.h @@ -42,9 +42,9 @@ #ifndef MDCT_H #define MDCT_H -#include "opus/opus_defines.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/arch.h" +#include "opus_defines.h" +#include "kiss_fft.h" +#include "arch.h" typedef struct { int n; @@ -54,7 +54,7 @@ typedef struct { } mdct_lookup; #if defined(HAVE_ARM_NE10) -#include "opus/celt/arm/mdct_arm.h" +#include "arm/mdct_arm.h" #endif diff --git a/drivers/opus/celt/mfrngcod.h b/thirdparty/opus/celt/mfrngcod.h similarity index 98% rename from drivers/opus/celt/mfrngcod.h rename to thirdparty/opus/celt/mfrngcod.h index c24d98cde20..809152a59a9 100644 --- a/drivers/opus/celt/mfrngcod.h +++ b/thirdparty/opus/celt/mfrngcod.h @@ -27,7 +27,7 @@ #if !defined(_mfrngcode_H) # define _mfrngcode_H (1) -# include "opus/celt/entcode.h" +# include "entcode.h" /*Constants used by the entropy encoder/decoder.*/ diff --git a/drivers/opus/celt/mips/celt_mipsr1.h b/thirdparty/opus/celt/mips/celt_mipsr1.h similarity index 91% rename from drivers/opus/celt/mips/celt_mipsr1.h rename to thirdparty/opus/celt/mips/celt_mipsr1.h index 906848f1ecb..e85661a6618 100644 --- a/drivers/opus/celt/mips/celt_mipsr1.h +++ b/thirdparty/opus/celt/mips/celt_mipsr1.h @@ -29,26 +29,29 @@ #ifndef __CELT_MIPSR1_H__ #define __CELT_MIPSR1_H__ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define CELT_C -#include "opus/celt/os_support.h" -#include "opus/celt/mdct.h" +#include "os_support.h" +#include "mdct.h" #include -#include "opus/celt/celt.h" -#include "opus/celt/pitch.h" -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/entcode.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/float_cast.h" +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/vq.h" +#include "celt_lpc.h" +#include "vq.h" #define OVERRIDE_comb_filter void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, diff --git a/drivers/opus/celt/mips/fixed_generic_mipsr1.h b/thirdparty/opus/celt/mips/fixed_generic_mipsr1.h similarity index 100% rename from drivers/opus/celt/mips/fixed_generic_mipsr1.h rename to thirdparty/opus/celt/mips/fixed_generic_mipsr1.h diff --git a/drivers/opus/celt/mips/kiss_fft_mipsr1.h b/thirdparty/opus/celt/mips/kiss_fft_mipsr1.h similarity index 99% rename from drivers/opus/celt/mips/kiss_fft_mipsr1.h rename to thirdparty/opus/celt/mips/kiss_fft_mipsr1.h index 09dc9af4643..400ca4de9c5 100644 --- a/drivers/opus/celt/mips/kiss_fft_mipsr1.h +++ b/thirdparty/opus/celt/mips/kiss_fft_mipsr1.h @@ -30,7 +30,7 @@ #error "This file should only be included from _kiss_fft_guts.h" #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #define S_MUL_ADD(a, b, c, d) (S_MUL(a,b)+S_MUL(c,d)) #define S_MUL_SUB(a, b, c, d) (S_MUL(a,b)-S_MUL(c,d)) @@ -102,7 +102,7 @@ static void kf_bfly5( kiss_twiddle_cpx ya,yb; kiss_fft_cpx * Fout_beg = Fout; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ya.r = 10126; ya.i = -31164; yb.r = -26510; diff --git a/drivers/opus/celt/mips/mdct_mipsr1.h b/thirdparty/opus/celt/mips/mdct_mipsr1.h similarity index 97% rename from drivers/opus/celt/mips/mdct_mipsr1.h rename to thirdparty/opus/celt/mips/mdct_mipsr1.h index 0bb8b5a0561..2934dab7768 100644 --- a/drivers/opus/celt/mips/mdct_mipsr1.h +++ b/thirdparty/opus/celt/mips/mdct_mipsr1.h @@ -42,16 +42,18 @@ #define __MDCT_MIPSR1_H__ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #endif -#include "opus/celt/mdct.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/_kiss_fft_guts.h" +#include "mdct.h" +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" #include -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/stack_alloc.h" +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" /* Forward MDCT trashes the input array */ #define OVERRIDE_clt_mdct_forward @@ -65,7 +67,7 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar const kiss_fft_state *st = l->kfft[shift]; const kiss_twiddle_scalar *trig; opus_val16 scale; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Allows us to scale with MULT16_32_Q16(), which is faster than MULT16_32_Q15() on ARM. */ int scale_shift = st->scale_shift-1; diff --git a/drivers/opus/celt/mips/pitch_mipsr1.h b/thirdparty/opus/celt/mips/pitch_mipsr1.h similarity index 100% rename from drivers/opus/celt/mips/pitch_mipsr1.h rename to thirdparty/opus/celt/mips/pitch_mipsr1.h diff --git a/drivers/opus/celt/mips/vq_mipsr1.h b/thirdparty/opus/celt/mips/vq_mipsr1.h similarity index 96% rename from drivers/opus/celt/mips/vq_mipsr1.h rename to thirdparty/opus/celt/mips/vq_mipsr1.h index c68159972fe..54cef861337 100644 --- a/drivers/opus/celt/mips/vq_mipsr1.h +++ b/thirdparty/opus/celt/mips/vq_mipsr1.h @@ -28,10 +28,13 @@ #ifndef __VQ_MIPSR1_H__ #define __VQ_MIPSR1_H__ -#include "opus/opus_config.h" -#include "opus/celt/mathops.h" -#include "opus/celt/arch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mathops.h" +#include "arch.h" static unsigned extract_collapse_mask(int *iy, int N, int B); static void normalise_residual(int * OPUS_RESTRICT iy, celt_norm * OPUS_RESTRICT X, int N, opus_val32 Ryy, opus_val16 gain); @@ -73,7 +76,7 @@ static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_ void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain, int arch) { int i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int k; #endif opus_val32 E = EPSILON; @@ -104,7 +107,7 @@ void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain, int arch) } asm volatile("MFLO %0, $ac1" : "=r" (E)); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT k = celt_ilog2(E)>>1; #endif t = VSHR32(E, 2*(k-7)); diff --git a/drivers/opus/celt/modes.c b/thirdparty/opus/celt/modes.c similarity index 97% rename from drivers/opus/celt/modes.c rename to thirdparty/opus/celt/modes.c index d628f1468b6..911686e9055 100644 --- a/drivers/opus/celt/modes.c +++ b/thirdparty/opus/celt/modes.c @@ -26,15 +26,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/celt.h" -#include "opus/celt/modes.h" -#include "opus/celt/rate.h" -#include "opus/celt/os_support.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/cpu_support.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "celt.h" +#include "modes.h" +#include "rate.h" +#include "os_support.h" +#include "stack_alloc.h" +#include "quant_bands.h" +#include "cpu_support.h" static const opus_int16 eband5ms[] = { /*0 200 400 600 800 1k 1.2 1.4 1.6 2k 2.4 2.8 3.2 4k 4.8 5.6 6.8 8k 9.6 12k 15.6 */ @@ -60,10 +63,10 @@ static const unsigned char band_allocation[] = { }; #ifndef CUSTOM_MODES_ONLY - #ifdef OPUS_FIXED_POINT - #include "opus/celt/static_modes_fixed.h" + #ifdef FIXED_POINT + #include "static_modes_fixed.h" #else - #include "opus/celt/static_modes_float.h" + #include "static_modes_float.h" #endif #endif /* CUSTOM_MODES_ONLY */ @@ -368,7 +371,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) if (window==NULL) goto failure; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT for (i=0;ioverlap;i++) window[i] = Q15ONE*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap)); #else diff --git a/drivers/opus/celt/modes.h b/thirdparty/opus/celt/modes.h similarity index 93% rename from drivers/opus/celt/modes.h rename to thirdparty/opus/celt/modes.h index a5f1c30ac9c..be813ccc8b4 100644 --- a/drivers/opus/celt/modes.h +++ b/thirdparty/opus/celt/modes.h @@ -30,12 +30,12 @@ #ifndef MODES_H #define MODES_H -#include "opus/opus_types.h" -#include "opus/celt/celt.h" -#include "opus/celt/arch.h" -#include "opus/celt/mdct.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "opus_types.h" +#include "celt.h" +#include "arch.h" +#include "mdct.h" +#include "entenc.h" +#include "entdec.h" #define MAX_PERIOD 1024 diff --git a/drivers/opus/celt/opus_custom_demo.c b/thirdparty/opus/celt/opus_custom_demo.c similarity index 98% rename from drivers/opus/celt/opus_custom_demo.c rename to thirdparty/opus/celt/opus_custom_demo.c index 956bec4e451..ae41c0de5a2 100644 --- a/drivers/opus/celt/opus_custom_demo.c +++ b/thirdparty/opus/celt/opus_custom_demo.c @@ -25,10 +25,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_custom.h" -#include "opus/celt/arch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_custom.h" +#include "arch.h" #include #include #include diff --git a/drivers/opus/celt/os_support.h b/thirdparty/opus/celt/os_support.h similarity index 98% rename from drivers/opus/celt/os_support.h rename to thirdparty/opus/celt/os_support.h index 5e36b3ae566..a2171971e9d 100644 --- a/drivers/opus/celt/os_support.h +++ b/thirdparty/opus/celt/os_support.h @@ -35,8 +35,8 @@ # include "custom_support.h" #endif -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" #include #include diff --git a/drivers/opus/celt/pitch.c b/thirdparty/opus/celt/pitch.c similarity index 94% rename from drivers/opus/celt/pitch.c rename to thirdparty/opus/celt/pitch.c index 1bcbabe9436..1d89cb03429 100644 --- a/drivers/opus/celt/pitch.c +++ b/thirdparty/opus/celt/pitch.c @@ -30,18 +30,21 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/pitch.h" -#include "opus/celt/os_support.h" -#include "opus/celt/modes.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/celt_lpc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pitch.h" +#include "os_support.h" +#include "modes.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "celt_lpc.h" static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, int max_pitch, int *best_pitch -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT , int yshift, opus_val32 maxcorr #endif ) @@ -50,7 +53,7 @@ static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, opus_val32 Syy=1; opus_val16 best_num[2]; opus_val32 best_den[2]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int xshift; xshift = celt_ilog2(maxcorr)-14; @@ -71,7 +74,7 @@ static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, opus_val16 num; opus_val32 xcorr16; xcorr16 = EXTRACT16(VSHR32(xcorr[i], xshift)); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT /* Considering the range of xcorr16, this should avoid both underflows and overflows (inf) when squaring xcorr16 */ xcorr16 *= 1e-12f; @@ -150,7 +153,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x opus_val16 lpc[4], mem[5]={0,0,0,0,0}; opus_val16 lpc2[5]; opus_val16 c1 = QCONST16(.8f,15); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift; opus_val32 maxabs = celt_maxabs32(x[0], len); if (C==2) @@ -180,7 +183,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x 4, len>>1, arch); /* Noise floor -40 dB */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ac[0] += SHR32(ac[0],13); #else ac[0] *= 1.0001f; @@ -189,7 +192,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x for (i=1;i<=4;i++) { /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); #else ac[i] -= ac[i]*(.008f*i)*(.008f*i); @@ -212,7 +215,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x } /* Pure C implementation. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 #else void @@ -229,7 +232,7 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, #if 0 /* This is a simple version of the pitch correlation that should work well on DSPs like Blackfin and TI C5x/C6x */ int i, j; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 maxcorr=1; #endif #if !defined(OVERRIDE_PITCH_XCORR) @@ -241,11 +244,11 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, for (j=0;j0); @@ -271,7 +274,7 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, xcorr[i+1]=sum[1]; xcorr[i+2]=sum[2]; xcorr[i+3]=sum[3]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT sum[0] = MAX32(sum[0], sum[1]); sum[2] = MAX32(sum[2], sum[3]); sum[0] = MAX32(sum[0], sum[2]); @@ -288,11 +291,11 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, sum = celt_inner_prod(_x, _y+i, len, arch); #endif xcorr[i] = sum; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT maxcorr = MAX32(maxcorr, sum); #endif } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT return maxcorr; #endif #endif @@ -307,7 +310,7 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR VARDECL(opus_val16, x_lp4); VARDECL(opus_val16, y_lp4); VARDECL(opus_val32, xcorr); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 maxcorr; opus_val32 xmax, ymax; int shift=0; @@ -330,7 +333,7 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR for (j=0;j>2;j++) y_lp4[j] = y[2*j]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT xmax = celt_maxabs16(x_lp4, len>>2); ymax = celt_maxabs16(y_lp4, lag>>2); shift = celt_ilog2(MAX32(1, MAX32(xmax, ymax)))-11; @@ -349,19 +352,19 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR /* Coarse search with 4x decimation */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT maxcorr = #endif celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch); find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT , 0, maxcorr #endif ); /* Finer search with 2x decimation */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT maxcorr=1; #endif for (i=0;i>1;i++) @@ -370,7 +373,7 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR xcorr[i] = 0; if (abs(i-2*best_pitch[0])>2 && abs(i-2*best_pitch[1])>2) continue; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT sum = 0; for (j=0;j>1;j++) sum += SHR32(MULT16_16(x_lp[j],y[i+j]), shift); @@ -378,12 +381,12 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR sum = celt_inner_prod_c(x_lp, y+i, len>>1); #endif xcorr[i] = MAX32(-1, sum); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT maxcorr = MAX32(maxcorr, sum); #endif } find_best_pitch(xcorr, y, len>>1, max_pitch>>1, best_pitch -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT , shift+1, maxcorr #endif ); @@ -447,7 +450,7 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, yy = yy_lookup[T0]; best_xy = xy; best_yy = yy; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT { opus_val32 x2y2; int sh, t; @@ -483,7 +486,7 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, dual_inner_prod(x, &x[-T1], &x[-T1b], N, &xy, &xy2, arch); xy += xy2; yy = yy_lookup[T1] + yy_lookup[T1b]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT { opus_val32 x2y2; int sh, t; diff --git a/drivers/opus/celt/pitch.h b/thirdparty/opus/celt/pitch.h similarity index 96% rename from drivers/opus/celt/pitch.h rename to thirdparty/opus/celt/pitch.h index ecae7667b8d..65a77a6ecc2 100644 --- a/drivers/opus/celt/pitch.h +++ b/thirdparty/opus/celt/pitch.h @@ -34,21 +34,21 @@ #ifndef PITCH_H #define PITCH_H -#include "opus/celt/modes.h" -#include "opus/celt/cpu_support.h" +#include "modes.h" +#include "cpu_support.h" #if (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(FIXED_POINT)) \ || ((defined(OPUS_X86_MAY_HAVE_SSE4_1) || defined(OPUS_X86_MAY_HAVE_SSE2)) && defined(FIXED_POINT)) -#include "opus/celt/x86/pitch_sse.h" +#include "x86/pitch_sse.h" #endif #if defined(MIPSr1_ASM) -#include "opus/celt/mips/pitch_mipsr1.h" +#include "mips/pitch_mipsr1.h" #endif #if ((defined(OPUS_ARM_ASM) && defined(FIXED_POINT)) \ || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)) -# include "opus/celt/arm/pitch_arm.h" +# include "arm/pitch_arm.h" #endif void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp, @@ -178,7 +178,7 @@ void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N, #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 #else void @@ -206,7 +206,7 @@ void xcorr, len, max_pitch)) # else -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 #else void diff --git a/drivers/opus/celt/quant_bands.c b/thirdparty/opus/celt/quant_bands.c similarity index 97% rename from drivers/opus/celt/quant_bands.c rename to thirdparty/opus/celt/quant_bands.c index b38bfa8b8e6..95076e0af2d 100644 --- a/drivers/opus/celt/quant_bands.c +++ b/thirdparty/opus/celt/quant_bands.c @@ -25,18 +25,21 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/laplace.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "quant_bands.h" +#include "laplace.h" #include -#include "opus/celt/os_support.h" -#include "opus/celt/arch.h" -#include "opus/celt/mathops.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/rate.h" +#include "os_support.h" +#include "arch.h" +#include "mathops.h" +#include "stack_alloc.h" +#include "rate.h" -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Mean energy in each band quantized in Q4 */ const signed char eMeans[25] = { 103,100, 92, 85, 81, @@ -56,7 +59,7 @@ const opus_val16 eMeans[25] = { }; #endif /* prediction coefficients: 0.9, 0.8, 0.65, 0.5 */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT static const opus_val16 pred_coef[4] = {29440, 26112, 21248, 16384}; static const opus_val16 beta_coef[4] = {30147, 22282, 12124, 6554}; static const opus_val16 beta_intra = 4915; @@ -187,7 +190,7 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end, opus_val16 decay_bound; x = eBands[i+c*m->nbEBands]; oldE = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT f = SHL32(EXTEND32(x),7) - PSHR32(MULT16_16(coef,oldE), 8) - prev[c]; /* Rounding to nearest integer here is really important! */ qi = (f+QCONST32(.5f,DB_SHIFT+7))>>(DB_SHIFT+7); @@ -245,7 +248,7 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end, q = (opus_val32)SHL32(EXTEND32(qi),DB_SHIFT); tmp = PSHR32(MULT16_16(coef,oldE),8) + prev[c] + SHL32(q,7); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); #endif oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); @@ -282,7 +285,7 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, max_decay = QCONST16(16.f,DB_SHIFT); if (end-start>10) { -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT max_decay = MIN32(max_decay, SHL32(EXTEND32(nbAvailableBytes),DB_SHIFT-3)); #else max_decay = MIN32(max_decay, .125f*nbAvailableBytes); @@ -369,7 +372,7 @@ void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBa do { int q2; opus_val16 offset; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Has to be without rounding */ q2 = (error[i+c*m->nbEBands]+QCONST16(.5f,DB_SHIFT))>>(DB_SHIFT-fine_quant[i]); #else @@ -380,7 +383,7 @@ void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBa if (q2<0) q2 = 0; ec_enc_bits(enc, q2, fine_quant[i]); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.5f,DB_SHIFT)); #else offset = (q2+.5f)*(1<<(14-fine_quant[i]))*(1.f/16384) - .5f; @@ -409,7 +412,7 @@ void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *ol opus_val16 offset; q2 = error[i+c*m->nbEBands]<0 ? 0 : 1; ec_enc_bits(enc, q2, 1); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); #else offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); @@ -477,7 +480,7 @@ void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *ol oldEBands[i+c*m->nbEBands] = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); tmp = PSHR32(MULT16_16(coef,oldEBands[i+c*m->nbEBands]),8) + prev[c] + SHL32(q,7); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); #endif oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); @@ -499,7 +502,7 @@ void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldE int q2; opus_val16 offset; q2 = ec_dec_bits(dec, fine_quant[i]); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.5f,DB_SHIFT)); #else offset = (q2+.5f)*(1<<(14-fine_quant[i]))*(1.f/16384) - .5f; @@ -525,7 +528,7 @@ void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 * int q2; opus_val16 offset; q2 = ec_dec_bits(dec, 1); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); #else offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); diff --git a/drivers/opus/celt/quant_bands.h b/thirdparty/opus/celt/quant_bands.h similarity index 94% rename from drivers/opus/celt/quant_bands.h rename to thirdparty/opus/celt/quant_bands.h index 31d4b94e416..0490bca4b40 100644 --- a/drivers/opus/celt/quant_bands.h +++ b/thirdparty/opus/celt/quant_bands.h @@ -29,13 +29,13 @@ #ifndef QUANT_BANDS #define QUANT_BANDS -#include "opus/celt/arch.h" -#include "opus/celt/modes.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" -#include "opus/celt/mathops.h" +#include "arch.h" +#include "modes.h" +#include "entenc.h" +#include "entdec.h" +#include "mathops.h" -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT extern const signed char eMeans[25]; #else extern const opus_val16 eMeans[25]; diff --git a/drivers/opus/celt/rate.c b/thirdparty/opus/celt/rate.c similarity index 99% rename from drivers/opus/celt/rate.c rename to thirdparty/opus/celt/rate.c index e69fb3f0304..b28d8feccd9 100644 --- a/drivers/opus/celt/rate.c +++ b/thirdparty/opus/celt/rate.c @@ -25,16 +25,19 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/modes.h" -#include "opus/celt/cwrs.h" -#include "opus/celt/arch.h" -#include "opus/celt/os_support.h" +#include "modes.h" +#include "cwrs.h" +#include "arch.h" +#include "os_support.h" -#include "opus/celt/entcode.h" -#include "opus/celt/rate.h" +#include "entcode.h" +#include "rate.h" static const unsigned char LOG2_FRAC_TABLE[24]={ 0, diff --git a/drivers/opus/celt/rate.h b/thirdparty/opus/celt/rate.h similarity index 98% rename from drivers/opus/celt/rate.h rename to thirdparty/opus/celt/rate.h index cf8085fccfd..515f7687cec 100644 --- a/drivers/opus/celt/rate.h +++ b/thirdparty/opus/celt/rate.h @@ -40,8 +40,8 @@ #define QTHETA_OFFSET 4 #define QTHETA_OFFSET_TWOPHASE 16 -#include "opus/celt/cwrs.h" -#include "opus/celt/modes.h" +#include "cwrs.h" +#include "modes.h" void compute_pulse_cache(CELTMode *m, int LM); diff --git a/drivers/opus/celt/stack_alloc.h b/thirdparty/opus/celt/stack_alloc.h similarity index 98% rename from drivers/opus/celt/stack_alloc.h rename to thirdparty/opus/celt/stack_alloc.h index 7cd6c56ccfc..2b51c8d80cc 100644 --- a/drivers/opus/celt/stack_alloc.h +++ b/thirdparty/opus/celt/stack_alloc.h @@ -32,8 +32,8 @@ #ifndef STACK_ALLOC_H #define STACK_ALLOC_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" #if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK)) #error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode." @@ -151,7 +151,7 @@ extern char *global_stack_top; #endif /* ENABLE_VALGRIND */ -#include "opus/celt/os_support.h" +#include "os_support.h" #define VARDECL(type, var) type *var #define ALLOC(var, size, type) var = PUSH(global_stack, size, type) #define SAVE_STACK char *_saved_stack = global_stack; diff --git a/drivers/opus/celt/static_modes_fixed.h b/thirdparty/opus/celt/static_modes_fixed.h similarity index 99% rename from drivers/opus/celt/static_modes_fixed.h rename to thirdparty/opus/celt/static_modes_fixed.h index 352642f507f..8717d626cbe 100644 --- a/drivers/opus/celt/static_modes_fixed.h +++ b/thirdparty/opus/celt/static_modes_fixed.h @@ -1,12 +1,12 @@ /* The contents of this file was automatically generated by dump_modes.c with arguments: 48000 960 It contains static definitions for some pre-defined modes. */ -#include "opus/celt/modes.h" -#include "opus/celt/rate.h" +#include "modes.h" +#include "rate.h" #ifdef HAVE_ARM_NE10 #define OVERRIDE_FFT 1 -#include "opus/celt/static_modes_fixed_arm_ne10.h" +#include "static_modes_fixed_arm_ne10.h" #endif #ifndef DEF_WINDOW120 diff --git a/drivers/opus/celt/static_modes_fixed_arm_ne10.h b/thirdparty/opus/celt/static_modes_fixed_arm_ne10.h similarity index 100% rename from drivers/opus/celt/static_modes_fixed_arm_ne10.h rename to thirdparty/opus/celt/static_modes_fixed_arm_ne10.h diff --git a/drivers/opus/celt/static_modes_float.h b/thirdparty/opus/celt/static_modes_float.h similarity index 99% rename from drivers/opus/celt/static_modes_float.h rename to thirdparty/opus/celt/static_modes_float.h index f7d501a9939..e102a383918 100644 --- a/drivers/opus/celt/static_modes_float.h +++ b/thirdparty/opus/celt/static_modes_float.h @@ -1,12 +1,12 @@ /* The contents of this file was automatically generated by dump_modes.c with arguments: 48000 960 It contains static definitions for some pre-defined modes. */ -#include "opus/celt/modes.h" -#include "opus/celt/rate.h" +#include "modes.h" +#include "rate.h" #ifdef HAVE_ARM_NE10 #define OVERRIDE_FFT 1 -#include "opus/celt/static_modes_float_arm_ne10.h" +#include "static_modes_float_arm_ne10.h" #endif #ifndef DEF_WINDOW120 diff --git a/drivers/opus/celt/static_modes_float_arm_ne10.h b/thirdparty/opus/celt/static_modes_float_arm_ne10.h similarity index 100% rename from drivers/opus/celt/static_modes_float_arm_ne10.h rename to thirdparty/opus/celt/static_modes_float_arm_ne10.h diff --git a/thirdparty/opus/celt/tests/test_unit_cwrs32.c b/thirdparty/opus/celt/tests/test_unit_cwrs32.c new file mode 100644 index 00000000000..36dd8af5f5c --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_cwrs32.c @@ -0,0 +1,161 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, + Gregory Maxwell + Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#else +#define TEST_CUSTOM_MODES +#endif + +#define CELT_C +#include "stack_alloc.h" +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "cwrs.c" +#include "mathops.c" +#include "rate.h" + +#define NMAX (240) +#define KMAX (128) + +#ifdef TEST_CUSTOM_MODES + +#define NDIMS (44) +static const int pn[NDIMS]={ + 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 18, 20, 22, + 24, 26, 28, 30, 32, 36, 40, 44, 48, + 52, 56, 60, 64, 72, 80, 88, 96, 104, + 112, 120, 128, 144, 160, 176, 192, 208 +}; +static const int pkmax[NDIMS]={ + 128, 128, 128, 128, 88, 52, 36, 26, 22, + 18, 16, 15, 13, 12, 12, 11, 10, 9, + 9, 8, 8, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 5, 5, 5, 5, 5, 5, + 4, 4, 4, 4, 4, 4, 4, 4 +}; + +#else /* TEST_CUSTOM_MODES */ + +#define NDIMS (22) +static const int pn[NDIMS]={ + 2, 3, 4, 6, 8, 9, 11, 12, 16, + 18, 22, 24, 32, 36, 44, 48, 64, 72, + 88, 96, 144, 176 +}; +static const int pkmax[NDIMS]={ + 128, 128, 128, 88, 36, 26, 18, 16, 12, + 11, 9, 9, 7, 7, 6, 6, 5, 5, + 5, 5, 4, 4 +}; + +#endif + +int main(void){ + int t; + int n; + ALLOC_STACK; + for(t=0;tpkmax[t])break; + printf("Testing CWRS with N=%i, K=%i...\n",n,k); +#if defined(SMALL_FOOTPRINT) + nc=ncwrs_urow(n,k,uu); +#else + nc=CELT_PVQ_V(n,k); +#endif + inc=nc/20000; + if(inc<1)inc=1; + for(i=0;i");*/ +#if defined(SMALL_FOOTPRINT) + ii=icwrs(n,k,&v,y,u); +#else + ii=icwrs(n,y); + v=CELT_PVQ_V(n,k); +#endif + if(ii!=i){ + fprintf(stderr,"Combination-index mismatch (%lu!=%lu).\n", + (long)ii,(long)i); + return 1; + } + if(v!=nc){ + fprintf(stderr,"Combination count mismatch (%lu!=%lu).\n", + (long)v,(long)nc); + return 2; + } + /*printf(" %6u\n",i);*/ + } + /*printf("\n");*/ + } + } + return 0; +} diff --git a/thirdparty/opus/celt/tests/test_unit_dft.c b/thirdparty/opus/celt/tests/test_unit_dft.c new file mode 100644 index 00000000000..6166eb0e4fa --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_dft.c @@ -0,0 +1,189 @@ +/* Copyright (c) 2008 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define SKIP_CONFIG_H + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#include + +#define CELT_C +#define TEST_UNIT_DFT_C +#include "stack_alloc.h" +#include "kiss_fft.h" +#include "kiss_fft.c" +#include "mathops.c" +#include "entcode.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/x86cpu.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# include "celt_lpc.c" +# include "pitch.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifndef M_PI +#define M_PI 3.141592653 +#endif + +int ret = 0; + +void check(kiss_fft_cpx * in,kiss_fft_cpx * out,int nfft,int isinverse) +{ + int bin,k; + double errpow=0,sigpow=0, snr; + + for (bin=0;bin1) { + int k; + for (k=1;k +#include +#include +#include +#include "entcode.h" +#include "entenc.h" +#include "entdec.h" +#include + +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" + +#ifndef M_LOG2E +# define M_LOG2E 1.4426950408889634074 +#endif +#define DATA_SIZE 10000000 +#define DATA_SIZE2 10000 + +int main(int _argc,char **_argv){ + ec_enc enc; + ec_dec dec; + long nbits; + long nbits2; + double entropy; + int ft; + int ftb; + int sz; + int i; + int ret; + unsigned int sym; + unsigned int seed; + unsigned char *ptr; + const char *env_seed; + ret=0; + entropy=0; + if (_argc > 2) { + fprintf(stderr, "Usage: %s []\n", _argv[0]); + return 1; + } + env_seed = getenv("SEED"); + if (_argc > 1) + seed = atoi(_argv[1]); + else if (env_seed) + seed = atoi(env_seed); + else + seed = time(NULL); + /*Testing encoding of raw bit values.*/ + ptr = (unsigned char *)malloc(DATA_SIZE); + ec_enc_init(&enc,ptr, DATA_SIZE); + for(ft=2;ft<1024;ft++){ + for(i=0;i>(rand()%11U))+1U)+10; + sz=rand()/((RAND_MAX>>(rand()%9U))+1U); + data=(unsigned *)malloc(sz*sizeof(*data)); + tell=(unsigned *)malloc((sz+1)*sizeof(*tell)); + ec_enc_init(&enc,ptr,DATA_SIZE2); + zeros = rand()%13==0; + tell[0]=ec_tell_frac(&enc); + for(j=0;j>(rand()%9U))+1U); + logp1=(unsigned *)malloc(sz*sizeof(*logp1)); + data=(unsigned *)malloc(sz*sizeof(*data)); + tell=(unsigned *)malloc((sz+1)*sizeof(*tell)); + enc_method=(unsigned *)malloc(sz*sizeof(*enc_method)); + ec_enc_init(&enc,ptr,DATA_SIZE2); + tell[0]=ec_tell_frac(&enc); + for(j=0;j>1)+1); + logp1[j]=(rand()%15)+1; + enc_method[j]=rand()/((RAND_MAX>>2)+1); + switch(enc_method[j]){ + case 0:{ + ec_encode(&enc,data[j]?(1<>2)+1); + switch(dec_method){ + case 0:{ + fs=ec_decode(&dec,1<=(1<=(1< +#include +#include "laplace.h" +#define CELT_C +#include "stack_alloc.h" + +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "laplace.c" + +#define DATA_SIZE 40000 + +int ec_laplace_get_start_freq(int decay) +{ + opus_uint32 ft = 32768 - LAPLACE_MINP*(2*LAPLACE_NMIN+1); + int fs = (ft*(16384-decay))/(16384+decay); + return fs+LAPLACE_MINP; +} + +int main(void) +{ + int i; + int ret = 0; + ec_enc enc; + ec_dec dec; + unsigned char *ptr; + int val[10000], decay[10000]; + ALLOC_STACK; + ptr = (unsigned char *)malloc(DATA_SIZE); + ec_enc_init(&enc,ptr,DATA_SIZE); + + val[0] = 3; decay[0] = 6000; + val[1] = 0; decay[1] = 5800; + val[2] = -1; decay[2] = 5600; + for (i=3;i<10000;i++) + { + val[i] = rand()%15-7; + decay[i] = rand()%11000+5000; + } + for (i=0;i<10000;i++) + ec_laplace_encode(&enc, &val[i], + ec_laplace_get_start_freq(decay[i]), decay[i]); + + ec_enc_done(&enc); + + ec_dec_init(&dec,ec_get_buffer(&enc),ec_range_bytes(&enc)); + + for (i=0;i<10000;i++) + { + int d = ec_laplace_decode(&dec, + ec_laplace_get_start_freq(decay[i]), decay[i]); + if (d != val[i]) + { + fprintf (stderr, "Got %d instead of %d\n", d, val[i]); + ret = 1; + } + } + + free(ptr); + return ret; +} diff --git a/thirdparty/opus/celt/tests/test_unit_mathops.c b/thirdparty/opus/celt/tests/test_unit_mathops.c new file mode 100644 index 00000000000..fd3319da91c --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_mathops.c @@ -0,0 +1,304 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, + Gregory Maxwell + Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#define CELT_C + +#include +#include +#include "mathops.c" +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "bands.c" +#include "quant_bands.c" +#include "laplace.c" +#include "vq.c" +#include "cwrs.c" +#include "pitch.c" +#include "celt_lpc.c" +#include "celt.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# if defined(OPUS_X86_MAY_HAVE_SSE) +# include "x86/pitch_sse.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE2) +# include "x86/pitch_sse2.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/pitch_sse4_1.c" +# include "x86/celt_lpc_sse.c" +# endif +# include "x86/x86_celt_map.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "kiss_fft.c" +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifdef FIXED_POINT +#define WORD "%d" +#else +#define WORD "%f" +#endif + +int ret = 0; + +void testdiv(void) +{ + opus_int32 i; + for (i=1;i<=327670;i++) + { + double prod; + opus_val32 val; + val = celt_rcp(i); +#ifdef FIXED_POINT + prod = (1./32768./65526.)*val*i; +#else + prod = val*i; +#endif + if (fabs(prod-1) > .00025) + { + fprintf (stderr, "div failed: 1/%d="WORD" (product = %f)\n", i, val, prod); + ret = 1; + } + } +} + +void testsqrt(void) +{ + opus_int32 i; + for (i=1;i<=1000000000;i++) + { + double ratio; + opus_val16 val; + val = celt_sqrt(i); + ratio = val/sqrt(i); + if (fabs(ratio - 1) > .0005 && fabs(val-sqrt(i)) > 2) + { + fprintf (stderr, "sqrt failed: sqrt(%d)="WORD" (ratio = %f)\n", i, val, ratio); + ret = 1; + } + i+= i>>10; + } +} + +void testbitexactcos(void) +{ + int i; + opus_int32 min_d,max_d,last,chk; + chk=max_d=0; + last=min_d=32767; + for(i=64;i<=16320;i++) + { + opus_int32 d; + opus_int32 q=bitexact_cos(i); + chk ^= q*i; + d = last - q; + if (d>max_d)max_d=d; + if (dmax_d)max_d=d; + if (d0.0009) + { + fprintf (stderr, "celt_log2 failed: fabs((1.442695040888963387*log(x))-celt_log2(x))>0.001 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} + +void testexp2(void) +{ + float x; + for (x=-11.0;x<24.0;x+=0.0007) + { + float error = fabs(x-(1.442695040888963387*log(celt_exp2(x)))); + if (error>0.0002) + { + fprintf (stderr, "celt_exp2 failed: fabs(x-(1.442695040888963387*log(celt_exp2(x))))>0.0005 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} + +void testexp2log2(void) +{ + float x; + for (x=-11.0;x<24.0;x+=0.0007) + { + float error = fabs(x-(celt_log2(celt_exp2(x)))); + if (error>0.001) + { + fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_log2(celt_exp2(x))))>0.001 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} +#else +void testlog2(void) +{ + opus_val32 x; + for (x=8;x<1073741824;x+=(x>>3)) + { + float error = fabs((1.442695040888963387*log(x/16384.0))-celt_log2(x)/1024.0); + if (error>0.003) + { + fprintf (stderr, "celt_log2 failed: x = %ld, error = %f\n", (long)x,error); + ret = 1; + } + } +} + +void testexp2(void) +{ + opus_val16 x; + for (x=-32768;x<15360;x++) + { + float error1 = fabs(x/1024.0-(1.442695040888963387*log(celt_exp2(x)/65536.0))); + float error2 = fabs(exp(0.6931471805599453094*x/1024.0)-celt_exp2(x)/65536.0); + if (error1>0.0002&&error2>0.00004) + { + fprintf (stderr, "celt_exp2 failed: x = "WORD", error1 = %f, error2 = %f\n", x,error1,error2); + ret = 1; + } + } +} + +void testexp2log2(void) +{ + opus_val32 x; + for (x=8;x<65536;x+=(x>>3)) + { + float error = fabs(x-0.25*celt_exp2(celt_log2(x)))/16384; + if (error>0.004) + { + fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_exp2(celt_log2(x))))>0.001 (x = %ld, error = %f)\n", (long)x,error); + ret = 1; + } + } +} + +void testilog2(void) +{ + opus_val32 x; + for (x=1;x<=268435455;x+=127) + { + opus_val32 lg; + opus_val32 y; + + lg = celt_ilog2(x); + if (lg<0 || lg>=31) + { + printf("celt_ilog2 failed: 0<=celt_ilog2(x)<31 (x = %d, celt_ilog2(x) = %d)\n",x,lg); + ret = 1; + } + y = 1<>1)>=y) + { + printf("celt_ilog2 failed: 2**celt_ilog2(x)<=x<2**(celt_ilog2(x)+1) (x = %d, 2**celt_ilog2(x) = %d)\n",x,y); + ret = 1; + } + } +} +#endif + +int main(void) +{ + testbitexactcos(); + testbitexactlog2tan(); + testdiv(); + testsqrt(); + testlog2(); + testexp2(); + testexp2log2(); +#ifdef FIXED_POINT + testilog2(); +#endif + return ret; +} diff --git a/thirdparty/opus/celt/tests/test_unit_mdct.c b/thirdparty/opus/celt/tests/test_unit_mdct.c new file mode 100644 index 00000000000..8dbb9caa2e8 --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_mdct.c @@ -0,0 +1,230 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define SKIP_CONFIG_H + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#include + +#define CELT_C +#include "mdct.h" +#include "stack_alloc.h" + +#include "kiss_fft.c" +#include "mdct.c" +#include "mathops.c" +#include "entcode.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/x86cpu.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# include "pitch.c" +# include "celt_lpc.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifndef M_PI +#define M_PI 3.141592653 +#endif + +int ret = 0; +void check(kiss_fft_scalar * in,kiss_fft_scalar * out,int nfft,int isinverse) +{ + int bin,k; + double errpow=0,sigpow=0; + double snr; + for (bin=0;bin1) { + int k; + for (k=1;k +#include +#include "vq.c" +#include "cwrs.c" +#include "entcode.c" +#include "entenc.c" +#include "entdec.c" +#include "mathops.c" +#include "bands.h" +#include "pitch.c" +#include "celt_lpc.c" +#include "celt.c" +#include + +#if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# if defined(OPUS_X86_MAY_HAVE_SSE) +# include "x86/pitch_sse.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE2) +# include "x86/pitch_sse2.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/pitch_sse4_1.c" +# include "x86/celt_lpc_sse.c" +# endif +# include "x86/x86_celt_map.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "kiss_fft.c" +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#define MAX_SIZE 100 + +int ret=0; +void test_rotation(int N, int K) +{ + int i; + double err = 0, ener = 0, snr, snr0; + opus_val16 x0[MAX_SIZE]; + opus_val16 x1[MAX_SIZE]; + for (i=0;i 20) + { + fprintf(stderr, "FAIL!\n"); + ret = 1; + } +} + +int main(void) +{ + ALLOC_STACK; + test_rotation(15, 3); + test_rotation(23, 5); + test_rotation(50, 3); + test_rotation(80, 1); + return ret; +} diff --git a/thirdparty/opus/celt/tests/test_unit_types.c b/thirdparty/opus/celt/tests/test_unit_types.c new file mode 100644 index 00000000000..67a0fb8ed3b --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_types.c @@ -0,0 +1,50 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_types.h" +#include + +int main(void) +{ + opus_int16 i = 1; + i <<= 14; + if (i>>14 != 1) + { + fprintf(stderr, "opus_int16 isn't 16 bits\n"); + return 1; + } + if (sizeof(opus_int16)*2 != sizeof(opus_int32)) + { + fprintf(stderr, "16*2 != 32\n"); + return 1; + } + return 0; +} diff --git a/drivers/opus/celt/vq.c b/thirdparty/opus/celt/vq.c similarity index 95% rename from drivers/opus/celt/vq.c rename to thirdparty/opus/celt/vq.c index 3061e3006f2..f3583960654 100644 --- a/drivers/opus/celt/vq.c +++ b/thirdparty/opus/celt/vq.c @@ -25,16 +25,19 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/mathops.h" -#include "opus/celt/cwrs.h" -#include "opus/celt/vq.h" -#include "opus/celt/arch.h" -#include "opus/celt/os_support.h" -#include "opus/celt/bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mathops.h" +#include "cwrs.h" +#include "vq.h" +#include "arch.h" +#include "os_support.h" +#include "bands.h" +#include "rate.h" +#include "pitch.h" #ifndef OVERRIDE_vq_exp_rotation1 static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_val16 s) @@ -115,13 +118,13 @@ static void normalise_residual(int * OPUS_RESTRICT iy, celt_norm * OPUS_RESTRICT int N, opus_val32 Ryy, opus_val16 gain) { int i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int k; #endif opus_val32 t; opus_val16 g; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT k = celt_ilog2(Ryy)>>1; #endif t = VSHR32(Ryy, 2*(k-7)); @@ -208,7 +211,7 @@ unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, ec_enc *enc } while (++j N+3) @@ -259,10 +262,10 @@ unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, ec_enc *enc int best_id; opus_val32 best_num = -VERY_LARGE16; opus_val16 best_den = 0; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int rshift; #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT rshift = 1+celt_ilog2(K-pulsesLeft+i+1); #endif best_id = 0; @@ -346,7 +349,7 @@ unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B, void renormalise_vector(celt_norm *X, int N, opus_val16 gain, int arch) { int i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int k; #endif opus_val32 E; @@ -354,7 +357,7 @@ void renormalise_vector(celt_norm *X, int N, opus_val16 gain, int arch) opus_val32 t; celt_norm *xptr; E = EPSILON + celt_inner_prod(X, X, N, arch); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT k = celt_ilog2(E)>>1; #endif t = VSHR32(E, 2*(k-7)); @@ -394,7 +397,7 @@ int stereo_itheta(const celt_norm *X, const celt_norm *Y, int stereo, int N, int } mid = celt_sqrt(Emid); side = celt_sqrt(Eside); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* 0.63662 = 2/pi */ itheta = MULT16_16_Q15(QCONST16(0.63662f,15),celt_atan2p(side, mid)); #else diff --git a/drivers/opus/celt/vq.h b/thirdparty/opus/celt/vq.h similarity index 95% rename from drivers/opus/celt/vq.h rename to thirdparty/opus/celt/vq.h index 10b5e553062..5cfcbe50ea0 100644 --- a/drivers/opus/celt/vq.h +++ b/thirdparty/opus/celt/vq.h @@ -33,12 +33,12 @@ #ifndef VQ_H #define VQ_H -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" -#include "opus/celt/modes.h" +#include "entenc.h" +#include "entdec.h" +#include "modes.h" #if defined(MIPSr1_ASM) -#include "opus/celt/mips/vq_mipsr1.h" +#include "mips/vq_mipsr1.h" #endif diff --git a/drivers/opus/celt/x86/celt_lpc_sse.c b/thirdparty/opus/celt/x86/celt_lpc_sse.c similarity index 94% rename from drivers/opus/celt/x86/celt_lpc_sse.c rename to thirdparty/opus/celt/x86/celt_lpc_sse.c index cfc86dc66c2..67e5592acf3 100644 --- a/drivers/opus/celt/x86/celt_lpc_sse.c +++ b/thirdparty/opus/celt/x86/celt_lpc_sse.c @@ -24,16 +24,19 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" -#include "opus/celt/x86/x86cpu.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" +#include "x86cpu.h" #if defined(FIXED_POINT) diff --git a/drivers/opus/celt/x86/celt_lpc_sse.h b/thirdparty/opus/celt/x86/celt_lpc_sse.h similarity index 97% rename from drivers/opus/celt/x86/celt_lpc_sse.h rename to thirdparty/opus/celt/x86/celt_lpc_sse.h index 3787afd3ff8..c5ec796ed52 100644 --- a/drivers/opus/celt/x86/celt_lpc_sse.h +++ b/thirdparty/opus/celt/x86/celt_lpc_sse.h @@ -27,7 +27,10 @@ #ifndef CELT_LPC_SSE_H #define CELT_LPC_SSE_H -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) #define OVERRIDE_CELT_FIR diff --git a/drivers/opus/celt/x86/pitch_sse.c b/thirdparty/opus/celt/x86/pitch_sse.c similarity index 96% rename from drivers/opus/celt/x86/pitch_sse.c rename to thirdparty/opus/celt/x86/pitch_sse.c index 9f22ffd9ab2..20e73126b62 100644 --- a/drivers/opus/celt/x86/pitch_sse.c +++ b/thirdparty/opus/celt/x86/pitch_sse.c @@ -24,18 +24,21 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/silk/macros.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "macros.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" #if defined(OPUS_X86_MAY_HAVE_SSE) && !defined(FIXED_POINT) #include -#include "opus/celt/arch.h" +#include "arch.h" void xcorr_kernel_sse(const opus_val16 *x, const opus_val16 *y, opus_val32 sum[4], int len) { diff --git a/drivers/opus/celt/x86/pitch_sse.h b/thirdparty/opus/celt/x86/pitch_sse.h similarity index 99% rename from drivers/opus/celt/x86/pitch_sse.h rename to thirdparty/opus/celt/x86/pitch_sse.h index 2b4b54f61f6..d4cbeb8b9cd 100644 --- a/drivers/opus/celt/x86/pitch_sse.h +++ b/thirdparty/opus/celt/x86/pitch_sse.h @@ -32,7 +32,10 @@ #ifndef PITCH_SSE_H #define PITCH_SSE_H -#include "opus/opus_config.h" + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) void xcorr_kernel_sse4_1( diff --git a/drivers/opus/celt/x86/pitch_sse2.c b/thirdparty/opus/celt/x86/pitch_sse2.c similarity index 94% rename from drivers/opus/celt/x86/pitch_sse2.c rename to thirdparty/opus/celt/x86/pitch_sse2.c index b5a78b4acde..a0e7d1beaf2 100644 --- a/drivers/opus/celt/x86/pitch_sse2.c +++ b/thirdparty/opus/celt/x86/pitch_sse2.c @@ -24,16 +24,19 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include -#include "opus/silk/macros.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" +#include "macros.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" #if defined(OPUS_X86_MAY_HAVE_SSE2) && defined(FIXED_POINT) opus_val32 celt_inner_prod_sse2(const opus_val16 *x, const opus_val16 *y, diff --git a/drivers/opus/celt/x86/pitch_sse4_1.c b/thirdparty/opus/celt/x86/pitch_sse4_1.c similarity index 96% rename from drivers/opus/celt/x86/pitch_sse4_1.c rename to thirdparty/opus/celt/x86/pitch_sse4_1.c index 57fb3322105..a092c68b243 100644 --- a/drivers/opus/celt/x86/pitch_sse4_1.c +++ b/thirdparty/opus/celt/x86/pitch_sse4_1.c @@ -24,20 +24,23 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include -#include "opus/silk/macros.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" +#include "macros.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) #include -#include "opus/celt/x86/x86cpu.h" +#include "x86cpu.h" opus_val32 celt_inner_prod_sse4_1(const opus_val16 *x, const opus_val16 *y, int N) diff --git a/drivers/opus/celt/x86/x86_celt_map.c b/thirdparty/opus/celt/x86/x86_celt_map.c similarity index 96% rename from drivers/opus/celt/x86/x86_celt_map.c rename to thirdparty/opus/celt/x86/x86_celt_map.c index 5146ea2b384..8e5e449275c 100644 --- a/drivers/opus/celt/x86/x86_celt_map.c +++ b/thirdparty/opus/celt/x86/x86_celt_map.c @@ -24,12 +24,15 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/x86/x86cpu.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/pitch.h" -#include "opus/celt/x86/pitch_sse.h" +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +#include "x86/x86cpu.h" +#include "celt_lpc.h" +#include "pitch.h" +#include "pitch_sse.h" #if defined(OPUS_HAVE_RTCD) diff --git a/drivers/opus/celt/x86/x86cpu.c b/thirdparty/opus/celt/x86/x86cpu.c similarity index 95% rename from drivers/opus/celt/x86/x86cpu.c rename to thirdparty/opus/celt/x86/x86cpu.c index 91b9b185c28..555a576b8a2 100644 --- a/drivers/opus/celt/x86/x86cpu.c +++ b/thirdparty/opus/celt/x86/x86cpu.c @@ -24,13 +24,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/cpu_support.h" -#include "opus/silk/macros.h" -#include "opus/silk/main.h" -#include "opus/celt/pitch.h" -#include "opus/celt/x86/x86cpu.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "cpu_support.h" +#include "macros.h" +#include "main.h" +#include "pitch.h" +#include "x86cpu.h" #if (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ diff --git a/drivers/opus/celt/x86/x86cpu.h b/thirdparty/opus/celt/x86/x86cpu.h similarity index 100% rename from drivers/opus/celt/x86/x86cpu.h rename to thirdparty/opus/celt/x86/x86cpu.h diff --git a/drivers/opus/opus_config.h b/thirdparty/opus/config.h similarity index 100% rename from drivers/opus/opus_config.h rename to thirdparty/opus/config.h diff --git a/drivers/opus/http.c b/thirdparty/opus/http.c similarity index 99% rename from drivers/opus/http.c rename to thirdparty/opus/http.c index 602d514f6e5..cfd4e626a4d 100644 --- a/drivers/opus/http.c +++ b/thirdparty/opus/http.c @@ -9,9 +9,11 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #include #include #include @@ -212,7 +214,7 @@ static const char *op_parse_file_url(const char *_src){ # include # include # include -# include "opus/winerrno.h" +# include "winerrno.h" typedef SOCKET op_sock; diff --git a/drivers/opus/info.c b/thirdparty/opus/info.c similarity index 99% rename from drivers/opus/info.c rename to thirdparty/opus/info.c index b94393351e1..55e2906d5fb 100644 --- a/drivers/opus/info.c +++ b/thirdparty/opus/info.c @@ -9,9 +9,11 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #include #include diff --git a/drivers/opus/internal.c b/thirdparty/opus/internal.c similarity index 95% rename from drivers/opus/internal.c rename to thirdparty/opus/internal.c index bd7d2ee4bb7..96c80def82f 100644 --- a/drivers/opus/internal.c +++ b/thirdparty/opus/internal.c @@ -9,9 +9,11 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #if defined(OP_ENABLE_ASSERTIONS) void op_fatal_impl(const char *_str,const char *_file,int _line){ diff --git a/drivers/opus/internal.h b/thirdparty/opus/internal.h similarity index 99% rename from drivers/opus/internal.h rename to thirdparty/opus/internal.h index f7a5bd8c748..ee48ea34c92 100644 --- a/drivers/opus/internal.h +++ b/thirdparty/opus/internal.h @@ -29,7 +29,7 @@ # endif # include -# include "opus/opusfile.h" +# include typedef struct OggOpusLink OggOpusLink; diff --git a/drivers/opus/mlp.c b/thirdparty/opus/mlp.c similarity index 95% rename from drivers/opus/mlp.c rename to thirdparty/opus/mlp.c index 125106e882a..ff9e50df472 100644 --- a/drivers/opus/mlp.c +++ b/thirdparty/opus/mlp.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_types.h" +#include "opus_defines.h" #include -#include "opus/mlp.h" -#include "opus/celt/arch.h" -#include "opus/tansig_table.h" +#include "mlp.h" +#include "arch.h" +#include "tansig_table.h" #define MAX_NEURONS 100 #if 0 @@ -72,7 +75,7 @@ static OPUS_INLINE float tansig_approx(float x) return 1; if (!(x>-8)) return -1; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT /* Another check in case of -ffast-math */ if (celt_isnan(x)) return 0; diff --git a/drivers/opus/mlp.h b/thirdparty/opus/mlp.h similarity index 98% rename from drivers/opus/mlp.h rename to thirdparty/opus/mlp.h index 2b4962625d2..618e246e2c4 100644 --- a/drivers/opus/mlp.h +++ b/thirdparty/opus/mlp.h @@ -28,7 +28,7 @@ #ifndef _MLP_H_ #define _MLP_H_ -#include "opus/celt/arch.h" +#include "arch.h" typedef struct { int layers; diff --git a/drivers/opus/mlp_data.c b/thirdparty/opus/mlp_data.c similarity index 98% rename from drivers/opus/mlp_data.c rename to thirdparty/opus/mlp_data.c index c542a509cfc..c2fda4e2e59 100644 --- a/drivers/opus/mlp_data.c +++ b/thirdparty/opus/mlp_data.c @@ -1,8 +1,11 @@ /* The contents of this file was automatically generated by mlp_train.c It contains multi-layer perceptron (MLP) weights. */ -#include "opus/opus_config.h" -#include "opus/mlp.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mlp.h" /* RMS error was 0.138320, seed was 1361535663 */ diff --git a/drivers/opus/opus.c b/thirdparty/opus/opus.c similarity index 99% rename from drivers/opus/opus.c rename to thirdparty/opus/opus.c index 762a9d74696..e9ce93b3084 100644 --- a/drivers/opus/opus.c +++ b/thirdparty/opus/opus.c @@ -24,10 +24,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus.h" -#include "opus/opus_private.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus.h" +#include "opus_private.h" #ifndef DISABLE_FLOAT_API OPUS_EXPORT void opus_pcm_soft_clip(float *_x, int N, int C, float *declip_mem) diff --git a/drivers/opus/opus.h b/thirdparty/opus/opus.h similarity index 99% rename from drivers/opus/opus.h rename to thirdparty/opus/opus.h index 4cb171378b5..b0bdf6f2df7 100644 --- a/drivers/opus/opus.h +++ b/thirdparty/opus/opus.h @@ -33,8 +33,8 @@ #ifndef OPUS_H #define OPUS_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/opus_compare.c b/thirdparty/opus/opus_compare.c similarity index 100% rename from drivers/opus/opus_compare.c rename to thirdparty/opus/opus_compare.c diff --git a/drivers/opus/opus_custom.h b/thirdparty/opus/opus_custom.h similarity index 99% rename from drivers/opus/opus_custom.h rename to thirdparty/opus/opus_custom.h index 32fcb81ac79..41f36bf2fbc 100644 --- a/drivers/opus/opus_custom.h +++ b/thirdparty/opus/opus_custom.h @@ -35,7 +35,7 @@ #ifndef OPUS_CUSTOM_H #define OPUS_CUSTOM_H -#include "opus/opus_defines.h" +#include "opus_defines.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/opus_decoder.c b/thirdparty/opus/opus_decoder.c similarity index 98% rename from drivers/opus/opus_decoder.c rename to thirdparty/opus/opus_decoder.c index b954b98f02f..080bec5072a 100644 --- a/drivers/opus/opus_decoder.c +++ b/thirdparty/opus/opus_decoder.c @@ -24,7 +24,10 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #ifndef OPUS_BUILD # error "OPUS_BUILD _MUST_ be defined to build Opus. This probably means you need other defines as well, as in a config.h. See the included build files for details." @@ -35,19 +38,19 @@ #endif #include -#include "opus/celt/celt.h" -#include "opus/opus.h" -#include "opus/celt/entdec.h" -#include "opus/celt/modes.h" -#include "opus/silk/API.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/float_cast.h" -#include "opus/opus_private.h" -#include "opus/celt/os_support.h" -#include "opus/silk/structs.h" -#include "opus/silk/define.h" -#include "opus/celt/mathops.h" -#include "opus/celt/cpu_support.h" +#include "celt.h" +#include "opus.h" +#include "entdec.h" +#include "modes.h" +#include "API.h" +#include "stack_alloc.h" +#include "float_cast.h" +#include "opus_private.h" +#include "os_support.h" +#include "structs.h" +#include "define.h" +#include "mathops.h" +#include "cpu_support.h" struct OpusDecoder { int celt_dec_offset; @@ -68,7 +71,7 @@ struct OpusDecoder { int frame_size; int prev_redundancy; int last_packet_duration; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT opus_val16 softclip_mem[2]; #endif @@ -291,7 +294,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, /* In fixed-point, we can tell CELT to do the accumulation on top of the SILK PCM buffer. This saves some stack space. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT celt_accum = (mode != MODE_CELT_ONLY) && (frame_size >= F10); #else celt_accum = 0; @@ -335,7 +338,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, { int lost_flag, decoded_samples; opus_int16 *pcm_ptr; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (celt_accum) pcm_ptr = pcm; else @@ -504,7 +507,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, if (mode != MODE_CELT_ONLY && !celt_accum) { -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT for (i=0;ichannels;i++) pcm[i] = SAT16(ADD32(pcm[i], pcm_silk[i])); #else @@ -696,7 +699,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, st->last_packet_duration = nb_samples; if (OPUS_CHECK_ARRAY(pcm, nb_samples*st->channels)) OPUS_PRINT_INT(nb_samples); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT if (soft_clip) opus_pcm_soft_clip(pcm, nb_samples, st->channels, st->softclip_mem); else @@ -705,7 +708,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, return nb_samples; } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_decode(OpusDecoder *st, const unsigned char *data, opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec) diff --git a/drivers/opus/opus_defines.h b/thirdparty/opus/opus_defines.h similarity index 99% rename from drivers/opus/opus_defines.h rename to thirdparty/opus/opus_defines.h index b972ce0eb90..647ed5d6f2e 100644 --- a/drivers/opus/opus_defines.h +++ b/thirdparty/opus/opus_defines.h @@ -33,7 +33,7 @@ #ifndef OPUS_DEFINES_H #define OPUS_DEFINES_H -#include "opus/opus_types.h" +#include "opus_types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/opus_encoder.c b/thirdparty/opus/opus_encoder.c similarity index 98% rename from drivers/opus/opus_encoder.c rename to thirdparty/opus/opus_encoder.c index 5c6af5a199d..a7e19127d69 100644 --- a/drivers/opus/opus_encoder.c +++ b/thirdparty/opus/opus_encoder.c @@ -24,28 +24,31 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/celt.h" -#include "opus/celt/entenc.h" -#include "opus/celt/modes.h" -#include "opus/silk/API.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/float_cast.h" -#include "opus/opus.h" -#include "opus/celt/arch.h" -#include "opus/celt/pitch.h" -#include "opus/opus_private.h" -#include "opus/celt/os_support.h" -#include "opus/celt/cpu_support.h" -#include "opus/analysis.h" -#include "opus/celt/mathops.h" -#include "opus/silk/tuning_parameters.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/structs_FIX.h" +#include "celt.h" +#include "entenc.h" +#include "modes.h" +#include "API.h" +#include "stack_alloc.h" +#include "float_cast.h" +#include "opus.h" +#include "arch.h" +#include "pitch.h" +#include "opus_private.h" +#include "os_support.h" +#include "cpu_support.h" +#include "analysis.h" +#include "mathops.h" +#include "tuning_parameters.h" +#ifdef FIXED_POINT +#include "fixed/structs_FIX.h" #else -#include "opus/silk/float/structs_FLP.h" +#include "float/structs_FLP.h" #endif #define MAX_ENCODER_BUFFER 480 @@ -280,7 +283,7 @@ static unsigned char gen_toc(int mode, int framerate, int bandwidth, int channel return toc; } -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT static void silk_biquad_float( const opus_val16 *in, /* I: Input signal */ const opus_int32 *B_Q28, /* I: MA coefficients [3] */ @@ -342,7 +345,7 @@ static void hp_cutoff(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *ou A_Q28[ 0 ] = silk_SMULWW( r_Q22, silk_SMULWW( Fc_Q19, Fc_Q19 ) - SILK_FIX_CONST( 2.0, 22 ) ); A_Q28[ 1 ] = silk_SMULWW( r_Q22, r_Q22 ); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT silk_biquad_alt( in, B_Q28, A_Q28, hp_mem, out, len, channels ); if( channels == 2 ) { silk_biquad_alt( in+1, B_Q28, A_Q28, hp_mem+2, out+1, len, channels ); @@ -355,7 +358,7 @@ static void hp_cutoff(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *ou #endif } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT static void dc_reject(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs) { int c, i; @@ -727,7 +730,7 @@ static int optimize_framesize(const void *x, int len, int C, opus_int32 Fs, #endif #ifndef DISABLE_FLOAT_API -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #define PCM2VAL(x) FLOAT2INT16(x) #else #define PCM2VAL(x) SCALEIN(x) @@ -753,7 +756,7 @@ void downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, in sub[j] += PCM2VAL(x[(j+offset)*C+c]); } } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT scale = (1<silk_mode.complexity >= 10 && st->Fs==48000) #else if (st->silk_mode.complexity >= 7 && st->Fs==48000) @@ -1459,7 +1462,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ } else { dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs); } -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT if (float_api) { opus_val32 sum; @@ -1480,7 +1483,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ if (st->mode != MODE_CELT_ONLY) { opus_int32 total_bitRate, celt_rate; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT const opus_int16 *pcm_silk; #else VARDECL(opus_int16, pcm_silk); @@ -1628,7 +1631,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ gain_fade(st->delay_buffer+prefill_offset, st->delay_buffer+prefill_offset, 0, Q15ONE, celt_mode->overlap, st->Fs/400, st->channels, celt_mode->window, st->Fs); OPUS_CLEAR(st->delay_buffer, prefill_offset); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT pcm_silk = st->delay_buffer; #else for (i=0;iencoder_buffer*st->channels;i++) @@ -1637,7 +1640,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ silk_Encode( silk_enc, &st->silk_mode, pcm_silk, st->encoder_buffer, NULL, &zero, 1 ); } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT pcm_silk = pcm_buf+total_buffer*st->channels; #else for (i=0;ichannels;i++) @@ -1781,7 +1784,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ opus_val16 g1, g2; g1 = st->hybrid_stereo_width_Q14; g2 = (opus_val16)(st->silk_mode.stereoWidth_Q14); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT g1 = g1==16384 ? Q15ONE : SHL16(g1,1); g2 = g2==16384 ? Q15ONE : SHL16(g2,1); #else @@ -1961,7 +1964,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ return ret; } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #ifndef DISABLE_FLOAT_API opus_int32 opus_encode_float(OpusEncoder *st, const float *pcm, int analysis_frame_size, diff --git a/drivers/opus/opus_multistream.c b/thirdparty/opus/opus_multistream.c similarity index 91% rename from drivers/opus/opus_multistream.c rename to thirdparty/opus/opus_multistream.c index aa948037799..09c3639b7f0 100644 --- a/drivers/opus/opus_multistream.c +++ b/thirdparty/opus/opus_multistream.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_multistream.h" -#include "opus/opus.h" -#include "opus/opus_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" #include -#include "opus/celt/float_cast.h" -#include "opus/celt/os_support.h" +#include "float_cast.h" +#include "os_support.h" int validate_layout(const ChannelLayout *layout) diff --git a/drivers/opus/opus_multistream.h b/thirdparty/opus/opus_multistream.h similarity index 99% rename from drivers/opus/opus_multistream.h rename to thirdparty/opus/opus_multistream.h index 5519c46a9f4..47e03900bd5 100644 --- a/drivers/opus/opus_multistream.h +++ b/thirdparty/opus/opus_multistream.h @@ -33,7 +33,7 @@ #ifndef OPUS_MULTISTREAM_H #define OPUS_MULTISTREAM_H -#include "opus/opus.h" +#include "opus.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/opus_multistream_decoder.c b/thirdparty/opus/opus_multistream_decoder.c similarity index 98% rename from drivers/opus/opus_multistream_decoder.c rename to thirdparty/opus/opus_multistream_decoder.c index 25100edba23..b95eaa6eac1 100644 --- a/drivers/opus/opus_multistream_decoder.c +++ b/thirdparty/opus/opus_multistream_decoder.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_multistream.h" -#include "opus/opus.h" -#include "opus/opus_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" #include -#include "opus/celt/float_cast.h" -#include "opus/celt/os_support.h" +#include "float_cast.h" +#include "os_support.h" struct OpusMSDecoder { ChannelLayout layout; @@ -358,7 +361,7 @@ static void opus_copy_channel_out_short( -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_multistream_decode( OpusMSDecoder *st, const unsigned char *data, diff --git a/drivers/opus/opus_multistream_encoder.c b/thirdparty/opus/opus_multistream_encoder.c similarity index 98% rename from drivers/opus/opus_multistream_encoder.c rename to thirdparty/opus/opus_multistream_encoder.c index 426c72e9972..9e857735736 100644 --- a/drivers/opus/opus_multistream_encoder.c +++ b/thirdparty/opus/opus_multistream_encoder.c @@ -24,21 +24,24 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_multistream.h" -#include "opus/opus.h" -#include "opus/opus_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" #include -#include "opus/celt/float_cast.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/mdct.h" -#include "opus/celt/modes.h" -#include "opus/celt/bands.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/pitch.h" +#include "float_cast.h" +#include "os_support.h" +#include "mathops.h" +#include "mdct.h" +#include "modes.h" +#include "bands.h" +#include "quant_bands.h" +#include "pitch.h" typedef struct { int nb_streams; @@ -202,7 +205,7 @@ static opus_val16 logSum(opus_val16 a, opus_val16 b) } if (!(diff < QCONST16(8.f, DB_SHIFT))) /* inverted to catch NaNs */ return max; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT low = SHR32(diff, DB_SHIFT-1); frac = SHL16(diff - SHL16(low, DB_SHIFT-1), 16-DB_SHIFT); #else @@ -258,7 +261,7 @@ void surround_analysis(const CELTMode *celt_mode, const void *pcm, opus_val16 *b OPUS_COPY(in, mem+c*overlap, overlap); (*copy_channel_in)(x, 1, pcm, channels, c, len); celt_preemphasis(x, in+overlap, frame_size, 1, upsample, celt_mode->preemph, preemph_mem+c, 0); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT { opus_val32 sum; sum = celt_inner_prod(in, in, frame_size+overlap, 0); @@ -668,7 +671,7 @@ static opus_int32 surround_rate_allocation( + nb_lfe*lfe_ratio; channel_rate = 256*(st->bitrate_bps-lfe_offset*nb_lfe-stream_offset*(nb_coupled+nb_uncoupled))/total; } -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != Fs/50) { opus_int32 bonus; @@ -955,7 +958,7 @@ static void opus_copy_channel_in_short( } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_multistream_encode( OpusMSEncoder *st, const opus_val16 *pcm, diff --git a/drivers/opus/opus_private.h b/thirdparty/opus/opus_private.h similarity index 98% rename from drivers/opus/opus_private.h rename to thirdparty/opus/opus_private.h index 129977ed11a..3b62eed0964 100644 --- a/drivers/opus/opus_private.h +++ b/thirdparty/opus/opus_private.h @@ -29,9 +29,9 @@ #ifndef OPUS_PRIVATE_H #define OPUS_PRIVATE_H -#include "opus/celt/arch.h" -#include "opus/opus.h" -#include "opus/celt/celt.h" +#include "arch.h" +#include "opus.h" +#include "celt.h" #include /* offsetof */ diff --git a/drivers/opus/opus_types.h b/thirdparty/opus/opus_types.h similarity index 100% rename from drivers/opus/opus_types.h rename to thirdparty/opus/opus_types.h diff --git a/drivers/opus/opusfile.c b/thirdparty/opus/opusfile.c similarity index 99% rename from drivers/opus/opusfile.c rename to thirdparty/opus/opusfile.c index a9d6cc4d630..9c9b684ca4d 100644 --- a/drivers/opus/opusfile.c +++ b/thirdparty/opus/opusfile.c @@ -14,9 +14,11 @@ last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $ ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #include #include #include @@ -24,7 +26,7 @@ #include #include -#include "opus/opusfile.h" +#include "opusfile.h" /*This implementation is largely based off of libvorbisfile. All of the Ogg bits work roughly the same, though I have made some diff --git a/drivers/opus/opusfile.h b/thirdparty/opus/opusfile.h similarity index 99% rename from drivers/opus/opusfile.h rename to thirdparty/opus/opusfile.h index da31a29769d..3604115c31e 100644 --- a/drivers/opus/opusfile.h +++ b/thirdparty/opus/opusfile.h @@ -107,7 +107,7 @@ extern "C" { # include # include # include -# include "opus/opus_multistream.h" +# include /**@cond PRIVATE*/ diff --git a/drivers/opus/repacketizer.c b/thirdparty/opus/repacketizer.c similarity index 98% rename from drivers/opus/repacketizer.c rename to thirdparty/opus/repacketizer.c index 3822f9c86f7..f27e9ab9582 100644 --- a/drivers/opus/repacketizer.c +++ b/thirdparty/opus/repacketizer.c @@ -24,11 +24,14 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus.h" -#include "opus/opus_private.h" -#include "opus/celt/os_support.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus.h" +#include "opus_private.h" +#include "os_support.h" int opus_repacketizer_get_size(void) diff --git a/drivers/opus/repacketizer_demo.c b/thirdparty/opus/repacketizer_demo.c similarity index 98% rename from drivers/opus/repacketizer_demo.c rename to thirdparty/opus/repacketizer_demo.c index 57acf6a53f0..dc05c1b3592 100644 --- a/drivers/opus/repacketizer_demo.c +++ b/thirdparty/opus/repacketizer_demo.c @@ -24,9 +24,12 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus.h" #include #include #include diff --git a/drivers/opus/silk/A2NLSF.c b/thirdparty/opus/silk/A2NLSF.c similarity index 99% rename from drivers/opus/silk/A2NLSF.c rename to thirdparty/opus/silk/A2NLSF.c index 38dbefc3bfc..b6e9e5ffcca 100644 --- a/drivers/opus/silk/A2NLSF.c +++ b/thirdparty/opus/silk/A2NLSF.c @@ -30,10 +30,13 @@ POSSIBILITY OF SUCH DAMAGE. /* A piecewise linear approximation maps LSF <-> cos(LSF) */ /* Therefore the result is not accurate NLSFs, but the two */ /* functions are accurate inverses of each other */ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "tables.h" /* Number of binary divisions, when not in low complexity mode */ #define BIN_DIV_STEPS_A2NLSF_FIX 3 /* must be no higher than 16 - log2( LSF_COS_TAB_SZ_FIX ) */ diff --git a/drivers/opus/silk/API.h b/thirdparty/opus/silk/API.h similarity index 97% rename from drivers/opus/silk/API.h rename to thirdparty/opus/silk/API.h index ce868c0c995..0131acbb08f 100644 --- a/drivers/opus/silk/API.h +++ b/thirdparty/opus/silk/API.h @@ -28,11 +28,11 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_API_H #define SILK_API_H -#include "opus/silk/control.h" -#include "opus/silk/typedef.h" -#include "opus/silk/errors.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "control.h" +#include "typedef.h" +#include "errors.h" +#include "entenc.h" +#include "entdec.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/CNG.c b/thirdparty/opus/silk/CNG.c similarity index 99% rename from drivers/opus/silk/CNG.c rename to thirdparty/opus/silk/CNG.c index 595a2888653..61787c2302a 100644 --- a/drivers/opus/silk/CNG.c +++ b/thirdparty/opus/silk/CNG.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /* Generates excitation for CNG LPC synthesis */ static OPUS_INLINE void silk_CNG_exc( diff --git a/drivers/opus/silk/HP_variable_cutoff.c b/thirdparty/opus/silk/HP_variable_cutoff.c similarity index 95% rename from drivers/opus/silk/HP_variable_cutoff.c rename to thirdparty/opus/silk/HP_variable_cutoff.c index 6b93fdb5a37..bbe10f04cef 100644 --- a/drivers/opus/silk/HP_variable_cutoff.c +++ b/thirdparty/opus/silk/HP_variable_cutoff.c @@ -24,13 +24,16 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/main_FIX.h" -#else -#include "opus/silk/float/main_FLP.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif -#include "opus/silk/tuning_parameters.h" +#ifdef FIXED_POINT +#include "main_FIX.h" +#else +#include "main_FLP.h" +#endif +#include "tuning_parameters.h" /* High-pass filter with cutoff frequency adaptation based on pitch lag statistics */ void silk_HP_variable_cutoff( diff --git a/drivers/opus/silk/Inlines.h b/thirdparty/opus/silk/Inlines.h similarity index 100% rename from drivers/opus/silk/Inlines.h rename to thirdparty/opus/silk/Inlines.h diff --git a/drivers/opus/silk/LPC_analysis_filter.c b/thirdparty/opus/silk/LPC_analysis_filter.c similarity index 96% rename from drivers/opus/silk/LPC_analysis_filter.c rename to thirdparty/opus/silk/LPC_analysis_filter.c index f3c34b5482b..20906673ff1 100644 --- a/drivers/opus/silk/LPC_analysis_filter.c +++ b/thirdparty/opus/silk/LPC_analysis_filter.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/celt_lpc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "celt_lpc.h" /*******************************************/ /* LPC analysis filter */ @@ -46,7 +49,7 @@ void silk_LPC_analysis_filter( ) { opus_int j; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_int16 mem[SILK_MAX_ORDER_LPC]; opus_int16 num[SILK_MAX_ORDER_LPC]; #else @@ -59,7 +62,7 @@ void silk_LPC_analysis_filter( silk_assert( (d & 1) == 0 ); silk_assert( d <= len ); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT silk_assert( d <= SILK_MAX_ORDER_LPC ); for ( j = 0; j < d; j++ ) { num[ j ] = -B[ j ]; diff --git a/drivers/opus/silk/LPC_inv_pred_gain.c b/thirdparty/opus/silk/LPC_inv_pred_gain.c similarity index 98% rename from drivers/opus/silk/LPC_inv_pred_gain.c rename to thirdparty/opus/silk/LPC_inv_pred_gain.c index 8ace51500c9..4af89aa5fad 100644 --- a/drivers/opus/silk/LPC_inv_pred_gain.c +++ b/thirdparty/opus/silk/LPC_inv_pred_gain.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" #define QA 24 #define A_LIMIT SILK_FIX_CONST( 0.99975, QA ) @@ -127,7 +130,7 @@ opus_int32 silk_LPC_inverse_pred_gain( /* O Returns inverse predi return LPC_inverse_pred_gain_QA( Atmp_QA, order ); } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* For input in Q24 domain */ opus_int32 silk_LPC_inverse_pred_gain_Q24( /* O Returns inverse prediction gain in energy domain, Q30 */ diff --git a/drivers/opus/silk/LP_variable_cutoff.c b/thirdparty/opus/silk/LP_variable_cutoff.c similarity index 98% rename from drivers/opus/silk/LP_variable_cutoff.c rename to thirdparty/opus/silk/LP_variable_cutoff.c index b39497c4d90..f639e1f899a 100644 --- a/drivers/opus/silk/LP_variable_cutoff.c +++ b/thirdparty/opus/silk/LP_variable_cutoff.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Elliptic/Cauer filters designed with 0.1 dB passband ripple, @@ -32,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. [0.95 : 0.15 : 0.35] normalized cut off frequencies. */ -#include "opus/silk/main.h" +#include "main.h" /* Helper function, interpolates the filter taps */ static OPUS_INLINE void silk_LP_interpolate_filter_taps( diff --git a/drivers/opus/silk/MacroCount.h b/thirdparty/opus/silk/MacroCount.h similarity index 100% rename from drivers/opus/silk/MacroCount.h rename to thirdparty/opus/silk/MacroCount.h diff --git a/drivers/opus/silk/MacroDebug.h b/thirdparty/opus/silk/MacroDebug.h similarity index 100% rename from drivers/opus/silk/MacroDebug.h rename to thirdparty/opus/silk/MacroDebug.h diff --git a/drivers/opus/silk/NLSF2A.c b/thirdparty/opus/silk/NLSF2A.c similarity index 98% rename from drivers/opus/silk/NLSF2A.c rename to thirdparty/opus/silk/NLSF2A.c index 09db1c1c3f0..b1c559ea682 100644 --- a/drivers/opus/silk/NLSF2A.c +++ b/thirdparty/opus/silk/NLSF2A.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* conversion between prediction filter coefficients and LSFs */ /* order should be even */ @@ -32,8 +35,8 @@ POSSIBILITY OF SUCH DAMAGE. /* therefore the result is not accurate LSFs, but the two */ /* functions are accurate inverses of each other */ -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/tables.h" +#include "SigProc_FIX.h" +#include "tables.h" #define QA 16 diff --git a/drivers/opus/silk/NLSF_VQ.c b/thirdparty/opus/silk/NLSF_VQ.c similarity index 98% rename from drivers/opus/silk/NLSF_VQ.c rename to thirdparty/opus/silk/NLSF_VQ.c index 99a37d4e0d2..69b6e22e189 100644 --- a/drivers/opus/silk/NLSF_VQ.c +++ b/thirdparty/opus/silk/NLSF_VQ.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Compute quantization errors for an LPC_order element input vector for a VQ codebook */ void silk_NLSF_VQ( diff --git a/drivers/opus/silk/NLSF_VQ_weights_laroia.c b/thirdparty/opus/silk/NLSF_VQ_weights_laroia.c similarity index 97% rename from drivers/opus/silk/NLSF_VQ_weights_laroia.c rename to thirdparty/opus/silk/NLSF_VQ_weights_laroia.c index 5743a4dee9f..04894c59ab7 100644 --- a/drivers/opus/silk/NLSF_VQ_weights_laroia.c +++ b/thirdparty/opus/silk/NLSF_VQ_weights_laroia.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/define.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "define.h" +#include "SigProc_FIX.h" /* R. Laroia, N. Phamdo and N. Farvardin, "Robust and Efficient Quantization of Speech LSP diff --git a/drivers/opus/silk/NLSF_decode.c b/thirdparty/opus/silk/NLSF_decode.c similarity index 98% rename from drivers/opus/silk/NLSF_decode.c rename to thirdparty/opus/silk/NLSF_decode.c index 6b922f3eeec..9f715060b8e 100644 --- a/drivers/opus/silk/NLSF_decode.c +++ b/thirdparty/opus/silk/NLSF_decode.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Predictive dequantizer for NLSF residuals */ static OPUS_INLINE void silk_NLSF_residual_dequant( /* O Returns RD value in Q30 */ diff --git a/drivers/opus/silk/NLSF_del_dec_quant.c b/thirdparty/opus/silk/NLSF_del_dec_quant.c similarity index 99% rename from drivers/opus/silk/NLSF_del_dec_quant.c rename to thirdparty/opus/silk/NLSF_del_dec_quant.c index 3f81b2028ce..c3b9efccfa1 100644 --- a/drivers/opus/silk/NLSF_del_dec_quant.c +++ b/thirdparty/opus/silk/NLSF_del_dec_quant.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Delayed-decision quantizer for NLSF residuals */ opus_int32 silk_NLSF_del_dec_quant( /* O Returns RD value in Q25 */ diff --git a/drivers/opus/silk/NLSF_encode.c b/thirdparty/opus/silk/NLSF_encode.c similarity index 98% rename from drivers/opus/silk/NLSF_encode.c rename to thirdparty/opus/silk/NLSF_encode.c index 9efb3e51581..03a036fda2f 100644 --- a/drivers/opus/silk/NLSF_encode.c +++ b/thirdparty/opus/silk/NLSF_encode.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /***********************/ /* NLSF vector encoder */ diff --git a/drivers/opus/silk/NLSF_stabilize.c b/thirdparty/opus/silk/NLSF_stabilize.c similarity index 98% rename from drivers/opus/silk/NLSF_stabilize.c rename to thirdparty/opus/silk/NLSF_stabilize.c index 1a45e169253..1fa1ea379bd 100644 --- a/drivers/opus/silk/NLSF_stabilize.c +++ b/thirdparty/opus/silk/NLSF_stabilize.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* NLSF stabilizer: */ /* */ @@ -35,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE. /* - Output are sorted NLSF coefficients */ /* */ -#include "opus/silk/SigProc_FIX.h" +#include "SigProc_FIX.h" /* Constant Definitions */ #define MAX_LOOPS 20 diff --git a/drivers/opus/silk/NLSF_unpack.c b/thirdparty/opus/silk/NLSF_unpack.c similarity index 97% rename from drivers/opus/silk/NLSF_unpack.c rename to thirdparty/opus/silk/NLSF_unpack.c index c958f4a6ef1..17bd23f752f 100644 --- a/drivers/opus/silk/NLSF_unpack.c +++ b/thirdparty/opus/silk/NLSF_unpack.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Unpack predictor values and indices for entropy coding tables */ void silk_NLSF_unpack( diff --git a/drivers/opus/silk/NSQ.c b/thirdparty/opus/silk/NSQ.c similarity index 99% rename from drivers/opus/silk/NSQ.c rename to thirdparty/opus/silk/NSQ.c index e41e533bde0..a0658840700 100644 --- a/drivers/opus/silk/NSQ.c +++ b/thirdparty/opus/silk/NSQ.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" static OPUS_INLINE void silk_nsq_scale_states( const silk_encoder_state *psEncC, /* I Encoder State */ diff --git a/thirdparty/opus/silk/NSQ.h b/thirdparty/opus/silk/NSQ.h new file mode 100644 index 00000000000..971832f660e --- /dev/null +++ b/thirdparty/opus/silk/NSQ.h @@ -0,0 +1,101 @@ +/*********************************************************************** +Copyright (c) 2014 Vidyo. +Copyright (c) 2006-2011, Skype Limited. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ +#ifndef SILK_NSQ_H +#define SILK_NSQ_H + +#include "SigProc_FIX.h" + +#undef silk_short_prediction_create_arch_coef + +static OPUS_INLINE opus_int32 silk_noise_shape_quantizer_short_prediction_c(const opus_int32 *buf32, const opus_int16 *coef16, opus_int order) +{ + opus_int32 out; + silk_assert( order == 10 || order == 16 ); + + /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ + out = silk_RSHIFT( order, 1 ); + out = silk_SMLAWB( out, buf32[ 0 ], coef16[ 0 ] ); + out = silk_SMLAWB( out, buf32[ -1 ], coef16[ 1 ] ); + out = silk_SMLAWB( out, buf32[ -2 ], coef16[ 2 ] ); + out = silk_SMLAWB( out, buf32[ -3 ], coef16[ 3 ] ); + out = silk_SMLAWB( out, buf32[ -4 ], coef16[ 4 ] ); + out = silk_SMLAWB( out, buf32[ -5 ], coef16[ 5 ] ); + out = silk_SMLAWB( out, buf32[ -6 ], coef16[ 6 ] ); + out = silk_SMLAWB( out, buf32[ -7 ], coef16[ 7 ] ); + out = silk_SMLAWB( out, buf32[ -8 ], coef16[ 8 ] ); + out = silk_SMLAWB( out, buf32[ -9 ], coef16[ 9 ] ); + + if( order == 16 ) + { + out = silk_SMLAWB( out, buf32[ -10 ], coef16[ 10 ] ); + out = silk_SMLAWB( out, buf32[ -11 ], coef16[ 11 ] ); + out = silk_SMLAWB( out, buf32[ -12 ], coef16[ 12 ] ); + out = silk_SMLAWB( out, buf32[ -13 ], coef16[ 13 ] ); + out = silk_SMLAWB( out, buf32[ -14 ], coef16[ 14 ] ); + out = silk_SMLAWB( out, buf32[ -15 ], coef16[ 15 ] ); + } + return out; +} + +#define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) ((void)arch,silk_noise_shape_quantizer_short_prediction_c(in, coef, order)) + +static OPUS_INLINE opus_int32 silk_NSQ_noise_shape_feedback_loop_c(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order) +{ + opus_int32 out; + opus_int32 tmp1, tmp2; + opus_int j; + + tmp2 = data0[0]; + tmp1 = data1[0]; + data1[0] = tmp2; + + out = silk_RSHIFT(order, 1); + out = silk_SMLAWB(out, tmp2, coef[0]); + + for (j = 2; j < order; j += 2) { + tmp2 = data1[j - 1]; + data1[j - 1] = tmp1; + out = silk_SMLAWB(out, tmp1, coef[j - 1]); + tmp1 = data1[j + 0]; + data1[j + 0] = tmp2; + out = silk_SMLAWB(out, tmp2, coef[j]); + } + data1[order - 1] = tmp1; + out = silk_SMLAWB(out, tmp1, coef[order - 1]); + /* Q11 -> Q12 */ + out = silk_LSHIFT32( out, 1 ); + return out; +} + +#define silk_NSQ_noise_shape_feedback_loop(data0, data1, coef, order, arch) ((void)arch,silk_NSQ_noise_shape_feedback_loop_c(data0, data1, coef, order)) + +#if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +#include "arm/NSQ_neon.h" +#endif + +#endif /* SILK_NSQ_H */ diff --git a/drivers/opus/silk/NSQ_del_dec.c b/thirdparty/opus/silk/NSQ_del_dec.c similarity index 99% rename from drivers/opus/silk/NSQ_del_dec.c rename to thirdparty/opus/silk/NSQ_del_dec.c index 28b385e4159..aff560c2210 100644 --- a/drivers/opus/silk/NSQ_del_dec.c +++ b/thirdparty/opus/silk/NSQ_del_dec.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" typedef struct { opus_int32 sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LENGTH ]; @@ -55,7 +58,7 @@ typedef struct { typedef NSQ_sample_struct NSQ_sample_pair[ 2 ]; #if defined(MIPSr1_ASM) -#include "opus/silk/mips/NSQ_del_dec_mipsr1.h" +#include "mips/NSQ_del_dec_mipsr1.h" #endif static OPUS_INLINE void silk_nsq_del_dec_scale_states( const silk_encoder_state *psEncC, /* I Encoder State */ diff --git a/drivers/opus/silk/PLC.c b/thirdparty/opus/silk/PLC.c similarity index 99% rename from drivers/opus/silk/PLC.c rename to thirdparty/opus/silk/PLC.c index 4007112c5a8..34a94bc313e 100644 --- a/drivers/opus/silk/PLC.c +++ b/thirdparty/opus/silk/PLC.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/PLC.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" +#include "PLC.h" #define NB_ATT 2 static const opus_int16 HARM_ATT_Q15[NB_ATT] = { 32440, 31130 }; /* 0.99, 0.95 */ diff --git a/drivers/opus/silk/PLC.h b/thirdparty/opus/silk/PLC.h similarity index 99% rename from drivers/opus/silk/PLC.h rename to thirdparty/opus/silk/PLC.h index 209c2de48f7..6438f516330 100644 --- a/drivers/opus/silk/PLC.h +++ b/thirdparty/opus/silk/PLC.h @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_PLC_H #define SILK_PLC_H -#include "opus/silk/main.h" +#include "main.h" #define BWE_COEF 0.99 #define V_PITCH_GAIN_START_MIN_Q14 11469 /* 0.7 in Q14 */ diff --git a/drivers/opus/silk/SigProc_FIX.h b/thirdparty/opus/silk/SigProc_FIX.h similarity index 98% rename from drivers/opus/silk/SigProc_FIX.h rename to thirdparty/opus/silk/SigProc_FIX.h index 743cf7800c3..b63299441e9 100644 --- a/drivers/opus/silk/SigProc_FIX.h +++ b/thirdparty/opus/silk/SigProc_FIX.h @@ -38,13 +38,13 @@ extern "C" #define SILK_MAX_ORDER_LPC 16 /* max order of the LPC analysis in schur() and k2a() */ #include /* for memset(), memcpy(), memmove() */ -#include "opus/silk/typedef.h" -#include "opus/silk/resampler_structs.h" -#include "opus/silk/macros.h" -#include "opus/celt/cpu_support.h" +#include "typedef.h" +#include "resampler_structs.h" +#include "macros.h" +#include "cpu_support.h" #if defined(OPUS_X86_MAY_HAVE_SSE4_1) -#include "opus/silk/x86/SigProc_FIX_sse.h" +#include "x86/SigProc_FIX_sse.h" #endif /********************************************************************/ @@ -591,20 +591,20 @@ static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b) ((void)(arch),silk_inner_prod16_aligned_64_c(inVec1, inVec2, len)) #endif -#include "opus/silk/Inlines.h" -#include "opus/silk/MacroCount.h" -#include "opus/silk/MacroDebug.h" +#include "Inlines.h" +#include "MacroCount.h" +#include "MacroDebug.h" #ifdef OPUS_ARM_INLINE_ASM -#include "opus/silk/arm/SigProc_FIX_armv4.h" +#include "arm/SigProc_FIX_armv4.h" #endif #ifdef OPUS_ARM_INLINE_EDSP -#include "opus/silk/arm/SigProc_FIX_armv5e.h" +#include "arm/SigProc_FIX_armv5e.h" #endif #if defined(MIPSr1_ASM) -#include "opus/silk/mips/sigproc_fix_mipsr1.h" +#include "mips/sigproc_fix_mipsr1.h" #endif diff --git a/drivers/opus/silk/VAD.c b/thirdparty/opus/silk/VAD.c similarity index 99% rename from drivers/opus/silk/VAD.c rename to thirdparty/opus/silk/VAD.c index bb664cff875..0a782af2f13 100644 --- a/drivers/opus/silk/VAD.c +++ b/thirdparty/opus/silk/VAD.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /* Silk VAD noise level estimation */ # if !defined(OPUS_X86_MAY_HAVE_SSE4_1) diff --git a/drivers/opus/silk/VQ_WMat_EC.c b/thirdparty/opus/silk/VQ_WMat_EC.c similarity index 98% rename from drivers/opus/silk/VQ_WMat_EC.c rename to thirdparty/opus/silk/VQ_WMat_EC.c index fec9ee8dde9..7983f1db80c 100644 --- a/drivers/opus/silk/VQ_WMat_EC.c +++ b/thirdparty/opus/silk/VQ_WMat_EC.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Entropy constrained matrix-weighted VQ, hard-coded to 5-element vectors, for a single input data vector */ void silk_VQ_WMat_EC_c( diff --git a/drivers/opus/silk/ana_filt_bank_1.c b/thirdparty/opus/silk/ana_filt_bank_1.c similarity index 98% rename from drivers/opus/silk/ana_filt_bank_1.c rename to thirdparty/opus/silk/ana_filt_bank_1.c index b49bdd90be4..24cfb03fdb2 100644 --- a/drivers/opus/silk/ana_filt_bank_1.c +++ b/thirdparty/opus/silk/ana_filt_bank_1.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Coefficients for 2-band filter bank based on first-order allpass filters */ static opus_int16 A_fb1_20 = 5394 << 1; diff --git a/thirdparty/opus/silk/arm/NSQ_neon.c b/thirdparty/opus/silk/arm/NSQ_neon.c new file mode 100644 index 00000000000..96425299736 --- /dev/null +++ b/thirdparty/opus/silk/arm/NSQ_neon.c @@ -0,0 +1,112 @@ +/*********************************************************************** +Copyright (C) 2014 Vidyo +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "main.h" +#include "stack_alloc.h" +#include "NSQ.h" +#include "celt/cpu_support.h" +#include "celt/arm/armcpu.h" + +opus_int32 silk_noise_shape_quantizer_short_prediction_neon(const opus_int32 *buf32, const opus_int32 *coef32, opus_int order) +{ + int32x4_t coef0 = vld1q_s32(coef32); + int32x4_t coef1 = vld1q_s32(coef32 + 4); + int32x4_t coef2 = vld1q_s32(coef32 + 8); + int32x4_t coef3 = vld1q_s32(coef32 + 12); + + int32x4_t a0 = vld1q_s32(buf32 - 15); + int32x4_t a1 = vld1q_s32(buf32 - 11); + int32x4_t a2 = vld1q_s32(buf32 - 7); + int32x4_t a3 = vld1q_s32(buf32 - 3); + + int32x4_t b0 = vqdmulhq_s32(coef0, a0); + int32x4_t b1 = vqdmulhq_s32(coef1, a1); + int32x4_t b2 = vqdmulhq_s32(coef2, a2); + int32x4_t b3 = vqdmulhq_s32(coef3, a3); + + int32x4_t c0 = vaddq_s32(b0, b1); + int32x4_t c1 = vaddq_s32(b2, b3); + + int32x4_t d = vaddq_s32(c0, c1); + + int64x2_t e = vpaddlq_s32(d); + + int64x1_t f = vadd_s64(vget_low_s64(e), vget_high_s64(e)); + + opus_int32 out = vget_lane_s32(vreinterpret_s32_s64(f), 0); + + out += silk_RSHIFT( order, 1 ); + + return out; +} + + +opus_int32 silk_NSQ_noise_shape_feedback_loop_neon(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order) +{ + opus_int32 out; + if (order == 8) + { + int32x4_t a00 = vdupq_n_s32(data0[0]); + int32x4_t a01 = vld1q_s32(data1); /* data1[0] ... [3] */ + + int32x4_t a0 = vextq_s32 (a00, a01, 3); /* data0[0] data1[0] ...[2] */ + int32x4_t a1 = vld1q_s32(data1 + 3); /* data1[3] ... [6] */ + + /*TODO: Convert these once in advance instead of once per sample, like + silk_noise_shape_quantizer_short_prediction_neon() does.*/ + int16x8_t coef16 = vld1q_s16(coef); + int32x4_t coef0 = vmovl_s16(vget_low_s16(coef16)); + int32x4_t coef1 = vmovl_s16(vget_high_s16(coef16)); + + /*This is not bit-exact with the C version, since we do not drop the + lower 16 bits of each multiply, but wait until the end to truncate + precision. This is an encoder-specific calculation (and unlike + silk_noise_shape_quantizer_short_prediction_neon(), is not meant to + simulate what the decoder will do). We still could use vqdmulhq_s32() + like silk_noise_shape_quantizer_short_prediction_neon() and save + half the multiplies, but the speed difference is not large, since we + then need two extra adds.*/ + int64x2_t b0 = vmull_s32(vget_low_s32(a0), vget_low_s32(coef0)); + int64x2_t b1 = vmlal_s32(b0, vget_high_s32(a0), vget_high_s32(coef0)); + int64x2_t b2 = vmlal_s32(b1, vget_low_s32(a1), vget_low_s32(coef1)); + int64x2_t b3 = vmlal_s32(b2, vget_high_s32(a1), vget_high_s32(coef1)); + + int64x1_t c = vadd_s64(vget_low_s64(b3), vget_high_s64(b3)); + int64x1_t cS = vrshr_n_s64(c, 15); + int32x2_t d = vreinterpret_s32_s64(cS); + + out = vget_lane_s32(d, 0); + vst1q_s32(data1, a0); + vst1q_s32(data1 + 4, a1); + return out; + } + return silk_NSQ_noise_shape_feedback_loop_c(data0, data1, coef, order); +} diff --git a/thirdparty/opus/silk/arm/NSQ_neon.h b/thirdparty/opus/silk/arm/NSQ_neon.h new file mode 100644 index 00000000000..77c946af854 --- /dev/null +++ b/thirdparty/opus/silk/arm/NSQ_neon.h @@ -0,0 +1,113 @@ +/*********************************************************************** +Copyright (C) 2014 Vidyo +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ +#ifndef SILK_NSQ_NEON_H +#define SILK_NSQ_NEON_H + +#include "cpu_support.h" + +#undef silk_short_prediction_create_arch_coef +/* For vectorized calc, reverse a_Q12 coefs, convert to 32-bit, and shift for vqdmulhq_s32. */ +static OPUS_INLINE void silk_short_prediction_create_arch_coef_neon(opus_int32 *out, const opus_int16 *in, opus_int order) +{ + out[15] = in[0] << 15; + out[14] = in[1] << 15; + out[13] = in[2] << 15; + out[12] = in[3] << 15; + out[11] = in[4] << 15; + out[10] = in[5] << 15; + out[9] = in[6] << 15; + out[8] = in[7] << 15; + out[7] = in[8] << 15; + out[6] = in[9] << 15; + + if (order == 16) + { + out[5] = in[10] << 15; + out[4] = in[11] << 15; + out[3] = in[12] << 15; + out[2] = in[13] << 15; + out[1] = in[14] << 15; + out[0] = in[15] << 15; + } + else + { + out[5] = 0; + out[4] = 0; + out[3] = 0; + out[2] = 0; + out[1] = 0; + out[0] = 0; + } +} + +#if defined(OPUS_ARM_PRESUME_NEON_INTR) + +#define silk_short_prediction_create_arch_coef(out, in, order) \ + (silk_short_prediction_create_arch_coef_neon(out, in, order)) + +#elif defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_MAY_HAVE_NEON_INTR) + +#define silk_short_prediction_create_arch_coef(out, in, order) \ + do { if (arch == OPUS_ARCH_ARM_NEON) { silk_short_prediction_create_arch_coef_neon(out, in, order); } } while (0) + +#endif + +opus_int32 silk_noise_shape_quantizer_short_prediction_neon(const opus_int32 *buf32, const opus_int32 *coef32, opus_int order); + +opus_int32 silk_NSQ_noise_shape_feedback_loop_neon(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order); + +#if defined(OPUS_ARM_PRESUME_NEON_INTR) +#undef silk_noise_shape_quantizer_short_prediction +#define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) \ + ((void)arch,silk_noise_shape_quantizer_short_prediction_neon(in, coefRev, order)) + +#undef silk_NSQ_noise_shape_feedback_loop +#define silk_NSQ_noise_shape_feedback_loop(data0, data1, coef, order, arch) ((void)arch,silk_NSQ_noise_shape_feedback_loop_neon(data0, data1, coef, order)) + +#elif defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_MAY_HAVE_NEON_INTR) + +/* silk_noise_shape_quantizer_short_prediction implementations take different parameters based on arch + (coef vs. coefRev) so can't use the usual IMPL table implementation */ +#undef silk_noise_shape_quantizer_short_prediction +#define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) \ + (arch == OPUS_ARCH_ARM_NEON ? \ + silk_noise_shape_quantizer_short_prediction_neon(in, coefRev, order) : \ + silk_noise_shape_quantizer_short_prediction_c(in, coef, order)) + +extern opus_int32 + (*const SILK_NSQ_NOISE_SHAPE_FEEDBACK_LOOP_IMPL[OPUS_ARCHMASK+1])( + const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, + opus_int order); + +#undef silk_NSQ_noise_shape_feedback_loop +#define silk_NSQ_noise_shape_feedback_loop(data0, data1, coef, order, arch) \ + (SILK_NSQ_NOISE_SHAPE_FEEDBACK_LOOP_IMPL[(arch)&OPUS_ARCHMASK](data0, data1, \ + coef, order)) + +#endif + +#endif /* SILK_NSQ_NEON_H */ diff --git a/drivers/opus/silk/arm/SigProc_FIX_armv4.h b/thirdparty/opus/silk/arm/SigProc_FIX_armv4.h similarity index 100% rename from drivers/opus/silk/arm/SigProc_FIX_armv4.h rename to thirdparty/opus/silk/arm/SigProc_FIX_armv4.h diff --git a/drivers/opus/silk/arm/SigProc_FIX_armv5e.h b/thirdparty/opus/silk/arm/SigProc_FIX_armv5e.h similarity index 100% rename from drivers/opus/silk/arm/SigProc_FIX_armv5e.h rename to thirdparty/opus/silk/arm/SigProc_FIX_armv5e.h diff --git a/thirdparty/opus/silk/arm/arm_silk_map.c b/thirdparty/opus/silk/arm/arm_silk_map.c new file mode 100644 index 00000000000..9bd86a7b215 --- /dev/null +++ b/thirdparty/opus/silk/arm/arm_silk_map.c @@ -0,0 +1,55 @@ +/*********************************************************************** +Copyright (C) 2014 Vidyo +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "NSQ.h" + +#if defined(OPUS_HAVE_RTCD) + +# if (defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && \ + !defined(OPUS_ARM_PRESUME_NEON_INTR)) + +/*There is no table for silk_noise_shape_quantizer_short_prediction because the + NEON version takes different parameters than the C version. + Instead RTCD is done via if statements at the call sites. + See NSQ_neon.h for details.*/ + +opus_int32 + (*const SILK_NSQ_NOISE_SHAPE_FEEDBACK_LOOP_IMPL[OPUS_ARCHMASK+1])( + const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, + opus_int order) = { + silk_NSQ_noise_shape_feedback_loop_c, /* ARMv4 */ + silk_NSQ_noise_shape_feedback_loop_c, /* EDSP */ + silk_NSQ_noise_shape_feedback_loop_c, /* Media */ + silk_NSQ_noise_shape_feedback_loop_neon, /* NEON */ +}; + +# endif + +#endif /* OPUS_HAVE_RTCD */ diff --git a/thirdparty/opus/silk/arm/macros_arm64.h b/thirdparty/opus/silk/arm/macros_arm64.h new file mode 100644 index 00000000000..ed030413c5c --- /dev/null +++ b/thirdparty/opus/silk/arm/macros_arm64.h @@ -0,0 +1,39 @@ +/*********************************************************************** +Copyright (C) 2015 Vidyo +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ + +#ifndef SILK_MACROS_ARM64_H +#define SILK_MACROS_ARM64_H + +#include + +#undef silk_ADD_SAT32 +#define silk_ADD_SAT32(a, b) (vqadds_s32((a), (b))) + +#undef silk_SUB_SAT32 +#define silk_SUB_SAT32(a, b) (vqsubs_s32((a), (b))) + +#endif /* SILK_MACROS_ARM64_H */ diff --git a/drivers/opus/silk/arm/macros_armv4.h b/thirdparty/opus/silk/arm/macros_armv4.h similarity index 100% rename from drivers/opus/silk/arm/macros_armv4.h rename to thirdparty/opus/silk/arm/macros_armv4.h diff --git a/drivers/opus/silk/arm/macros_armv5e.h b/thirdparty/opus/silk/arm/macros_armv5e.h similarity index 100% rename from drivers/opus/silk/arm/macros_armv5e.h rename to thirdparty/opus/silk/arm/macros_armv5e.h diff --git a/drivers/opus/silk/biquad_alt.c b/thirdparty/opus/silk/biquad_alt.c similarity index 98% rename from drivers/opus/silk/biquad_alt.c rename to thirdparty/opus/silk/biquad_alt.c index f797d1e709e..d55f5ee92ec 100644 --- a/drivers/opus/silk/biquad_alt.c +++ b/thirdparty/opus/silk/biquad_alt.c @@ -31,9 +31,12 @@ POSSIBILITY OF SUCH DAMAGE. * Second order ARMA filter * * Can handle slowly varying filter coefficients * * */ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Second order ARMA filter, alternative implementation */ void silk_biquad_alt( diff --git a/drivers/opus/silk/bwexpander.c b/thirdparty/opus/silk/bwexpander.c similarity index 97% rename from drivers/opus/silk/bwexpander.c rename to thirdparty/opus/silk/bwexpander.c index e7cc4485200..2eb4456695e 100644 --- a/drivers/opus/silk/bwexpander.c +++ b/thirdparty/opus/silk/bwexpander.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Chirp (bandwidth expand) LP AR filter */ void silk_bwexpander( diff --git a/drivers/opus/silk/bwexpander_32.c b/thirdparty/opus/silk/bwexpander_32.c similarity index 97% rename from drivers/opus/silk/bwexpander_32.c rename to thirdparty/opus/silk/bwexpander_32.c index dedd213b3e9..d0010f73dfd 100644 --- a/drivers/opus/silk/bwexpander_32.c +++ b/thirdparty/opus/silk/bwexpander_32.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Chirp (bandwidth expand) LP AR filter */ void silk_bwexpander_32( diff --git a/drivers/opus/silk/check_control_input.c b/thirdparty/opus/silk/check_control_input.c similarity index 97% rename from drivers/opus/silk/check_control_input.c rename to thirdparty/opus/silk/check_control_input.c index 61a7cc1f33f..b5de9ce48d6 100644 --- a/drivers/opus/silk/check_control_input.c +++ b/thirdparty/opus/silk/check_control_input.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/silk/control.h" -#include "opus/silk/errors.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "control.h" +#include "errors.h" /* Check encoder control struct */ opus_int check_control_input( diff --git a/drivers/opus/silk/code_signs.c b/thirdparty/opus/silk/code_signs.c similarity index 98% rename from drivers/opus/silk/code_signs.c rename to thirdparty/opus/silk/code_signs.c index 79c18935141..dfd1dca9a18 100644 --- a/drivers/opus/silk/code_signs.c +++ b/thirdparty/opus/silk/code_signs.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /*#define silk_enc_map(a) ((a) > 0 ? 1 : 0)*/ /*#define silk_dec_map(a) ((a) > 0 ? 1 : -1)*/ diff --git a/drivers/opus/silk/control.h b/thirdparty/opus/silk/control.h similarity index 99% rename from drivers/opus/silk/control.h rename to thirdparty/opus/silk/control.h index 4b20c4a8b82..747e5426a0c 100644 --- a/drivers/opus/silk/control.h +++ b/thirdparty/opus/silk/control.h @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_CONTROL_H #define SILK_CONTROL_H -#include "opus/silk/typedef.h" +#include "typedef.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/control_SNR.c b/thirdparty/opus/silk/control_SNR.c similarity index 97% rename from drivers/opus/silk/control_SNR.c rename to thirdparty/opus/silk/control_SNR.c index 5aebfcf3850..cee87eb0d8b 100644 --- a/drivers/opus/silk/control_SNR.c +++ b/thirdparty/opus/silk/control_SNR.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "tuning_parameters.h" /* Control SNR of redidual quantizer */ opus_int silk_control_SNR( diff --git a/drivers/opus/silk/control_audio_bandwidth.c b/thirdparty/opus/silk/control_audio_bandwidth.c similarity index 98% rename from drivers/opus/silk/control_audio_bandwidth.c rename to thirdparty/opus/silk/control_audio_bandwidth.c index 04640f53fe0..4f9bc5cbdaa 100644 --- a/drivers/opus/silk/control_audio_bandwidth.c +++ b/thirdparty/opus/silk/control_audio_bandwidth.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "tuning_parameters.h" /* Control internal sampling rate */ opus_int silk_control_audio_bandwidth( diff --git a/drivers/opus/silk/control_codec.c b/thirdparty/opus/silk/control_codec.c similarity index 98% rename from drivers/opus/silk/control_codec.c rename to thirdparty/opus/silk/control_codec.c index 03caab36a91..044eea3f2a8 100644 --- a/drivers/opus/silk/control_codec.c +++ b/thirdparty/opus/silk/control_codec.c @@ -24,17 +24,20 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/main_FIX.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef FIXED_POINT +#include "main_FIX.h" #define silk_encoder_state_Fxx silk_encoder_state_FIX #else -#include "opus/silk/float/main_FLP.h" +#include "main_FLP.h" #define silk_encoder_state_Fxx silk_encoder_state_FLP #endif -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" -#include "opus/silk/pitch_est_defines.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" +#include "pitch_est_defines.h" static opus_int silk_setup_resamplers( silk_encoder_state_Fxx *psEnc, /* I/O */ @@ -145,7 +148,7 @@ static opus_int silk_setup_resamplers( } else { VARDECL( opus_int16, x_buf_API_fs_Hz ); VARDECL( silk_resampler_state_struct, temp_resampler_state ); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_int16 *x_bufFIX = psEnc->x_buf; #else VARDECL( opus_int16, x_bufFIX ); @@ -158,7 +161,7 @@ static opus_int silk_setup_resamplers( buf_length_ms = silk_LSHIFT( psEnc->sCmn.nb_subfr * 5, 1 ) + LA_SHAPE_MS; old_buf_samples = buf_length_ms * psEnc->sCmn.fs_kHz; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT new_buf_samples = buf_length_ms * fs_kHz; ALLOC( x_bufFIX, silk_max( old_buf_samples, new_buf_samples ), opus_int16 ); @@ -182,7 +185,7 @@ static opus_int silk_setup_resamplers( /* Correct resampler state by resampling buffered data from API_fs_Hz to fs_kHz */ ret += silk_resampler( &psEnc->sCmn.resampler_state, x_bufFIX, x_buf_API_fs_Hz, api_buf_samples ); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT silk_short2float_array( psEnc->x_buf, x_bufFIX, new_buf_samples); #endif } diff --git a/drivers/opus/silk/debug.c b/thirdparty/opus/silk/debug.c similarity index 98% rename from drivers/opus/silk/debug.c rename to thirdparty/opus/silk/debug.c index ffb3f811a16..9253faf71bf 100644 --- a/drivers/opus/silk/debug.c +++ b/thirdparty/opus/silk/debug.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/debug.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "debug.h" +#include "SigProc_FIX.h" #if SILK_TIC_TOC diff --git a/drivers/opus/silk/debug.h b/thirdparty/opus/silk/debug.h similarity index 99% rename from drivers/opus/silk/debug.h rename to thirdparty/opus/silk/debug.h index d2eccfa1e43..efb6d3e99e7 100644 --- a/drivers/opus/silk/debug.h +++ b/thirdparty/opus/silk/debug.h @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_DEBUG_H #define SILK_DEBUG_H -#include "opus/silk/typedef.h" +#include "typedef.h" #include /* file writing */ #include /* strcpy, strcmp */ diff --git a/drivers/opus/silk/dec_API.c b/thirdparty/opus/silk/dec_API.c similarity index 99% rename from drivers/opus/silk/dec_API.c rename to thirdparty/opus/silk/dec_API.c index 2fd681c0d2a..b7d8ed48d88 100644 --- a/drivers/opus/silk/dec_API.c +++ b/thirdparty/opus/silk/dec_API.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/API.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/os_support.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "API.h" +#include "main.h" +#include "stack_alloc.h" +#include "os_support.h" /************************/ /* Decoder Super Struct */ diff --git a/drivers/opus/silk/decode_core.c b/thirdparty/opus/silk/decode_core.c similarity index 99% rename from drivers/opus/silk/decode_core.c rename to thirdparty/opus/silk/decode_core.c index 8ca1adffdde..b88991e349f 100644 --- a/drivers/opus/silk/decode_core.c +++ b/thirdparty/opus/silk/decode_core.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /**********************************************************/ /* Core decoder. Performs inverse NSQ operation LTP + LPC */ diff --git a/drivers/opus/silk/decode_frame.c b/thirdparty/opus/silk/decode_frame.c similarity index 98% rename from drivers/opus/silk/decode_frame.c rename to thirdparty/opus/silk/decode_frame.c index 18e2bc9b1ad..a605d95ac6a 100644 --- a/drivers/opus/silk/decode_frame.c +++ b/thirdparty/opus/silk/decode_frame.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/PLC.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" +#include "PLC.h" /****************/ /* Decode frame */ diff --git a/drivers/opus/silk/decode_indices.c b/thirdparty/opus/silk/decode_indices.c similarity index 99% rename from drivers/opus/silk/decode_indices.c rename to thirdparty/opus/silk/decode_indices.c index fa8066e5f7b..7afe5c26c19 100644 --- a/drivers/opus/silk/decode_indices.c +++ b/thirdparty/opus/silk/decode_indices.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Decode side-information parameters from payload */ void silk_decode_indices( diff --git a/drivers/opus/silk/decode_parameters.c b/thirdparty/opus/silk/decode_parameters.c similarity index 98% rename from drivers/opus/silk/decode_parameters.c rename to thirdparty/opus/silk/decode_parameters.c index d17cb8a3dfe..e345b1dcefb 100644 --- a/drivers/opus/silk/decode_parameters.c +++ b/thirdparty/opus/silk/decode_parameters.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Decode parameters from payload */ void silk_decode_parameters( diff --git a/drivers/opus/silk/decode_pitch.c b/thirdparty/opus/silk/decode_pitch.c similarity index 97% rename from drivers/opus/silk/decode_pitch.c rename to thirdparty/opus/silk/decode_pitch.c index 1d98ee7f338..fedbc6a5255 100644 --- a/drivers/opus/silk/decode_pitch.c +++ b/thirdparty/opus/silk/decode_pitch.c @@ -24,13 +24,16 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /*********************************************************** * Pitch analyser function ********************************************************** */ -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/pitch_est_defines.h" +#include "SigProc_FIX.h" +#include "pitch_est_defines.h" void silk_decode_pitch( opus_int16 lagIndex, /* I */ diff --git a/drivers/opus/silk/decode_pulses.c b/thirdparty/opus/silk/decode_pulses.c similarity index 98% rename from drivers/opus/silk/decode_pulses.c rename to thirdparty/opus/silk/decode_pulses.c index c687d3bfa81..d6bbec92252 100644 --- a/drivers/opus/silk/decode_pulses.c +++ b/thirdparty/opus/silk/decode_pulses.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /*********************************************/ /* Decode quantization indices of excitation */ diff --git a/drivers/opus/silk/decoder_set_fs.c b/thirdparty/opus/silk/decoder_set_fs.c similarity index 98% rename from drivers/opus/silk/decoder_set_fs.c rename to thirdparty/opus/silk/decoder_set_fs.c index 0079a506ee2..eef0fd25e18 100644 --- a/drivers/opus/silk/decoder_set_fs.c +++ b/thirdparty/opus/silk/decoder_set_fs.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Set decoder sampling rate */ opus_int silk_decoder_set_fs( diff --git a/drivers/opus/silk/define.h b/thirdparty/opus/silk/define.h similarity index 99% rename from drivers/opus/silk/define.h rename to thirdparty/opus/silk/define.h index c6165e3cff1..19c9b00e259 100644 --- a/drivers/opus/silk/define.h +++ b/thirdparty/opus/silk/define.h @@ -28,8 +28,8 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_DEFINE_H #define SILK_DEFINE_H -#include "opus/silk/errors.h" -#include "opus/silk/typedef.h" +#include "errors.h" +#include "typedef.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/enc_API.c b/thirdparty/opus/silk/enc_API.c similarity index 98% rename from drivers/opus/silk/enc_API.c rename to thirdparty/opus/silk/enc_API.c index beb46214d84..f8060286dba 100644 --- a/drivers/opus/silk/enc_API.c +++ b/thirdparty/opus/silk/enc_API.c @@ -24,18 +24,21 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/define.h" -#include "opus/silk/API.h" -#include "opus/silk/control.h" -#include "opus/silk/typedef.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/structs.h" -#include "opus/silk/tuning_parameters.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/main_FIX.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "define.h" +#include "API.h" +#include "control.h" +#include "typedef.h" +#include "stack_alloc.h" +#include "structs.h" +#include "tuning_parameters.h" +#ifdef FIXED_POINT +#include "main_FIX.h" #else -#include "opus/silk/float/main_FLP.h" +#include "main_FLP.h" #endif /***************************************/ diff --git a/drivers/opus/silk/encode_indices.c b/thirdparty/opus/silk/encode_indices.c similarity index 99% rename from drivers/opus/silk/encode_indices.c rename to thirdparty/opus/silk/encode_indices.c index 72fc6a80e8b..666c8c0b13e 100644 --- a/drivers/opus/silk/encode_indices.c +++ b/thirdparty/opus/silk/encode_indices.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Encode side-information parameters to payload */ void silk_encode_indices( diff --git a/drivers/opus/silk/encode_pulses.c b/thirdparty/opus/silk/encode_pulses.c similarity index 98% rename from drivers/opus/silk/encode_pulses.c rename to thirdparty/opus/silk/encode_pulses.c index 238eec1e42e..ab00264f991 100644 --- a/drivers/opus/silk/encode_pulses.c +++ b/thirdparty/opus/silk/encode_pulses.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /*********************************************/ /* Encode quantization indices of excitation */ diff --git a/drivers/opus/silk/errors.h b/thirdparty/opus/silk/errors.h similarity index 100% rename from drivers/opus/silk/errors.h rename to thirdparty/opus/silk/errors.h diff --git a/drivers/opus/silk/fixed/LTP_analysis_filter_FIX.c b/thirdparty/opus/silk/fixed/LTP_analysis_filter_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/LTP_analysis_filter_FIX.c rename to thirdparty/opus/silk/fixed/LTP_analysis_filter_FIX.c index 041e85f0b9f..5574e7069fe 100644 --- a/drivers/opus/silk/fixed/LTP_analysis_filter_FIX.c +++ b/thirdparty/opus/silk/fixed/LTP_analysis_filter_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" void silk_LTP_analysis_filter_FIX( opus_int16 *LTP_res, /* O LTP residual signal of length MAX_NB_SUBFR * ( pre_length + subfr_length ) */ diff --git a/drivers/opus/silk/fixed/LTP_scale_ctrl_FIX.c b/thirdparty/opus/silk/fixed/LTP_scale_ctrl_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/LTP_scale_ctrl_FIX.c rename to thirdparty/opus/silk/fixed/LTP_scale_ctrl_FIX.c index dac1fbc08a0..3dcedef8918 100644 --- a/drivers/opus/silk/fixed/LTP_scale_ctrl_FIX.c +++ b/thirdparty/opus/silk/fixed/LTP_scale_ctrl_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" /* Calculation of LTP state scaling */ void silk_LTP_scale_ctrl_FIX( diff --git a/drivers/opus/silk/fixed/apply_sine_window_FIX.c b/thirdparty/opus/silk/fixed/apply_sine_window_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/apply_sine_window_FIX.c rename to thirdparty/opus/silk/fixed/apply_sine_window_FIX.c index 9d63e7bce21..4502b7130e9 100644 --- a/drivers/opus/silk/fixed/apply_sine_window_FIX.c +++ b/thirdparty/opus/silk/fixed/apply_sine_window_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Apply sine window to signal vector. */ /* Window types: */ diff --git a/drivers/opus/silk/fixed/autocorr_FIX.c b/thirdparty/opus/silk/fixed/autocorr_FIX.c similarity index 96% rename from drivers/opus/silk/fixed/autocorr_FIX.c rename to thirdparty/opus/silk/fixed/autocorr_FIX.c index db39a0335ba..de95c986936 100644 --- a/drivers/opus/silk/fixed/autocorr_FIX.c +++ b/thirdparty/opus/silk/fixed/autocorr_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/celt_lpc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "celt_lpc.h" /* Compute autocorrelation */ void silk_autocorr( diff --git a/drivers/opus/silk/fixed/burg_modified_FIX.c b/thirdparty/opus/silk/fixed/burg_modified_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/burg_modified_FIX.c rename to thirdparty/opus/silk/fixed/burg_modified_FIX.c index 48d64eccc59..4878553b65a 100644 --- a/drivers/opus/silk/fixed/burg_modified_FIX.c +++ b/thirdparty/opus/silk/fixed/burg_modified_FIX.c @@ -24,12 +24,15 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/define.h" -#include "opus/silk/tuning_parameters.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "define.h" +#include "tuning_parameters.h" +#include "pitch.h" #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384 */ diff --git a/drivers/opus/silk/fixed/corrMatrix_FIX.c b/thirdparty/opus/silk/fixed/corrMatrix_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/corrMatrix_FIX.c rename to thirdparty/opus/silk/fixed/corrMatrix_FIX.c index ac5331fe572..c1d437c7859 100644 --- a/drivers/opus/silk/fixed/corrMatrix_FIX.c +++ b/thirdparty/opus/silk/fixed/corrMatrix_FIX.c @@ -24,13 +24,16 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /********************************************************************** * Correlation Matrix Computations for LS estimate. **********************************************************************/ -#include "opus/silk/fixed/main_FIX.h" +#include "main_FIX.h" /* Calculates correlation vector X'*t */ void silk_corrVector_FIX( diff --git a/drivers/opus/silk/fixed/encode_frame_FIX.c b/thirdparty/opus/silk/fixed/encode_frame_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/encode_frame_FIX.c rename to thirdparty/opus/silk/fixed/encode_frame_FIX.c index e4ead0afefe..5ef44b03fc4 100644 --- a/drivers/opus/silk/fixed/encode_frame_FIX.c +++ b/thirdparty/opus/silk/fixed/encode_frame_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */ static OPUS_INLINE void silk_LBRR_encode_FIX( diff --git a/drivers/opus/silk/fixed/find_LPC_FIX.c b/thirdparty/opus/silk/fixed/find_LPC_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/find_LPC_FIX.c rename to thirdparty/opus/silk/fixed/find_LPC_FIX.c index 5b56c417022..e11cdc86e67 100644 --- a/drivers/opus/silk/fixed/find_LPC_FIX.c +++ b/thirdparty/opus/silk/fixed/find_LPC_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /* Finds LPC vector from correlations, and converts to NLSF */ void silk_find_LPC_FIX( diff --git a/drivers/opus/silk/fixed/find_LTP_FIX.c b/thirdparty/opus/silk/fixed/find_LTP_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/find_LTP_FIX.c rename to thirdparty/opus/silk/fixed/find_LTP_FIX.c index a5a253516dc..1314a281375 100644 --- a/drivers/opus/silk/fixed/find_LTP_FIX.c +++ b/thirdparty/opus/silk/fixed/find_LTP_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "tuning_parameters.h" /* Head room for correlations */ #define LTP_CORRS_HEAD_ROOM 2 diff --git a/drivers/opus/silk/fixed/find_pitch_lags_FIX.c b/thirdparty/opus/silk/fixed/find_pitch_lags_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/find_pitch_lags_FIX.c rename to thirdparty/opus/silk/fixed/find_pitch_lags_FIX.c index bfd2c1b2d2f..b8440a8247a 100644 --- a/drivers/opus/silk/fixed/find_pitch_lags_FIX.c +++ b/thirdparty/opus/silk/fixed/find_pitch_lags_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /* Find pitch lags */ void silk_find_pitch_lags_FIX( diff --git a/drivers/opus/silk/fixed/find_pred_coefs_FIX.c b/thirdparty/opus/silk/fixed/find_pred_coefs_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/find_pred_coefs_FIX.c rename to thirdparty/opus/silk/fixed/find_pred_coefs_FIX.c index d0280963bdd..d308e9cf5fe 100644 --- a/drivers/opus/silk/fixed/find_pred_coefs_FIX.c +++ b/thirdparty/opus/silk/fixed/find_pred_coefs_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" void silk_find_pred_coefs_FIX( silk_encoder_state_FIX *psEnc, /* I/O encoder state */ diff --git a/drivers/opus/silk/fixed/k2a_FIX.c b/thirdparty/opus/silk/fixed/k2a_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/k2a_FIX.c rename to thirdparty/opus/silk/fixed/k2a_FIX.c index 64771f370c8..5fee599bcb7 100644 --- a/drivers/opus/silk/fixed/k2a_FIX.c +++ b/thirdparty/opus/silk/fixed/k2a_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Step up function, converts reflection coefficients to prediction coefficients */ void silk_k2a( diff --git a/drivers/opus/silk/fixed/k2a_Q16_FIX.c b/thirdparty/opus/silk/fixed/k2a_Q16_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/k2a_Q16_FIX.c rename to thirdparty/opus/silk/fixed/k2a_Q16_FIX.c index 49d90a862e4..3b039875446 100644 --- a/drivers/opus/silk/fixed/k2a_Q16_FIX.c +++ b/thirdparty/opus/silk/fixed/k2a_Q16_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Step up function, converts reflection coefficients to prediction coefficients */ void silk_k2a_Q16( diff --git a/drivers/opus/silk/fixed/main_FIX.h b/thirdparty/opus/silk/fixed/main_FIX.h similarity index 99% rename from drivers/opus/silk/fixed/main_FIX.h rename to thirdparty/opus/silk/fixed/main_FIX.h index f824c476533..375b5eb32ee 100644 --- a/drivers/opus/silk/fixed/main_FIX.h +++ b/thirdparty/opus/silk/fixed/main_FIX.h @@ -28,13 +28,13 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_MAIN_FIX_H #define SILK_MAIN_FIX_H -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/fixed/structs_FIX.h" -#include "opus/silk/control.h" -#include "opus/silk/main.h" -#include "opus/silk/PLC.h" -#include "opus/silk/debug.h" -#include "opus/celt/entenc.h" +#include "SigProc_FIX.h" +#include "structs_FIX.h" +#include "control.h" +#include "main.h" +#include "PLC.h" +#include "debug.h" +#include "entenc.h" #ifndef FORCE_CPP_BUILD #ifdef __cplusplus diff --git a/drivers/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h b/thirdparty/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h similarity index 100% rename from drivers/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h rename to thirdparty/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h diff --git a/drivers/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h b/thirdparty/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h similarity index 98% rename from drivers/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h rename to thirdparty/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h index c7f04279a0d..21b256885f3 100644 --- a/drivers/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h +++ b/thirdparty/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h @@ -26,11 +26,14 @@ POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ #ifndef __PREFILTER_FIX_MIPSR1_H__ #define __PREFILTER_FIX_MIPSR1_H__ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" #define OVERRIDE_silk_warped_LPC_analysis_filter_FIX void silk_warped_LPC_analysis_filter_FIX( diff --git a/drivers/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h b/thirdparty/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h similarity index 99% rename from drivers/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h rename to thirdparty/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h index eba7711db79..e803ef0fceb 100644 --- a/drivers/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h +++ b/thirdparty/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h @@ -27,9 +27,12 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef __WARPED_AUTOCORRELATION_FIX_MIPSR1_H__ #define __WARPED_AUTOCORRELATION_FIX_MIPSR1_H__ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" #undef QC #define QC 10 diff --git a/drivers/opus/silk/fixed/noise_shape_analysis_FIX.c b/thirdparty/opus/silk/fixed/noise_shape_analysis_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/noise_shape_analysis_FIX.c rename to thirdparty/opus/silk/fixed/noise_shape_analysis_FIX.c index 6f1dc3ddd51..22a89f75aec 100644 --- a/drivers/opus/silk/fixed/noise_shape_analysis_FIX.c +++ b/thirdparty/opus/silk/fixed/noise_shape_analysis_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /* Compute gain to make warped filter coefficients have a zero mean log frequency response on a */ /* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */ @@ -136,7 +139,7 @@ static OPUS_INLINE void limit_warped_coefs( } #if defined(MIPSr1_ASM) -#include "opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h" +#include "mips/noise_shape_analysis_FIX_mipsr1.h" #endif /**************************************************************/ diff --git a/drivers/opus/silk/fixed/pitch_analysis_core_FIX.c b/thirdparty/opus/silk/fixed/pitch_analysis_core_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/pitch_analysis_core_FIX.c rename to thirdparty/opus/silk/fixed/pitch_analysis_core_FIX.c index cf421c96120..01bb9fc0a83 100644 --- a/drivers/opus/silk/fixed/pitch_analysis_core_FIX.c +++ b/thirdparty/opus/silk/fixed/pitch_analysis_core_FIX.c @@ -24,16 +24,19 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /*********************************************************** * Pitch analyser function ********************************************************** */ -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/pitch_est_defines.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/debug.h" -#include "opus/celt/pitch.h" +#include "SigProc_FIX.h" +#include "pitch_est_defines.h" +#include "stack_alloc.h" +#include "debug.h" +#include "pitch.h" #define SCRATCH_SIZE 22 #define SF_LENGTH_4KHZ ( PE_SUBFR_LENGTH_MS * 4 ) diff --git a/drivers/opus/silk/fixed/prefilter_FIX.c b/thirdparty/opus/silk/fixed/prefilter_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/prefilter_FIX.c rename to thirdparty/opus/silk/fixed/prefilter_FIX.c index 344be2badd1..6a8e35152ef 100644 --- a/drivers/opus/silk/fixed/prefilter_FIX.c +++ b/thirdparty/opus/silk/fixed/prefilter_FIX.c @@ -24,14 +24,17 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" #if defined(MIPSr1_ASM) -#include "opus/silk/fixed/mips/prefilter_FIX_mipsr1.h" +#include "mips/prefilter_FIX_mipsr1.h" #endif diff --git a/drivers/opus/silk/fixed/process_gains_FIX.c b/thirdparty/opus/silk/fixed/process_gains_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/process_gains_FIX.c rename to thirdparty/opus/silk/fixed/process_gains_FIX.c index c0d591210b8..05aba317889 100644 --- a/drivers/opus/silk/fixed/process_gains_FIX.c +++ b/thirdparty/opus/silk/fixed/process_gains_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "tuning_parameters.h" /* Processing of gains */ void silk_process_gains_FIX( diff --git a/drivers/opus/silk/fixed/regularize_correlations_FIX.c b/thirdparty/opus/silk/fixed/regularize_correlations_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/regularize_correlations_FIX.c rename to thirdparty/opus/silk/fixed/regularize_correlations_FIX.c index c38a5589b68..a2836b05f4f 100644 --- a/drivers/opus/silk/fixed/regularize_correlations_FIX.c +++ b/thirdparty/opus/silk/fixed/regularize_correlations_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" /* Add noise to matrix diagonal */ void silk_regularize_correlations_FIX( diff --git a/drivers/opus/silk/fixed/residual_energy16_FIX.c b/thirdparty/opus/silk/fixed/residual_energy16_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/residual_energy16_FIX.c rename to thirdparty/opus/silk/fixed/residual_energy16_FIX.c index 39bc96fd904..ebffb2a66f9 100644 --- a/drivers/opus/silk/fixed/residual_energy16_FIX.c +++ b/thirdparty/opus/silk/fixed/residual_energy16_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" /* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */ opus_int32 silk_residual_energy16_covar_FIX( diff --git a/drivers/opus/silk/fixed/residual_energy_FIX.c b/thirdparty/opus/silk/fixed/residual_energy_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/residual_energy_FIX.c rename to thirdparty/opus/silk/fixed/residual_energy_FIX.c index 0e51f4baa15..41f74778e82 100644 --- a/drivers/opus/silk/fixed/residual_energy_FIX.c +++ b/thirdparty/opus/silk/fixed/residual_energy_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" /* Calculates residual energies of input subframes where all subframes have LPC_order */ /* of preceding samples */ diff --git a/drivers/opus/silk/fixed/schur64_FIX.c b/thirdparty/opus/silk/fixed/schur64_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/schur64_FIX.c rename to thirdparty/opus/silk/fixed/schur64_FIX.c index 69ef76e0288..764a10ef3ea 100644 --- a/drivers/opus/silk/fixed/schur64_FIX.c +++ b/thirdparty/opus/silk/fixed/schur64_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Slower than schur(), but more accurate. */ /* Uses SMULL(), available on armv4 */ diff --git a/drivers/opus/silk/fixed/schur_FIX.c b/thirdparty/opus/silk/fixed/schur_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/schur_FIX.c rename to thirdparty/opus/silk/fixed/schur_FIX.c index 9effa59daff..c4c0ef23b47 100644 --- a/drivers/opus/silk/fixed/schur_FIX.c +++ b/thirdparty/opus/silk/fixed/schur_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Faster than schur64(), but much less accurate. */ /* uses SMLAWB(), requiring armv5E and higher. */ diff --git a/drivers/opus/silk/fixed/solve_LS_FIX.c b/thirdparty/opus/silk/fixed/solve_LS_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/solve_LS_FIX.c rename to thirdparty/opus/silk/fixed/solve_LS_FIX.c index 4ff97497be4..51d7d49d02a 100644 --- a/drivers/opus/silk/fixed/solve_LS_FIX.c +++ b/thirdparty/opus/silk/fixed/solve_LS_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /*****************************/ /* Internal function headers */ diff --git a/drivers/opus/silk/fixed/structs_FIX.h b/thirdparty/opus/silk/fixed/structs_FIX.h similarity index 98% rename from drivers/opus/silk/fixed/structs_FIX.h rename to thirdparty/opus/silk/fixed/structs_FIX.h index 36ddff0a9e4..3294b251281 100644 --- a/drivers/opus/silk/fixed/structs_FIX.h +++ b/thirdparty/opus/silk/fixed/structs_FIX.h @@ -28,9 +28,9 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_STRUCTS_FIX_H #define SILK_STRUCTS_FIX_H -#include "opus/silk/typedef.h" -#include "opus/silk/main.h" -#include "opus/silk/structs.h" +#include "typedef.h" +#include "main.h" +#include "structs.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/fixed/vector_ops_FIX.c b/thirdparty/opus/silk/fixed/vector_ops_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/vector_ops_FIX.c rename to thirdparty/opus/silk/fixed/vector_ops_FIX.c index 1e8fdec0cb4..d94980014f6 100644 --- a/drivers/opus/silk/fixed/vector_ops_FIX.c +++ b/thirdparty/opus/silk/fixed/vector_ops_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "pitch.h" /* Copy and multiply a vector by a constant */ void silk_scale_copy_vector16( @@ -72,7 +75,7 @@ opus_int32 silk_inner_prod_aligned( int arch /* I Run-time architecture */ ) { -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT return celt_inner_prod(inVec1, inVec2, len, arch); #else opus_int i; diff --git a/drivers/opus/silk/fixed/warped_autocorrelation_FIX.c b/thirdparty/opus/silk/fixed/warped_autocorrelation_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/warped_autocorrelation_FIX.c rename to thirdparty/opus/silk/fixed/warped_autocorrelation_FIX.c index 3b8d52d5c65..6ca6c1184d8 100644 --- a/drivers/opus/silk/fixed/warped_autocorrelation_FIX.c +++ b/thirdparty/opus/silk/fixed/warped_autocorrelation_FIX.c @@ -24,15 +24,18 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" #define QC 10 #define QS 14 #if defined(MIPSr1_ASM) -#include "opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h" +#include "mips/warped_autocorrelation_FIX_mipsr1.h" #endif diff --git a/drivers/opus/silk/fixed/x86/burg_modified_FIX_sse.c b/thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c similarity index 99% rename from drivers/opus/silk/fixed/x86/burg_modified_FIX_sse.c rename to thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c index f7d46487df1..3756095fbe6 100644 --- a/drivers/opus/silk/fixed/x86/burg_modified_FIX_sse.c +++ b/thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c @@ -24,17 +24,20 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/define.h" -#include "opus/silk/tuning_parameters.h" -#include "opus/celt/pitch.h" -#include "opus/celt/x86/x86cpu.h" +#include "SigProc_FIX.h" +#include "define.h" +#include "tuning_parameters.h" +#include "pitch.h" +#include "celt/x86/x86cpu.h" #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384 */ diff --git a/drivers/opus/silk/fixed/x86/prefilter_FIX_sse.c b/thirdparty/opus/silk/fixed/x86/prefilter_FIX_sse.c similarity index 98% rename from drivers/opus/silk/fixed/x86/prefilter_FIX_sse.c rename to thirdparty/opus/silk/fixed/x86/prefilter_FIX_sse.c index febb1056450..488a603f5dd 100644 --- a/drivers/opus/silk/fixed/x86/prefilter_FIX_sse.c +++ b/thirdparty/opus/silk/fixed/x86/prefilter_FIX_sse.c @@ -24,13 +24,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/x86/x86cpu.h" +#include "main.h" +#include "celt/x86/x86cpu.h" void silk_warped_LPC_analysis_filter_FIX_sse4_1( opus_int32 state[], /* I/O State [order + 1] */ diff --git a/drivers/opus/silk/fixed/x86/vector_ops_FIX_sse.c b/thirdparty/opus/silk/fixed/x86/vector_ops_FIX_sse.c similarity index 96% rename from drivers/opus/silk/fixed/x86/vector_ops_FIX_sse.c rename to thirdparty/opus/silk/fixed/x86/vector_ops_FIX_sse.c index 920d58cebcf..c1e90564d0e 100644 --- a/drivers/opus/silk/fixed/x86/vector_ops_FIX_sse.c +++ b/thirdparty/opus/silk/fixed/x86/vector_ops_FIX_sse.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" +#include "main.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/pitch.h" +#include "SigProc_FIX.h" +#include "pitch.h" opus_int64 silk_inner_prod16_aligned_64_sse4_1( const opus_int16 *inVec1, /* I input vector 1 */ diff --git a/drivers/opus/silk/float/LPC_analysis_filter_FLP.c b/thirdparty/opus/silk/float/LPC_analysis_filter_FLP.c similarity index 99% rename from drivers/opus/silk/float/LPC_analysis_filter_FLP.c rename to thirdparty/opus/silk/float/LPC_analysis_filter_FLP.c index 344e52ade29..cae89a0a182 100644 --- a/drivers/opus/silk/float/LPC_analysis_filter_FLP.c +++ b/thirdparty/opus/silk/float/LPC_analysis_filter_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/silk/float/main_FLP.h" +#include "main_FLP.h" /************************************************/ /* LPC analysis filter */ diff --git a/drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c b/thirdparty/opus/silk/float/LPC_inv_pred_gain_FLP.c similarity index 96% rename from drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c rename to thirdparty/opus/silk/float/LPC_inv_pred_gain_FLP.c index f99a4276231..25178bacdde 100644 --- a/drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c +++ b/thirdparty/opus/silk/float/LPC_inv_pred_gain_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "SigProc_FLP.h" #define RC_THRESHOLD 0.9999f diff --git a/drivers/opus/silk/float/LTP_analysis_filter_FLP.c b/thirdparty/opus/silk/float/LTP_analysis_filter_FLP.c similarity index 98% rename from drivers/opus/silk/float/LTP_analysis_filter_FLP.c rename to thirdparty/opus/silk/float/LTP_analysis_filter_FLP.c index 853040d1606..849b7c1c528 100644 --- a/drivers/opus/silk/float/LTP_analysis_filter_FLP.c +++ b/thirdparty/opus/silk/float/LTP_analysis_filter_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" void silk_LTP_analysis_filter_FLP( silk_float *LTP_res, /* O LTP res MAX_NB_SUBFR*(pre_lgth+subfr_lngth) */ diff --git a/drivers/opus/silk/float/LTP_scale_ctrl_FLP.c b/thirdparty/opus/silk/float/LTP_scale_ctrl_FLP.c similarity index 97% rename from drivers/opus/silk/float/LTP_scale_ctrl_FLP.c rename to thirdparty/opus/silk/float/LTP_scale_ctrl_FLP.c index 4219c14c5b1..8dbe29d0fa6 100644 --- a/drivers/opus/silk/float/LTP_scale_ctrl_FLP.c +++ b/thirdparty/opus/silk/float/LTP_scale_ctrl_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" void silk_LTP_scale_ctrl_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ diff --git a/drivers/opus/silk/float/SigProc_FLP.h b/thirdparty/opus/silk/float/SigProc_FLP.h similarity index 99% rename from drivers/opus/silk/float/SigProc_FLP.h rename to thirdparty/opus/silk/float/SigProc_FLP.h index 9b14f24f21b..f0cb3733be6 100644 --- a/drivers/opus/silk/float/SigProc_FLP.h +++ b/thirdparty/opus/silk/float/SigProc_FLP.h @@ -28,8 +28,8 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_SIGPROC_FLP_H #define SILK_SIGPROC_FLP_H -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/float_cast.h" +#include "SigProc_FIX.h" +#include "float_cast.h" #include #ifdef __cplusplus diff --git a/drivers/opus/silk/float/apply_sine_window_FLP.c b/thirdparty/opus/silk/float/apply_sine_window_FLP.c similarity index 97% rename from drivers/opus/silk/float/apply_sine_window_FLP.c rename to thirdparty/opus/silk/float/apply_sine_window_FLP.c index 0d9c894cd86..6aae57c0ab9 100644 --- a/drivers/opus/silk/float/apply_sine_window_FLP.c +++ b/thirdparty/opus/silk/float/apply_sine_window_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Apply sine window to signal vector */ /* Window types: */ diff --git a/drivers/opus/silk/float/autocorrelation_FLP.c b/thirdparty/opus/silk/float/autocorrelation_FLP.c similarity index 96% rename from drivers/opus/silk/float/autocorrelation_FLP.c rename to thirdparty/opus/silk/float/autocorrelation_FLP.c index 0b78b0230dd..8b8a9e659aa 100644 --- a/drivers/opus/silk/float/autocorrelation_FLP.c +++ b/thirdparty/opus/silk/float/autocorrelation_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/typedef.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "typedef.h" +#include "SigProc_FLP.h" /* compute autocorrelation */ void silk_autocorrelation_FLP( diff --git a/drivers/opus/silk/float/burg_modified_FLP.c b/thirdparty/opus/silk/float/burg_modified_FLP.c similarity index 98% rename from drivers/opus/silk/float/burg_modified_FLP.c rename to thirdparty/opus/silk/float/burg_modified_FLP.c index 567990b850e..ea5dc25a93a 100644 --- a/drivers/opus/silk/float/burg_modified_FLP.c +++ b/thirdparty/opus/silk/float/burg_modified_FLP.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" -#include "opus/silk/tuning_parameters.h" -#include "opus/silk/define.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" +#include "tuning_parameters.h" +#include "define.h" #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384*/ diff --git a/drivers/opus/silk/float/bwexpander_FLP.c b/thirdparty/opus/silk/float/bwexpander_FLP.c similarity index 96% rename from drivers/opus/silk/float/bwexpander_FLP.c rename to thirdparty/opus/silk/float/bwexpander_FLP.c index c47bfa94335..d55a4d79ab6 100644 --- a/drivers/opus/silk/float/bwexpander_FLP.c +++ b/thirdparty/opus/silk/float/bwexpander_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* Chirp (bw expand) LP AR filter */ void silk_bwexpander_FLP( diff --git a/drivers/opus/silk/float/corrMatrix_FLP.c b/thirdparty/opus/silk/float/corrMatrix_FLP.c similarity index 98% rename from drivers/opus/silk/float/corrMatrix_FLP.c rename to thirdparty/opus/silk/float/corrMatrix_FLP.c index e34b42b5419..eae6a1cfca2 100644 --- a/drivers/opus/silk/float/corrMatrix_FLP.c +++ b/thirdparty/opus/silk/float/corrMatrix_FLP.c @@ -24,13 +24,16 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /********************************************************************** * Correlation matrix computations for LS estimate. **********************************************************************/ -#include "opus/silk/float/main_FLP.h" +#include "main_FLP.h" /* Calculates correlation vector X'*t */ void silk_corrVector_FLP( diff --git a/drivers/opus/silk/float/encode_frame_FLP.c b/thirdparty/opus/silk/float/encode_frame_FLP.c similarity index 99% rename from drivers/opus/silk/float/encode_frame_FLP.c rename to thirdparty/opus/silk/float/encode_frame_FLP.c index 4e46a52ee84..2092a4d9e24 100644 --- a/drivers/opus/silk/float/encode_frame_FLP.c +++ b/thirdparty/opus/silk/float/encode_frame_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */ static OPUS_INLINE void silk_LBRR_encode_FLP( diff --git a/drivers/opus/silk/float/energy_FLP.c b/thirdparty/opus/silk/float/energy_FLP.c similarity index 97% rename from drivers/opus/silk/float/energy_FLP.c rename to thirdparty/opus/silk/float/energy_FLP.c index 443f52bb16d..24b8179f9e3 100644 --- a/drivers/opus/silk/float/energy_FLP.c +++ b/thirdparty/opus/silk/float/energy_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* sum of squares of a silk_float array, with result as double */ double silk_energy_FLP( diff --git a/drivers/opus/silk/float/find_LPC_FLP.c b/thirdparty/opus/silk/float/find_LPC_FLP.c similarity index 97% rename from drivers/opus/silk/float/find_LPC_FLP.c rename to thirdparty/opus/silk/float/find_LPC_FLP.c index 162a490d1d3..fcfe1c3681e 100644 --- a/drivers/opus/silk/float/find_LPC_FLP.c +++ b/thirdparty/opus/silk/float/find_LPC_FLP.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/define.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "define.h" +#include "main_FLP.h" +#include "tuning_parameters.h" /* LPC analysis */ void silk_find_LPC_FLP( diff --git a/drivers/opus/silk/float/find_LTP_FLP.c b/thirdparty/opus/silk/float/find_LTP_FLP.c similarity index 98% rename from drivers/opus/silk/float/find_LTP_FLP.c rename to thirdparty/opus/silk/float/find_LTP_FLP.c index 9c03eeb6a72..72299960140 100644 --- a/drivers/opus/silk/float/find_LTP_FLP.c +++ b/thirdparty/opus/silk/float/find_LTP_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" void silk_find_LTP_FLP( silk_float b[ MAX_NB_SUBFR * LTP_ORDER ], /* O LTP coefs */ diff --git a/drivers/opus/silk/float/find_pitch_lags_FLP.c b/thirdparty/opus/silk/float/find_pitch_lags_FLP.c similarity index 98% rename from drivers/opus/silk/float/find_pitch_lags_FLP.c rename to thirdparty/opus/silk/float/find_pitch_lags_FLP.c index bb7ef8ec2e4..f3b22d25ce6 100644 --- a/drivers/opus/silk/float/find_pitch_lags_FLP.c +++ b/thirdparty/opus/silk/float/find_pitch_lags_FLP.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#include "main_FLP.h" +#include "tuning_parameters.h" void silk_find_pitch_lags_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ diff --git a/drivers/opus/silk/float/find_pred_coefs_FLP.c b/thirdparty/opus/silk/float/find_pred_coefs_FLP.c similarity index 98% rename from drivers/opus/silk/float/find_pred_coefs_FLP.c rename to thirdparty/opus/silk/float/find_pred_coefs_FLP.c index c0496ff1b5c..1af4fe5f1b2 100644 --- a/drivers/opus/silk/float/find_pred_coefs_FLP.c +++ b/thirdparty/opus/silk/float/find_pred_coefs_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Find LPC and LTP coefficients */ void silk_find_pred_coefs_FLP( diff --git a/drivers/opus/silk/float/inner_product_FLP.c b/thirdparty/opus/silk/float/inner_product_FLP.c similarity index 97% rename from drivers/opus/silk/float/inner_product_FLP.c rename to thirdparty/opus/silk/float/inner_product_FLP.c index 0586c4d7fb3..029c012911d 100644 --- a/drivers/opus/silk/float/inner_product_FLP.c +++ b/thirdparty/opus/silk/float/inner_product_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* inner product of two silk_float arrays, with result as double */ double silk_inner_product_FLP( diff --git a/drivers/opus/silk/float/k2a_FLP.c b/thirdparty/opus/silk/float/k2a_FLP.c similarity index 97% rename from drivers/opus/silk/float/k2a_FLP.c rename to thirdparty/opus/silk/float/k2a_FLP.c index 26ba94e6102..12af4e76697 100644 --- a/drivers/opus/silk/float/k2a_FLP.c +++ b/thirdparty/opus/silk/float/k2a_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* step up function, converts reflection coefficients to prediction coefficients */ void silk_k2a_FLP( diff --git a/drivers/opus/silk/float/levinsondurbin_FLP.c b/thirdparty/opus/silk/float/levinsondurbin_FLP.c similarity index 97% rename from drivers/opus/silk/float/levinsondurbin_FLP.c rename to thirdparty/opus/silk/float/levinsondurbin_FLP.c index 7e3c9d65319..f0ba6069812 100644 --- a/drivers/opus/silk/float/levinsondurbin_FLP.c +++ b/thirdparty/opus/silk/float/levinsondurbin_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* Solve the normal equations using the Levinson-Durbin recursion */ silk_float silk_levinsondurbin_FLP( /* O prediction error energy */ diff --git a/drivers/opus/silk/float/main_FLP.h b/thirdparty/opus/silk/float/main_FLP.h similarity index 98% rename from drivers/opus/silk/float/main_FLP.h rename to thirdparty/opus/silk/float/main_FLP.h index 8f351775495..e5a75972e5f 100644 --- a/drivers/opus/silk/float/main_FLP.h +++ b/thirdparty/opus/silk/float/main_FLP.h @@ -28,13 +28,13 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_MAIN_FLP_H #define SILK_MAIN_FLP_H -#include "opus/silk/float/SigProc_FLP.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/float/structs_FLP.h" -#include "opus/silk/main.h" -#include "opus/silk/define.h" -#include "opus/silk/debug.h" -#include "opus/celt/entenc.h" +#include "SigProc_FLP.h" +#include "SigProc_FIX.h" +#include "structs_FLP.h" +#include "main.h" +#include "define.h" +#include "debug.h" +#include "entenc.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/float/noise_shape_analysis_FLP.c b/thirdparty/opus/silk/float/noise_shape_analysis_FLP.c similarity index 99% rename from drivers/opus/silk/float/noise_shape_analysis_FLP.c rename to thirdparty/opus/silk/float/noise_shape_analysis_FLP.c index cbb8ba44706..65f6ea58705 100644 --- a/drivers/opus/silk/float/noise_shape_analysis_FLP.c +++ b/thirdparty/opus/silk/float/noise_shape_analysis_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /* Compute gain to make warped filter coefficients have a zero mean log frequency response on a */ /* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */ diff --git a/drivers/opus/silk/float/pitch_analysis_core_FLP.c b/thirdparty/opus/silk/float/pitch_analysis_core_FLP.c similarity index 99% rename from drivers/opus/silk/float/pitch_analysis_core_FLP.c rename to thirdparty/opus/silk/float/pitch_analysis_core_FLP.c index 6a48ae498c2..d0e637a29dc 100644 --- a/drivers/opus/silk/float/pitch_analysis_core_FLP.c +++ b/thirdparty/opus/silk/float/pitch_analysis_core_FLP.c @@ -24,15 +24,18 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /***************************************************************************** * Pitch analyser function ******************************************************************************/ -#include "opus/silk/float/SigProc_FLP.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/pitch_est_defines.h" -#include "opus/celt/pitch.h" +#include "SigProc_FLP.h" +#include "SigProc_FIX.h" +#include "pitch_est_defines.h" +#include "pitch.h" #define SCRATCH_SIZE 22 diff --git a/drivers/opus/silk/float/prefilter_FLP.c b/thirdparty/opus/silk/float/prefilter_FLP.c similarity index 98% rename from drivers/opus/silk/float/prefilter_FLP.c rename to thirdparty/opus/silk/float/prefilter_FLP.c index 0857888b912..8bc32fb4104 100644 --- a/drivers/opus/silk/float/prefilter_FLP.c +++ b/thirdparty/opus/silk/float/prefilter_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /* * Prefilter for finding Quantizer input signal diff --git a/drivers/opus/silk/float/process_gains_FLP.c b/thirdparty/opus/silk/float/process_gains_FLP.c similarity index 97% rename from drivers/opus/silk/float/process_gains_FLP.c rename to thirdparty/opus/silk/float/process_gains_FLP.c index 3a1e46f096b..c0da0dae44b 100644 --- a/drivers/opus/silk/float/process_gains_FLP.c +++ b/thirdparty/opus/silk/float/process_gains_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /* Processing of gains */ void silk_process_gains_FLP( diff --git a/drivers/opus/silk/float/regularize_correlations_FLP.c b/thirdparty/opus/silk/float/regularize_correlations_FLP.c similarity index 97% rename from drivers/opus/silk/float/regularize_correlations_FLP.c rename to thirdparty/opus/silk/float/regularize_correlations_FLP.c index 20e9074a0b1..df4612604ca 100644 --- a/drivers/opus/silk/float/regularize_correlations_FLP.c +++ b/thirdparty/opus/silk/float/regularize_correlations_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Add noise to matrix diagonal */ void silk_regularize_correlations_FLP( diff --git a/drivers/opus/silk/float/residual_energy_FLP.c b/thirdparty/opus/silk/float/residual_energy_FLP.c similarity index 98% rename from drivers/opus/silk/float/residual_energy_FLP.c rename to thirdparty/opus/silk/float/residual_energy_FLP.c index cc462a9e546..b2e03a86a49 100644 --- a/drivers/opus/silk/float/residual_energy_FLP.c +++ b/thirdparty/opus/silk/float/residual_energy_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" #define MAX_ITERATIONS_RESIDUAL_NRG 10 #define REGULARIZATION_FACTOR 1e-8f diff --git a/drivers/opus/silk/float/scale_copy_vector_FLP.c b/thirdparty/opus/silk/float/scale_copy_vector_FLP.c similarity index 96% rename from drivers/opus/silk/float/scale_copy_vector_FLP.c rename to thirdparty/opus/silk/float/scale_copy_vector_FLP.c index 2656963e88d..20db32b3b19 100644 --- a/drivers/opus/silk/float/scale_copy_vector_FLP.c +++ b/thirdparty/opus/silk/float/scale_copy_vector_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* copy and multiply a vector by a constant */ void silk_scale_copy_vector_FLP( diff --git a/drivers/opus/silk/float/scale_vector_FLP.c b/thirdparty/opus/silk/float/scale_vector_FLP.c similarity index 96% rename from drivers/opus/silk/float/scale_vector_FLP.c rename to thirdparty/opus/silk/float/scale_vector_FLP.c index ea2aa0e3309..108fdcbed54 100644 --- a/drivers/opus/silk/float/scale_vector_FLP.c +++ b/thirdparty/opus/silk/float/scale_vector_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* multiply a vector by a constant */ void silk_scale_vector_FLP( diff --git a/drivers/opus/silk/float/schur_FLP.c b/thirdparty/opus/silk/float/schur_FLP.c similarity index 97% rename from drivers/opus/silk/float/schur_FLP.c rename to thirdparty/opus/silk/float/schur_FLP.c index f2071db214b..ee436f8351c 100644 --- a/drivers/opus/silk/float/schur_FLP.c +++ b/thirdparty/opus/silk/float/schur_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" silk_float silk_schur_FLP( /* O returns residual energy */ silk_float refl_coef[], /* O reflection coefficients (length order) */ diff --git a/drivers/opus/silk/float/solve_LS_FLP.c b/thirdparty/opus/silk/float/solve_LS_FLP.c similarity index 98% rename from drivers/opus/silk/float/solve_LS_FLP.c rename to thirdparty/opus/silk/float/solve_LS_FLP.c index 9d625c695de..7c90d665a0f 100644 --- a/drivers/opus/silk/float/solve_LS_FLP.c +++ b/thirdparty/opus/silk/float/solve_LS_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /********************************************************************** * LDL Factorisation. Finds the upper triangular matrix L and the diagonal diff --git a/drivers/opus/silk/float/sort_FLP.c b/thirdparty/opus/silk/float/sort_FLP.c similarity index 97% rename from drivers/opus/silk/float/sort_FLP.c rename to thirdparty/opus/silk/float/sort_FLP.c index ed212c63c9c..f08d7592c56 100644 --- a/drivers/opus/silk/float/sort_FLP.c +++ b/thirdparty/opus/silk/float/sort_FLP.c @@ -24,14 +24,17 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Insertion sort (fast for already almost sorted arrays): */ /* Best case: O(n) for an already sorted array */ /* Worst case: O(n^2) for an inversely sorted array */ -#include "opus/silk/typedef.h" -#include "opus/silk/float/SigProc_FLP.h" +#include "typedef.h" +#include "SigProc_FLP.h" void silk_insertion_sort_decreasing_FLP( silk_float *a, /* I/O Unsorted / Sorted vector */ diff --git a/drivers/opus/silk/float/structs_FLP.h b/thirdparty/opus/silk/float/structs_FLP.h similarity index 98% rename from drivers/opus/silk/float/structs_FLP.h rename to thirdparty/opus/silk/float/structs_FLP.h index 9eb5eb05eb9..14d647ced27 100644 --- a/drivers/opus/silk/float/structs_FLP.h +++ b/thirdparty/opus/silk/float/structs_FLP.h @@ -28,9 +28,9 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_STRUCTS_FLP_H #define SILK_STRUCTS_FLP_H -#include "opus/silk/typedef.h" -#include "opus/silk/main.h" -#include "opus/silk/structs.h" +#include "typedef.h" +#include "main.h" +#include "structs.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/float/warped_autocorrelation_FLP.c b/thirdparty/opus/silk/float/warped_autocorrelation_FLP.c similarity index 97% rename from drivers/opus/silk/float/warped_autocorrelation_FLP.c rename to thirdparty/opus/silk/float/warped_autocorrelation_FLP.c index b814661b92b..542414f48ec 100644 --- a/drivers/opus/silk/float/warped_autocorrelation_FLP.c +++ b/thirdparty/opus/silk/float/warped_autocorrelation_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Autocorrelations for a warped frequency axis */ void silk_warped_autocorrelation_FLP( diff --git a/drivers/opus/silk/float/wrappers_FLP.c b/thirdparty/opus/silk/float/wrappers_FLP.c similarity index 99% rename from drivers/opus/silk/float/wrappers_FLP.c rename to thirdparty/opus/silk/float/wrappers_FLP.c index c80c618a928..6666b8efaad 100644 --- a/drivers/opus/silk/float/wrappers_FLP.c +++ b/thirdparty/opus/silk/float/wrappers_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Wrappers. Calls flp / fix code */ diff --git a/drivers/opus/silk/gain_quant.c b/thirdparty/opus/silk/gain_quant.c similarity index 99% rename from drivers/opus/silk/gain_quant.c rename to thirdparty/opus/silk/gain_quant.c index 7b7a65d674e..64ccd0611bf 100644 --- a/drivers/opus/silk/gain_quant.c +++ b/thirdparty/opus/silk/gain_quant.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" #define OFFSET ( ( MIN_QGAIN_DB * 128 ) / 6 + 16 * 128 ) #define SCALE_Q16 ( ( 65536 * ( N_LEVELS_QGAIN - 1 ) ) / ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) diff --git a/drivers/opus/silk/init_decoder.c b/thirdparty/opus/silk/init_decoder.c similarity index 97% rename from drivers/opus/silk/init_decoder.c rename to thirdparty/opus/silk/init_decoder.c index c8f694c9d7e..f887c67886f 100644 --- a/drivers/opus/silk/init_decoder.c +++ b/thirdparty/opus/silk/init_decoder.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /************************/ /* Init Decoder State */ diff --git a/drivers/opus/silk/init_encoder.c b/thirdparty/opus/silk/init_encoder.c similarity index 92% rename from drivers/opus/silk/init_encoder.c rename to thirdparty/opus/silk/init_encoder.c index 1c63edb4b82..65995c33fa4 100644 --- a/drivers/opus/silk/init_encoder.c +++ b/thirdparty/opus/silk/init_encoder.c @@ -24,14 +24,17 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/main_FIX.h" -#else -#include "opus/silk/float/main_FLP.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif -#include "opus/silk/tuning_parameters.h" -#include "opus/celt/cpu_support.h" +#ifdef FIXED_POINT +#include "main_FIX.h" +#else +#include "main_FLP.h" +#endif +#include "tuning_parameters.h" +#include "cpu_support.h" /*********************************/ /* Initialize Silk Encoder state */ diff --git a/drivers/opus/silk/inner_prod_aligned.c b/thirdparty/opus/silk/inner_prod_aligned.c similarity index 96% rename from drivers/opus/silk/inner_prod_aligned.c rename to thirdparty/opus/silk/inner_prod_aligned.c index 7bd7297c7d5..257ae9e04eb 100644 --- a/drivers/opus/silk/inner_prod_aligned.c +++ b/thirdparty/opus/silk/inner_prod_aligned.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" opus_int32 silk_inner_prod_aligned_scale( const opus_int16 *const inVec1, /* I input vector 1 */ diff --git a/drivers/opus/silk/interpolate.c b/thirdparty/opus/silk/interpolate.c similarity index 97% rename from drivers/opus/silk/interpolate.c rename to thirdparty/opus/silk/interpolate.c index 25091b4fa64..1bd8ca4d532 100644 --- a/drivers/opus/silk/interpolate.c +++ b/thirdparty/opus/silk/interpolate.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Interpolate two vectors */ void silk_interpolate( diff --git a/drivers/opus/silk/lin2log.c b/thirdparty/opus/silk/lin2log.c similarity index 96% rename from drivers/opus/silk/lin2log.c rename to thirdparty/opus/silk/lin2log.c index 694eb1e8766..d4fe515321f 100644 --- a/drivers/opus/silk/lin2log.c +++ b/thirdparty/opus/silk/lin2log.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Approximation of 128 * log2() (very close inverse of silk_log2lin()) */ /* Convert input to a log scale */ opus_int32 silk_lin2log( diff --git a/drivers/opus/silk/log2lin.c b/thirdparty/opus/silk/log2lin.c similarity index 97% rename from drivers/opus/silk/log2lin.c rename to thirdparty/opus/silk/log2lin.c index 8d14150a417..b7c48e47407 100644 --- a/drivers/opus/silk/log2lin.c +++ b/thirdparty/opus/silk/log2lin.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Approximation of 2^() (very close inverse of silk_lin2log()) */ /* Convert input to a linear scale */ diff --git a/drivers/opus/silk/macros.h b/thirdparty/opus/silk/macros.h similarity index 96% rename from drivers/opus/silk/macros.h rename to thirdparty/opus/silk/macros.h index 29efd11ace0..bc303034664 100644 --- a/drivers/opus/silk/macros.h +++ b/thirdparty/opus/silk/macros.h @@ -27,10 +27,13 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_MACROS_H #define SILK_MACROS_H -#include "opus/opus_config.h" -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_types.h" +#include "opus_defines.h" #if OPUS_GNUC_PREREQ(3, 0) #define opus_likely(x) (__builtin_expect(!!(x), 1)) @@ -108,10 +111,10 @@ POSSIBILITY OF SUCH DAMAGE. ((((a)^0x80000000) & (b) & 0x80000000) ? silk_int32_MAX : (a)-(b)) ) #if defined(MIPSr1_ASM) -#include "opus/silk/mips/macros_mipsr1.h" +#include "mips/macros_mipsr1.h" #endif -#include "opus/celt/ecintrin.h" +#include "ecintrin.h" #ifndef OVERRIDE_silk_CLZ16 static OPUS_INLINE opus_int32 silk_CLZ16(opus_int16 in16) { @@ -139,11 +142,11 @@ static OPUS_INLINE opus_int32 silk_CLZ32(opus_int32 in32) #endif #ifdef OPUS_ARM_INLINE_ASM -#include "opus/silk/arm/macros_armv4.h" +#include "arm/macros_armv4.h" #endif #ifdef OPUS_ARM_INLINE_EDSP -#include "opus/silk/arm/macros_armv5e.h" +#include "arm/macros_armv5e.h" #endif #endif /* SILK_MACROS_H */ diff --git a/drivers/opus/silk/main.h b/thirdparty/opus/silk/main.h similarity index 99% rename from drivers/opus/silk/main.h rename to thirdparty/opus/silk/main.h index a6ec2d7e4cf..2f90d68f7da 100644 --- a/drivers/opus/silk/main.h +++ b/thirdparty/opus/silk/main.h @@ -28,18 +28,18 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_MAIN_H #define SILK_MAIN_H -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/define.h" -#include "opus/silk/structs.h" -#include "opus/silk/tables.h" -#include "opus/silk/PLC.h" -#include "opus/silk/control.h" -#include "opus/silk/debug.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "SigProc_FIX.h" +#include "define.h" +#include "structs.h" +#include "tables.h" +#include "PLC.h" +#include "control.h" +#include "debug.h" +#include "entenc.h" +#include "entdec.h" #if defined(OPUS_X86_MAY_HAVE_SSE4_1) -#include "opus/silk/x86/main_sse.h" +#include "x86/main_sse.h" #endif /* Convert Left/Right stereo signal to adaptive Mid/Side representation */ diff --git a/drivers/opus/silk/mips/NSQ_del_dec_mipsr1.h b/thirdparty/opus/silk/mips/NSQ_del_dec_mipsr1.h similarity index 99% rename from drivers/opus/silk/mips/NSQ_del_dec_mipsr1.h rename to thirdparty/opus/silk/mips/NSQ_del_dec_mipsr1.h index 5cecca28b7f..f6afd923e87 100644 --- a/drivers/opus/silk/mips/NSQ_del_dec_mipsr1.h +++ b/thirdparty/opus/silk/mips/NSQ_del_dec_mipsr1.h @@ -27,10 +27,13 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef __NSQ_DEL_DEC_MIPSR1_H__ #define __NSQ_DEL_DEC_MIPSR1_H__ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" #define OVERRIDE_silk_noise_shape_quantizer_del_dec static inline void silk_noise_shape_quantizer_del_dec( diff --git a/drivers/opus/silk/mips/macros_mipsr1.h b/thirdparty/opus/silk/mips/macros_mipsr1.h similarity index 100% rename from drivers/opus/silk/mips/macros_mipsr1.h rename to thirdparty/opus/silk/mips/macros_mipsr1.h diff --git a/drivers/opus/silk/mips/sigproc_fix_mipsr1.h b/thirdparty/opus/silk/mips/sigproc_fix_mipsr1.h similarity index 100% rename from drivers/opus/silk/mips/sigproc_fix_mipsr1.h rename to thirdparty/opus/silk/mips/sigproc_fix_mipsr1.h diff --git a/drivers/opus/silk/pitch_est_defines.h b/thirdparty/opus/silk/pitch_est_defines.h similarity index 99% rename from drivers/opus/silk/pitch_est_defines.h rename to thirdparty/opus/silk/pitch_est_defines.h index e2d9e517c48..e1e4b5d7686 100644 --- a/drivers/opus/silk/pitch_est_defines.h +++ b/thirdparty/opus/silk/pitch_est_defines.h @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_PE_DEFINES_H #define SILK_PE_DEFINES_H -#include "opus/silk/SigProc_FIX.h" +#include "SigProc_FIX.h" /********************************************************/ /* Definitions for pitch estimator */ diff --git a/drivers/opus/silk/pitch_est_tables.c b/thirdparty/opus/silk/pitch_est_tables.c similarity index 97% rename from drivers/opus/silk/pitch_est_tables.c rename to thirdparty/opus/silk/pitch_est_tables.c index eb17bf0b269..81a8bacaca2 100644 --- a/drivers/opus/silk/pitch_est_tables.c +++ b/thirdparty/opus/silk/pitch_est_tables.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/typedef.h" -#include "opus/silk/pitch_est_defines.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "typedef.h" +#include "pitch_est_defines.h" const opus_int8 silk_CB_lags_stage2_10_ms[ PE_MAX_NB_SUBFR >> 1][ PE_NB_CBKS_STAGE2_10MS ] = { diff --git a/drivers/opus/silk/process_NLSFs.c b/thirdparty/opus/silk/process_NLSFs.c similarity index 98% rename from drivers/opus/silk/process_NLSFs.c rename to thirdparty/opus/silk/process_NLSFs.c index 9d8f96d7b7e..c27cf030469 100644 --- a/drivers/opus/silk/process_NLSFs.c +++ b/thirdparty/opus/silk/process_NLSFs.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Limit, stabilize, convert and quantize NLSFs */ void silk_process_NLSFs( diff --git a/drivers/opus/silk/quant_LTP_gains.c b/thirdparty/opus/silk/quant_LTP_gains.c similarity index 98% rename from drivers/opus/silk/quant_LTP_gains.c rename to thirdparty/opus/silk/quant_LTP_gains.c index ffc3cb24ab4..513a8c4468f 100644 --- a/drivers/opus/silk/quant_LTP_gains.c +++ b/thirdparty/opus/silk/quant_LTP_gains.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "tuning_parameters.h" void silk_quant_LTP_gains( opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O (un)quantized LTP gains */ diff --git a/drivers/opus/silk/resampler.c b/thirdparty/opus/silk/resampler.c similarity index 99% rename from drivers/opus/silk/resampler.c rename to thirdparty/opus/silk/resampler.c index 12b2f920606..374fbb37225 100644 --- a/drivers/opus/silk/resampler.c +++ b/thirdparty/opus/silk/resampler.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* * Matrix of resampling methods used: @@ -44,7 +47,7 @@ POSSIBILITY OF SUCH DAMAGE. * AF -> AR2 filter followed by FIR interpolation */ -#include "opus/silk/resampler_private.h" +#include "resampler_private.h" /* Tables with delay compensation values to equalize total delay for different modes */ static const opus_int8 delay_matrix_enc[ 5 ][ 3 ] = { diff --git a/drivers/opus/silk/resampler_down2.c b/thirdparty/opus/silk/resampler_down2.c similarity index 97% rename from drivers/opus/silk/resampler_down2.c rename to thirdparty/opus/silk/resampler_down2.c index 20a42c98a6f..cec36346408 100644 --- a/drivers/opus/silk/resampler_down2.c +++ b/thirdparty/opus/silk/resampler_down2.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_rom.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_rom.h" /* Downsample by a factor 2 */ void silk_resampler_down2( diff --git a/drivers/opus/silk/resampler_down2_3.c b/thirdparty/opus/silk/resampler_down2_3.c similarity index 97% rename from drivers/opus/silk/resampler_down2_3.c rename to thirdparty/opus/silk/resampler_down2_3.c index e01dd2bc728..4342614dccc 100644 --- a/drivers/opus/silk/resampler_down2_3.c +++ b/thirdparty/opus/silk/resampler_down2_3.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" +#include "stack_alloc.h" #define ORDER_FIR 4 diff --git a/drivers/opus/silk/resampler_private.h b/thirdparty/opus/silk/resampler_private.h similarity index 97% rename from drivers/opus/silk/resampler_private.h rename to thirdparty/opus/silk/resampler_private.h index 5c0ee110fc3..422a7d9d953 100644 --- a/drivers/opus/silk/resampler_private.h +++ b/thirdparty/opus/silk/resampler_private.h @@ -32,9 +32,9 @@ POSSIBILITY OF SUCH DAMAGE. extern "C" { #endif -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_structs.h" -#include "opus/silk/resampler_rom.h" +#include "SigProc_FIX.h" +#include "resampler_structs.h" +#include "resampler_rom.h" /* Number of input samples to process in the inner loop */ #define RESAMPLER_MAX_BATCH_SIZE_MS 10 diff --git a/drivers/opus/silk/resampler_private_AR2.c b/thirdparty/opus/silk/resampler_private_AR2.c similarity index 96% rename from drivers/opus/silk/resampler_private_AR2.c rename to thirdparty/opus/silk/resampler_private_AR2.c index cc753ea7049..5fff23714f9 100644 --- a/drivers/opus/silk/resampler_private_AR2.c +++ b/thirdparty/opus/silk/resampler_private_AR2.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" /* Second order AR filter with single delay elements */ void silk_resampler_private_AR2( diff --git a/drivers/opus/silk/resampler_private_IIR_FIR.c b/thirdparty/opus/silk/resampler_private_IIR_FIR.c similarity index 97% rename from drivers/opus/silk/resampler_private_IIR_FIR.c rename to thirdparty/opus/silk/resampler_private_IIR_FIR.c index 9a8733fbbbd..6b2b3a2e183 100644 --- a/drivers/opus/silk/resampler_private_IIR_FIR.c +++ b/thirdparty/opus/silk/resampler_private_IIR_FIR.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" +#include "stack_alloc.h" static OPUS_INLINE opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL( opus_int16 *out, diff --git a/drivers/opus/silk/resampler_private_down_FIR.c b/thirdparty/opus/silk/resampler_private_down_FIR.c similarity index 98% rename from drivers/opus/silk/resampler_private_down_FIR.c rename to thirdparty/opus/silk/resampler_private_down_FIR.c index fb9acc60a75..783e42b3561 100644 --- a/drivers/opus/silk/resampler_private_down_FIR.c +++ b/thirdparty/opus/silk/resampler_private_down_FIR.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" +#include "stack_alloc.h" static OPUS_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL( opus_int16 *out, diff --git a/drivers/opus/silk/resampler_private_up2_HQ.c b/thirdparty/opus/silk/resampler_private_up2_HQ.c similarity index 98% rename from drivers/opus/silk/resampler_private_up2_HQ.c rename to thirdparty/opus/silk/resampler_private_up2_HQ.c index 0b23c16dab6..c7ec8de3651 100644 --- a/drivers/opus/silk/resampler_private_up2_HQ.c +++ b/thirdparty/opus/silk/resampler_private_up2_HQ.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" /* Upsample by a factor 2, high quality */ /* Uses 2nd order allpass filters for the 2x upsampling, followed by a */ diff --git a/drivers/opus/silk/resampler_rom.c b/thirdparty/opus/silk/resampler_rom.c similarity index 98% rename from drivers/opus/silk/resampler_rom.c rename to thirdparty/opus/silk/resampler_rom.c index 7079efe1dc5..5e6b04476aa 100644 --- a/drivers/opus/silk/resampler_rom.c +++ b/thirdparty/opus/silk/resampler_rom.c @@ -24,12 +24,15 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Filter coefficients for IIR/FIR polyphase resampling * * Total size: 179 Words (358 Bytes) */ -#include "opus/silk/resampler_private.h" +#include "resampler_private.h" /* Matlab code for the notch filter coefficients: */ /* B = [1, 0.147, 1]; A = [1, 0.107, 0.89]; G = 0.93; freqz(G * B, A, 2^14, 16e3); axis([0, 8000, -10, 1]) */ diff --git a/drivers/opus/silk/resampler_rom.h b/thirdparty/opus/silk/resampler_rom.h similarity index 97% rename from drivers/opus/silk/resampler_rom.h rename to thirdparty/opus/silk/resampler_rom.h index 2fa586ebf2b..490b3388dce 100644 --- a/drivers/opus/silk/resampler_rom.h +++ b/thirdparty/opus/silk/resampler_rom.h @@ -33,8 +33,8 @@ extern "C" { #endif -#include "opus/silk/typedef.h" -#include "opus/silk/resampler_structs.h" +#include "typedef.h" +#include "resampler_structs.h" #define RESAMPLER_DOWN_ORDER_FIR0 18 #define RESAMPLER_DOWN_ORDER_FIR1 24 diff --git a/drivers/opus/silk/resampler_structs.h b/thirdparty/opus/silk/resampler_structs.h similarity index 100% rename from drivers/opus/silk/resampler_structs.h rename to thirdparty/opus/silk/resampler_structs.h diff --git a/drivers/opus/silk/shell_coder.c b/thirdparty/opus/silk/shell_coder.c similarity index 99% rename from drivers/opus/silk/shell_coder.c rename to thirdparty/opus/silk/shell_coder.c index 67a54469276..4af341474bc 100644 --- a/drivers/opus/silk/shell_coder.c +++ b/thirdparty/opus/silk/shell_coder.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* shell coder; pulse-subframe length is hardcoded */ diff --git a/drivers/opus/silk/sigm_Q15.c b/thirdparty/opus/silk/sigm_Q15.c similarity index 97% rename from drivers/opus/silk/sigm_Q15.c rename to thirdparty/opus/silk/sigm_Q15.c index 3171d15f4af..3c507d255b1 100644 --- a/drivers/opus/silk/sigm_Q15.c +++ b/thirdparty/opus/silk/sigm_Q15.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Approximate sigmoid function */ -#include "opus/silk/SigProc_FIX.h" +#include "SigProc_FIX.h" /* fprintf(1, '%d, ', round(1024 * ([1 ./ (1 + exp(-(1:5))), 1] - 1 ./ (1 + exp(-(0:5)))))); */ static const opus_int32 sigm_LUT_slope_Q10[ 6 ] = { diff --git a/drivers/opus/silk/sort.c b/thirdparty/opus/silk/sort.c similarity index 98% rename from drivers/opus/silk/sort.c rename to thirdparty/opus/silk/sort.c index dd2988e5b89..8670dbdd02c 100644 --- a/drivers/opus/silk/sort.c +++ b/thirdparty/opus/silk/sort.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Insertion sort (fast for already almost sorted arrays): */ /* Best case: O(n) for an already sorted array */ @@ -32,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. /* */ /* Shell short: http://en.wikipedia.org/wiki/Shell_sort */ -#include "opus/silk/SigProc_FIX.h" +#include "SigProc_FIX.h" void silk_insertion_sort_increasing( opus_int32 *a, /* I/O Unsorted / Sorted vector */ @@ -80,7 +83,7 @@ void silk_insertion_sort_increasing( } } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* This function is only used by the fixed-point build */ void silk_insertion_sort_decreasing_int16( opus_int16 *a, /* I/O Unsorted / Sorted vector */ diff --git a/drivers/opus/silk/stereo_LR_to_MS.c b/thirdparty/opus/silk/stereo_LR_to_MS.c similarity index 99% rename from drivers/opus/silk/stereo_LR_to_MS.c rename to thirdparty/opus/silk/stereo_LR_to_MS.c index cf8affa90b1..42906e6f676 100644 --- a/drivers/opus/silk/stereo_LR_to_MS.c +++ b/thirdparty/opus/silk/stereo_LR_to_MS.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /* Convert Left/Right stereo signal to adaptive Mid/Side representation */ void silk_stereo_LR_to_MS( diff --git a/drivers/opus/silk/stereo_MS_to_LR.c b/thirdparty/opus/silk/stereo_MS_to_LR.c similarity index 98% rename from drivers/opus/silk/stereo_MS_to_LR.c rename to thirdparty/opus/silk/stereo_MS_to_LR.c index 4f553eb6940..62521a4f352 100644 --- a/drivers/opus/silk/stereo_MS_to_LR.c +++ b/thirdparty/opus/silk/stereo_MS_to_LR.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Convert adaptive Mid/Side representation to Left/Right stereo signal */ void silk_stereo_MS_to_LR( diff --git a/drivers/opus/silk/stereo_decode_pred.c b/thirdparty/opus/silk/stereo_decode_pred.c similarity index 98% rename from drivers/opus/silk/stereo_decode_pred.c rename to thirdparty/opus/silk/stereo_decode_pred.c index 9e8abf39d02..56ba3925e87 100644 --- a/drivers/opus/silk/stereo_decode_pred.c +++ b/thirdparty/opus/silk/stereo_decode_pred.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Decode mid/side predictors */ void silk_stereo_decode_pred( diff --git a/drivers/opus/silk/stereo_encode_pred.c b/thirdparty/opus/silk/stereo_encode_pred.c similarity index 97% rename from drivers/opus/silk/stereo_encode_pred.c rename to thirdparty/opus/silk/stereo_encode_pred.c index a864d404f68..e6dd1950664 100644 --- a/drivers/opus/silk/stereo_encode_pred.c +++ b/thirdparty/opus/silk/stereo_encode_pred.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Entropy code the mid/side quantization indices */ void silk_stereo_encode_pred( diff --git a/drivers/opus/silk/stereo_find_predictor.c b/thirdparty/opus/silk/stereo_find_predictor.c similarity index 98% rename from drivers/opus/silk/stereo_find_predictor.c rename to thirdparty/opus/silk/stereo_find_predictor.c index c7fa3ac5555..e30e90bddc2 100644 --- a/drivers/opus/silk/stereo_find_predictor.c +++ b/thirdparty/opus/silk/stereo_find_predictor.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Find least-squares prediction gain for one signal based on another and quantize it */ opus_int32 silk_stereo_find_predictor( /* O Returns predictor in Q13 */ diff --git a/drivers/opus/silk/stereo_quant_pred.c b/thirdparty/opus/silk/stereo_quant_pred.c similarity index 98% rename from drivers/opus/silk/stereo_quant_pred.c rename to thirdparty/opus/silk/stereo_quant_pred.c index ff2971e7c16..d4ced6c3e82 100644 --- a/drivers/opus/silk/stereo_quant_pred.c +++ b/thirdparty/opus/silk/stereo_quant_pred.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Quantize mid/side predictors */ void silk_stereo_quant_pred( diff --git a/drivers/opus/silk/structs.h b/thirdparty/opus/silk/structs.h similarity index 99% rename from drivers/opus/silk/structs.h rename to thirdparty/opus/silk/structs.h index a2876b62a2a..827829dc6f3 100644 --- a/drivers/opus/silk/structs.h +++ b/thirdparty/opus/silk/structs.h @@ -28,11 +28,11 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_STRUCTS_H #define SILK_STRUCTS_H -#include "opus/silk/typedef.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/define.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "typedef.h" +#include "SigProc_FIX.h" +#include "define.h" +#include "entenc.h" +#include "entdec.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/sum_sqr_shift.c b/thirdparty/opus/silk/sum_sqr_shift.c similarity index 97% rename from drivers/opus/silk/sum_sqr_shift.c rename to thirdparty/opus/silk/sum_sqr_shift.c index 1d1da449f48..129df191d8d 100644 --- a/drivers/opus/silk/sum_sqr_shift.c +++ b/thirdparty/opus/silk/sum_sqr_shift.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Compute number of bits to right shift the sum of squares of a vector */ /* of int16s to make it fit in an int32 */ diff --git a/drivers/opus/silk/table_LSF_cos.c b/thirdparty/opus/silk/table_LSF_cos.c similarity index 98% rename from drivers/opus/silk/table_LSF_cos.c rename to thirdparty/opus/silk/table_LSF_cos.c index d350df9adda..ec9dc639279 100644 --- a/drivers/opus/silk/table_LSF_cos.c +++ b/thirdparty/opus/silk/table_LSF_cos.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" /* Cosine approximation table for LSF conversion */ /* Q12 values (even) */ diff --git a/drivers/opus/silk/tables.h b/thirdparty/opus/silk/tables.h similarity index 99% rename from drivers/opus/silk/tables.h rename to thirdparty/opus/silk/tables.h index 2ad69eec809..7fea6fda39d 100644 --- a/drivers/opus/silk/tables.h +++ b/thirdparty/opus/silk/tables.h @@ -28,8 +28,8 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_TABLES_H #define SILK_TABLES_H -#include "opus/silk/define.h" -#include "opus/silk/structs.h" +#include "define.h" +#include "structs.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/tables_LTP.c b/thirdparty/opus/silk/tables_LTP.c similarity index 99% rename from drivers/opus/silk/tables_LTP.c rename to thirdparty/opus/silk/tables_LTP.c index 9f500b25f2f..0e6a0254d5d 100644 --- a/drivers/opus/silk/tables_LTP.c +++ b/thirdparty/opus/silk/tables_LTP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" const opus_uint8 silk_LTP_per_index_iCDF[3] = { 179, 99, 0 diff --git a/drivers/opus/silk/tables_NLSF_CB_NB_MB.c b/thirdparty/opus/silk/tables_NLSF_CB_NB_MB.c similarity index 99% rename from drivers/opus/silk/tables_NLSF_CB_NB_MB.c rename to thirdparty/opus/silk/tables_NLSF_CB_NB_MB.c index d1cf99356da..8c59d207aa0 100644 --- a/drivers/opus/silk/tables_NLSF_CB_NB_MB.c +++ b/thirdparty/opus/silk/tables_NLSF_CB_NB_MB.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" static const opus_uint8 silk_NLSF_CB1_NB_MB_Q8[ 320 ] = { 12, 35, 60, 83, 108, 132, 157, 180, diff --git a/drivers/opus/silk/tables_NLSF_CB_WB.c b/thirdparty/opus/silk/tables_NLSF_CB_WB.c similarity index 99% rename from drivers/opus/silk/tables_NLSF_CB_WB.c rename to thirdparty/opus/silk/tables_NLSF_CB_WB.c index 5ee6e880c46..50af87eb2e1 100644 --- a/drivers/opus/silk/tables_NLSF_CB_WB.c +++ b/thirdparty/opus/silk/tables_NLSF_CB_WB.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" static const opus_uint8 silk_NLSF_CB1_WB_Q8[ 512 ] = { 7, 23, 38, 54, 69, 85, 100, 116, diff --git a/drivers/opus/silk/tables_gain.c b/thirdparty/opus/silk/tables_gain.c similarity index 97% rename from drivers/opus/silk/tables_gain.c rename to thirdparty/opus/silk/tables_gain.c index e1e4319d7dc..37e41d890c3 100644 --- a/drivers/opus/silk/tables_gain.c +++ b/thirdparty/opus/silk/tables_gain.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/tables_other.c b/thirdparty/opus/silk/tables_other.c similarity index 97% rename from drivers/opus/silk/tables_other.c rename to thirdparty/opus/silk/tables_other.c index 3713ff82272..398686bf26b 100644 --- a/drivers/opus/silk/tables_other.c +++ b/thirdparty/opus/silk/tables_other.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/structs.h" -#include "opus/silk/define.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "structs.h" +#include "define.h" +#include "tables.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/tables_pitch_lag.c b/thirdparty/opus/silk/tables_pitch_lag.c similarity index 97% rename from drivers/opus/silk/tables_pitch_lag.c rename to thirdparty/opus/silk/tables_pitch_lag.c index f435b7e0165..e80cc59a272 100644 --- a/drivers/opus/silk/tables_pitch_lag.c +++ b/thirdparty/opus/silk/tables_pitch_lag.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" const opus_uint8 silk_pitch_lag_iCDF[ 2 * ( PITCH_EST_MAX_LAG_MS - PITCH_EST_MIN_LAG_MS ) ] = { 253, 250, 244, 233, 212, 182, 150, 131, diff --git a/drivers/opus/silk/tables_pulses_per_block.c b/thirdparty/opus/silk/tables_pulses_per_block.c similarity index 99% rename from drivers/opus/silk/tables_pulses_per_block.c rename to thirdparty/opus/silk/tables_pulses_per_block.c index 21f430791a6..c7c01c8893f 100644 --- a/drivers/opus/silk/tables_pulses_per_block.c +++ b/thirdparty/opus/silk/tables_pulses_per_block.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" const opus_uint8 silk_max_pulses_table[ 4 ] = { 8, 10, 12, 16 diff --git a/drivers/opus/silk/tuning_parameters.h b/thirdparty/opus/silk/tuning_parameters.h similarity index 100% rename from drivers/opus/silk/tuning_parameters.h rename to thirdparty/opus/silk/tuning_parameters.h diff --git a/drivers/opus/silk/typedef.h b/thirdparty/opus/silk/typedef.h similarity index 97% rename from drivers/opus/silk/typedef.h rename to thirdparty/opus/silk/typedef.h index 3e193b4a450..97b7e709be5 100644 --- a/drivers/opus/silk/typedef.h +++ b/thirdparty/opus/silk/typedef.h @@ -28,10 +28,10 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_TYPEDEF_H #define SILK_TYPEDEF_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT # include # define silk_float float # define silk_float_MAX FLT_MAX diff --git a/drivers/opus/silk/x86/NSQ_del_dec_sse.c b/thirdparty/opus/silk/x86/NSQ_del_dec_sse.c similarity index 99% rename from drivers/opus/silk/x86/NSQ_del_dec_sse.c rename to thirdparty/opus/silk/x86/NSQ_del_dec_sse.c index e9afbba01b0..21d4a8bc1e9 100644 --- a/drivers/opus/silk/x86/NSQ_del_dec_sse.c +++ b/thirdparty/opus/silk/x86/NSQ_del_dec_sse.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/x86/x86cpu.h" +#include "main.h" +#include "celt/x86/x86cpu.h" -#include "opus/celt/stack_alloc.h" +#include "stack_alloc.h" typedef struct { opus_int32 sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LENGTH ]; diff --git a/drivers/opus/silk/x86/NSQ_sse.c b/thirdparty/opus/silk/x86/NSQ_sse.c similarity index 99% rename from drivers/opus/silk/x86/NSQ_sse.c rename to thirdparty/opus/silk/x86/NSQ_sse.c index ac0fa1ab046..72f34fd6fc4 100644 --- a/drivers/opus/silk/x86/NSQ_sse.c +++ b/thirdparty/opus/silk/x86/NSQ_sse.c @@ -24,14 +24,17 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/x86/x86cpu.h" -#include "opus/celt/stack_alloc.h" +#include "main.h" +#include "celt/x86/x86cpu.h" +#include "stack_alloc.h" static OPUS_INLINE void silk_nsq_scale_states_sse4_1( const silk_encoder_state *psEncC, /* I Encoder State */ diff --git a/drivers/opus/silk/x86/SigProc_FIX_sse.h b/thirdparty/opus/silk/x86/SigProc_FIX_sse.h similarity index 99% rename from drivers/opus/silk/x86/SigProc_FIX_sse.h rename to thirdparty/opus/silk/x86/SigProc_FIX_sse.h index 67ab30fd786..61efa8da415 100644 --- a/drivers/opus/silk/x86/SigProc_FIX_sse.h +++ b/thirdparty/opus/silk/x86/SigProc_FIX_sse.h @@ -27,7 +27,10 @@ #ifndef SIGPROC_FIX_SSE_H #define SIGPROC_FIX_SSE_H -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #if defined(OPUS_X86_MAY_HAVE_SSE4_1) void silk_burg_modified_sse4_1( diff --git a/drivers/opus/silk/x86/VAD_sse.c b/thirdparty/opus/silk/x86/VAD_sse.c similarity index 99% rename from drivers/opus/silk/x86/VAD_sse.c rename to thirdparty/opus/silk/x86/VAD_sse.c index 5db2c86aa95..4e90f4410d8 100644 --- a/drivers/opus/silk/x86/VAD_sse.c +++ b/thirdparty/opus/silk/x86/VAD_sse.c @@ -24,14 +24,17 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#include "main.h" +#include "stack_alloc.h" /* Weighting factors for tilt measure */ static const opus_int32 tiltWeights[ VAD_N_BANDS ] = { 30000, 6000, -12000, -12000 }; diff --git a/drivers/opus/silk/x86/VQ_WMat_EC_sse.c b/thirdparty/opus/silk/x86/VQ_WMat_EC_sse.c similarity index 98% rename from drivers/opus/silk/x86/VQ_WMat_EC_sse.c rename to thirdparty/opus/silk/x86/VQ_WMat_EC_sse.c index 3afa42a6e56..74d6c6d0ec6 100644 --- a/drivers/opus/silk/x86/VQ_WMat_EC_sse.c +++ b/thirdparty/opus/silk/x86/VQ_WMat_EC_sse.c @@ -24,13 +24,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/x86/x86cpu.h" +#include "main.h" +#include "celt/x86/x86cpu.h" /* Entropy constrained matrix-weighted VQ, hard-coded to 5-element vectors, for a single input data vector */ void silk_VQ_WMat_EC_sse4_1( diff --git a/drivers/opus/silk/x86/main_sse.h b/thirdparty/opus/silk/x86/main_sse.h similarity index 99% rename from drivers/opus/silk/x86/main_sse.h rename to thirdparty/opus/silk/x86/main_sse.h index 6fef1b358ba..afd5ec26e1e 100644 --- a/drivers/opus/silk/x86/main_sse.h +++ b/thirdparty/opus/silk/x86/main_sse.h @@ -27,7 +27,10 @@ #ifndef MAIN_SSE_H #define MAIN_SSE_H -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif # if defined(OPUS_X86_MAY_HAVE_SSE4_1) diff --git a/drivers/opus/silk/x86/x86_silk_map.c b/thirdparty/opus/silk/x86/x86_silk_map.c similarity index 97% rename from drivers/opus/silk/x86/x86_silk_map.c rename to thirdparty/opus/silk/x86/x86_silk_map.c index c3502114d1f..818841f2c19 100644 --- a/drivers/opus/silk/x86/x86_silk_map.c +++ b/thirdparty/opus/silk/x86/x86_silk_map.c @@ -24,19 +24,22 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/x86/x86cpu.h" -#include "opus/silk/structs.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/pitch.h" -#include "opus/silk/main.h" +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +#include "celt/x86/x86cpu.h" +#include "structs.h" +#include "SigProc_FIX.h" +#include "pitch.h" +#include "main.h" #if !defined(OPUS_X86_PRESUME_SSE4_1) #if defined(FIXED_POINT) -#include "opus/silk/fixed/main_FIX.h" +#include "fixed/main_FIX.h" opus_int64 (*const SILK_INNER_PROD16_ALIGNED_64_IMPL[ OPUS_ARCHMASK + 1 ] )( const opus_int16 *inVec1, diff --git a/drivers/opus/stream.c b/thirdparty/opus/stream.c similarity index 99% rename from drivers/opus/stream.c rename to thirdparty/opus/stream.c index 2ac12642ddd..0238a6b31bd 100644 --- a/drivers/opus/stream.c +++ b/thirdparty/opus/stream.c @@ -14,9 +14,11 @@ last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $ ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #include #include #include diff --git a/drivers/opus/tansig_table.h b/thirdparty/opus/tansig_table.h similarity index 100% rename from drivers/opus/tansig_table.h rename to thirdparty/opus/tansig_table.h diff --git a/drivers/opus/wincerts.c b/thirdparty/opus/wincerts.c similarity index 98% rename from drivers/opus/wincerts.c rename to thirdparty/opus/wincerts.c index 1a5b634063c..b0e35aa352f 100644 --- a/drivers/opus/wincerts.c +++ b/thirdparty/opus/wincerts.c @@ -15,9 +15,12 @@ action, so I'm giving up and re-implementing it locally. [1] */ -#include "opus/opus_config.h" -#include "opus/internal.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "internal.h" #if defined(OP_ENABLE_HTTP)&&defined(_WIN32) /*You must include windows.h before wincrypt.h and x509.h.*/ # define WIN32_LEAN_AND_MEAN diff --git a/drivers/opus/winerrno.h b/thirdparty/opus/winerrno.h similarity index 100% rename from drivers/opus/winerrno.h rename to thirdparty/opus/winerrno.h diff --git a/thirdparty/speex/COPYING b/thirdparty/speex/COPYING new file mode 100644 index 00000000000..de6fbe2c915 --- /dev/null +++ b/thirdparty/speex/COPYING @@ -0,0 +1,35 @@ +Copyright 2002-2008 Xiph.org Foundation +Copyright 2002-2008 Jean-Marc Valin +Copyright 2005-2007 Analog Devices Inc. +Copyright 2005-2008 Commonwealth Scientific and Industrial Research + Organisation (CSIRO) +Copyright 1993, 2002, 2006 David Rowe +Copyright 2003 EpicGames +Copyright 1992-1994 Jutta Degener, Carsten Bormann + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/drivers/speex/_kiss_fft_guts.h b/thirdparty/speex/_kiss_fft_guts.h similarity index 100% rename from drivers/speex/_kiss_fft_guts.h rename to thirdparty/speex/_kiss_fft_guts.h diff --git a/drivers/speex/arch.h b/thirdparty/speex/arch.h similarity index 100% rename from drivers/speex/arch.h rename to thirdparty/speex/arch.h diff --git a/drivers/speex/bits.c b/thirdparty/speex/bits.c similarity index 100% rename from drivers/speex/bits.c rename to thirdparty/speex/bits.c diff --git a/drivers/speex/buffer.c b/thirdparty/speex/buffer.c similarity index 100% rename from drivers/speex/buffer.c rename to thirdparty/speex/buffer.c diff --git a/drivers/speex/cb_search.c b/thirdparty/speex/cb_search.c similarity index 100% rename from drivers/speex/cb_search.c rename to thirdparty/speex/cb_search.c diff --git a/drivers/speex/cb_search.h b/thirdparty/speex/cb_search.h similarity index 100% rename from drivers/speex/cb_search.h rename to thirdparty/speex/cb_search.h diff --git a/drivers/speex/cb_search_arm4.h b/thirdparty/speex/cb_search_arm4.h similarity index 100% rename from drivers/speex/cb_search_arm4.h rename to thirdparty/speex/cb_search_arm4.h diff --git a/drivers/speex/cb_search_bfin.h b/thirdparty/speex/cb_search_bfin.h similarity index 100% rename from drivers/speex/cb_search_bfin.h rename to thirdparty/speex/cb_search_bfin.h diff --git a/drivers/speex/cb_search_sse.h b/thirdparty/speex/cb_search_sse.h similarity index 100% rename from drivers/speex/cb_search_sse.h rename to thirdparty/speex/cb_search_sse.h diff --git a/drivers/speex/config.h b/thirdparty/speex/config.h similarity index 100% rename from drivers/speex/config.h rename to thirdparty/speex/config.h diff --git a/drivers/speex/echo_diagnostic.m b/thirdparty/speex/echo_diagnostic.m similarity index 100% rename from drivers/speex/echo_diagnostic.m rename to thirdparty/speex/echo_diagnostic.m diff --git a/drivers/speex/exc_10_16_table.c b/thirdparty/speex/exc_10_16_table.c similarity index 100% rename from drivers/speex/exc_10_16_table.c rename to thirdparty/speex/exc_10_16_table.c diff --git a/drivers/speex/exc_10_32_table.c b/thirdparty/speex/exc_10_32_table.c similarity index 100% rename from drivers/speex/exc_10_32_table.c rename to thirdparty/speex/exc_10_32_table.c diff --git a/drivers/speex/exc_20_32_table.c b/thirdparty/speex/exc_20_32_table.c similarity index 100% rename from drivers/speex/exc_20_32_table.c rename to thirdparty/speex/exc_20_32_table.c diff --git a/drivers/speex/exc_5_256_table.c b/thirdparty/speex/exc_5_256_table.c similarity index 100% rename from drivers/speex/exc_5_256_table.c rename to thirdparty/speex/exc_5_256_table.c diff --git a/drivers/speex/exc_5_64_table.c b/thirdparty/speex/exc_5_64_table.c similarity index 100% rename from drivers/speex/exc_5_64_table.c rename to thirdparty/speex/exc_5_64_table.c diff --git a/drivers/speex/exc_8_128_table.c b/thirdparty/speex/exc_8_128_table.c similarity index 100% rename from drivers/speex/exc_8_128_table.c rename to thirdparty/speex/exc_8_128_table.c diff --git a/drivers/speex/fftwrap.c b/thirdparty/speex/fftwrap.c similarity index 100% rename from drivers/speex/fftwrap.c rename to thirdparty/speex/fftwrap.c diff --git a/drivers/speex/fftwrap.h b/thirdparty/speex/fftwrap.h similarity index 100% rename from drivers/speex/fftwrap.h rename to thirdparty/speex/fftwrap.h diff --git a/drivers/speex/filterbank.c b/thirdparty/speex/filterbank.c similarity index 100% rename from drivers/speex/filterbank.c rename to thirdparty/speex/filterbank.c diff --git a/drivers/speex/filterbank.h b/thirdparty/speex/filterbank.h similarity index 100% rename from drivers/speex/filterbank.h rename to thirdparty/speex/filterbank.h diff --git a/drivers/speex/filters.c b/thirdparty/speex/filters.c similarity index 100% rename from drivers/speex/filters.c rename to thirdparty/speex/filters.c diff --git a/drivers/speex/filters.h b/thirdparty/speex/filters.h similarity index 100% rename from drivers/speex/filters.h rename to thirdparty/speex/filters.h diff --git a/drivers/speex/filters_arm4.h b/thirdparty/speex/filters_arm4.h similarity index 100% rename from drivers/speex/filters_arm4.h rename to thirdparty/speex/filters_arm4.h diff --git a/drivers/speex/filters_bfin.h b/thirdparty/speex/filters_bfin.h similarity index 100% rename from drivers/speex/filters_bfin.h rename to thirdparty/speex/filters_bfin.h diff --git a/drivers/speex/filters_sse.h b/thirdparty/speex/filters_sse.h similarity index 100% rename from drivers/speex/filters_sse.h rename to thirdparty/speex/filters_sse.h diff --git a/drivers/speex/fixed_arm4.h b/thirdparty/speex/fixed_arm4.h similarity index 100% rename from drivers/speex/fixed_arm4.h rename to thirdparty/speex/fixed_arm4.h diff --git a/drivers/speex/fixed_arm5e.h b/thirdparty/speex/fixed_arm5e.h similarity index 100% rename from drivers/speex/fixed_arm5e.h rename to thirdparty/speex/fixed_arm5e.h diff --git a/drivers/speex/fixed_bfin.h b/thirdparty/speex/fixed_bfin.h similarity index 100% rename from drivers/speex/fixed_bfin.h rename to thirdparty/speex/fixed_bfin.h diff --git a/drivers/speex/fixed_debug.h b/thirdparty/speex/fixed_debug.h similarity index 100% rename from drivers/speex/fixed_debug.h rename to thirdparty/speex/fixed_debug.h diff --git a/drivers/speex/fixed_generic.h b/thirdparty/speex/fixed_generic.h similarity index 100% rename from drivers/speex/fixed_generic.h rename to thirdparty/speex/fixed_generic.h diff --git a/drivers/speex/gain_table.c b/thirdparty/speex/gain_table.c similarity index 100% rename from drivers/speex/gain_table.c rename to thirdparty/speex/gain_table.c diff --git a/drivers/speex/gain_table_lbr.c b/thirdparty/speex/gain_table_lbr.c similarity index 100% rename from drivers/speex/gain_table_lbr.c rename to thirdparty/speex/gain_table_lbr.c diff --git a/drivers/speex/hexc_10_32_table.c b/thirdparty/speex/hexc_10_32_table.c similarity index 100% rename from drivers/speex/hexc_10_32_table.c rename to thirdparty/speex/hexc_10_32_table.c diff --git a/drivers/speex/hexc_table.c b/thirdparty/speex/hexc_table.c similarity index 100% rename from drivers/speex/hexc_table.c rename to thirdparty/speex/hexc_table.c diff --git a/drivers/speex/high_lsp_tables.c b/thirdparty/speex/high_lsp_tables.c similarity index 100% rename from drivers/speex/high_lsp_tables.c rename to thirdparty/speex/high_lsp_tables.c diff --git a/drivers/speex/jitter.c b/thirdparty/speex/jitter.c similarity index 100% rename from drivers/speex/jitter.c rename to thirdparty/speex/jitter.c diff --git a/drivers/speex/kiss_fft.c b/thirdparty/speex/kiss_fft.c similarity index 100% rename from drivers/speex/kiss_fft.c rename to thirdparty/speex/kiss_fft.c diff --git a/drivers/speex/kiss_fft.h b/thirdparty/speex/kiss_fft.h similarity index 100% rename from drivers/speex/kiss_fft.h rename to thirdparty/speex/kiss_fft.h diff --git a/drivers/speex/kiss_fftr.c b/thirdparty/speex/kiss_fftr.c similarity index 100% rename from drivers/speex/kiss_fftr.c rename to thirdparty/speex/kiss_fftr.c diff --git a/drivers/speex/kiss_fftr.h b/thirdparty/speex/kiss_fftr.h similarity index 100% rename from drivers/speex/kiss_fftr.h rename to thirdparty/speex/kiss_fftr.h diff --git a/drivers/speex/lpc.c b/thirdparty/speex/lpc.c similarity index 100% rename from drivers/speex/lpc.c rename to thirdparty/speex/lpc.c diff --git a/drivers/speex/lpc.h b/thirdparty/speex/lpc.h similarity index 100% rename from drivers/speex/lpc.h rename to thirdparty/speex/lpc.h diff --git a/drivers/speex/lpc_bfin.h b/thirdparty/speex/lpc_bfin.h similarity index 100% rename from drivers/speex/lpc_bfin.h rename to thirdparty/speex/lpc_bfin.h diff --git a/drivers/speex/lsp.c b/thirdparty/speex/lsp.c similarity index 100% rename from drivers/speex/lsp.c rename to thirdparty/speex/lsp.c diff --git a/drivers/speex/lsp.h b/thirdparty/speex/lsp.h similarity index 100% rename from drivers/speex/lsp.h rename to thirdparty/speex/lsp.h diff --git a/drivers/speex/lsp_bfin.h b/thirdparty/speex/lsp_bfin.h similarity index 100% rename from drivers/speex/lsp_bfin.h rename to thirdparty/speex/lsp_bfin.h diff --git a/drivers/speex/lsp_tables_nb.c b/thirdparty/speex/lsp_tables_nb.c similarity index 100% rename from drivers/speex/lsp_tables_nb.c rename to thirdparty/speex/lsp_tables_nb.c diff --git a/drivers/speex/ltp.c b/thirdparty/speex/ltp.c similarity index 100% rename from drivers/speex/ltp.c rename to thirdparty/speex/ltp.c diff --git a/drivers/speex/ltp.h b/thirdparty/speex/ltp.h similarity index 100% rename from drivers/speex/ltp.h rename to thirdparty/speex/ltp.h diff --git a/drivers/speex/ltp_arm4.h b/thirdparty/speex/ltp_arm4.h similarity index 100% rename from drivers/speex/ltp_arm4.h rename to thirdparty/speex/ltp_arm4.h diff --git a/drivers/speex/ltp_bfin.h b/thirdparty/speex/ltp_bfin.h similarity index 100% rename from drivers/speex/ltp_bfin.h rename to thirdparty/speex/ltp_bfin.h diff --git a/drivers/speex/ltp_sse.h b/thirdparty/speex/ltp_sse.h similarity index 100% rename from drivers/speex/ltp_sse.h rename to thirdparty/speex/ltp_sse.h diff --git a/drivers/speex/math_approx.h b/thirdparty/speex/math_approx.h similarity index 100% rename from drivers/speex/math_approx.h rename to thirdparty/speex/math_approx.h diff --git a/drivers/speex/mdf.c b/thirdparty/speex/mdf.c similarity index 100% rename from drivers/speex/mdf.c rename to thirdparty/speex/mdf.c diff --git a/drivers/speex/misc_bfin.h b/thirdparty/speex/misc_bfin.h similarity index 100% rename from drivers/speex/misc_bfin.h rename to thirdparty/speex/misc_bfin.h diff --git a/drivers/speex/modes.c b/thirdparty/speex/modes.c similarity index 100% rename from drivers/speex/modes.c rename to thirdparty/speex/modes.c diff --git a/drivers/speex/modes.h b/thirdparty/speex/modes.h similarity index 100% rename from drivers/speex/modes.h rename to thirdparty/speex/modes.h diff --git a/drivers/speex/modes_wb.c b/thirdparty/speex/modes_wb.c similarity index 100% rename from drivers/speex/modes_wb.c rename to thirdparty/speex/modes_wb.c diff --git a/drivers/speex/nb_celp.c b/thirdparty/speex/nb_celp.c similarity index 100% rename from drivers/speex/nb_celp.c rename to thirdparty/speex/nb_celp.c diff --git a/drivers/speex/nb_celp.h b/thirdparty/speex/nb_celp.h similarity index 100% rename from drivers/speex/nb_celp.h rename to thirdparty/speex/nb_celp.h diff --git a/drivers/speex/os_support.h b/thirdparty/speex/os_support.h similarity index 100% rename from drivers/speex/os_support.h rename to thirdparty/speex/os_support.h diff --git a/drivers/speex/preprocess.c b/thirdparty/speex/preprocess.c similarity index 100% rename from drivers/speex/preprocess.c rename to thirdparty/speex/preprocess.c diff --git a/drivers/speex/pseudofloat.h b/thirdparty/speex/pseudofloat.h similarity index 100% rename from drivers/speex/pseudofloat.h rename to thirdparty/speex/pseudofloat.h diff --git a/drivers/speex/quant_lsp.c b/thirdparty/speex/quant_lsp.c similarity index 100% rename from drivers/speex/quant_lsp.c rename to thirdparty/speex/quant_lsp.c diff --git a/drivers/speex/quant_lsp.h b/thirdparty/speex/quant_lsp.h similarity index 100% rename from drivers/speex/quant_lsp.h rename to thirdparty/speex/quant_lsp.h diff --git a/drivers/speex/quant_lsp_bfin.h b/thirdparty/speex/quant_lsp_bfin.h similarity index 100% rename from drivers/speex/quant_lsp_bfin.h rename to thirdparty/speex/quant_lsp_bfin.h diff --git a/drivers/speex/resample.c b/thirdparty/speex/resample.c similarity index 100% rename from drivers/speex/resample.c rename to thirdparty/speex/resample.c diff --git a/drivers/speex/resample_sse.h b/thirdparty/speex/resample_sse.h similarity index 100% rename from drivers/speex/resample_sse.h rename to thirdparty/speex/resample_sse.h diff --git a/drivers/speex/sb_celp.c b/thirdparty/speex/sb_celp.c similarity index 100% rename from drivers/speex/sb_celp.c rename to thirdparty/speex/sb_celp.c diff --git a/drivers/speex/sb_celp.h b/thirdparty/speex/sb_celp.h similarity index 100% rename from drivers/speex/sb_celp.h rename to thirdparty/speex/sb_celp.h diff --git a/drivers/speex/scal.c b/thirdparty/speex/scal.c similarity index 100% rename from drivers/speex/scal.c rename to thirdparty/speex/scal.c diff --git a/drivers/speex/smallft.c b/thirdparty/speex/smallft.c similarity index 100% rename from drivers/speex/smallft.c rename to thirdparty/speex/smallft.c diff --git a/drivers/speex/smallft.h b/thirdparty/speex/smallft.h similarity index 100% rename from drivers/speex/smallft.h rename to thirdparty/speex/smallft.h diff --git a/drivers/speex/speex.c b/thirdparty/speex/speex.c similarity index 100% rename from drivers/speex/speex.c rename to thirdparty/speex/speex.c diff --git a/drivers/speex/speex.h b/thirdparty/speex/speex/speex.h similarity index 100% rename from drivers/speex/speex.h rename to thirdparty/speex/speex/speex.h diff --git a/drivers/speex/speex_bits.h b/thirdparty/speex/speex/speex_bits.h similarity index 100% rename from drivers/speex/speex_bits.h rename to thirdparty/speex/speex/speex_bits.h diff --git a/drivers/speex/speex_buffer.h b/thirdparty/speex/speex/speex_buffer.h similarity index 100% rename from drivers/speex/speex_buffer.h rename to thirdparty/speex/speex/speex_buffer.h diff --git a/drivers/speex/speex_callbacks.h b/thirdparty/speex/speex/speex_callbacks.h similarity index 100% rename from drivers/speex/speex_callbacks.h rename to thirdparty/speex/speex/speex_callbacks.h diff --git a/drivers/speex/speex_config_types.h b/thirdparty/speex/speex/speex_config_types.h similarity index 100% rename from drivers/speex/speex_config_types.h rename to thirdparty/speex/speex/speex_config_types.h diff --git a/drivers/speex/speex_echo.h b/thirdparty/speex/speex/speex_echo.h similarity index 100% rename from drivers/speex/speex_echo.h rename to thirdparty/speex/speex/speex_echo.h diff --git a/drivers/speex/speex_header.h b/thirdparty/speex/speex/speex_header.h similarity index 100% rename from drivers/speex/speex_header.h rename to thirdparty/speex/speex/speex_header.h diff --git a/drivers/speex/speex_jitter.h b/thirdparty/speex/speex/speex_jitter.h similarity index 100% rename from drivers/speex/speex_jitter.h rename to thirdparty/speex/speex/speex_jitter.h diff --git a/drivers/speex/speex_preprocess.h b/thirdparty/speex/speex/speex_preprocess.h similarity index 100% rename from drivers/speex/speex_preprocess.h rename to thirdparty/speex/speex/speex_preprocess.h diff --git a/drivers/speex/speex_resampler.h b/thirdparty/speex/speex/speex_resampler.h similarity index 100% rename from drivers/speex/speex_resampler.h rename to thirdparty/speex/speex/speex_resampler.h diff --git a/drivers/speex/speex_stereo.h b/thirdparty/speex/speex/speex_stereo.h similarity index 100% rename from drivers/speex/speex_stereo.h rename to thirdparty/speex/speex/speex_stereo.h diff --git a/drivers/speex/speex_types.h b/thirdparty/speex/speex/speex_types.h similarity index 100% rename from drivers/speex/speex_types.h rename to thirdparty/speex/speex/speex_types.h diff --git a/drivers/speex/speex_bind.cpp b/thirdparty/speex/speex_bind.cpp similarity index 100% rename from drivers/speex/speex_bind.cpp rename to thirdparty/speex/speex_bind.cpp diff --git a/drivers/speex/speex_bind.h b/thirdparty/speex/speex_bind.h similarity index 100% rename from drivers/speex/speex_bind.h rename to thirdparty/speex/speex_bind.h diff --git a/drivers/speex/speex_callbacks.c b/thirdparty/speex/speex_callbacks.c similarity index 100% rename from drivers/speex/speex_callbacks.c rename to thirdparty/speex/speex_callbacks.c diff --git a/drivers/speex/speex_header.c b/thirdparty/speex/speex_header.c similarity index 100% rename from drivers/speex/speex_header.c rename to thirdparty/speex/speex_header.c diff --git a/drivers/speex/stack_alloc.h b/thirdparty/speex/stack_alloc.h similarity index 100% rename from drivers/speex/stack_alloc.h rename to thirdparty/speex/stack_alloc.h diff --git a/drivers/speex/stereo.c b/thirdparty/speex/stereo.c similarity index 100% rename from drivers/speex/stereo.c rename to thirdparty/speex/stereo.c diff --git a/drivers/speex/vbr.c b/thirdparty/speex/vbr.c similarity index 100% rename from drivers/speex/vbr.c rename to thirdparty/speex/vbr.c diff --git a/drivers/speex/vbr.h b/thirdparty/speex/vbr.h similarity index 100% rename from drivers/speex/vbr.h rename to thirdparty/speex/vbr.h diff --git a/drivers/speex/vorbis_psy.h b/thirdparty/speex/vorbis_psy.h similarity index 100% rename from drivers/speex/vorbis_psy.h rename to thirdparty/speex/vorbis_psy.h diff --git a/drivers/speex/vq.c b/thirdparty/speex/vq.c similarity index 100% rename from drivers/speex/vq.c rename to thirdparty/speex/vq.c diff --git a/drivers/speex/vq.h b/thirdparty/speex/vq.h similarity index 100% rename from drivers/speex/vq.h rename to thirdparty/speex/vq.h diff --git a/drivers/speex/vq_arm4.h b/thirdparty/speex/vq_arm4.h similarity index 100% rename from drivers/speex/vq_arm4.h rename to thirdparty/speex/vq_arm4.h diff --git a/drivers/speex/vq_bfin.h b/thirdparty/speex/vq_bfin.h similarity index 100% rename from drivers/speex/vq_bfin.h rename to thirdparty/speex/vq_bfin.h diff --git a/drivers/speex/vq_sse.h b/thirdparty/speex/vq_sse.h similarity index 100% rename from drivers/speex/vq_sse.h rename to thirdparty/speex/vq_sse.h diff --git a/drivers/speex/window.c b/thirdparty/speex/window.c similarity index 100% rename from drivers/speex/window.c rename to thirdparty/speex/window.c