[Ffmpeg-devel] Reading bit-reversed VLC codes
Michael Niedermayer
michaelni
Sun Mar 18 20:18:02 CET 2007
Hi
On Sun, Mar 18, 2007 at 07:13:30PM +0000, M?ns Rullg?rd wrote:
> I need to read VLC codes that are stored in reverse order in the
> bitstream, i.e. a 4-bit code value of 5 is returned by get_bits as
> 0xa. Is there some way to do this using the lavc VLC reader?
for get bits the code in asv1.c
static inline int asv2_get_bits(GetBitContext *gb, int n){
return ff_reverse[ get_bits(gb, n) << (8-n) ];
}
might do what you want, for get_vlc() just change the table
before init_vlc()
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070318/70741b3f/attachment.pgp>
More information about the ffmpeg-devel
mailing list