Mercurial > hg > sv-dependency-builds
comparison src/opus-1.3/celt/arm/armcpu.h @ 69:7aeed7906520
Add Opus sources and macOS builds
author | Chris Cannam |
---|---|
date | Wed, 23 Jan 2019 13:48:08 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:85d5306e114e | 69:7aeed7906520 |
---|---|
1 /* Copyright (c) 2010 Xiph.Org Foundation | |
2 * Copyright (c) 2013 Parrot */ | |
3 /* | |
4 Redistribution and use in source and binary forms, with or without | |
5 modification, are permitted provided that the following conditions | |
6 are met: | |
7 | |
8 - Redistributions of source code must retain the above copyright | |
9 notice, this list of conditions and the following disclaimer. | |
10 | |
11 - Redistributions in binary form must reproduce the above copyright | |
12 notice, this list of conditions and the following disclaimer in the | |
13 documentation and/or other materials provided with the distribution. | |
14 | |
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
16 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
17 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
18 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER | |
19 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
20 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
21 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
22 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
23 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
24 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
26 */ | |
27 | |
28 #if !defined(ARMCPU_H) | |
29 # define ARMCPU_H | |
30 | |
31 # if defined(OPUS_ARM_MAY_HAVE_EDSP) | |
32 # define MAY_HAVE_EDSP(name) name ## _edsp | |
33 # else | |
34 # define MAY_HAVE_EDSP(name) name ## _c | |
35 # endif | |
36 | |
37 # if defined(OPUS_ARM_MAY_HAVE_MEDIA) | |
38 # define MAY_HAVE_MEDIA(name) name ## _media | |
39 # else | |
40 # define MAY_HAVE_MEDIA(name) MAY_HAVE_EDSP(name) | |
41 # endif | |
42 | |
43 # if defined(OPUS_ARM_MAY_HAVE_NEON) | |
44 # define MAY_HAVE_NEON(name) name ## _neon | |
45 # else | |
46 # define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name) | |
47 # endif | |
48 | |
49 # if defined(OPUS_ARM_PRESUME_EDSP) | |
50 # define PRESUME_EDSP(name) name ## _edsp | |
51 # else | |
52 # define PRESUME_EDSP(name) name ## _c | |
53 # endif | |
54 | |
55 # if defined(OPUS_ARM_PRESUME_MEDIA) | |
56 # define PRESUME_MEDIA(name) name ## _media | |
57 # else | |
58 # define PRESUME_MEDIA(name) PRESUME_EDSP(name) | |
59 # endif | |
60 | |
61 # if defined(OPUS_ARM_PRESUME_NEON) | |
62 # define PRESUME_NEON(name) name ## _neon | |
63 # else | |
64 # define PRESUME_NEON(name) PRESUME_MEDIA(name) | |
65 # endif | |
66 | |
67 # if defined(OPUS_HAVE_RTCD) | |
68 int opus_select_arch(void); | |
69 | |
70 #define OPUS_ARCH_ARM_V4 (0) | |
71 #define OPUS_ARCH_ARM_EDSP (1) | |
72 #define OPUS_ARCH_ARM_MEDIA (2) | |
73 #define OPUS_ARCH_ARM_NEON (3) | |
74 | |
75 # endif | |
76 | |
77 #endif |