Isn't fork() supposed to be slow on Windows?
"If your processor supports the SSE2 instructions set, VLC can take " \
"advantage of them.")
"If your processor supports the SSE2 instructions set, VLC can take " \
"advantage of them.")
+#define SSE3_TEXT N_("Enable CPU SSE3 support")
+#define SSE3_LONGTEXT N_( \
+ "If your processor supports the SSE3 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 " \
#define ALTIVEC_TEXT N_("Enable CPU AltiVec support")
#define ALTIVEC_LONGTEXT N_( \
"If your processor supports the AltiVec instructions set, VLC can take " \
change_need_restart ()
add_bool( "sse2", 1, NULL, SSE2_TEXT, SSE2_LONGTEXT, true )
change_need_restart ()
change_need_restart ()
add_bool( "sse2", 1, NULL, SSE2_TEXT, SSE2_LONGTEXT, true )
change_need_restart ()
+ add_bool( "sse3", 1, NULL, SSE3_TEXT, SSE3_LONGTEXT, true )
+ change_need_restart ()
#endif
#if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
add_bool( "altivec", 1, NULL, ALTIVEC_TEXT, ALTIVEC_LONGTEXT, true )
#endif
#if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
add_bool( "altivec", 1, NULL, ALTIVEC_TEXT, ALTIVEC_LONGTEXT, true )
cpu_flags &= ~CPU_CAPABILITY_SSE;
if( !config_GetInt( p_libvlc, "sse2" ) )
cpu_flags &= ~CPU_CAPABILITY_SSE2;
cpu_flags &= ~CPU_CAPABILITY_SSE;
if( !config_GetInt( p_libvlc, "sse2" ) )
cpu_flags &= ~CPU_CAPABILITY_SSE2;
+ if( !config_GetInt( p_libvlc, "sse3" ) )
+ cpu_flags &= ~CPU_CAPABILITY_SSE3;
PRINT_CAPABILITY( CPU_CAPABILITY_MMX, "MMX" );
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_MMX, "MMX" );
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_SSE3, "SSE3" );
#elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
if( !config_GetInt( p_libvlc, "altivec" ) )
#elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
if( !config_GetInt( p_libvlc, "altivec" ) )
+# if defined (__SSE3__)
+ i_capabilities |= CPU_CAPABILITY_SSE3;
+# elif defined (CAN_COMPILE_SSE3)
+ if( i_ecx & 0x00000001 )
+ {
+ /* We test if OS supports the SSE3 instructions */
+ pid_t pid = fork();
+ if( pid == 0 )
+ {
+ /* Test a SSE3 instruction */
+ __asm__ __volatile__ ( "movsldup %%xmm1, %%xmm0\n" : : );
+ exit(0);
+ }
+ if( check_OS_capability( "SSE3", pid ) )
+ i_capabilities |= CPU_CAPABILITY_SSE3;
+ }
+# endif
+
/* test for additional capabilities */
cpuid( 0x80000000 );
/* test for additional capabilities */
cpuid( 0x80000000 );