left corner of the current macroblock). Let maxW and maxH be variables specifying maximum values of the location components xN, xW, and yN, yW, respectively. maxW and maxH are derived as follows: If this process is invoked for neighbouring luma locations, maxW = maxH = 16 (6-31) Otherwise (this process is invoked for neighbouring chroma locations), maxW MbWidthC (6-32) Rec. ITU-T H.264 (01/2012) maxH = MbHeightC (6-33) Depending on the variable MbaffFrameFlag, the neighbouring locations are derived as follows: If MbaffFrameFlag is equal to 0, the specification for neighbouring locations in fields and non-MBAFF frames as described in clause 6.4.12.1 is applied. Otherwise (MbaffFrameFlag is equal to 1), the specification for neighbouring locations in MBAFF frames as described in clause 6.4.12.2 is applied. 6.4.12.1 Specification for neighbouring locations in fields and non-MBAFF frames The specifications in this clause are applied when MbaffFrameFlag is equal to 0. The derivation process for neighbouring macroblock addresses and their availability in clause 6.4.9 is invoked with mbAddrA, mbAddrB, mbAddrC, and mbAddrD as well as their availability status as the output. Table 6-3 specifies mbAddrN depending on ( xN, yN ). Table 6-3 - Specification of mbAddrN mbAddrN mbAddrD 0..maxH - 1 mbAddrA 0..maxW - 1 mbAddrB 0..maxW 0..maxH - 1 CurrMbAddr >maxW mbAddrC > max W 1 0..maxH - 1 not available > maxH - 1 not available The neighbouring location (xW, yW) relative to the upper-left corner of the macroblock mbAddrN is derived as xW=(xN+maxW)% maxW = (6-34) yW=(yN+maxH)% maxH (6-35) 6.4.12.2 Specification for neighbouring locations in MBAFF frames The specifications in this clause are applied when MbaffFrameFlag is equal to 1. The derivation process for neighbouring macroblock addresses and their availability in clause 6.4.10 is invoked with mbAddrA, mbAddrB, mbAddrC, and mbAddrD as well as their availability status as the output. The variable currMbFrameFlag is derived as follows: If the macroblock with address CurrMbAddr