Commit 751329b4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Move x86 memcpy plugins to mmx, mmxext, 3dnow directories

parent 52943ce6
......@@ -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
......
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)
......@@ -21,10 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......@@ -33,34 +29,10 @@
#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
#define HAVE_3DNOW
#include "../mmx/fastmemcpy.h"
#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 )
static int Activate( vlc_object_t *p_this )
{
VLC_UNUSED(p_this);
vlc_fastmem_register( fast_memcpy, NULL );
......@@ -68,31 +40,15 @@ static int Activate ( vlc_object_t *p_this )
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_capability( "memcpy", 100 )
set_callbacks( Activate, NULL )
vlc_module_end ()
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
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)
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)
/*****************************************************************************
* 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 ()
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)
/*****************************************************************************
* 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 ()
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment