Andreas Rheinhardt
2c6f532e0a
Mark some pointers as const
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Paul B Mahol
9208b72a38
avfilter/af_aiir: add support for arbitrary order lattice-ladder filter format
4 years ago
Paul B Mahol
5da94413d1
avfilter/af_aiir: remove unused argument
4 years ago
Paul B Mahol
f7379eafd2
avfilter/af_aiir: fix sp2zp mapping
4 years ago
Paul B Mahol
847dc03787
avfilter/af_aiir: add analog transfer function format
4 years ago
Paul B Mahol
f372ce35f2
avfilter/af_aiir: use av_sscanf()
4 years ago
Paul B Mahol
7c1eef48e1
avfilter/af_aiir: reverse order of biquads in serial processing
This avoids most of clippings for fixed-point precision inputs.
Also add warning about filtering fixed-point precision with parallel processing.
4 years ago
Paul B Mahol
e704750a9f
avfilter/af_aiir: use transposed II form for biquad sections
4 years ago
Paul B Mahol
0df0e12d02
avfilter/af_aiir: implement parallel processing
4 years ago
Nicolas George
2f76476549
lavfi: regroup formats lists in a single structure.
It will allow to refernce it as a whole without clunky macros.
Most of the changes have been automatically made with sed:
sed -i '
s/-> *in_formats/->incfg.formats/g;
s/-> *out_formats/->outcfg.formats/g;
s/-> *in_channel_layouts/->incfg.channel_layouts/g;
s/-> *out_channel_layouts/->outcfg.channel_layouts/g;
s/-> *in_samplerates/->incfg.samplerates/g;
s/-> *out_samplerates/->outcfg.samplerates/g;
' src/libavfilter/*(.)
4 years ago
Andreas Rheinhardt
97b1a2c564
avfilter/af_aiir: Fix segfault and leak upon allocation failure
The aiir filter adds output pads in its init function. Each of these
output pads had a name which was allocated and to be freed in the uninit
function. Given that the aiir filter has between one and two outputs,
one output pad's name was freed unconditionally and a second was freed
conditionally.
Yet if adding output pads fails, there are no output pads at all and
trying to free a nonexistent pad's name will lead to a segfault.
Furthermore, if the name could be successfully allocated, yet adding the
new pad fails, the name would leak.
This commit fixes this by not allocating the pads' names at all any
more: They are constant anyway. This allows to remove the code to free
them and hence fixes the aforementioned bugs.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Paul B Mahol
1329db8cfb
avfilter/af_aiir: simplify polynomial evaluation
5 years ago
Paul B Mahol
aac16abd92
avfilter/af_aiir: use correct size when allocating in zp2tf
5 years ago
Jun Zhao
018cd437f8
lavfi/aiir: Refine the pad/vpad related operation
move the pad/vpad related operation with more natural
coding style.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years ago
Paul B Mahol
6485b54477
Revert "avfilter/af_aiir: move response drawing as last step"
This reverts commit ca7095a907
.
5 years ago
Paul B Mahol
3fc7b01c52
avfilter/af_aiir: improve response calculation with zp coefficients
5 years ago
Paul B Mahol
e2e8121eaa
avfilter/af_aiir: add S-plane support
5 years ago
Paul B Mahol
327b52412d
avfilter/af_aiir: make it clear that transfer function is digital one
5 years ago
Paul B Mahol
ca7095a907
avfilter/af_aiir: move response drawing as last step
5 years ago
Paul B Mahol
8c825e43f8
avfilter/af_aiir: fix first denominator calculation
5 years ago
Paul B Mahol
07a9e5ec5e
avfilter/af_aiir: add more descriptive options aliases
5 years ago
Paul B Mahol
ffda57b800
avfilter/af_aiir: export normalize option
And enable it in all modes by default.
5 years ago
Paul B Mahol
1fc5ddf774
avfilter/af_aiir: fix first delay value
5 years ago
Paul B Mahol
86822cfcd9
avfilter/af_aiir: fix phase and group delay calculation
Properly unwrap phase.
5 years ago
Paul B Mahol
b559a5882f
avfilter/af_aiir: fix invalid memory access with tf filtering
5 years ago
Paul B Mahol
80c4c336f9
avfilter/af_aiir: check if frame clone is set
5 years ago
Paul B Mahol
89aa1342b1
avfilter/af_aiir: normalize biquads only if divisor is big enough
5 years ago
Paul B Mahol
f2a01b4c8b
avfilter/af_aiir: fix biquads normalization
5 years ago
Paul B Mahol
eecc45cea5
avfilter/af_aiir: add missing normalization of biquads gains
5 years ago
Paul B Mahol
2f5fb9e60f
avfilter/af_aiir: make a/b coefficients array
5 years ago
Paul B Mahol
e169d3756e
avfilter/af_aiir: factor out response calculation
5 years ago
Paul B Mahol
c36e72ed27
avfilter/af_aiir: check for stability
5 years ago
Paul B Mahol
9cd56bb94c
avfilter/af_aiir: fix array length when selecting conjugate poles
5 years ago
Paul B Mahol
80dacbedba
avfilter/af_aiir: calculate group delay too
5 years ago
Paul B Mahol
60e6db2f5b
avfilter/af_aiir: do not ignore k option for audio filtering
Previously it was used only for displaying frequency response.
5 years ago
Paul B Mahol
2a801e8856
avfilter/af_aiir: implement mix option
5 years ago
Paul B Mahol
0f0f840716
avfilter/af_aiir: implement rate option
6 years ago
Michael Niedermayer
8dd7c2c6a7
avfilter/af_aiir: Remove l from %lf in av_log environment
The l modifier does nothing in C99 and it was undefined in C89 for %f
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Carl Eugen Hoyos
9cb3d8fcb7
lavfi/af_afir,af_aiir: Remove a variable that is always -1.
Fixes two warnings:
libavfilter/af_afir.c:194:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
~~~~~~~~~~~~^~~~
libavfilter/af_aiir.c:689:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
~~~~~~~~~~~~^~~~
6 years ago
Paul B Mahol
1aa5192451
avfilter/af_aiir: draw IR frequency response
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
de8a1d8d4d
avfilter/af_aiir: add polar zeros/poles format variant
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
de5b12c93f
avfilter/af_aiir: unbreak clipping detection
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
3c29f68b4d
avfilter/af_aiir: do not leak memory on failure in convert_zp2tf()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
e9edd61965
avfilter/af_aiir: refactor code so it uses IIRChannel struct
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
21c99f4b40
avfilter/af_aiir: make default processing to serially cascaded
Also add several helpfull log messages.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
d9a3074b93
avfilter/af_aiir: add slice threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
7add1ca2b5
avfilter/af_aiir: add cascaded biquads support
Also add precision option.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
3f234a0b22
avfilter/af_aiir: do not forget to free gains too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
205046420d
avfilter/af_aiir: fix typo which may cause overread
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
2d3df8e2e9
avfilter/af_aiir: rename options, provide gains in separate option
This way it can be also used for other format.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago