Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions Jamulus.pro
Original file line number Diff line number Diff line change
Expand Up @@ -660,17 +660,23 @@ SOURCES_OPUS = libs/opus/celt/bands.c \
libs/opus/src/opus_encoder.c \
libs/opus/src/repacketizer.c

SOURCES_OPUS_ARM = libs/opus/celt/arm/armcpu.c \
# NEON intrinsic sources: self-contained, need no external library.
SOURCES_OPUS_ARM_NEON = libs/opus/celt/arm/armcpu.c \
libs/opus/celt/arm/arm_celt_map.c \
libs/opus/silk/arm/arm_silk_map.c \
libs/opus/silk/arm/biquad_alt_neon_intr.c \
libs/opus/silk/arm/LPC_inv_pred_gain_neon_intr.c \
libs/opus/silk/arm/NSQ_del_dec_neon_intr.c \
libs/opus/silk/arm/NSQ_neon.c \
libs/opus/celt/arm/celt_neon_intr.c \
libs/opus/celt/arm/pitch_neon_intr.c \
libs/opus/celt/arm/celt_fft_ne10.c \
libs/opus/celt/arm/pitch_neon_intr.c
# NE10 sources: FFT/MDCT acceleration via the external Ne10 library, which
# Jamulus does not bundle (they #include <NE10_dsp.h> unconditionally and are
# gated on HAVE_ARM_NE10, which we never define). Kept listed for completeness
# but never added to SOURCES.
SOURCES_OPUS_ARM_NE10 = libs/opus/celt/arm/celt_fft_ne10.c \
libs/opus/celt/arm/celt_mdct_ne10.c
SOURCES_OPUS_ARM = $$SOURCES_OPUS_ARM_NEON $$SOURCES_OPUS_ARM_NE10

SOURCES_OPUS_X86_SSE = libs/opus/celt/x86/x86cpu.c \
libs/opus/celt/x86/x86_celt_map.c \
Expand All @@ -690,6 +696,18 @@ contains(QT_ARCH, armeabi-v7a) | contains(QT_ARCH, arm64-v8a) {
SOURCES_OPUS_ARCH += $$SOURCES_OPUS_ARM
DEFINES_OPUS += OPUS_ARM_PRESUME_NEON=1 OPUS_ARM_PRESUME_NEON_INTR=1
contains(QT_ARCH, arm64-v8a):DEFINES_OPUS += OPUS_ARM_PRESUME_AARCH64_NEON_INTR
} else:contains(QT_ARCH, arm64) {
# arm64-v8a above is the Android ABI name; plain arm64 is what Qt reports
# for 64-bit ARM everywhere else (Apple Silicon macOS, iOS, Linux aarch64).
# NEON is part of the base AArch64 ISA, so the NEON intrinsics can be
# presumed present and compiled without special compiler flags (see the
# SOURCES_OPUS_ARCH handling below).
# OPUS_ARM_MAY_HAVE_NEON_INTR is required in addition to the PRESUME
# defines: opus gates the inclusion of its arm/*.h headers on it
# (see libs/opus/celt/pitch.h and libs/opus/celt/cpu_support.h).
HEADERS_OPUS += $$HEADERS_OPUS_ARM
SOURCES_OPUS_ARCH += $$SOURCES_OPUS_ARM_NEON
DEFINES_OPUS += OPUS_ARM_MAY_HAVE_NEON_INTR=1 OPUS_ARM_PRESUME_NEON_INTR=1 OPUS_ARM_PRESUME_AARCH64_NEON_INTR=1
} else:contains(QT_ARCH, x86) | contains(QT_ARCH, x86_64) {
HEADERS_OPUS += $$HEADERS_OPUS_X86
SOURCES_OPUS_ARCH += $$SOURCES_OPUS_X86_SSE $$SOURCES_OPUS_X86_SSE2 $$SOURCES_OPUS_X86_SSE4
Expand Down Expand Up @@ -1172,6 +1190,11 @@ contains(CONFIG, "opus_shared_lib") {
sse4_cc.variable_out = OBJECTS
QMAKE_EXTRA_COMPILERS += sse_cc sse2_cc sse4_cc
}
} else:contains(QT_ARCH, arm64) {
# Unlike the x86 SSE files above, the AArch64 NEON intrinsics need no
# special compiler flags (NEON is part of the base AArch64 ISA), so
# they can be compiled like any other source file.
SOURCES += $$SOURCES_OPUS_ARCH
}
}

Expand Down
Loading