[mythtv] Ideas for high quality TV-out

Doug Larrick doug at ties.org
Mon Jun 28 08:05:23 EDT 2004


Jukka Tastula wrote:
> On Monday 28 June 2004 03:44, mikewright at iprimus.com.au wrote:
>>Any ideas on how to do this [better deinterlacing in Myth]?

I actually had a 'bob' deinterlacer (display fields sequentially) 
working in my private development tree for a time, but haven't carried 
it forward for three reasons:
1. At the time, the videocard-based a/v sync method was not up to 
displaying twice as many (HDTV-sized) frames in anything approaching a 
smooth cadence.  This is better now, but I'm fighting a threads-related 
crash in the OpenGL video sync method :-(
2. I was anticipating new nVidia drivers with interlaced output support 
at the end of March (shoulda asked what year)
3. This type of thing required very invasive changes to Myth's filter 
and video output code and I didn't want to the be the one responsible 
for fixing all those bugs :-)

The Myth filter chain is called as basically the last thing that happens 
before each frame is sent to the video card.  So to support 
deinterlacing that alters (doubles) the frame rate, you have to:
* note that there is such a filter in the chain, and halve the frame 
interval in NuppelVideoPlayer -- but only locally so as not to perturb 
other parts of the system (decoding, audio, etc.)
* feed in a second Xv (or whatever) surface for the odd field
* notice non-interlaced video in the filter and turn into a no-op -- 
interlaced flag currently does not survive libavcodec, and is certainly 
not sent to the filter chain. (I never did anything about this)
* write a filter that does your algorithm.  A simple sequential-field 
bob deinterlacer would be very easy based on my 'onefield' filter.  A 
smarter filter that tries to recover more picture detail from 
largely-static portions of the frame (like in TVTime) would be more work.

I'm willing to share the code I came up with for these tasks, though 
it's against a CVS that's several months out of date.

As for whether the nv driver supports any vsync methods at all, best bet 
would be to (a) read the code, or (b) ask the developers.

-Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040628/77d2ffd1/signature.pgp


More information about the mythtv-dev mailing list