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

Nicolas George george at nsup.org
Tue Aug 1 13:07:30 EEST 2017


Le quartidi 14 thermidor, an CCXXV, Paul B Mahol a écrit :
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  doc/filters.texi               |  13 ++
>  libavfilter/Makefile           |   1 +
>  libavfilter/allfilters.c       |   1 +
>  libavfilter/vf_unpremultiply.c | 431 +++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 446 insertions(+)
>  create mode 100644 libavfilter/vf_unpremultiply.c

It looks like a copy-paste of vf_premultiply.c with the callback
changed. I think it would be better to use the same code, either two
filters with the same function or just an option "inverse=1" to
premultiply itself.

> +            s->unpremultiply[0] = limited ? unpremultiply8offset : unpremultiply8;
> +            s->unpremultiply[1] = limited ? unpremultiply8offset : unpremultiply8;
> +            s->unpremultiply[2] = limited ? unpremultiply8offset : unpremultiply8;

That can be merged.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170801/40043d4c/attachment.sig>


More information about the ffmpeg-devel mailing list