]> git.sesse.net Git - vlc/commitdiff
* modules/codec/ffmpeg/postprocess.c: altivec CPU detection.
authorGildas Bazin <gbazin@videolan.org>
Wed, 6 Oct 2004 13:07:35 +0000 (13:07 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 6 Oct 2004 13:07:35 +0000 (13:07 +0000)
modules/codec/ffmpeg/postprocess.c

index 384e483d6337c8be0ffa8eb72b0a4fc21706cf58..dd76c8f93a42d92da178abdd047fd40ab0a0de5b 100644 (file)
@@ -2,7 +2,7 @@
  * postprocess.c: video postprocessing using the ffmpeg library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: postprocess.c,v 1.7 2004/01/25 18:20:12 bigben Exp $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
 #   include <libpostproc/postprocess.h>
 #endif
 
+#ifndef PP_CPU_CAPS_ALTIVEC
+#   define PP_CPU_CAPS_ALTIVEC 0
+#endif
+
 /*****************************************************************************
  * video_postproc_sys_t : ffmpeg video postprocessing descriptor
  *****************************************************************************/
@@ -121,6 +125,7 @@ int E_(InitPostproc)( decoder_t *p_dec, void *p_data,
     int32_t i_cpu = p_dec->p_libvlc->i_cpu;
     int i_flags = 0;
 
+    /* Set CPU capabilities */
     if( i_cpu & CPU_CAPABILITY_MMX )
     {
         i_flags |= PP_CPU_CAPS_MMX;
@@ -133,6 +138,10 @@ int E_(InitPostproc)( decoder_t *p_dec, void *p_data,
     {
         i_flags |= PP_CPU_CAPS_3DNOW;
     }
+    if( i_cpu & CPU_CAPABILITY_ALTIVEC )
+    {
+        i_flags |= PP_CPU_CAPS_ALTIVEC;
+    }
 
     switch( pix_fmt )
     {