提交 56c7d2b4 编写于 作者: P Paul B Mahol

avfilter: add high-order parametric multiband equalizer filter

Signed-off-by: NPaul B Mahol <onemda@gmail.com>
上级 80508178
......@@ -47,6 +47,7 @@ version <next>:
- DXVA2-accelerated VP9 decoding
- SOFAlizer: virtual binaural acoustics filter
- VAAPI VP9 hwaccel
- audio high-order multiband parametric equalizer
version 2.8:
......
......@@ -2841,6 +2841,7 @@ unix_protocol_select="network"
# filters
amovie_filter_deps="avcodec avformat"
anequalizer_filter_deps="cabs cexp"
aresample_filter_deps="swresample"
ass_filter_deps="libass"
asyncts_filter_deps="avresample"
......
......@@ -992,6 +992,100 @@ stream ends. The default value is 2 seconds.
@end table
@section anequalizer
High-order parametric multiband equalizer for each channel.
It accepts the following parameters:
@table @option
@item params
This option string is in format:
"c@var{chn} f=@var{cf} w=@var{w} g=@var{g} t=@var{f} | ..."
Each equalizer band is separated by '|'.
@table @option
@item chn
Set channel number to which equalization will be applied.
If input doesn't have that channel the entry is ignored.
@item cf
Set central frequency for band.
If input doesn't have that frequency the entry is ignored.
@item w
Set band width in hertz.
@item g
Set band gain in dB.
@item f
Set filter type for band, optional, can be:
@table @samp
@item 0
Butterworth, this is default.
@item 1
Chebyshev type 1.
@item 2
Chebyshev type 2.
@end table
@end table
@item curves
With this option activated frequency response of anequalizer is displayed
in video stream.
@item size
Set video stream size. Only useful if curves option is activated.
@item mgain
Set max gain that will be displayed. Only useful if curves option is activated.
Setting this to reasonable value allows to display gain which is derived from
neighbour bands which are too close to each other and thus produce higher gain
when both are activated.
@item fscale
Set frequency scale used to draw frequency response in video output.
Can be linear or logarithmic. Default is logarithmic.
@item colors
Set color for each channel curve which is going to be displayed in video stream.
This is list of color names separated by space or by '|'.
Unrecognised or missing colors will be replaced by white color.
@end table
@subsection Examples
@itemize
@item
Lower gain by 10 of central frequency 200Hz and width 100 Hz
for first 2 channels using Chebyshev type 1 filter:
@example
anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
@end example
@end itemize
@subsection Commands
This filter supports the following commands:
@table @option
@item change
Alter existing filter parameters.
Syntax for the commands is : "@var{fN}|f=@var{freq}|w=@var{width}|g=@var{gain}"
@var{fN} is existing filter number, starting from 0, if no such filter is available
error is returned.
@var{freq} set new frequency parameter.
@var{width} set new width parameter in herz.
@var{gain} set new gain parameter in dB.
Full filter invocation with asendcmd may look like this:
asendcmd=c='4.0 anequalizer change 0|f=200|w=50|g=1',anequalizer=...
@end table
@section anull
Pass the audio source unchanged to the output.
......
......@@ -29,6 +29,7 @@ OBJS-$(CONFIG_ACROSSFADE_FILTER) += af_afade.o
OBJS-$(CONFIG_ADELAY_FILTER) += af_adelay.o
OBJS-$(CONFIG_AECHO_FILTER) += af_aecho.o
OBJS-$(CONFIG_AEMPHASIS_FILTER) += af_aemphasis.o
OBJS-$(CONFIG_ANEQUALIZER_FILTER) += af_anequalizer.o
OBJS-$(CONFIG_AEVAL_FILTER) += aeval.o
OBJS-$(CONFIG_AFADE_FILTER) += af_afade.o
OBJS-$(CONFIG_AFORMAT_FILTER) += af_aformat.o
......
此差异已折叠。
......@@ -59,6 +59,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(ALLPASS, allpass, af);
REGISTER_FILTER(AMERGE, amerge, af);
REGISTER_FILTER(AMIX, amix, af);
REGISTER_FILTER(ANEQUALIZER, anequalizer, af);
REGISTER_FILTER(ANULL, anull, af);
REGISTER_FILTER(APAD, apad, af);
REGISTER_FILTER(APERMS, aperms, af);
......
......@@ -30,8 +30,8 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 6
#define LIBAVFILTER_VERSION_MINOR 21
#define LIBAVFILTER_VERSION_MICRO 101
#define LIBAVFILTER_VERSION_MINOR 22
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册