From 600d29043eed8f9c3e848dddb79bb0e2e9a0a391 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 5 Sep 2009 16:56:25 +0300 Subject: [PATCH] Add a CPU capability for ARM NEON Currently, detection is done at build time. Feel free to add run-time detect if you know how. --- include/vlc_common.h | 1 + src/misc/cpu.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/vlc_common.h b/include/vlc_common.h index 8675ff8395..f5829fe55d 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -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 ) ); diff --git a/src/misc/cpu.c b/src/misc/cpu.c index 516229433a..ac42227006 100644 --- a/src/misc/cpu.c +++ b/src/misc/cpu.c @@ -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__ ) -- 2.39.2