rameMbsOnlyFlag is equal to 1 and frame_mbs_only_flag is equal to 1, the variables offsetY, addY, and deltaY are derived by offsetY = ScaledRefLayerTopOffset / subH (G-52) addY = ( refH*(2+phaseY))<< (shiftY-2))+(scaledH>>1))/scaledH +(1<<(shifty-5)) (G-53) deltaY = 4 *(2+refPhaseY) (G-54) Otherwise (RefLayerFrameMbsOnlyFlag is equal to 0 or frame_mbs_only_flag is equal to 0), the variables offsetY, addY, and deltaY are derived by offsetY = ScaledRefLayerTopOffset/(2* subH) (G-55) addY = (((refH*(2+phaseY))<<(shiftY -3)) + (scaledH / scaledH -(1<<(shifty-5)) (G-56) deltaY=2*(2+refPhaseY) (G-57) NOTE - The variables subW, subH, shiftX, shiftY, scaleX, scaleY, offsetX, offsetY, addX, addY, deltaX, and deltaY do not depend on the input sample location (xP, yP), the input variable fieldMbFlag, or the current macroblock address CurrMbAddr. The sample location (xC, yC) is derived as specified in the following ordered steps: Rec. ITU-T H.264 (01/2012) The inverse macroblock scanning process as specified in clause 6.4.1 is invoked with CurrMbAddr as input and the output is assigned to (xM, yM). For this invocation of the process in clause 6.4.1, the current macroblock is treated as field macroblock when fieldMbFlag is equal to 1 and it is treated as frame macroblock when fieldMbFlag is equal to 0. The sample location (xC, yC) is derived by xC=xP+(xM>>(subW-1)) (G-58) yC=yP+(yM>>(subH-1 - + fieldMbFlag - field_pic_flag)) (G-59) When RefLayerFrameMbsOnlyFlag is equal to 0 or frame_mbs_only_flag is equal to 0, the vertical component of the sample location (xC,yC) is modified by yC=yC>>(1-fieldMbFlag) (G-60) The reference layer sample location (xRef16 yRef16) is derived by xRef16=(((xC-offsetX) * scaleX addX) >> ( shiftX -4)) - deltaX (G-61) yRef16=(((yC-offsetY) = * scaleY + addY ) >> shiftY - 4)) - deltaY (G-62) G.6.4 SVC derivation process for macroblock and sub-macroblock partition indices Inputs to this process are: a variable currDQId specifying an identifier for a layer representation, a luma location (xP, yP) relativ