[Ffmpeg-cvslog] r6852 - in trunk: configure libavcodec/cabac.h libavcodec/h264.c libavcodec/mathops.h libavutil/common.h libavutil/internal.h

diego subversion
Wed Nov 1 18:01:33 CET 2006


Author: diego
Date: Wed Nov  1 18:01:33 2006
New Revision: 6852

Modified:
   trunk/configure
   trunk/libavcodec/cabac.h
   trunk/libavcodec/h264.c
   trunk/libavcodec/mathops.h
   trunk/libavutil/common.h
   trunk/libavutil/internal.h

Log:
Add ARCH_X86_32 as a new define for 32 bit x86 architectures and change
the semantics of ARCH_X86 to mean both 32 and 64 bits.


Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Wed Nov  1 18:01:33 2006
@@ -355,10 +355,10 @@
 mmi="default"
 case "$arch" in
   i386|i486|i586|i686|i86pc|BePC)
-    arch="x86"
+    arch="x86_32"
   ;;
   x86_64|amd64)
-    arch="x86"
+    arch="x86"_32
     canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
     if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
       if [ -z "`echo $CFLAGS | grep -- -m32`"  ]; then
@@ -1002,7 +1002,7 @@
 
 # compute MMX state
 if test $mmx = "default"; then
-    if test $arch = "x86" -o $arch = "x86_64"; then
+    if test $arch = "x86_32" -o $arch = "x86_64"; then
         mmx="yes"
     else
         mmx="no"
@@ -1567,7 +1567,7 @@
 echo "big-endian       $bigendian"
 echo "inttypes.h       $inttypes"
 echo "broken inttypes.h $emu_fast_int"
-if test $arch = "x86" -o $arch = "x86_64"; then
+if test $arch = "x86_32" -o $arch = "x86_64"; then
     echo "MMX enabled      $mmx"
     echo "CMOV enabled     $cmov"
     echo "CMOV is fast     $cmov_is_fast"
@@ -1684,9 +1684,13 @@
 echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
 echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
 echo "TARGET_OS=$targetos" >> config.mak
-if test "$arch" = "x86" ; then
+if test "$arch" = "x86_32" -o "$arch" = "x86_64" ; then
   echo "TARGET_ARCH_X86=yes" >> config.mak
   echo "#define ARCH_X86 1" >> $TMPH
+fi
+if test "$arch" = "x86_32" ; then
+  echo "TARGET_ARCH_X86_32=yes" >> config.mak
+  echo "#define ARCH_X86_32 1" >> $TMPH
 elif test "$arch" = "x86_64" ; then
   echo "TARGET_ARCH_X86_64=yes" >> config.mak
   echo "#define ARCH_X86_64 1" >> $TMPH

Modified: trunk/libavcodec/cabac.h
==============================================================================
--- trunk/libavcodec/cabac.h	(original)
+++ trunk/libavcodec/cabac.h	Wed Nov  1 18:01:33 2006
@@ -379,7 +379,7 @@
 #define BYTE        "16"
 #define BYTEEND     "20"
 #endif
-#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
+#if defined(ARCH_X86_32) && !(defined(PIC) && defined(__GNUC__))
     int bit;
 
 #ifndef BRANCHLESS_CABAC_DECODER
@@ -535,7 +535,7 @@
     );
     bit&=1;
 #endif /* BRANCHLESS_CABAC_DECODER */
-#else /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */
+#else /* defined(ARCH_X86_32) && !(defined(PIC) && defined(__GNUC__)) */
     int s = *state;
     int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s];
     int bit, lps_mask attribute_unused;
@@ -574,7 +574,7 @@
     if(!(c->low & CABAC_MASK))
         refill2(c);
 #endif /* BRANCHLESS_CABAC_DECODER */
-#endif /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */
+#endif /* defined(ARCH_X86_32) && !(defined(PIC) && defined(__GNUC__)) */
     return bit;
 }
 
@@ -683,7 +683,7 @@
 
 //FIXME the x86 code from this file should be moved into i386/h264 or cabac something.c/h (note ill kill you if you move my code away from under my fingers before iam finished with it!)
 //FIXME use some macros to avoid duplicatin get_cabac (cant be done yet as that would make optimization work hard)
-#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
+#if defined(ARCH_X86_32) && !(defined(PIC) && defined(__GNUC__))
 static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index){
     void *end= significant_coeff_ctx_base + max_coeff - 1;
     int minusstart= -(int)significant_coeff_ctx_base;
@@ -789,7 +789,7 @@
     );
     return coeff_count;
 }
-#endif /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */
+#endif /* defined(ARCH_X86_32) && !(defined(PIC) && defined(__GNUC__)) */
 
 /**
  *

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Wed Nov  1 18:01:33 2006
@@ -6139,7 +6139,7 @@
             index[coeff_count++] = last;\
         }
         const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
-#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
+#if defined(ARCH_X86_32) && !(defined(PIC) && defined(__GNUC__))
         coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
     } else {
         coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);

Modified: trunk/libavcodec/mathops.h
==============================================================================
--- trunk/libavcodec/mathops.h	(original)
+++ trunk/libavcodec/mathops.h	Wed Nov  1 18:01:33 2006
@@ -22,7 +22,7 @@
 #ifndef MATHOPS_H
 #define MATHOPS_H
 
-#ifdef ARCH_X86
+#ifdef ARCH_X86_32
 
 #include "i386/mathops.h"
 

Modified: trunk/libavutil/common.h
==============================================================================
--- trunk/libavutil/common.h	(original)
+++ trunk/libavutil/common.h	Wed Nov  1 18:01:33 2006
@@ -344,7 +344,7 @@
         );
         return (d << 32) | (a & 0xffffffff);
 }
-#elif defined(ARCH_X86)
+#elif defined(ARCH_X86_32)
 static inline long long read_time(void)
 {
         long long l;

Modified: trunk/libavutil/internal.h
==============================================================================
--- trunk/libavutil/internal.h	(original)
+++ trunk/libavutil/internal.h	Wed Nov  1 18:01:33 2006
@@ -217,7 +217,7 @@
 static always_inline long int lrintf(float x)
 {
 #ifdef __MINGW32__
-#  ifdef ARCH_X86
+#  ifdef ARCH_X86_32
     int32_t i;
     asm volatile(
         "fistpl %0\n\t"
@@ -227,7 +227,7 @@
 #  else
     /* XXX: incorrect, but make it compile */
     return (int)(x + (x < 0 ? -0.5 : 0.5));
-#  endif /* ARCH_X86 */
+#  endif /* ARCH_X86_32 */
 #else
     return (int)(rint(x));
 #endif /* __MINGW32__ */




More information about the ffmpeg-cvslog mailing list