| 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 | 6 |
| 7 # If fixed point implementation shall be used (otherwise float). | 7 # If fixed point implementation shall be used (otherwise float). |
| 8 use_opus_fixed_point = cpu_arch == "arm" || cpu_arch == "arm64" | 8 use_opus_fixed_point = cpu_arch == "arm" || cpu_arch == "arm64" |
| 9 | 9 |
| 10 # If ARM optimizations shall be used to accelerate performance. | 10 # If ARM optimizations shall be used to accelerate performance. |
| 11 use_opus_arm_optimization = cpu_arch == "arm" | 11 use_opus_arm_optimization = cpu_arch == "arm" |
| 12 | 12 |
| 13 # If OPUS Run Time CPU Detections (RTCD) shall be used. | 13 # If OPUS Run Time CPU Detections (RTCD) shall be used. |
| 14 # Based on the conditions in celt/arm/armcpu.c: | 14 # Based on the conditions in celt/arm/armcpu.c: |
| 15 # defined(_MSC_VER) || defined(__linux__). | 15 # defined(_MSC_VER) || defined(__linux__). |
| 16 use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux) | 16 use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux) |
| 17 | 17 |
| 18 config("opus_config") { | 18 config("opus_config") { |
| 19 include_dirs = [ "src/include" ] | 19 include_dirs = [ "src/include" ] |
| 20 } | 20 } |
| 21 | 21 |
| 22 if (use_opus_rtcd) { | 22 if (use_opus_rtcd) { |
| 23 action("convert_rtcd_assembler") { | 23 action("convert_rtcd_assembler") { |
| 24 script = "convert_rtcd_assembler.py" | 24 script = "convert_rtcd_assembler.py" |
| 25 outputs = [ "$target_gen_dir/celt_pitch_xcorr_arm_gnu.S" ] | 25 outputs = [ |
| 26 "$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", |
| 27 ] |
| 26 args = [ | 28 args = [ |
| 27 rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), | 29 rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), |
| 28 rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", | 30 rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", |
| 29 root_build_dir), | 31 root_build_dir), |
| 30 rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", root_build_dir), | 32 rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", root_build_dir), |
| 31 ] | 33 ] |
| 32 } | 34 } |
| 33 } | 35 } |
| 34 | 36 |
| 35 source_set("opus") { | 37 source_set("opus") { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 libs = [ "log" ] | 157 libs = [ "log" ] |
| 156 } | 158 } |
| 157 if (is_clang) { | 159 if (is_clang) { |
| 158 cflags = [ "-Wno-absolute-value" ] | 160 cflags = [ "-Wno-absolute-value" ] |
| 159 } | 161 } |
| 160 | 162 |
| 161 deps = [ | 163 deps = [ |
| 162 ":opus", | 164 ":opus", |
| 163 ] | 165 ] |
| 164 } | 166 } |
| OLD | NEW |