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

Side by Side Diff: third_party/libwebp/webp/decode.h

Issue 10690171: libwebp: fix some int <-> size_t mix for buffer sizes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: even newer patch Created 8 years, 5 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/dec/buffer.c ('k') | third_party/libwebp/webp/types.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 2010 Google Inc. 1 // Copyright 2010 Google Inc.
2 // 2 //
3 // This code is licensed under the same terms as WebM: 3 // This code is licensed under the same terms as WebM:
4 // Software License Agreement: http://www.webmproject.org/license/software/ 4 // Software License Agreement: http://www.webmproject.org/license/software/
5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/
6 // ----------------------------------------------------------------------------- 6 // -----------------------------------------------------------------------------
7 // 7 //
8 // Main decoding functions for WEBP images. 8 // Main decoding functions for WEBP images.
9 // 9 //
10 // Author: Skal (pascal.massimino@gmail.com) 10 // Author: Skal (pascal.massimino@gmail.com)
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 MODE_RGB_565 = 6, 115 MODE_RGB_565 = 6,
116 // YUV modes must come after RGB ones. 116 // YUV modes must come after RGB ones.
117 MODE_YUV = 7, MODE_YUVA = 8, // yuv 4:2:0 117 MODE_YUV = 7, MODE_YUVA = 8, // yuv 4:2:0
118 MODE_LAST = 9 118 MODE_LAST = 9
119 } WEBP_CSP_MODE; 119 } WEBP_CSP_MODE;
120 120
121 // Generic structure for describing the sample buffer. 121 // Generic structure for describing the sample buffer.
122 typedef struct { // view as RGBA 122 typedef struct { // view as RGBA
123 uint8_t* rgba; // pointer to RGBA samples 123 uint8_t* rgba; // pointer to RGBA samples
124 int stride; // stride in bytes from one scanline to the next. 124 int stride; // stride in bytes from one scanline to the next.
125 int size; // total size of the *rgba buffer. 125 size_t size; // total size of the *rgba buffer.
126 } WebPRGBABuffer; 126 } WebPRGBABuffer;
127 127
128 typedef struct { // view as YUVA 128 typedef struct { // view as YUVA
129 uint8_t* y, *u, *v, *a; // pointer to luma, chroma U/V, alpha samples 129 uint8_t* y, *u, *v, *a; // pointer to luma, chroma U/V, alpha samples
130 int y_stride; // luma stride 130 int y_stride; // luma stride
131 int u_stride, v_stride; // chroma strides 131 int u_stride, v_stride; // chroma strides
132 int a_stride; // alpha stride 132 int a_stride; // alpha stride
133 int y_size; // luma plane size 133 size_t y_size; // luma plane size
134 int u_size, v_size; // chroma planes size 134 size_t u_size, v_size; // chroma planes size
135 int a_size; // alpha-plane size 135 size_t a_size; // alpha-plane size
136 } WebPYUVABuffer; 136 } WebPYUVABuffer;
137 137
138 // Output buffer 138 // Output buffer
139 typedef struct { 139 typedef struct {
140 WEBP_CSP_MODE colorspace; // Colorspace. 140 WEBP_CSP_MODE colorspace; // Colorspace.
141 int width, height; // Dimensions. 141 int width, height; // Dimensions.
142 int is_external_memory; // If true, 'internal_memory' pointer is not used. 142 int is_external_memory; // If true, 'internal_memory' pointer is not used.
143 union { 143 union {
144 WebPRGBABuffer RGBA; 144 WebPRGBABuffer RGBA;
145 WebPYUVABuffer YUVA; 145 WebPYUVABuffer YUVA;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // 'config' into account. Return decoding status (VP8_STATUS_OK if decoding 387 // 'config' into account. Return decoding status (VP8_STATUS_OK if decoding
388 // was successful). 388 // was successful).
389 WEBP_EXTERN(VP8StatusCode) WebPDecode(const uint8_t* data, uint32_t data_size, 389 WEBP_EXTERN(VP8StatusCode) WebPDecode(const uint8_t* data, uint32_t data_size,
390 WebPDecoderConfig* const config); 390 WebPDecoderConfig* const config);
391 391
392 #if defined(__cplusplus) || defined(c_plusplus) 392 #if defined(__cplusplus) || defined(c_plusplus)
393 } // extern "C" 393 } // extern "C"
394 #endif 394 #endif
395 395
396 #endif /* WEBP_WEBP_DECODE_H_ */ 396 #endif /* WEBP_WEBP_DECODE_H_ */
OLDNEW
« no previous file with comments | « third_party/libwebp/dec/buffer.c ('k') | third_party/libwebp/webp/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698