## Topic: overlap add in window swiching (Read 2685 times)previous topic - next topic

0 Members and 1 Guest are viewing this topic.
• leen
##### 10 March, 2004, 06:00:06 AM
Hello ~~

I know how overlap and add afer IMDCT helps is zeroing the aliasing in equal size winodw .
But I am not able to find it mathematically when it is winodw switching . Can anyone explain me that

regards

leen

• SebastianG
• Developer
##### Reply #1 – 02 April, 2004, 07:01:58 AM
I prefer to view the (i)MDCT as 2 seperate orthogonal transforms. It eases the implementation and reduces the probability of using a false window sequence.

MDCT (forward)
a) butterflies (rotations) between blocks (dependant on the window function)
b) MDCT-core transform on blocks (involutional orthonormal matrix)

iMDCT (inverse)
a) MDCT-core transform (because this transform is its own inverse)
b) inverse butterflies to "cancel the blocking"

the n*n "MDCT-core" matrix A is given by
A_{i,j} = \sqrt{\frac{2}{n}} \cos \frac{(i+0.5)*(j+0.5)*PI}{n}
(for i,j = 0...n-1, n being the number of subbands)

If you look at this matrix and at the "official" MDCT definition, you'll able to figure out, what I meant by the butterflies-rotations. (I don't know how to explain it well right now)

With this perspective it's IMHO easy to realize how the whole thing is a perfect reconstruction filterbank - even with different windows and transform block lengths.

Unfortunately Vorbis's MDCT is a flipped version of this. You have to reverse the time signal *or* have to code a forward-core and inverse-core (not involutional core anymore)

BTW: It's possible to reduce the MDCT-core transform to a n/2-point complex FFT with some pre/post rotations.

HTH,
Sebastian

• wkwai
• Developer
##### Reply #2 – 02 April, 2004, 08:34:30 AM
Quote
I prefer to view the (i)MDCT as 2 seperate orthogonal transforms. It eases the implementation and reduces the probability of using a false window sequence.

Can you clarify this statement? Do you mean there is a better way to detect block size changes?

• wkwai
• Developer
##### Reply #3 – 02 April, 2004, 08:43:28 AM
Quote
Hello ~~

But I am not able to find it mathematically when it is winodw switching . Can anyone explain me that

regards

leen

Do you mean window switching by block size switching ? Because in AAC there is another window shape switching between sin window and KB window !!!

As for block size switching.. I am afraid (as far as I know) it is very much an "ART"... Not one single technique is sufficient to correctly switch 100%.. In AAC, there is even additional tools to aid block switching just in case it fails.. the TNS tool & Gain Control tool..

• SebastianG
• Developer
##### Reply #4 – 02 April, 2004, 12:13:21 PM
Quote
Can you clarify this statement? Do you mean there is a better way to detect block size changes?

What do you mean by "detect a blocksize" ?
I just said to that the whole MDCT stuff is equivalent to the procedure I described above and that it's IMHO easy to realize the correctness of it this way because the whole thing is a concatenation of 2 orthonormal transforms.
Consider you've already chosen what packet-modes you want to use for encoding (short or long transform).
...|xxxxxxxxxxxxxxxx|xx|xx|xxxxxxxxxxxxxxxx|xxxxxxxxxxxxxxxx|...  (time signal)
The remaining thing is: apply a bunch of rotation butterfliess across each | dependant on the transition function (window-half) and do the "MDCT-CORE" transforms by applying its square orthonormal matrix to all the blocks.

Quote
Quote
Hello ~~
But I am not able to find it mathematically when it is winodw switching . Can anyone explain me that

Do you mean window switching by block size switching ? Because in AAC there is another window shape switching between sin window and KB window !!!

AAC != Vorbis

Quote
As for block size switching.. I am afraid (as far as I know) it is very much an "ART"... Not one single technique is sufficient to correctly switch 100%.. In AAC, there is even additional tools to aid block switching just in case it fails.. the TNS tool & Gain Control tool..

You're obviously referring to an encoder's job to chose the "best" transform, right ?

bye,
Sebastian

• SebastianG
• Developer