[mythtv] Idea for interlaced playback.
bjornko
bjornko at math.uio.no
Thu Nov 10 16:05:58 EST 2005
Sorry for comming on a bit strong, being newly subscribed to this list and
all, but I've search through the mailing list archives (user and dev)
looking for ways to get proper interlaced playback with correct field
order to no avail.
The best I can get is either using the bob deinterlacing field, which does
preserve temporal resolution but seems to sacrifice spatial resolution.
What irritates me so much is that the problem is relatively easilly
solved, although perhaps a bit costly cpu-wise.
Three things are needed for proper interlaced playback:
1) You need perfect line matching between the video framebuffer and
the tv-raster-lines. This can (at least on my nvidia card) be solved
with a proper modeline and overscan-settings. No form of rescaling must
be allowed as this will blend the fields together.
2) You need to synch at the field frequency.
With xv or the OpenGL synch function, this is no problem.
I'm not sure if OpenGL or XV will blur odd/even lines together. This
might be a problem.
3) You need to update half the lines (one field) at one refresh, and the
other half at the next (but not removing the previous field)
rinse, repeat.
Some people seem to think you need to know when the TV-out is doing a
odd-line or even-line refresh, which is not easy at all. But this is
incorrect, all you need to do is make sure odd-field lines are only in
odd lines in the framebuffer and the same for the even fields and update
the fields in order. (This is known as "bob and weave")
All you really need to know is which field is first, field affinity as
it's called, but that's hard wired in the encoder, and no problem.
I've tried to elaborate on http://vaggen.net/~bjornko/interlace.php but
it's not very easy to convey.
It's been about 9 years since i did any C-coding, and I'm rather damaged
by Java, so the thought of diving into the myth code and writing my own
filter isn't very appealing. Mostly because I've only got one linux system
at home (the mythbox) and I'm afraid how having a mythtv development
environment would interfere with it's uptime. (although I have looked at
the myth code. Perhaps I can fairly safely keep a home build of the
front end only along with the release.)
I do feel fairly confident that the method I describe works, and I would
like to aid in its fruition in some way if possible.
Sincerely,
Bjørn Vaggen Konestabo.
More information about the mythtv-dev
mailing list