Re: [mpg123-devel] fixed point decoders
Brought to you by:
sobukus
|
From: Taihei M. <tm...@ma...> - 2009-05-30 07:19:10
|
On 2009/05/30, at 5:51, Taihei Monma wrote: > On 2009/05/29, at 23:40, Thomas Orgis wrote: > >> Well, I somehow believe that our current simple engine, while not >> being optimized for accuracy, should work better that it does now. >> It works fine to produce audible output, just this issue with >> relatively silent tracks... >> I don't think that we really need to implement an integer engine >> that rivals MAD in it's core territory (thinking about arches with >> 32bit native integers, at least). Something that works efficiently >> on ARM machines (preferrably more efficient than MAD) and has >> reasonable quality would be fine with me. >> Anyhow, so far folks on Sony PSP or nintendoDS seem to be happy... >> though, I wonder about getting a proper mp3 player on my Palm Treo >> phone. RealPlayer sucks. > > OK, now I've finished investigation, and integer decoder (for > layer3, no work for layer 1/2) works better. The problems are: > - The current double-to-real scalefactor (32768.0) is too small for > gainpow2 table. This causes a corruption (truncated to zero) of > dequantized samples in some cases. But using larger constant scale > factor doesn't fix the problem because the values in the table have > a wide distribution. So for small values, we should use larger scale > factor, and for large values, we should use smaller scale factor. > Fortunately gainpow2 is a constant table, so we can pre-calculate > these adaptive scale factors. Finally this improves the RMS error in > the compliance test to the order of 10e-4. > > - The scalefactor is too large for ispow table. The maximum value in > the table is about 165,516, so the value multiplied by 32768 > surpasses the limit of 32-bit signed integer. > > The prototype code is working fine in my machine. I think it is > still not accurate enough, but should be better than now. Hopefully > I'll commit it tomorrow... Now fixes are on the trunk. Layer 1/2 decoder (was totally broken) is also fixed. Thanks, Taihei Monma |