Commit 80c64459 authored by Paul B Mahol's avatar Paul B Mahol

lavfi: port perspective filter from libmpcodecs

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent ab5f5816
......@@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
version <next>
- aecho filter
- perspective filter ported from libmpcodecs
version 2.0:
......
......@@ -39,6 +39,7 @@ Specifically, the GPL parts of FFmpeg are
- vf_mp.c
- vf_noise.c
- vf_owdenoise.c
- vf_perspective.c
- vf_pp.c
- vf_sab.c
- vf_smartblur.c
......
......@@ -2175,6 +2175,7 @@ mpdecimate_filter_deps="gpl avcodec"
mptestsrc_filter_deps="gpl"
negate_filter_deps="lut_filter"
noise_filter_deps="gpl"
perspective_filter_deps="gpl"
resample_filter_deps="avresample"
ocv_filter_deps="libopencv"
owdenoise_filter_deps="gpl"
......
......@@ -5722,6 +5722,44 @@ pad="2*iw:2*ih:ow-iw:oh-ih"
@end example
@end itemize
@section perspective
Correct perspective of video not recorded perpendicular to the screen.
A description of the accepted parameters follows.
@table @option
@item x0
@item y0
@item x1
@item y1
@item x2
@item y2
@item x3
@item y3
Set coordinates expression for top left, top right, bottom left and bottom right corners.
Default values are @code{0:0:W:0:0:H:W:H} with which perspective will remain unchanged.
The expressions can use the following variables:
@table @option
@item W
@item H
the width and height of video frame.
@end table
@item interpolation
Set interpolation for perspective correction.
It accepts the following values:
@table @samp
@item linear
@item cubic
@end table
Default value is @samp{linear}.
@end table
@section pixdesctest
Pixel format descriptor test filter, mainly useful for internal
......
......@@ -166,6 +166,7 @@ OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o dualinput.o
OBJS-$(CONFIG_OWDENOISE_FILTER) += vf_owdenoise.o
OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o
OBJS-$(CONFIG_PERMS_FILTER) += f_perms.o
OBJS-$(CONFIG_PERSPECTIVE_FILTER) += vf_perspective.o
OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o
OBJS-$(CONFIG_PP_FILTER) += vf_pp.o
OBJS-$(CONFIG_PSNR_FILTER) += vf_psnr.o dualinput.o
......
......@@ -161,6 +161,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(OWDENOISE, owdenoise, vf);
REGISTER_FILTER(PAD, pad, vf);
REGISTER_FILTER(PERMS, perms, vf);
REGISTER_FILTER(PERSPECTIVE, perspective, vf);
REGISTER_FILTER(PIXDESCTEST, pixdesctest, vf);
REGISTER_FILTER(PP, pp, vf);
REGISTER_FILTER(PSNR, psnr, vf);
......
......@@ -30,8 +30,8 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 80
#define LIBAVFILTER_VERSION_MICRO 101
#define LIBAVFILTER_VERSION_MINOR 81
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
......
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