KMH
KMH

Reputation: 95

Display Order in H.264 encoded video Syntax

Can anybody please help me understand how POC(Picture Order Count) works? How topFieldOrderCount and bottomFieldOrderCount help to come up with proper display order of a picture (frame or field) in H.264 encoded video.

Thanks.

Upvotes: 2

Views: 2211

Answers (1)

Tal Aloni
Tal Aloni

Reputation: 1519

The correct algorithm is: Keep a buffer of size=(num_reorder_frames+1). Put each newly decoded frame into the buffer. Whenever the buffer is full, remove the frame with the lowest {idr_pic_id,poc} (where idr_pic_id is a monotonically increasing value, not literally the variable idr_pic_id from the standard).

This gives you the pictures in display order.

(poc is calculated using pic_order_cnt_lsb)

See: https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2006-August/007255.html

Upvotes: 4

Related Questions