Bug 1522016 - Build NEON support for libopus on aarch64. r=jmvalin
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 24 Jan 2019 02:45:01 +0000
changeset 515233 1fce91651f4385b00e99a76338c2ee4e475b1adf
parent 515232 c7085705cd57dd0902055a77bfa5fbc017f6c837
child 515234 2a87e6d6e05038586c1a39bfa996e4a4af0588f7
child 515250 aafb99b4a1b4edd0ff19e936239ec076a8677e83
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmvalin
bugs1522016
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1522016 - Build NEON support for libopus on aarch64. r=jmvalin aarch64 ABI supports NEON as default, so we should turn on NEON code for aarch64. Also, libopus's NEON code doesn't support MSVC yet. Differential Revision: https://phabricator.services.mozilla.com/D17332
media/libopus/moz.build
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -125,12 +125,21 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
         ]
     # These flags are a lie; they're just used to enable the requisite
     # opcodes; actual arch detection is done at runtime.
     ASFLAGS += [
         '-march=armv7-a',
     ]
     ASFLAGS += CONFIG['NEON_FLAGS']
 
+if CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+    DEFINES['OPUS_ARM_PRESUME_AARCH64_NEON_INTR'] = True
+    DEFINES['OPUS_ARM_PRESUME_NEON'] = True
+    DEFINES['OPUS_ARM_PRESUME_NEON_INTR'] = True
+    SOURCES += celt_sources_arm_neon_intr
+    SOURCES += silk_sources_arm_neon_intr
+    if not CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
+        SOURCES += silk_sources_fixed_arm_neon_intr
+
 # Suppress warnings in third-party code.
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     if CONFIG['CC_TYPE'] == 'clang':
         CFLAGS += ['-Wno-#pragma-messages']