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/ )
- Re: [MP3 ENCODER] quantization formula Segher Boessenkool
- Re: [MP3 ENCODER] quantization formula Mark Taylor
- Re: [MP3 ENCODER] quantization formula Gabriel Bouvigne
- Re: [MP3 ENCODER] quantization formula Mathew Hendry
- Re: [MP3 ENCODER] quantization formula Mark Taylor
- Re: [MP3 ENCODER] quantization formula Segher Boessenkool
- Re: [MP3 ENCODER] quantization formula Mark Taylor
- Re: [MP3 ENCODER] quantization formula Segher Boessenkool
- Re: [MP3 ENCODER] quantization formula Takehiro Tominaga
- Re: [MP3 ENCODER] quantization formula Greg Maxwell
- Re: [MP3 ENCODER] quantization formula Mark Taylor
