]> git.sesse.net Git - vlc/commitdiff
Add a CPU capability for ARM NEON
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 5 Sep 2009 13:56:25 +0000 (16:56 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 5 Sep 2009 15:22:50 +0000 (18:22 +0300)
Currently, detection is done at build time. Feel free to add run-time
detect if you know how.

include/vlc_common.h
src/misc/cpu.c

index 8675ff83959adb474d3841e9a1f433f564fce27b..f5829fe55d63816b61fce3e14d27aa001d5cef3f 100644 (file)
@@ -798,6 +798,7 @@ VLC_EXPORT(int, vlc_wclosedir, ( void *_p_dir ));
 #define CPU_CAPABILITY_SSE     (1<<6)
 #define CPU_CAPABILITY_SSE2    (1<<7)
 #define CPU_CAPABILITY_ALTIVEC (1<<16)
+#define CPU_CAPABILITY_NEON    (1<<24)
 #define CPU_CAPABILITY_FPU     (1<<31)
 VLC_EXPORT( unsigned, vlc_CPU, ( void ) );
 
index 516229433ae0d012f47a537e378144c131b16527..ac42227006cc1b98d86854eba0a9856d35f0e3c1 100644 (file)
@@ -229,6 +229,9 @@ out:
 #   if defined( __ARM_EABI__ ) && !defined( __SOFTFP__ )
 //    i_capabilities |= CPU_CAPABILITY_FPU;
 #   endif
+#   if defined( __ARM_NEON__ )
+    i_capabilities |= CPU_CAPABILITY_NEON;
+#   endif
 
 #elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )