icted sample values predPartc[ x, y ] are derived by predPartc[ X, y ] = (logWDc+1))+((oc+01c+1)>>1) (8-276) 8.4.3 Derivation process for prediction weights Inputs to this process are: the reference indices refIdxL0 and refIdxL1, the prediction utilization flags predFlagL0 and predFlagL1. Rec. ITU-T H.264 (01/2012) Outputs of this process are variables for weighted prediction logWDc, Woc, W1C, Ooc, O1C with C being replaced by L and, when ChromaArrayType is not equal to 0, Cb and Cr. The variables implicitModeFlag and explicitModeFlag are derived as follows: If weighted_bipred_idc is equal to 2, (slice_type % 5) i is equal to 1, predFlagL0 is equal to 1, and predFlagL1 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 % : is equal to 1, and predFlagL0 + predFlagL1 is equal to 1 or 2, implicitModeFlag is set equal to 0 and explicitModeFlag is set equal to 1. Otherwise, if weighted_pred_fla is equal to 1, (slice_type % 5) is equal to 0 or 3, and predFlagL0 is equal to 1, implicitModeFlag is set equal to 0 and explicitModeFlag is set equal to 1. Otherwise, implicitModeFlag is set equal to 0 and explicitModeFlag is set equal to 0. For C being replaced by L and, when ChromaArrayType is not equal to 0, Cb and Cr, the variables logWD, Woc, W1C, Ooc, O1C are derived as follows: If implicitModeFlag is equal to 1, implicit mode weighted prediction is used as follows: logWDc = (8-277) Ooc=0 (8-278) O1C 0 (8-279) and Woc and W1C are derived as specified in the following ordered steps: 1. The variables currPicOrField, pic0, and picl are derived as follows: If field_pic_flag is equal to 0 and the current macroblock is a field macroblock, the following applies: a. currPicOrField is the field of the current picture CurrPic that has the same parity as the current macroblock. b. The variable pic0 is derived as follows: If refIdxL0 % 2 is equal to 0, pic0 is the field of RefPicList0[ refIdxL0/2 that has the same parity as the curren