From 7da4d4cdeca48667378b96a451621fc9aa76664b Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Thu, 12 Oct 2006 11:54:24 +0000 Subject: [PATCH] fix SHOW_SBITS for ALT_BITSTREAM_READER_LE, patch by Gregory Montoir %cyx A users P sourceforge P net% Originally committed as revision 6671 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/bitstream.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h index d17c4b3e99..a00e117689 100644 --- a/libavcodec/bitstream.h +++ b/libavcodec/bitstream.h @@ -460,13 +460,16 @@ static inline int unaligned32_le(const void *v) # ifdef ALT_BITSTREAM_READER_LE # define SHOW_UBITS(name, gb, num)\ ((name##_cache) & (NEG_USR32(0xffffffff,num))) + +# define SHOW_SBITS(name, gb, num)\ + NEG_SSR32((name##_cache)<<(32-(num)), num) # else # define SHOW_UBITS(name, gb, num)\ NEG_USR32(name##_cache, num) -# endif # define SHOW_SBITS(name, gb, num)\ NEG_SSR32(name##_cache, num) +# endif # define GET_CACHE(name, gb)\ ((uint32_t)name##_cache)