, respectively, of the constructed array of reference layer sample values, a (refArrayW)x(refArrayH) array refSampleArray of reference layer sample values, - two variables xOffset and yOffset specifying the X and y coordinate, respectively, of the reference layer sample location that corresponds to the sample refSampleArray[ 0, ] of the array refSampleArray. The variables refW, refH, refMbW, refMbH, xOffset, yOffset, refArrayW, refArrayH, xMin, yMin, xMax, yMax, yRefScale, and yRefAdd are derived as specified in the following ordered steps: 1. The derivation process for reference layer sample locations in resampling as specified in clause G.6.3 is invoked with chromaFlag, the sample location (0,0), fieldMbFlag, and botFieldFlag as the inputs and the output is the sample location (xRefMin16, yRefMin16 in units of 1/16-th sample. 2. The derivation process for reference layer sample locations in resampling as specified in clause G.6.3 is invoked with chromaFlag, the sample location (mbW - 1, mbH 1), fieldMbFlag, and botFieldFlag as the inputs and the output is the sample location ( xRefMax16, yRefMax16) in units of 1/16-th sample. 3. With Z being replaced by L for chromaFlag equal to 0 and C for chromaFlag equal to 1, the variables refW, refH, refMbW, and refMbH are derived by: Rec. ITU-T H.264 (01/2012) = RefLayerPicWidthInSamplesz (G-268) : RefLayerPicHeightInSamplesz (G-269) refMbW = ( ( chromaFlag ==0) ? 16 : RefLayerMbWidthC ) (G-270) refMbH = ( chromaFlag ==0)?16 RefLayerMbHeightC ) (G-271) The variables xOffset, yOffset, refArrayW, and refArrayH are derived by: xOffset = ( ((xRefMin16-64)>>8)<4 - refMbW>>1) (G-272) yOffset = (yRefMin16-64) <<4) - (refMbH 1) (G-273) refArrayW = ( xRefMax16 + 79 ) : <<4) ( refMbW >> 1) - xOffset (G-274) refArrayH = ( yRefMax16 + 79 << (refMbH >> 1) - yOffset (G-275) NOTE 1 - The derived array size might be larger than the array size that is actually required by the interpolation process for Intra_Base prediction specified in clause G.8.6.2.3. 5. The variables xMin, yMin, xMax, 