and yMax are derived by: xMin = (xRefMin16>>4)- xOffset (G-276) yMin = yRefMin16>>4)- yOffset (G-277) xMax = ( xRefMax16+15) >> - xOffset (G-278) yMax = ( yRefMax16+15)>>4 - yOffset (G-279) 6. The variables yRefScale and yRefAdd are derived as follows: If RefLayerFrameMbsOnlyFlag is equal to 1 or RefLayerFieldPicFlag is equal to 1, yRefScale is set equal to 1 and yRefAdd is set equal to 0. Otherwise (RefLayerFrameMbsOnlyFlag is equal to 0 and RefLayerFieldPicFlag is equal to 0), yRefScale is set equal to 2 and yRefAdd is set equal to botFieldFlag. The variable refSliceIdcMb is marked as "not available". When constrained_intra_resampling_flag is equal to 1, the variable y proceeds over the values (yMin + (yMax - 1) and for each value of y, the variable X proceeds over the values (xMin +1)..(xMax-1), - and for each pair (x,y), the following ordered steps are specified: 1. A reference layer sample location (xRef, yRef) is derived by: xRef = Max( 0, Min( refW - 1,x+ xOffset ) (G-280) yRef = yRefScale 0, Min( refH / yRefScale - 1, y + yOffset ) ) + yRefAdd (G-281) 2. The derivation process for reference layer slice and intra macroblock identifications as specified in clause G.8.6.2.2.1 is invoked with the reference layer sample location ( xRef, yRef), refMbW, refMbH, refLayerSliceIdc, refLayerFieldMbFlag, and refLayerMbType as the inputs and the outputs are the reference layer slice identification refSliceIdc and the variable refIntraMbFlag. 3. When refIntraMbFlag is equal to 1 and refSliceIdcMb is marked as "not available", the variable refSliceIdcMb is marked as "available" and set equal to refSliceIdc. When constrained_intra_resampling_flag is equal to 1, the following ordered steps are specified: 1. The variable useIntraPredFlag is set equal to 0. 2. For X proceeding over the values 0..15 and y proceeding over the values 0..15, the following ordered steps are specified: a. The derivation process for reference layer macroblocks as specified in clause G.6.1 is invoked with the luma location (x,y), fieldMbFlag, refLa