Macroblock Layer

    Data for each macroblock consists of a macroblock header followed by data for blocks. The structure is shown in Figure 7. COD is only present in pictures for which PTYPE indicates "INTER" for each macroblock in these pictures. MCBPC is present when indicated by COD or when PTYPE indicates "INTRA" MODB is present for MB-type 0-4 if PTYPE indicates "PB-frame". CBPY, DQUANT, MVD and MVD2-4 are present when indicated by MCBPC. CBPB and MVDB are only present if indicated by MODB. Block Data is present when indicated by MCBPC and CBPY. MVD2-4 are only present in Advanced Prediction mode. MODB, CBPB and MVDB are only present in PB-frames mode.

Coded macroblock indication (COD)
    A bit which when set to "0" signals that the macroblock is coded. If set to "1", no further information is transmitted for this macroblock; in that case the decoder shall treat the macroblock as an INTER macroblock with motion vector for the whole block equal to zero and with no coefficient data. COD is only present in pictures for which PTYPE indicates "INTER", for each macroblock in these pictures.
Macroblock type & Coded block pattern for chorminance (MCBPC)
    The coded block pattern for chrominance signifies Cb and/or Cr blocks when at least one non-INTRADC transform coefficient is transmitted (INTRADC is the dc-coefficient for INTRA blocks, see 5.4.1). CBPCN = 1 if any non-INTRADC coefficient is present for block N, else 0, for CBPC5 and CBPC6 in the coded block pattern. When MCBPC = Stuffing, the remaining part of the macroblock layer is skipped. In this case, the preceding COD = 0 is not related to any coded or not-coded macroblock and therefore the macroblock number is not incremented. For P-pictures, multiple stuffings are accomplished by multiple sets of COD = 0 and MCBPC = Stuffing. See Tables 4,5,6,and 7 in the Recommendation H.263..
Macroblock mode for B-blocks (MODB)
    MODB is present for MB-type 0-4 if PTYPE indicates "PB-frame" and is a variable length codeword indicating whether CBPB is present (indicates that B-coefficients are transmitted for this macroblock) and/or MVDB is present.
Coded block pattern for B-blocks (CBPB)
    CBPB is only present in PB-frames mode if indicated by MODB. CBPBN = 1 if any coefficient is present for B-block N, else 0, for each bit CBPBN in the coded block pattern.
Coded block pattern for luminance (CBPY)
    Variable length codeword giving a pattern number signifying those Y blocks in the macroblock for which at least one non-INTRADC transform coefficient is transmitted.CBPYN = 1 if any non-INTRADC coefficient is present for block N, else 0, for each bit CBPYN in the coded block pattern.
Quantizer Information (DQUANT)
    A two bit code to define change in QUANT. In following table  the differential values for the different codewords are given. QUANT ranges from 1 to 31; if the value for QUANT, after adding the differential value, is less than 1 or greater than 31, it is clipped to 1 and 31 respectively.
 
Index
Differential value
DQUANT
0
-1
00
1
-2
01
2
1
10
3
2
11
 
Motion Vector Data (MVD)
    MVD is included for all INTER macroblocks (in PB-frames mode also for INTRA macroblocks) and consists of a variable length codeword for the horizontal component followed by a variable length codeword for the vertical component. Variable length codes, please reference Table11 of the Recommendation H.263
Motion Vector Data (MVD2-4)
    The three codewords MVD2-4 are included if indicated by PTYPE and by MCBPC, and consist each of a variable length codeword for the horizontal component followed by a variable length codeword for the vertical component of each vector. MVD2-4 are only present when in Advanced Prediction mode. Variable length codes, please reference Table 11 of the Recommendation H.263 .
Motion vector data for B-macroblock (MVDB)
    MVDB is only present in PB-frames mode if indicated by MODB and consists of a variable length codeword for the horizontal component followed by a variable length codeword for the vertical component of each vector. Variable length codes, please reference Table11 of the Recommendation H.263 .