Commit c79e7534 authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add unpremultiply filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 11933017
......@@ -29,6 +29,7 @@ version <next>:
- limiter video filter
- libvmaf video filter
- Dolby E decoder and SMPTE 337M demuxer
- unpremultiply video filter
version 3.3:
- CrystalHD decoder moved to new decode API
......
......@@ -14532,6 +14532,25 @@ ffmpeg -i INPUT -vf trim=duration=1
@end itemize
@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:
@table @option
@item planes
Set which planes will be processed, unprocessed planes will be copied.
By default value 0xf, all planes will be processed.
If the format has 1 or 2 components, then luma is bit 0.
If the format has 3 or 4 components:
for RGB formats bit 0 is green, bit 1 is blue and bit 2 is red;
for YUV formats bit 0 is luma, bit 1 is chroma-U and bit 2 is chroma-V.
If present, the alpha channel is always the last bit.
@end table
@anchor{unsharp}
@section unsharp
......
......@@ -314,6 +314,7 @@ OBJS-$(CONFIG_TILE_FILTER) += vf_tile.o
OBJS-$(CONFIG_TINTERLACE_FILTER) += vf_tinterlace.o
OBJS-$(CONFIG_TRANSPOSE_FILTER) += vf_transpose.o
OBJS-$(CONFIG_TRIM_FILTER) += trim.o
OBJS-$(CONFIG_UNPREMULTIPLY_FILTER) += vf_premultiply.o framesync2.o
OBJS-$(CONFIG_UNSHARP_FILTER) += vf_unsharp.o
OBJS-$(CONFIG_USPP_FILTER) += vf_uspp.o
OBJS-$(CONFIG_VAGUEDENOISER_FILTER) += vf_vaguedenoiser.o
......
......@@ -325,6 +325,7 @@ static void register_all(void)
REGISTER_FILTER(TINTERLACE, tinterlace, vf);
REGISTER_FILTER(TRANSPOSE, transpose, vf);
REGISTER_FILTER(TRIM, trim, vf);
REGISTER_FILTER(UNPREMULTIPLY, unpremultiply, vf);
REGISTER_FILTER(UNSHARP, unsharp, vf);
REGISTER_FILTER(USPP, uspp, vf);
REGISTER_FILTER(VAGUEDENOISER, vaguedenoiser, vf);
......
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 6
#define LIBAVFILTER_VERSION_MINOR 95
#define LIBAVFILTER_VERSION_MINOR 96
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment