[FFmpeg-devel] [PATCH] Port MPlayer 2xSaI filter to libavfilter

Michael Niedermayer michaelni
Sat Dec 4 16:48:49 CET 2010


On Fri, Dec 03, 2010 at 01:21:53AM +0100, Michael Niedermayer wrote:
[...]
> > +
> > +#define INTERPOLATE(A, B) ((((A) & c->colorMask) >> 1) + (((B) & c->colorMask) >> 1) + \
> > +                           ((A) & (B) & c->lowPixelMask))
> > +
> > +/* Interpolate two rgb colors with weights 3 and 1 */
> > +#define INTERPOLATE_3_1(A, B) (((A) & c->qcolorMask) >> 2)*3 + (((B) & c->qcolorMask) >> 2) \
> > +                               + (((((A) & c->qlowPixelMask)*3 + ((B) & c->qlowPixelMask)) >> 2) & c->qlowPixelMask)
> > +
>

> > +/* Reads from the current source color neighborhood. */
> > +#define GET_COLOR(mx, my) (readPixel(c->bytesPerPixel, src_line[my], FFMIN(x+(mx), width-1)))
> 
> this is very significantly worse than what mplayer does in terms of speed

note, the problem here is that GET_COLOR() does alot more and thus is slower
than the equivalent code in mplayer

If you elaborate on what you where trying to fix with the added complexity
we probably can find a solution that doesnt slow things down


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101204/b2b70b1f/attachment.pgp>



More information about the ffmpeg-devel mailing list