[Vorbis-dev] Query in codebook decoding

Sanjay Rajashekar sanjay.rajashekar at gmail.com
Thu Dec 13 01:52:05 PST 2007


I think I got the answer in the spec. The bit stream must be

  msb             lsb
.... 1110 01 00

Thanks anyway,





On Dec 12, 2007 11:42 AM, Sanjay Rajashekar <sanjay.rajashekar at gmail.com>
wrote:

> Hello Monty,
>
> Sorry for the wrong subject title last time. A little more clarification
> needed.
>
> When reading bit-by-bit, there is no MSb/LSb, just 'first bit' and
> 'last bit'.  The Huffman tree is traversed from 'first bit' to last
> bit'.  This is a conceptual layer above the bitpacker; all you need to
> know is what order the bits come out, which happens to be LSb-first.
>
> For ex. say we have the following codewords in the codebook
>
> entry 0: codeword0 - 00
> entry 2: codeword1 - 0111
> entry 6: codeword2 - 111
> entry 7: codeword3 - 10
>
> Now in the bitstream if there is [codeword0] followed by [codeword3]
> followed by [codeword1], then will bitstream be
>
>  msb             lsb
> .... 0111 10 00            or will it be
>
>  msb             lsb
> .... 1110 01 00
>
> If it is the second case, then we can traverse the tree as and when we get
> the bits from from the bitstream. But if it is the first case, then how do
> we do the decoding ?
>
> Regards,
> Sanjay
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20071213/18108b94/attachment.html


More information about the Vorbis-dev mailing list