[FFmpeg-devel] [PATCH] lavfi/paletteuse: fix to support transparency

Clément Bœsch 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
> 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

- 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.


Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171028/d314b4c6/attachment.sig>

More information about the ffmpeg-devel mailing list