20
20
extern "C" {
21
21
#endif
22
22
23
- #define WEBP_DECODER_ABI_VERSION 0x0208 // MAJOR(8b) + MINOR(8b)
23
+ #define WEBP_DECODER_ABI_VERSION 0x0209 // MAJOR(8b) + MINOR(8b)
24
24
25
25
// Note: forward declaring enumerations is not allowed in (strict) C and C++,
26
26
// the types are left here for reference.
@@ -42,6 +42,12 @@ WEBP_EXTERN int WebPGetDecoderVersion(void);
42
42
// This function will also validate the header, returning true on success,
43
43
// false otherwise. '*width' and '*height' are only valid on successful return.
44
44
// 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.
45
51
WEBP_EXTERN int WebPGetInfo (const uint8_t * data , size_t data_size ,
46
52
int * width , int * height );
47
53
@@ -85,9 +91,6 @@ WEBP_EXTERN uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size,
85
91
uint8_t * * u , uint8_t * * v ,
86
92
int * stride , int * uv_stride );
87
93
88
- // Releases memory returned by the WebPDecode*() functions above.
89
- WEBP_EXTERN void WebPFree (void * ptr );
90
-
91
94
// These five functions are variants of the above ones, that decode the image
92
95
// directly into a pre-allocated buffer 'output_buffer'. The maximum storage
93
96
// available in this buffer is indicated by 'output_buffer_size'. If this
@@ -425,6 +428,12 @@ WEBP_EXTERN VP8StatusCode WebPGetFeaturesInternal(
425
428
// Returns VP8_STATUS_OK when the features are successfully retrieved. Returns
426
429
// VP8_STATUS_NOT_ENOUGH_DATA when more data is needed to retrieve the
427
430
// 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.
428
437
static WEBP_INLINE VP8StatusCode WebPGetFeatures (
429
438
const uint8_t * data , size_t data_size ,
430
439
WebPBitstreamFeatures * features ) {
0 commit comments