[FFmpeg-devel] [PATCH] Add scale filter

Michael Niedermayer michaelni
Tue Nov 10 16:41:46 CET 2009


On Tue, Nov 10, 2009 at 03:48:16PM +0100, Stefano Sabatini wrote:
> On date Tuesday 2009-11-10 06:53:22 +0100, Vitor Sessak encoded:
> > Stefano Sabatini wrote:
> >> On date Sunday 2009-11-08 19:17:57 +0100, Stefano Sabatini encoded:
> >>> On date Sunday 2009-11-08 03:55:15 +0100, Michael Niedermayer encoded:
> >>>> On Sun, Nov 08, 2009 at 01:45:10AM +0100, Stefano Sabatini wrote:
> >>> [...]
> >>>>>  doc/libavfilter.texi     |   25 +++++
> >>>>>  libavfilter/Makefile     |    1  libavfilter/allfilters.c |    1 
> >>>>>  libavfilter/vf_scale.c   |  203 
> >>>>> +++++++++++++++++++++++++++++++++++++++++++++++
> >>>>>  4 files changed, 230 insertions(+)
> >>>>> 52fe47370a211f1b3e4f17573d8bc5139af5d371  add-scale-filter.patch
> >>>> ok if extensively tested and it passes all tests
> >>> I'll apply it soon, of course this won't make the codectest pass, as
> >>> the scale filter currently doesn't allow to set the swscaler
> >>> algorithm.
> >>
> >> Also there are some problems with PAL formats.
> >>
> >> I only tried with the samples:
> >>
> >> V-codecs/CVID/palette/catfight Tag team DT.mov
> >> avi/palette_change/toon.avi
> >>
> >> and both show a palette randomization.
> >
> > Does the attached patch fixes it? Probably not a lavfi bug  
> > (av_picture_copy() using linesize[] in a senseless way)...
> >
> > -Vitor
> 
> > Index: libavcodec/imgconvert.c
> > ===================================================================
> > --- libavcodec/imgconvert.c	(revision 20294)
> > +++ libavcodec/imgconvert.c	(working copy)
> > @@ -1179,9 +1179,7 @@
> >                         src->data[0], src->linesize[0],
> >                         width, height);
> >          /* copy the palette */
> > -        ff_img_copy_plane(dst->data[1], dst->linesize[1],
> > -                       src->data[1], src->linesize[1],
> > -                       4, 256);
> > +        memcpy(dst->data[1], src->data[1], 4*256);
> >          break;
> >      }
> >  }
> 
> We got a bingo!!

then the patch is ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/20091110/dd47fda4/attachment.pgp>



More information about the ffmpeg-devel mailing list