[Vorbis-dev] VQ and Huffman codebooks creation

Jesús Díaz Vico jesus.diaz.vico at gmail.com
Sun Aug 16 09:09:44 PDT 2009


Hello,

I'd like to know in detail how does the creation of VQ and Huffman codebooks
work in Vorbis. I've used the source code from *encoder_example* as guide,
but the only reference I've found is the function *_make_words *inside *
vorbis_book_init_encode*, which creates the Huffman tree if I'm not wrong.
So I have two doubts. The first is that, for creating the Huffman tree (and
also the VQ codebooks), should be necessary some kind of histogram, and I
don't find when nor where it is created (*_book_init_encode* is called
before reading the audio data stream). Secondly, I don't find where (in the
source code) or when (in the encoding process) are the VQ codebooks created.
I don't know if, as VQ is optional in Vorbis, may be
*encoder_example*doesn't use it (it is an example after all), or if I
have missed something.
I suppose the VQ codebooks are created with some function within the
*vq*folder, but I don't find any reference to them within
*encoder_example*.

Any help will be much appreciated.

Thanks,

Jesús
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20090816/df8fb78a/attachment.htm 


More information about the Vorbis-dev mailing list