OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 * | 9 * |
10 * This file was originally licensed as follows. It has been | 10 * This file was originally licensed as follows. It has been |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 { | 86 { |
87 OMX_U32 N; | 87 OMX_U32 N; |
88 OMX_U16* pBitRev; | 88 OMX_U16* pBitRev; |
89 OMX_FC32* pTwiddle; | 89 OMX_FC32* pTwiddle; |
90 OMX_FC32* pBuf; | 90 OMX_FC32* pBuf; |
91 } ARMsFFTSpec_FC32; | 91 } ARMsFFTSpec_FC32; |
92 | 92 |
93 /* | 93 /* |
94 * Compute log2(x), where x must be a power of 2. | 94 * Compute log2(x), where x must be a power of 2. |
95 */ | 95 */ |
96 static inline OMX_U32 fastlog2(long x) { | 96 static inline OMX_U32 fastlog2(OMX_U32 x) { |
Raymond Toy (Google)
2015/10/30 22:38:46
Why the change from long to OMX_U32?
Riku Voipio
2015/11/02 12:24:12
clang throws a warning:
../../third_party/openmax_
| |
97 OMX_U32 out; | 97 OMX_U32 out; |
98 asm("clz %0,%1\n\t" | 98 asm("clz %w0,%w1\n\t" |
99 "sub %0, %0, #63\n\t" | 99 "sub %w0, %w0, #63\n\t" |
Raymond Toy (Google)
2015/10/30 22:38:46
If %w0 means a 32-bit register than clz is probabl
Riku Voipio
2015/11/02 12:24:12
Will be fixed in the next iteration by keeping the
| |
100 "neg %0, %0\n\t" | 100 "neg %w0, %w0\n\t" |
101 : "=r"(out) | 101 : "=r"(out) |
102 : "r"(x) | 102 : "r"(x) |
103 :); | 103 :); |
104 return out; | 104 return out; |
105 } | 105 } |
106 | 106 |
107 /* | 107 /* |
108 * Validate args. All pointers must be non-NULL; the source and | 108 * Validate args. All pointers must be non-NULL; the source and |
109 * destination pointers must be aligned on a 32-byte boundary; the | 109 * destination pointers must be aligned on a 32-byte boundary; the |
110 * FFT spec must have non-NULL pointers; and the FFT size must be | 110 * FFT spec must have non-NULL pointers; and the FFT size must be |
(...skipping 18 matching lines...) Expand all Loading... | |
129 #ifdef __cplusplus | 129 #ifdef __cplusplus |
130 } | 130 } |
131 #endif | 131 #endif |
132 | 132 |
133 #endif | 133 #endif |
134 | 134 |
135 /*End of File*/ | 135 /*End of File*/ |
136 | 136 |
137 | 137 |
138 | 138 |
OLD | NEW |