[opus] NEON detection under iOs
jonathan at vidyo.com
Thu Aug 30 18:59:51 UTC 2018
On iOS, configure should define OPUS_ARM_PRESUME_NEON and OPUS_ARM_PRESUME_NEON_INTR if you’re building for armv7, and OPUS_ARM_PRESUME_NEON_INTR for arm64 (since every Apple armv7 CPU has supported Neon, and of course arm64 supports it though the assembler syntax is different).
This should be slightly faster than using RTCD, since the Neon functions can be direct calls instead of indirect ones.
Do those defines not get set for you, or is there some Neon code that doesn’t get invoked properly with the PRESUMEs?
> On May 24, 2018, at 2:37 PM, Victor Cherepanov <victor.v.cherepanov at gmail.com> wrote:
> Thank you for a great work. Opus codec works great under many platforms.
> I have found a small performance issue under iOS platform.
> If the macro OPUS_HAVE_RTCD is not set, then encoder doesn't use some _neon functions at low bitrates (up to 64k). If the macro is set, then the compiler hits the error at opus/celt/arm/armcpu.c:153 (a function for detection missed). Being compared to Android version performance degradation is ~30%.
> Detection NEON under iOS is a bit tricky, because there is no API for it. I added compiler-time detection.
> I made a commit into github repository. Attached please find patch for it.
> opus mailing list
> opus at xiph.org
More information about the opus