The Full Wiki

More info on Macroblock

Macroblock: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


From Wikipedia, the free encyclopedia

Example of image with macroblocking due to transmission error.

Macroblock is a term used in video compression and still image compression.

The size of the block is dependant on the codec and is usually a multiple of 4. In MPEG2 and other early codecs the size is fixed at blocks of 8x8 pixels. In more moden codecs such as h.263 and h.264 the overarching macroblock size is fixed at 16x16 pixels, but this is broken down into smaller macroblocks which are either 4, 8, 12 or 16 pixels by 4, 8, 12 or 16 pixels. (Combinations of these smaller macroblocks must combine to form 16x16 blocks.)

It is important to note that sizes of macroblocks are expressed as actual image sizes. Colour information is usually encoded at a lower resolution than the luminance information. For example, the colour information of an 8x8 macroblock in a 4:1:1 colour space will be encoded into a Y Cb Cr format. The Luminance will be encoded at an 8x8 pixel size and the difference-red and difference-blue information each at a size of 2x2. In the decode process these will be stretched out to cover the 8x8 space. [1].

Each macroblock contains 4 Y (luminance) block, 1 Cb (blue color difference) block, 1 Cr (red color difference) block (4:2:0).[2] (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 4x4.


Macroblock coding

| ADDR | TYPE | QUANT | VECTOR | CBP | b0 | b1 | ... B5 |
  • ADDR .... address of block in image
  • TYPE .... identifies type of macroblock (intra-frame, inter frame, bi-directional inter frame)
  • QUANT ... quantization value to vary quantization
  • VECTOR... motion vector
  • CBP...... Coded Block Pattern, some blocks in macroblock match well, some match poorly - this is bit mask indicating which one is present.
  • the blocks (4 Y, 1 Cr, 1 Cb)


Macroblocking in JPEG

This is a non-technical term used when macroblocks are either missing and show up as video errors, or when bandwidth is not enough to encode fine detail. Square areas of the picture do not show the correct portion of the image. Instead they either show a single color block, or a low-resolution block with noticeable edges. This effect is also referred to as tiling[3], mosaicking, pixelating, quilting or checkerboarding. Advanced decoders hide these types of errors with a technique called error concealment. Consumer equipment often calls this technique as MPEG Noise Reduction.[4]

See also


  1. ^
  2. ^
  3. ^ "The MPEG handbook by John Watkinson".  
  4. ^ "PC Magazine, Definition of blocking artifacts".,2542,t=blocking+artifacts&i=56319,00.asp.  


Got something to say? Make a comment.
Your name
Your email address