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

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

Issue 116213006: Update libwebp to 0.4.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: After Blink Roll Created 6 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 | Annotate | Revision Log
« no previous file with comments | « third_party/libwebp/utils/thread.c ('k') | third_party/libwebp/utils/utils.c » ('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 2012 Google Inc. All Rights Reserved. 1 // Copyright 2012 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 // Misc. common utility functions 10 // Misc. common utility functions
11 // 11 //
12 // Authors: Skal (pascal.massimino@gmail.com) 12 // Authors: Skal (pascal.massimino@gmail.com)
13 // Urvang (urvang@google.com) 13 // Urvang (urvang@google.com)
14 14
15 #ifndef WEBP_UTILS_UTILS_H_ 15 #ifndef WEBP_UTILS_UTILS_H_
16 #define WEBP_UTILS_UTILS_H_ 16 #define WEBP_UTILS_UTILS_H_
17 17
18 #include <assert.h> 18 #include <assert.h>
19 19
20 #include "../webp/types.h" 20 #include "../webp/types.h"
21 21
22 #if defined(__cplusplus) || defined(c_plusplus) 22 #ifdef __cplusplus
23 extern "C" { 23 extern "C" {
24 #endif 24 #endif
25 25
26 //------------------------------------------------------------------------------ 26 //------------------------------------------------------------------------------
27 // Memory allocation 27 // Memory allocation
28 28
29 // This is the maximum memory amount that libwebp will ever try to allocate. 29 // This is the maximum memory amount that libwebp will ever try to allocate.
30 #define WEBP_MAX_ALLOCABLE_MEMORY (1ULL << 40) 30 #define WEBP_MAX_ALLOCABLE_MEMORY (1ULL << 40)
31 31
32 // size-checking safe malloc/calloc: verify that the requested size is not too 32 // size-checking safe malloc/calloc: verify that the requested size is not too
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 data[2] = (val >> 16); 69 data[2] = (val >> 16);
70 } 70 }
71 71
72 static WEBP_INLINE void PutLE32(uint8_t* const data, uint32_t val) { 72 static WEBP_INLINE void PutLE32(uint8_t* const data, uint32_t val) {
73 PutLE16(data, (int)(val & 0xffff)); 73 PutLE16(data, (int)(val & 0xffff));
74 PutLE16(data + 2, (int)(val >> 16)); 74 PutLE16(data + 2, (int)(val >> 16));
75 } 75 }
76 76
77 //------------------------------------------------------------------------------ 77 //------------------------------------------------------------------------------
78 78
79 #if defined(__cplusplus) || defined(c_plusplus) 79 #ifdef __cplusplus
80 } // extern "C" 80 } // extern "C"
81 #endif 81 #endif
82 82
83 #endif /* WEBP_UTILS_UTILS_H_ */ 83 #endif /* WEBP_UTILS_UTILS_H_ */
OLDNEW
« no previous file with comments | « third_party/libwebp/utils/thread.c ('k') | third_party/libwebp/utils/utils.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698