Chromium Code Reviews| 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("//build/config/mips.gni") | |
| 6 | 7 |
| 7 # If fixed point implementation shall be used (otherwise float). | 8 # If fixed point implementation shall be used (otherwise float). |
| 8 use_opus_fixed_point = cpu_arch == "arm" || cpu_arch == "arm64" | 9 # TODO(wtc): change "mipselx" to "mipsel" in this file when the compilation |
| 10 # errors in the MIPS optimizations are fixed. | |
| 11 use_opus_fixed_point = | |
| 12 cpu_arch == "arm" || cpu_arch == "arm64" || cpu_arch == "mipselx" | |
|
wtc
2015/01/29 00:39:25
This matches the "FIXED_POINT=1" setting in third_
| |
| 9 | 13 |
| 10 # If ARM optimizations shall be used to accelerate performance. | 14 # If ARM optimizations shall be used to accelerate performance. |
| 11 use_opus_arm_optimization = cpu_arch == "arm" | 15 use_opus_arm_optimization = cpu_arch == "arm" |
| 12 | 16 |
| 17 # If MIPS optimizations shall be used to accelerate performance. | |
| 18 use_opus_mips_optimization = cpu_arch == "mipselx" | |
| 19 | |
| 13 # If OPUS Run Time CPU Detections (RTCD) shall be used. | 20 # If OPUS Run Time CPU Detections (RTCD) shall be used. |
| 14 # Based on the conditions in celt/arm/armcpu.c: | 21 # Based on the conditions in celt/arm/armcpu.c: |
| 15 # defined(_MSC_VER) || defined(__linux__). | 22 # defined(_MSC_VER) || defined(__linux__). |
| 16 use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux) | 23 use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux) |
| 17 | 24 |
| 18 config("opus_config") { | 25 config("opus_config") { |
| 19 include_dirs = [ "src/include" ] | 26 include_dirs = [ "src/include" ] |
| 20 } | 27 } |
| 21 | 28 |
| 22 if (use_opus_rtcd) { | 29 if (use_opus_rtcd) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 | 96 |
| 90 defines += [ "FIXED_POINT" ] | 97 defines += [ "FIXED_POINT" ] |
| 91 | 98 |
| 92 include_dirs += [ "src/silk/fixed" ] | 99 include_dirs += [ "src/silk/fixed" ] |
| 93 } else { | 100 } else { |
| 94 sources += gypi_values.opus_float_sources | 101 sources += gypi_values.opus_float_sources |
| 95 | 102 |
| 96 include_dirs += [ "src/silk/float" ] | 103 include_dirs += [ "src/silk/float" ] |
| 97 } | 104 } |
| 98 | 105 |
| 99 if (use_opus_arm_optimization) { | 106 if (use_opus_arm_optimization) { |
|
wtc
2015/01/29 00:39:25
Although there is a new ARM-specific file celt/arm
| |
| 100 sources += [ | 107 sources += [ |
| 101 "src/celt/arm/fixed_armv4.h", | 108 "src/celt/arm/fixed_armv4.h", |
| 102 "src/celt/arm/fixed_armv5e.h", | 109 "src/celt/arm/fixed_armv5e.h", |
| 103 "src/celt/arm/kiss_fft_armv4.h", | 110 "src/celt/arm/kiss_fft_armv4.h", |
| 104 "src/celt/arm/kiss_fft_armv5e.h", | 111 "src/celt/arm/kiss_fft_armv5e.h", |
| 105 "src/celt/pitch_arm.h", | 112 "src/celt/pitch_arm.h", |
| 106 "src/silk/arm/macro_armv4.h", | 113 "src/silk/arm/macro_armv4.h", |
| 107 "src/silk/arm/macro_armv5e.h", | 114 "src/silk/arm/macro_armv5e.h", |
| 108 "src/silk/arm/SigProc_FIX_armv4.h", | 115 "src/silk/arm/SigProc_FIX_armv4.h", |
| 109 "src/silk/arm/SigProc_FIX_armv5e.h", | 116 "src/silk/arm/SigProc_FIX_armv5e.h", |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 128 "OPUS_ARM_MAY_HAVE_MEDIA", | 135 "OPUS_ARM_MAY_HAVE_MEDIA", |
| 129 "OPUS_ARM_MAY_HAVE_NEON", | 136 "OPUS_ARM_MAY_HAVE_NEON", |
| 130 "OPUS_HAVE_RTCD", | 137 "OPUS_HAVE_RTCD", |
| 131 ] | 138 ] |
| 132 | 139 |
| 133 deps = [ | 140 deps = [ |
| 134 ":convert_rtcd_assembler", | 141 ":convert_rtcd_assembler", |
| 135 ] | 142 ] |
| 136 } | 143 } |
| 137 } | 144 } |
| 145 | |
| 146 if (use_opus_mips_optimization) { | |
| 147 sources += [ | |
| 148 "src/celt/mips/celt_mipsr1.h", | |
| 149 "src/celt/mips/fixed_generic_mipsr1.h", | |
| 150 "src/celt/mips/kiss_fft_mipsr1.h", | |
| 151 "src/celt/mips/mdct_mipsr1.h", | |
| 152 "src/celt/mips/pitch_mipsr1.h", | |
| 153 "src/celt/mips/vq_mipsr1.c", | |
| 154 "src/celt/mips/vq_mipsr1.h", | |
| 155 "src/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h", | |
| 156 "src/silk/fixed/mips/prefilter_FIX_mipsr1.h", | |
| 157 "src/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h", | |
| 158 "src/silk/mips/NSQ_del_dec_mipsr1.h", | |
| 159 "src/silk/mips/macros_mipsr1.h", | |
| 160 "src/silk/mips/sigproc_fix_mipsr1.h", | |
| 161 ] | |
| 162 | |
| 163 defines += [ | |
| 164 "MIPSr1_ASM", | |
| 165 "USE_ALLOCA", | |
|
wtc
2015/01/29 00:39:25
These two macros match the settings in third_party
| |
| 166 ] | |
| 167 } | |
| 138 } | 168 } |
| 139 | 169 |
| 140 executable("opus_compare") { | 170 executable("opus_compare") { |
| 141 sources = [ | 171 sources = [ |
| 142 "src/src/opus_compare.c", | 172 "src/src/opus_compare.c", |
| 143 ] | 173 ] |
| 144 | 174 |
| 145 configs -= [ "//build/config/compiler:chromium_code" ] | 175 configs -= [ "//build/config/compiler:chromium_code" ] |
| 146 configs += [ "//build/config/compiler:no_chromium_code" ] | 176 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 147 | 177 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 libs = [ "log" ] | 215 libs = [ "log" ] |
| 186 } | 216 } |
| 187 if (is_clang) { | 217 if (is_clang) { |
| 188 cflags = [ "-Wno-absolute-value" ] | 218 cflags = [ "-Wno-absolute-value" ] |
| 189 } | 219 } |
| 190 | 220 |
| 191 deps = [ | 221 deps = [ |
| 192 ":opus", | 222 ":opus", |
| 193 ] | 223 ] |
| 194 } | 224 } |
| OLD | NEW |