Commit 090481f4 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/ffmpeg/postprocess.c: altivec CPU detection.

parent 1b6136ee
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* postprocess.c: video postprocessing using the ffmpeg library * postprocess.c: video postprocessing using the ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
# include <libpostproc/postprocess.h> # include <libpostproc/postprocess.h>
#endif #endif
#ifndef PP_CPU_CAPS_ALTIVEC
# define PP_CPU_CAPS_ALTIVEC 0
#endif
/***************************************************************************** /*****************************************************************************
* video_postproc_sys_t : ffmpeg video postprocessing descriptor * video_postproc_sys_t : ffmpeg video postprocessing descriptor
*****************************************************************************/ *****************************************************************************/
...@@ -121,6 +125,7 @@ int E_(InitPostproc)( decoder_t *p_dec, void *p_data, ...@@ -121,6 +125,7 @@ int E_(InitPostproc)( decoder_t *p_dec, void *p_data,
int32_t i_cpu = p_dec->p_libvlc->i_cpu; int32_t i_cpu = p_dec->p_libvlc->i_cpu;
int i_flags = 0; int i_flags = 0;
/* Set CPU capabilities */
if( i_cpu & CPU_CAPABILITY_MMX ) if( i_cpu & CPU_CAPABILITY_MMX )
{ {
i_flags |= PP_CPU_CAPS_MMX; i_flags |= PP_CPU_CAPS_MMX;
...@@ -133,6 +138,10 @@ int E_(InitPostproc)( decoder_t *p_dec, void *p_data, ...@@ -133,6 +138,10 @@ int E_(InitPostproc)( decoder_t *p_dec, void *p_data,
{ {
i_flags |= PP_CPU_CAPS_3DNOW; i_flags |= PP_CPU_CAPS_3DNOW;
} }
if( i_cpu & CPU_CAPABILITY_ALTIVEC )
{
i_flags |= PP_CPU_CAPS_ALTIVEC;
}
switch( pix_fmt ) switch( pix_fmt )
{ {
......
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