[FFmpeg-devel] [PATCH] lavfi/hflip: copy palette data in start_frame()
Stefano Sabatini
stefasab at gmail.com
Sat Apr 7 14:58:52 CEST 2012
On date Saturday 2012-04-07 10:22:37 +0200, Nicolas George encoded:
> Le nonidi 19 germinal, an CCXX, Stefano Sabatini a écrit :
> > +static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
> > +{
> > + avfilter_default_start_frame(inlink, picref);
> > +
> > + /* copy palette if required */
> > + if (inlink->format == PIX_FMT_PAL8)
> > + memcpy(inlink->dst->outputs[0]->out_buf->data[1], picref->data[1], 256*4);
>
> How does it relate to the patch you just sent to do it in
> avfilter_start_frame?
They're different issue.
The previous patch fixes palette copying when copy is required by the
framework for permission reasons (e.g. -vf copy,unsharp), this ones
fixes palette copying when hflip is performed, and you need to pass
palette. If the following filter requires a format change, you need to
pass palette data in the new buffer containing the flipped image.
--
FFmpeg = Fabulous and Fantastic Mastering Prodigious Elected Ghost
More information about the ffmpeg-devel
mailing list