OLD | NEW |
1 // Copyright 2014 Google Inc. All Rights Reserved. | 1 // Copyright 2014 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license | 3 // Use of this source code is governed by a BSD-style license |
4 // that can be found in the COPYING file in the root of the source | 4 // that can be found in the COPYING file in the root of the source |
5 // tree. An additional intellectual property rights grant can be found | 5 // tree. An additional intellectual property rights grant can be found |
6 // in the file PATENTS. All contributing project authors may | 6 // in the file PATENTS. All contributing project authors may |
7 // be found in the AUTHORS file in the root of the source tree. | 7 // be found in the AUTHORS file in the root of the source tree. |
8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
9 // | 9 // |
10 // NEON common code. | 10 // NEON common code. |
11 | 11 |
12 #ifndef WEBP_DSP_NEON_H_ | 12 #ifndef WEBP_DSP_NEON_H_ |
13 #define WEBP_DSP_NEON_H_ | 13 #define WEBP_DSP_NEON_H_ |
14 | 14 |
15 #include <arm_neon.h> | 15 #include <arm_neon.h> |
16 | 16 |
17 #include "./dsp.h" | 17 #include "./dsp.h" |
18 | 18 |
19 // Right now, some intrinsics functions seem slower, so we disable them | 19 // Right now, some intrinsics functions seem slower, so we disable them |
20 // everywhere except aarch64 where the inline assembly is incompatible. | 20 // everywhere except aarch64 where the inline assembly is incompatible. |
21 #if defined(__aarch64__) | 21 #if defined(__aarch64__) |
22 #define USE_INTRINSICS // use intrinsics when possible | 22 #define WEBP_USE_INTRINSICS // use intrinsics when possible |
23 #endif | 23 #endif |
24 | 24 |
25 #define INIT_VECTOR2(v, a, b) do { \ | 25 #define INIT_VECTOR2(v, a, b) do { \ |
26 v.val[0] = a; \ | 26 v.val[0] = a; \ |
27 v.val[1] = b; \ | 27 v.val[1] = b; \ |
28 } while (0) | 28 } while (0) |
29 | 29 |
30 #define INIT_VECTOR3(v, a, b, c) do { \ | 30 #define INIT_VECTOR3(v, a, b, c) do { \ |
31 v.val[0] = a; \ | 31 v.val[0] = a; \ |
32 v.val[1] = b; \ | 32 v.val[1] = b; \ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 int32x4x4_t out; | 73 int32x4x4_t out; |
74 out.val[0] = out01.val[0]; | 74 out.val[0] = out01.val[0]; |
75 out.val[1] = out01.val[1]; | 75 out.val[1] = out01.val[1]; |
76 out.val[2] = out23.val[0]; | 76 out.val[2] = out23.val[0]; |
77 out.val[3] = out23.val[1]; | 77 out.val[3] = out23.val[1]; |
78 return out; | 78 return out; |
79 } | 79 } |
80 } | 80 } |
81 | 81 |
82 #endif // WEBP_DSP_NEON_H_ | 82 #endif // WEBP_DSP_NEON_H_ |
OLD | NEW |