Andreas Rheinhardt
3aa0be003e
avcodec/iirfilter: Fix memleak
...
Commit 17e88bf0df
created a memleak by
removing a call to ff_iir_filter_free_coeffsp on error; this has been
found by Coverity (ID 1464159). This commit fixes the memleak by
readding the call to ff_iir_filter_free_coeffsp.
Notice that this is not a simple revert, because several macros that
were used before 17e88bf0df
were replaced
in commit 44863b2c2d
and completely removed
in 2658680df4
.
Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Limin Wang
44863b2c2d
avcodec/iirfilter: remove FF_ALLOCZ_OR_GOTO and gotos label
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years ago
Limin Wang
17e88bf0df
avcodec/aacenc: add FF_CODEC_CAP_INIT_CLEANUP
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years ago
Diego Biurrun
52730e0f86
iir_filter: Change type of array stride parameters to ptrdiff_t
...
ptrdiff_t is the correct type for array strides and similar.
8 years ago
Diego Biurrun
d12b5b2f13
build: Split test programs off into separate files
...
This avoids spurious library rebuilds when only the test program
code is changed and simplifies the build system.
9 years ago
Diego Biurrun
3b08d9d932
testprogs: K&R formatting cosmetics
9 years ago
Michael Niedermayer
f43ac02723
avcodec/iirfilter: Make ff_iir_filter_free_state() also zero the freed pointer
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
43fb16cf74
avcodec/iirfilter: Change ff_iir_filter_free_coeffs() so it clears the pointers as well
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
6fee1b90ce
avcodec: Add av_cold attributes to init functions missing them
12 years ago
Bojan Zivkovic
7d29c6eebc
mips: Optimization of IIR filter function
...
Signed-off-by: Bojan Zivkovic <bojan@mips.com>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
cb45553f57
Remove pointless #undefs of previously forbidden functions.
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Mans Rullgard
75a24bef4a
iirfilter: add fate test
...
Change the test program to output text instead of binary files so
it can be compared easily in FATE.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
2f37321abc
iirfilter: fix biquad filter coefficients.
...
The current filter implementation should only have the cx coefficients
divided by gain in order to give the correct output scale.
14 years ago
Justin Ruggles
a26d2b4bc8
Fix compilation of iirfilter-test.
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
0ca4fcc94c
Add special case for 2nd-order IIR filter.
...
40% faster in ff_iir_filter_flt() when c->order == 2.
(cherry picked from commit 37cb3eb534
)
14 years ago
Justin Ruggles
37cb3eb534
Add special case for 2nd-order IIR filter.
...
40% faster in ff_iir_filter_flt() when c->order == 2.
14 years ago
Justin Ruggles
ff5eded449
10l: reverse the biquad coefficients.
...
I did not notice that the filter implementation uses a reversed history state.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 98cfadd648
)
14 years ago
Justin Ruggles
17d4f4558e
iir: Change dst param to float* in ff_iir_filter_flt().
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 69915b48d6
)
14 years ago
Justin Ruggles
98cfadd648
10l: reverse the biquad coefficients.
...
I did not notice that the filter implementation uses a reversed history state.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
14 years ago
Justin Ruggles
69915b48d6
iir: Change dst param to float* in ff_iir_filter_flt().
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
a994f86196
iir: change filter type if/else to a switch.
...
Simplifies error handling and makes it easier to add additional filter types.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 0361d13cf3
)
14 years ago
Justin Ruggles
aa226b2460
Add biquad high-pass and low-pass IIR filters.
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit fcdf0a43cd
)
14 years ago
Justin Ruggles
2293b0b698
Split out Butterworth filter coeff init to a separate function.
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 30112adadf
)
14 years ago
Justin Ruggles
99c2111b12
cosmetics: vertical alignment and line wrap
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 75b98610a7
)
14 years ago
Justin Ruggles
20d1f6fec1
Add memory allocation failure checks to ff_iir_filter_init_coeffs().
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d42dc217ed
)
14 years ago
Justin Ruggles
7891fdcc03
cosmetics: wrap long line
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit ebb230279a
)
14 years ago
Justin Ruggles
b3b8b930fc
Add function ff_iir_filter_flt() to accept floating-point input and output.
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 0a3d7697b4
)
14 years ago
Justin Ruggles
f32e646d82
Fix use of sstep/dstep in ff_iir_filter().
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit c3897d7690
)
14 years ago
Justin Ruggles
0361d13cf3
iir: change filter type if/else to a switch.
...
Simplifies error handling and makes it easier to add additional filter types.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
fcdf0a43cd
Add biquad high-pass and low-pass IIR filters.
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
30112adadf
Split out Butterworth filter coeff init to a separate function.
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
75b98610a7
cosmetics: vertical alignment and line wrap
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
d42dc217ed
Add memory allocation failure checks to ff_iir_filter_init_coeffs().
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
ebb230279a
cosmetics: wrap long line
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
0a3d7697b4
Add function ff_iir_filter_flt() to accept floating-point input and output.
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
c3897d7690
Fix use of sstep/dstep in ff_iir_filter().
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
ca0f1e5092
IIR filter test program.
...
Originally committed as revision 19443 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Alex Converse
c8ec2f1cb8
Mark iir filter init and free functions av_cold.
...
Originally committed as revision 19398 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Alex Converse
47f49f98ca
Fix "iirfilter.c:55: warning: unused variable ‘size’"
...
Originally committed as revision 19397 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Alex Converse
e187d87d7d
Eliminate use of complex.h from iirfilter.c
...
Originally committed as revision 19396 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Måns Rullgård
181b336304
Fix declarations of complex numbers
...
Complex numbers must be declared using a base type of float, double,
or long double.
Originally committed as revision 19390 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
bad5537e2c
Use full internal pathname in doxygen @file directives.
...
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.
Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Kostya Shishkov
a169f49881
Add generic IIR filter interface with Butterworth lowpass filter implementation
...
and remove obsoleted old lowpass filter.
Originally committed as revision 15005 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago