Commit 787d370e authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add deband filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent b68e445f
......@@ -20,6 +20,7 @@ version <next>:
- Dynamic Audio Normalizer as dynaudnorm filter
- Reverse filter
- Random filter
- deband filter
version 2.7:
......
......@@ -3878,6 +3878,43 @@ Violent denoise using a block size of @code{16x16}:
dctdnoiz=15:n=4
@end example
@section deband
Remove banding artifacts from input video.
It works by replacing banded pixels with average value of referenced pixels.
The filter accepts the following options:
@table @option
@item 1thr
@item 2thr
@item 3thr
@item 4thr
Set banding detection threshold for each plane. Default is 0.02.
Valid range is 0.00003 to 0.5.
If difference between current pixel and reference pixel is less than threshold,
it will be considered as banded.
@item range, r
Banding detection range in pixels. Default is 16. If positive, random number
in range 0 to set value will be used. If negative, exact absolute value
will be used.
The range defines square of four pixels around current pixel.
@item direction, d
Set direction in radians from which four pixel will be compared. If positive,
random direction from 0 to set direction will be picked. If negative, exact of
absolute value will be picked. For example direction 0, -PI or -2*PI radians
will pick only pixels on same row and -PI/2 will pick only pixels on same
column.
@item blur
If enabled, current pixel is compared with average value of all four
surrounding pixels. The default is enabled. If disabled current pixel is
compared with all four surrounding pixels. The pixel is considered banded
if only all four differences with surrounding pixels are less than threshold.
@end table
@anchor{decimate}
@section decimate
......
......@@ -112,6 +112,7 @@ OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o
OBJS-$(CONFIG_CROPDETECT_FILTER) += vf_cropdetect.o
OBJS-$(CONFIG_CURVES_FILTER) += vf_curves.o
OBJS-$(CONFIG_DCTDNOIZ_FILTER) += vf_dctdnoiz.o
OBJS-$(CONFIG_DEBAND_FILTER) += vf_deband.o
OBJS-$(CONFIG_DECIMATE_FILTER) += vf_decimate.o
OBJS-$(CONFIG_DEFLATE_FILTER) += vf_neighbor.o
OBJS-$(CONFIG_DEJUDDER_FILTER) += vf_dejudder.o
......
......@@ -128,6 +128,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(CROPDETECT, cropdetect, vf);
REGISTER_FILTER(CURVES, curves, vf);
REGISTER_FILTER(DCTDNOIZ, dctdnoiz, vf);
REGISTER_FILTER(DEBAND, deband, vf);
REGISTER_FILTER(DECIMATE, decimate, vf);
REGISTER_FILTER(DEFLATE, deflate, vf);
REGISTER_FILTER(DEJUDDER, dejudder, vf);
......
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 25
#define LIBAVFILTER_VERSION_MINOR 27
#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