icture. Otherwise, if chromaEdgeFlag is equal to 1 and iCbCr is equal to 0, s' represents the chroma sample array S'Cb of the chroma component Cb of the current picture. Otherwise (chromaEdgeFlag is equal to 1 and iCbCr is equal to 1), s' represents the chroma sample array S'cr of the chroma component Cr of the current picture. The variable dy is set equal to (1 + fieldModeInFrameFilteringFlag). The position of the upper-left luma sample of the macroblock CurrMbAddr is derived by invoking the inverse macroblock scanning process in clause 6.4.1 with mbAddr = CurrMbAddr as input and the output being assigned to (xI, yI). The variables xP and yP are derived as follows: If chromaEdgeFlag is equal to 0, xP is set equal to xI and yP is set equal to yI. Otherwise (chromaEdgeFlag is equal to 1), xP is set equal to xI / SubWidthC and yP is set equal to (yl + SubHeightC 1) / SubHeightC. Rec. ITU-T H.264 (01/2012) Figure 8-11 - Convention for describing samples across a 4x4 block horizontal or vertical boundary For each sample location (xEk, yEk ), k=0..(nE-1), - the following ordered steps are specified: The filtering process is applied to a set of eight samples across a 4x4 block horizontal or vertical edge denoted as pi and qi with i = 0..3 as shown in Figure 8-11 with the edge lying between Po and qo. pi and qi with i = 0..3 are specified as follows: If verticalEdgeFlag is equal to 1, qi=s'[xP+xEk+i,yP+dy* yEk (8-442) Di=s[xP+xEk-i-1,yP+dy* yEk (8-443) Otherwise (verticalEdgeFlag is equal to 0), (8-444) p;=s'[xP + xEx, y yP + dy*(yEk-i-1)-(yEk%2) (8-445) The process specified in clause 8.7.2 is invoked with the sample values Pi and qi (i = 0..3), chromaEdgeFlag, and verticalEdgeFlag as the inputs, and the output is assigned to the filtered result sample values p'i and q'i with i 0..2. The input sample values Pi and qi with i = 0..2 are replaced by the corresponding filtered result sample values p'i and q'i with i = 0..2 inside the sample array s' as follows: If verticalEdgeFlag is equal to 1, s'[xP+xEk+i,yP+dy*yEk]=q'i 