marking of the short-term reference frame or short-term complementary reference field pair specified by picNumX and both of its fields are changed from "used for short-term reference" to "used for long-term reference" and assigned LongTermFrameldx equal to long_term_frame_idx. Otherwise (field_pic_flag is equal to 1), the marking of the short-term reference field specified by picNumX is changed from "used for short-term reference" to "used for long-term reference" and assigned TermFrameIdx equal to long_term_frame_idx. When the field is part of a reference frame or a complementary reference field pair, and the other field of the same reference frame or complementary reference field pair is also marked as "used for long-term reference", the reference frame or complementary reference field pair is also marked as "used for long-term reference" and assigned LongTermFrameIdx equal to long_term_frame_idx. 8.2.5.4.4 Decoding process for MaxLongTermFrameIdx This process is invoked when memory_management_control_operation is equal to 4. All pictures for which LongTermFrameldx is greater than max_long_term_frame_idx_plus1 - 1 and that are marked as "used for long-term reference" are marked as "unused for reference". The variable MaxLongTermFrameIdx is derived as follows: If max_long_term_frame_idx_plus1 equal to 0, MaxLongTermFrameldx is set equal to "no long-term frame indices". Otherwise (max_long_term_frame_idx_plus1 is greater than 0), MaxLongTermFrameIdx is set equal to max_long_term_frame_idx_plus1-1 NOTE - Thememory_management_control_operation command equal to 4 can be used to mark long-term reference pictures as "unused for reference". The frequency of transmitting max_long_term_frame_idx_plus1 is not specified by this Rec. ITU-T H.264 (01/2012) Recommendation I International Standard. However, the encoder should send a memory_management_control_operation command equal to 4 upon receiving an error message, such as an intra refresh request message. 8.2.5.4.5 Marking process of all reference pictures as "unused for 