OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM 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 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 #if defined(__GNUC__) && __GNUC__ | 31 #if defined(__GNUC__) && __GNUC__ |
32 #define UNINITIALIZED_IS_SAFE(x) x=x | 32 #define UNINITIALIZED_IS_SAFE(x) x=x |
33 #else | 33 #else |
34 #define UNINITIALIZED_IS_SAFE(x) x | 34 #define UNINITIALIZED_IS_SAFE(x) x |
35 #endif | 35 #endif |
36 | 36 |
37 #if HAVE_NEON && defined(_MSC_VER) | 37 #if HAVE_NEON && defined(_MSC_VER) |
38 #define __builtin_prefetch(x) | 38 #define __builtin_prefetch(x) |
39 #endif | 39 #endif |
40 | 40 |
| 41 /* Shift down with rounding */ |
| 42 #define ROUND_POWER_OF_TWO(value, n) \ |
| 43 (((value) + (1 << ((n) - 1))) >> (n)) |
| 44 |
| 45 #define ALIGN_POWER_OF_TWO(value, n) \ |
| 46 (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1)) |
| 47 |
| 48 #if CONFIG_VP9_HIGHBITDEPTH |
| 49 #define CONVERT_TO_SHORTPTR(x) ((uint16_t*)(((uintptr_t)x) << 1)) |
| 50 #define CONVERT_TO_BYTEPTR(x) ((uint8_t*)(((uintptr_t)x) >> 1)) |
| 51 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 52 |
41 #endif // VPX_PORTS_MEM_H_ | 53 #endif // VPX_PORTS_MEM_H_ |
OLD | NEW |