[mythtv] Filter interface change proposal, working on patch.

Andrew Mahone andrewmahone at eml.cc
Wed Oct 22 21:59:16 EDT 2003


On Wed, 22 Oct 2003 21:38:01 -0400, "Jim Paris" <jim at jtan.com> said:
> Wow.  I was just looking into the possiblity of adding better
> deinterlacing.  Nice coincidence.

That's pretty much where I was coming from with this, planning to rewrite
KernelDeint and/or port TomsMoComp for MythTV, but I found out about the
problems with deinterlacing YV12 source.  There is a YV12 interlaced
format which some cards apparently produce, where chroma lines are the
chroma values for the two lines of each field, but bttv cards apparently
treat the frames as progressive and average chroma in pairs of lines from
the frame, destroying separation of chroma data between fields.

> You're also going to want to be able to change the framerate (for
> deinterlace and detelecine).  I'm not sure how that would work in terms
> of the video buffers, since you could be returning more or less data
> than you're given.

I'd been meaning to ask also, if there was any way to drop frames within
the current filter system.  I haven't looked enough into what happens to
frames after they're processed by the filters to work this out, but the
frame structure already has a place for frame number and timecode.  A
detelecine filter could also use the priv member of the frame structure
to store hint data for a deinterlacer, telling it to skip frames that are
part of a detelecined progressive sequence.

> This has less to do with the filters and more with their integration in
> Myth, but another point is that some filters may be too slow to run in
> realtime.  It would be nice if there was a way to, say, specify that we
> should use deinterlacer "linearblend" while playing an interlaced video
> but use "deinterlacesmooth" while transcoding it. (see
> http://home.bip.net/gunnart/video/,
> http://home.bip.net/gunnart/video/AVSPorts/SmoothDeinterlacer)

I was mainly looking at encode-time filtering, but for situations where
correct interlaced YV12 is generated, reasonable deinterlacing could
still be done at display or transcode time.  For those with bttv cards
and slower computers, a reasonably fast MMX-accelerated
YUV422P-to-interlaced-
YV12 filter could probably be written, allowing for more correct
detelecine or deinterlace processing during transcoding.  Users with
faster processors could detelecine/deinterlace at decode time and get
slightly better quality and size benefits.
-- 
  Andrew Mahone
  andrewmahone AT eml DOT cc

-- 
http://www.fastmail.fm - Does exactly what it says on the tin


More information about the mythtv-dev mailing list