[mythtv] Ticket #2903 is necessary to achieve perfect playback with an interleaved display mode.

Mark Kendall mark.kendall at gmail.com
Mon Mar 23 15:05:43 UTC 2009

2009/3/23 Paul Gardiner <lists at glidos.net>:
> I've been fiddling with mythtv for six months now, just wishing
> to play 720x576i video to a PAL TV. I've built several systems,
> never being quite content, but now the 4th, which uses VGA to
> Scart, is near perfect.
> I've just started working on the one remaining problem, which
> is that there is nothing keeping the interlaces in sync between
> content and display. Half the time I get perfection, half the time
> I get terrible combs. I believe this is a well known problem. I can
> hit "back" a few times when this happens and get it back in sync.
> I've been using it like that for some time. I'd rather put up
> with having to do so, than distroy the sharpness and smoothness
> with processing.
> My intention to correct the problem is to write a software,
> field-order deinterlacer (there's already an opengl one, but
> I can't use that).


I've been meaning to write a software 'field-order' deinterlacer for
some time. Unfortunately it keeps on getting bumped down the list,
mostly because interlaced output isn't a big ticket item for me
anymore (finally invested in a 1080p display). If you do take a look
at this, you should be aware that the fieldorder opengl deinterlacer
in trunk is no longer actually 'fieldorder' - it is effectively
bobdeint without the bobbing (i.e. it displays one field at a time
scaled to frame size). I realised after a large amount of testing that
this was the only reliable way of getting the sync correct for my
display. As I've said before though, this will almost certainly depend
on your make/model of tv.

> Before I could even start on that work, I ran into another problem:
> my system wont allow me to use a doublerate deinterlacer. I traced
> that to the refresh rate calculation ignoring the fact that the
> screen is interlacing and returning 25, rather than 50. (25 is
> the true framerate, but we need 50 to acknowledge that there
> are 50 vsyncs per second, and allow the use of the doublerate
> deinterlacer).
> I created a patch, to fix the problem, and now I can use
> yadifx2 which does give really good results, and only loses a
> little quality (it depends on the sync, now having the wrong
> sync, rather than giving combs, gives a little loss of quality
> because I then get all the lines calculated by yadif rather
> than all the original lines).
> I thought, before continuing the work, I'd open a ticket and
> submit my patch so that others can at least use yadifx2 and
> get the really very good results I'm getting, but I found that
> someone had solved the problem 3 years ago, just to have their
> ticket closed as invalid. The explanation given says to use
> kernel or linear blend. That's madness. Both are going to
> blur the image horribly, although kernel not so bad for
> still images I guess.
> Please can this decision be reconsidered. I guess it doesn't
> matter to me so much: I now build my own copies of minimyth,
> but there must be lots of other users who could benefit.

Again, something on my to do list that keeps on getting prioritised
down. Yes - I believe the approach taken in that patch is correct and
it will almost certainly work without issue for most people (or at
least it won't break playback). The problem, as someone quite rightly
pointed out to me not so long ago, is that it has the potential to
wreck playback for drivers that take a different approach to
interlaced modelines. I 'think' recent intel, ati and nvidia drivers
are consistent but my only ati card got dumped in the bin several
weeks ago after another fruitless attempt to get it working, older
nvidia drivers certainly took a different approach and I'm entirely
unsure about other, less common chipsets.

> As an aside, I think some drivers (openchrome) get around this
> problem by allowing a dummy mode line in xorg.conf that isn't
> used in setting up the screen, but will be read by myth. The
> dummy modeline has a doubled dotclock rate, which make the pal
> mode come out as 50fps. I've certainly seen mode lines with
> openchrome that have 27 where you'd expect 13.5

I've not seen this - my epia has long sinced passed on...

> P.S. If we do reopen Ticket #2903 then we should test for
> framerate 25 or 30, and double only in that case.




More information about the mythtv-dev mailing list