summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authortlegrand@chromium.org <tlegrand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-24 11:47:01 +0000
committertlegrand@chromium.org <tlegrand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-24 11:47:01 +0000
commitf0ae58c9ebc87c84180b15342c43a58e332675e2 (patch)
tree2f680583047dadefcfab08320832f9c48f4b5471 /third_party
parentbdb57fdb574c9cd44fabbfa1052b0d2723e7c02c (diff)
downloadchromium_src-f0ae58c9ebc87c84180b15342c43a58e332675e2.zip
chromium_src-f0ae58c9ebc87c84180b15342c43a58e332675e2.tar.gz
chromium_src-f0ae58c9ebc87c84180b15342c43a58e332675e2.tar.bz2
Enabling ARM optimizations for Opus on Android and ChromeOS
This CL turns on the ARM optimizations for the Opus codec on Android and ChromeOS. It gives roughly a 40% CPU reduction on Android, and probably the same on Chrome OS (don't have any numbers there to compare with). BUG=296844 Review URL: https://codereview.chromium.org/150103006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/opus/opus.gyp20
-rw-r--r--third_party/opus/opus_srcs_arm.gypi39
2 files changed, 58 insertions, 1 deletions
diff --git a/third_party/opus/opus.gyp b/third_party/opus/opus.gyp
index be0ae4e..3d63476 100644
--- a/third_party/opus/opus.gyp
+++ b/third_party/opus/opus.gyp
@@ -5,10 +5,12 @@
{
'variables': {
'conditions': [
- ['OS=="android"', {
+ ['(OS=="android" or chromeos==1) and target_arch=="arm"', {
'use_opus_fixed_point%': 1,
+ 'use_opus_arm_optimization%': 1,
}, {
'use_opus_fixed_point%': 0,
+ 'use_opus_arm_optimization%': 0,
}],
],
},
@@ -65,6 +67,22 @@
'sources/': [
['exclude', '/float/[^/]*_FLP.(h|c)$'],
],
+ 'conditions': [
+ ['use_opus_arm_optimization==1', {
+ 'defines': [
+ 'OPUS_ARM_ASM',
+ 'OPUS_ARM_INLINE_ASM',
+ 'OPUS_ARM_INLINE_EDSP',
+ 'OPUS_ARM_MAY_HAVE_EDSP',
+ 'OPUS_ARM_MAY_HAVE_MEDIA',
+ 'OPUS_ARM_MAY_HAVE_NEON',
+ 'OPUS_HAVE_RTCD',
+ ],
+ 'includes': [
+ 'opus_srcs_arm.gypi',
+ ],
+ }],
+ ],
}],
],
}, # target opus
diff --git a/third_party/opus/opus_srcs_arm.gypi b/third_party/opus/opus_srcs_arm.gypi
new file mode 100644
index 0000000..9727d36
--- /dev/null
+++ b/third_party/opus/opus_srcs_arm.gypi
@@ -0,0 +1,39 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'sources': [
+ 'src/celt/arm/arm_celt_map.c',
+ 'src/celt/arm/armcpu.c',
+ 'src/celt/arm/armcpu.h',
+ 'src/celt/arm/fixed_armv4.h',
+ 'src/celt/arm/fixed_armv5e.h',
+ 'src/celt/arm/kiss_fft_armv4.h',
+ 'src/celt/arm/kiss_fft_armv5e.h',
+ 'src/celt/pitch_arm.h',
+ 'src/silk/arm/macro_armv4.h',
+ 'src/silk/arm/macro_armv5e.h',
+ 'src/silk/arm/SigProc_FIX_armv4.h',
+ 'src/silk/arm/SigProc_FIX_armv5e.h',
+ '<(INTERMEDIATE_DIR)/celt_pitch_xcorr_arm_gnu.S',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'convert_assembler',
+ 'inputs': [
+ 'src/celt/arm/arm2gnu.pl',
+ 'src/celt/arm/celt_pitch_xcorr_arm.s',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/celt_pitch_xcorr_arm_gnu.S',
+ ],
+ 'action': [
+ 'bash',
+ '-c',
+ 'perl src/celt/arm/arm2gnu.pl src/celt/arm/celt_pitch_xcorr_arm.s | sed "s/OPUS_ARM_MAY_HAVE_[A-Z]*/1/g" | sed "/.include/d" > <(INTERMEDIATE_DIR)/celt_pitch_xcorr_arm_gnu.S',
+ ],
+ 'message': 'Convert Opus assembler for ARM.'
+ },
+ ],
+}