Hi, 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. Regards, Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20180524/bd43f469/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0369-Detection-of-ARM-NEON-for-Apple-platform.patch Type: application/octet-stream Size: 925 bytes Desc: not available URL: <http://lists.xiph.org/pipermail/opus/attachments/20180524/bd43f469/attachment-0001.obj>
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: > > Hi, > > 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. > > Regards, > Victor > <0369-Detection-of-ARM-NEON-for-Apple-platform.patch>_______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus
Hi, 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. Regards, Victor -----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: > > Hi, > > 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. > > Regards, > Victor > <0369-Detection-of-ARM-NEON-for-Apple-platform.patch>_______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus