[FFmpeg-devel] [PATCH] Add a slice_dir parameter to avfilter_start_frame()

Stefano Sabatini stefano.sabatini-lala
Wed Dec 2 09:18:48 CET 2009

On date Wednesday 2009-12-02 03:08:37 +0100, Michael Niedermayer encoded:
> On Wed, Dec 02, 2009 at 01:39:43AM +0100, Stefano Sabatini wrote:
> > Hi,
> > 
> > this is useful for the scale, slicify and pad filters, which have
> > otherwise to heuristically determine the slice direction, so
> > duplicating code.
> > 
> > Also I'm not sure about which values to use for the slice_dir, now I'm
> > using 1/-1 but >0/<0 may be better, suggestions?
> 1/-1
> [...]
> > -void avfilter_start_frame(AVFilterLink *link, AVFilterPicRef *picref)
> > +void avfilter_start_frame(AVFilterLink *link, AVFilterPicRef *picref, int slice_dir)
> i suggested draw_slice()
> we need it only in draw_slice()
> your code now must store it always in the context because its never needed
> in start_frame but always in draw_slice()
> you dont even attempt to explain why you do it like that and not like i
> suggested.
> YOu didnt expect me to do anything except rejecting this did you?
> its more complex and its completely unclear why its done like that

I tried to explain it in another mail, since the direction is
*per-frame* I thougth it was slightly more robust to pass this
information just one time per frame.

That said, I see your point and if you prefer the slice_dir in
draw_slice() for me it is absolutely fine.
> If you do something different, please explain why you do it differently
> i cant read your mind ...

FFmpeg = Frightening & Fiendish Mythic Practical Elastic Gospel

More information about the ffmpeg-devel mailing list