| OLD | NEW |
| 1 /* Copyright (c) 2010 Xiph.Org Foundation | 1 /* Copyright (c) 2010 Xiph.Org Foundation |
| 2 * Copyright (c) 2013 Parrot */ | 2 * Copyright (c) 2013 Parrot */ |
| 3 /* | 3 /* |
| 4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
| 5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
| 6 are met: | 6 are met: |
| 7 | 7 |
| 8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
| 9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 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. | 25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef CPU_SUPPORT_H | 28 #ifndef CPU_SUPPORT_H |
| 29 #define CPU_SUPPORT_H | 29 #define CPU_SUPPORT_H |
| 30 | 30 |
| 31 #include "opus_types.h" | 31 #include "opus_types.h" |
| 32 #include "opus_defines.h" | 32 #include "opus_defines.h" |
| 33 | 33 |
| 34 #if defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_ASM) | 34 #if defined(OPUS_HAVE_RTCD) && \ |
| 35 (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_NEON_INTR)) |
| 35 #include "arm/armcpu.h" | 36 #include "arm/armcpu.h" |
| 36 | 37 |
| 37 /* We currently support 4 ARM variants: | 38 /* We currently support 4 ARM variants: |
| 38 * arch[0] -> ARMv4 | 39 * arch[0] -> ARMv4 |
| 39 * arch[1] -> ARMv5E | 40 * arch[1] -> ARMv5E |
| 40 * arch[2] -> ARMv6 | 41 * arch[2] -> ARMv6 |
| 41 * arch[3] -> NEON | 42 * arch[3] -> NEON |
| 42 */ | 43 */ |
| 43 #define OPUS_ARCHMASK 3 | 44 #define OPUS_ARCHMASK 3 |
| 44 | 45 |
| 46 #elif defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) |
| 47 |
| 48 #include "x86/x86cpu.h" |
| 49 /* We currently support 3 x86 variants: |
| 50 * arch[0] -> non-sse |
| 51 * arch[1] -> sse2 |
| 52 * arch[2] -> sse4.1 |
| 53 * arch[3] -> NULL |
| 54 */ |
| 55 #define OPUS_ARCHMASK 3 |
| 56 int opus_select_arch(void); |
| 57 |
| 45 #else | 58 #else |
| 46 #define OPUS_ARCHMASK 0 | 59 #define OPUS_ARCHMASK 0 |
| 47 | 60 |
| 48 static OPUS_INLINE int opus_select_arch(void) | 61 static OPUS_INLINE int opus_select_arch(void) |
| 49 { | 62 { |
| 50 return 0; | 63 return 0; |
| 51 } | 64 } |
| 52 #endif | 65 #endif |
| 53 | |
| 54 #endif | 66 #endif |
| OLD | NEW |