[FFmpeg-devel] [PATCH 3/4] Implement and use shareable ff_transpose function.

Stefano Sabatini stefano.sabatini-lala
Mon Oct 18 14:09:54 CEST 2010

On date Monday 2010-10-18 13:43:52 +0200, Michael Niedermayer encoded:
> On Mon, Oct 18, 2010 at 09:45:19AM +0200, Stefano Sabatini wrote:
> > On date Monday 2010-10-18 04:09:17 +0200, Michael Niedermayer encoded:
> > > and iam not asking for optimizations, iam asking for code factorization to be
> > > done in a way that it doesnt have to be redone when adding optimizations.
> > > And the case where all code is in one filter surely is easier to optimize
> > > than if its split over 2 filters with a arbitrary case of several (transpose)
> > > to be split into a 3rd file.
> > 
> > Sorry but I have no clue regarding what do you want to achive. Why
> > having transpose() in vf_transpose.c rather than in traspose.c may
> > help optimizations?
> you need cpu detection, you need function pointers that go in a context.
> vf_transpose has a context it has a init function
> transpose.c has neither.
> > Which kind of generalization do you have in mind
> > for transpose(),
> you cant implement all of th 90 deg rotations by transpose and vflip so theres
> code left that is outside transpose.c that too need cpu detect + context +
> function pointers + init code. That code btw is hflip

So what's the best course of action to follow now?

We have three filters (one of which committed: hflip, tranpose,
rotate90) which may share common code during the init stage. Currently
they are in separate files, so which is the best way to make them
share the optimization code?

Consider that I'm far from being ASM/optimization expert, and that I
don't plan to invest much time on that at least in the short term, but
I'd like to get the rotate90 filter committed soon in the present
non-optimized form anyway.

FFmpeg = Frightening Fiendish Murdering Portable Elastic Gadget

More information about the ffmpeg-devel mailing list