g, refIdxL0[ mbPartIdx ], refIdxL1[ mbPartIdx ], predFlagL0[ mbPartIdx ], predFlagL1[ mbPartIdx ], refPicList0, and refPicList1 (when available) as inputs and the outputs are assigned to logWDL, WOL, W1L, OOL, OiL, and when ChromaArrayType is not equal to 0, logWDc, Woc, W1C, Ooc, O1C with C being replaced by Cb and Cr. 4. The luma location ( xP, yP ) is derived as follows: If mbType is equal to B_Skip or B_Direct_16x16, xP is set equal to (8 * mbPartIdx % 2)) and yP is set equal to (8 * mbPartIdx / 2 )). Otherwise (mbType is not equal to B_Skip or B_Direct_16x16), the inverse macroblock partition scanning process as specified in clause 6.4.2.1 is invoked with mbPartIdx as the input and the output is assigned to xP, yP). For this invocation of the process in clause 6.4.2.1, any occurrence of mb_type is replaced by mb Type. 5. The variable numSubMbPart is derived as follows: If isDirectFlag is equal to 1 and DQId is equal to 0 (nal_unit_type is not equal to 20), numSubMbPart is set equal to 4. Otherwise, if isDirectFlag is equal to 1 (and DQId is greater than 0 and nal_unit_type is equal to 20), numSubMbPart is set equal to 1. Otherwise (isDirectFlag is equal to 0), numSubMbPart is set equal to NumSubMbPart( subMbType| mbPartIdx ]) 6. The sub-macroblock partition index proceeds over values D..(numSubMbPart-1), and for each value of subMbPartIdx the following ordered steps are specified: a. The variables partWidth and partHeight are derived as follows: If isDirectFlag is equal to 1 and DQId is equal to 0 (nal_unit_type is not equal to 20), partWidth and partHeight are set equal to 4. Otherwise, if isDirectFlag is equal to 1 (and DQId is greater than 0 and nal_unit_type is equal to 20), the following applies: If mbType is equal to B_Skip or B_Direct_16x16 tWidth and partHeight are set equal to 16. Otherwise (mbType is equal to B_8x8 and subMbType[ mbPartIdx ] is equal to B_Direct_8x8), partWidth and partHeight are set equal to 8. Otherwise (isDirectFlag is equal to 0), the following applies: If mbType is not equal t