mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
dec: remove deprecated WebPINew()
Change-Id: I22ad1d297333f5ebc84456d142426a4e0e9a044b
This commit is contained in:
parent
a384689292
commit
02f27fbd3b
6
README
6
README
@ -348,7 +348,11 @@ is stored into an instance of the WebPIDecoder object. This object can be
|
|||||||
created with the purpose of decoding either RGB or Y'CbCr samples.
|
created with the purpose of decoding either RGB or Y'CbCr samples.
|
||||||
For instance:
|
For instance:
|
||||||
|
|
||||||
WebPIDecoder* idec = WebPINew(MODE_BGR);
|
WebPDecBuffer buffer;
|
||||||
|
WebPInitDecBuffer(&buffer);
|
||||||
|
buffer.colorspace = MODE_BGR;
|
||||||
|
...
|
||||||
|
WebPIDecoder* idec = WebPINewDecoder(&buffer);
|
||||||
|
|
||||||
As data is made progressively available, this incremental-decoder object
|
As data is made progressively available, this incremental-decoder object
|
||||||
can be used to decode the picture further. There are two (mutually exclusive)
|
can be used to decode the picture further. There are two (mutually exclusive)
|
||||||
|
@ -587,13 +587,6 @@ void WebPIDelete(WebPIDecoder* const idec) {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Wrapper toward WebPINewDecoder
|
// Wrapper toward WebPINewDecoder
|
||||||
|
|
||||||
WebPIDecoder* WebPINew(WEBP_CSP_MODE mode) {
|
|
||||||
WebPIDecoder* const idec = WebPINewDecoder(NULL);
|
|
||||||
if (!idec) return NULL;
|
|
||||||
idec->output_.colorspace = mode;
|
|
||||||
return idec;
|
|
||||||
}
|
|
||||||
|
|
||||||
WebPIDecoder* WebPINewRGB(WEBP_CSP_MODE mode, uint8_t* output_buffer,
|
WebPIDecoder* WebPINewRGB(WEBP_CSP_MODE mode, uint8_t* output_buffer,
|
||||||
size_t output_buffer_size, int output_stride) {
|
size_t output_buffer_size, int output_stride) {
|
||||||
WebPIDecoder* idec;
|
WebPIDecoder* idec;
|
||||||
|
@ -185,7 +185,10 @@ typedef enum {
|
|||||||
// picture is only partially decoded, pending additional input.
|
// picture is only partially decoded, pending additional input.
|
||||||
// Code example:
|
// Code example:
|
||||||
//
|
//
|
||||||
// WebPIDecoder* const idec = WebPINew(mode);
|
// WebPInitDecBuffer(&buffer);
|
||||||
|
// buffer.colorspace = mode;
|
||||||
|
// ...
|
||||||
|
// WebPIDecoder* const idec = WebPINew(&buffer);
|
||||||
// while (has_more_data) {
|
// while (has_more_data) {
|
||||||
// // ... (get additional data)
|
// // ... (get additional data)
|
||||||
// status = WebPIAppend(idec, new_data, new_data_size);
|
// status = WebPIAppend(idec, new_data, new_data_size);
|
||||||
@ -209,10 +212,6 @@ typedef struct WebPIDecoder WebPIDecoder;
|
|||||||
// Returns NULL if the allocation failed.
|
// Returns NULL if the allocation failed.
|
||||||
WEBP_EXTERN(WebPIDecoder*) WebPINewDecoder(WebPDecBuffer* const output_buffer);
|
WEBP_EXTERN(WebPIDecoder*) WebPINewDecoder(WebPDecBuffer* const output_buffer);
|
||||||
|
|
||||||
// Creates a WebPIDecoder object. Returns NULL in case of failure.
|
|
||||||
// TODO(skal): DEPRECATED. Prefer using WebPINewDecoder().
|
|
||||||
WEBP_EXTERN(WebPIDecoder*) WebPINew(WEBP_CSP_MODE mode);
|
|
||||||
|
|
||||||
// This function allocates and initializes an incremental-decoder object, which
|
// This function allocates and initializes an incremental-decoder object, which
|
||||||
// will output the r/g/b(/a) samples specified by 'mode' into a preallocated
|
// will output the r/g/b(/a) samples specified by 'mode' into a preallocated
|
||||||
// buffer 'output_buffer'. The size of this buffer is at least
|
// buffer 'output_buffer'. The size of this buffer is at least
|
||||||
@ -235,7 +234,7 @@ WEBP_EXTERN(WebPIDecoder*) WebPINewYUV(
|
|||||||
uint8_t* v, size_t v_size, int v_stride);
|
uint8_t* v, size_t v_size, int v_stride);
|
||||||
|
|
||||||
// Deletes the WebPIDecoder object and associated memory. Must always be called
|
// Deletes the WebPIDecoder object and associated memory. Must always be called
|
||||||
// if WebPINew, WebPINewRGB or WebPINewYUV succeeded.
|
// if WebPINewDecoder, WebPINewRGB or WebPINewYUV succeeded.
|
||||||
WEBP_EXTERN(void) WebPIDelete(WebPIDecoder* const idec);
|
WEBP_EXTERN(void) WebPIDelete(WebPIDecoder* const idec);
|
||||||
|
|
||||||
// Copies and decodes the next available data. Returns VP8_STATUS_OK when
|
// Copies and decodes the next available data. Returns VP8_STATUS_OK when
|
||||||
@ -254,9 +253,10 @@ WEBP_EXTERN(VP8StatusCode) WebPIUpdate(
|
|||||||
|
|
||||||
// Returns the r/g/b/(a) image decoded so far. Returns NULL if output params
|
// Returns the r/g/b/(a) image decoded so far. Returns NULL if output params
|
||||||
// are not initialized yet. The r/g/b/(a) output type corresponds to the mode
|
// are not initialized yet. The r/g/b/(a) output type corresponds to the mode
|
||||||
// specified in WebPINew()/WebPINewRGB(). *last_y is the index of last decoded
|
// specified in WebPINewDecoder()/WebPINewRGB().
|
||||||
// row in raster scan order. Some pointers (*last_y, *width etc.) can be NULL if
|
// *last_y is the index of last decoded row in raster scan order. Some pointers
|
||||||
// corresponding information is not needed.
|
// (*last_y, *width etc.) can be NULL if corresponding information is not
|
||||||
|
// needed.
|
||||||
WEBP_EXTERN(uint8_t*) WebPIDecGetRGB(
|
WEBP_EXTERN(uint8_t*) WebPIDecGetRGB(
|
||||||
const WebPIDecoder* const idec, int* last_y,
|
const WebPIDecoder* const idec, int* last_y,
|
||||||
int* width, int* height, int* stride);
|
int* width, int* height, int* stride);
|
||||||
|
Loading…
Reference in New Issue
Block a user