6.3 Other types of macroblock

6.3 Other types of macroblock

In H.261 there are as many as eight different types of macroblock:

  1. Inter coded: interframe coded macroblocks with no motion vector or with a zero motion vector.

  2. MC coded: motion compensated MB, where the MC error is significant and needs to be DCT coded.

  3. MC not coded: these are motion compensated error MBs, where the motion compensated error is insignificant. Hence there is no need to be DCT coded.

  4. Intra: intraframe coded macroblocks.

  5. Skipped: if all the six blocks in a macroblock, without motion compensation, have an insignificant energy they are not coded. These MBs are sometimes called skipped, not coded or fixed MBs. These types of MB normally occur at the static parts of the image sequence. Fixed MBs are therefore not transmitted and at the decoder they are copied from the previous frame.

Since the quantiser step sizes are determined at the beginning of each GOB or row of GOBs, they have to be transmitted to the receiver. Hence the first MBs have to be identified with a new quantiser parameter. Therefore we can have some new macroblock types, which are:

  1. Inter coded + Q

  2. MC coded + Q

  3. Intra + Q

To summarise the type of macroblock selection, we can draw a flow chart indicating how each one of the 396 MBs in a picture is coded. Decisions on the types of coding follow Figure 6.6 from left to right.

click to expand
Figure 6.6: Decision tree for macroblock type

6.3.1 Addressing of macroblocks

If all the quantised components in one of the six blocks in an MB are zero, the block is declared as not coded. When all six blocks are not coded, the MB is declared not coded (fixed MB or skipped MB). In other cases the MBs are declared coded, and their type are variable length coded. The shortest code is assigned to inter code MB and the longest to intra + Q, as they are the most frequent and most rare MB types, respectively.

Once the type of a macroblock is identified and it is VLC coded, its position inside the GOB should also be determined. Considering that H.261 is a videoconferencing codec, normally used for coding head-and-shoulders pictures, it is more likely that coded macroblocks are in the foreground of the picture. Hence they are normally clustered in regions. Therefore the overhead information for addressing the positions of the coded MB is minimised if they are relatively addressed to each other. The relative addresses are represented by run lengths, which are the number of fixed MBs to the next coded MB. Figure 6.7 shows an example of addressing the coded MBs within a GOB. Numbers represent the relative addressing value of the number of fixed macroblocks preceding a nonfixed MB. The GOB start code indicates the beginning of the GOB. These relative addressing numbers are finally VLC coded.

click to expand
Figure 6.7: Relative addressing of coded MB

6.3.2 Addressing of blocks

Since an MB has six blocks, four luminance and two chrominance, there will be 26 = 64 different combinations of the coded/noncoded blocks. Except the one with all six blocks not coded (fixed MB), the remaining 63 are identified within 63 different patterns. The pattern information consists of a set of 63 coded block patterns (CBP) indicating coded/noncoded blocks within a macroblock. With a coding order of Y0, Y1, Y2, Y3, Cb, and Cr, the block pattern information or pattern number is defined as:

(6.1) click to expand

where in the equation the coded and noncoded blocks are assigned 1 and 0, respectively. Each pattern number is then VLC coded. It should be noted that if a macroblock is intracoded (or intra+Q), its pattern information is not transmitted. This is because, in intraframe coded MB, all blocks have significant energy and will be definitely coded. In other words, there will not be any noncoded blocks in an intra coded macroblock. Figure 6.8 illustrates two examples of the coded block pattern, where some of the luminance or chrominance blocks are not coded.

click to expand
Figure 6.8: Examples of bit pattern for indicating the coded/not coded blocks in an MB (black coded, white not coded)

6.3.3 Addressing of motion vectors

The motion vectors of the motion compensated macroblocks are differentially coded with a prediction from their immediate preceding motion vector. The prediction vector is set to zero if either: the macroblock is the first macroblock of each row of GOB, the previous macroblock was not coded, coded with zero motion vector or it was intra coded.

The differential vector is then variable length coded (VLC) and is known as the motion vector data (MVD). The MVD consists of a pair of VLC, the first component for the differential horizontal value and the second component for the differential vertical displacement. Since most head-and-shoulders type scenes normally move in a rigid fashion, differential encoding of motion vectors can significantly reduce the motion vector overhead. However, this makes motion vectors very sensitive to channel errors, but the extent of the error propagation is limited within the GOB.



Standard Codecs(c) Image Compression to Advanced Video Coding
Standard Codecs: Image Compression to Advanced Video Coding (IET Telecommunications Series)
ISBN: 0852967101
EAN: 2147483647
Year: 2005
Pages: 148
Authors: M. Ghanbari

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net