Skip to content
Permalink
Browse files
audio: Added ARM NEON versions of audio converters.
These are _much_ faster than the scalar equivalents on the Raspberry Pi that
I tested on. Often 3x to 4x as fast!
  • Loading branch information
icculus committed May 16, 2018
1 parent cb0e614 commit b7e88aaae0813cebea334fe6715980c74dbd97b4
Showing with 555 additions and 2 deletions.
  1. +10 −0 docs/README-raspberrypi.md
  2. +3 −0 include/SDL_cpuinfo.h
  3. +542 −2 src/audio/SDL_audiotypecvt.c
@@ -27,6 +27,16 @@ OpenGL ES 2.x, it usually comes pre-installed, but in any case:

sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev


================================================================================
NEON
================================================================================

If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
that SDL will select some otherwise-disabled highly-optimized code. The
original Pi units don't have NEON, the Pi2 probably does, and the Pi3
definitely does.

================================================================================
Cross compiling from x86 Linux
================================================================================
@@ -57,6 +57,9 @@
#undef bool
#endif
#endif
#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
#include <arm_neon.h>
#endif
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h>
#endif

0 comments on commit b7e88aa

Please sign in to comment.