[mythtv-users] New deinterlacer for perfect image quality when using an interlaced display, mode that matches the source

Tom Dexter digitalaudiorock at gmail.com
Thu Mar 26 19:18:11 UTC 2009


On Thu, Mar 26, 2009 at 8:26 AM, Paul Gardiner <lists at glidos.net> wrote:
> I've just created a patch that provides a deinterlacer for perfect image
> quality and motion smoothness when using an interlaced display mode that
> exactly matches the video source. See Ticket #6391. The deinterlacer comes
> up in the menus as "Interlaced x2". It is also known as field order.
>

Very very cool stuff Paul.  I was reading about this on your thread on
the dev list.

I've been running 0.21-fixes version 18314 under Gentoo patched with
that 2903 patch to allow Bob x2.  I watch all U.S. OTA DTV on a rear
projection CRT (Hitachi 51F500), so my issues have been mainly with
1080i content.  In my case the 2903 patch and Bob have worked well,
though never quite as good as with no deinterlacing (when it happened
to be in sync, which certainly wasn't often enough to put up with).

I was able to patch the rev 18314 source with your patch, though hunk
3 of the libs/libmythtv/videodisplayprofile.cpp gave me a problem so I
had to enter it manually:

@@ -1304,6 +1311,8 @@
         msg = kYadifMsg;
     else if (deint == "yadifdoubleprocessdeint")
         msg = kYadifMsg + " " +  kDoubleRateMsg;
+    else if (deint == "fieldorderdoubleprocessdeint")
+        msg = kFieldorderMsg + " " +  kDoubleRateMsg;
     else if (deint == "opengldoublerateyadif")
         msg = kYadifMsg + " " +  kUsingOpenGLWorkaround;
     else

...those three lines after your added lines don't seem to appear that
way in 18314 or even in the current 0.21-fixes SVN...instead it's
followed by the final else clause.

In any case I got it to work and I'm only having one issue (not the
fault of your code...more on that below).  I have to say that this is
the first time I've seen my myth system play 1080i content and have it
look just as good as my Samsung HD receiver.  From my testing so far,
this appears to be exactly what I've been hoping for since building
the system two years ago, and may be just as good as actually having
nVidia fix their 1080i ouput (which may never happen).

The issue I'm running into is due to the fact that two of my 1080i
stations...NBC and CBS...have the unexplainable practice of mixing
progressive and interlaced frames.  This causes the constant
re-enabling of interlacing every 1/2 second or so:

2009-03-26 14:08:04.288 Using deinterlace method fieldorderdoubleprocessdeint
2009-03-26 14:08:07.491 NVP: progressive frame seen after 91 interlaced  frames
2009-03-26 14:08:07.558 Enabled deinterlacing
2009-03-26 14:08:07.808 NVP: interlaced frame seen after 9 progressive frames
2009-03-26 14:08:07.808 Enabled deinterlacing
2009-03-26 14:08:08.094 NVP: progressive frame seen after 10 interlaced  frames
2009-03-26 14:08:08.163 Enabled deinterlacing
2009-03-26 14:08:09.274 NVP: interlaced frame seen after 29 progressive frames
2009-03-26 14:08:09.274 Enabled deinterlacing
2009-03-26 14:08:09.458 NVP: progressive frame seen after 7 interlaced  frames
2009-03-26 14:08:09.524 Enabled deinterlacing
2009-03-26 14:08:10.791 NVP: interlaced frame seen after 33 progressive frames
2009-03-26 14:08:10.791 Enabled deinterlacing
2009-03-26 14:08:11.091 NVP: progressive frame seen after 10 interlaced  frames
2009-03-26 14:08:11.158 Enabled deinterlacing

...etc...etc.  This issue (especially with NBC) has come up on the
list before.  It doesn't seem to cause visible issues with Bob x2 for
some reason.

However, as long as this occurs using fieldorderdoubleprocessdeint I
run into various problems including occasional tearing.  However, if
immediately after starting playback, I pause and then go into the
playback menu and change the video scan from "Detect" to "Interlaced
(Normal)" your deinterlacer seems to work flawlessly...at least from
what I've seen so far.  Forcing that setting has actually been the
recommended work-around when this issue has been raised here before.

Definitely cool beyond belief though.  I'm going to look into seeing
if I can find a way to patch playback so that, as soon as
deinterlacing gets enabled after seeing any progressive frames (which
doesn't seem to ever happen on any of my actual 720p channels), it
simply leaves deinterlacing on.  In my case that would take care of
it.

Thanks!!
Tom


More information about the mythtv-users mailing list