From 8368e151c7b89c4a36cdc08b75ca490798d62c9d Mon Sep 17 00:00:00 2001 From: David Conrad Date: Wed, 19 Aug 2009 16:18:36 -0700 Subject: [PATCH] Fix a bug in checkasm and two OSX fixes MC chroma checkasm test could crash in some situations Remove -lmx, as it's not needed and the iPhone doesn't have it. Remove unused sqrtf emulation; it breaks if math.h is included. --- common/osdep.h | 3 --- configure | 2 +- tools/checkasm.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/common/osdep.h b/common/osdep.h index 104ac247..57642dc8 100644 --- a/common/osdep.h +++ b/common/osdep.h @@ -55,9 +55,6 @@ #if (defined(SYS_OPENBSD) && !defined(isfinite)) || defined(SYS_SunOS) #define isfinite finite #endif -#if defined(_MSC_VER) || defined(SYS_SunOS) || defined(SYS_MACOSX) -#define sqrtf sqrt -#endif #ifdef _WIN32 #define rename(src,dst) (unlink(dst), rename(src,dst)) // POSIX says that rename() removes the destination, but win32 doesn't. #ifndef strtok_r diff --git a/configure b/configure index 53198e85..2e7360ad 100755 --- a/configure +++ b/configure @@ -179,7 +179,7 @@ case $host_os in darwin*) SYS="MACOSX" CFLAGS="$CFLAGS -falign-loops=16" - LDFLAGS="$LDFLAGS -lm -lmx" + LDFLAGS="$LDFLAGS -lm" if [ "$pic" = "no" ]; then CFLAGS="$CFLAGS -mdynamic-no-pic" fi diff --git a/tools/checkasm.c b/tools/checkasm.c index 324d0269..c2bd738a 100644 --- a/tools/checkasm.c +++ b/tools/checkasm.c @@ -748,7 +748,7 @@ static int check_mc( int cpu_ref, int cpu_new ) x264_mc_functions_t mc_a; x264_pixel_function_t pixel; - uint8_t *src = &buf1[2*32+2]; + uint8_t *src = &buf1[2*64+2]; uint8_t *src2[4] = { &buf1[3*64+2], &buf1[5*64+2], &buf1[7*64+2], &buf1[9*64+2] }; uint8_t *dst1 = buf3; -- 2.39.2