View Single Post
Old 29 March 2006, 04:11 am   #7
Join Date: Mar 2006
Posts: 12

I have some important updates on the seeking issue. Sorry if the following is a bit technical, but this is development thread after all!

Inspired by death (!), I decided to test the accuracy of the decoder output after seeking. To test it I decoded an mpc file to wav by seeking to each individual frame from some arbitrary starting point and comparing the result to the output without doing any seeking. I found that only 33 out of 43548 frames in the test file were correctly decoded. The problem is that the synthesis doesn't stabilize until after the first frame is decoded after seeking. To fix this, I started the SCF scanning at -33 frames instead of -32, and then requantize and resynth the last frame before the seek point. After rerunning my test this resulted in only 16 invalid frames (a second test file decoded perfectly).

Suspecting a bug in the encoder I went look for one, and found several dubious lines relating to the scale factor encoding. After several hours of debugging nothing seemed to make a difference until I noticed that the differential SCF runlength counters are only 8 bits!

I therefore have two new patches - a new version of the seeking patch for libmpcdec and one for the sv7 encoder. Together these ensure 100% correct decoding after seeking.
snowgoon is offline   Reply With Quote