Tor-Einar Jarnbjo
2002-Sep-18 05:17 UTC
[vorbis-dev] Test files for decoder implementation
Hi, I am trying to implement a Vorbis decoder in Java, and I have some problems understanding the file-format specification included with libvorbis. In the header description, there are a few obvious mistakes, which I believe to have solved, but when I try to decode the audio packets, the decoded floor and residue data doesn't seem to make sense at all, and after a few packets, my decoder is out of sync with the bitstream. Are there any test files (or something like that) available, where the content is documented, so that it is possible to test a decoder implementation and more easily be able to find the bugs? <p>Tor <p><p>==================================================================EASY and FREE access to your email anywhere: http://Mailreader.com/ ================================================================== <p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
In case you try to re-invent a wheel but do not want to: there is a ogg-decoder in the jRoar-packet and a java-library 'jorbis' which can decode ogg-vorbis files. In case you want to re-invent a wheel, good luck :). -- Merijn On Wed, Sep 18, 2002 at 02:17:46PM +0200, Tor-Einar Jarnbjo wrote:> Hi, > > I am trying to implement a Vorbis decoder in Java, and I have some > problems understanding the file-format specification included with > libvorbis. In the header description, there are a few obvious mistakes, > which I believe to have solved, but when I try to decode the audio > packets, the decoded floor and residue data doesn't seem to make > sense at all, and after a few packets, my decoder is out of sync > with the bitstream. > > Are there any test files (or something like that) available, where > the content is documented, so that it is possible to test a decoder > implementation and more easily be able to find the bugs? > > > Tor > > > > ==================================================================> EASY and FREE access to your email anywhere: http://Mailreader.com/ > ==================================================================> > > --- >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@xiph.org' > containing only the word 'unsubscribe' in the body. No subject is needed. > Unsubscribe messages sent to the list will be ignored/filtered.-- Zoals 't toetsenbordje thuis tikt, tikt 't nergens ... --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Tor-Einar Jarnbjo
2002-Sep-18 07:14 UTC
[vorbis-dev] Test files for decoder implementation
Onsdag, 18 september 2002, skrev du:>In case you try to re-invent a wheel but do not want to: there is a >ogg-decoder in the jRoar-packet and a java-library 'jorbis' whichcan decode>ogg-vorbis files. > >In case you want to re-invent a wheel, good luck :).I've already checked out jorbis, but it doesn't seem to be much more than a raw C->Java translation of libvorbis, and does not offer any Java-style API to access a Vorbis file or network stream. My intention with the decoder is to offer a JMF (Java Media Framework) plugin for Ogg/Vorbis support, and I also don't see how this can be easily done using jorbis. A quick look at the file format specification made me believe that Vorbis was well documented, but as I started implementing the code, I realized, that there are obvious errors in the documentation, and several points where the documentation does not match the actual implementation of libvorbis :-/ Tor <p><p><p>==================================================================EASY and FREE access to your email anywhere: http://Mailreader.com/ ================================================================== <p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Wed, Sep 18, 2002 at 02:17:46PM +0200, Tor-Einar Jarnbjo wrote:> Hi, > > I am trying to implement a Vorbis decoder in Java, and I have some > problems understanding the file-format specification included with > libvorbis. In the header description, there are a few obvious mistakes,Please, inform us of any 'obvious mistakes'.> which I believe to have solved, but when I try to decode the audio > packets, the decoded floor and residue data doesn't seem to make > sense at all, and after a few packets, my decoder is out of sync > with the bitstream.Packet extraction and packet decode are decoupled in Ogg; completely losing packet sync is an indication your page decode is incorrect, at which point trying to decode the incorrectly extracted packets is a futile exercise. As for 'test files', no we don't have an official set. For the most part, out debugging strategy is to use diagnostic output from the encoder and match that to diagnotic output from the decode. Monty --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Tor-Einar Jarnbjo
2002-Sep-20 02:03 UTC
[vorbis-dev] Test files for decoder implementation
Torsdag, 19 september 2002, skrev du:>On Wed, Sep 18, 2002 at 02:17:46PM +0200, Tor-Einar Jarnbjo wrote: >> Hi, >> >> I am trying to implement a Vorbis decoder in Java, and I have some >> problems understanding the file-format specification included with >> libvorbis. In the header description, there are a few obviousmistakes,> >Please, inform us of any 'obvious mistakes'.Most turned out to be my mistakes (typos and such), but one left is when decoding the mappings from the setup header: vector [vorbis_mapping_magnitude] element [j]= read ilog([audio_channels]) bits as unsigned integer vector [vorbis_mapping_angle] element [j]= read ilog([audio_channels]) bits as unsigned integer Both steps should read: .. read ilog([audio_channels] - 1) bits ... Another point that confused me, is the computation of a floor curve type 1. When reading the y list from the data packet, you only get positive values from the codebook, but the floor 1 description mentions negative values also. I missed, that this is taken account for in the algorithm computing the curve. The libvorbis implementation also differs from the format documentation in variable naming and algorithm implementation. Different variable naming is of course not really an error, and using different algorithms and storage structures not necessarily (probably rather an optimization of the decoding process), but it would be much easier to understand the format specification if they would match each other. At least it makes it impossible to compare a partial result from my implementation with whatever libvorbis has computed up to this point of the decoding process. Specific examples for this could be the last part of the residue header decoding process where libvorbis uses a 1-dimensional array with only the used codebooks, and the format specification uses a 2-dimensional array, marking unused entries as such, hence the residue packet decoding process is also very different.>As for 'test files', no we don't have an official set. For the most >part, out debugging strategy is to use diagnostic output from the >encoder and match that to diagnotic output from the decode.Thanks for the tip. I'll take a look at the encoder, and see if I can get anywhere with that information. Tor <p><p>==================================================================EASY and FREE access to your email anywhere: http://Mailreader.com/ ================================================================== <p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.