diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-11 19:10:10 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-11 19:13:03 +0100 |
commit | 96d616052b3d39678e477fa10610ca688f46fff9 (patch) | |
tree | 8bd31d06318bc786ea8f1d84f92090c9c860bc11 /libavcodec/iirfilter.c | |
parent | 27506aceda8115f82f89691a4441d62a8cf24a6e (diff) | |
parent | d12b5b2f135aade4099f4b26b0fe678656158c13 (diff) | |
download | ffmpeg-96d616052b3d39678e477fa10610ca688f46fff9.tar.gz |
Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
* commit 'd12b5b2f135aade4099f4b26b0fe678656158c13':
build: Split test programs off into separate files
Some conversions done by: James Almer <jamrial@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/iirfilter.c')
-rw-r--r-- | libavcodec/iirfilter.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/libavcodec/iirfilter.c b/libavcodec/iirfilter.c index 474f52fde7..a8c9b9b826 100644 --- a/libavcodec/iirfilter.c +++ b/libavcodec/iirfilter.c @@ -323,35 +323,3 @@ void ff_iir_filter_init(FFIIRFilterContext *f) { if (HAVE_MIPSFPU) ff_iir_filter_init_mips(f); } - -#ifdef TEST -#include <stdio.h> - -#define FILT_ORDER 4 -#define SIZE 1024 -int main(void) -{ - struct FFIIRFilterCoeffs *fcoeffs = NULL; - struct FFIIRFilterState *fstate = NULL; - float cutoff_coeff = 0.4; - int16_t x[SIZE], y[SIZE]; - int i; - - fcoeffs = ff_iir_filter_init_coeffs(NULL, FF_FILTER_TYPE_BUTTERWORTH, - FF_FILTER_MODE_LOWPASS, FILT_ORDER, - cutoff_coeff, 0.0, 0.0); - fstate = ff_iir_filter_init_state(FILT_ORDER); - - for (i = 0; i < SIZE; i++) - x[i] = lrint(0.75 * INT16_MAX * sin(0.5 * M_PI * i * i / SIZE)); - - ff_iir_filter(fcoeffs, fstate, SIZE, x, 1, y, 1); - - for (i = 0; i < SIZE; i++) - printf("%6d %6d\n", x[i], y[i]); - - ff_iir_filter_free_coeffsp(&fcoeffs); - ff_iir_filter_free_statep(&fstate); - return 0; -} -#endif /* TEST */ |