[FFmpeg-devel] [PATCH] Enable PAFF decoding

Neil Brown neilb
Fri Oct 12 04:05:08 CEST 2007


On Friday October 12, michaelni at gmx.at wrote:
> > Perplexed...
> > If those B frames "cannot and should not be displayed", why would they
> > be put in the data stream at all, and why does the reference decoder
> > decode them correctly?
> 
> ive not looked at the stream at all, but from what you posted these b frames
> have timestamps which lay prior to the first IDR picture if that is the case
> the sane solution is to drop them

In my 11 second clip there are two IDR frames.  Each is followed (in
decode order) by two B frames (pairs of B fields) which should be
displayed (based on picture order count) before the IDR frame.
(poc numbers for fields are, in decode order, 
     0, 1, -4, -3, -2, -1, 4, 5, 2, 3, ...
     I  P   B   B   B   B  P  P  B  B
)

If we dropped all such frames, it would be sad - even if it would be sane.

> it is possible to decode some SEI messages which will tell you what can be
> decoded and what not, but i dont think i will accept such mess in svn

Well, it's your 'svn' I guess.
All we have to do to get correct picture order is to delay any output
until num_reorder_frames have been decoded.  Is that so wrong?

> no half sane encoder generates b frames which only refer to future frames

Unfortunately "standards" and "sanity" don't have as large an overlap
as we might like.

NeilBrown




More information about the ffmpeg-devel mailing list