[FFmpeg-soc] [soc]: r1794 - in libavfilter: Makefile allfilters.h avfilter.c vf_rotate.c

Michael Niedermayer michaelni at gmx.at
Mon Jan 7 22:27:12 CET 2008


On Mon, Jan 07, 2008 at 10:17:22PM +0100, Vitor Sessak wrote:
> Hi
> 
> Michael Niedermayer wrote:
> > On Mon, Jan 07, 2008 at 09:24:51PM +0100, Michael Niedermayer wrote:
> >> On Mon, Jan 07, 2008 at 08:13:39PM +0100, vitor wrote:
> >>> Author: vitor
> >>> Date: Mon Jan  7 20:13:38 2008
> >>> New Revision: 1794
> >>>
> >>> Log:
> >>> Rotation filter
> >> [...]
> >>> +/**
> >>> + * @file vf_rotate.c
> >>> + * rotation filter
> >>> + *
> >>> + * @todo Copy code from rotozoom.c to remove use of floating-point
> >>> + * @todo Handle packed pixel formats
> >>> + * @todo Make backcolor configurable
> >>> +*/
> >> @todo: fast 90° increment rot filter (unless this code is as fast)
> 
> I agree completely. Actually, I want to rename this filter later to 
> rotate_slow and create a filter named "rotate" that would be just a 
> dummy filter, with a code like
> 
> switch(ang%360) {
> case 0:
> 	filter = "dummy";
> 	break;
> case 90:
> 	//vflip changes only linesize, so it's very fast
> 	filter = "vflip,transpose"
> 	break;
> case 180:
> 	filter = "hflip,vflip"
> 	break;
> case 270:
> 	filter = "transpose,vflip"
> 	break;
> else:
> 	sprintf(filter,"rotate_slow=%i",ang);
> 	break;
> }
> 
> filter_frame(filter);
> 
> It avoids duplicating the transpose and hflip code.
> 
> I think also it would be particularly nice also to serve as a template 
> for other future pseudo-filters like crop_or_pad_to_size. I've tried to 

fine as well ...


> do that using code from avfiltergraph.c, but it's pretty complex... 
> Bobby, do you have an idea about it?
> 
> >> @todo: port libmpcodecs/vf_perspective.c, which can trivially
> >>        be extended to do just rotations, making this filter redundant
> > 
> > and you can copy and paste anything from vf_perspective.c under LGPL!
> 
> I'll have a look.
> 
> > And loose the floats in the inner loop of vf_rotate.c. Unless they are
> > significantly faster.
> 
> See my first TODO. I want to remove float usage completely.

^^;

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

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080107/e1b47bc6/attachment.pgp>


More information about the FFmpeg-soc mailing list