 the mapping of indices to locations, and derivation processes for neighbours. 6.4.1 Inverse macroblock scanning process Input to this process is a macroblock address mbAddr. Output of this process is the location (x,y) of the upper-left luma sample for the macroblock with address mbAddr relative to the upper-left sample of the picture. The inverse macroblock scanning process is specified as follows: If MbaffFrameFlag is equal to 0, X = InverseRasterScan( mbAddr, 16, 16, PicWidthInSamples, 0 (6-3) y = InverseRasterScan( mbAddr, 16, 16, PicWidthInSamples, 1) (6-4) Otherwise (MbaffFrameFlag is equal to 1), the following ordered steps are specified: 1. The luma location(xO,yO)isderived by xO = InverseRasterScan( mbAddr / 2, 16, 32, PicWidthInSamples, 0) (6-5) yO = InverseRasterScan( mbAddr/ 16, 32, PicWidthInSamples, 1) (6-6) Rec. ITU-T H.264 (01/2012) 2. Depending on the current macroblock the following applies: If the current macroblock is a frame macroblock x = x O (6-7) y=yO+ mbAddr % * 16 (6-8) Otherwise (the current macroblock is a field macroblock), x x x O (6-9) =y0+(mbAddr%2) (6-10) 6.4.2 Inverse macroblock partition and sub-macroblock partition scanning process Macroblocks or sub-macroblocks may be partitioned, and the partitions are scanned for inter prediction as shown in Figure 6-9. The outer rectangles refer to the samples in a macroblock or sub-macroblock, respectively. The rectangles refer to the partitions. The number in each rectangle specifies the index of the inverse macroblock partition scan or inverse sub-macroblock partition scan. The functions MbPartWidth(), MbPartHeight(), SubMbPartWidth() ), and SubMbPartHeight() describing the width and height of macroblock partitions and sub-macroblock partitions are specified in Tables 7-13, 7-14, 7-17, and 7-18. MbPartWidth() and MbPartHeight() are set to appropriate values for each macroblock, depending on the macroblock type. SubMbPartWidth() and SubMbPartHeight() are set to appropriate values for each sub-macroblock of a macroblock with mb_type equal