I'm parsing h264 NAL Units. In my sequence - there are NAL Units with picture parameters set, sequence parameters set, I frames (they are also IDR) and P frames (I and P frames consits of single slice). (No B frames at all)
So I have the stream of NAL Units looks like:
[SPS] [PPS] [I(IDR)] [P] [P] [P] ... [P] [P] [SPS] [PPS] [I(IDR)] [P] [P] [P] ....
Each I frame in my stream is also IDR frame, so its frame_num is 0 (acording to h.264 standart).
Also each P frame has frame_num
per unit greater than the previous frame.
But, I'm confused about pic_order_cnt_lsb
.
What does pic_order_cnt_lsb
represents?
In my sequence:
- if P frame has
frame_num==2
itspic_order_cnt_lsb==4
- if P frame has
frame_num==3
itspic_order_cnt_lsb==6
- if P frame has
frame_num==4
itspic_order_cnt_lsb==8
- etc... (in my situation
pic_order_cnt_lsb == 2*frame_num
)
And why there is such correlation between frame_num
and pic_order_cnt_lsb
?
Thanks,