Skip to content

Commit e6a088d

Browse files
Update libwebp
1 parent c31c345 commit e6a088d

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

Vendor/webp/include/decode.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
extern "C" {
2121
#endif
2222

23-
#define WEBP_DECODER_ABI_VERSION 0x0208 // MAJOR(8b) + MINOR(8b)
23+
#define WEBP_DECODER_ABI_VERSION 0x0209 // MAJOR(8b) + MINOR(8b)
2424

2525
// Note: forward declaring enumerations is not allowed in (strict) C and C++,
2626
// the types are left here for reference.
@@ -42,6 +42,12 @@ WEBP_EXTERN int WebPGetDecoderVersion(void);
4242
// This function will also validate the header, returning true on success,
4343
// false otherwise. '*width' and '*height' are only valid on successful return.
4444
// Pointers 'width' and 'height' can be passed NULL if deemed irrelevant.
45+
// Note: The following chunk sequences (before the raw VP8/VP8L data) are
46+
// considered valid by this function:
47+
// RIFF + VP8(L)
48+
// RIFF + VP8X + (optional chunks) + VP8(L)
49+
// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
50+
// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
4551
WEBP_EXTERN int WebPGetInfo(const uint8_t* data, size_t data_size,
4652
int* width, int* height);
4753

@@ -85,9 +91,6 @@ WEBP_EXTERN uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size,
8591
uint8_t** u, uint8_t** v,
8692
int* stride, int* uv_stride);
8793

88-
// Releases memory returned by the WebPDecode*() functions above.
89-
WEBP_EXTERN void WebPFree(void* ptr);
90-
9194
// These five functions are variants of the above ones, that decode the image
9295
// directly into a pre-allocated buffer 'output_buffer'. The maximum storage
9396
// available in this buffer is indicated by 'output_buffer_size'. If this
@@ -425,6 +428,12 @@ WEBP_EXTERN VP8StatusCode WebPGetFeaturesInternal(
425428
// Returns VP8_STATUS_OK when the features are successfully retrieved. Returns
426429
// VP8_STATUS_NOT_ENOUGH_DATA when more data is needed to retrieve the
427430
// features from headers. Returns error in other cases.
431+
// Note: The following chunk sequences (before the raw VP8/VP8L data) are
432+
// considered valid by this function:
433+
// RIFF + VP8(L)
434+
// RIFF + VP8X + (optional chunks) + VP8(L)
435+
// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
436+
// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
428437
static WEBP_INLINE VP8StatusCode WebPGetFeatures(
429438
const uint8_t* data, size_t data_size,
430439
WebPBitstreamFeatures* features) {

Vendor/webp/include/types.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// be found in the AUTHORS file in the root of the source tree.
88
// -----------------------------------------------------------------------------
99
//
10-
// Common types
10+
// Common types + memory wrappers
1111
//
1212
// Author: Skal ([email protected])
1313

@@ -49,4 +49,20 @@ typedef long long int int64_t;
4949
// Macro to check ABI compatibility (same major revision number)
5050
#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
5151

52+
#ifdef __cplusplus
53+
extern "C" {
54+
#endif
55+
56+
// Allocates 'size' bytes of memory. Returns NULL upon error. Memory
57+
// must be deallocated by calling WebPFree(). This function is made available
58+
// by the core 'libwebp' library.
59+
WEBP_EXTERN void* WebPMalloc(size_t size);
60+
61+
// Releases memory returned by the WebPDecode*() functions (from decode.h).
62+
WEBP_EXTERN void WebPFree(void* ptr);
63+
64+
#ifdef __cplusplus
65+
} // extern "C"
66+
#endif
67+
5268
#endif // WEBP_WEBP_TYPES_H_

Vendor/webp/lib/libwebpdecoder.a

186 KB
Binary file not shown.

0 commit comments

Comments
 (0)