 type 0 This process is invoked when pic_order_cnt_type is equal to 0. Input to this process is PicOrderCntMsb of the previous reference picture in decoding order as specified in this clause. Outputs of this process are either or both TopFieldOrderCnt or BottomFieldOrderCnt. The variables prevPicOrderCntMsb and prevPicOrderCntLsb are derived as follows: If the current picture is an IDR picture, prevPicOrderCntMsb is set equal to 0 and prevPicOrderCntLs.b is set equal to 0. Otherwise (the current picture is not an IDR picture), the following applies: If the previous reference picture in decoding order included a memory_management_control_operation equal to 5, the following applies: If the previous reference picture in decoding order is not a bottom field, prevPicOrderCntMsb is set equal to 0 and prevPicOrderCntLsb is set equal to the value of TopFieldOrderCnt for the previous reference picture in decoding order. Otherwise (the previous reference picture in decoding order is a bottom field), prevPicOrderCntMsb is set equal to 0 and prevPicOrderCntLsb is set equal to 0. Rec. ITU-T H.264 (01/2012) Otherwise (the previous reference picture in decoding order did not include a mnemory_management_control_operation equal to 5), prevPicOrderCntMsb is set equal to PicOrderCntMsb of the previous reference picture in decoding order and prevPicOrderCntLsb is set equal to the value of pic_order_cnt_lsb of the previous reference picture in decoding order. PicOrderCntMsb of the current picture is derived as specified by the following pseudo-code: if( ( [pic_order_cnt_lsb < prevPicOrderCntLsb ) && ( prevPicOrderCntLsb - pic_order_cnt_lsb ) >= (MaxPicOrderCntLsb/2))) PicOrderCntMsb = prevPicOrderCntMsb + MaxPicOrderCntLsb (8-3) else if( ( (pic_order_cnt_lsb > prevPicOrderCntLsb ) && ( (pic_order_cnt_lsb-prevPicOrderCntLsb) > ( MaxPicOrderCntLsb/2))) p=prevPicOrderCntMsb-MaxPicOrderCntLsb = PicOrderCntMsb = prevPicOrderCntMsb When the current picture is not a bottom field, TopFieldOrderCnt is derived as TopFieldOrderCnt = PicOrderCn