[FFmpeg-devel] [PATCH] Fix for paletteuse to support transparency

Moritz Barsnick barsnick at gmx.net
Fri Oct 20 20:52:10 EEST 2017


On Thu, Oct 19, 2017 at 18:00:52 -0400, Bjorn Roche wrote:
> +    { "threshold", "set the alpha threshold for transparency. Above this threshold, pixels are considered opaque, below they are considered transparent.", OFFSET(trans_thresh), AV_OPT_TYPE_INT, {.i64=128}, 0, 255, },

This seems a bit verbose. The longer texts belongs into
doc/filters.texi, where you need to document this option anyway.

> +        if ( c >> 24 >= trans_thresh ) { // ignore transparent entry

No whitespace next to the brackets, please.

> -        if ((c & 0xff000000) != 0xff000000) {
> +        if ( c >> 24 < s->trans_thresh ) {

Same here.

Moritz


More information about the ffmpeg-devel mailing list