soxr-code/src/avfft32s.c

33 lines
1015 B
C
Raw Permalink Normal View History

2013-01-08 10:08:03 +01:00
/* SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net
2012-12-03 18:25:33 +01:00
* Licence for this file: LGPL v2.1 See LICENCE for details. */
#include <math.h>
#include <libavcodec/avfft.h>
2016-05-29 21:47:44 +02:00
#include "util32s.h"
2016-05-23 08:55:16 +02:00
#include "rdft_t.h"
2012-12-03 18:25:33 +01:00
static void * forward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),DFT_R2C);}
static void * backward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),IDFT_C2R);}
static void rdft(int length, void * setup, float * h) {av_rdft_calc(setup, h); (void)length;}
static int multiplier(void) {return 2;}
static void nothing(void) {}
2016-05-23 08:55:16 +02:00
static int flags(void) {return RDFT_IS_SIMD;}
2012-12-03 18:25:33 +01:00
fn_t _soxr_rdft32s_cb[] = {
(fn_t)forward_setup,
(fn_t)backward_setup,
(fn_t)av_rdft_end,
(fn_t)rdft,
(fn_t)rdft,
(fn_t)rdft,
(fn_t)rdft,
2016-05-23 08:55:16 +02:00
(fn_t)ORDERED_CONVOLVE_SIMD,
(fn_t)ORDERED_PARTIAL_CONVOLVE_SIMD,
2012-12-03 18:25:33 +01:00
(fn_t)multiplier,
(fn_t)nothing,
2016-05-23 08:55:16 +02:00
(fn_t)SIMD_ALIGNED_MALLOC,
(fn_t)SIMD_ALIGNED_CALLOC,
(fn_t)SIMD_ALIGNED_FREE,
(fn_t)flags,
2012-12-03 18:25:33 +01:00
};