>
> Someone recently asked me about the de-emphasis option in LAME
> (and presumably other iso based encoders).
>
> There are three options:
>
> n = (none, default)
> 5 = 0/15 microseconds
> c = citt j.17
>
> But all the code does is set a flag and write it to the bitstream.
> I'm guessing that if you have a PCM input file where one of the above
> types of de-emphasis has been applied, you can set this flag in the encoder.
> Then the mp3 decoder will "undo" the de-emphasis during playback.
>
> Does any one use this, or know what it is supposed to do?
> FhG and Xing dont seem to have this option. Any objections if
> I remove it from LAME?
>
Hi all,
the iso spec says that emphasis should be set to 0 when not used, 1 with
50/15 microseconds emphasis and 3 when conforming to the CCITT J.17
recommendation. This is equivalent to applying a filter to the signal before
encoding it.
For the 50/15 emphasis, i found these comments in the resampling audio
package of http://cm.stanford.edu/~jos/resample/index.html :
"In a deemphasis function (as in a CD player), the filter has a
single-order POLE at a 50 us time-constant (about 3.2 kHz) and a
single-order ZERO at a 15 us time-constant (about 10.6 kHz). So that
the filter's gain stops dropping off at 6db/octave and actually
flattens out asymptotically at the higher frequencies, with a voltage
gain of 0.3 times the DC voltage gain)."
-- Ken Pohlman's "Principles of Digital Audio"
(Howard Sams, ISBN 0-672-22634-0)
In other words, the filter gain should be constant from 0 Hz to almost
3.2 kHz, decrease as 1/(1+(f-3.2kHz)) for frequencies f above 3.2 kHz,
and then level off to 0.3 above 10.6 kHz. This may be accomplished
using a one-pole, one-zero filter. This type of filter is known as a
"shelving" filter.
Note that the error in high-frequency gain is 1/0.3 in the worst case
if deemphasis is not done. From an audio point of view, this means
the highest frequencies (above 10.6 kHz) are 10.5 dB too loud; between
3.2 kHz and 10.6 kHz, the gain ramps up linearly (on a dB scale).
Note that for signal analysis applications, deemphasis may not be
necessary at all (e.g., for pitch following, vocoding, or any signal
processing in which the spectral envelope is normalized).
For the CCITT recommendation, i found the curb which is joined(j17.gif).
If you put an emphasis different from 0 in the header side info, a good
decoder will apply the inverse filter and the sound will of course be
different. So Lame should either put emphasis to 0 or implement the correct
filter before encoding. Any volunteer ?
Best regards
Lionel
j17.gif