HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - Tech => Topic started by: Makaki on 2013-08-28 04:33:56

Title: LAME Lowpass of 22100 Hz for 44100 Hz file?
Post by: Makaki on 2013-08-28 04:33:56
Just a curiosity,

Why is the default lowpass filter when using VBR -V0 on a 44.1KHz file equal to 22100?
As I understand it, this is above the Nyquist frequency (22050). And any tone above Nyquist that is not filtered would cause aliasing.

That is unless LAME has another lowpass filter that runs at the Nyquist frequency, regardless of the "lowpass filter" setting we can see. And the value of the "visible" setting, in this case, pretty much means it's disabled. Or more correctly: irrelevant/ineffective.

That raises another question. If indeed LAME does take care of frequencies above Nyquist by another routine. And the purpose of the value is to make the filter ineffective. Wouldn't it be more efficient to not run the filter at all? (eg: Have a value like NULL that means do nothing). Instead of running once at 22100 and then at 22050.

I don't see the highpass filter running at any default value. AFAIK, If it's not set it does nothing.
Title: LAME Lowpass of 22100 Hz for 44100 Hz file?
Post by: Makaki on 2013-08-28 04:38:20
Oops,

I should have come up with this test before posting not after, but writing the post above is what gave me the idea:

I was using EncSpot to read the lame headers. I usually encode with a GUI like LameDropXpd. I decided to try the command line cause it gives some nice verbose info.

"polyphase lowpass filter disabled"

I think that pretty much answers my question. But then, Why would the LAME Header report differently?
Title: LAME Lowpass of 22100 Hz for 44100 Hz file?
Post by: pdq on 2013-08-28 13:07:31
Any frequencies over 22050 Hz do not need to be filtered out because, by definition, they do not exist in 44100 Hz data.

Given the limitations of what can be expressed in the header, describing the lowpass as 22100 Hz was probably a reasonable way to describe unfiltered data.
Title: LAME Lowpass of 22100 Hz for 44100 Hz file?
Post by: BFG on 2013-08-28 15:54:08
Any frequencies over 22050 Hz do not need to be filtered out because, by definition, they do not exist in 44100 Hz data.

Given the limitations of what can be expressed in the header, describing the lowpass as 22100 Hz was probably a reasonable way to describe unfiltered data.

Now you've got me curious whether the filter's actually set at 22,100Hz (=22.1kHz) or if it simply is listed as 22.1kHz in the header, which could include 22,100Hz OR 22,050Hz.
Title: LAME Lowpass of 22100 Hz for 44100 Hz file?
Post by: db1989 on 2013-08-28 16:03:11
Given the limitations of what can be expressed in the header, describing the lowpass as 22100 Hz was probably a reasonable way to describe unfiltered data.
Surely 0 would have worked too, and is more logical in a way? I’d hope no one would see that and really think a lowpass at 0 Hz was used; I know we’ve seen some pretty crazy combinations of switches, but c’mon.

Now you've got me curious whether the filter's actually set at 22,100Hz (=22.1kHz) or if it simply is listed as 22.1kHz in the header, which could include 22,100Hz OR 22,050Hz.
You could find the answer by checking the source for LAME and/or a hex/ASCII representation of an encoded file, to determine the format used to encode the number and what range/how many significant figures it allows. I don’t know off-hand and don’t much feel like checking it myself at this time.
Title: LAME Lowpass of 22100 Hz for 44100 Hz file?
Post by: pdq on 2013-08-28 16:20:56
I'm guessing that with the available bits to encode the lowpass, only the three most significant digits are represented and any value always ends in '00'.