]> git.sesse.net Git - vlc/blobdiff - modules/video_chroma/i420_rgb.c
vlc_aout.h: fix typo
[vlc] / modules / video_chroma / i420_rgb.c
index 0d5bf647edbf64e3b537f34261604ec49d384b81..398ef57d1c29055a7a607a8213a258fb1a8704ce 100644 (file)
@@ -1,25 +1,25 @@
 /*****************************************************************************
  * i420_rgb.c : YUV to bitmap RGB conversion module for vlc
  *****************************************************************************
- * Copyright (C) 2000, 2001, 2004, 2008 the VideoLAN team
+ * Copyright (C) 2000, 2001, 2004, 2008 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Sam Hocevar <sam@zoy.org>
  *          Damien Fouilleul <damienf@videolan.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
+ * 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.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -84,15 +84,17 @@ vlc_module_begin ()
     set_description( N_("I420,IYUV,YV12 to "
                        "RGB2,RV15,RV16,RV24,RV32 conversions") )
     set_capability( "video filter2", 80 )
+# define vlc_CPU_capable() (true)
 #elif defined (MODULE_NAME_IS_i420_rgb_mmx)
     set_description( N_( "MMX I420,IYUV,YV12 to "
                         "RV15,RV16,RV24,RV32 conversions") )
     set_capability( "video filter2", 100 )
+# define vlc_CPU_capable() vlc_CPU_MMX()
 #elif defined (MODULE_NAME_IS_i420_rgb_sse2)
     set_description( N_( "SSE2 I420,IYUV,YV12 to "
                         "RV15,RV16,RV24,RV32 conversions") )
     set_capability( "video filter2", 120 )
-    add_requirement( SSE2 )
+# define vlc_CPU_capable() vlc_CPU_SSE2()
 #endif
     set_callbacks( Activate, Deactivate )
 vlc_module_end ()
@@ -109,6 +111,8 @@ static int Activate( vlc_object_t *p_this )
     size_t i_tables_size;
 #endif
 
+    if( !vlc_CPU_capable() )
+        return VLC_EGENERIC;
     if( p_filter->fmt_out.video.i_width & 1
      || p_filter->fmt_out.video.i_height & 1 )
     {