AAC+ (HE AAC) vs. mp3PRO

Discussion in 'General Software Discussion' started by GigaWatt, Mar 4, 2009.

  1. GigaWatt

    GigaWatt Now In Color :D

    i've been pondering on this subject for a while... but let's start at the beginning... ;)

    the AAC (Advanced Audio Codec) codec was invented as a substitute for the MP3 codec. the AAC+ (HE AAC - High Efficiency Advanced Audio Codec) codec on the other hand wasn't envented to be used commercially. it's purpose was to be used in the new standard DAB (Digital Audio Broadcasting) radio stations, i.e. DAB+ radio stations. the new DAB+ receivers are embedded with the AAC+ codec and can decode HE AAC, as well as the regular AAC coded stream.

    the AAC codec has a very similar coding scheme as the MP3 codec, except the AAC codec differs from the MP3 standard in some coding algorithm:

    - higher frequency resolution: the bandwidth of the audio file is devided in 1024 subbands, compared to MP3 which has only 576.

    - prediction: some test have shown that better coding efficiency can be achieved by predicting the amplitude of the next sample in the audio stream. this can be done by knowing the amplitude of the previous sample of the audio stream.

    - improved joint stereo coding: compared to MP3, both mid/side and intensity stereo coding is more flexible, allowing lower bit-rates to be applied more frequently without any change to audio quality, which in the end is represented as a smaller (in size) audio file.

    - improved Huffman coding: in AAC coding, the Huffman code is applied to quadruples of frequency subbands, which in MP3 coding was done to a single frequency subband. this allows larger flexibility of the values given in the Huffman coding tables, which results in higher audio quality of the encoded stream.

    on the other hand, the AAC+ codec has a whole new algorithmic block added in the coding scheme, so is in no way similar to the AAC codec. that's why most players that had no problem with AAC streams couldn't decode AAC+ streams when the codec was first standardized.

    the AAC+ codec uses a coding scheme which is know as SBR (Spectral Band Replication). SBR doesn't replace the core codec, but rather operates in conjunction with it, to create a more efficient coding engine that can cut the required bit-rate in half to achieve the same audio quality. actually SBR interlaces the corelation between the low and the high frequency spectrum so that the high frequencies of the audio signal are described using a verry small amount of data. the SBR data describing the high frequencies is combined (coupled) with the low frequency data from the AAC stream. a simple block diagram of a AAC+ coder/decoder (codec) is show below.

    [​IMG]

    mp3PRO encoding is done in very much the same way, except the high frequency SBR data is coupled with the low frequency MP3 data.

    so, is AAC+ better than mp3PRO, or is it the other way around? the most commonly used two methods to determine this are:

    1) blind listening tests: i think this method is more reliable, although there is not much science involved in it. it simply shows a statistical value if one codec is better than the other at same bit-rates.

    2) signal analysis: this is mostly done by FFT (Fast Fourie Transform) spectral analysis of the coded signal of both codecs. since most of the audio is lost in the high frequency range during encoding, a spectral analysis will reveal the pros and cons of each codec.

    i haven't done a blind listening test of both codecs, but mp3PRO does seem to sound better than AAC+ at the same bit-rate. but since most of my files are mp3PRO encoded, this result is bias, so it may as well be disregarded.

    the signal analysis was done using the mp3PRO Fraunhoffer IIS encoder and the Nero MP4 HE AAC encoder using Cool Edit Pro 2.0. the audio file was encoded from wav to mp3Pro and AAC+ at 64kbps, 44.1KHz. the spectral analysis is done using a Blackmann-Harris FFT algorithm with 1024 sample frequency resolution. both left and right channel are scanned. here are the results of the spectral analysis of the same audio track (Pigs In Space - Solar).

    original wav file (logarithmic view)

    [​IMG]


    original wav file (linear view)

    [​IMG]


    AAC+ encoded audio file (logarithmic view)

    [​IMG]


    AAC+ encoded audio file (linear view)

    [​IMG]


    mp3PRO encoded audio file (logarithmic view)

    [​IMG]


    mp3PRO encoded audio file (linear view)

    [​IMG]

    the results are obvious, but let's go through the pros and cons of AAC+ and mp3PRO encoding.

    AAC+ pros:

    1) larger bandwidth: the graph clearly shows that the cutoff frequency of the AAC+ encoded file is around 20KHz, whereas in the mp3PRO encoded file is around 16KHz. so, AAC+ has a 4KHz plus bandwidth advantage over mp3PRO. unfortunately, most of us have lost their sense of hearing above 16KHz, but nevertheless, the bandwidth gain is not neglectible.

    AAC+ cons:

    1) bandwidth stepping effect: this is common with most codecs that use frequency subband division as a technique to generate the Huffman coding tables. MP3 uses the same technique, but unlike AAC, the subbands are not attenuated as the frequency of the signal is increased (rises). i guess that is why we can see that "climbing stairs" effect in the linear view of the AAC+ encoded file.

    mp3PRO pros:

    1) no bandwidth stepping effect: unlike AAC+, there are no steps in the frequency analysis. the sound hasn't lost his sharpness (in the higher frequencies) like AAC+.

    mp3PRO cons:

    1) loss of bandwidth: AAC+ has a 4KHz plus bandwidth advantage over mp3PRO, which makes mp3PRO the inferior codec in bandwidth handling.

    i guess that covers about everything i could think of on the subject. i'll see if i could make a blind listening test of the two codecs and compare the results. ;)
     
  2. Mac Daddy

    Mac Daddy New Member

    Interesting post man and will have to check it again when I am not so dang tired :)

    Great job on envented change that to invented in the second sentence ;)
     
  3. GigaWatt

    GigaWatt Now In Color :D

    thanks :cool:

    i was actually thinking of encoding audio in AAC+, but i had no idea how the codec really worked or if it was better than mp3PRO (since almost all of my MP3 collection is in mp3PRO), so i did some analysis of my own... ;)
     
  4. Mac Daddy

    Mac Daddy New Member

    Never know until ya play around with it man ;)
     
  5. dj_stick

    dj_stick Apple Fanboy? Staff Member

    Nice testing

    Can't say I've really bothered taking a look at either standard, but it's nice to know

    Just a comment on this, even though most people do lose the ability to directly hear higher frequencies, we can still hear the "effect" those higher frequencies have on the timbre of a sound. I didn't really believe that myself until I heard the 31khz (yes, 31khz) shelf boosted on an Avalon 747 EQ - while I couldn't directly hear any of the higher frequncies, there was a "sparkle" that brightened up the entire mix.

    So don't just dismiss the higher frequencies because you believe you cna't hear them, they are there, and they do affect the sound...
     
  6. Judas

    Judas Obvious Closet Brony Pony

    all the frequencies of audio are like ingrediants in a damn good cake..

    While some are nearly inaudioable or most people might not pick up on those specific frequencies.... it will always have an effect on the others....

    Btw... what values were used for the bitrates?... wouldn't higher bitrate audio in either format more closely resemble the raw wav file?

    I'm still unsure about Multi Channel audio formats to..
     
  7. GigaWatt

    GigaWatt Now In Color :D

    yeah, i know... ;).. most of us have lost their "objective" hearing above 16KHz, but many of us can "sense" (in a way) what is happening above 16, or even 21KHz... ;)... that's why i wrote...

    i just didn't want to get into details at the moment... ;)
     
  8. GigaWatt

    GigaWatt Now In Color :D

    the bitrate used for both codecs was 64kbps 44.1KHz, but (just a reminder) this is not an MP3 or an AAC encoded file. both codecs have SBR implementation, so they both sound the same as MP3 and AAC at half the bitrate. larger bitrates would have a large improvement on quality, but with lower bitrates it's much easier to detect mistakes that the codec makes than in higher, that's why i used lower bitrates... ;)

    at this time, AAC+ doesn't support multichannel audio (the purpose for which the codec was invented was DAB - Digital Audio Broadcasting, not home theater). i guess you could encode a multichanel file in AAC+ or mp3PRO manually, but i have never done it, so i can't guarantee that it will work with most audio or video players...

    BTW, the mp3PRO codec is not an open source codec, so there is no directshow filter for it, only the mp3RO plugin for winamp is available at the moment...
     
  9. Judas

    Judas Obvious Closet Brony Pony

    so this is just testing for something that would be used to streaming audio over the internet rather then as an onsite file...?
     
  10. GigaWatt

    GigaWatt Now In Color :D

    no, no... :D... the DAB (uses AAC codec) and DAB+ (uses AAC+ codec) standards are intended for terrestrial use... they are transmitted just like any other FM or UHF TV signal... except the signal is in digital form... it uses OFDM (Orthogonal Frequency Division Multiplex) as a modulation mechanism, just like DVB (Digital Video Broadcasting).

    mp3PRO was intended for commercial use, but AAC+ wasn't. after a while, the commercial version of the AAC+ codec was released, so now the decoding (and the encoding) of the AAC+ streams (either on online radios or AAC+ files on HDD) can be done by PC... ;)
     
  11. Judas

    Judas Obvious Closet Brony Pony

    ah.

    what about AC3... aren't they kinda similare?
     
  12. Matth

    Matth Flash Banner Hater

    At Hydrogenaudio, they always say listen, don't look, as the purpose of any lossy encoder is to determine what it can get away with, and achieving a beautiful frequency response usually means sacrificing something else.
     
  13. GigaWatt

    GigaWatt Now In Color :D

    nope, AC3 (Audio Codec 3) uses a different coding mechanism, i think Dolby is behind the development of AC3, while in the case of AAC and AAC+, Coding Technologies and Tompson are the ones developing the codec. besides, AC3 has no SBR implementation... ;)

    yeah, i know... ;)... the ear is the first in line test tool... ;)

    but since i'm an "mp3PRO fan" (almost all of my encoded music is in mp3PRO), my judgement would be bias (subjective), not objective... so i decided not to do one...

    if anybody is interested, i could give them and mp3PRO and an AAC+ encoded file and make some sort of a blind listening test... of course i will give the files without an extension, just drag and drop into the player... lol :D
     
  14. Judas

    Judas Obvious Closet Brony Pony

    winamp is usually the thing that would identify it right away..

    i think for a blind testing... you'd have to create a webpage with an inbeded player.... have it marked button 1 and button 2.... click button 1 to play .... and click button 2 to play.... unmarked... should be the easiest for blindly listening.
     
  15. dj_stick

    dj_stick Apple Fanboy? Staff Member

    There's not really much to know about Multi-channel formats, in fact, technically speaking, any stereo file IS multi-channel

    the only difference with AC3, WMApro or others, is that the format supports more than 2 channels interleaved (in the one file)

    .wav files can also have more than two channels, just most audio players will either not read it or only play the first two channels
     
  16. GigaWatt

    GigaWatt Now In Color :D

    not in the mood right now for that... besides, i have no intention of dedicating a whole website to test if AAC+ is better than mp3PRO (or the other way around)... if people are really honest, they won't look in the "view file info" option in winamp...

    exactly... :)
     
  17. RoyBatty

    RoyBatty Well-Known Member

    For blind testing - why create a website? Use the ABX tool in Foobar (for example).
     
  18. Judas

    Judas Obvious Closet Brony Pony

    why aren't multichannel (not referring to stereo) formats not being excersized...

    Quadrophonic systems have been available since the late 70's, and anyone that was able to take advantage of it was pretty impressive. It's like going from mono to stereo.... stereo to quadrophonic or surround sound... the differences are huge and extremely impressive.

    It's like none of the creators of mixing programs and whatnot even care, even though there is a market out there.
     
  19. GigaWatt

    GigaWatt Now In Color :D

    maybe because real surround sound (5.1, 7.1, etc.) is hard to create... sure listening to it might be fun, but have you ever seen how surround mixes are made... it's pretty hard, trust me... especially if they are done manually, and if you want your recording to sound right, you have to get your hands dirty...

    quadraphonic speakers (at least in the 70s) were nothing more than an extension of the stereo format... two more speakers connected in parallel with the firs ones... some of the old sound systems had some delay added, or some kind of filtering (so that the sound would be more vivid and lively), maybe a loudness button, but most of them didn't... they just had another set of connectors for two more speakers in parallel with the first two... so basically, the sound was either modified from stereo to quadraphonic, or there were just two more speakers in the room...

    the market for this sort of thing is pretty small... you may be one of the few who really care if the sound coming from your surround system is really a 5.1 sound or just 2.0, or 2.1... this is mainly because configuring the layout of real (high-end) surround speakers in a room is pretty hard... lot's of factors have to be taken in the equation, including furniture alignment, the acoustic properties of the room itself, resonant frequency of the room with that specific furniture alignment (if you change the location of the furniture, the resonant frequency changes too, so would have to do the whole thing all over again)... stereo configurations are so much easier to configure in a room, you could place the two speakers just about anywhere in the room (figuratively speaking of course) and still feel the stereo effect of the two speakers, while in the surround configuration, if the speakers are not placed properly, you could end up loosing the whole surround effect that you have fought so eagerly to obtain... with stereo, it's much more simple...

    besides, regular CD players (or most professional DJ players, DAT players, professional beta video recorders, etc...) don't support the surround format (as far as i know, beta video tapes support only 4 audio channels, and most CD players only have stereo outputs, the same applies to DAT players)... so unless the surround format is implemented in most TV and radio stations (satellite, terrestrial...) and an easy to use guide is made how to properly install a surround speaker system in your home (and i'm not talking about those cheap PC and DVD "all in one" surround speakers), i think the market for this kind of thing would remain in the minority... ;)

    hmmm... i'm not familiar with that software, could you explain in more detail... thanks... ;)
     
  20. Judas

    Judas Obvious Closet Brony Pony

    the quadrophonic setup in the later 70's actually did apply what would today be called somewhat similare to a Pro Logic setup... it did indeed modify the sound/enhanced it. I've still got the orginal 8 Track deck with the quadrophonic option that came in the Lincoln continental Mark 5 which at the time had the latest and greatest options conceived.

    While most other stereoes for cars or homes only provided essentially a doubling of hardware equipment.. not quadrophonic even though there are 4 speakers.

    Now understandably with the current panning system that is provided by most mixers and such, i've personally SEEN the mixers with surround sound capabilities, where you can actually force the .1 channel itself. The mixer i saw uses a panning system though, however it had a "click" mechanism so that on the fly mixing, you could pan from center speaker over to lets say the right .. and then pan further to the rear right. The software that you installed for this used raw Wav files for the 6 channel audio which you could later compress into i beleive it was AC3 and a few other formats including WMA.

    The other specifically software only multichannel audio allows you to designate specific channels. Essentially audio tracks you can see visually but each track had it's own surround sound channel, course you could move these however you liked.

    I agree normal cds and the like aren't capable of this at all.. never will be.... however DVD audio came around and was more or less ignored, an unfortunate set of events as it pretty much killed it and turned it into a major niche market.

    However now with software/file downloads of music, it's MUCH easier for people to experience this, and to boot, audio systems are now able to playback such file types. I don't have a doubt that if iTunes provided a bunch of albums both in normal and surround sound types at either a few pennies more or same price, that a good number of people would get the surround sound type even at 2 or 3 times the size.

    It's all very interesting none the less.
     

Share This Page