If RefLayerFrameMbsOnlyFlag is equal to 1, botFieldFlag is set equal to 0. Otherwise, if field_pic_flag is equal to 1, botFieldFlag is set equal to bottom_field_flag. Otherwise, if RefLayerFieldPicFlag is equal to 1, botFieldFlag is set equal to RefLayerBottomFieldFlag. Otherwise, if fieldMbFlag is equal to 1, botFieldFlag is set equal to (CurrMbAddr % : 2). Rec. ITU-T H.264 (01/2012) Otherwise, botFieldFlag is set equal to 0. The variable frameBasedResamplingFlag is derived as follows: If all of the following conditions are true, frameBasedResamplingFlag is set equal to 1: RefLayerFrameMbsOnlyFlag is equal to 1, frame_mbs_only_flag is equal to 1. Otherwise, frameBasedResamplingFlag is set equal to 0. The variable topAndBotResamplingFlag is derived as follows: If all of the following conditions are true, topAndBotResamplingFlag is set equal to 1: RefLayerFrameMbsOnlyFlag is equal to 0, RefLayerFieldPicFlag is equal to 0, frame_mbs_only_flag is equal to 0, fieldMbFlag is equal to 0. Otherwise, topAndBotResamplingFlag is set equal to 0. The variable botFieldFrameMbsOnlyRefFlag is derived as follows: If RefLayerFrameMbsOnlyFlag is equal to 1, fieldMbFlag is equal to 1, and any of the following conditions are true, botFieldFrameMbsOnlyRefFlag is set equal to 1: field_pic_flag is equal to 1 and bottom_field_flag is equal to 1, field_pic_flag is equal to 0 and ( CurrMbAddr % 2) is equal to 1. Otherwise, botFieldFrameMbsOnlyRefFlag is set equal to 0. The array predArray is derived as specified in the following. If botFieldFrameMbsOnlyRefFlag is equal to 1, the following ordered steps are specified: The reference layer sample array construction process prior to residual resampling as specified in clause G.8.6.3.2 is invoked with chromaFlag, mbW, mbH, fieldMbFlag, botFieldFlag, yBorder equal to 1, refLayerPicSamples, refLayerFieldMbFlag, and refLayerCTrafo as the inputs and the outputs are the variables refArrayW, refArrayH, the array refSampleArray of reference layer sample values, the array refTransBlkIdc of reference l