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

D Banerjee davatar at comcast.net
Thu Oct 23 00:43:12 EDT 2003

Probably going slightly askew of the topic:
Just keep in mind that mostly these filters have to be real-time, especially
overscan/cropping by resample. Doing this as software filters instead of
using Xv support is just going to be too expensive (and ugly) for mostly
everyone (even with a single tuner), except during transcode. (I'd suggest
cropping by modifying the encoders to just disregard the borders, making a
net improvement in both IQ and cpu usage.) Cropping is the next big thing as
far as IQ goes imho, I made a small test filter, and it improved
macro-block'ing a great deal, but the cpu hit is unjustified (there should
be less, not more).

Remember it's not just people running older machines, get a pcHDTV card, and
you won't have enough free cpu to be able to encode anymore even on cutting
edge stuff.

What I really see as the next roadblock for mythtv filters is the current
non-integration. Most users probably don't even know filters exists, period.
There should be 1. Global default filters, 2. Channel default filters. 3.
Per-program filters, 4. Transcode filters, all easily/graphically selectable
by novice users. All hopefully with a smart processfilters() that won't
apply the same filter 3-4 times. Now I'm going to stretch it a bit and say
that this could even be automatically be done i.e. genre=talk=crank up the
filters, genre=action=minimal filters, genre=cartoon=bring'it on :)

But the reload on format change really does need to be done, also moving the
frame parameters into a struct accessible from filter init is a good idea
too. The main filter function should be as bare as possible (only pointer to
frame buffer). BTW what's wrong with just expanding the current
"load_videoFilter"? (including filter pre-enumeration for configuration


----- Original Message -----
From: "Andrew Mahone" <andrewmahone at eml.cc>
To: "mythtv-dev" <mythtv-dev at mythtv.org>
Sent: Wednesday, October 22, 2003 9:16 PM
Subject: [mythtv] Filter interface change proposal, working on patch.

> A new function would be added in filters.c, filters_setup(int &width, int
> &height, int &inpixelformat, int &outpixelformat, VideoFilter **filters,
> int numberfilters), and would be used by filter clients to set up the
> entire filter chain.  Width and height would be modified by filters which
> change the frame size. With this interface, overscan could be handled
> entirely by a filter.  Inpixelformat and outpixelformat are not to be
> modified unless values of -1 are passed, in which case they will be
> filled with preferred values of the filters.  -1 would be passed for
> inpixelformat when recording, and the capture device would be set to
> capture the preferred format.  I don't see likely reasons for
> outpixelformat=-1 to be used, but it will be supported in case a future
> need arises.

More information about the mythtv-dev mailing list