 mvX is set equal to mvL0X. Otherwise (pFL1X is equal to 1), refX is set equal to refL1X and mvX is set equal to mvL1X. Rec. ITU-T H.264 (01/2012) sliceX with X being replaced by P and Q is the slice with DQId equal to (sliceIdc[ mbAddrX ] & 127) and mb in equal to (sliceIdc[ mbAddrX 7) Let the variable mixedModeEdgeFlag be derived as follows: If MbaffFrameFlag is equal to 1 and fieldMbFlag[ mbAddrP ] is not equal to fieldMbFlag[ mbAddrQ ], mixedModeEdgeFlag is set equal to 1. Otherwise, mixedModeEdgeFlag is set equal to 0. The variable bS is derived as follows: If interLayerDeblockingFlag is equal to 1 and mbType[ mbAddrP ] specifies an Inter macroblock prediction mode, bS is set equal to 0. NOTE 1 - This clause is not invoked when interLayerDeblockingFlag is equal to 1 and mbType[ mbAddrQ specifies an Inter macroblock prediction mode. Otherwise, if SpatialResolutionChangeFlag is equal to 1 and either or both mbType[ mbAddrP or mbType[ mbAddrQ ] is equal to I_BL, the following applies: If either mbType[ mbAddrP ] or mbType[ mbAddrQ ] specifies an Intra macroblock prediction mode other than I_BL, the following applies: If verticalEdgeFlag is equal to 1 or both fieldMbFlag[ mbAddrP ] and fieldMbFlag[ mbAddrQ ] are equal to 0, bS is set equal to 4. Otherwise (verticalEdgeFlag is equal to 0 and either or both fieldMbFlag[ mbAddrP ] or fieldMbFlag[ mbAddrQ ] is equal to 1), bs is set equal to 3. Otherwise, if mbType[ mbAddrP ] is equal to I BL and mbType[ mbAddrQ ] is equal to I_BL, the following applies: If any of the following conditions are true, bS is set equal to 1: cTrafo[ mbAddrP ] is equal to T_8x8 and the 8x8 luma transform block coded in sliceP and associated with the 8x8 luma block containing sample Po contains non-zero transform coefficient levels, cTrafo[ mbAddrP ] is equal to T 4x4 and the 4x4 luma transform block coded in sliceP and associated with the 4x4 luma block containing sample Po contains non-zero transform coefficient levels, cTrafo[ mbAddrQ ] is equal to T 8x8 and the 8x8 luma transform block