Reputation: 7540
When dealing with MPEG compression, the following group of pictures ((GOP (I-, P- and B-Frames)) is coded and transmitted in the following order:
I P B B P P B B P B B P P
The display order, however, is:
I P P B B P P B B P B B P
Could somebody kindly explain how this particular order is determined (I know that it's not random, but am unsure what guideline/logic is used when reordering the frames)?
Many thanks.
Upvotes: 2
Views: 3414
Reputation: 766
Your frame sequences aren't quite right:
Display order: I(1) B(2) B(3) P(4) B(5) B(6) P(7)
Transmit order: I(1) P(4) B(2) B(3) P(7) B(5) B(6)
The short answer for why this is so: Due to the bidirectional nature of B frame prediction the decoder must first process the previous and next reference frames. For example, to decode B(2) the decoder must first have I(1) and P(4).
The easy way (for most sequences) to reorder frames from transmission to display is to look at the temporal_reference in the picture header which gives you the location of the frame in display order.
Hope this helps!
Upvotes: 2