ort-term reference" that has a value of frame num equal to any value taken on by the variable UnusedShortTermFrameNum in the following: UnusedShortTermFrameNum = PrevRefFrameNum + % MaxFrameNum while( UnusedShortTermFrameNum != frame_num) (7-23) UnusedShortTermFrameNum = (UnusedShortTermFrameNum+1)%MaxFrameNum b) The value of frame_num is constrained as follows: Ifgaps_in_frame_num_value_allowed_flag is equal to 0, the value of frame_num for the current picture shall be equal to ( PrevRefFrameNum +1) MaxFrameNum. Otherwise (gaps_in_frame_num_value_allowed_flagis equal to 1), the following applies: If is greater than PrevRefFrameNum there shall not be any non-reference pictures in the bitstream that follow the previous reference picture and precede the current picture in decoding order in which either of the following conditions is true: The value of frame_num for the non-reference picture is less than PrevRefFrameNum, The value of frame nu for the non-reference picture is greater than the value of frame_num for the current picture. Otherwise (frame_num is less than PrevRefFrameNum), there shall not be any non-reference pictures in the bitstream that follow the previous reference picture and precede the current picture in decoding order in which both of the following conditions are true: The value of frame_num for the non-reference picture is less than PrevRefFrameNum, Rec. ITU-T H.264 (01/2012) The value of frame_num for the non-reference picture is greater than the value of frame_num for the current picture. A picture including a memory_management_control_operation equal to 5 shall have frame num constraints as described above and, after the decoding of the current picture and the processing of the memory management control operations, the picture shall be inferred to have had frame_num equal to 0 for all subsequent use in the decoding process, except as specified in clause 7.4.1.2.4. NOTE 4 - When the primary coded picture is not an IDR picture and does not contain memory_management_control_operation syntax ele