Index: third_party/opus/BUILD.gn |
diff --git a/third_party/opus/BUILD.gn b/third_party/opus/BUILD.gn |
index 2905a4922b30a1a882f4a379c2794ebb642b5932..8f51d09ffd4bd6f8808bf4054fbcb919465b4795 100644 |
--- a/third_party/opus/BUILD.gn |
+++ b/third_party/opus/BUILD.gn |
@@ -3,13 +3,20 @@ |
# found in the LICENSE file. |
import("//build/config/arm.gni") |
+import("//build/config/mips.gni") |
# If fixed point implementation shall be used (otherwise float). |
-use_opus_fixed_point = cpu_arch == "arm" || cpu_arch == "arm64" |
+# TODO(wtc): change "mipselx" to "mipsel" in this file when the compilation |
+# errors in the MIPS optimizations are fixed. |
+use_opus_fixed_point = |
+ 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_
|
# If ARM optimizations shall be used to accelerate performance. |
use_opus_arm_optimization = cpu_arch == "arm" |
+# If MIPS optimizations shall be used to accelerate performance. |
+use_opus_mips_optimization = cpu_arch == "mipselx" |
+ |
# If OPUS Run Time CPU Detections (RTCD) shall be used. |
# Based on the conditions in celt/arm/armcpu.c: |
# defined(_MSC_VER) || defined(__linux__). |
@@ -135,6 +142,29 @@ source_set("opus") { |
] |
} |
} |
+ |
+ if (use_opus_mips_optimization) { |
+ sources += [ |
+ "src/celt/mips/celt_mipsr1.h", |
+ "src/celt/mips/fixed_generic_mipsr1.h", |
+ "src/celt/mips/kiss_fft_mipsr1.h", |
+ "src/celt/mips/mdct_mipsr1.h", |
+ "src/celt/mips/pitch_mipsr1.h", |
+ "src/celt/mips/vq_mipsr1.c", |
+ "src/celt/mips/vq_mipsr1.h", |
+ "src/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h", |
+ "src/silk/fixed/mips/prefilter_FIX_mipsr1.h", |
+ "src/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h", |
+ "src/silk/mips/NSQ_del_dec_mipsr1.h", |
+ "src/silk/mips/macros_mipsr1.h", |
+ "src/silk/mips/sigproc_fix_mipsr1.h", |
+ ] |
+ |
+ defines += [ |
+ "MIPSr1_ASM", |
+ "USE_ALLOCA", |
wtc
2015/01/29 00:39:25
These two macros match the settings in third_party
|
+ ] |
+ } |
} |
executable("opus_compare") { |