Okay, here it is, the quant formula I promised some time ago:

We got a sample x, floating point, positive (put the sign back on later, if
you like).

Calculate
i = floor(pow(x, 0.75))
as usual. i is integer.

Now:

if (x > pow(0.5 * (pow(i, 8.0/3.0) + pow(i+1, 8.0/3.0)) , 0.375))
        i++;

and i is the quantized value.

Rationale: minimize the quantization noise per sample. The iso formula merely 
minimizes the average case, and not really good either.

The 2nd step can be done per table lookup, of course :-)

Hope you like it,

Segher

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to