[FFmpeg-devel] [PATCH] Add scale filter

Michael Niedermayer michaelni
Mon Oct 26 11:18:49 CET 2009


On Sun, Oct 25, 2009 at 11:45:12AM +0100, Stefano Sabatini wrote:
> On date Sunday 2009-10-18 22:39:28 +0200, Michael Niedermayer encoded:
> > On Sun, Oct 11, 2009 at 11:29:35PM +0200, Stefano Sabatini wrote:
> [...] 
> > as a bug in slices in reverse order has been found the vf_scale patch 
> > is on hold until that is fixed
> 
> I'll resume the problem with the scale filter:
> 
> it assumes all the slices arrive in *sequential* order, and precisely
> from the top to the bottom.
> 
> Currently it (libavfilter SOC repo filter) does:
> 
>     outH = sws_scale(scale->sws, data, link->cur_pic->linesize,
>                      y, h, link->dst->outputs[0]->outpic->data,
>                      link->dst->outputs[0]->outpic->linesize);
>     avfilter_draw_slice(link->dst->outputs[0], scale->sliceY, outH);
>     scale->sliceY += outH;
> 
> scale->sliceY is inited to 0.
> 
> In the case the slices arrive in reverse order, this doesn't work
> anymore.
> 
> Also I see that the scale filter *does not support slices sent in
> non-sequential order*, as the dstY is stored in the context of the
> scaler, and used as the Y of the next slice, see the macro:
> 
> swscale_template.c:RENAME(swScale)
> 

> This makes me believe that this is a requirement for the filtering
> system too, unless we want to change how libswscale works (BTW that
> should be documented).

yes


> 
> Alternatively we could add some mechanism of slice-sorter/fifo filter
> auto-insertion for relaxing this constraint, which could be
> implemented by filters which require it, but this may be done later,
> especially considering that we don't have currently filters which
> require non-sequential slices drawing.

or to say it differently we have nothing that is capable to produce out
of order slices nor can i think of a case where we would want

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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- 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/20091026/514089dc/attachment.pgp>



More information about the ffmpeg-devel mailing list