Call Today 716.688.4675

H.264/AVC Transform

H264-AVC-block-order

Fig.1 Order of block coding within the macroblock.

The basic transform process of H.264/AVC is based on the 16×16 pixel luma macroblock (MB). The luma macroblock is divided into 4×4 blocks, each block consists of 4×4 pixels. Each block is transformed using an integer DCT (also called an integer cosine transform – ICT), then scaled and quantized to produce a 4×4 bock of quantized transform coefficients. The coefficient blocks are coded and transmitted. The order of block coding within the macroblock is shown in Fig. 1.

For the integer DCT transform encoding process, each block is transformed by the following matrix:

h264-avc-transform-matrix1
If the macroblock is predicted using 16×16 intra prediction, a second stage transform is applied to only the DC coefficients. From each integer DCT block of the macroblock, the DC coefficient is extracted. The coefficients from all blocks form a 4×4 matrix. The Hadamard transform is applied to the DC matrix:

h264-avc-transform-matrix2The transformed DC coefficient block, and the remaining 15 AC coefficients of the DCT transform, are scaled and quantized.

For the high profile, an optional 8×8 transform may be enabled for macroblocks that are coded using 8×8 intra prediction or any inter prediction. The 16×16 macroblock is split into 2×2 blocks, where each block size is 8×8 pixels. Then transformed coefficients are scaled, quantized and transmitted. The 8×8 ICT matrix is:

h264-avc-transform-matrix3The size of chroma macroblocks may be different from luma macroblocks depending on the color space used.  For 4:0:0, each 8×8 Cr and Cb chroma macroblock corresponds to a 16×16 luma macroblock. For 4:2:2, each 8×16 Cr and Cb chroma macroblock corresponds to a 16×16 luma macroblock. For 4:4:4, each 16×16 Cr and Cb chroma macroblock corresponds to a 16×16 luma macroblock.

More Information

VOCAL Technologies, Ltd.
520 Lee Entrance, Suite 202
Amherst New York 14228
Phone: +1-716-688-4675
Fax: +1-716-639-0713
Email: sales@vocal.com