Frames with negative POCs (do not confuse with pic_order_cnt_lsb ) in AVC/H.264 are allowed, it’s not nonsense.
To explain how a frame with negative POC can occur in AVC/H.264 stream, let’s introduce a new conception of Leading Frames (actually the notion of leading pictures is taken from HEVC/H.265) :
Leading pictures – pictures following a IDR frame in decoding order but preceding it in presentation order.
POC for each frame is calculated as POC = PocMsb + pic_order_cnt_lsb, where pic_order_cnt_lsb is signaled in the slice header. The formula for updating PocMsb is slightly tricky (although in most of cases PocMsb is incremented by the magnitude equal to MaxPicOrderCntLsb each time pic_order_cnt_lsb wrapped around):
If pic_order_cnt_lsb < prevPicOrderCntLsb AND (prevPicOrderCntLsb − pic_order_cnt_lsb) >= MaxPicOrderCntLsb / 2
PicOrderCntMsb = prevPicOrderCntMsb + MaxPicOrderCntLsb { pic_order_cnt_lsb wrapped around }
Else if pic_order_cnt_lsb > prevPicOrderCntLsb AND (pic_order_cnt_lsb − prevPicOrderCntLsb) > MaxPicOrderCntLsb / 2
PicOrderCntMsb = prevPicOrderCntMsb − MaxPicOrderCntLsb { here negative POC might occur }
Else
PicOrderCntMsb = prevPicOrderCntMsb
Notice that MaxPicOrderCntLsb is derived from SPS parameter – log2_max_pic_order_cnt_lsb and equal to MaxPicOrderCntLsb = 1<< log2_max_pic_order_cnt_lsb.
Let’s suppose we have s stream beginning with IDR-frame and MaxPicOrderCntLsb = 64 (log2_max_pic_order_cnt_lsb=6), let’s also suppose that the second frame in the stream has pic_order_cnt_lsb = 60 then POC of the second frame is derived as -4 (notice that prevPicOrderCntMsb=0 and prevPicOrderCntLsb=0 for each IDR-frame).
For a player a frame with a negative POC following after the IDR-frame means that this frame is displayed before the IDR frame. The player can discard this frame if it starts playback from this IDR.
23+ years’ programming and theoretical experience in the computer science fields such as video compression, media streaming and artificial intelligence (co-author of several papers and patents).
the author is looking for new job, my resume
Pretty! This was a really wonderful post. Thank you for your provided information.
Hello, Neat post. There is an issue with your web site in web explorer, might check this?K IE still is the market leader and a huge component to other folks will pass over your fantastic writing due to this problem.
I found your weblog site on google and examine a couple of of your early posts. Continue to maintain up the excellent operate. I just additional up your RSS feed to my MSN News Reader. In search of ahead to studying more from you in a while!…
You have mentioned very interesting points! ps decent internet site.
Hi, Neat post. There’s a problem together with your site in web explorer, could check this?K IE nonetheless is the marketplace leader and a large part of other folks will omit your excellent writing due to this problem.
Hmm it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I too am an aspiring blog writer but I’m still new to everything. Do you have any tips for beginner blog writers? I’d genuinely appreciate it.
I carry on listening to the news update lecture about receiving free online grant applications so I have been looking around for the most excellent site to get one. Could you tell me please, where could i acquire some?
you are welcome to ask our web-designer Ivan Lukin:
Telephone +7 (978) 858 11 48
e-mail: vanyalukin007@gmail.com
Good day! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche. Your blog provided us valuable information to work on. You have done a extraordinary job!
I like this weblog very much so much fantastic info .
What i do not realize is in fact how you’re not really a lot more well-favored than you may be right now. You’re very intelligent. You know therefore significantly in terms of this topic, produced me in my opinion imagine it from numerous varied angles. Its like women and men don’t seem to be interested except it’s something to accomplish with Lady gaga! Your own stuffs nice. At all times maintain it up!