]> git.sesse.net Git - vlc/commitdiff
Move x86 memcpy plugins to mmx, mmxext, 3dnow directories
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 10 Jan 2010 10:34:38 +0000 (12:34 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 10 Jan 2010 10:43:49 +0000 (12:43 +0200)
15 files changed:
configure.ac
modules/3dnow/.gitignore [new file with mode: 0644]
modules/3dnow/Modules.am [new file with mode: 0644]
modules/3dnow/memcpy.c [new file with mode: 0644]
modules/Makefile.am
modules/misc/memcpy/Modules.am
modules/misc/memcpy/memcpy.c [deleted file]
modules/mmx/.gitignore [new file with mode: 0644]
modules/mmx/Modules.am [new file with mode: 0644]
modules/mmx/fastmemcpy.h [moved from modules/misc/memcpy/fastmemcpy.h with 100% similarity]
modules/mmx/memcpy.c [new file with mode: 0644]
modules/mmxext/.gitignore [new file with mode: 0644]
modules/mmxext/Modules.am [new file with mode: 0644]
modules/mmxext/memcpy.c [new file with mode: 0644]
po/POTFILES.in

index 6efa99b3188f67a6a167a59e3b8b0ab5d31db67e..6713ead8a52f601849a50be63c81f8c018633bba 100644 (file)
@@ -1339,6 +1339,8 @@ AC_ARG_ENABLE(mmx,
       ;;
   esac
 ])
+have_mmx="no"
+have_mmxext="no"
 AS_IF([test "${enable_mmx}" != "no"], [
   ARCH="${ARCH} mmx"
 
@@ -1373,7 +1375,7 @@ AS_IF([test "${enable_mmx}" != "no"], [
   AS_IF([test "${ac_cv_mmx_inline}" != "no"], [
     AC_DEFINE(CAN_COMPILE_MMX, 1,
               [Define to 1 inline MMX assembly is available.])
-    VLC_ADD_PLUGIN([memcpymmx])
+    have_mmx="yes"
     VLC_ADD_PLUGIN([i420_rgb_mmx])
     VLC_ADD_PLUGIN([i420_yuy2_mmx])
     VLC_ADD_PLUGIN([i422_yuy2_mmx])
@@ -1388,9 +1390,11 @@ AS_IF([test "${enable_mmx}" != "no"], [
   AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
     AC_DEFINE(CAN_COMPILE_MMXEXT, 1,
               [Define to 1 if MMX EXT inline assembly is available.])
-    VLC_ADD_PLUGIN([memcpymmxext])
+    have_mmxext="yes"
   ])
 ])
+AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
+AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
 
 dnl  Check for fully workin SSE2 intrinsics
 dnl  We need support for -mmmx, we need <emmintrin.h>, and we also need a
@@ -1506,6 +1510,7 @@ AS_IF([test "${enable_sse}" != "no"], [
               [Define to 1 if SSE4A inline assembly is available.]) ])
 ])
 
+have_3dnow="no"
 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly],
     [ac_cv_3dnow_inline],
     [CFLAGS="${CFLAGS_save}"
@@ -1514,8 +1519,9 @@ AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly],
 AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
   AC_DEFINE(CAN_COMPILE_3DNOW, 1,
             [Define to 1 if 3D Now! inline assembly is available.])
-  VLC_ADD_PLUGIN([memcpy3dn])
+  have_3dnow="yes"
 ])
+AM_CONDITIONAL([HAVE_3DNOW], [test "$have_3dnow" = "yes"])
 
 
 AC_ARG_ENABLE(neon,
@@ -5194,6 +5200,9 @@ AC_CONFIG_FILES([
   modules/video_output/msw/Makefile
   modules/visualization/Makefile
   modules/visualization/visual/Makefile
+  modules/mmx/Makefile
+  modules/mmxext/Makefile
+  modules/3dnow/Makefile
 ])
 
 dnl Generate makefiles
diff --git a/modules/3dnow/.gitignore b/modules/3dnow/.gitignore
new file mode 100644 (file)
index 0000000..08a6d72
--- /dev/null
@@ -0,0 +1 @@
+Makefile.am
diff --git a/modules/3dnow/Modules.am b/modules/3dnow/Modules.am
new file mode 100644 (file)
index 0000000..6ab1660
--- /dev/null
@@ -0,0 +1,8 @@
+libmemcpy3dn_plugin_la_SOURCES = memcpy.c ../mmx/fastmemcpy.h
+libmemcpy3dn_plugin_la_CFLAGS = $(AM_CFLAGS)
+libmemcpy3dn_plugin_la_LIBADD = $(AM_LIBADD)
+libmemcpy3dn_plugin_la_DEPENDENCIES =
+
+libvlc_LTLIBRARIES += \
+       libmemcpy3dn_plugin.la \
+       $(NULL)
diff --git a/modules/3dnow/memcpy.c b/modules/3dnow/memcpy.c
new file mode 100644 (file)
index 0000000..1500645
--- /dev/null
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * memcpy.c : classic memcpy module
+ *****************************************************************************
+ * Copyright (C) 2001 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * 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
+ * (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.
+ *
+ * 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.
+ *****************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_cpu.h>
+
+#define HAVE_3DNOW
+#include "../mmx/fastmemcpy.h"
+
+static int Activate( vlc_object_t *p_this )
+{
+    VLC_UNUSED(p_this);
+    vlc_fastmem_register( fast_memcpy, NULL );
+
+    return VLC_SUCCESS;
+}
+
+vlc_module_begin ()
+    set_category( CAT_ADVANCED )
+    set_subcategory( SUBCAT_ADVANCED_MISC )
+    set_description( N_("3D Now! memcpy") )
+    add_shortcut( "3dn" )
+    add_shortcut( "3dnow" )
+    add_shortcut( "memcpy3dn" )
+    add_shortcut( "memcpy3dnow" )
+    set_capability( "memcpy", 100 )
+    set_callbacks( Activate, NULL )
+vlc_module_end ()
+
index 4ac47bda1431a8d4256f81f827a3cda757844d67..bdc946aef949498a620c03a8df1717e37744d0d0 100644 (file)
@@ -1,3 +1,4 @@
+NULL =
 BASE_SUBDIRS = \
        access \
        audio_filter \
@@ -19,13 +20,26 @@ BASE_SUBDIRS = \
 EXTRA_SUBDIRS = \
        access_output \
        mux \
-       stream_out
+       stream_out \
+       mmx \
+       mmxext \
+       3dnow \
+       $(NULL)
 
 SUBDIRS = $(BASE_SUBDIRS)
 DIST_SUBDIRS = $(BASE_SUBDIRS) $(EXTRA_SUBDIRS)
 if ENABLE_SOUT
 SUBDIRS += access_output mux stream_out
 endif
+if HAVE_MMX
+SUBDIRS += mmx
+endif
+if HAVE_MMXEXT
+SUBDIRS += mmxext
+endif
+if HAVE_3DNOW
+SUBDIRS += 3dnow
+endif
 
 dist_noinst_SCRIPTS = genmf list.sh
 dist_noinst_DATA = LIST
index 0400ffd0af241613b124f4b1f1db859bf4c22c67..5240b2af79a7d850929fc80a9ef1ede70849339c 100644 (file)
@@ -1,18 +1,3 @@
-SOURCES_memcpymmx = \
-       memcpy.c \
-       fastmemcpy.h \
-       $(NULL)
-
-SOURCES_memcpymmxext = \
-       memcpy.c \
-       fastmemcpy.h \
-       $(NULL)
-
-SOURCES_memcpy3dn = \
-       memcpy.c \
-       fastmemcpy.h \
-       $(NULL)
-
 SOURCES_memcpyaltivec = \
        memcpyaltivec.c \
        $(NULL)
diff --git a/modules/misc/memcpy/memcpy.c b/modules/misc/memcpy/memcpy.c
deleted file mode 100644 (file)
index 08280d1..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*****************************************************************************
- * memcpy.c : classic memcpy module
- *****************************************************************************
- * Copyright (C) 2001 the VideoLAN team
- * $Id$
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *
- * 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
- * (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.
- *
- * 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.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-#include <vlc_plugin.h>
-#include <vlc_cpu.h>
-
-#undef HAVE_MMX
-#undef HAVE_MMX2
-#undef HAVE_SSE
-#undef HAVE_SSE2
-#undef HAVE_3DNOW
-#undef HAVE_ALTIVEC
-
-#if defined( MODULE_NAME_IS_memcpy3dn )
-#   define PRIORITY 100
-#   define HAVE_3DNOW
-#elif defined( MODULE_NAME_IS_memcpymmx )
-#   define PRIORITY 100
-#   define HAVE_MMX
-#elif defined( MODULE_NAME_IS_memcpymmxext )
-#   define PRIORITY 200
-#   define HAVE_MMX2
-#endif
-
-/*****************************************************************************
- * Extern prototype
- *****************************************************************************/
-#define fast_memcpy fast_memcpy
-#include "fastmemcpy.h"
-
-/*****************************************************************************
- * Module initializer
- *****************************************************************************/
-static int Activate ( vlc_object_t *p_this )
-{
-    VLC_UNUSED(p_this);
-    vlc_fastmem_register( fast_memcpy, NULL );
-
-    return VLC_SUCCESS;
-}
-
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-vlc_module_begin ()
-    set_category( CAT_ADVANCED )
-    set_subcategory( SUBCAT_ADVANCED_MISC )
-#if defined( MODULE_NAME_IS_memcpy3dn )
-    set_description( N_("3D Now! memcpy") )
-    add_requirement( 3DNOW )
-    add_shortcut( "3dn" )
-    add_shortcut( "3dnow" )
-    add_shortcut( "memcpy3dn" )
-    add_shortcut( "memcpy3dnow" )
-#elif defined( MODULE_NAME_IS_memcpymmx )
-    set_description( N_("MMX memcpy") )
-    add_requirement( MMX )
-    add_shortcut( "mmx" )
-    add_shortcut( "memcpymmx" )
-#elif defined( MODULE_NAME_IS_memcpymmxext )
-    set_description( N_("MMX EXT memcpy") )
-    add_requirement( MMXEXT )
-    add_shortcut( "mmxext" )
-    add_shortcut( "memcpymmxext" )
-#endif
-    set_capability( "memcpy", PRIORITY )
-    set_callbacks( Activate, NULL )
-vlc_module_end ()
-
diff --git a/modules/mmx/.gitignore b/modules/mmx/.gitignore
new file mode 100644 (file)
index 0000000..08a6d72
--- /dev/null
@@ -0,0 +1 @@
+Makefile.am
diff --git a/modules/mmx/Modules.am b/modules/mmx/Modules.am
new file mode 100644 (file)
index 0000000..f0b6734
--- /dev/null
@@ -0,0 +1,8 @@
+libmemcpymmx_plugin_la_SOURCES = memcpy.c fastmemcpy.h
+libmemcpymmx_plugin_la_CFLAGS = $(AM_CFLAGS)
+libmemcpymmx_plugin_la_LIBADD = $(AM_LIBADD)
+libmemcpymmx_plugin_la_DEPENDENCIES =
+
+libvlc_LTLIBRARIES += \
+       libmemcpymmx_plugin.la \
+       $(NULL)
diff --git a/modules/mmx/memcpy.c b/modules/mmx/memcpy.c
new file mode 100644 (file)
index 0000000..21ee858
--- /dev/null
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * memcpy.c : classic memcpy module
+ *****************************************************************************
+ * Copyright (C) 2001 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * 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
+ * (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.
+ *
+ * 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.
+ *****************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_cpu.h>
+
+#define HAVE_MMX
+#include "../mmx/fastmemcpy.h"
+
+static int Activate( vlc_object_t *p_this )
+{
+    VLC_UNUSED(p_this);
+    vlc_fastmem_register( fast_memcpy, NULL );
+
+    return VLC_SUCCESS;
+}
+
+vlc_module_begin ()
+    set_category( CAT_ADVANCED )
+    set_subcategory( SUBCAT_ADVANCED_MISC )
+    set_description( N_("MMX memcpy") )
+    add_shortcut( "mmx" )
+    add_shortcut( "memcpymmx" )
+    set_capability( "memcpy", 100 )
+    set_callbacks( Activate, NULL )
+vlc_module_end ()
+
diff --git a/modules/mmxext/.gitignore b/modules/mmxext/.gitignore
new file mode 100644 (file)
index 0000000..08a6d72
--- /dev/null
@@ -0,0 +1 @@
+Makefile.am
diff --git a/modules/mmxext/Modules.am b/modules/mmxext/Modules.am
new file mode 100644 (file)
index 0000000..42c0088
--- /dev/null
@@ -0,0 +1,8 @@
+libmemcpymmxext_plugin_la_SOURCES = memcpy.c ../mmx/fastmemcpy.h
+libmemcpymmxext_plugin_la_CFLAGS = $(AM_CFLAGS)
+libmemcpymmxext_plugin_la_LIBADD = $(AM_LIBADD)
+libmemcpymmxext_plugin_la_DEPENDENCIES =
+
+libvlc_LTLIBRARIES += \
+       libmemcpymmxext_plugin.la \
+       $(NULL)
diff --git a/modules/mmxext/memcpy.c b/modules/mmxext/memcpy.c
new file mode 100644 (file)
index 0000000..4f21a88
--- /dev/null
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * memcpy.c : classic memcpy module
+ *****************************************************************************
+ * Copyright (C) 2001 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * 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
+ * (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.
+ *
+ * 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.
+ *****************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_cpu.h>
+
+#define HAVE_MMX2
+#include "../mmx/fastmemcpy.h"
+
+static int Activate( vlc_object_t *p_this )
+{
+    VLC_UNUSED(p_this);
+    vlc_fastmem_register( fast_memcpy, NULL );
+
+    return VLC_SUCCESS;
+}
+
+vlc_module_begin ()
+    set_category( CAT_ADVANCED )
+    set_subcategory( SUBCAT_ADVANCED_MISC )
+    set_description( N_("MMX EXT memcpy") )
+    add_shortcut( "mmxext" )
+    add_shortcut( "memcpymmxext" )
+    set_capability( "memcpy", 200 )
+    set_callbacks( Activate, NULL )
+vlc_module_end ()
+
index 6c8e56be20e9e9ccae3f9f1523c990d31c99347b..3b3486756534b76655e47419ef6c8accfe588ab9 100644 (file)
@@ -211,6 +211,7 @@ src/video_output/vout_pictures.h
 src/video_output/vout_subpictures.c
 
 # modules
+modules/3dnow/memcpy.c
 modules/access/alsa.c
 modules/access/bd/bd.c
 modules/access/bda/bda.c
@@ -975,8 +976,6 @@ modules/misc/lua/libs/volume.c
 modules/misc/lua/meta.c
 modules/misc/lua/vlc.c
 modules/misc/lua/vlc.h
-modules/misc/memcpy/fastmemcpy.h
-modules/misc/memcpy/memcpy.c
 modules/misc/memcpy/memcpyaltivec.c
 modules/misc/notify/growl.m
 modules/misc/notify/growl_udp.c
@@ -1011,6 +1010,8 @@ modules/misc/text_renderer.h
 modules/misc/win32text.c
 modules/misc/xml/libxml.c
 modules/misc/xml/xtag.c
+modules/mmx/memcpy.c
+modules/mmxext/memcpy.c
 modules/mux/asf.c
 modules/mux/avi.c
 modules/mux/dummy.c