]> git.sesse.net Git - ffmpeg/commit
lavfi/paletteuse: fix to support transparency
authorBjorn Roche <bjorn@giphy.com>
Mon, 23 Oct 2017 23:12:57 +0000 (19:12 -0400)
committerClément Bœsch <u@pkh.me>
Sat, 28 Oct 2017 15:14:26 +0000 (17:14 +0200)
commitaba926e7d654b6dfab680130c92e571ee9a956f0
tree75dff5726ede3cf9f736253d469269c89294d686
parent851829455889cfefee8d802d8428ed36effb9fcf
lavfi/paletteuse: fix to support transparency

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.

Signed-off-by: Clément Bœsch <u@pkh.me>
doc/filters.texi
libavfilter/vf_paletteuse.c