soxr-code/src/pffft32s.c

35 lines
1.5 KiB
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. */
2016-05-23 08:55:16 +02:00
#define PFFFT_DOUBLE 0
2016-03-04 23:18:36 +01:00
#include "pffft-wrap.c"
2012-12-03 18:25:33 +01:00
2016-05-23 08:55:16 +02:00
#include "rdft_t.h"
2012-12-03 18:25:33 +01:00
static void * setup(int len) {return pffft_new_setup(len, PFFFT_REAL);}
static void forward (int length, void * setup, float * h, float * scratch) {pffft_transform (setup, h, h, scratch, PFFFT_FORWARD); (void)length;}
static void oforward (int length, void * setup, float * h, float * scratch) {pffft_transform_ordered(setup, h, h, scratch, PFFFT_FORWARD); (void)length;}
static void backward (int length, void * setup, float * H, float * scratch) {pffft_transform (setup, H, H, scratch, PFFFT_BACKWARD);(void)length;}
static void obackward(int length, void * setup, float * H, float * scratch) {pffft_transform_ordered(setup, H, H, scratch, PFFFT_BACKWARD);(void)length;}
2016-05-23 08:55:16 +02:00
static void convolve(int length, void * setup, float * H, float const * with) {pffft_zconvolve(setup, H, with, H); (void)length;}
2012-12-03 18:25:33 +01:00
static int multiplier(void) {return 1;}
2016-05-23 08:55:16 +02:00
static int flags(void) {return RDFT_IS_SIMD | RDFT_NEEDS_SCRATCH;}
2012-12-03 18:25:33 +01:00
fn_t _soxr_rdft32s_cb[] = {
(fn_t)setup,
(fn_t)setup,
(fn_t)pffft_destroy_setup,
(fn_t)forward,
(fn_t)oforward,
(fn_t)backward,
(fn_t)obackward,
(fn_t)convolve,
2016-05-23 08:55:16 +02:00
(fn_t)ORDERED_PARTIAL_CONVOLVE_SIMD,
2012-12-03 18:25:33 +01:00
(fn_t)multiplier,
(fn_t)pffft_reorder_back,
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
};