t macroblock. Otherwise (refIdxL0 % 2 is not equal to 0), pic0 is the field of RefPicList0[ refIdxL0 / 2 that has the opposite parity of the current macroblock. C. The variable picl is derived as follows: If refldxL1 % 2 is equal to 0, picl is the field of RefPicList1 refIdxL1/2 that has the same parity as the current macroblock. Otherwise (refIdxL1 % 2 is not equal to 0), picl is the field of RefPicList1 refIdxL1/2 that has the opposite parity of the current macroblock. Otherwise (field_pic_flag is equal to 1 or the current macroblock is a frame macroblock), currPicOrField is the current picture CurrPic, picl is RefPicList1[ refIdxL1 ], and pic0 is RefPicList0[ refIdxL0 ]. 2. The variables Woc and W1C are derived as follows: If DiffPicOrderCnt( picl, pic0) is equal to 0 or one or both of picl and pic0 is marked as "used for long-term reference" or DistScaleFactor >> 2) < -64 or DistScaleFactor >> 2) > 128, W0C and W1C are derived as: Woc=32 (8-280) W1C=32 (8-281) Otherwise, the variables tb, td, tx, and DistScaleFactor are derived from the values of currPicOrField, picO, and picl using Equations 8-201, 8-202, 8-197, and 8-198, respectively, and the weights W0C and W1C are derived as W0C c=64-(DistScaleFactor>>2 2) (8-282) W1C = DistScaleFactor >> 2 (8-283) Rec. ITU-T H.264 (01/2012) Otherwise, if explicitModeFlag is equal to 1, explicit mode weighted prediction is used as specified by the following ordered steps: 1. The variables refIdxLOWP and refIdxL1WP are derived as follows: If MbaffFrameFlag is equal to 1 and the current macroblock is a field macroblock refIdxL0WP=refldxL0>>1 (8-284) refIdxL1WP = refIdxL1 > 1 (8-285) Otherwise (MbaffFrameFlag is equal to 0 or the current macroblock is a frame macroblock), refIdxLOWP = refIdxL0 (8-286) refldxL1WP=refldxL1 (8-287) 2. The variables logWD, Woc, W1C, Ooc, and 01C are derived as follows: If C is equal to L for luma samples WDc=luma_log2_weight_denom (8-288) W0C = luma_weight_10[refldxL0WP ] (8-289) W1c=luma_weight_l1[refldxL1WP (8-290) Ooc = luma_offset_10[ refId