[MPlayer-dev-eng] filmdint DR bugfix

Zoltan Hidvegi mplayer at hzoli.2y.net
Thu Apr 22 22:45:57 CEST 2004


The filmdint filter uses direct rendering, and uses the rendering
buffer of the previous frame to compare the current frame to the
previous frame.  Normally the buffer requested in get_image will be
user right away by the codec to render and display the frame.  But,
when you have B frames, after a get_image for a non-B-frame, the
previous non-B-frame is shown first, followed by the B-frames between
followed by the non-B-frame from that get_image.  This is still fine,
but I've come across a DVD which have two time consecutive non-B-frame
frames, and by the time put_image is called for the second of these
frames the buffer holding the previous frame has already been
overwritten with the next non-B-frame.

It might seem that one solution is to use more than two buffers, but
the decoder relies on having two buffers, as it only updates the
changing areas.  So the solution is that when get_image would assign
the buffer of the previous frame, is saves the previous frame.  This
is what this patch is doing.

I bet that there are similar problems with vf_pullup.c, although
vf_pullup is worse, because it does not make sure that there are
exactly two alternating buffers for non-B-frames, so it does not work
with B-frame free content.

Zoli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: filmdint-dr-fix.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040422/c6820f24/attachment.asc>


More information about the MPlayer-dev-eng mailing list