 picNumLOPred and picNumL1Pred are initially set equal to CurrPicNum. After each assignment of picNumLXNoWrap, the value of picNumLXNoWrap is assigned to picNumLXPred. The variable picNumLX is derived as specified by the following pseudo-code: if( picNumLXNoWrap>CurrPicNum) picNumLX=picNumLXNoWrap - - MaxPicNum (8-36) picNumLX=picNumLXNoWrap picNumLX shall be equal to the PicNum of a reference picture that is marked as "used for short-term reference" and shall not be equal to the PicNum of a short-term reference picture that is marked as "non-existing". The following procedure is conducted to place the picture with short-term picture number picNumLX into the index position refIdxLX, shift the position of any other remaining pictures to later in the list, and increment the value of refIdxLX. for( cIdx (=num_ref_idx_IX_active_minus1+1;cldx>refldxLX; cldx- ) RefPicListX[cIdx]=RefPicListX[cIdx-1] RefPicListX[ refIdxLX++ short-term reference picture with PicNum equal to picNumLX nIdx = refldxLX for( cIdx = refIdxLX; cIdx <=num_ref_idx_IX_active_minus1+1;cIdx++) (8-37) if( PicNumF(RefPicListX[cIdx])!=picNumLX) RefPicListX[nIdx++]=RefPicListX[cIdx] where the function PicNumF(RefPicListX| cIdx ]) is derived as follows: If the picture RefPicListX[ cldx ] is marked as "used for short-term reference", PicNumF(RefPicListX[cIdx]) is the PicNum of the picture RefPicListX[ cldx ]. Otherwise (the picture RefPicListX[ cldx ] is not marked as "used for short-term reference"), PicNumF(RefPicListX[cIdx] is equal to MaxPicNum. NOTE 1 - A value of MaxPicNum can never be equal to picNumLX. Rec. ITU-T H.264 (01/2012) NOTE 2 - Within this pseudo-code procedure, the length of the list RefPicListX is temporarily made one element longer than the length needed for the final list. After the execution of this procedure, only elements 0 through num_ref_idx_IX_active_minus1 of the list need to be retained. 8.2.4.3.2 Modification process of reference picture lists for long-term reference pictures Input to this process is an index refIdxLX (with X