Modified discrete cosine transform: Difference between revisions

Content deleted Content added
 
(One intermediate revision by the same user not shown)
Line 77:
''a'' and of ''b''<sub>''R''</sub> to the MDCT of (''a'', ''b'', ''c'', ''d''), or equivalently, to
the result of
: IMDCT&nbsp;(MDCT&nbsp;(''a'', ''b'', ''c'', ''d''))&nbsp;=&nbsp; (''a''&minus;''b''<sub>''R''</sub>, ''b''&minus;''a''<sub>''R''</sub>, ''c'' + ''d''<sub>''R''</sub>, ''d'' + ''c''<sub>''R''</sub>) / 2.
The combinations ''c''&minus;''d''<sub>''R''</sub> and so on, have precisely the right signs for the combinations to cancel when they are added.
 
For '''odd''' ''N'' (which are rarely used in practice), ''N''/2 is not an integer, so the MDCT is not simply a shift permutation of a DCT-IV. In this case, the additional shift by half a sample means that the MDCT/IMDCT becomes equivalent to the DCT-III/II, and the analysis is analogous to the above.
 
=== Smoothness and discontinuities ===
 
We have seen above that the MDCT of 2''N'' inputs (''a'', ''b'', ''c'', ''d'') is equivalent to a DCT-IV of the ''N'' inputs (−''c''<sub>''R''</sub> − ''d'', ''a'' − ''b''<sub>''R''</sub>).
The DCT-IV is designed for the case where the function at the right boundary is odd, and therefore the values near the right boundary are close to 0. If the input signal is smooth, this is the case: the rightmost components of ''a'' and ''b''<sub>''R''</sub> are consecutive in the input sequence (''a'', ''b'', ''c'', ''d''), and therefore their difference is small.
''c'', ''d'') is equivalent to a DCT-IV of the ''N'' inputs
Let us look at the middle of the interval: if we rewrite the above expression as (−''c''<sub>''R''</sub> − ''d'', ''a'' − ''b''<sub>''R''</sub>) = (−''d'', ''a'') − (''b'', ''c'')<sub>''R''</sub>, the second term, (''b'', ''c'')<sub>''R''</sub>, gives a smooth transition in the middle.
(&minus;''c''<sub>''R''</sub>&minus;''d'',
However, in the first term, (−''d'', ''a''), there is a potential discontinuity where the right end of −''d'' meets the left end of ''a''.
''a''&minus;''b''<sub>''R''</sub>).
This is the reason for using a window function that reduces the components near the boundaries of the input sequence (''a'', ''b'', ''c'', ''d'') towards 0.
The DCT-IV is designed for the
case where the function at the right boundary is odd, and therefore
the values near the right boundary are close to 0. If the input signal is smooth,
this is the case: the rightmost components of ''a'' and ''b''<sub>''R''</sub> are
consecutive in the input sequence (''a'', ''b'', ''c'', ''d''), and
therefore their difference is small.
Let us look at the middle of the interval:
if we rewrite the above expression as
(&minus;''c''<sub>''R''</sub>&minus;''d'',
''a''&minus;''b''<sub>''R''</sub>) = (&minus;''d'', ''a'')&minus;(''b'',''c'')<sub>''R''</sub>,
the second term, (''b'',''c'')<sub>''R''</sub>, gives a smooth
transition in the middle.
However, in the first term, (&minus;''d'', ''a''), there is a
potential discontinuity where the right end of
&minus;''d'' meets the left end of ''a''.
This is the reason for using a window function that reduces the components
near the boundaries of the input sequence (''a'', ''b'',
''c'', ''d'') towards 0.
 
=== TDAC for the windowed MDCT ===