OLD | NEW |
1 /*********************************************************************** | 1 /*********************************************************************** |
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. | 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. |
3 Redistribution and use in source and binary forms, with or without | 3 Redistribution and use in source and binary forms, with or without |
4 modification, are permitted provided that the following conditions | 4 modification, are permitted provided that the following conditions |
5 are met: | 5 are met: |
6 - Redistributions of source code must retain the above copyright notice, | 6 - Redistributions of source code must retain the above copyright notice, |
7 this list of conditions and the following disclaimer. | 7 this list of conditions and the following disclaimer. |
8 - Redistributions in binary form must reproduce the above copyright | 8 - Redistributions in binary form must reproduce the above copyright |
9 notice, this list of conditions and the following disclaimer in the | 9 notice, this list of conditions and the following disclaimer in the |
10 documentation and/or other materials provided with the distribution. | 10 documentation and/or other materials provided with the distribution. |
(...skipping 18 matching lines...) Expand all Loading... |
29 #define SILK_MACROS_H | 29 #define SILK_MACROS_H |
30 | 30 |
31 #ifdef HAVE_CONFIG_H | 31 #ifdef HAVE_CONFIG_H |
32 #include "config.h" | 32 #include "config.h" |
33 #endif | 33 #endif |
34 | 34 |
35 #include "opus_types.h" | 35 #include "opus_types.h" |
36 #include "opus_defines.h" | 36 #include "opus_defines.h" |
37 #include "arch.h" | 37 #include "arch.h" |
38 | 38 |
39 #if OPUS_GNUC_PREREQ(3, 0) | |
40 #define opus_likely(x) (__builtin_expect(!!(x), 1)) | |
41 #define opus_unlikely(x) (__builtin_expect(!!(x), 0)) | |
42 #else | |
43 #define opus_likely(x) (!!(x)) | |
44 #define opus_unlikely(x) (!!(x)) | |
45 #endif | |
46 | |
47 /* This is an OPUS_INLINE header file for general platform. */ | 39 /* This is an OPUS_INLINE header file for general platform. */ |
48 | 40 |
49 /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ | 41 /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ |
50 #if OPUS_FAST_INT64 | 42 #if OPUS_FAST_INT64 |
51 #define silk_SMULWB(a32, b32) ((opus_int32)(((a32) * (opus_int64)((op
us_int16)(b32))) >> 16)) | 43 #define silk_SMULWB(a32, b32) ((opus_int32)(((a32) * (opus_int64)((op
us_int16)(b32))) >> 16)) |
52 #else | 44 #else |
53 #define silk_SMULWB(a32, b32) ((((a32) >> 16) * (opus_int32)((opus_in
t16)(b32))) + ((((a32) & 0x0000FFFF) * (opus_int32)((opus_int16)(b32))) >> 16)) | 45 #define silk_SMULWB(a32, b32) ((((a32) >> 16) * (opus_int32)((opus_in
t16)(b32))) + ((((a32) & 0x0000FFFF) * (opus_int32)((opus_int16)(b32))) >> 16)) |
54 #endif | 46 #endif |
55 | 47 |
56 /* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit i
nt */ | 48 /* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit i
nt */ |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 #ifdef OPUS_ARM_INLINE_EDSP | 142 #ifdef OPUS_ARM_INLINE_EDSP |
151 #include "arm/macros_armv5e.h" | 143 #include "arm/macros_armv5e.h" |
152 #endif | 144 #endif |
153 | 145 |
154 #ifdef OPUS_ARM_PRESUME_AARCH64_NEON_INTR | 146 #ifdef OPUS_ARM_PRESUME_AARCH64_NEON_INTR |
155 #include "arm/macros_arm64.h" | 147 #include "arm/macros_arm64.h" |
156 #endif | 148 #endif |
157 | 149 |
158 #endif /* SILK_MACROS_H */ | 150 #endif /* SILK_MACROS_H */ |
159 | 151 |
OLD | NEW |