Making use of ARM NEON extension in openFrameworks?

The Raspberry Pi 2 now supports the NEON SIMD extension. I was wondering if there is already a way to utilize it for video decoding or general 2D/3D rendering, through maybe a compiler flag? If not its definitely something to look into as it promises to heavily benefit OF on the Pi.

“NEON-enabled multicore video codecs can be over 20x faster”
http://www.raspberrypi.org/raspberry-pi-2-on-sale/

EDIT: I just saw that you can specify the NEON extension as the floating point unit by just using -mfpu=neon instead of -mfpu=vfp. OF is compiling just fine with that cflag. I will edit this post if I can see any difference in performance with this flag.

EDIT 2: So far I couldn’t see any difference at all using -mfpu=neon and -funsafe-math-optimizations
I took these options from this page: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
I tried other floating point options that the new ARM core supports but no difference in any example I tried.
Though a possible reason why I dont see any effect could be this:

I think the current gcc on the Pi itself doesn’t have the a7/NEON stuff, but that should be fixed soon I hope.
http://www.raspberrypi.org/forums/viewtopic.php?f=66&t=98897

3 Likes