]> git.sesse.net Git - vlc/blobdiff - include/vlc_cpu.h
aout: add option to initialize hardware volume
[vlc] / include / vlc_cpu.h
index 674e78e72d1ba124fc8a40399ec9169ed4ace74f..36f8da53345f763aff83126b9e356f64efa4f9bb 100644 (file)
@@ -1,21 +1,21 @@
 /*****************************************************************************
  * vlc_cpu.h: CPU capabilities
  *****************************************************************************
- * Copyright (C) 1998-2009 the VideoLAN team
+ * Copyright (C) 1998-2009 VLC authors and VideoLAN
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /**
 #  define CPU_CAPABILITY_SSE4_1  (1<<10)
 #  define CPU_CAPABILITY_SSE4_2  (1<<11)
 #  define CPU_CAPABILITY_SSE4A   (1<<12)
+
+# if defined (__MMX__)
+#  define VLC_MMX
+# elif VLC_GCC_VERSION(4, 4)
+#  define VLC_MMX __attribute__ ((__target__ ("mmx")))
+# else
+#  define VLC_MMX VLC_MMX_is_not_implemented_on_this_compiler
+# endif
+
+# if defined (__SSE__)
+#  define VLC_SSE
+# elif VLC_GCC_VERSION(4, 4)
+#  define VLC_SSE __attribute__ ((__target__ ("sse")))
+# else
+#  define VLC_SSE VLC_SSE_is_not_implemented_on_this_compiler
+# endif
+
 # else
 #  define CPU_CAPABILITY_MMX     (0)
 #  define CPU_CAPABILITY_3DNOW   (0)
@@ -63,7 +80,6 @@
 # endif
 
 VLC_API unsigned vlc_CPU( void );
-VLC_API unsigned vlc_GetCPUCount( void );
 
 /** Are floating point operations fast?
  * If this bit is not set, you should try to use fixed-point instead.
@@ -75,7 +91,11 @@ VLC_API unsigned vlc_GetCPUCount( void );
 #  define HAVE_FPU 1
 
 # elif defined (__arm__)
-#  define HAVE_FPU 0 /* revisit later? */
+#  if defined (__VFP_FP__) && !defined (__SOFTFP__)
+#   define HAVE_FPU 1
+#  else
+#   define HAVE_FPU 0
+#  endif
 
 # elif defined (__sparc__)
 #  define HAVE_FPU 1