]> git.sesse.net Git - x264/commitdiff
Fix a bug in checkasm and two OSX fixes
authorDavid Conrad <lessen42@gmail.com>
Wed, 19 Aug 2009 23:18:36 +0000 (16:18 -0700)
committerFiona Glaser <fiona@x264.com>
Thu, 20 Aug 2009 20:12:05 +0000 (13:12 -0700)
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
configure
tools/checkasm.c

index 104ac24734007ff41e3721e2c6797e186d913be9..57642dc8599544d8fe331f32e3a2f0f6ce94618e 100644 (file)
@@ -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
index 53198e85a8d64924d19fc665032e4c07181bc1e7..2e7360addcde444750c8236a532c4de60fdd77af 100755 (executable)
--- 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
index 324d026916360994dd38dfa0ee8d516f9d630fe3..c2bd738a5dd8ce01f98f5bed7ba1d5066ab6b5a9 100644 (file)
@@ -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;