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/arm/fft_arm.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/arm/fft_arm.h')
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/arm/fft_arm.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/arm/fft_arm.h b/lib/rbcodec/codecs/libopus/celt/arm/fft_arm.h new file mode 100644 index 0000000000..0b78175f3a --- /dev/null +++ b/lib/rbcodec/codecs/libopus/celt/arm/fft_arm.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* Copyright (c) 2015 Xiph.Org Foundation | ||
2 | Written by Viswanath Puttagunta */ | ||
3 | /** | ||
4 | @file fft_arm.h | ||
5 | @brief ARM Neon Intrinsic optimizations for fft using NE10 library | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | Redistribution and use in source and binary forms, with or without | ||
10 | modification, are permitted provided that the following conditions | ||
11 | are met: | ||
12 | |||
13 | - Redistributions of source code must retain the above copyright | ||
14 | notice, this list of conditions and the following disclaimer. | ||
15 | |||
16 | - Redistributions in binary form must reproduce the above copyright | ||
17 | notice, this list of conditions and the following disclaimer in the | ||
18 | documentation and/or other materials provided with the distribution. | ||
19 | |||
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER | ||
24 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
31 | */ | ||
32 | |||
33 | |||
34 | #if !defined(FFT_ARM_H) | ||
35 | #define FFT_ARM_H | ||
36 | |||
37 | #include "kiss_fft.h" | ||
38 | |||
39 | #if defined(HAVE_ARM_NE10) | ||
40 | |||
41 | int opus_fft_alloc_arm_neon(kiss_fft_state *st); | ||
42 | void opus_fft_free_arm_neon(kiss_fft_state *st); | ||
43 | |||
44 | void opus_fft_neon(const kiss_fft_state *st, | ||
45 | const kiss_fft_cpx *fin, | ||
46 | kiss_fft_cpx *fout); | ||
47 | |||
48 | void opus_ifft_neon(const kiss_fft_state *st, | ||
49 | const kiss_fft_cpx *fin, | ||
50 | kiss_fft_cpx *fout); | ||
51 | |||
52 | #if !defined(OPUS_HAVE_RTCD) | ||
53 | #define OVERRIDE_OPUS_FFT (1) | ||
54 | |||
55 | #define opus_fft_alloc_arch(_st, arch) \ | ||
56 | ((void)(arch), opus_fft_alloc_arm_neon(_st)) | ||
57 | |||
58 | #define opus_fft_free_arch(_st, arch) \ | ||
59 | ((void)(arch), opus_fft_free_arm_neon(_st)) | ||
60 | |||
61 | #define opus_fft(_st, _fin, _fout, arch) \ | ||
62 | ((void)(arch), opus_fft_neon(_st, _fin, _fout)) | ||
63 | |||
64 | #define opus_ifft(_st, _fin, _fout, arch) \ | ||
65 | ((void)(arch), opus_ifft_neon(_st, _fin, _fout)) | ||
66 | |||
67 | #endif /* OPUS_HAVE_RTCD */ | ||
68 | |||
69 | #endif /* HAVE_ARM_NE10 */ | ||
70 | |||
71 | #endif | ||