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

John Lindgren john.lindgren at tds.net
Tue Feb 2 02:18:21 CET 2010


I was intrigued by the possibility of getting MPlayer to deinterlace my
DVD's the way it ought to be done, separating each field into its own
frame.

Oh look, the bottom line of the video is getting interpolated with
random data.  I've seen that problem before and know how to fix it.
Wait a second, there's more wrong with this code than the bottom line.
It's also not filling in the top line line, it's wrapping around the
right and left edges of the image, it's mixing between color channels,
and it's interpolating the even lines when it should be doing the odd
ones and vice versa.  There goes one afternoon.

Hmm, the video looks jagged when I use Xv output, as though I'm seeing
only every other field.  With OpenGL, it looks a lot better.  But wait,
with OpenGL the chroma channels aren't getting deinterlaced.  Guess
what?  When I force OpenGL to output the video in its original source
format, MPlayer no longer upscales the chroma channel before passing it
to the deinterlacer.  Now, I wonder why it couldn't have worked like
that in the first place?

Hey, I've found out why the video only looks jagged with Xv and not with
OpenGL.  OpenGL is syncing with my 60 fps display instead of outputting
the frames at the time they're supposed to be shown.  It's a rare treat
when a piece of software works by accident like that.  Oh, I see what
the problem is.  The timestamp calculation is in the wrong place, so two
video frames are getting passed with the same time value.  I can fix
that.  But wait, it's adding a fixed 1/50 second to each field?  That's
not right.  It doesn't seem like there's any way for the filter to find
out the frame rate of the video, either.  This is a problem.

That's okay, though.  There's no point in fixing the timestamps because
they get ignored anyway.  But I can use a special command-line switch to
get them not to be ignored, and that only severely corrupts the video
output if I use the normal MPEG decoder.  There's another one I can use
instead that doesn't have that problem.  And then I can just hard code
the NTSC field delay in to the filter and recompile if I ever have a PAL
video I want to watch.  Problem solved.

Ha!  Did I really think it was that easy?  I can only seek backward with
that other MPEG decoder, not forward.  Guess I'll go have to fix the
normal decoder after all.

Not.

I give it up.  Have you guys ever heard of software that "just works"?
I'm going back to Xine, and I'll just live with blurry deinterlacing,
because, heck, it works.

You guys have fun with MPlayer.

John Lindgren




More information about the MPlayer-dev-eng mailing list