[FFmpeg-devel] [PATCH] lavfi/paletteuse: fix to support transparency
Bjorn Roche
bjorn at giphy.com
Thu Nov 2 17:31:29 EET 2017
On Sat, Oct 28, 2017 at 11:18 AM, Clément Bœsch <u at pkh.me> wrote:
> On Mon, Oct 23, 2017 at 07:12:57PM -0400, Bjorn Roche wrote:
> > This patch enables paletteuse to identify the transparency in incoming
> > video and tag transparent pixels on outgoing video with the correct
> > index from the palette.
> >
> > This requires tracking the transparency index in the palette,
> > establishing an alpha threshold below which a pixel is considered
> > transparent and above which the pixel is considered opaque, and
> > additional changes to track the alpha value throughout the conversion
> > process.
> >
> > This change is a partial fix for https://trac.ffmpeg.org/ticket/4443
> > However, animated GIFs are still output incorrectly due to a bug
> > in gif optimization which does not correctly handle transparency.
> > ---
> > doc/filters.texi | 7 ++
> > libavfilter/vf_paletteuse.c | 195 ++++++++++++++++++++++++++++--
> --------------
>
> patch applied. I took the liberty to make the following changes before
> pushing:
>
> - fix spacing issues around () you forgot to fix
>
Sorry. It's the exact opposite of how I usually do it, so I can't even see
it :(
> - rename "threshold" into "alpha_threshold"
>
Much better.
> - move the option documentation in the appropriate place (it was between
> diff_mode and one of its constant)
>
Cool. Thanks.
>
> Thanks for the patch, and sorry about the delay.
>
Thanks for everyone's help and feedback!
bjorn
--
Bjorn Roche
Sr. Video Pipeline Engineer
bjorn at giphy.com
More information about the ffmpeg-devel
mailing list