Side note: First Draft on Mar 22 2011.

This article covers discrete cosine transform and inverse discrete cosine transform used in MPEG4 Simple Profile.

MPEG-4 part 2(also called MPEG4 Visual) defines 3 different types of inverse DCT operations, standard 8×8 IDCT, SA-IDCT (Shape Adaptive DCT), and ΔDC-SA-DCT (SA-DCT with DC separation and ΔDC Correction). As MPEG-4 Simple Profile doesn’t support arbitary shape encoding, only standard DCT is applicable for it.

1. DCT

According to MPEG4 standard, the NxN 2-Dimentional DCT is defined as below,

image

where x, y = 0, 1, …N-1, they’re coordinates in the sample domain (spatial domain).

u, v = 0,1,…N-1, they’re the coordinates in the transform domain, and

image

The above equations can be expressed in matrix equations. For DCT,

image

where f is the matrix of samples, A is the transform matrix, and F is the transformed DCT coefficients.

The values of A can be derived from the previous equation,

image

where

image

The first matrix multiplication Af can be seen as 1-D DCT of each column of f, and the second matrix multiplication (Af)At can be seen as a 1-D DCT on each row of (Af). Note that the order of the two multiplications can be exchanged.

2. IDCT

The inverse DCT is defined as,

image

Supposed a pixel is represented in n bits, then the input to the DCT and output from the IDCT are represented with (n+1) bits. The DCT coefficients are represented in (n+4) bits. The range for the coefficients is [-2^(n+3), +2^(n+3)-1].

Again, the equation can be expressed in matrix form,

image

The meanings and values follow DCT operation above.

 

2 comments on “MPEG4–DCT and IDCT

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.