Osamu Shigematsu wrote:

> I just want to know how can I normalize, and I didn't ask how about expand
> LAME to support normalization.

For an example of normalization, you can check out the (very informative)
technical documentation of ExactAudioCopy at http://www.exactaudiocopy.de .

Normalization consists of determining the output leven of the audio data,
and then multiplying the audiodata with a certain factor so that the highest
value becomes 95 or 99% of the absolute maximum (plus or minus 32768).
The trick is twofold: First of all, determining the output level is not that
obvious. Many programs just count the highest peak in the data, but one peak
can thus influence the rest of the data considerably. Other programs
calculate the maximum and the desired level with more sophisticated
algorithms (root mean squared, which aproaches the human hearing better than
a peak scan)
You could consider an adaptive algorithm, which would divide the data in
blocks, determine the highest peak in each block, and would then use a
gradually sliding factor to multiply the samples with.
The second trick is that normalizing is a two-pass process, meaning you need
to be able to re-scan the audiodata. For streaming purposes this would mean
you'd have to use a large buffer. It would be preferable to keep the
buffersize finite, because before Mike Oldfield's Amarok can be normalized,
you'd need a bufer of 600 megs.

Personally, Id welcome a normalizer in Lame, especially if it's
well-implemented.

Gerben
([EMAIL PROTECTED])


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

Reply via email to