der(s) for the current picture. Each long-term reference picture has an associated value of LongTermFrameIdx (that was assigned to it as specified in clause 8.2.5). To each short-term reference picture a variable PicNum is assigned, and to each long-term reference picture a variable LongTermPicNum is assigned. The values of these variables depend on the value of field_pic_flag and bottom_field_flag for the current picture and they are set as follows: Rec. ITU-T H.264 (01/2012) If field_pic_flag is equal to 0, the following ordered steps are specified: 1. For each short-term reference frame or complementary reference field pair: PicNum = FrameNumWrap (8-28) 2. For each long-term reference frame or long-term complementary reference field pair: LongTermPicNum=LongTermFrameIdx, (8-29) NOTE - When decoding a frame the value of MbaffFrameFlag has no influence on the derivations in clauses 8.2.4.2, 8.2.4.3, and 8.2.5. Otherwise (field_pic_flag is equal to 1), the following ordered steps are specified: 1. For each short-term reference field the following applies: If the reference field has the same parity as the current field PicNum = 2 * FrameNumWrap + 1 (8-30) Otherwise (the reference field has the opposite parity of the current field), PicNum = 2 * FrameNumWrap (8-31) 2. For each long-term reference field the following applies: If the reference field has the same parity as the current field LongTermPicNum =2* LongTermFrameIdx + 1 (8-32) Otherwise (the reference field has the opposite parity of the current field), LongTermPicNum=2*LongTermFrameIdx (8-33) 8.2.4.2 Initialisation process for reference picture lists This initialisation process is invoked when decoding a P, SP, or B slice header. RefPicList0 and RefPicList1 have initial entries as specified in clauses 8.2.4.2.1 through 8.2.4.2.5. When the number of entries in the initial RefPicList0 or RefPicList1 produced as specified in clauses 8.2.4.2.1 through 8.2.4.2.5 is greater than num_ref_idx_10_active_minus1 or (num_ref_idx_l1_active_minus1 + respectively, the ext