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

Michael Niedermayer michaelni
Wed Dec 2 13:00:30 CET 2009


On Wed, Dec 02, 2009 at 09:18:48AM +0100, Stefano Sabatini wrote:
> 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.

i prefer it in draw_slice()


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

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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-devel/attachments/20091202/1190b04f/attachment.pgp>



More information about the ffmpeg-devel mailing list