Commit 292902ea authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add mergeplanes filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent d9bc251d
......@@ -44,6 +44,7 @@ version <next>
- Enhanced Low Delay AAC (ER AAC ELD) decoding (no LD SBR support)
- Linux framebuffer output device
- HEVC decoder, raw HEVC demuxer, HEVC demuxing in TS, Matroska and MP4
- mergeplanes filter
version 2.0:
......
......@@ -334,6 +334,7 @@ Filters:
vf_extractplanes.c Paul B Mahol
vf_histogram.c Paul B Mahol
vf_il.c Paul B Mahol
vf_mergeplanes.c Paul B Mahol
vf_psnr.c Paul B Mahol
vf_scale.c Michael Niedermayer
vf_separatefields.c Paul B Mahol
......
......@@ -5260,6 +5260,65 @@ lutyuv=y='bitand(val, 128+64+32)'
@end example
@end itemize
@section mergeplanes
Merge color channel components from several video streams.
The filter accepts up to 4 input streams, and merge selected input
planes to the output video.
This filter accepts the following options:
@table @option
@item mapping
Set input to output plane mapping. Default is @code{0}.
The mappings is specified as a bitmap. It should be specified as a
hexadecimal number in the form 0xAa[Bb[Cc[Dd]]]. 'Aa' describes the
mapping for the first plane of the output stream. 'A' sets the number of
the input stream to use (from 0 to 3), and 'a' the plane number of the
corresponding input to use (from 0 to 3). The rest of the mappings is
similar, 'Bb' describes the mapping for the output stream second
plane, 'Cc' describes the mapping for the output stream third plane and
'Dd' describes the mapping for the output stream fourth plane.
@item format
Set output pixel format. Default is @code{yuva444p}.
@end table
@subsection Examples
@itemize
@item
Merge three gray video streams of same width and height into single video stream:
@example
[a0][a1][a2]mergeplanes=0x001020:yuv444p
@end example
@item
Merge 1st yuv444p stream and 2nd gray video stream into yuva444p video stream:
@example
[a0][a1]mergeplanes=0x00010210:yuva444p
@end example
@item
Swap Y and A plane in yuva444p stream:
@example
format=yuva444p,mergeplanes=0x03010200:yuva444p
@end example
@item
Swap U and V plane in yuv420p stream:
@example
format=yuv420p,mergeplanes=0x000201:yuv420p
@end example
@item
Cast a rgb24 clip to yuv444p:
@example
format=rgb24,mergeplanes=0x000102:yuv444p
@end example
@end itemize
@section mcdeint
Apply motion-compensation deinterlacing.
......
......@@ -158,6 +158,7 @@ OBJS-$(CONFIG_LUT_FILTER) += vf_lut.o
OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o
OBJS-$(CONFIG_LUTYUV_FILTER) += vf_lut.o
OBJS-$(CONFIG_MCDEINT_FILTER) += vf_mcdeint.o
OBJS-$(CONFIG_MERGEPLANES_FILTER) += vf_mergeplanes.o framesync.o
OBJS-$(CONFIG_MP_FILTER) += vf_mp.o
OBJS-$(CONFIG_MPDECIMATE_FILTER) += vf_mpdecimate.o
OBJS-$(CONFIG_NEGATE_FILTER) += vf_lut.o
......
......@@ -154,6 +154,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(LUTRGB, lutrgb, vf);
REGISTER_FILTER(LUTYUV, lutyuv, vf);
REGISTER_FILTER(MCDEINT, mcdeint, vf);
REGISTER_FILTER(MERGEPLANES, mergeplanes, vf);
REGISTER_FILTER(MP, mp, vf);
REGISTER_FILTER(MPDECIMATE, mpdecimate, vf);
REGISTER_FILTER(NEGATE, negate, vf);
......
......@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 89
#define LIBAVFILTER_VERSION_MINOR 90
#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