[FFmpeg-devel] [PATCH 3/3] Deobfuscate LE SHOW_[SU]BITS; these are simple sign/zero extend
Michael Niedermayer
michaelni
Sun Feb 21 02:54:28 CET 2010
On Sun, Feb 21, 2010 at 12:35:59AM +0000, Mans Rullgard wrote:
> ---
> libavcodec/get_bits.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
> index bb40ff4..7c4ee43 100644
> --- a/libavcodec/get_bits.h
> +++ b/libavcodec/get_bits.h
> @@ -166,10 +166,10 @@ for examples see get_bits, show_bits, skip_bits, get_vlc
>
> # ifdef ALT_BITSTREAM_READER_LE
> # define SHOW_UBITS(name, gb, num)\
> - ((name##_cache) & (NEG_USR32(0xffffffff,num)))
> + zero_extend(name##_cache, num)
>
> # define SHOW_SBITS(name, gb, num)\
> - NEG_SSR32((name##_cache)<<(32-(num)), num)
> + sign_extend(name##_cache, num)
> # else
> # define SHOW_UBITS(name, gb, num)\
> NEG_USR32(name##_cache, num)
i prefer the code the way it was
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100221/f6622ca2/attachment.pgp>
More information about the ffmpeg-devel
mailing list