From S.G.Pickering at bath.ac.uk Thu Apr 17 01:43:59 2008 From: S.G.Pickering at bath.ac.uk (Simon Pickering) Date: Wed, 16 Apr 2008 23:43:59 +0100 Subject: [Dsp-tremor-devel] Update Message-ID: <20080416234359.xli122kgg8o0ck40@webmail.bath.ac.uk> Apologies for the lack of progress recently, I was away on holiday and pretty busy at work since I got back. Anyway....I was battling with an error occurring in _make_words() (in codebook.c) as you can see in my previous email. Now I've tracked down the error to the values pointed to by *l (pointer to an array passed to the _make_words() fn). I followed this up the function call chain until I get to vorbis_book_unpack() (again in codebook.c). The erroneous data are passed down through the _make_decode_table() call which is found around about line 662 (in a switch on the value of maptype, in case 0). Now if one looks further up this function it can be seen that the bit reading code is used to read data directly into the lengthlist array which is eventually passed to _make_words(). So I now need to take a look at the output of this part of the function and see whether there's some strange problem with the bitreading code that only manifests itself after lots of reads have taken place (possible I suppose) or if there's some sort of problem with the location from which the data is being read (more probable I think). While we're down at line 662 or so, I have some concerns about how the values of s->dec_nodeb and consequently s->dec_leafw are set. This is prime territory to make a mistake with the 16bit char. I'll need to sit down and work out how this code is supposed to work (though the problem is to do with the tree itself, the problem appears to be in the values that are passed to it, not its construction, but the two may be interlinked for all I know). More code crunching to be done then. Anyone fancy taking a look and helping? Cheers, Simon