Upload
others
View
13
Download
0
Embed Size (px)
Citation preview
3: Discrete Cosine Transform
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 1 / 14
DFT Problems
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 2 / 14
For processing 1-D or 2-D signals (especially coding), a common method isto divide the signal into âframesâ and then apply an invertible transform toeach frame that compresses the information into few coefficients.
The DFT has some problems when used for this purpose:
DFT Problems
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 2 / 14
For processing 1-D or 2-D signals (especially coding), a common method isto divide the signal into âframesâ and then apply an invertible transform toeach frame that compresses the information into few coefficients.
The DFT has some problems when used for this purpose:
⢠N real x[n]âN complex X[k] : 2 real, N2 â 1 conjugate pairs
â
DFT Problems
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 2 / 14
For processing 1-D or 2-D signals (especially coding), a common method isto divide the signal into âframesâ and then apply an invertible transform toeach frame that compresses the information into few coefficients.
The DFT has some problems when used for this purpose:
⢠N real x[n]âN complex X[k] : 2 real, N2 â 1 conjugate pairs
â
⢠DFT â the DTFT of a periodic signal formed by replicating x[n] .
DFT Problems
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 2 / 14
For processing 1-D or 2-D signals (especially coding), a common method isto divide the signal into âframesâ and then apply an invertible transform toeach frame that compresses the information into few coefficients.
The DFT has some problems when used for this purpose:
⢠N real x[n]âN complex X[k] : 2 real, N2 â 1 conjugate pairs
â
⢠DFT â the DTFT of a periodic signal formed by replicating x[n] .â Spurious frequency components from boundary discontinuity.
N=20f=0.08
â
DFT Problems
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 2 / 14
For processing 1-D or 2-D signals (especially coding), a common method isto divide the signal into âframesâ and then apply an invertible transform toeach frame that compresses the information into few coefficients.
The DFT has some problems when used for this purpose:
⢠N real x[n]âN complex X[k] : 2 real, N2 â 1 conjugate pairs
â
⢠DFT â the DTFT of a periodic signal formed by replicating x[n] .â Spurious frequency components from boundary discontinuity.
N=20f=0.08
â
The Discrete Cosine Transform (DCT) overcomes these problems.
DCT +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 3 / 14
To form the Discrete Cosine Transform (DCT), replicate x[0 : N â 1] but inreverse order and insert a zero between each pair of samples:
â
0 12 23
y[r]
Take the DFT of length 4N real, symmetric, odd-sample-only sequence.
DCT +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 3 / 14
To form the Discrete Cosine Transform (DCT), replicate x[0 : N â 1] but inreverse order and insert a zero between each pair of samples:
â
0 12 23
y[r]
Take the DFT of length 4N real, symmetric, odd-sample-only sequence.Result is real, symmetric and anti-periodic:
012
23
Y[k]
DCT +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 3 / 14
To form the Discrete Cosine Transform (DCT), replicate x[0 : N â 1] but inreverse order and insert a zero between each pair of samples:
â
0 12 23
y[r]
Take the DFT of length 4N real, symmetric, odd-sample-only sequence.Result is real, symmetric and anti-periodic: only need first N values
012
23
Y[k]
á2ââ
DCT +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 3 / 14
To form the Discrete Cosine Transform (DCT), replicate x[0 : N â 1] but inreverse order and insert a zero between each pair of samples:
â
0 12 23
y[r]
Take the DFT of length 4N real, symmetric, odd-sample-only sequence.Result is real, symmetric and anti-periodic: only need first N values
012
23
Y[k]
á2ââ
Forward DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N for k = 0 : N â 1
DCT +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 3 / 14
To form the Discrete Cosine Transform (DCT), replicate x[0 : N â 1] but inreverse order and insert a zero between each pair of samples:
â
0 12 23
y[r]
Take the DFT of length 4N real, symmetric, odd-sample-only sequence.Result is real, symmetric and anti-periodic: only need first N values
012
23
Y[k]
á2ââ
Forward DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N for k = 0 : N â 1
Inverse DCT: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
DCT basis functions: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
DCT basis functions: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
DCT basis functions: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
DCT basis functions: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
DCT basis functions: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
DCT basis functions: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
Basis Functions
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 4 / 14
DFT basis functions: x[n] = 1N
âNâ1k=0 X[k]ej2Ď
kn
N
DCT basis functions: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
DCT of sine wave
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 5 / 14
DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
DCT of sine wave
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 5 / 14
DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
f = mN
x[n]N=20f=0.10
DCT of sine wave
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 5 / 14
DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
f = mN
x[n]N=20f=0.10
|XF [k]|
DCT of sine wave
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 5 / 14
DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
f = mN
f 6= mN
x[n]N=20f=0.10
N=20f=0.08
|XF [k]|
DCT of sine wave
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 5 / 14
DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
f = mN
f 6= mN
x[n]N=20f=0.10
N=20f=0.08
|XF [k]|
DCT of sine wave
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 5 / 14
DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
f = mN
f 6= mN
x[n]N=20f=0.10
N=20f=0.08
|XF [k]|
DFT: RealâComplex; Freq range [0, 1]; Poorly localized unlessf = m
N; |XF [k]| â kâ1 for Nf < k ⪠N
2
DCT of sine wave
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 5 / 14
DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
f = mN
f 6= mN
x[n]N=20f=0.10
N=20f=0.08
|XF [k]|
|XC [k]|
DFT: RealâComplex; Freq range [0, 1]; Poorly localized unlessf = m
N; |XF [k]| â kâ1 for Nf < k ⪠N
2
DCT of sine wave
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 5 / 14
DCT: XC [k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
f = mN
f 6= mN
x[n]N=20f=0.10
N=20f=0.08
|XF [k]|
|XC [k]|
DFT: RealâComplex; Freq range [0, 1]; Poorly localized unlessf = m
N; |XF [k]| â kâ1 for Nf < k ⪠N
2DCT: RealâReal; Freq range [0, 0.5]; Well localized âf ;
|XC [k]| â kâ2 for 2Nf < k < N
DCT Properties
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 6 / 14
Definition: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
DCT Properties
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 6 / 14
Definition: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
⢠Linear: Îąx[n] + βy[n]â ÎąX[k] + βY [k]
DCT Properties
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 6 / 14
Definition: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
⢠Linear: Îąx[n] + βy[n]â ÎąX[k] + βY [k]
⢠âConvolutionââMultiplicationâ property of DFT does not hold /
DCT Properties
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 6 / 14
Definition: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
⢠Linear: Îąx[n] + βy[n]â ÎąX[k] + βY [k]
⢠âConvolutionââMultiplicationâ property of DFT does not hold /
⢠Symmetric: X[âk] = X[k] since cosâÎąk = cos+Îąk
DCT Properties
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 6 / 14
Definition: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
⢠Linear: Îąx[n] + βy[n]â ÎąX[k] + βY [k]
⢠âConvolutionââMultiplicationâ property of DFT does not hold /
⢠Symmetric: X[âk] = X[k] since cosâÎąk = cos+Îąk
⢠Anti-periodic: X[k + 2N ] = âX[k]
DCT Properties
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 6 / 14
Definition: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
⢠Linear: Îąx[n] + βy[n]â ÎąX[k] + βY [k]
⢠âConvolutionââMultiplicationâ property of DFT does not hold /
⢠Symmetric: X[âk] = X[k] since cosâÎąk = cos+Îąk
⢠Anti-periodic: X[k + 2N ] = âX[k] because:⌠2Ď(2n+ 1)(k + 2N) = 2Ď(2n+ 1)k + 8ĎNn+ 4NĎ
⌠cos (θ + Ď) = â cos θ
DCT Properties
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 6 / 14
Definition: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
⢠Linear: Îąx[n] + βy[n]â ÎąX[k] + βY [k]
⢠âConvolutionââMultiplicationâ property of DFT does not hold /
⢠Symmetric: X[âk] = X[k] since cosâÎąk = cos+Îąk
⢠Anti-periodic: X[k + 2N ] = âX[k] because:⌠2Ď(2n+ 1)(k + 2N) = 2Ď(2n+ 1)k + 8ĎNn+ 4NĎ
⌠cos (θ + Ď) = â cos θ
âX[N ] = 0 since X[N ] = X[âN ] = âX[âN + 2N ]
DCT Properties
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 6 / 14
Definition: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
⢠Linear: Îąx[n] + βy[n]â ÎąX[k] + βY [k]
⢠âConvolutionââMultiplicationâ property of DFT does not hold /
⢠Symmetric: X[âk] = X[k] since cosâÎąk = cos+Îąk
⢠Anti-periodic: X[k + 2N ] = âX[k] because:⌠2Ď(2n+ 1)(k + 2N) = 2Ď(2n+ 1)k + 8ĎNn+ 4NĎ
⌠cos (θ + Ď) = â cos θ
âX[N ] = 0 since X[N ] = X[âN ] = âX[âN + 2N ]
⢠Periodic: X[k + 4N ] = âX[k + 2N ] = X[k]
Energy Conservation
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 7 / 14
DCT: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
IDCT: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
repâ
0 12 23
y[r]
DFTâ 0
1223
Y[k]
á2â
Energy Conservation
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 7 / 14
DCT: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
IDCT: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
repâ
0 12 23
y[r]
DFTâ 0
1223
Y[k]
á2â
Energy: E =âNâ1
n=0 |x[n]|2
Energy Conservation
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 7 / 14
DCT: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
IDCT: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
repâ
0 12 23
y[r]
DFTâ 0
1223
Y[k]
á2â
Energy: E =âNâ1
n=0 |x[n]|2= 1
N|X[0]|
2+ 2
N
âNâ1n=1 |X[n]|
2
Energy Conservation
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 7 / 14
DCT: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
IDCT: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
repâ
0 12 23
y[r]
DFTâ 0
1223
Y[k]
á2â
Energy: E =âNâ1
n=0 |x[n]|2= 1
N|X[0]|
2+ 2
N
âNâ1n=1 |X[n]|
2
In diagram above: E â 2Eâ 8NEââ 0.5NE
Energy Conservation
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 7 / 14
DCT: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
IDCT: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
repâ
0 12 23
y[r]
DFTâ 0
1223
Y[k]
á2â
Energy: E =âNâ1
n=0 |x[n]|2= 1
N|X[0]|
2+ 2
N
âNâ1n=1 |X[n]|
2
In diagram above: E â 2Eâ 8NEââ 0.5NE
Orthogonal DCT (preserves energy:â
|x[n]|2 =â
|X[n]|2)
Note: MATLAB dct() calculates the ODCT
Energy Conservation
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 7 / 14
DCT: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
IDCT: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
repâ
0 12 23
y[r]
DFTâ 0
1223
Y[k]
á2â
Energy: E =âNâ1
n=0 |x[n]|2= 1
N|X[0]|
2+ 2
N
âNâ1n=1 |X[n]|
2
In diagram above: E â 2Eâ 8NEââ 0.5NE
Orthogonal DCT (preserves energy:â
|x[n]|2 =â
|X[n]|2)
ODCT: X[k] =
â
1N
âNâ1n=0 x[n] k = 0
â
2N
âNâ1n=0 x[n] cos 2Ď(2n+1)k
4N k 6= 0
Note: MATLAB dct() calculates the ODCT
Energy Conservation
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 7 / 14
DCT: X[k] =âNâ1
n=0 x[n] cos 2Ď(2n+1)k4N
IDCT: x[n] = 1NX[0] + 2
N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
repâ
0 12 23
y[r]
DFTâ 0
1223
Y[k]
á2â
Energy: E =âNâ1
n=0 |x[n]|2= 1
N|X[0]|
2+ 2
N
âNâ1n=1 |X[n]|
2
In diagram above: E â 2Eâ 8NEââ 0.5NE
Orthogonal DCT (preserves energy:â
|x[n]|2 =â
|X[n]|2)
ODCT: X[k] =
â
1N
âNâ1n=0 x[n] k = 0
â
2N
âNâ1n=0 x[n] cos 2Ď(2n+1)k
4N k 6= 0
IODCT: x[n] =â
1NX[0] +
â
2N
âNâ1k=1 X[k] cos 2Ď(2n+1)k
4N
Note: MATLAB dct() calculates the ODCT
Energy Compaction
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 8 / 14
If consecutive x[n] are positively correlated, DCT concentrates energy in afew X[k] and decorrelates them.
Energy Compaction
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 8 / 14
If consecutive x[n] are positively correlated, DCT concentrates energy in afew X[k] and decorrelates them.
Example: Markov Process: x[n] = Ďx[nâ 1] +â
1â Ď2u[n]where u[n] is i.i.d. unit Gaussian.Then
â¨
x2[n]âŠ
= 1 and ăx[n]x[nâ 1]ă = Ď.
Covariance of vector x is Si,j =â¨
xxHâŠ
i,j= Ď|iâj|.
Energy Compaction
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 8 / 14
If consecutive x[n] are positively correlated, DCT concentrates energy in afew X[k] and decorrelates them.
Example: Markov Process: x[n] = Ďx[nâ 1] +â
1â Ď2u[n]where u[n] is i.i.d. unit Gaussian.Then
â¨
x2[n]âŠ
= 1 and ăx[n]x[nâ 1]ă = Ď.
Covariance of vector x is Si,j =â¨
xxHâŠ
i,j= Ď|iâj|.
Suppose ODCT of x is Cx and DFT is Fx.
Covariance of Cx isâ¨
CxxHCHâŠ
= CSCH (similarly FSFH )
Diagonal elements give mean coefficient energy.
Energy Compaction
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 8 / 14
If consecutive x[n] are positively correlated, DCT concentrates energy in afew X[k] and decorrelates them.
Example: Markov Process: x[n] = Ďx[nâ 1] +â
1â Ď2u[n]where u[n] is i.i.d. unit Gaussian.Then
â¨
x2[n]âŠ
= 1 and ăx[n]x[nâ 1]ă = Ď.
Covariance of vector x is Si,j =â¨
xxHâŠ
i,j= Ď|iâj|.
Suppose ODCT of x is Cx and DFT is Fx.
Covariance of Cx isâ¨
CxxHCHâŠ
= CSCH (similarly FSFH )
Diagonal elements give mean coefficient energy.
Energy Compaction
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 8 / 14
If consecutive x[n] are positively correlated, DCT concentrates energy in afew X[k] and decorrelates them.
Example: Markov Process: x[n] = Ďx[nâ 1] +â
1â Ď2u[n]where u[n] is i.i.d. unit Gaussian.Then
â¨
x2[n]âŠ
= 1 and ăx[n]x[nâ 1]ă = Ď.
Covariance of vector x is Si,j =â¨
xxHâŠ
i,j= Ď|iâj|.
Suppose ODCT of x is Cx and DFT is Fx.
Covariance of Cx isâ¨
CxxHCHâŠ
= CSCH (similarly FSFH )
Diagonal elements give mean coefficient energy.
⢠Used in MPEG and JPEG (superseded byJPEG2000 using wavelets)
⢠Used in speech recognition to decorrelatespectral coeficients: DCT of log spectrum
Energy Compaction
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 8 / 14
If consecutive x[n] are positively correlated, DCT concentrates energy in afew X[k] and decorrelates them.
Example: Markov Process: x[n] = Ďx[nâ 1] +â
1â Ď2u[n]where u[n] is i.i.d. unit Gaussian.Then
â¨
x2[n]âŠ
= 1 and ăx[n]x[nâ 1]ă = Ď.
Covariance of vector x is Si,j =â¨
xxHâŠ
i,j= Ď|iâj|.
Suppose ODCT of x is Cx and DFT is Fx.
Covariance of Cx isâ¨
CxxHCHâŠ
= CSCH (similarly FSFH )
Diagonal elements give mean coefficient energy.
⢠Used in MPEG and JPEG (superseded byJPEG2000 using wavelets)
⢠Used in speech recognition to decorrelatespectral coeficients: DCT of log spectrum
Energy compaction good for coding (low-valued coefficients can be set to 0)Decorrelation good for coding and for probability modelling
Frame-based coding
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 9 / 14
⢠Divide continuous signalinto frames x[n]
X[k] k=30/220
y[n]
y[n]-x[n]
Frame-based coding
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 9 / 14
⢠Divide continuous signalinto frames
⢠Apply DCT to each frame
x[n]
X[k] k=30/220
y[n]
y[n]-x[n]
Frame-based coding
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 9 / 14
⢠Divide continuous signalinto frames
⢠Apply DCT to each frame
⢠Encode DCT
⌠e.g. keep only 30 X[k]
x[n]
X[k] k=30/220
y[n]
y[n]-x[n]
Frame-based coding
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 9 / 14
⢠Divide continuous signalinto frames
⢠Apply DCT to each frame
⢠Encode DCT
⌠e.g. keep only 30 X[k]
⢠Apply IDCTâ y[n]
x[n]
X[k] k=30/220
y[n]
y[n]-x[n]
Frame-based coding
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 9 / 14
⢠Divide continuous signalinto frames
⢠Apply DCT to each frame
⢠Encode DCT
⌠e.g. keep only 30 X[k]
⢠Apply IDCTâ y[n]
x[n]
X[k] k=30/220
y[n]
y[n]-x[n]
Problem: Coding may create discontinuities at frame boundaries
Frame-based coding
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 9 / 14
⢠Divide continuous signalinto frames
⢠Apply DCT to each frame
⢠Encode DCT
⌠e.g. keep only 30 X[k]
⢠Apply IDCTâ y[n]
x[n]
X[k] k=30/220
y[n]
y[n]-x[n]
Problem: Coding may create discontinuities at frame boundariese.g. JPEG, MPEG use 8Ă 8 pixel blocks
8.3 kB (PNG) 1.6 kB (JPEG) 0.5 kB (JPEG)
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]
X0[k]
y0[n]
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]MDCTâ X0[0 : N â 1]
X0[k]
y0[n]
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
MDCT: 2N â N coefficients
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]MDCTâ X0[0 : N â 1]
IMDCTâ y0[0 : 2N â 1]
X0[k]
y0[n]
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
MDCT: 2N â N coefficients, IMDCT: N â 2N samples
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]MDCTâ X0[0 : N â 1]
IMDCTâ y0[0 : 2N â 1]
x[N : 3N â 1]MDCTâ X1[N : 2N â 1]
X0[k]
y0[n]
X1[k]
y1[n]
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
MDCT: 2N â N coefficients, IMDCT: N â 2N samples
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]MDCTâ X0[0 : N â 1]
IMDCTâ y0[0 : 2N â 1]
x[N : 3N â 1]MDCTâ X1[N : 2N â 1]
IMDCTâ y1[N : 3N â 1]
X0[k]
y0[n]
X1[k]
y1[n]
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
MDCT: 2N â N coefficients, IMDCT: N â 2N samples
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]MDCTâ X0[0 : N â 1]
IMDCTâ y0[0 : 2N â 1]
x[N : 3N â 1]MDCTâ X1[N : 2N â 1]
IMDCTâ y1[N : 3N â 1]
x[2N : 4N â 1]MDCTâ X2[2N : 3N â 1]
X0[k]
y0[n]
X1[k]
y1[n]
X2[k]
y2[n]
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
MDCT: 2N â N coefficients, IMDCT: N â 2N samples
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]MDCTâ X0[0 : N â 1]
IMDCTâ y0[0 : 2N â 1]
x[N : 3N â 1]MDCTâ X1[N : 2N â 1]
IMDCTâ y1[N : 3N â 1]
x[2N : 4N â 1]MDCTâ X2[2N : 3N â 1]
IMDCTâ y2[2N : 4N â 1]
X0[k]
y0[n]
X1[k]
y1[n]
X2[k]
y2[n]
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
MDCT: 2N â N coefficients, IMDCT: N â 2N samples
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]MDCTâ X0[0 : N â 1]
IMDCTâ y0[0 : 2N â 1]
x[N : 3N â 1]MDCTâ X1[N : 2N â 1]
IMDCTâ y1[N : 3N â 1]
x[2N : 4N â 1]MDCTâ X2[2N : 3N â 1]
IMDCTâ y2[2N : 4N â 1]
y[n] = y0[n]+ y1[n]+ y2[n]
X0[k]
y0[n]
X1[k]
y1[n]
X2[k]
y2[n]
y[n]
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
MDCT: 2N â N coefficients, IMDCT: N â 2N samplesAdd yi[n] together to get y[n]. Only two non-zero terms far any n.
Lapped Transform +
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 10 / 14
Modified Discrete Cosine Transform (MDCT): overlapping frames 2N long
x[0 : 2N â 1]MDCTâ X0[0 : N â 1]
IMDCTâ y0[0 : 2N â 1]
x[N : 3N â 1]MDCTâ X1[N : 2N â 1]
IMDCTâ y1[N : 3N â 1]
x[2N : 4N â 1]MDCTâ X2[2N : 3N â 1]
IMDCTâ y2[2N : 4N â 1]
y[n] = y0[n]+ y1[n]+ y2[n]
X0[k]
y0[n]
X1[k]
y1[n]
X2[k]
y2[n]
y[n]
y[n]-x[n] = error
x[n]
0 N
N
2N
2N
3N
3N
4N
4N
MDCT: 2N â N coefficients, IMDCT: N â 2N samplesAdd yi[n] together to get y[n]. Only two non-zero terms far any n.Errors cancel exactly: Time-domain alias cancellation (TDAC)
MDCT (Modified DCT)
DSP and Digital Filters (2017-10120) Transforms: 3 â 11 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
MDCT (Modified DCT)
DSP and Digital Filters (2017-10120) Transforms: 3 â 11 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
If x and X are column vectors, then X = Mx
where M is an N Ă 2N matrix with mk,n = cos 2Ď(2n+1+N)(2k+1)8N .
MDCT (Modified DCT)
DSP and Digital Filters (2017-10120) Transforms: 3 â 11 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
If x and X are column vectors, then X = Mx
where M is an N Ă 2N matrix with mk,n = cos 2Ď(2n+1+N)(2k+1)8N .
MDCT (Modified DCT)
DSP and Digital Filters (2017-10120) Transforms: 3 â 11 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
If x, X and y are column vectors, then X = Mx and y = 1NMTX
where M is an N Ă 2N matrix with mk,n = cos 2Ď(2n+1+N)(2k+1)8N .
MDCT (Modified DCT)
DSP and Digital Filters (2017-10120) Transforms: 3 â 11 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
If x, X and y are column vectors, then X = Mx and y = 1NMTX = 1
NMTMx
where M is an N Ă 2N matrix with mk,n = cos 2Ď(2n+1+N)(2k+1)8N .
MDCT (Modified DCT)
DSP and Digital Filters (2017-10120) Transforms: 3 â 11 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
If x, X and y are column vectors, then X = Mx and y = 1NMTX = 1
NMTMx
where M is an N Ă 2N matrix with mk,n = cos 2Ď(2n+1+N)(2k+1)8N .
Quasi-Orthogonality: The 2N Ă 2Nmatrix, 1NMTM, is almost the identity:
1NMTM = 1
2
[
Iâ J 0
0 I+ J
]
with I =
1 ¡ ¡ ¡ 0...
. . ....
0 ¡ ¡ ¡ 1
, J =
0 ¡ ¡ ¡ 1... . .
. ...
1 ¡ ¡ ¡ 0
MDCT (Modified DCT)
DSP and Digital Filters (2017-10120) Transforms: 3 â 11 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
If x, X and y are column vectors, then X = Mx and y = 1NMTX = 1
NMTMx
where M is an N Ă 2N matrix with mk,n = cos 2Ď(2n+1+N)(2k+1)8N .
Quasi-Orthogonality: The 2N Ă 2Nmatrix, 1NMTM, is almost the identity:
1NMTM = 1
2
[
Iâ J 0
0 I+ J
]
with I =
1 ¡ ¡ ¡ 0...
. . ....
0 ¡ ¡ ¡ 1
, J =
0 ¡ ¡ ¡ 1... . .
. ...
1 ¡ ¡ ¡ 0
When two consective y frames are overlapped by N samples, the second half of thefirst frame has thus been multiplied by 1
2 (I+ J) and the first half of the second frameby 1
2 (Iâ J). When these y frames are added together, the corresponding x sampleshave been multiplied by 1
2 (I+ J) + 12 (Iâ J) = I giving perfect reconstruction.
MDCT (Modified DCT)
DSP and Digital Filters (2017-10120) Transforms: 3 â 11 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
If x, X and y are column vectors, then X = Mx and y = 1NMTX = 1
NMTMx
where M is an N Ă 2N matrix with mk,n = cos 2Ď(2n+1+N)(2k+1)8N .
Quasi-Orthogonality: The 2N Ă 2Nmatrix, 1NMTM, is almost the identity:
1NMTM = 1
2
[
Iâ J 0
0 I+ J
]
with I =
1 ¡ ¡ ¡ 0...
. . ....
0 ¡ ¡ ¡ 1
, J =
0 ¡ ¡ ¡ 1... . .
. ...
1 ¡ ¡ ¡ 0
When two consective y frames are overlapped by N samples, the second half of thefirst frame has thus been multiplied by 1
2 (I+ J) and the first half of the second frameby 1
2 (Iâ J). When these y frames are added together, the corresponding x sampleshave been multiplied by 1
2 (I+ J) + 12 (Iâ J) = I giving perfect reconstruction.
Normally the 2N -long x and y frames are windowed before the MDCT and again afterthe IMDCT to avoid any discontinuities; if the window is symmetric and satisfiesw2[i] + w2[i+N ] = 2 the perfect reconstruction property is still true.
MDCT Basis Elements
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 12 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
MDCT Basis Elements
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 12 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
In vector notation: X = Mx and y = 1NMTX = 1
NMTMx
MDCT Basis Elements
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 12 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
In vector notation: X = Mx and y = 1NMTX = 1
NMTMx
The rows of M form theMDCT basis elements.
MDCT Basis Elements
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 12 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
In vector notation: X = Mx and y = 1NMTX = 1
NMTMx
The rows of M form theMDCT basis elements.
Example (N = 4):
M =
0.56 0.20 â0.20 â0.56 â0.83 â0.98 â0.98 â0.83
â0.98 â0.56 0.56 0.98 0.20 â0.83 â0.83 0.20
0.20 0.83 â0.83 â0.20 0.98 â0.56 â0.56 0.98
0.83 â0.98 0.98 â0.83 0.56 â0.20 â0.20 0.56
MDCT Basis Elements
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 12 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
In vector notation: X = Mx and y = 1NMTX = 1
NMTMx
The rows of M form theMDCT basis elements.
Example (N = 4):
M =
0.56 0.20 â0.20 â0.56 â0.83 â0.98 â0.98 â0.83
â0.98 â0.56 0.56 0.98 0.20 â0.83 â0.83 0.20
0.20 0.83 â0.83 â0.20 0.98 â0.56 â0.56 0.98
0.83 â0.98 0.98 â0.83 0.56 â0.20 â0.20 0.56
MDCT Basis Elements
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 12 / 14
MDCT: X[k] =â2Nâ1
n=0 x[n] cos 2Ď(2n+1+N)(2k+1)8N 0 ⤠k < N
IMDCT: y[n] = 1N
âNâ1k=0 X[k] cos 2Ď(2n+1+N)(2k+1)
8N 0 ⤠n < 2N
In vector notation: X = Mx and y = 1NMTX = 1
NMTMx
The rows of M form theMDCT basis elements.
Example (N = 4):
M =
0.56 0.20 â0.20 â0.56 â0.83 â0.98 â0.98 â0.83
â0.98 â0.56 0.56 0.98 0.20 â0.83 â0.83 0.20
0.20 0.83 â0.83 â0.20 0.98 â0.56 â0.56 0.98
0.83 â0.98 0.98 â0.83 0.56 â0.20 â0.20 0.56
The basis frequencies are {0.5, 1.5, 2.5, 3.5} times the fundamental.
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients⌠Decorrelation: The coefficients are uncorrelated with each other
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients⌠Decorrelation: The coefficients are uncorrelated with each other
⢠Nice convolution property of DFT is lost /
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients⌠Decorrelation: The coefficients are uncorrelated with each other
⢠Nice convolution property of DFT is lost /
MDCT: Modified Discrete Cosine Transform⢠Lapped transform: 2N â N â 2N
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients⌠Decorrelation: The coefficients are uncorrelated with each other
⢠Nice convolution property of DFT is lost /
MDCT: Modified Discrete Cosine Transform⢠Lapped transform: 2N â N â 2N⢠Aliasing errors cancel out when overlapping output frames are added
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients⌠Decorrelation: The coefficients are uncorrelated with each other
⢠Nice convolution property of DFT is lost /
MDCT: Modified Discrete Cosine Transform⢠Lapped transform: 2N â N â 2N⢠Aliasing errors cancel out when overlapping output frames are added⢠Similar to DCT for energy compaction and decorrelation ,
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients⌠Decorrelation: The coefficients are uncorrelated with each other
⢠Nice convolution property of DFT is lost /
MDCT: Modified Discrete Cosine Transform⢠Lapped transform: 2N â N â 2N⢠Aliasing errors cancel out when overlapping output frames are added⢠Similar to DCT for energy compaction and decorrelation ,
⢠Overlapping windowed frames can avoid edge discontinuities ,
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients⌠Decorrelation: The coefficients are uncorrelated with each other
⢠Nice convolution property of DFT is lost /
MDCT: Modified Discrete Cosine Transform⢠Lapped transform: 2N â N â 2N⢠Aliasing errors cancel out when overlapping output frames are added⢠Similar to DCT for energy compaction and decorrelation ,
⢠Overlapping windowed frames can avoid edge discontinuities ,
⢠Used in audio coding: MP3, WMA, AC-3, AAC, Vorbis, ATRAC
Summary
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 13 / 14
DCT: Discrete Cosine Transform⢠Equivalent to a DFT of time-shifted double-length
[
x ââx]
⢠Often scaled to make an orthogonal transform (ODCT)⢠Better than DFT for energy compaction and decorrelation ,
⌠Energy Compaction: Most energy is in only a few coefficients⌠Decorrelation: The coefficients are uncorrelated with each other
⢠Nice convolution property of DFT is lost /
MDCT: Modified Discrete Cosine Transform⢠Lapped transform: 2N â N â 2N⢠Aliasing errors cancel out when overlapping output frames are added⢠Similar to DCT for energy compaction and decorrelation ,
⢠Overlapping windowed frames can avoid edge discontinuities ,
⢠Used in audio coding: MP3, WMA, AC-3, AAC, Vorbis, ATRAC
For further details see Mitra: 5.
MATLAB routines
3: Discrete Cosine Transform
⢠DFT Problems
⢠DCT +
⢠Basis Functions
⢠DCT of sine wave
⢠DCT Properties
⢠Energy Conservation
⢠Energy Compaction
⢠Frame-based coding
⢠Lapped Transform +
⢠MDCT (Modified DCT)
⢠MDCT Basis Elements
⢠Summary
⢠MATLAB routines
DSP and Digital Filters (2017-10120) Transforms: 3 â 14 / 14
dct, idct ODCT with optional zero-padding