Re: AAC frame lengths
Reply #34 – 2024-11-10 10:29:44
Thanks for solving my confusement. But I want to ask that why you added just one intermediate value @C.R. Helmrich ? Even if only 2 bits are used for giving the block length, this adds enough space for 2 intermediate values. Also, what does "with low window overlap" means? And, what is MPEG-H and how can I get it? Also, I wonder why these block lengths are selected (and no intermediate values are added) and especially why 1024 and 960 samples are selected as frame lengths (they have a very small difference between them, so why not for example 1024 and 768?). Once you've learned about transform windows like sine window and KBD window, about the Princen-Bradley condition for perfect reconstruction during the overlap-and-add process when using the MDCT, about computational complexity and memory requirements and why they matter especially in audio decoders (all of which you can Google/Bing and find books or scientific papers on), you'll be able to answer all these questions yourself. It takes time to learn and understand all these things, and I'm afraid there's no shortcut. You need to know the basics of this "craft" first. 960 samples give you a frame length of exactly 20ms with 48 kHz sampling rate, which is (or was) desirable in some applications... not so much anymore, that's why it was removed when developing xHE-AAC and MPEG-H 3D Audio. A block size of a power of 2, like 1024, or something power-of-2 times a small number, like 768, is easier to implement than other block sizes. Also, once you've implemented your own first codec, you might find (as others did, as early as the 1980s, during the development of MP3 e.g.) that having lots of flexibility in the choice of block lengths doesn't necessarily make the codec better, because it 1) makes it "harder" to find the "best" block length(s) for an audio frame during ecoding, 2) makes the transitions between blocks of different length more complicated... due to the transform windows, and here we're back at the beginning of this post. Chris