diff options
author | Elvis Presley <elvis@e.p> | 2011-09-15 06:01:15 +0200 |
---|---|---|
committer | Elvis Presley <elvis@e.p> | 2011-09-15 15:59:04 +0200 |
commit | 3dd47ae537f6997fec9f47221cba7393851a1bc3 (patch) | |
tree | f28e2aad0800fe84689769270e1d64e34c9a7695 | |
parent | 5554de13b29b9bb812ee5cfd606349873ddf0945 (diff) | |
download | ffmpeg-3dd47ae537f6997fec9f47221cba7393851a1bc3.tar.gz |
Revert "get_bits: remove x86 inline asm in A32 bitstream reader"
This reverts commit 23ce6e72123a40895baaeefeb27c7c18748bd67e.
-rw-r--r-- | libavcodec/get_bits.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 96d33b342e..3b09dfd285 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -201,11 +201,19 @@ static inline void skip_bits_long(GetBitContext *s, int n){ } \ } while (0) +#if ARCH_X86 +# define SKIP_CACHE(name, gb, num) \ + __asm__("shldl %2, %1, %0 \n\t" \ + "shll %2, %1 \n\t" \ + : "+r" (name##_cache0), "+r" (name##_cache1) \ + : "Ic" ((uint8_t)(num))) +#else # define SKIP_CACHE(name, gb, num) do { \ name##_cache0 <<= (num); \ name##_cache0 |= NEG_USR32(name##_cache1,num); \ name##_cache1 <<= (num); \ } while (0) +#endif # define SKIP_COUNTER(name, gb, num) name##_bit_count += (num) |