| Index: third_party/libwebp/dec/vp8li.h
|
| diff --git a/third_party/libwebp/dec/vp8li.h b/third_party/libwebp/dec/vp8li.h
|
| index 543a767590d0dafafd0277873b1eb8f687955584..afa294db1e22f3b241bf95fd8fd1be7d2ca5db34 100644
|
| --- a/third_party/libwebp/dec/vp8li.h
|
| +++ b/third_party/libwebp/dec/vp8li.h
|
| @@ -22,7 +22,7 @@
|
| #include "../utils/huffman.h"
|
| #include "../webp/format_constants.h"
|
|
|
| -#if defined(__cplusplus) || defined(c_plusplus)
|
| +#ifdef __cplusplus
|
| extern "C" {
|
| #endif
|
|
|
| @@ -57,7 +57,8 @@ typedef struct {
|
| HTreeGroup *htree_groups_;
|
| } VP8LMetadata;
|
|
|
| -typedef struct {
|
| +typedef struct VP8LDecoder VP8LDecoder;
|
| +struct VP8LDecoder {
|
| VP8StatusCode status_;
|
| VP8LDecodeState action_;
|
| VP8LDecodeState state_;
|
| @@ -74,6 +75,9 @@ typedef struct {
|
| int width_;
|
| int height_;
|
| int last_row_; // last input row decoded so far.
|
| + int last_pixel_; // last pixel decoded so far. However, it may
|
| + // not be transformed, scaled and
|
| + // color-converted yet.
|
| int last_out_row_; // last row output so far.
|
|
|
| VP8LMetadata hdr_;
|
| @@ -85,18 +89,27 @@ typedef struct {
|
|
|
| uint8_t *rescaler_memory; // Working memory for rescaling work.
|
| WebPRescaler *rescaler; // Common rescaler for all channels.
|
| -} VP8LDecoder;
|
| +};
|
|
|
| //------------------------------------------------------------------------------
|
| // internal functions. Not public.
|
|
|
| +struct ALPHDecoder; // Defined in dec/alphai.h.
|
| +
|
| // in vp8l.c
|
|
|
| -// Decodes a raw image stream (without header) and store the alpha data
|
| -// into *output, which must be of size width x height. Returns false in case
|
| -// of error.
|
| -int VP8LDecodeAlphaImageStream(int width, int height, const uint8_t* const data,
|
| - size_t data_size, uint8_t* const output);
|
| +// Decodes image header for alpha data stored using lossless compression.
|
| +// Returns false in case of error.
|
| +int VP8LDecodeAlphaHeader(struct ALPHDecoder* const alph_dec,
|
| + const uint8_t* const data, size_t data_size,
|
| + uint8_t* const output);
|
| +
|
| +// Decodes *at least* 'last_row' rows of alpha. If some of the initial rows are
|
| +// already decoded in previous call(s), it will resume decoding from where it
|
| +// was paused.
|
| +// Returns false in case of bitstream error.
|
| +int VP8LDecodeAlphaImageStream(struct ALPHDecoder* const alph_dec,
|
| + int last_row);
|
|
|
| // Allocates and initialize a new lossless decoder instance.
|
| VP8LDecoder* VP8LNew(void);
|
| @@ -117,7 +130,7 @@ void VP8LDelete(VP8LDecoder* const dec);
|
|
|
| //------------------------------------------------------------------------------
|
|
|
| -#if defined(__cplusplus) || defined(c_plusplus)
|
| +#ifdef __cplusplus
|
| } // extern "C"
|
| #endif
|
|
|
|
|