[FFmpeg-cvslog] Revert "get_bits: remove x86 inline asm in A32 bitstream reader"

Elvis Presley git at videolan.org
Thu Sep 15 17:17:01 CEST 2011


ffmpeg | branch: master | Elvis Presley <elvis at e.p> | Thu Sep 15 06:01:15 2011 +0200| [3dd47ae537f6997fec9f47221cba7393851a1bc3] | committer: Elvis Presley

Revert "get_bits: remove x86 inline asm in A32 bitstream reader"

This reverts commit 23ce6e72123a40895baaeefeb27c7c18748bd67e.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3dd47ae537f6997fec9f47221cba7393851a1bc3
---

 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 96d33b3..3b09dfd 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)
 



More information about the ffmpeg-cvslog mailing list