enable some 64bit optimized code on 64bit arch
authorAurelien Jacobs <aurel@gnuage.org>
Wed, 28 Feb 2007 00:55:19 +0000 (00:55 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Wed, 28 Feb 2007 00:55:19 +0000 (00:55 +0000)
Originally committed as revision 8155 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure
libavcodec/simple_idct.c

index 876c585a690ff0e3eaa25593a804fe96565170e9..fd565dcc07f1a1af587bc9698d0b4eef7287e0a9 100755 (executable)
--- a/configure
+++ b/configure
@@ -600,6 +600,7 @@ HAVE_LIST="
     dev_video_bktr_ioctl_bt848_h
     dlfcn_h
     dlopen
     dev_video_bktr_ioctl_bt848_h
     dlfcn_h
     dlopen
+    fast_64bit
     fast_cmov
     freetype2
     imlib2
     fast_cmov
     freetype2
     imlib2
@@ -957,6 +958,7 @@ case "$arch" in
     if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
       if [ -z "`echo $CFLAGS | grep -- -m32`"  ]; then
         arch="x86_64"
     if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
       if [ -z "`echo $CFLAGS | grep -- -m32`"  ]; then
         arch="x86_64"
+        enable fast_64bit
       fi
     fi
   ;;
       fi
     fi
   ;;
@@ -966,15 +968,21 @@ case "$arch" in
   ;;
   alpha)
     arch="alpha"
   ;;
   alpha)
     arch="alpha"
+    enable fast_64bit
   ;;
   ;;
-  "Power Macintosh"|ppc|ppc64|powerpc)
+  "Power Macintosh"|ppc|powerpc)
     arch="powerpc"
   ;;
     arch="powerpc"
   ;;
+  ppc64)
+    arch="powerpc"
+    enable fast_64bit
+  ;;
   mips|mipsel|IP*)
     arch="mips"
   ;;
   sun4u|sparc64)
     arch="sparc64"
   mips|mipsel|IP*)
     arch="mips"
   ;;
   sun4u|sparc64)
     arch="sparc64"
+    enable fast_64bit
   ;;
   sparc)
     arch="sparc"
   ;;
   sparc)
     arch="sparc"
@@ -982,8 +990,12 @@ case "$arch" in
   sh4)
     arch="sh4"
   ;;
   sh4)
     arch="sh4"
   ;;
-  parisc|parisc64)
+  parisc)
+    arch="parisc"
+  ;;
+  parisc64)
     arch="parisc"
     arch="parisc"
+    enable fast_64bit
   ;;
   s390|s390x)
     arch="s390"
   ;;
   s390|s390x)
     arch="s390"
@@ -993,6 +1005,7 @@ case "$arch" in
   ;;
   ia64)
     arch="ia64"
   ;;
   ia64)
     arch="ia64"
+    enable fast_64bit
   ;;
   bfin)
     arch="bfin"
   ;;
   bfin)
     arch="bfin"
index 2c026f08f2708eb3c67e92aaf7e35b51dcd4c84a..dcf752e163aa460dac01f8203a3a77dc648e1428 100644 (file)
 static inline void idctRowCondDC (DCTELEM * row)
 {
         int a0, a1, a2, a3, b0, b1, b2, b3;
 static inline void idctRowCondDC (DCTELEM * row)
 {
         int a0, a1, a2, a3, b0, b1, b2, b3;
-#ifdef FAST_64BIT
+#ifdef HAVE_FAST_64BIT
         uint64_t temp;
 #else
         uint32_t temp;
 #endif
 
         uint64_t temp;
 #else
         uint32_t temp;
 #endif
 
-#ifdef FAST_64BIT
+#ifdef HAVE_FAST_64BIT
 #ifdef WORDS_BIGENDIAN
 #define ROW0_MASK 0xffff000000000000LL
 #else
 #ifdef WORDS_BIGENDIAN
 #define ROW0_MASK 0xffff000000000000LL
 #else
@@ -146,7 +146,7 @@ static inline void idctRowCondDC (DCTELEM * row)
         MUL16(b3, W7, row[1]);
         MAC16(b3, -W5, row[3]);
 
         MUL16(b3, W7, row[1]);
         MAC16(b3, -W5, row[3]);
 
-#ifdef FAST_64BIT
+#ifdef HAVE_FAST_64BIT
         temp = ((uint64_t*)row)[1];
 #else
         temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];
         temp = ((uint64_t*)row)[1];
 #else
         temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];