[MPlayer-dev-eng] [PATCH] New mode for 'tinterlace' filter

Ivan Kalvachev ikalvachev at gmail.com
Tue Apr 4 09:25:04 CEST 2006


2006/4/4, Rich Felker <dalias at aerifal.cx>:
> On Mon, Apr 03, 2006 at 10:41:13AM +0300, Ivan Kalvachev wrote:
> > It would be better if you fix the memcpy_pic() instead of creating your own.
> > This means you can send patch to fix the special case dstStride==srcStride.
> > Either by removing it or by checking if Stride==BytesPerLine
> >
> > It seems this "speed up" have been workarounded in the following filters too:
> > vf_filmdint,
> > vf_detc,
> > vf_ivtc,vf_pullup,
> > vf_softpulldown,
> > vf_telecine,
> > vf_tfields
> >
> > (Rich isn't pullup yours? why you haven't fixed it!)
> >
> > On second though, I'm gonna fix it.
> > something like
> >
> >         if(dstStride == srcStride && abs(dstStride) == bytesPerLine)
> >
> > should do the trick.
> > Comments? Did I miss something?
>
> Yes. If stride is only slightly larger than bytesperline (the normal
> case where stride is only used for alignment) then it's faster to just
> copy the few extra unneeded bytes. Otherwise you incur the huge
> startup overhead of fast_memcpy for each line.

Have you measured the speed loss?
However I don't think we have a choice. This behaviour is buggy.

If caller wants to catch this special case speedup it could pass
stride as bytesPerLine. It must be caller to deside if it will be ok
with the coping extra data.




More information about the MPlayer-dev-eng mailing list