[opus] NEON detection under iOs
jonathan at vidyo.com
Fri Aug 31 15:06:35 UTC 2018
Instruments’ Time Profiler on iOS should be pretty good at telling you which functions are being called. Can you look at profiles of the standard build with PRESUME, vs. your build with RTCD? Hopefully there should be an obvious function whose C version is called in the slower code, vs. the Neon version in the faster.
> On Aug 31, 2018, at 2:34 AM, Victor Cherepanov <victor.v.cherepanov at gmail.com> wrote:
> 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.
> -----Original Message----- 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 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