Search code examples
hevc

HEVC: Picture split up in multiple NAL units


During some development work regarding HEVC I encountered a camera that streams its pictures in multiple NAL units. When analyzing the bitstream I noticed that there are 3 NAL units per picture. I noticed this with the first_slice_segment_in_pic_flag = 1 for the first NAL unit and first_slice_segment_in_pic_flag = 0 for the 2 following NAL units.

Is there any way of knowing how many NAL units make up a full picture or which NAL unit is the final one of the current picture without looking at the 4th NAL unit (the first one of the next picture)?


Solution

  • No its not possible. You get to know end of the picture after decoding last CTU of the picture or when you get the first slice of the next picture.