[Mp4-tech] Question POC Type 1

Gary Sullivan garysull windows.microsoft.com
Sat Oct 27 02:48:11 EDT 2007


David Wu, et al,
Re: "The algorithm at the eof can not derive the correct picOrderCntCycleCnt.", etc.
1. What does "eof" mean?
2. The value of frame_num for the first picture (in decoding order) of a coded video sequence is always equal to 0.  The standard prohibits using any other value (subclase 7.4.3: "If the current picture is an IDR picture, frame_num shall be equal to 0.").  So your suggestion to use frame_num = 1 on the first picture is prohibited.
3. I suggest that you should simply consider the result of the equations in the standard to be the correct result.  What leads you to think that there is a "correct" value that differs from what the standard says is the value to compute?
4. It appears to me that the standard was drafted to treat absFrameNum equal to 0 as a special case that is treated separately from all other values - it is left out of the cyclic behavior model, so that the cyclic behavior is assumed to begin at frame_num = 1 and proceed onwards.  That may or may not have been a good idea, but it doesn't look broken to me.  It simply is the way that it is.
5. It appears to me that it would have been better for the computation of expectedDeltaPerPicOrderCntCycle to be specified in subclause 7.4.2.1 rather than 8.2.1.2, since its value appears to be the same for the entire coded video sequence.  To me the location of that equation in the text is somewhat confusing because of that (although I think I understand how it got put where it is, and it is not really incorrect as it is).
6. In equation 8-7, I see the expression as follows:
   if( nal_ref_idc  = =  0  &&  absFrameNum  >  0 )
     absFrameNum = absFrameNum - 1
   However, it appears to me that the result would be the same if this was simplified to:
   if( nal_ref_idc  = =  0 )
     absFrameNum = absFrameNum - 1
   This is because I think absFrameNum will always be greater than 0 when nal_ref_idc is equal to 0.
Of course, it is possible that I am misunderstanding something.
Best Regards,
Gary Sullivan
+> -----Original Message-----
+> From: mp4-tech-bounces lists.mpegif.org
+> [mailto:mp4-tech-bounces lists.mpegif.org] On Behalf Of David Wu
+> Sent: Friday, October 26, 2023 3:12 PM
+> To: mp4-tech lists.mpegif.org
+> Subject: [Mp4-tech] Question POC Type 1
+>
+>
+> Dear members and experts,
+>
+> I have some difficulty understanding the type 1 POC, please
+> see if you can point me to the right direction.
+>
+> First of all, I assume a correct frame number sequence for
+> h.264 video sequence would be something like this:
+>
+>
+> 0  11111 1 2222 2 33333 3 4444 4 55555 5 6666 6 77777 7
+> (the one marked with "-" is reference picture)
+> -             -         -           -          -           -
+>          -
+>
+> Assume the num_ref_frames_in_pic_order_cnt_cycle == 2,
+>
+> The algorithm at the eof can not derive the correct
+> picOrderCntCycleCnt.
+>
+> However, the algorithm will work if the first frame_num is 1.
+>
+> 1 22222 2 3333 |3 44444 4 5555 |5 66666 6 7777 |7 88888 8
+> -           -           -           -           -
+> -           -
+>
+> Say the current frame is non reference frame with frame_num == 8
+>
+>     ( 8 - 1 - 1) / 2 = 3. there is exactly 3 POC cycle
+> before the current frame.
+>
+> Hoewever, for POC type 2, the frame_num must start with zero:
+>
+>     011 223344556
+>     -   -   -  -  -   -
+>
+>     2*0,  2*1-1,  2*1,  2*2-1,  2*2, 2*3 - 1, 2*3, ......
+>
+> Any one knows better ?
+>
+> Regards & Thanks
+>
+> David Wu
+>
+>
+>
+> H.264 Algorithm for POC type 1:
+>
+> 2. The variable absFrameNum is derived as follows:
+>
+> if( num_ref_frames_in_pic_order_cnt_cycle != 0 )
+>       absFrameNum = FrameNumOffset + frame_num
+> else
+>      absFrameNum = 0
+>
+> if( nal_ref_idc = = 0 && absFrameNum> 0 )
+>       absFrameNum = absFrameNum - 1
+> 3.  When absFrameNum> 0, picOrderCntCycleCnt and
+> frameNumInPicOrderCntCycle are derived as follows:
+>
+> if( absFrameNum> 0 ) {
+>        picOrderCntCycleCnt = ( absFrameNum - 1 ) /
+> num_ref_frames_in_pic_order_cnt_cycle
+>        frameNumInPicOrderCntCycle = ( absFrameNum - 1 ) %
+> num_ref_frames_in_pic_order_cnt_cycle ( 8-8)
+> }
+> _________________________________________________________________
+> Peek-a-boo FREE Tricks & Treats for You!
+> http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
+> _______________________________________________
+> NOTE: Please use clear subject lines for your posts. Include
+> [audio, [video], [systems], [general] or another
+> apppropriate identifier to indicate the type of question you have.
+>
+> Note: Conduct on the mailing list is subject to the
+> Antitrust guidelines found at
+> http://www.mpegif.org/public/documents/vault/mp-out-30042-Ant
+> itrust.php
+>


More information about the Mp4-tech mailing list