# HG changeset patch # User diego # Date 1162406080 0 # Node ID 7a08ccdc85506b3695ccf02f49e1a7410c0fd3c9 # Parent 4e1b1a37e9d608d2fbb34c4ed5e6b706e5762bc8 Use common define for x86_32 and x86_64. diff -r 4e1b1a37e9d6 -r 7a08ccdc8550 bitstream.h --- a/bitstream.h Wed Nov 01 18:19:20 2006 +0000 +++ b/bitstream.h Wed Nov 01 18:34:40 2006 +0000 @@ -47,7 +47,7 @@ extern const uint8_t ff_reverse[256]; -#if defined(ARCH_X86) || defined(ARCH_X86_64) +#if defined(ARCH_X86) // avoid +32 for shift optimization (gcc should do that ...) static inline int32_t NEG_SSR32( int32_t a, int8_t s){ asm ("sarl %1, %0\n\t" @@ -171,7 +171,7 @@ #endif /* used to avoid missaligned exceptions on some archs (alpha, ...) */ -#if defined(ARCH_X86) || defined(ARCH_X86_64) +#if defined(ARCH_X86) # define unaligned16(a) (*(const uint16_t*)(a)) # define unaligned32(a) (*(const uint32_t*)(a)) # define unaligned64(a) (*(const uint64_t*)(a)) @@ -200,7 +200,7 @@ unaligned(32) unaligned(64) #undef unaligned -#endif /* defined(ARCH_X86) || defined(ARCH_X86_64) */ +#endif /* defined(ARCH_X86) */ #ifndef ALT_BITSTREAM_WRITER static inline void put_bits(PutBitContext *s, int n, unsigned int value) @@ -247,7 +247,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) { # ifdef ALIGNED_BITSTREAM_WRITER -# if defined(ARCH_X86) || defined(ARCH_X86_64) +# if defined(ARCH_X86) asm volatile( "movl %0, %%ecx \n\t" "xorl %%eax, %%eax \n\t" @@ -278,7 +278,7 @@ s->index= index; # endif # else //ALIGNED_BITSTREAM_WRITER -# if defined(ARCH_X86) || defined(ARCH_X86_64) +# if defined(ARCH_X86) asm volatile( "movl $7, %%ecx \n\t" "andl %0, %%ecx \n\t" @@ -580,7 +580,7 @@ name##_bit_count-= 32;\ }\ -#if defined(ARCH_X86) || defined(ARCH_X86_64) +#if defined(ARCH_X86) # define SKIP_CACHE(name, gb, num)\ asm(\ "shldl %2, %1, %0 \n\t"\ diff -r 4e1b1a37e9d6 -r 7a08ccdc8550 msmpeg4.c --- a/msmpeg4.c Wed Nov 01 18:19:20 2006 +0000 +++ b/msmpeg4.c Wed Nov 01 18:34:40 2006 +0000 @@ -659,7 +659,7 @@ necessitate to modify mpegvideo.c. The problem comes from the fact they decided to store the quantized DC (which would lead to problems if Q could vary !) */ -#if (defined(ARCH_X86) || defined(ARCH_X86_64)) && !defined PIC +#if (defined(ARCH_X86)) && !defined PIC asm volatile( "movl %3, %%eax \n\t" "shrl $1, %%eax \n\t"