include/vlc_common.h:

 * defined a CPU_CAPABILITY_SSE2
src/libvlc.(c|h):
 * implemented --see2/--no-sse2
parent afd56ce5
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.106 2004/01/26 20:48:09 fenrir Exp $
* $Id: vlc_common.h,v 1.107 2004/01/29 14:39:08 sigmunau Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -794,6 +794,7 @@ VLC_EXPORT( char *, vlc_wraptext, ( const char *, int, vlc_bool_t ) );
#define CPU_CAPABILITY_3DNOW (1<<4)
#define CPU_CAPABILITY_MMXEXT (1<<5)
#define CPU_CAPABILITY_SSE (1<<6)
#define CPU_CAPABILITY_SSE2 (1<<7)
#define CPU_CAPABILITY_ALTIVEC (1<<16)
#define CPU_CAPABILITY_FPU (1<<31)
......
......@@ -2,7 +2,7 @@
* libvlc.c: main libvlc source
*****************************************************************************
* Copyright (C) 1998-2004 VideoLAN
* $Id: libvlc.c,v 1.113 2004/01/25 17:16:05 zorglub Exp $
* $Id: libvlc.c,v 1.114 2004/01/29 14:39:08 sigmunau Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -529,6 +529,8 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
libvlc.i_cpu &= ~CPU_CAPABILITY_MMXEXT;
if( !config_GetInt( p_vlc, "sse" ) )
libvlc.i_cpu &= ~CPU_CAPABILITY_SSE;
if( !config_GetInt( p_vlc, "sse2" ) )
libvlc.i_cpu &= ~CPU_CAPABILITY_SSE2;
#endif
#if defined( __powerpc__ ) || defined( SYS_DARWIN )
if( !config_GetInt( p_vlc, "altivec" ) )
......@@ -551,6 +553,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
PRINT_CAPABILITY( CPU_CAPABILITY_3DNOW, "3DNow!" );
PRINT_CAPABILITY( CPU_CAPABILITY_MMXEXT, "MMXEXT" );
PRINT_CAPABILITY( CPU_CAPABILITY_SSE, "SSE" );
PRINT_CAPABILITY( CPU_CAPABILITY_SSE2, "SSE2" );
PRINT_CAPABILITY( CPU_CAPABILITY_ALTIVEC, "AltiVec" );
PRINT_CAPABILITY( CPU_CAPABILITY_FPU, "FPU" );
msg_Dbg( p_vlc, "CPU has capabilities %s", p_capabilities );
......
......@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.130 2004/01/25 13:50:33 zorglub Exp $
* $Id: libvlc.h,v 1.131 2004/01/29 14:39:08 sigmunau Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -466,6 +466,11 @@ static char *ppsz_align_descriptions[] = { N_("Center"),
"If your processor supports the SSE instructions set, VLC can take " \
"advantage of them.")
#define SSE2_TEXT N_("Enable CPU SSE2 support")
#define SSE2_LONGTEXT N_( \
"If your processor supports the SSE2 instructions set, VLC can take " \
"advantage of them.")
#define ALTIVEC_TEXT N_("Enable CPU AltiVec support")
#define ALTIVEC_LONGTEXT N_( \
"If your processor supports the AltiVec instructions set, VLC can take " \
......@@ -814,6 +819,7 @@ vlc_module_begin();
add_bool( "3dn", 1, NULL, THREE_DN_TEXT, THREE_DN_LONGTEXT, VLC_TRUE );
add_bool( "mmxext", 1, NULL, MMXEXT_TEXT, MMXEXT_LONGTEXT, VLC_TRUE );
add_bool( "sse", 1, NULL, SSE_TEXT, SSE_LONGTEXT, VLC_TRUE );
add_bool( "sse2", 1, NULL, SSE2_TEXT, SSE2_LONGTEXT, VLC_TRUE );
#endif
#if defined( __powerpc__ ) || defined( SYS_DARWIN )
add_bool( "altivec", 1, NULL, ALTIVEC_TEXT, ALTIVEC_LONGTEXT, VLC_TRUE );
......
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