| Index: third_party/libwebp/webp/decode.h
|
| diff --git a/third_party/libwebp/webp/decode.h b/third_party/libwebp/webp/decode.h
|
| index 181eb186057836628dfb339cc3375ab5213aca57..141f8618f5a1410b9b682b26a7c2779add4ced7b 100644
|
| --- a/third_party/libwebp/webp/decode.h
|
| +++ b/third_party/libwebp/webp/decode.h
|
| @@ -1,8 +1,10 @@
|
| // Copyright 2010 Google Inc. All Rights Reserved.
|
| //
|
| -// This code is licensed under the same terms as WebM:
|
| -// Software License Agreement: http://www.webmproject.org/license/software/
|
| -// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
|
| +// Use of this source code is governed by a BSD-style license
|
| +// that can be found in the COPYING file in the root of the source
|
| +// tree. An additional intellectual property rights grant can be found
|
| +// in the file PATENTS. All contributing project authors may
|
| +// be found in the AUTHORS file in the root of the source tree.
|
| // -----------------------------------------------------------------------------
|
| //
|
| // Main decoding functions for WebP images.
|
| @@ -20,13 +22,13 @@ extern "C" {
|
|
|
| #define WEBP_DECODER_ABI_VERSION 0x0201 // MAJOR(8b) + MINOR(8b)
|
|
|
| +// Note: forward declaring enumerations is not allowed in (strict) C and C++,
|
| +// the types are left here for reference.
|
| +// typedef enum VP8StatusCode VP8StatusCode;
|
| +// typedef enum WEBP_CSP_MODE WEBP_CSP_MODE;
|
| typedef struct WebPRGBABuffer WebPRGBABuffer;
|
| typedef struct WebPYUVABuffer WebPYUVABuffer;
|
| typedef struct WebPDecBuffer WebPDecBuffer;
|
| -#if !(defined(__cplusplus) || defined(c_plusplus))
|
| -typedef enum VP8StatusCode VP8StatusCode;
|
| -typedef enum WEBP_CSP_MODE WEBP_CSP_MODE;
|
| -#endif
|
| typedef struct WebPIDecoder WebPIDecoder;
|
| typedef struct WebPBitstreamFeatures WebPBitstreamFeatures;
|
| typedef struct WebPDecoderOptions WebPDecoderOptions;
|
| @@ -138,7 +140,7 @@ WEBP_EXTERN(uint8_t*) WebPDecodeYUVInto(
|
| // RGBA-4444: [b3 b2 b1 b0 a3 a2 a1 a0], [r3 r2 r1 r0 g3 g2 g1 g0], ...
|
| // RGB-565: [g2 g1 g0 b4 b3 b2 b1 b0], [r4 r3 r2 r1 r0 g5 g4 g3], ...
|
|
|
| -enum WEBP_CSP_MODE {
|
| +typedef enum WEBP_CSP_MODE {
|
| MODE_RGB = 0, MODE_RGBA = 1,
|
| MODE_BGR = 2, MODE_BGRA = 3,
|
| MODE_ARGB = 4, MODE_RGBA_4444 = 5,
|
| @@ -151,7 +153,7 @@ enum WEBP_CSP_MODE {
|
| // YUV modes must come after RGB ones.
|
| MODE_YUV = 11, MODE_YUVA = 12, // yuv 4:2:0
|
| MODE_LAST = 13
|
| -};
|
| +} WEBP_CSP_MODE;
|
|
|
| // Some useful macros:
|
| static WEBP_INLINE int WebPIsPremultipliedMode(WEBP_CSP_MODE mode) {
|
| @@ -220,7 +222,7 @@ WEBP_EXTERN(void) WebPFreeDecBuffer(WebPDecBuffer* buffer);
|
| //------------------------------------------------------------------------------
|
| // Enumeration of the status codes
|
|
|
| -enum VP8StatusCode {
|
| +typedef enum VP8StatusCode {
|
| VP8_STATUS_OK = 0,
|
| VP8_STATUS_OUT_OF_MEMORY,
|
| VP8_STATUS_INVALID_PARAM,
|
| @@ -229,7 +231,7 @@ enum VP8StatusCode {
|
| VP8_STATUS_SUSPENDED,
|
| VP8_STATUS_USER_ABORT,
|
| VP8_STATUS_NOT_ENOUGH_DATA
|
| -};
|
| +} VP8StatusCode;
|
|
|
| //------------------------------------------------------------------------------
|
| // Incremental decoding
|
| @@ -262,6 +264,12 @@ enum VP8StatusCode {
|
| // is used (with MODE_RGB). Otherwise, an internal reference to 'output_buffer'
|
| // is kept, which means that the lifespan of 'output_buffer' must be larger than
|
| // that of the returned WebPIDecoder object.
|
| +// The supplied 'output_buffer' content MUST NOT be changed between calls to
|
| +// WebPIAppend() or WebPIUpdate() unless 'output_buffer.is_external_memory' is
|
| +// set to 1. In such a case, it is allowed to modify the pointers, size and
|
| +// stride of output_buffer.u.RGBA or output_buffer.u.YUVA, provided they remain
|
| +// within valid bounds.
|
| +// All other fields of WebPDecBuffer MUST remain constant between calls.
|
| // Returns NULL if the allocation failed.
|
| WEBP_EXTERN(WebPIDecoder*) WebPINewDecoder(WebPDecBuffer* output_buffer);
|
|
|
|
|