[mythtv] [PATCH] KernelDeint + filter updates

Andrew Mahone andrewmahone at eml.cc
Sat Nov 15 09:47:13 EST 2003


This patch includes the kerneldeint filter and some filter patches to make 
capture format selection work.  Kerneldeint is an adaptive filter, and only 
processes those parts of the image in which it detects combing, so speed is 
variable.  On my system, it processes about 180-220fps with the default 
threshold for combing detection.  I recommend testing it without other 
filters for now, if you want to see the results (which look very nice to me, 
so far).  There is no SIMD code of any kind in this filter, so there are some 
potentially large speed gains I can still get from it.

It takes up to two parameters, separated by colons.  The first sets the 
combing detection threshold, which defaults to 12.  The second, if set to a 
non-zero integer, will cause it to process only the luma plane of YV12 
images.  This is for use as a post-processing filter with bttv cards, which 
do not produce correct interlaced YV12 output.  If the filter is placed first 
in a channel filter chain, it will change the capture format to YUV422P, and 
this option will be ignored.  The filter always produces YV12 output, and 
YV12 input is not tested yet, due to a format selection bug I'm still looking 
for (it looks like it picks the YUV422P filter, then fails because of the 
format mismatch).

There were a few things I had to change inside and outside of FilterManager, 
to make capture format selection work.  LoadFilters now takes an extra 
parameter, which it will set to the buffer size needed for the largest frame 
in the filter chain.  NVR sets video_buffer_size to the buffer size given by 
LoadFilters, and has a new method, ResizeVideoBuffers, which is called from 
InitFilters if the needed buffer size changes.  NVR now sets inpixfmt to 
FMT_NONE and calls InitFilters immediately before starting capture.  This 
should only occur when raw video is being captured from the card for software 
encoding.  LoadFilters will now change the FMT_NONE to match the output 
format if no filters are requested, so this should cause no problems for 
unfiltered capture.  For any existing filters, or no filters, things should 
work exactly as before.

I've gone over these changes a few times and tested to make sure that they 
don't break anything, but if anybody sees something questionable, let me know 
so I can fix it.
-- 
  Andrew Mahone
  andrewmahone AT eml DOT cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kerneldeint.patch.bz2
Type: application/x-bzip2
Size: 5690 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031115/a9b7b593/kerneldeint.patch.bin


More information about the mythtv-dev mailing list