[opus] NEON detection under iOs
victor.v.cherepanov at gmail.com
Fri Aug 31 06:34:53 UTC 2018
I believe some Neon code doesn't get invoked properly, because all PRESUME
macros were set in my build.
Probably not all optimized functions are called directly under iOS.
From: Jonathan Lennox
Sent: Thursday, August 30, 2018 11:59 AM
To: Victor Cherepanov
Cc: opus at xiph.org
Subject: Re: [opus] NEON detection under iOs
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
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