Home | History | Annotate | Download | only in opus
      1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 {
      6   'variables': {
      7     'conditions': [
      8       ['OS=="android"', {
      9         'use_opus_fixed_point%': 1,
     10       }, {
     11         'use_opus_fixed_point%': 0,
     12       }],
     13     ],
     14   },
     15   'targets': [
     16     {
     17       'target_name': 'opus',
     18       'type': 'static_library',
     19       'defines': [
     20         'OPUS_BUILD',
     21         'OPUS_EXPORT=',
     22       ],
     23       'include_dirs': [
     24         'src/celt',
     25         'src/include',
     26         'src/silk',
     27       ],
     28       'direct_dependent_settings': {
     29         'include_dirs': [
     30           'src/include',
     31         ],
     32       },
     33       'sources': [
     34         'src/celt/_kiss_fft_guts.h',
     35         'src/celt/arch.h',
     36         'src/celt/bands.c',
     37         'src/celt/bands.h',
     38         'src/celt/celt.c',
     39         'src/celt/celt.h',
     40         'src/celt/celt_decoder.c',
     41         'src/celt/celt_encoder.c',
     42         'src/celt/celt_lpc.c',
     43         'src/celt/celt_lpc.h',
     44         'src/celt/cpu_support.h',
     45         'src/celt/cwrs.c',
     46         'src/celt/cwrs.h',
     47         'src/celt/ecintrin.h',
     48         'src/celt/entcode.c',
     49         'src/celt/entcode.h',
     50         'src/celt/entdec.c',
     51         'src/celt/entdec.h',
     52         'src/celt/entenc.c',
     53         'src/celt/entenc.h',
     54         'src/celt/fixed_debug.h',
     55         'src/celt/fixed_generic.h',
     56         'src/celt/float_cast.h',
     57         'src/celt/kiss_fft.c',
     58         'src/celt/kiss_fft.h',
     59         'src/celt/laplace.c',
     60         'src/celt/laplace.h',
     61         'src/celt/mathops.c',
     62         'src/celt/mathops.h',
     63         'src/celt/mdct.c',
     64         'src/celt/mdct.h',
     65         'src/celt/mfrngcod.h',
     66         'src/celt/modes.c',
     67         'src/celt/modes.h',
     68         'src/celt/os_support.h',
     69         'src/celt/pitch.c',
     70         'src/celt/pitch.h',
     71         'src/celt/quant_bands.c',
     72         'src/celt/quant_bands.h',
     73         'src/celt/rate.c',
     74         'src/celt/rate.h',
     75         'src/celt/stack_alloc.h',
     76         'src/celt/static_modes_fixed.h',
     77         'src/celt/static_modes_float.h',
     78         'src/celt/vq.c',
     79         'src/celt/vq.h',
     80         'src/include/opus.h',
     81         'src/include/opus_custom.h',
     82         'src/include/opus_defines.h',
     83         'src/include/opus_multistream.h',
     84         'src/include/opus_types.h',
     85         'src/silk/A2NLSF.c',
     86         'src/silk/ana_filt_bank_1.c',
     87         'src/silk/API.h',
     88         'src/silk/biquad_alt.c',
     89         'src/silk/bwexpander.c',
     90         'src/silk/bwexpander_32.c',
     91         'src/silk/check_control_input.c',
     92         'src/silk/CNG.c',
     93         'src/silk/code_signs.c',
     94         'src/silk/control.h',
     95         'src/silk/control_audio_bandwidth.c',
     96         'src/silk/control_codec.c',
     97         'src/silk/control_SNR.c',
     98         'src/silk/debug.c',
     99         'src/silk/debug.h',
    100         'src/silk/dec_API.c',
    101         'src/silk/decode_core.c',
    102         'src/silk/decode_frame.c',
    103         'src/silk/decode_indices.c',
    104         'src/silk/decode_parameters.c',
    105         'src/silk/decode_pitch.c',
    106         'src/silk/decode_pulses.c',
    107         'src/silk/decoder_set_fs.c',
    108         'src/silk/define.h',
    109         'src/silk/enc_API.c',
    110         'src/silk/encode_indices.c',
    111         'src/silk/encode_pulses.c',
    112         'src/silk/errors.h',
    113         'src/silk/fixed/apply_sine_window_FIX.c',
    114         'src/silk/fixed/autocorr_FIX.c',
    115         'src/silk/fixed/burg_modified_FIX.c',
    116         'src/silk/fixed/corrMatrix_FIX.c',
    117         'src/silk/fixed/encode_frame_FIX.c',
    118         'src/silk/fixed/find_LPC_FIX.c',
    119         'src/silk/fixed/find_LTP_FIX.c',
    120         'src/silk/fixed/find_pitch_lags_FIX.c',
    121         'src/silk/fixed/find_pred_coefs_FIX.c',
    122         'src/silk/fixed/k2a_FIX.c',
    123         'src/silk/fixed/k2a_Q16_FIX.c',
    124         'src/silk/fixed/LTP_analysis_filter_FIX.c',
    125         'src/silk/fixed/LTP_scale_ctrl_FIX.c',
    126         'src/silk/fixed/main_FIX.h',
    127         'src/silk/fixed/noise_shape_analysis_FIX.c',
    128         'src/silk/fixed/pitch_analysis_core_FIX.c',
    129         'src/silk/fixed/prefilter_FIX.c',
    130         'src/silk/fixed/process_gains_FIX.c',
    131         'src/silk/fixed/regularize_correlations_FIX.c',
    132         'src/silk/fixed/residual_energy16_FIX.c',
    133         'src/silk/fixed/residual_energy_FIX.c',
    134         'src/silk/fixed/schur64_FIX.c',
    135         'src/silk/fixed/schur_FIX.c',
    136         'src/silk/fixed/solve_LS_FIX.c',
    137         'src/silk/fixed/structs_FIX.h',
    138         'src/silk/fixed/vector_ops_FIX.c',
    139         'src/silk/fixed/warped_autocorrelation_FIX.c',
    140         'src/silk/fixed/structs_FIX.h',
    141         'src/silk/float/apply_sine_window_FLP.c',
    142         'src/silk/float/autocorrelation_FLP.c',
    143         'src/silk/float/burg_modified_FLP.c',
    144         'src/silk/float/bwexpander_FLP.c',
    145         'src/silk/float/corrMatrix_FLP.c',
    146         'src/silk/float/encode_frame_FLP.c',
    147         'src/silk/float/energy_FLP.c',
    148         'src/silk/float/find_LPC_FLP.c',
    149         'src/silk/float/find_LTP_FLP.c',
    150         'src/silk/float/find_pitch_lags_FLP.c',
    151         'src/silk/float/find_pred_coefs_FLP.c',
    152         'src/silk/float/inner_product_FLP.c',
    153         'src/silk/float/k2a_FLP.c',
    154         'src/silk/float/levinsondurbin_FLP.c',
    155         'src/silk/float/LPC_analysis_filter_FLP.c',
    156         'src/silk/float/LPC_inv_pred_gain_FLP.c',
    157         'src/silk/float/LTP_analysis_filter_FLP.c',
    158         'src/silk/float/LTP_scale_ctrl_FLP.c',
    159         'src/silk/float/main_FLP.h',
    160         'src/silk/float/noise_shape_analysis_FLP.c',
    161         'src/silk/float/pitch_analysis_core_FLP.c',
    162         'src/silk/float/prefilter_FLP.c',
    163         'src/silk/float/process_gains_FLP.c',
    164         'src/silk/float/regularize_correlations_FLP.c',
    165         'src/silk/float/residual_energy_FLP.c',
    166         'src/silk/float/scale_copy_vector_FLP.c',
    167         'src/silk/float/scale_vector_FLP.c',
    168         'src/silk/float/schur_FLP.c',
    169         'src/silk/float/SigProc_FLP.h',
    170         'src/silk/float/solve_LS_FLP.c',
    171         'src/silk/float/sort_FLP.c',
    172         'src/silk/float/structs_FLP.h',
    173         'src/silk/float/warped_autocorrelation_FLP.c',
    174         'src/silk/float/wrappers_FLP.c',
    175         'src/silk/gain_quant.c',
    176         'src/silk/HP_variable_cutoff.c',
    177         'src/silk/init_decoder.c',
    178         'src/silk/init_encoder.c',
    179         'src/silk/Inlines.h',
    180         'src/silk/inner_prod_aligned.c',
    181         'src/silk/interpolate.c',
    182         'src/silk/lin2log.c',
    183         'src/silk/log2lin.c',
    184         'src/silk/LP_variable_cutoff.c',
    185         'src/silk/LPC_analysis_filter.c',
    186         'src/silk/LPC_inv_pred_gain.c',
    187         'src/silk/MacroCount.h',
    188         'src/silk/MacroDebug.h',
    189         'src/silk/macros.h',
    190         'src/silk/main.h',
    191         'src/silk/NLSF2A.c',
    192         'src/silk/NLSF_decode.c',
    193         'src/silk/NLSF_del_dec_quant.c',
    194         'src/silk/NLSF_encode.c',
    195         'src/silk/NLSF_stabilize.c',
    196         'src/silk/NLSF_unpack.c',
    197         'src/silk/NLSF_VQ.c',
    198         'src/silk/NLSF_VQ_weights_laroia.c',
    199         'src/silk/NSQ.c',
    200         'src/silk/NSQ_del_dec.c',
    201         'src/silk/pitch_est_defines.h',
    202         'src/silk/pitch_est_tables.c',
    203         'src/silk/PLC.c',
    204         'src/silk/PLC.h',
    205         'src/silk/process_NLSFs.c',
    206         'src/silk/quant_LTP_gains.c',
    207         'src/silk/resampler.c',
    208         'src/silk/resampler_down2.c',
    209         'src/silk/resampler_down2_3.c',
    210         'src/silk/resampler_private.h',
    211         'src/silk/resampler_private_AR2.c',
    212         'src/silk/resampler_private_down_FIR.c',
    213         'src/silk/resampler_private_IIR_FIR.c',
    214         'src/silk/resampler_private_up2_HQ.c',
    215         'src/silk/resampler_rom.c',
    216         'src/silk/resampler_rom.h',
    217         'src/silk/resampler_structs.h',
    218         'src/silk/shell_coder.c',
    219         'src/silk/sigm_Q15.c',
    220         'src/silk/SigProc_FIX.h',
    221         'src/silk/sort.c',
    222         'src/silk/stereo_decode_pred.c',
    223         'src/silk/stereo_encode_pred.c',
    224         'src/silk/stereo_find_predictor.c',
    225         'src/silk/stereo_LR_to_MS.c',
    226         'src/silk/stereo_MS_to_LR.c',
    227         'src/silk/stereo_quant_pred.c',
    228         'src/silk/structs.h',
    229         'src/silk/sum_sqr_shift.c',
    230         'src/silk/table_LSF_cos.c',
    231         'src/silk/tables.h',
    232         'src/silk/tables_gain.c',
    233         'src/silk/tables_LTP.c',
    234         'src/silk/tables_NLSF_CB_NB_MB.c',
    235         'src/silk/tables_NLSF_CB_WB.c',
    236         'src/silk/tables_other.c',
    237         'src/silk/tables_pitch_lag.c',
    238         'src/silk/tables_pulses_per_block.c',
    239         'src/silk/tuning_parameters.h',
    240         'src/silk/typedef.h',
    241         'src/silk/VAD.c',
    242         'src/silk/VQ_WMat_EC.c',
    243         'src/src/analysis.c',
    244         'src/src/analysis.h',
    245         'src/src/mlp.c',
    246         'src/src/mlp.h',
    247         'src/src/mlp_data.c',
    248         'src/src/opus.c',
    249         'src/src/opus_decoder.c',
    250         'src/src/opus_encoder.c',
    251         'src/src/opus_multistream.c',
    252         'src/src/opus_multistream_decoder.c',
    253         'src/src/opus_multistream_encoder.c',
    254         'src/src/repacketizer.c',
    255         'src/src/tansig_table.h',
    256       ],
    257       'conditions': [
    258         ['OS!="win"', {
    259           'defines': [
    260             'HAVE_LRINT',
    261             'HAVE_LRINTF',
    262             'VAR_ARRAYS',
    263           ],
    264         }, {
    265           'defines': [
    266             'USE_ALLOCA',
    267             'inline=__inline',
    268           ],
    269           'msvs_disabled_warnings': [
    270             4305,  # Disable truncation warning in celt/pitch.c .
    271             4334,  # Disable 32-bit shift warning in src/opus_encoder.c .
    272           ],
    273         }],
    274         ['use_opus_fixed_point==0', {
    275           'include_dirs': [
    276             'src/silk/float',
    277           ],
    278           'sources/': [
    279             ['exclude', '/fixed/[^/]*_FIX.(h|c)$'],
    280           ],
    281         }, {
    282           'defines': [
    283             'FIXED_POINT',
    284           ],
    285           'include_dirs': [
    286             'src/silk/fixed',
    287           ],
    288           'sources/': [
    289             ['exclude', '/float/[^/]*_FLP.(h|c)$'],
    290           ],
    291         }],
    292       ],
    293     },  # target opus
    294     {
    295       'target_name': 'opus_demo',
    296       'type': 'executable',
    297       'dependencies': [
    298         'opus'
    299       ],
    300       'conditions': [
    301         ['OS == "win"', {
    302           'defines': [
    303             'inline=__inline',
    304           ],
    305         }],
    306         ['OS=="android"', {
    307           'link_settings': {
    308             'libraries': [
    309               '-llog',
    310             ],
    311           },
    312         }]
    313       ],
    314       'sources': [
    315         'src/src/opus_demo.c',
    316       ],
    317       'include_dirs': [
    318         'src/celt',
    319         'src/silk',
    320       ],
    321     },  # target opus_demo
    322   ]
    323 }
    324