ype is not equal to 0, let predMbc and predMbcr be two (MbWidthC)x(MbHeightC) arrays of chroma prediction samples for the macroblock mbAddr. The variable numMbPart is derived as follows: If mbType is equal to B_Skip or B_Direct_16x16 and DQId is equal to 0 (nal_unit_type is not equal to 20), numMbPart is set equal to 4. Otherwise, if mbType is equal to B_Skip or B_Direct_16x16 (and DQId is greater than 0 and nal_unit_type is equal to 20), numMbPart is set equal to 1. Otherwise (mbType is not equal to B_Skip or B_Direct_16x16), numMbPart is set equal to NumMbPart( mbType). macroblock partition index mbPartIdx proceeds over the values 0..(numMbPart - 1) and for each value of mbPartIdx the following ordered steps are specified: 1. The variable isDirectFlag is derived as follows: If any of the following conditions are true, isDirectFlag is set equal to 1: mbType is equal to B_Skip or B_Direct_16x16, mbType is equal to B_8x8 and subMbType[ mbPartIdx ] is equal to B_Direct_8x8. Otherwise, isDirectFlag is set equal to 0. The variables implicitModeFlag and explicitModeFlag are derived as follows: If weighted_bipred_idc is equal to 2, (slice_type % 5) is equal to 1, predFlagL0[ mbPartIdx ] is equal to 1, and predFlagL1[ mbPartldx is equal to 1, implicitModeFlag is set equal to 1 and explicitModeFlag is set equal to 0. Otherwise, if weighted_bipred_idc is equal to 1, (slice_type % 5) is equal to 1, and predFlagL0[ mbPartIdx + predFlagL1[ mbPartIdx ] is equal to 1 or 2, implicitModeFlag is set equal to 0 and explicitModeFlag is set equal to 1. Otherwise, if weighted_pred_flag is equal to 1, (slice_type % is equal to 0, and predFlagL0[ mbPartIdx is equal to 1, implicitModeFlag is set equal to 0 and explicitModeFlag is set equal to 1. Rec. ITU-T H.264 (01/2012) Otherwise, implicitModeFlag is set equal to 0 and explicitModeFlag is set equal to 0. 3. When implicitModeFlag is equal to 1 or explicitModeFlag is equal to 1, the SVC derivation process for prediction weights as specified in clause G.8.4.2.1 is invoked with fieldMbFla