1 /*****************************************************************************
2 * memcpy.c : classic memcpy module
3 *****************************************************************************
4 * Copyright (C) 2001 VideoLAN
5 * $Id: memcpy.c,v 1.1 2002/08/04 17:23:43 sam Exp $
7 * Authors: Samuel Hocevar <sam@zoy.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
39 #if defined( MODULE_NAME_IS_memcpy3dn )
42 #elif defined( MODULE_NAME_IS_memcpymmx )
45 #elif defined( MODULE_NAME_IS_memcpymmxext )
52 /*****************************************************************************
54 *****************************************************************************/
55 #ifndef MODULE_NAME_IS_memcpy
56 # define fast_memcpy E_(fast_memcpy)
57 # include "fastmemcpy.h"
60 /*****************************************************************************
62 *****************************************************************************/
63 static int Activate ( vlc_object_t *p_this )
65 #ifdef MODULE_NAME_IS_memcpy
66 p_this->p_vlc->pf_memcpy = memcpy;
68 p_this->p_vlc->pf_memcpy = fast_memcpy;
74 /*****************************************************************************
76 *****************************************************************************/
78 #ifdef MODULE_NAME_IS_memcpy
79 set_description( _("libc memcpy module") );
81 add_shortcut( "libc" );
82 #elif defined( MODULE_NAME_IS_memcpy3dn )
83 set_description( _("3D Now! memcpy module") );
84 add_requirement( 3DNOW );
85 add_shortcut( "3dn" );
86 add_shortcut( "3dnow" );
87 add_shortcut( "memcpy3dn" );
88 add_shortcut( "memcpy3dnow" );
89 #elif defined( MODULE_NAME_IS_memcpymmx )
90 set_description( _("MMX memcpy module") );
91 add_requirement( MMX );
92 add_shortcut( "mmx" );
93 add_shortcut( "memcpymmx" );
94 #elif defined( MODULE_NAME_IS_memcpymmxext )
95 set_description( _("MMX EXT memcpy module") );
96 add_requirement( MMXEXT );
97 add_shortcut( "mmxext" );
98 add_shortcut( "memcpymmxext" );
100 set_capability( "memcpy", PRIORITY );
101 set_callbacks( Activate, NULL );