[Mp4-tech] Question POC Type 1

David Wu david_t_wu hotmail.com
Fri Oct 26 23:12:29 EDT 2007


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


More information about the Mp4-tech mailing list