Skip to content

Commit e89182f

Browse files
committed
lavfi: port mcdeint filter from libmpcodecs
1 parent 3a2b991 commit e89182f

File tree

7 files changed

+363
-1
lines changed

7 files changed

+363
-1
lines changed

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Specifically, the GPL parts of FFmpeg are
3535
- vf_hqdn3d.c
3636
- vf_hue.c
3737
- vf_kerndeint.c
38+
- vf_mcdeint.c
3839
- vf_mp.c
3940
- vf_noise.c
4041
- vf_owdenoise.c

configure

+1
Original file line numberDiff line numberDiff line change
@@ -2154,6 +2154,7 @@ hqdn3d_filter_deps="gpl"
21542154
hue_filter_deps="gpl"
21552155
interlace_filter_deps="gpl"
21562156
kerndeint_filter_deps="gpl"
2157+
mcdeint_filter_deps="avcodec gpl"
21572158
movie_filter_deps="avcodec avformat"
21582159
mp_filter_deps="gpl avcodec swscale inline_asm"
21592160
mpdecimate_filter_deps="gpl avcodec"

doc/filters.texi

+44
Original file line numberDiff line numberDiff line change
@@ -4855,6 +4855,50 @@ lutyuv=y='bitand(val, 128+64+32)'
48554855
@end example
48564856
@end itemize
48574857

4858+
@section mcdeint
4859+
4860+
Apply motion-compensation deinterlacing.
4861+
4862+
It needs one field per frame as input and must thus be used together
4863+
with yadif=1/3 or equivalent.
4864+
4865+
This filter accepts the following options:
4866+
@table @option
4867+
@item mode
4868+
Set the deinterlacing mode.
4869+
4870+
It accepts one of the following values:
4871+
@table @samp
4872+
@item fast
4873+
@item medium
4874+
@item slow
4875+
use iterative motion estimation
4876+
@item extra_slow
4877+
like @samp{slow}, but use multiple reference frames.
4878+
@end table
4879+
Default value is @samp{fast}.
4880+
4881+
@item parity
4882+
Set the picture field parity assumed for the input video. It must be
4883+
one of the following values:
4884+
4885+
@table @samp
4886+
@item 0, tff
4887+
assume top field first
4888+
@item 1, bff
4889+
assume bottom field first
4890+
@end table
4891+
4892+
Default value is @samp{bff}.
4893+
4894+
@item qp
4895+
Set per-block quantization parameter (QP) used by the internal
4896+
encoder.
4897+
4898+
Higher values should result in a smoother motion vector field but less
4899+
optimal individual vectors. Default value is 1.
4900+
@end table
4901+
48584902
@section mp
48594903

48604904
Apply an MPlayer filter to the input video.

libavfilter/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ FFLIBS-$(CONFIG_ASYNCTS_FILTER) += avresample
99
FFLIBS-$(CONFIG_ATEMPO_FILTER) += avcodec
1010
FFLIBS-$(CONFIG_DECIMATE_FILTER) += avcodec
1111
FFLIBS-$(CONFIG_DESHAKE_FILTER) += avcodec
12+
FFLIBS-$(CONFIG_MCDEINT_FILTER) += avcodec
1213
FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec
1314
FFLIBS-$(CONFIG_MP_FILTER) += avcodec
1415
FFLIBS-$(CONFIG_PAN_FILTER) += swresample
@@ -150,6 +151,7 @@ OBJS-$(CONFIG_LUT3D_FILTER) += vf_lut3d.o
150151
OBJS-$(CONFIG_LUT_FILTER) += vf_lut.o
151152
OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o
152153
OBJS-$(CONFIG_LUTYUV_FILTER) += vf_lut.o
154+
OBJS-$(CONFIG_MCDEINT_FILTER) += vf_mcdeint.o
153155
OBJS-$(CONFIG_MP_FILTER) += vf_mp.o
154156
OBJS-$(CONFIG_MPDECIMATE_FILTER) += vf_mpdecimate.o
155157
OBJS-$(CONFIG_NEGATE_FILTER) += vf_lut.o

libavfilter/allfilters.c

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ void avfilter_register_all(void)
148148
REGISTER_FILTER(LUT, lut, vf);
149149
REGISTER_FILTER(LUTRGB, lutrgb, vf);
150150
REGISTER_FILTER(LUTYUV, lutyuv, vf);
151+
REGISTER_FILTER(MCDEINT, mcdeint, vf);
151152
REGISTER_FILTER(MP, mp, vf);
152153
REGISTER_FILTER(MPDECIMATE, mpdecimate, vf);
153154
REGISTER_FILTER(NEGATE, negate, vf);

libavfilter/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "libavutil/avutil.h"
3131

3232
#define LIBAVFILTER_VERSION_MAJOR 3
33-
#define LIBAVFILTER_VERSION_MINOR 73
33+
#define LIBAVFILTER_VERSION_MINOR 74
3434
#define LIBAVFILTER_VERSION_MICRO 100
3535

3636
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \

0 commit comments

Comments
 (0)