Skip to main content
Topic: aac encoder & decoder 24 bit sample size (Read 8760 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

aac encoder & decoder 24 bit sample size

I have aac encoder & decoder which support 16bit sample size.
I would like to change the aac to support 24 bit sample size.

Please let me know is this supported in aac standard.

is it possible to 16bit sample source code to 24bit sample size at encoder side ?

Is the ADC input should be in 24 bit sample size ?

Is it encoder need to take care about sample size ?

I think something we can set it for decoder side  if DAC support 24 bit.

aac encoder & decoder 24 bit sample size

Reply #1
AAC is a lossy format and as such does not have a strictly defined bit depth.  Decoders may have the ability to accept PCM input with different bit depths, or not, and a decoder may have the ability to output in different bit depths, but internally the AAC format will be the same.  Lossy decoders typically don't output anything other than 16 bit integer or 32 bit float because it wouldn't be meaningful, and many only output 16 bit ints.

aac encoder & decoder 24 bit sample size

Reply #2
Most likely the encoder begins with a function that converts 16 bit inputs to 32 bit and ends with a function that converts 32 bit outputs to 16 bit.  Changing that should be simple.

Only exotic hardware like DSPs will use 16 bit internally as it usually requires hardware support for things like saturated arithmetic or hardware fixed point operations.

aac encoder & decoder 24 bit sample size

Reply #3
I think an decoder should have ability to output PCM data like DAC expected bit depth.
So you people are telling encoder dont care about input PCM size ?

aac encoder & decoder 24 bit sample size

Reply #4
I think an decoder should have ability to output PCM data like DAC expected bit depth.


Depends if someone implemented it.  Often they only bother to implement down-conversion to 16 bit, since thats all most people use.

So you people are telling encoder dont care about input PCM size ?


Most don't, but some rare ones do.  What encoder are you using?

aac encoder & decoder 24 bit sample size

Reply #5
I think an decoder should have ability to output PCM data like DAC expected bit depth.


Depends if someone implemented it.  Often they only bother to implement down-conversion to 16 bit, since thats all most people use.

why we required 24 bit aac encoder?
If sample size is 24 bit depth thenext can we possible to use 16 bit aac encoder ?
To support 96 kHz are we need 24 bit sample size input aac encoder?


So you people are telling encoder dont care about input PCM size ?


Most don't, but some rare ones do.  What encoder are you using?


aac encoder & decoder 24 bit sample size

Reply #6
AAC encoders don't support true 96 kHz at all. Since the point of lossy codecs is to save as much space as possible by removing inaudible information, frequencies above 20 kHz are the first thing to go. I think Apple's AAC encoder supports pseudo 96 kHz by using SBR, i.e. it encodes only the audible frequencies up to ~20 kHz and then uses SBR to create an approximation of the frequencies from 20 - 48 kHz that were contained in the lossless original. Since those frequencies are inaudible anyway, such an AAC file would theoretically sound the same as one where you had simply lowpassed the high frequencies.

aac encoder & decoder 24 bit sample size

Reply #7
AAC encoders don't support true 96 kHz at all. Since the point of lossy codecs is to save as much space as possible by removing inaudible information, frequencies above 20 kHz are the first thing to go. ...

C. Bürgel et al., "Beyond CD-Quality: Advanced Audio Coding (AAC) for High Resolution Audio with 24 Bit Resolution and 96 kHz Sampling Frequency," 111th AES Convention, Nov. 2001.

Available e.g. here. Nothing has changed since then. IIRC the Winamp encoder can do 96-kHz AAC-LC CBR encoding/decoding at high bit-rates.

(Edit: It should also be able to do encoding from and decoding to 24 bit.)

Chris
If I don't reply to your reply, it means I agree with you.

aac encoder & decoder 24 bit sample size

Reply #8
AAC encoders don't support true 96 kHz at all. Since the point of lossy codecs is to save as much space as possible by removing inaudible information, frequencies above 20 kHz are the first thing to go. ...

C. Bürgel et al., "Beyond CD-Quality: Advanced Audio Coding (AAC) for High Resolution Audio with 24 Bit Resolution and 96 kHz Sampling Frequency," 111th AES Convention, Nov. 2001.

Available e.g. here. Nothing has changed since then. IIRC the Winamp encoder can do 96-kHz AAC-LC CBR encoding/decoding at high bit-rates.

(Edit: It should also be able to do encoding from and decoding to 24 bit.)

Chris


Does anyone know for sure, if fhgaacenc (from Winamp) and qaac (frontend to Apple Core Audio) can encode 24bit/96kHz and decode back to 24bit/96kHz?
Im asking because the Sony Xperias (I have the Z3compact) are capable of playing 24bit/96kHz through the internal or through an external USB DAC such as the Audioquest Dragonfly. It would be nice to be able to save some space on the SD card by storing a "highrez" aac file instead of the huge lossless 24bit/96kHz FLAC file. I would assume the quality of this "hirez" aac file to be better than a plain aac encode of a downsampled 16bit/48kHz file, if the encode / decode process actually happens at 24bit/96kHz.
Thanks for any views on this?


aac encoder & decoder 24 bit sample size

Reply #9
I would assume the quality of this "hirez" aac file to be better than a plain aac encode of a downsampled 16bit/48kHz file, if the encode / decode process actually happens at 24bit/96kHz.

It's a bit counter-intuitive, but there is usually no benefit to "hirez" at all, and it can even be worse than lower resolutions. The only situation I know of where the increased resolution can improve quality is in poorly-designed DACs that have better operating characteristics at higher sample rates, and I doubt either of the DACs you're using have that problem.

AAC doesn't have a bit depth, so if you really want to you can keep it at 24 bits when you downsample to 44.1 or 48 kHz. (Even if the encoder does use all 24 bits, you'll probably never come across a situation where the difference is audible.)

aac encoder & decoder 24 bit sample size

Reply #10
I would assume the quality of this "hirez" aac file to be better than a plain aac encode of a downsampled 16bit/48kHz file, if the encode / decode process actually happens at 24bit/96kHz.

It's a bit counter-intuitive, but there is usually no benefit to "hirez" at all, and it can even be worse than lower resolutions. The only situation I know of where the increased resolution can improve quality is in poorly-designed DACs that have better operating characteristics at higher sample rates, and I doubt either of the DACs you're using have that problem.

AAC doesn't have a bit depth, so if you really want to you can keep it at 24 bits when you downsample to 44.1 or 48 kHz. (Even if the encoder does use all 24 bits, you'll probably never come across a situation where the difference is audible.)


Thanks, Octocontrabass
I haven't looked at the xiph site in a while and it is a thorough analysis of the hirez question. I do hear differences between a (very good) 96kHz source that was actually recorded in hirez and a version downsampled with SOX to 48kHz. I tend to prefer the 96kHz source. Whether that is solely due to expectation bias or due to actual differences, I don't know. I have never done this comparison in ABX environment, and on that ground you can disqualify my comment.
What is very clear to me however is that high resolution audio is often mastered with greater care and sometimes sounds "more precise" or has more "air". Again, whether that is due to some "acoustic flavor enhancment" during mastering, I don't know. Adding cream to strawberries does improve the eating experience. Adding double cream even more.
Be it as it may,  downsampling and then encoding may indeed be sufficient (taking care that no clipping occurs along the way).

aac encoder & decoder 24 bit sample size

Reply #11
I do hear differences between a (very good) 96kHz source that was actually recorded in hirez and a version downsampled with SOX to 48kHz. I tend to prefer the 96kHz source.


Statements like this require you to provide evidence:

http://www.hydrogenaud.io/forums/index.php?showtopic=3974

Since this is a pretty bold claim made really casually, I'm going to guess that probably you haven't looked into this nearly as carefully as you ought to before making up your mind.

Whether that is solely due to expectation bias or due to actual differences, I don't know.


Then do not say that you do two sentences earlier in the same paragraph!

aac encoder & decoder 24 bit sample size

Reply #12
Does anyone know for sure, if fhgaacenc (from Winamp) and qaac (frontend to Apple Core Audio) can encode 24bit/96kHz and decode back to 24bit/96kHz?

Why don't you try it yourself? As for qaac, 96kHz is not supported for AAC-LC. It's downsampled to 48kHz.

Quote
I would assume the quality of this "hirez" aac file to be better than a plain aac encode of a downsampled 16bit/48kHz file, if the encode / decode process actually happens at 24bit/96kHz.

Why do you think so?
I think no perceptual coder keeps ultrasonic upto 48kHz anyway, since human ear cannot perceive it. It IS the first place where perceptual coder can throw bits away for better compression.
Furthermore, MDCT block size of AAC is fixed in number of samples. Therefore, on 96kHz, block length (in terms of time) is 1/2 of the 48kHz case. Simply speaking, shorter block means better resolution in time domain, but worse in freq domain.
Anyway, characteristics of 96kHz encoding should at least be different from ordinary 44.1kHz/48kHz, and I guess no AAC encoders are targeted/tuned for "hi-res" sample rate.

aac encoder & decoder 24 bit sample size

Reply #13
@Saratoga
Ne need to guess to what degree of scientific rigour I have looked into this. I clearly stated
Quote
Whether that is solely due to expectation bias or due to actual differences, I don't know. I have never done this comparison in ABX environment, and on that ground you can disqualify my comment.
clearly admitting that the result may well be due to expectation bias.
If I violated a forum rule by doing this, I apologize. Your response, does seem a bit harsh, though.

@nu774
I have tried the 96kHz encode and both fhg and qaac encoded files decode to a 96kHz file in jRiver if the HE / SBR option is used when encoding. Without the HE switch they decode to 48kHz.
Re. 24bit output, is it possible to force 24bit output when decoding. In the meantime I am aware that an aac file does not have a "bit" oriented structure. And it also is not a question whether there is an audible difference between 16bit or 24bit decode. I am just curious whether the encode / decode chain supports a decode to 24bit.

aac encoder & decoder 24 bit sample size

Reply #14
Saratoga is right. If you can't back your claim that you heard a difference, you aren't allowed to state it.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

aac encoder & decoder 24 bit sample size

Reply #15
I am just curious whether the encode / decode chain supports a decode to 24bit.

Since the lossy encoded file has no inherent bitdepth, the decoder is free to decode to any desired bitdepth, independent of the bitdepth of the original. This would be a function of the particular decoder, though it would probably default to decoding to the same bitdepth as the original.

aac encoder & decoder 24 bit sample size

Reply #16
I am just curious whether the encode / decode chain supports a decode to 24bit.

Since the lossy encoded file has no inherent bitdepth, the decoder is free to decode to any desired bitdepth, independent of the bitdepth of the original. This would be a function of the particular decoder, though it would probably default to decoding to the same bitdepth as the original.

Thanks, pdq. Your answer pointed me in the right direction:
Here in paragraph 8 the author describes how different Players (jRiver, foobar etc.) handle decoding and how to optimize the behaviour.
Issue resolved, thanks everyone.

aac encoder & decoder 24 bit sample size

Reply #17
AAC encoders don't support true 96 kHz at all.

Code: [Select]
Audio
ID                                       : 1
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Bit rate mode                            : Variable
Bit rate                                 : 288 Kbps
Maximum bit rate                         : 319 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 96.0 KHz
Compression mode                         : Lossy
Writing library                          : Nero AAC codec 1.5.4.0

Looks like Nero can do it and no SBR at all AFAIK.

aac encoder & decoder 24 bit sample size

Reply #18
Looks like Nero can do it and no SBR at all AFAIK.


The allowed sampling rates for AAC-LC include:

96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000

Most are not very widely used though.

aac encoder & decoder 24 bit sample size

Reply #19
However it looks like Nero cuts at 30 kHz:

Original WAV:


Nero encoding:

aac encoder & decoder 24 bit sample size

Reply #20
Please explain why a perceptual encoder should need to go even that high.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

 
SimplePortal 1.0.0 RC1 © 2008-2018