diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2004-10-11 02:19:29 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-10-11 02:19:29 +0000 |
commit | 053dea12f27e6bb8acf6a103ef954da05419d3dc (patch) | |
tree | a23d86aee2e3ab3c9ad72a6fa1e4882ebd0b1228 /libavcodec/common.h | |
parent | 3ba1438dec553ab106aac8895ddebc01e42c5b71 (diff) |
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64 patch by (Aurelien Jacobs <aurel at gnuage dot org>)
Originally committed as revision 3578 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.h')
-rw-r--r-- | libavcodec/common.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h index 441d841d68..b87feb08e5 100644 --- a/libavcodec/common.h +++ b/libavcodec/common.h @@ -254,7 +254,7 @@ inline void dprintf(const char* fmt,...) {} extern const uint32_t inverse[256]; -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) # define FASTDIV(a,b) \ ({\ int ret,dmy;\ @@ -271,7 +271,7 @@ extern const uint32_t inverse[256]; # define FASTDIV(a,b) ((a)/(b)) #endif -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) // 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" @@ -390,7 +390,7 @@ typedef struct RL_VLC_ELEM { #endif /* used to avoid missaligned exceptions on some archs (alpha, ...) */ -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) # define unaligned32(a) (*(const uint32_t*)(a)) #else # ifdef __GNUC__ @@ -460,7 +460,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) static inline void put_bits(PutBitContext *s, int n, unsigned int value) { # ifdef ALIGNED_BITSTREAM_WRITER -# ifdef ARCH_X86 +# if defined(ARCH_X86) || defined(ARCH_X86_64) asm volatile( "movl %0, %%ecx \n\t" "xorl %%eax, %%eax \n\t" @@ -491,7 +491,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) s->index= index; # endif # else //ALIGNED_BITSTREAM_WRITER -# ifdef ARCH_X86 +# if defined(ARCH_X86) || defined(ARCH_X86_64) asm volatile( "movl $7, %%ecx \n\t" "andl %0, %%ecx \n\t" @@ -738,7 +738,7 @@ static inline int get_bits_count(GetBitContext *s){ name##_bit_count-= 32;\ }\ -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) # define SKIP_CACHE(name, gb, num)\ asm(\ "shldl %2, %1, %0 \n\t"\ @@ -1218,7 +1218,7 @@ static inline int ff_get_fourcc(const char *s){ #define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24)) -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) #define MASK_ABS(mask, level)\ asm volatile(\ "cdq \n\t"\ @@ -1252,7 +1252,7 @@ if((y)<(x)){\ } #endif -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) static inline long long rdtsc(void) { long long l; |