[mythtv] [PATCH] FilterManager cleanup, several new filters.
Andrew Mahone
andrewmahone at eml.cc
Sat Jan 17 20:39:27 EST 2004
This patch includes a fix for bufsize calculation in
FilterManager::LoadFilters, and a rewrite of the format selection code. The
new loop iterates head to tail over the filter chain, instead of tail to
head, and avoids multiple iterations over each filter's list of format
conversions. Handling of inpixfmt and outpixfmt set to FMT_NONE has been
moved after the filter load loop, so that if a filter fails to init, they
will be handled exactly as if no filters had been given.
The new filters are "convert", "forceyv12", "forceyuv422p", "forcergb24", and
"forceargb32". Convert currently supports conversion in both directions
between YV12 and YUV422P, and is unoptimized, but runs at over 1k fps for
480x480 on my system. It is not intended to be used manually in a filter
chain, but it will be inserted automatically as required by FilterManager. I
don't have plans to optimized these or provide other conversions right now,
but I may do so if there appears to be demand for it.
The force* filters allow the user to manipulate FilterManager's filter
selection. For example, the filter string
"forceyuv422p,kerneldeint,forceyv12,denoise3d" would cause capture to occur
in YUV422P, which would be converted to YV12 after deinterlacing, and finally
processed by denoise3d.
The force filters are also an example for a new filter feature that I put in
several patches ago, which allows a filter to have itself removed from the
chain, while allowing the rest of the chain to load. This could also be used
by a filter that decides at init time whether or not to load, such as a
compute-intensive filter that could be configured to act as a no-op if the
frame size is too large. Because the no-op filter is removed from the chain
before use, it causes no overhead, unless its presence forces a format
conversion.
The filters README has been updated to document the no-op filter feature.
--
Andrew Mahone
andrewmahone AT eml DOT cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forceconvert.patch
Type: text/x-diff
Size: 19233 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040117/8d43524a/forceconvert.bin
More information about the mythtv-dev
mailing list