[FFmpeg-devel] [WIP] rotate filter(s)

Stefano Sabatini stefano.sabatini-lala
Mon Oct 4 22:27:29 CEST 2010

On date Sunday 2010-10-03 21:35:00 +0200, Michael Niedermayer encoded:
> On Sun, Oct 03, 2010 at 07:35:49PM +0200, Stefano Sabatini wrote:
> > Hi,
> > 
> > in attachment a first stub at the rotate filter. I don't know if it is
> > a good idea to keep the float variant, while the rotate_ss may be
> > useful (and the rotation angle could be made parametric).
> > 
> > The integer-only rotating code is taken from tests/rotozoom.c, I don't
> > know if we have a corresponding version in the libs.
> > 
> > fill_line_with_color() and draw_rectangle() are duplicated from
> > vf_pad.c, so maybe we should make them public (or at least ff_ them),
> > drawutils.[ch] may be a good place where to put them.
> > 
> > Note that ffplay/SDL doesn't work with odd width/height sizes, so you
> > may need to rescale to an even wxh size (this could be done with a
> > parametric scale as discussed some months ago).
> > 
> > What this rotate filter still lacks, apart a resolution to the
> > refactoring problems mentioned above, is a YUV planar version of the
> > rotating function, and possibly the extension to other RGB variants,
> > which should be pretty easy to add. Everyone feel free to continue to
> > work on this and post an updated patch.
> looks like you implemented nearest neighbor sampling in int and float
> thats not what rotozoom does, also see vf_perspective.c

Implemented bilinear interpolation as in rotozoom.c, merged the three
variants into a single one and made the expression for angle

Still missing: more packed and planar formats for the non-float path,
a more efficient way for filling the background.

Should I remove the float path?

FFmpeg = Fantastic and Friendly Mysterious Programmable Extreme God

More information about the ffmpeg-devel mailing list