[FFmpeg-devel] [PATCH] lavfi/paletteuse: fix to support transparency
u at pkh.me
Sat Oct 28 18:18:51 EEST 2017
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
> 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
- fix spacing issues around () you forgot to fix
- rename "threshold" into "alpha_threshold"
- move the option documentation in the appropriate place (it was between
diff_mode and one of its constant)
Thanks for the patch, and sorry about the delay.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: not available
More information about the ffmpeg-devel