Commit cec59eb6 authored by Clément Bœsch's avatar Clément Bœsch

avfilter/dctdnoiz: add 8x8 dct and make it the default

8x8 is about 5x faster than 16x16 on 1080p input. Since a block size of
8x8 makes the filter almost usable (time wise) and it's not obvious if
8x8 or 16x16 is better from a quality PoV (it really depends on the
input and parameters), the filter now defaults to 8x8, and as a result
libavfilter is micro bumped.
parent ec0b08d2
...@@ -3219,7 +3219,7 @@ curves=psfile='MyCurvesPresets/purple.asv':green='0.45/0.53' ...@@ -3219,7 +3219,7 @@ curves=psfile='MyCurvesPresets/purple.asv':green='0.45/0.53'
Denoise frames using 2D DCT (frequency domain filtering). Denoise frames using 2D DCT (frequency domain filtering).
This filter is not designed for real time and can be extremely slow. This filter is not designed for real time.
The filter accepts the following options: The filter accepts the following options:
...@@ -3235,14 +3235,14 @@ If you need a more advanced filtering, see @option{expr}. ...@@ -3235,14 +3235,14 @@ If you need a more advanced filtering, see @option{expr}.
Default is @code{0}. Default is @code{0}.
@item overlap @item overlap
Set number overlapping pixels for each block. Each block is of size Set number overlapping pixels for each block. Since the filter can be slow, you
@code{16x16}. Since the filter can be slow, you may want to reduce this value, may want to reduce this value, at the cost of a less effective filter and the
at the cost of a less effective filter and the risk of various artefacts. risk of various artefacts.
If the overlapping value doesn't allow to process the whole input width or If the overlapping value doesn't allow to process the whole input width or
height, a warning will be displayed and according borders won't be denoised. height, a warning will be displayed and according borders won't be denoised.
Default value is @code{15}. Default value is @var{blocksize}-1, which is the best possible setting.
@item expr, e @item expr, e
Set the coefficient factor expression. Set the coefficient factor expression.
...@@ -3254,6 +3254,15 @@ If this is option is set, the @option{sigma} option will be ignored. ...@@ -3254,6 +3254,15 @@ If this is option is set, the @option{sigma} option will be ignored.
The absolute value of the coefficient can be accessed through the @var{c} The absolute value of the coefficient can be accessed through the @var{c}
variable. variable.
@item n
Set the @var{blocksize} using the number of bits. @code{1<<@var{n}} defines the
@var{blocksize}, which is the width and height of the processed blocks.
The default value is @var{3} (8x8) and can be raised to @var{4} for a
@var{blocksize} of 16x16. Note that changing this setting has huge consequences
on the speed processing. Also, a larger block size does not necessarily means a
better de-noising.
@end table @end table
@subsection Examples @subsection Examples
...@@ -3268,6 +3277,11 @@ The same operation can be achieved using the expression system: ...@@ -3268,6 +3277,11 @@ The same operation can be achieved using the expression system:
dctdnoiz=e='gte(c, 4.5*3)' dctdnoiz=e='gte(c, 4.5*3)'
@end example @end example
Violent denoise using a block size of @code{16x16}:
@example
dctdnoiz=15:n=4
@end example
@anchor{decimate} @anchor{decimate}
@section decimate @section decimate
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 4 #define LIBAVFILTER_VERSION_MAJOR 4
#define LIBAVFILTER_VERSION_MINOR 11 #define LIBAVFILTER_VERSION_MINOR 11
#define LIBAVFILTER_VERSION_MICRO 102 #define LIBAVFILTER_VERSION_MICRO 103
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \ 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