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

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

Issue 2584033003: libwebp-0.5.2-rc2 (Closed)
Patch Set: layout tests Created 4 years 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
OLDNEW
1 // Copyright 2010 Google Inc. All Rights Reserved. 1 // Copyright 2010 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 // Main decoding functions for WebP images. 10 // Main decoding functions for WebP images.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 //------------------------------------------------------------------------------ 242 //------------------------------------------------------------------------------
243 // Incremental decoding 243 // Incremental decoding
244 // 244 //
245 // This API allows streamlined decoding of partial data. 245 // This API allows streamlined decoding of partial data.
246 // Picture can be incrementally decoded as data become available thanks to the 246 // Picture can be incrementally decoded as data become available thanks to the
247 // WebPIDecoder object. This object can be left in a SUSPENDED state if the 247 // WebPIDecoder object. This object can be left in a SUSPENDED state if the
248 // picture is only partially decoded, pending additional input. 248 // picture is only partially decoded, pending additional input.
249 // Code example: 249 // Code example:
250 // 250 //
251 // WebPInitDecBuffer(&buffer); 251 // WebPInitDecBuffer(&output_buffer);
252 // buffer.colorspace = mode; 252 // output_buffer.colorspace = mode;
253 // ... 253 // ...
254 // WebPIDecoder* idec = WebPINewDecoder(&buffer); 254 // WebPIDecoder* idec = WebPINewDecoder(&output_buffer);
255 // while (has_more_data) { 255 // while (additional_data_is_available) {
256 // // ... (get additional data) 256 // // ... (get additional data in some new_data[] buffer)
257 // status = WebPIAppend(idec, new_data, new_data_size); 257 // status = WebPIAppend(idec, new_data, new_data_size);
258 // if (status != VP8_STATUS_SUSPENDED || 258 // if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) {
259 // break; 259 // break; // an error occurred.
260 // } 260 // }
261 // 261 //
262 // // The above call decodes the current available buffer. 262 // // The above call decodes the current available buffer.
263 // // Part of the image can now be refreshed by calling to 263 // // Part of the image can now be refreshed by calling
264 // // WebPIDecGetRGB()/WebPIDecGetYUVA() etc. 264 // // WebPIDecGetRGB()/WebPIDecGetYUVA() etc.
265 // } 265 // }
266 // WebPIDelete(idec); 266 // WebPIDelete(idec);
267 267
268 // Creates a new incremental decoder with the supplied buffer parameter. 268 // Creates a new incremental decoder with the supplied buffer parameter.
269 // This output_buffer can be passed NULL, in which case a default output buffer 269 // This output_buffer can be passed NULL, in which case a default output buffer
270 // is used (with MODE_RGB). Otherwise, an internal reference to 'output_buffer' 270 // is used (with MODE_RGB). Otherwise, an internal reference to 'output_buffer'
271 // is kept, which means that the lifespan of 'output_buffer' must be larger than 271 // is kept, which means that the lifespan of 'output_buffer' must be larger than
272 // that of the returned WebPIDecoder object. 272 // that of the returned WebPIDecoder object.
273 // The supplied 'output_buffer' content MUST NOT be changed between calls to 273 // The supplied 'output_buffer' content MUST NOT be changed between calls to
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 // 'config' into account. Returns decoding status (which should be VP8_STATUS_OK 484 // 'config' into account. Returns decoding status (which should be VP8_STATUS_OK
485 // if the decoding was successful). Note that 'config' cannot be NULL. 485 // if the decoding was successful). Note that 'config' cannot be NULL.
486 WEBP_EXTERN(VP8StatusCode) WebPDecode(const uint8_t* data, size_t data_size, 486 WEBP_EXTERN(VP8StatusCode) WebPDecode(const uint8_t* data, size_t data_size,
487 WebPDecoderConfig* config); 487 WebPDecoderConfig* config);
488 488
489 #ifdef __cplusplus 489 #ifdef __cplusplus
490 } // extern "C" 490 } // extern "C"
491 #endif 491 #endif
492 492
493 #endif /* WEBP_WEBP_DECODE_H_ */ 493 #endif /* WEBP_WEBP_DECODE_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698