| 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 // Endian related functions. | 10 // Endian related functions. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 return (uint64_t)_byteswap_uint64(x); | 91 return (uint64_t)_byteswap_uint64(x); |
| 92 #else // generic code for swapping 64-bit values (suggested by bdb@) | 92 #else // generic code for swapping 64-bit values (suggested by bdb@) |
| 93 x = ((x & 0xffffffff00000000ull) >> 32) | ((x & 0x00000000ffffffffull) << 32); | 93 x = ((x & 0xffffffff00000000ull) >> 32) | ((x & 0x00000000ffffffffull) << 32); |
| 94 x = ((x & 0xffff0000ffff0000ull) >> 16) | ((x & 0x0000ffff0000ffffull) << 16); | 94 x = ((x & 0xffff0000ffff0000ull) >> 16) | ((x & 0x0000ffff0000ffffull) << 16); |
| 95 x = ((x & 0xff00ff00ff00ff00ull) >> 8) | ((x & 0x00ff00ff00ff00ffull) << 8); | 95 x = ((x & 0xff00ff00ff00ff00ull) >> 8) | ((x & 0x00ff00ff00ff00ffull) << 8); |
| 96 return x; | 96 return x; |
| 97 #endif // HAVE_BUILTIN_BSWAP64 | 97 #endif // HAVE_BUILTIN_BSWAP64 |
| 98 } | 98 } |
| 99 | 99 |
| 100 #endif // WEBP_UTILS_ENDIAN_INL_H_ | 100 #endif // WEBP_UTILS_ENDIAN_INL_H_ |
| OLD | NEW |