[FFmpeg-devel] [PATCH] Add scale filter
Stefano Sabatini
stefano.sabatini-lala
Tue Oct 27 02:59:38 CET 2009
On date Monday 2009-10-26 11:18:49 +0100, Michael Niedermayer encoded:
> 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.
Fixed using the same logic implemented in libswscale for detecting if
the first slice is the top or the bottom one, not very elegant, an
alternative was to add a slice_dir parameter to start_frame(), but
that was complicating the API for little gain.
Regards.
--
FFmpeg = Funny and Fast Multimedia Pure Energized Geisha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-scale-filter.patch
Type: text/x-diff
Size: 9070 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091027/f14badea/attachment.patch>
More information about the ffmpeg-devel
mailing list