[Ffmpeg-devel] Reading bit-reversed VLC codes

Måns Rullgård mans
Sun Mar 18 22:43:38 CET 2007


Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:

> Hello,
> On Sun, Mar 18, 2007 at 08:10:59PM +0000, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
> [...]
>> > well, you cannot just reverse a vlc like that, maybe you could elaborate
>> > on what exactly you are trying to do (link to codec spec?)
>> 
>> I'm trying to write a zlib decoder.  The spec is RFC1951.
>
> Oh, interesting. I recently printed that out to see how much effort it
> would be. Though I got a bit stuck due to the horror of huffman
> compressed huffman tables ;-). Well, actually I was thinking about a

The way the spec is written is actually much more horrible than what
it actually describes once you figure it out.

> non-ugly way to built vlc tables from only the bits-per-code tables you
> have in zlib. You already did that part or should I continue to think
> about it? ;-)

I used the method suggested in the spec to get up and running.  The
counting pass can obviously be integrated with the reading pass.
Other than that I don't have any better suggestion at the moment.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list