Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1007)

Side by Side Diff: third_party/libwebp/utils/endian_inl_utils.h

Issue 2651883004: libwebp-0.6.0-rc1 (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libwebp/utils/endian_inl.h ('k') | third_party/libwebp/utils/filters.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « third_party/libwebp/utils/endian_inl.h ('k') | third_party/libwebp/utils/filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698