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

avfilter: add arbitrary audio IIR filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent b2be76c0
......@@ -33,6 +33,7 @@ version <next>:
- deconvolve video filter
- entropy video filter
- hilbert audio filter source
- aiir audio filter
version 3.4:
......
......@@ -1060,6 +1060,41 @@ the reduction.
Default is @code{average}. Can be @code{average} or @code{maximum}.
@end table
@section aiir
Apply an arbitrary Infinite Impulse Response filter.
It accepts the following parameters:
@table @option
@item a
Set denominator/poles coefficients.
@item b
Set nominator/zeros coefficients.
@item dry_gain
Set input gain.
@item wet_gain
Set output gain.
@end table
Coefficients are separated by spaces and are in ascending order.
Different coefficients can be provided for every channel, in such case
use '|' to separate coefficients. Last provided coefficients will be
used for all remaining channels.
@subsection Examples
@itemize
@item
Apply 2 pole elliptic notch at arround 5000Hz for 48000 Hz sample rate:
@example
aiir=b=7.957584807809675810E-1 -2.575128568908332300 3.674839853930788710 -2.57512875289799137 7.957586296317130880E-1:a=1 -2.86950072432325953 3.63022088054647218 -2.28075678147272232 6.361362326477423500E-1
@end example
@end itemize
@section alimiter
The limiter prevents an input signal from rising over a desired threshold.
......
......@@ -43,6 +43,7 @@ OBJS-$(CONFIG_AFFTFILT_FILTER) += af_afftfilt.o
OBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
OBJS-$(CONFIG_AFORMAT_FILTER) += af_aformat.o
OBJS-$(CONFIG_AGATE_FILTER) += af_agate.o
OBJS-$(CONFIG_AIIR_FILTER) += af_aiir.o
OBJS-$(CONFIG_AINTERLEAVE_FILTER) += f_interleave.o
OBJS-$(CONFIG_ALIMITER_FILTER) += af_alimiter.o
OBJS-$(CONFIG_ALLPASS_FILTER) += af_biquads.o
......
This diff is collapsed.
......@@ -375,6 +375,8 @@ static int config_filter(AVFilterLink *outlink, int reset)
av_assert0(0);
}
av_log(ctx, AV_LOG_VERBOSE, "a=%lf %lf %lf:b=%lf %lf %lf\n", s->a0, s->a1, s->a2, s->b0, s->b1, s->b2);
s->a1 /= s->a0;
s->a2 /= s->a0;
s->b0 /= s->a0;
......
......@@ -54,6 +54,7 @@ static void register_all(void)
REGISTER_FILTER(AFIR, afir, af);
REGISTER_FILTER(AFORMAT, aformat, af);
REGISTER_FILTER(AGATE, agate, af);
REGISTER_FILTER(AIIR, aiir, af);
REGISTER_FILTER(AINTERLEAVE, ainterleave, af);
REGISTER_FILTER(ALIMITER, alimiter, af);
REGISTER_FILTER(ALLPASS, allpass, af);
......
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 7
#define LIBAVFILTER_VERSION_MINOR 10
#define LIBAVFILTER_VERSION_MINOR 11
#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