Commit 172505b8 authored by Stefano Sabatini's avatar Stefano Sabatini

lavfi: add kerndeint filter

This is a port of the kerndeint filter (libmpcodecs/vf_kerndeint) by
Donal A. Graft (original avisynth plugin author), and is based on the
work by Jérémy Tran <tran.jeremy.av@gmail.com> done for SOCIS 2012.
parent 92f1bed1
......@@ -55,6 +55,7 @@ version <next>:
- adobe and limelight publisher authentication in RTMP
- data: URI scheme
- support building on the Plan 9 operating system
- kerndeint filter ported from MPlayer
version 1.0:
......
......@@ -33,6 +33,7 @@ Specifically, the GPL parts of FFmpeg are
- vf_geq.c
- vf_hqdn3d.c
- vf_hue.c
- vf_kerndeint.c
- vf_mp.c
- vf_pp.c
- vf_smartblur.c
......
......@@ -1987,6 +1987,7 @@ frei0r_src_filter_extralibs='$ldl'
geq_filter_deps="gpl"
hqdn3d_filter_deps="gpl"
hue_filter_deps="gpl"
kerndeint_filter_deps="gpl"
movie_filter_deps="avcodec avformat"
mp_filter_deps="gpl avcodec swscale inline_asm"
mptestsrc_filter_deps="gpl"
......
......@@ -2810,6 +2810,63 @@ If a parameter is omitted, it is kept at its current value.
Interlaceing detect filter. This filter tries to detect if the input is
interlaced or progressive. Top or bottom field first.
@section kerndeint
Deinterlace input video by applying Donald Graft's adaptive kernel
deinterling. Work on interlaced parts of a video to produce
progressive frames.
This filter accepts parameters as a list of @var{key}=@var{value}
pairs, separated by ":". If the key of the first options is omitted,
the arguments are interpreted according to the following syntax:
@var{thresh}:@var{map}:@var{order}:@var{sharp}:@var{twoway}.
The description of the accepted parameters follows.
@table @option
@item thresh
Set the threshold which affects the filter's tolerance when
determining if a pixel line must be processed. It must be an integer
in the range [0,255] and defaults to 10. A value of 0 will result in
applying the process on every pixels.
@item map
Paint pixels exceeding the threshold value to white if set to 1.
Default is 0.
@item order
Set the fields order. Swap fields if set to 1, leave fields alone if
0. Default is 0.
@item sharp
Enable additional sharpening if set to 1. Default is 0.
@item twoway
Enable twoway sharpening if set to 1. Default is 0.
@end table
@subsection Examples
@itemize
@item
Apply default values:
@example
kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
@end example
@item
Enable additional sharpening:
@example
kerndeint=sharp=1
@end example
@item
Paint processed pixels in white:
@example
kerndeint=map=1
@end example
@end itemize
@section lut, lutrgb, lutyuv
Compute a look-up table for binding each pixel component input value
......
......@@ -114,6 +114,7 @@ OBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o
OBJS-$(CONFIG_HQDN3D_FILTER) += vf_hqdn3d.o
OBJS-$(CONFIG_HUE_FILTER) += vf_hue.o
OBJS-$(CONFIG_IDET_FILTER) += vf_idet.o
OBJS-$(CONFIG_KERNDEINT_FILTER) += vf_kerndeint.o
OBJS-$(CONFIG_LUT_FILTER) += vf_lut.o
OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o
OBJS-$(CONFIG_LUTYUV_FILTER) += vf_lut.o
......
......@@ -108,6 +108,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(HQDN3D, hqdn3d, vf);
REGISTER_FILTER(HUE, hue, vf);
REGISTER_FILTER(IDET, idet, vf);
REGISTER_FILTER(KERNDEINT, kerndeint, vf);
REGISTER_FILTER(LUT, lut, vf);
REGISTER_FILTER(LUTRGB, lutrgb, vf);
REGISTER_FILTER(LUTYUV, lutyuv, vf);
......
......@@ -29,8 +29,8 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 30
#define LIBAVFILTER_VERSION_MICRO 104
#define LIBAVFILTER_VERSION_MINOR 31
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
......
This diff is collapsed.
......@@ -11,6 +11,7 @@ FATE_LAVFI = fate-lavfi-alphaextract_rgb \
fate-lavfi-fade \
fate-lavfi-field \
fate-lavfi-idet \
fate-lavfi-kerndeint \
fate-lavfi-life \
fate-lavfi-null \
fate-lavfi-overlay \
......
......@@ -80,6 +80,7 @@ do_lavfi_pixfmts(){
test ${test%_[bl]e} = $testname || return 0
filter=$2
filter_args=$3
prefilter_chain=$4
showfiltfmts="$target_exec $target_path/libavfilter/filtfmts-test"
scale_exclude_fmts=${outfile}${testname}_scale_exclude_fmts
......@@ -96,7 +97,7 @@ do_lavfi_pixfmts(){
pix_fmts=$(comm -12 $scale_exclude_fmts $in_fmts)
for pix_fmt in $pix_fmts; do
do_video_filter $pix_fmt "format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt
do_video_filter $pix_fmt "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt
done
rm $in_fmts $scale_in_fmts $scale_out_fmts $scale_exclude_fmts
......@@ -104,6 +105,7 @@ do_lavfi_pixfmts(){
# all these filters have exactly one input and exactly one output
do_lavfi_pixfmts "field" "field" "bottom"
do_lavfi_pixfmts "kerndeint" "kerndeint" "" "tinterlace=interleave_top,"
do_lavfi_pixfmts "pixfmts_copy" "copy" ""
do_lavfi_pixfmts "pixfmts_crop" "crop" "100:100:100:100"
do_lavfi_pixfmts "pixfmts_hflip" "hflip" ""
......
argb 484893f83e13c937328f13a7c84d2f50
yuv420p a935cce07c5287b92c6d5220361866ed
yuyv422 f549c98059ba9ce50e28204256d13b5d
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