mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
Bug 1372767 - opus: enable SSE simd optimization. r=kinetik,ted
Opus now has SSE, SSE2 and SSE 4.1 optimizations. Enable these in our build by adding the extra source files and defines. MozReview-Commit-ID: BKMATikknBU --HG-- extra : rebase_source : 4eea2529150fe5f4f374127968843e6aa29fecaf
This commit is contained in:
parent
5e590fea4b
commit
0fbeea4132
@ -86,6 +86,29 @@ else:
|
||||
]
|
||||
UNIFIED_SOURCES += silk_sources_fixed
|
||||
|
||||
if CONFIG['CPU_ARCH'] in ('x86', 'x86_64'):
|
||||
DEFINES['OPUS_HAVE_RTCD'] = True
|
||||
DEFINES['OPUS_X86_MAY_HAVE_SSE'] = True
|
||||
DEFINES['OPUS_X86_MAY_HAVE_SSE2'] = True
|
||||
DEFINES['OPUS_X86_MAY_HAVE_SSE4_1'] = True
|
||||
DEFINES['OPUS_X86_MAY_HAVE_AVX'] = True
|
||||
SOURCES += celt_sources_sse
|
||||
SOURCES += celt_sources_sse2
|
||||
SOURCES += celt_sources_sse4_1
|
||||
SOURCES += silk_sources_sse4_1
|
||||
if not CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
|
||||
SOURCES += silk_sources_fixed_sse4_1
|
||||
if not CONFIG['_MSC_VER'] or CONFIG['CLANG_CL']:
|
||||
for f in SOURCES:
|
||||
if f in celt_sources_sse:
|
||||
SOURCES[f].flags += CONFIG['SSE_FLAGS']
|
||||
if f in celt_sources_sse2:
|
||||
SOURCES[f].flags += CONFIG['SSE2_FLAGS']
|
||||
if f in celt_sources_sse4_1 or \
|
||||
f in silk_sources_sse4_1 or \
|
||||
f in silk_sources_fixed_sse4_1:
|
||||
SOURCES[f].flags += ['-msse4.1']
|
||||
|
||||
if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']:
|
||||
SOURCES += celt_sources_arm
|
||||
SOURCES += [
|
||||
|
Loading…
x
Reference in New Issue
Block a user