jamulussoftware / jamulus

Jamulus enables musicians to perform real-time jam sessions over the internet.
https://jamulus.io
Other
980 stars 221 forks source link

Mac ARM: Possibly missing opus optimizations #2806

Open hoffie opened 1 year ago

hoffie commented 1 year ago

Describe the bug It looks like none of the existing opus optimization rules match arm64: https://github.com/jamulussoftware/jamulus/blob/e14f3dd9af84271c22575cf4ce7b10dbac0c2bdd/Jamulus.pro#L667

To Reproduce

To be investigated.

Expected behavior

M1 builds should use the opus ARM performance enhancements.

Screenshots

Operating system

Mac M1 / arm

Version of Jamulus

master

hoffie commented 1 year ago

Confirmed, the arm64e builds indeed do not show signs of the flags which enable opus arm optimizations.

https://github.com/jamulussoftware/jamulus/runs/8088131207?check_suite_focus=true#step:10:1137

/Applications/Xcode_13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -pipe -O2  -arch arm64 -isysroot /Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=10.14 -Wall -Wextra -fPIC -DAPP_VERSION=\"3.9.0dev-4c55c39\" -DCUSTOM_MODES -D_REENTRANT -DQT_NO_DEPRECATED_WARNINGS -DOPUS_BUILD=1 -DUSE_ALLOCA=1 -DOPUS_HAVE_RTCD=1 -DHAVE_LRINTF=1 -DHAVE_LRINT=1 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I../../jamulus -I. -I../src -I../libs/opus/include -I../libs/opus/celt -I../libs/opus/silk -I../libs/opus/silk/float -I../libs/opus/silk/fixed -I../libs/opus -I/usr/local/opt/qt/6.3.1/macos/lib/QtWidgets.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtMultimedia.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtGui.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtNetwork.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtXml.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtConcurrent.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtCore.framework/Headers -I. -I/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/mkspecs/macx-clang -F/usr/local/opt/qt/6.3.1/macos/lib -o VAD.o ../libs/opus/silk/VAD.c

https://eclecticlight.co/2021/08/06/accelerating-the-m1-mac-an-introduction-to-simd/

But all M1 Macs support the full ARM64 SIMD, also known as NEON.

Therefore, I'm trying to enable it now and will submit a PR for testing if successful.

pljones commented 1 year ago

@hoffie is this likely to progress?

pljones commented 1 year ago

Dropped until picked up again.

ann0see commented 1 year ago

I think this is related to the macOS build failure via Xcode...