fork/rust-sdks

git clone https://git.julia.blue/fork/rust-sdks

Théo Monnomsoxr-sys (#438)2e4d385

main
1015 B32 linesraw
1/* SoX Resampler Library      Copyright (c) 2007-13 robs@users.sourceforge.net
2 * Licence for this file: LGPL v2.1                  See LICENCE for details. */
3
4#include <math.h>
5#include <libavcodec/avfft.h>
6#include "util32s.h"
7#include "rdft_t.h"
8
9static void * forward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),DFT_R2C);}
10static void * backward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),IDFT_C2R);}
11static void rdft(int length, void * setup, float * h) {av_rdft_calc(setup, h); (void)length;}
12static int multiplier(void) {return 2;}
13static void nothing(void) {}
14static int flags(void) {return RDFT_IS_SIMD;}
15
16fn_t _soxr_rdft32s_cb[] = {
17  (fn_t)forward_setup,
18  (fn_t)backward_setup,
19  (fn_t)av_rdft_end,
20  (fn_t)rdft,
21  (fn_t)rdft,
22  (fn_t)rdft,
23  (fn_t)rdft,
24  (fn_t)ORDERED_CONVOLVE_SIMD,
25  (fn_t)ORDERED_PARTIAL_CONVOLVE_SIMD,
26  (fn_t)multiplier,
27  (fn_t)nothing,
28  (fn_t)SIMD_ALIGNED_MALLOC,
29  (fn_t)SIMD_ALIGNED_CALLOC,
30  (fn_t)SIMD_ALIGNED_FREE,
31  (fn_t)flags,
32};