diff options
author | William Wilgus <me.theuser@yahoo.com> | 2019-01-04 02:01:18 -0600 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-04-23 14:23:04 +0000 |
commit | 14c6bb798d6bebc80f07e863236adbaf8d156a9c (patch) | |
tree | 551a4b641906c2626af844fa3239c1b2b1ff0ad3 /lib/rbcodec/codecs/libopus/celt/mdct.h | |
parent | 75d93937965ec4df70d37df6d4feea04577c996b (diff) | |
download | rockbox-14c6bb798d6bebc80f07e863236adbaf8d156a9c.tar.gz rockbox-14c6bb798d6bebc80f07e863236adbaf8d156a9c.zip |
Sync opus codec to upstream git
Change-Id: I0cfcc0005c4ad7bfbb1aaf454188ce70fb043dc1
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/mdct.h')
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/mdct.h | 56 |
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 | ||
56 | int clt_mdct_init(mdct_lookup *l,int N, int maxshift); | 56 | #if defined(HAVE_ARM_NE10) |
57 | void clt_mdct_clear(mdct_lookup *l); | 57 | #include "arm/mdct_arm.h" |
58 | #endif | ||
59 | |||
60 | |||
61 | int clt_mdct_init(mdct_lookup *l,int N, int maxshift, int arch); | ||
62 | void 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 */ |
60 | void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, | 65 | void 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) */ |
66 | void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, | 72 | void 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 | |||
81 | extern 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 | |||
91 | extern 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 |