]> git.sesse.net Git - vlc/blobdiff - modules/misc/memcpy/memcpyaltivec.c
* modules/misc/network/ipv6.c: EVC compilation fixes.
[vlc] / modules / misc / memcpy / memcpyaltivec.c
index 25d4ff28a10bb662668355e599186ca0196c01ea..bebdec3e88fd9ff51025fe0199098708d38273bd 100644 (file)
@@ -1,16 +1,16 @@
 /*****************************************************************************
  * memcpyaltivec.c : AltiVec memcpy module
  *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- * $Id: memcpyaltivec.c,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * Copyright (C) 2001 the VideoLAN team
+ * $Id$
  *
- * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ * Author: Christophe Massiot <massiot@via.ecp.fr>
  *
  * 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
 
 #include <vlc/vlc.h>
 
+#ifdef HAVE_ALTIVEC_H
+#   include <altivec.h>
+#endif
+
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
@@ -49,7 +53,10 @@ static int Activate ( vlc_object_t *p_this )
  * Module descriptor.
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("AltiVec memcpy module") );
+    set_description( _("AltiVec memcpy") );
+    set_category( CAT_ADVANCED );
+    set_subcategory( SUBCAT_ADVANCED_MISC );
+    add_requirement( ALTIVEC );
     set_capability( "memcpy", 100 );
     set_callbacks( Activate, NULL );
     add_shortcut( "altivec" );
@@ -149,7 +156,7 @@ static void * fast_memcpy( void * _to, const void * _from, size_t len )
 
 static void * fast_memcpy( void * _to, const void * _from, size_t len )
 {
-    asm ("                                              \n"                     
+    asm ("                                              \n"
        "       cmplwi          %cr0, %r5,  16          \n"
        "       mr              %r9,  %r3               \n"
        "       bc              4,    1,    ._L3        \n"