Skip to main content

Topic: Treating of >16 khz freqs (Read 3621 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • jkeating
  • [*]
Treating of >16 khz freqs
I was wondering about some differences between AAC and MP3 in treating >16 khz freqs.
1) I've read about the problems of MP3 in storing those frequencies. AAC however takes less than 1 kbit in storing those freqs, even in hard songs where MP3 takes 30 kbit. Why?
2) For the same reason, why in PsyTEL encoder, -streaming cuts at 18.5 khz and -normal at 20.5, if storing those freqs requires so few kbits?

I tried encoders with "Metropolis pt.2 (Dream theater)", where there are some some with hi freqs problems (regading of MP3 bitrate, of course).

Thanks, Saverio M.

  • Ivan Dimkovic
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #1
MP3 has only one 'scale factor' (frequency band) for the range of 16-22.05 kHz  (if 44.1 kHz sampling rate is used)

Because of this, it is very hard to control the quantization noise, and in order to keep noise below hearing threshold a very low quantization step must be used, which require significant amount of bits for the entire range.

AAC has bigger number of frequency bands (49 for long blocks). So, it is possible to fine-control quantization noise for several bands in range of 16-22.05 kHz.

Frequencies over 18 kHz require few kbits because the allowed noise level is very big, and the rest is coded with very small number of bits.  MP3 does not have separate bands for 16-22.05 kHz, and we need to use the 'worst case' scaling-factor for all that frequencies. This leads to very high bit rate (>225 kbps)

  • Frank Klemm
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #2
Quote
Originally posted by Ivan Dimkovic
MP3 has only one 'scale factor' (frequency band) for the range of 16-22.05 kHz  (if 44.1 kHz sampling rate is used)


MP3 has NO 'scale factor' for the range from 16-22.05 kHz (fs=44.1 kHz).
To be able to store 16-22.05 kHz you must pump a LOT of bits into the region
0...16 kHz. You must pump so much bits into the low frequency region, that this
would increase bitrate by 100...600 kbps. So you can only do this for a small
amount of frames.

Frames with contens above 16 kHz must be quantized fully different from other frames if you don't want to add only noise to sfb21.

Worst samples are things like glockenspiel and triangle.

The missing sfb21 scaler looks like MP3 was designed for usable quality at 128 kbps.
You really save 0.6 kbps for a 128 kbps encoding!

Use MPEG-1 Layer I/II or MPEG-2/4 AAC to solve this problem.
--  Frank Klemm

  • Gabriel
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #3
Yes, NO scalefactor at all in the latest scalefactor band. Yes, that sounds crazy....
Frank got an interesting point here, perhaps it could be on purpose just in order to save those tiny 0.6kbps. After all the main target for mp3 was dual isdn.

I though at the beginning that it could be just a big mistake in the standard, but this is such a mistake that it seems quite improbable.

Perhaps after all mp3 was never intended to be used at high bitrates, where mp2 was already started to be deployed.

  • Ivan Dimkovic
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #4
James Johnston (JJ) who worked at AT&T  said that some serious mistakes were made during MP3 standardization phase - for which he reffered to as 'political' .

Also, people from Fraunhofer IIS are quite concerned that coding > 16 kHz is a complete waste of resources - even in some papers from Brandenburg we can see that he thinks that frequencies greater than 16 kHz cannot be heard.

This is, of course, not true for many signals - but maybe that was the reason for leaving the sfb21 out?

  • Gabriel
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #5
Yes, "MP3 and AAC Explained".

When reading this paper, I had the strange personnal feeling that Brandenburg was not really believing this >16kHz thing, but most likely trying to justify what seems to be known as a design/standardization error.

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #6
Can I ask Gabriel and Frank another technical question (now that they've mentioned MPEG layer II)?

I know in MPEG layer 3 that "Joint Stereo" means you can choose IS, MS, or SS as you require on a frame by frame basis - is this true?

Well, how does it work in MPEG layer 2? Is it the same, or is it a "choose once per stream and then stick with it" thing - i.e. SS or MS?

I have the specs, which must explain this, but I can't find it!

Cheers,
David.

  • Ivan Dimkovic
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #7
If I remember correctly (and Frank will correct me if I am wrong    Layers I and II only had Intensity Stereo (IS) and normal stereo (LR) modes, switchable on a frame basis  - ie. one frame could be either IS or LR

  • Frank Klemm
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #8
Quote
Originally posted by Ivan Dimkovic
If I remember correctly (and Frank will correct me if I am wrong    Layers I and II only had Intensity Stereo (IS) and normal stereo (LR) modes, switchable on a frame basis  - ie. one frame could be either IS or LR


Layer 1, 2: 
- LR Stereo  or  LR+IS Stereo, frame based
- LR Stereo up to fx, IS from fx to fs/2. fx can be fs/16, fs/8,3fs/16, fs/4.
- IS can only be in-phase (a lot of directions possible, time resolution 8 ms)

Layer 3:
- LR Stereo, MS Stereo, LR+IS Stereo or MS+IS Stereo, frame based
- LR or MS Stereo, IS can be switched on on Scalefactor Band base. IS not possible
  for >= 16 kHz (no Scalefactor !!!)
- IS can only be in-phase  (7 directions possible, time resolution 12/4 ms)

Musepack/SV7:
- LR Stereo, MS Stereo, switchable on subband basis
- IS can only be in-phase (a lot of directions possible, time resolution 8 ms)
  (This is not used).

AAC:
- LR Stereo, MS Stereo, switchable on scale factor band basis
- ...
- IS can be in-phase and out-of-phase (? directions possible, time resolution ? ms)

Vorbis:
- ...
- IS can be in-phase and out-of-phase.
--  Frank Klemm

  • Gabriel
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #9
Shit, you are right, IS can not be used in sfb21 for mp3!

I never though about that, although it is obvious. Too bad because it is where it could be more usefull.

Note that in mpeg-2 layer III there are more than 7 directions for IS.

  • takehiro
  • [*][*]
  • Developer
Treating of >16 khz freqs
Reply #10
Quote
Originally posted by Frank Klemm


MP3 has NO 'scale factor' for the range from 16-22.05 kHz (fs=44.1 kHz).
To be able to store 16-22.05 kHz you must pump a LOT of bits into the region
0...16 kHz. You must pump so much bits into the low frequency region, that this
would increase bitrate by 100...600 kbps. So you can only do this for a small
amount of frames.

Frames with contens above 16 kHz must be quantized fully different from other frames if you don't want to add only noise to sfb21.

Quite hacky fix, but we can encode the sfb21 without such big bit consumption.
see my post to the lame-dev about "pseudo substep quantization".

The point is "trancation". Using trancation is virtually "minus" scalefactor. The global gain should be pump up to save the noise in sfb21. But using trancation in 0-16kHz region will reduce the bitrate.
May the source be with you! // Takehiro TOMINAGA

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #11
So when it says "mp2 Joint Stereo", that means the encoder has the option of using IS frames? but NOT MS frames?

That bascially means that JS should not be used for high quality in MPEG layer 2?

D.

Treating of >16 khz freqs
Reply #12
Quote
Originally posted by 2Bdecided
That bascially means that JS should not be used for high quality in MPEG layer 2?


AFAIK MPEG-I layer 2 wasn't even designed for high quality

  • rjamorim
  • [*][*][*][*][*]
Treating of >16 khz freqs
Reply #13
Quote
Originally posted by Slo Mo Snail
AFAIK MPEG-I layer 2 wasn't even designed for high quality


Heh, it really sucks at low bitrates, but can beat any MP3 implementation out there at high bitrates using the problem cases (castanets, fatboy...)

The reason is the usual: subband vs. transform.


Besides, keep in mind that Musepack is based on MP2 algorithms.

Regards;

Roberto.
Get up-to-date binaries of Lame, AAC, Vorbis and much more at RareWares:
http://www.rarewares.org

  • Frank Klemm
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #14
Quote
Originally posted by takehiro

Quite hacky fix, but we can encode the sfb21 without such big bit consumption.
see my post to the lame-dev about "pseudo substep quantization".

The point is "trancation". Using trancation is virtually "minus" scalefactor. The global gain should be pump up to save the noise in sfb21. But using trancation in 0-16kHz region will reduce the bitrate.


URL or private mail to my home mail address (not changed in the last 10 years)?
--  Frank Klemm

  • JohnV
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #15
Quote
Originally posted by rjamorim
Heh, it really sucks at low bitrates, but can beat any MP3 implementation out there at high bitrates using the problem cases (castanets, fatboy...)
The key word here is "can". It can also be clearly worse than what comes out from an MP3 encoder. That's because MP3 encoders' (at least Lame,FhG) psychoacoustics is often more tweaked than MP2 encoder's.
Juha Laaksonheimo

  • Frank Klemm
  • [*][*][*][*][*]
  • Developer
Treating of >16 khz freqs
Reply #16
Quote
Originally posted by JohnV
The key word here is "can". It can also be clearly worse than what comes out from an MP3 encoder. That's because MP3 encoders' (at least Lame,FhG) psychoacoustics is often more tweaked than MP2 encoder's.


This is uninteresting. There is no lower limit for quality. You can write an encoder
with arbitrary worse quality. It must only produce the right bitstream syntax.

Note:
There is a commercial AAC encoder with a typical quality below tooLame.
Price is some ten thousands of US$ (test bitrate was 128 kbps/stereo).

The article David mentioned must be:

http://www.digitalradiotech.co.uk/bitrate3.pdf
--  Frank Klemm