From 252fcf4b0a1b0318ec246f45bd934efac9de9c50 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Thu, 27 Aug 2009 06:05:57 +0000 Subject: [PATCH] compile x86 with fpmath=sse by default --- configure | 3 +++ encoder/encoder.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index ac07a01a..767570a8 100755 --- a/configure +++ b/configure @@ -239,6 +239,9 @@ case $host_cpu in if [[ "$asm" == yes && "$CFLAGS" != *-march* ]]; then CFLAGS="$CFLAGS -march=i686" fi + if [[ "$asm" == yes && "$CFLAGS" != *-mfpmath* ]]; then + CFLAGS="$CFLAGS -mfpmath=sse -msse" + fi if [ "$SYS" = MACOSX ]; then ASFLAGS="$ASFLAGS -f macho -DPREFIX" elif [ "$SYS" = MINGW ]; then diff --git a/encoder/encoder.c b/encoder/encoder.c index caefa669..955b2ec1 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -338,9 +338,9 @@ fail: static int x264_validate_parameters( x264_t *h ) { #ifdef HAVE_MMX - if( !(x264_cpu_detect() & X264_CPU_MMXEXT) ) + if( !(x264_cpu_detect() & X264_CPU_SSE) ) { - x264_log( h, X264_LOG_ERROR, "your cpu does not support MMXEXT, but x264 was compiled with asm support\n"); + x264_log( h, X264_LOG_ERROR, "your cpu does not support SSE1, but x264 was compiled with asm support\n"); x264_log( h, X264_LOG_ERROR, "to run x264, recompile without asm support (configure --disable-asm)\n"); return -1; } -- 2.40.0