n adaptive_ref_pic_marking_mode_flag is equal to 1. The memory_management_control_operation commands with values of 1 to 6 are processed in the order they occur in the bitstream after the current picture has been decoded. For each of these memory_management_control_operation commands, one of the processes specified in clauses 8.2.5.4.1 to 8.2.5.4.6 is invoked depending on the value of memory_management_control_operation. The memory_management_control_operation command with value of 0 specifies the end of nemory_management_control_operation commands. Memory management control operations are applied to pictures as follows: If field_pic_flag is equal to 0, memory_management_control_operation commands are applied to the frames or complementary reference field pairs specified. Otherwise (field_pic_flag is equal to 1), memory_management_control_operation commands are applied to the individual reference fields specified. 8.2.5.4.1 Marking process of a short-term reference picture as "unused for reference" This process is invoked when memory_management_control_operation is equal to 1. Let picNumX be specified by picNumX=CurrPicNum -(difference_of_pic_nums_minus1+1). = (8-39) Rec. ITU-T H.264 (01/2012) Depending on field_pic_flag the value of picNumX is used to mark a short-term reference picture as "unused for reference" as follows: If field_pic_flag is equal to 0, the short-term reference frame or short-term complementary reference field pair specified by picNumX and both of its fields are marked as "unused for reference". Otherwise (field_pic_flag is equal to 1), the short-term reference field specified by picNumX is marked as "unused for reference". When that reference field is part of a reference frame or a complementary reference field pair, the frame or complementary field pair is also marked as "unused for reference", but the marking of the other field in the same reference frame or complementary reference field pair is not changed. 8.2.5.4.2 Marking process of a long-term reference picture as "unused for referenc