OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/arm.gni") | 5 import("//build/config/arm.gni") |
6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
7 | 7 |
8 # If fixed point implementation shall be used (otherwise float). | 8 # If fixed point implementation shall be used (otherwise float). |
9 use_opus_fixed_point = current_cpu == "arm" || current_cpu == "arm64" | 9 use_opus_fixed_point = current_cpu == "arm" || current_cpu == "arm64" |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 args = [ | 50 args = [ |
51 rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), | 51 rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), |
52 rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", | 52 rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", |
53 root_build_dir), | 53 root_build_dir), |
54 rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", root_build_dir), | 54 rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", root_build_dir), |
55 ] | 55 ] |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 static_library("opus") { | 59 static_library("opus") { |
60 gypi_values = exec_script("//build/gypi_to_gn.py", | 60 sources = [ |
61 [ rebase_path("opus_srcs.gypi") ], | 61 "src/celt/_kiss_fft_guts.h", |
62 "scope", | 62 "src/celt/arch.h", |
63 [ "opus_srcs.gypi" ]) | 63 "src/celt/bands.c", |
64 sources = gypi_values.opus_common_sources | 64 "src/celt/bands.h", |
| 65 "src/celt/celt.c", |
| 66 "src/celt/celt.h", |
| 67 "src/celt/celt_decoder.c", |
| 68 "src/celt/celt_encoder.c", |
| 69 "src/celt/celt_lpc.c", |
| 70 "src/celt/celt_lpc.h", |
| 71 "src/celt/cpu_support.h", |
| 72 "src/celt/cwrs.c", |
| 73 "src/celt/cwrs.h", |
| 74 "src/celt/ecintrin.h", |
| 75 "src/celt/entcode.c", |
| 76 "src/celt/entcode.h", |
| 77 "src/celt/entdec.c", |
| 78 "src/celt/entdec.h", |
| 79 "src/celt/entenc.c", |
| 80 "src/celt/entenc.h", |
| 81 "src/celt/fixed_debug.h", |
| 82 "src/celt/fixed_generic.h", |
| 83 "src/celt/float_cast.h", |
| 84 "src/celt/kiss_fft.c", |
| 85 "src/celt/kiss_fft.h", |
| 86 "src/celt/laplace.c", |
| 87 "src/celt/laplace.h", |
| 88 "src/celt/mathops.c", |
| 89 "src/celt/mathops.h", |
| 90 "src/celt/mdct.c", |
| 91 "src/celt/mdct.h", |
| 92 "src/celt/mfrngcod.h", |
| 93 "src/celt/modes.c", |
| 94 "src/celt/modes.h", |
| 95 "src/celt/os_support.h", |
| 96 "src/celt/pitch.c", |
| 97 "src/celt/pitch.h", |
| 98 "src/celt/quant_bands.c", |
| 99 "src/celt/quant_bands.h", |
| 100 "src/celt/rate.c", |
| 101 "src/celt/rate.h", |
| 102 "src/celt/stack_alloc.h", |
| 103 "src/celt/static_modes_fixed.h", |
| 104 "src/celt/static_modes_float.h", |
| 105 "src/celt/vq.c", |
| 106 "src/celt/vq.h", |
| 107 "src/include/opus.h", |
| 108 "src/include/opus_custom.h", |
| 109 "src/include/opus_defines.h", |
| 110 "src/include/opus_multistream.h", |
| 111 "src/include/opus_types.h", |
| 112 "src/silk/A2NLSF.c", |
| 113 "src/silk/API.h", |
| 114 "src/silk/CNG.c", |
| 115 "src/silk/HP_variable_cutoff.c", |
| 116 "src/silk/Inlines.h", |
| 117 "src/silk/LPC_analysis_filter.c", |
| 118 "src/silk/LPC_inv_pred_gain.c", |
| 119 "src/silk/LP_variable_cutoff.c", |
| 120 "src/silk/MacroCount.h", |
| 121 "src/silk/MacroDebug.h", |
| 122 "src/silk/NLSF2A.c", |
| 123 "src/silk/NLSF_VQ.c", |
| 124 "src/silk/NLSF_VQ_weights_laroia.c", |
| 125 "src/silk/NLSF_decode.c", |
| 126 "src/silk/NLSF_del_dec_quant.c", |
| 127 "src/silk/NLSF_encode.c", |
| 128 "src/silk/NLSF_stabilize.c", |
| 129 "src/silk/NLSF_unpack.c", |
| 130 "src/silk/NSQ.c", |
| 131 "src/silk/NSQ.h", |
| 132 "src/silk/NSQ_del_dec.c", |
| 133 "src/silk/PLC.c", |
| 134 "src/silk/PLC.h", |
| 135 "src/silk/SigProc_FIX.h", |
| 136 "src/silk/VAD.c", |
| 137 "src/silk/VQ_WMat_EC.c", |
| 138 "src/silk/ana_filt_bank_1.c", |
| 139 "src/silk/biquad_alt.c", |
| 140 "src/silk/bwexpander.c", |
| 141 "src/silk/bwexpander_32.c", |
| 142 "src/silk/check_control_input.c", |
| 143 "src/silk/code_signs.c", |
| 144 "src/silk/control.h", |
| 145 "src/silk/control_SNR.c", |
| 146 "src/silk/control_audio_bandwidth.c", |
| 147 "src/silk/control_codec.c", |
| 148 "src/silk/debug.c", |
| 149 "src/silk/debug.h", |
| 150 "src/silk/dec_API.c", |
| 151 "src/silk/decode_core.c", |
| 152 "src/silk/decode_frame.c", |
| 153 "src/silk/decode_indices.c", |
| 154 "src/silk/decode_parameters.c", |
| 155 "src/silk/decode_pitch.c", |
| 156 "src/silk/decode_pulses.c", |
| 157 "src/silk/decoder_set_fs.c", |
| 158 "src/silk/define.h", |
| 159 "src/silk/enc_API.c", |
| 160 "src/silk/encode_indices.c", |
| 161 "src/silk/encode_pulses.c", |
| 162 "src/silk/errors.h", |
| 163 "src/silk/gain_quant.c", |
| 164 "src/silk/init_decoder.c", |
| 165 "src/silk/init_encoder.c", |
| 166 "src/silk/inner_prod_aligned.c", |
| 167 "src/silk/interpolate.c", |
| 168 "src/silk/lin2log.c", |
| 169 "src/silk/log2lin.c", |
| 170 "src/silk/macros.h", |
| 171 "src/silk/main.h", |
| 172 "src/silk/pitch_est_defines.h", |
| 173 "src/silk/pitch_est_tables.c", |
| 174 "src/silk/process_NLSFs.c", |
| 175 "src/silk/quant_LTP_gains.c", |
| 176 "src/silk/resampler.c", |
| 177 "src/silk/resampler_down2.c", |
| 178 "src/silk/resampler_down2_3.c", |
| 179 "src/silk/resampler_private.h", |
| 180 "src/silk/resampler_private_AR2.c", |
| 181 "src/silk/resampler_private_IIR_FIR.c", |
| 182 "src/silk/resampler_private_down_FIR.c", |
| 183 "src/silk/resampler_private_up2_HQ.c", |
| 184 "src/silk/resampler_rom.c", |
| 185 "src/silk/resampler_rom.h", |
| 186 "src/silk/resampler_structs.h", |
| 187 "src/silk/shell_coder.c", |
| 188 "src/silk/sigm_Q15.c", |
| 189 "src/silk/sort.c", |
| 190 "src/silk/stereo_LR_to_MS.c", |
| 191 "src/silk/stereo_MS_to_LR.c", |
| 192 "src/silk/stereo_decode_pred.c", |
| 193 "src/silk/stereo_encode_pred.c", |
| 194 "src/silk/stereo_find_predictor.c", |
| 195 "src/silk/stereo_quant_pred.c", |
| 196 "src/silk/structs.h", |
| 197 "src/silk/sum_sqr_shift.c", |
| 198 "src/silk/table_LSF_cos.c", |
| 199 "src/silk/tables.h", |
| 200 "src/silk/tables_LTP.c", |
| 201 "src/silk/tables_NLSF_CB_NB_MB.c", |
| 202 "src/silk/tables_NLSF_CB_WB.c", |
| 203 "src/silk/tables_gain.c", |
| 204 "src/silk/tables_other.c", |
| 205 "src/silk/tables_pitch_lag.c", |
| 206 "src/silk/tables_pulses_per_block.c", |
| 207 "src/silk/tuning_parameters.h", |
| 208 "src/silk/typedef.h", |
| 209 "src/src/analysis.c", |
| 210 "src/src/analysis.h", |
| 211 "src/src/mlp.c", |
| 212 "src/src/mlp.h", |
| 213 "src/src/mlp_data.c", |
| 214 "src/src/opus.c", |
| 215 "src/src/opus_decoder.c", |
| 216 "src/src/opus_encoder.c", |
| 217 "src/src/opus_multistream.c", |
| 218 "src/src/opus_multistream_decoder.c", |
| 219 "src/src/opus_multistream_encoder.c", |
| 220 "src/src/repacketizer.c", |
| 221 "src/src/tansig_table.h", |
| 222 ] |
65 | 223 |
66 defines = [ | 224 defines = [ |
67 "OPUS_BUILD", | 225 "OPUS_BUILD", |
68 "OPUS_EXPORT=", | 226 "OPUS_EXPORT=", |
69 ] | 227 ] |
70 | 228 |
71 include_dirs = [ | 229 include_dirs = [ |
72 "src/celt", | 230 "src/celt", |
73 "src/silk", | 231 "src/silk", |
74 ] | 232 ] |
(...skipping 30 matching lines...) Expand all Loading... |
105 if (!is_debug && is_posix && | 263 if (!is_debug && is_posix && |
106 (current_cpu == "arm" || current_cpu == "arm64")) { | 264 (current_cpu == "arm" || current_cpu == "arm64")) { |
107 configs -= [ "//build/config/compiler:default_optimization" ] | 265 configs -= [ "//build/config/compiler:default_optimization" ] |
108 | 266 |
109 # TODO(crbug.com/621335) Rework this so that we don't have the confusion | 267 # TODO(crbug.com/621335) Rework this so that we don't have the confusion |
110 # between "optimize_speed" and "optimize_max". | 268 # between "optimize_speed" and "optimize_max". |
111 configs += [ "//build/config/compiler:optimize_speed" ] | 269 configs += [ "//build/config/compiler:optimize_speed" ] |
112 } | 270 } |
113 | 271 |
114 if (use_opus_fixed_point) { | 272 if (use_opus_fixed_point) { |
115 sources += gypi_values.opus_fixed_sources | 273 sources += [ |
| 274 "src/silk/fixed/LTP_analysis_filter_FIX.c", |
| 275 "src/silk/fixed/LTP_scale_ctrl_FIX.c", |
| 276 "src/silk/fixed/apply_sine_window_FIX.c", |
| 277 "src/silk/fixed/autocorr_FIX.c", |
| 278 "src/silk/fixed/burg_modified_FIX.c", |
| 279 "src/silk/fixed/corrMatrix_FIX.c", |
| 280 "src/silk/fixed/encode_frame_FIX.c", |
| 281 "src/silk/fixed/find_LPC_FIX.c", |
| 282 "src/silk/fixed/find_LTP_FIX.c", |
| 283 "src/silk/fixed/find_pitch_lags_FIX.c", |
| 284 "src/silk/fixed/find_pred_coefs_FIX.c", |
| 285 "src/silk/fixed/k2a_FIX.c", |
| 286 "src/silk/fixed/k2a_Q16_FIX.c", |
| 287 "src/silk/fixed/main_FIX.h", |
| 288 "src/silk/fixed/noise_shape_analysis_FIX.c", |
| 289 "src/silk/fixed/pitch_analysis_core_FIX.c", |
| 290 "src/silk/fixed/prefilter_FIX.c", |
| 291 "src/silk/fixed/process_gains_FIX.c", |
| 292 "src/silk/fixed/regularize_correlations_FIX.c", |
| 293 "src/silk/fixed/residual_energy16_FIX.c", |
| 294 "src/silk/fixed/residual_energy_FIX.c", |
| 295 "src/silk/fixed/schur64_FIX.c", |
| 296 "src/silk/fixed/schur_FIX.c", |
| 297 "src/silk/fixed/solve_LS_FIX.c", |
| 298 "src/silk/fixed/structs_FIX.h", |
| 299 "src/silk/fixed/structs_FIX.h", |
| 300 "src/silk/fixed/vector_ops_FIX.c", |
| 301 "src/silk/fixed/warped_autocorrelation_FIX.c", |
| 302 ] |
116 | 303 |
117 defines += [ "FIXED_POINT" ] | 304 defines += [ "FIXED_POINT" ] |
118 | 305 |
119 include_dirs += [ "src/silk/fixed" ] | 306 include_dirs += [ "src/silk/fixed" ] |
120 } else { | 307 } else { |
121 sources += gypi_values.opus_float_sources | 308 sources += [ |
| 309 "src/silk/float/LPC_analysis_filter_FLP.c", |
| 310 "src/silk/float/LPC_inv_pred_gain_FLP.c", |
| 311 "src/silk/float/LTP_analysis_filter_FLP.c", |
| 312 "src/silk/float/LTP_scale_ctrl_FLP.c", |
| 313 "src/silk/float/SigProc_FLP.h", |
| 314 "src/silk/float/apply_sine_window_FLP.c", |
| 315 "src/silk/float/autocorrelation_FLP.c", |
| 316 "src/silk/float/burg_modified_FLP.c", |
| 317 "src/silk/float/bwexpander_FLP.c", |
| 318 "src/silk/float/corrMatrix_FLP.c", |
| 319 "src/silk/float/encode_frame_FLP.c", |
| 320 "src/silk/float/energy_FLP.c", |
| 321 "src/silk/float/find_LPC_FLP.c", |
| 322 "src/silk/float/find_LTP_FLP.c", |
| 323 "src/silk/float/find_pitch_lags_FLP.c", |
| 324 "src/silk/float/find_pred_coefs_FLP.c", |
| 325 "src/silk/float/inner_product_FLP.c", |
| 326 "src/silk/float/k2a_FLP.c", |
| 327 "src/silk/float/levinsondurbin_FLP.c", |
| 328 "src/silk/float/main_FLP.h", |
| 329 "src/silk/float/noise_shape_analysis_FLP.c", |
| 330 "src/silk/float/pitch_analysis_core_FLP.c", |
| 331 "src/silk/float/prefilter_FLP.c", |
| 332 "src/silk/float/process_gains_FLP.c", |
| 333 "src/silk/float/regularize_correlations_FLP.c", |
| 334 "src/silk/float/residual_energy_FLP.c", |
| 335 "src/silk/float/scale_copy_vector_FLP.c", |
| 336 "src/silk/float/scale_vector_FLP.c", |
| 337 "src/silk/float/schur_FLP.c", |
| 338 "src/silk/float/solve_LS_FLP.c", |
| 339 "src/silk/float/sort_FLP.c", |
| 340 "src/silk/float/structs_FLP.h", |
| 341 "src/silk/float/warped_autocorrelation_FLP.c", |
| 342 "src/silk/float/wrappers_FLP.c", |
| 343 ] |
122 | 344 |
123 include_dirs += [ "src/silk/float" ] | 345 include_dirs += [ "src/silk/float" ] |
124 } | 346 } |
125 | 347 |
126 if (use_opus_arm_optimization) { | 348 if (use_opus_arm_optimization) { |
127 sources += [ | 349 sources += [ |
128 "src/celt/arm/fixed_arm64.h", | 350 "src/celt/arm/fixed_arm64.h", |
129 "src/celt/arm/fixed_armv4.h", | 351 "src/celt/arm/fixed_armv4.h", |
130 "src/celt/arm/fixed_armv5e.h", | 352 "src/celt/arm/fixed_armv5e.h", |
131 "src/celt/arm/kiss_fft_armv4.h", | 353 "src/celt/arm/kiss_fft_armv4.h", |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 configs -= [ "//build/config/compiler:chromium_code" ] | 507 configs -= [ "//build/config/compiler:chromium_code" ] |
286 configs += [ | 508 configs += [ |
287 "//build/config/compiler:no_chromium_code", | 509 "//build/config/compiler:no_chromium_code", |
288 ":opus_test_config", | 510 ":opus_test_config", |
289 ] | 511 ] |
290 | 512 |
291 deps = [ | 513 deps = [ |
292 ":opus", | 514 ":opus", |
293 ] | 515 ] |
294 } | 516 } |
OLD | NEW |