summaryrefslogtreecommitdiff
path: root/modules/opus
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-02 19:12:25 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-02 19:12:25 -0300
commitce26eb74bca48f16e9a34b4eb1c34e50dfc5daae (patch)
tree5f9c387037d0142d40f7275575436483dc0a7237 /modules/opus
parentab4126f51061277e87b41c48b40e7b54942d4eca (diff)
parent45c5c89de961357a7042d9e1f063e288d7a510cf (diff)
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'modules/opus')
-rw-r--r--modules/opus/SCsub395
-rw-r--r--modules/opus/audio_stream_opus.cpp2
-rw-r--r--modules/opus/audio_stream_opus.h4
-rw-r--r--modules/opus/config.py5
-rw-r--r--modules/opus/register_types.cpp2
-rw-r--r--modules/opus/register_types.h2
6 files changed, 206 insertions, 204 deletions
diff --git a/modules/opus/SCsub b/modules/opus/SCsub
index 603f5a48c4..4d3053c7ec 100644
--- a/modules/opus/SCsub
+++ b/modules/opus/SCsub
@@ -6,210 +6,211 @@ Import('env_modules')
env_opus = env_modules.Clone()
# Thirdparty source files
-if (env["opus"] != "system"): # builtin
- thirdparty_dir = "#thirdparty/opus/"
+if (env['builtin_opus'] != 'no'):
+ thirdparty_dir = "#thirdparty/opus/"
- thirdparty_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"
- ]
+ thirdparty_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 = []
+ opus_sources_silk = []
- if("opus_fixed_point" in env and env.opus_fixed_point=="yes"):
- env_opus.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"
- ]
+ if("opus_fixed_point" in env and env.opus_fixed_point == "yes"):
+ env_opus.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_sources = [thirdparty_dir + file for file in thirdparty_sources + opus_sources_silk]
+ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources + opus_sources_silk]
- env_opus.add_source_files(env.modules_sources, thirdparty_sources)
- env_opus.Append(CFLAGS=["-DHAVE_CONFIG_H"])
+ env_opus.add_source_files(env.modules_sources, thirdparty_sources)
+ env_opus.Append(CFLAGS=["-DHAVE_CONFIG_H"])
- thirdparty_include_paths = [
- "",
- "celt",
- "silk",
- "silk/fixed",
- "silk/float",
- ]
- env_opus.Append(CPPPATH = [thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
+ thirdparty_include_paths = [
+ "",
+ "celt",
+ "opus",
+ "silk",
+ "silk/fixed",
+ "silk/float",
+ ]
+ env_opus.Append(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
- # also requires libogg
- if (env["libogg"] != "system"): # builtin
- env_opus.Append(CPPPATH = ["#thirdparty/libogg"])
+ # also requires libogg
+ if (env['builtin_libogg'] != 'no'):
+ env_opus.Append(CPPPATH=["#thirdparty/libogg"])
# Module files
env_opus.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp
index ab53fee0c9..f438dde689 100644
--- a/modules/opus/audio_stream_opus.cpp
+++ b/modules/opus/audio_stream_opus.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Author: George Marques <george@gmarqu.es> */
/* */
diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h
index 4da66fe167..68e15f188b 100644
--- a/modules/opus/audio_stream_opus.h
+++ b/modules/opus/audio_stream_opus.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Author: George Marques <george@gmarqu.es> */
/* */
@@ -36,7 +36,7 @@
#include "os/file_access.h"
#include "scene/resources/audio_stream.h"
-#include <opusfile.h>
+#include <opus/opusfile.h>
class AudioStreamPlaybackOpus : public AudioStreamPlayback {
diff --git a/modules/opus/config.py b/modules/opus/config.py
index 368e97e152..fb920482f5 100644
--- a/modules/opus/config.py
+++ b/modules/opus/config.py
@@ -1,6 +1,7 @@
def can_build(platform):
- return True
+ return True
+
def configure(env):
- pass
+ pass
diff --git a/modules/opus/register_types.cpp b/modules/opus/register_types.cpp
index a4d71a52c7..9d9a707994 100644
--- a/modules/opus/register_types.cpp
+++ b/modules/opus/register_types.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 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 */
diff --git a/modules/opus/register_types.h b/modules/opus/register_types.h
index f4386c373a..09181b4f03 100644
--- a/modules/opus/register_types.h
+++ b/modules/opus/register_types.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 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 */