Macroblock

Macroblock is an image compression component and technique based on discrete cosine transform used on still images and video frames. Macroblocks are usually composed of two or more blocks of pixels. In the JPEG standard macroblocks are called MCU blocks.

The size of a block depends on the codec and is usually a multiple of 4. In MPEG2 and other early codecs, a block had a fixed size of 8×8 pixels; a macroblock comprised four Y blocks, one Cb block and one Cr block, defining a 16×16 pixel square of YCbCr 4:2:0. In more modern codecs such as h.263 and h.264 the overarching macroblock size is fixed at 16×16 pixels, but this is broken down into smaller blocks or partitions which are either 4, 8 or 16 pixels by 4, 8 or 16 pixels. (Combinations of these smaller partitions must combine to form 16×16 macroblocks.)

Color information is usually encoded at a lower resolution than the luminance information. For example, the color information of an 8×8 macroblock in a 4:1:1 color space will be encoded into a Y Cb Cr format. The Luminance will be encoded at an 8×8 pixel size and the difference-red and difference-blue information each at a size of 2×2. In the decode process these will be stretched out to cover the 8×8 space.

Each macroblock contains 4 Y (luminance) block, 1 Cb (blue color difference) block, 1 Cr (red color difference) block (4:2:0). (It also could be represented by 4:2:2 or 4:4:4 YCbCr format). Macroblocks can be subdivided further into smaller blocks, called partitions. H.264, for example, supports block sizes as small as 4×4.

Read more about Macroblock:  Macroblock Coding, Macroblocking