[MPlayer-dev-eng] Nut and B frames

D Richard Felker III dalias at aerifal.cx
Tue Apr 27 18:43:02 CEST 2004


On Tue, Apr 27, 2004 at 12:28:28PM -0400, D Richard Felker III wrote:
> I'm still not sure how to write down the rule for the muxer, tho...
> The basic principle is that timestamps should be monotone except that
> reference frames needed should be stored in decode order. But the
> rule gets complicated when you have multiple streams with out-of-order
> frames... :)

Actually there's one other solution I sort of like. It wastes a small
amount of space, but it seems more correct...

For out-of-order frames, mux the frame in decode order with NO pts.
Then include a dummy frame (0 byte) at the presentation time for the
frame. This dummy frame just means "display the next frame the codec
outputs".

Perhaps the net effect wouldn't even waste space, since you could make
better use of the lsb_timestamp (no going backwards) and since you'd
only need one pts delta for fixed-fps video (+1) rather than 3 (+1,
+N, +1-N, where N=num_b_frames), saving lots of framecodes for better
use. :)

Rich




More information about the MPlayer-dev-eng mailing list