[MPlayer-dev-eng] [PATCH] Multiple problems with tfields filter

John Lindgren john.lindgren at tds.net
Mon Feb 1 22:05:08 CET 2010


Reimar Döffinger wrote:
> > (2) yadif is not compatible with OpenGL
> > output, so I have to use Xv, which does not have vsync on my machine,
> 
> Huh? yadif works just fine for me with -vo gl, what exactly is the problem?

yadif apparently does not support non-planar formats, which MPlayer
converts DVD to in order to use OpenGL output.

> > but it's not correct, because src[x+ss+1] and src[x+ss-1], which I
> > presume are intended to read from the pixels to the left and right, in
> > fact read from the *bytes* to the left and right, thereby mixing color
> > channels, as I mentioned, causing visible corruption.
> 
> Well, it's correct for planar YUV. It might be more reasonable to
> disable support for other formats at least for this mode.
> Needs to be done anyway, because currently the code would happily
> try to filter e.g. the special formats used for hardware accelerate
> decoding...

That would work for DVD's, I suppose, except that I would be unable to
use OpenGL output (see above).  That may be okay, though, since I've
lately noticed that the conversion to OpenGL-compatible format also
involves upscaling the chroma layers, which defeats deinterlacing them.

> My objection is that the way you did it the hack is now in 3 or so places
> and no longer marked with "HACK".

All right, I can consolidate it into a macro or something and mark it.
But the calculation does need to be done in those three places to give
the correct pts.

> 0.02 = 1/50 is right for PAL, and most developers are in Europe...

Close enough for me, then.

Uoti Urpala wrote:
> > arbitrary.  With my patch, pts is calculated correctly (at least for
> > NTSC content) even without -correct-pts.
> 
> It may be calculated correctly, but without -correct-pts it makes little
> difference what the code calculates since the pts from the filter will
> be ignored in most cases.

Ignored?  How does MPlayer know when those frames are supposed to be
played?

So, that leaves these problems to be resolved:
      * Disable support for any formats but planar YUV.
      * Fix deint() interpolating even lines instead of odd and vice
        versa.
      * Fix deint() interpolating bottom line from random data past
        image boundary.
      * Fix continue_buffered_image() to recalculate pts value when "i"
        counter changes, but do it in one place and mark it "HACK".

I'll work on an updated patch.

John Lindgren




More information about the MPlayer-dev-eng mailing list