Commit 7f1b14bc authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add acrusher filter

parent cc6a59d2
......@@ -14,6 +14,7 @@ version <next>:
- MediaCodec hwaccel
- True Audio (TTA) muxer
- crystalizer audio filter
- acrusher audio filter
version 3.1:
......
......@@ -441,6 +441,64 @@ ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c
@end example
@end itemize
@section acrusher
Reduce audio bit resolution.
This filter is bit crusher with enhanced funcionality. A bit crusher
is used to audibly reduce number of bits an audio signal is sampled
with. This doesn't change the bit depth at all, it just produces the
effect. Material reduced in bit depth sounds more harsh and "digital".
This filter is able to even round to continous values instead of discrete
bit depths.
Additionally it has a D/C offset which results in different crushing of
the lower and the upper half of the signal.
An Anti-Aliasing setting is able to produce "softer" crushing sounds.
Another feature of this filter is the logarithmic mode.
This setting switches from linear distances between bits to logarithmic ones.
The result is a much more "natural" sounding crusher which doesn't gate low
signals for example. The human ear has a logarithmic perception, too
so this kind of crushing is much more pleasant.
Logarithmic crushing is also able to get anti-aliased.
The filter accepts the following options:
@table @option
@item level_in
Set level in.
@item level_out
Set level out.
@item bits
Set bit reduction.
@item mix
Set mixing ammount.
@item mode
Can be linear: @code{lin} or logarithmic: @code{log}.
@item dc
Set DC.
@item aa
Set anti-aliasing.
@item samples
Set sample reduction.
@item lfo
Enable LFO. By default disabled.
@item lforange
Set LFO range.
@item lforate
Set LFO rate.
@end table
@section adelay
Delay one or more audio channels.
......
......@@ -30,6 +30,7 @@ OBJS-$(HAVE_THREADS) += pthread.o
OBJS-$(CONFIG_ABENCH_FILTER) += f_bench.o
OBJS-$(CONFIG_ACOMPRESSOR_FILTER) += af_sidechaincompress.o
OBJS-$(CONFIG_ACROSSFADE_FILTER) += af_afade.o
OBJS-$(CONFIG_ACRUSHER_FILTER) += af_acrusher.o
OBJS-$(CONFIG_ADELAY_FILTER) += af_adelay.o
OBJS-$(CONFIG_AECHO_FILTER) += af_aecho.o
OBJS-$(CONFIG_AEMPHASIS_FILTER) += af_aemphasis.o
......
This diff is collapsed.
......@@ -48,6 +48,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(ABENCH, abench, af);
REGISTER_FILTER(ACOMPRESSOR, acompressor, af);
REGISTER_FILTER(ACROSSFADE, acrossfade, af);
REGISTER_FILTER(ACRUSHER, acrusher, af);
REGISTER_FILTER(ADELAY, adelay, af);
REGISTER_FILTER(AECHO, aecho, af);
REGISTER_FILTER(AEMPHASIS, aemphasis, af);
......
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 6
#define LIBAVFILTER_VERSION_MINOR 50
#define LIBAVFILTER_VERSION_MINOR 51
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
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