summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libopus/celt/mdct.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/mdct.h')
-rw-r--r--lib/rbcodec/codecs/libopus/celt/mdct.h56
1 files changed, 49 insertions, 7 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/mdct.h b/lib/rbcodec/codecs/libopus/celt/mdct.h
index d72182138a..160ae4e0f3 100644
--- a/lib/rbcodec/codecs/libopus/celt/mdct.h
+++ b/lib/rbcodec/codecs/libopus/celt/mdct.h
@@ -53,18 +53,60 @@ typedef struct {
53 const kiss_twiddle_scalar * OPUS_RESTRICT trig; 53 const kiss_twiddle_scalar * OPUS_RESTRICT trig;
54} mdct_lookup; 54} mdct_lookup;
55 55
56int clt_mdct_init(mdct_lookup *l,int N, int maxshift); 56#if defined(HAVE_ARM_NE10)
57void clt_mdct_clear(mdct_lookup *l); 57#include "arm/mdct_arm.h"
58#endif
59
60
61int clt_mdct_init(mdct_lookup *l,int N, int maxshift, int arch);
62void clt_mdct_clear(mdct_lookup *l, int arch);
58 63
59/** Compute a forward MDCT and scale by 4/N, trashes the input array */ 64/** Compute a forward MDCT and scale by 4/N, trashes the input array */
60void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, 65void clt_mdct_forward_c(const mdct_lookup *l, kiss_fft_scalar *in,
61 kiss_fft_scalar * OPUS_RESTRICT out, 66 kiss_fft_scalar * OPUS_RESTRICT out,
62 const opus_val16 *window, int overlap, int shift, int stride); 67 const opus_val16 *window, int overlap,
68 int shift, int stride, int arch);
63 69
64/** Compute a backward MDCT (no scaling) and performs weighted overlap-add 70/** Compute a backward MDCT (no scaling) and performs weighted overlap-add
65 (scales implicitly by 1/2) */ 71 (scales implicitly by 1/2) */
66void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, 72void clt_mdct_backward_c(const mdct_lookup *l, kiss_fft_scalar *in,
67 kiss_fft_scalar * OPUS_RESTRICT out, 73 kiss_fft_scalar * OPUS_RESTRICT out,
68 const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride); 74 const opus_val16 * OPUS_RESTRICT window,
75 int overlap, int shift, int stride, int arch);
76
77#if !defined(OVERRIDE_OPUS_MDCT)
78/* Is run-time CPU detection enabled on this platform? */
79#if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10)
80
81extern void (*const CLT_MDCT_FORWARD_IMPL[OPUS_ARCHMASK+1])(
82 const mdct_lookup *l, kiss_fft_scalar *in,
83 kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window,
84 int overlap, int shift, int stride, int arch);
85
86#define clt_mdct_forward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \
87 ((*CLT_MDCT_FORWARD_IMPL[(arch)&OPUS_ARCHMASK])(_l, _in, _out, \
88 _window, _overlap, _shift, \
89 _stride, _arch))
90
91extern void (*const CLT_MDCT_BACKWARD_IMPL[OPUS_ARCHMASK+1])(
92 const mdct_lookup *l, kiss_fft_scalar *in,
93 kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window,
94 int overlap, int shift, int stride, int arch);
95
96#define clt_mdct_backward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \
97 (*CLT_MDCT_BACKWARD_IMPL[(arch)&OPUS_ARCHMASK])(_l, _in, _out, \
98 _window, _overlap, _shift, \
99 _stride, _arch)
100
101#else /* if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10) */
102
103#define clt_mdct_forward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \
104 clt_mdct_forward_c(_l, _in, _out, _window, _overlap, _shift, _stride, _arch)
105
106#define clt_mdct_backward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \
107 clt_mdct_backward_c(_l, _in, _out, _window, _overlap, _shift, _stride, _arch)
108
109#endif /* end if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10) && !defined(FIXED_POINT) */
110#endif /* end if !defined(OVERRIDE_OPUS_MDCT) */
69 111
70#endif 112#endif