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 |
11 # If ARM optimizations shall be used to accelerate performance. | 11 # If ARM optimizations shall be used to accelerate performance. |
12 use_opus_arm_optimization = current_cpu == "arm" | 12 use_opus_arm_optimization = current_cpu == "arm" |
13 | 13 |
14 # If OPUS Run Time CPU Detections (RTCD) shall be used. | 14 # If OPUS Run Time CPU Detections (RTCD) shall be used. |
15 # Based on the conditions in celt/arm/armcpu.c: | 15 # Based on the conditions in celt/arm/armcpu.c: |
16 # defined(_MSC_VER) || defined(__linux__). | 16 # defined(_MSC_VER) || defined(__linux__). |
17 use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux) | 17 use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux) |
18 | 18 |
19 config("opus_config") { | 19 config("opus_config") { |
20 include_dirs = [ "src/include" ] | 20 include_dirs = [ "src/include" ] |
| 21 |
| 22 if (use_opus_fixed_point) { |
| 23 defines = [ "OPUS_FIXED_POINT" ] |
| 24 } |
21 } | 25 } |
22 | 26 |
23 config("opus_test_config") { | 27 config("opus_test_config") { |
24 include_dirs = [ | 28 include_dirs = [ |
25 "src/celt", | 29 "src/celt", |
26 "src/silk", | 30 "src/silk", |
27 ] | 31 ] |
28 | 32 |
29 if (is_win) { | 33 if (is_win) { |
30 defines = [ "inline=__inline" ] | 34 defines = [ "inline=__inline" ] |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 configs -= [ "//build/config/compiler:chromium_code" ] | 258 configs -= [ "//build/config/compiler:chromium_code" ] |
255 configs += [ | 259 configs += [ |
256 "//build/config/compiler:no_chromium_code", | 260 "//build/config/compiler:no_chromium_code", |
257 ":opus_test_config", | 261 ":opus_test_config", |
258 ] | 262 ] |
259 | 263 |
260 deps = [ | 264 deps = [ |
261 ":opus", | 265 ":opus", |
262 ] | 266 ] |
263 } | 267 } |
OLD | NEW |