[FFmpeg-devel] [PATCH] avfilter: add unpremultiply filter

Tobias Rapp t.rapp at noa-archive.com
Tue Aug 1 16:01:14 EEST 2017


On 01.08.2017 13:03, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  doc/filters.texi             |  13 ++
>  libavfilter/Makefile         |   1 +
>  libavfilter/allfilters.c     |   1 +
>  libavfilter/vf_premultiply.c | 307 ++++++++++++++++++++++++++++++++++++-------
>  4 files changed, 277 insertions(+), 45 deletions(-)
>
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 4089135..a50696a 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -14532,6 +14532,19 @@ ffmpeg -i INPUT -vf trim=duration=1
>
>  @end itemize
>
> + at section unpremultiply
> +Apply alpha unpremultiply effect to input video stream using first plane
> +of second stream as alpha.
> +
> +Both streams must have same dimensions and same pixel format.
> +
> +The filter accepts the following option:
> +
> + at table @option
> + at item planes
> +Set which planes will be processed, unprocessed planes will be copied.
> +By default value 0xf, all planes will be processed.
> + at end table

IMHO using a flags-like string "planes=rgb" would be more user-friendly 
than a bitmask. At least the documentation should tell which bit refers 
to what channel.

> [...]
>

Some FATE test for the new filter would be welcome.

Regards,
Tobias



More information about the ffmpeg-devel mailing list