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 8675ff8..f5829fe 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 5162294..ac42227 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__ )