[vorbis-dev] A bitrate peeling attempt

John Ripley jripley at rioaudio.com
Fri Jan 2 11:40:36 PST 2004



Had a bit of progress here...

...
> 
> However... I'm a bit stuck trying to get the encoder (libvorbis) to
> cooperate. First thing to do was remove that hard coded 3 stage limit
> all over the place (easy enough). I then tried modifying an existing
> static_bookblock to have the first stages of _resbook_44s_1, followed by
> _resbook_44s_3, using 6 stages overall. The idea here is that it would
> generate a q1 followed by a q3 residue. But this generates a file with a
> huge amount of error.
...

The garbled sounding output turns out to be either a problem with what
I've done to the encoder, or an actual bug in the decoder. It happens
because some of the VQ codebooks are empty, e.g
"_vq_lengthlist__44c1_s_p2_0" (in res_books_stereo.h). The codes are
therefore zero length, and are written out as... nothing!

So, when the decoder grabbed a code (decode_packed_entry_number), it got
an error and the residue unpack stopped prematurely. A simple test for
an empty codebook before getting a code fixed this and resulted in a
decoded file which sounds the same as the high quality version. Which
was nice.

Trouble is the peeled version sounds completely garbled compared to the
same size low quality encode (I'm just arbitrarily retaining the first 4
stages for now). Guess I need to toy with the template a bit. But it
does work, at least a little :)

- John Ripley
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list