[Vorbis] quantization of floor/residue

Monty xiphmont at xiph.org
Wed Dec 1 02:37:19 PST 2004




On Mon, Nov 22, 2004 at 12:04:23PM +0100, don_homer at gmx.net wrote:

> my first question is at all, whether the codebooks for the
> vq-quantization are static in the sourcecode or whether they are
> generated dynamically upon the data. there are a lot of codebooks in
> the sourcecode, e.g. res_books_stereo.h.

Our encoder includes a large array of codebooks, and chooses a subset
from them based on the desired coding parameters.  These codebooks are
packed into the stream header.

> i found the function "_01forward" in res0.c. am i right that this
> function is preparing the codebooks and the function "encode" which is
> given via the parameters is doing the quantization stuff on the data?

No, the codebooks are prepared, packed and unpacked in sharedbook.c
and codebook.c.  res0.c encodes/decodes residue vectors using
already-prepared codebooks.

> last but not least, channel coupling. is this only done on the floor
> data, or both?

This is done only on residue data; see mapping0.c and psy.c

Monty


More information about the Vorbis mailing list