[opus] Opus floating-point NEON jump table question
Jonathan Lennox
jonathan at vidyo.com
Thu Jun 1 21:22:14 UTC 2017
On May 31, 2017, at 12:47 PM, Linfeng Zhang <linfengz at google.com<mailto:linfengz at google.com>> wrote:
Hi,
./configure --build x86_64-unknown-linux-gnu --host arm-linux-gnueabihf --disable-assertions --disable-check-asm --enable-intrinsics CFLAGS=-O3 --disable-shared
When configuring with floating-point and intrinsics enabled as above, the generated config.h only has OPUS_ARM_MAY_HAVE_NEON_INTR defined (to 1), with
/* #undef OPUS_ARM_ASM */
/* #undef OPUS_ARM_INLINE_ASM */
/* #undef OPUS_ARM_INLINE_EDSP */
/* #undef OPUS_ARM_INLINE_MEDIA */
/* #undef OPUS_ARM_INLINE_NEON */
/* #undef OPUS_ARM_MAY_HAVE_EDSP */
/* #undef OPUS_ARM_MAY_HAVE_MEDIA */
/* #undef OPUS_ARM_MAY_HAVE_NEON */
/* #undef OPUS_ARM_PRESUME_AARCH64_NEON_INTR */
/* #undef OPUS_ARM_PRESUME_EDSP */
/* #undef OPUS_ARM_PRESUME_MEDIA */
/* #undef OPUS_ARM_PRESUME_NEON */
/* #undef OPUS_ARM_PRESUME_NEON_INTR */
So MAY_HAVE_NEON will be defined to MEDIA version, which will eventually fall down to C functions in the jump table:
# define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name)
Therefore all NEON intrinsics optimizations in their jump tables won't get called for floating-point.
Am I missing some options in my configure command, or the config is intend to do so in floating-point?
Thanks,
Linfeng
The structure of this is pretty tangled and confusing, but what you’ll find is that the MAY_HAVE_NEON macro isn’t used in the jump tables for the two Neon intrinsics functions (silk_NSQ_noise_shape_feedback_loop_neon and celt_pitch_xcorr_float_neon) which are used in a floating-point neon build. See silk/arm/arm_silk_map.c and celt/arm/arm_celt_map.c.
So long as OPUS_ARM_MAY_HAVE_NEON_INTR and OPUS_HAVE_RTCD are set in config.h, it’ll pick up those functions, and check for them using RTCD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20170601/df8dd42c/attachment.html>
More information about the opus
mailing list