mirror of
https://github.com/webmproject/libwebp.git
synced 2025-04-08 18:06:48 +02:00
decode.h: wrap idec example in /* */
This makes it easier to read and copy/paste, though this is just rough pseudo-code. It also matches the formatting of the advanced decoder example. Change-Id: I6a4d0a04a12bfc1f1956ac965ff4869cefc4f3df
This commit is contained in:
parent
63acdd1e06
commit
1cc94f9521
@ -251,23 +251,24 @@ typedef enum VP8StatusCode {
|
|||||||
// WebPIDecoder object. This object can be left in a SUSPENDED state if the
|
// WebPIDecoder object. This object can be left in a SUSPENDED state if the
|
||||||
// picture is only partially decoded, pending additional input.
|
// picture is only partially decoded, pending additional input.
|
||||||
// Code example:
|
// Code example:
|
||||||
//
|
/*
|
||||||
// WebPInitDecBuffer(&output_buffer);
|
WebPInitDecBuffer(&output_buffer);
|
||||||
// output_buffer.colorspace = mode;
|
output_buffer.colorspace = mode;
|
||||||
// ...
|
...
|
||||||
// WebPIDecoder* idec = WebPINewDecoder(&output_buffer);
|
WebPIDecoder* idec = WebPINewDecoder(&output_buffer);
|
||||||
// while (additional_data_is_available) {
|
while (additional_data_is_available) {
|
||||||
// // ... (get additional data in some new_data[] buffer)
|
// ... (get additional data in some new_data[] buffer)
|
||||||
// status = WebPIAppend(idec, new_data, new_data_size);
|
status = WebPIAppend(idec, new_data, new_data_size);
|
||||||
// if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) {
|
if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) {
|
||||||
// break; // an error occurred.
|
break; // an error occurred.
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// // The above call decodes the current available buffer.
|
// The above call decodes the current available buffer.
|
||||||
// // Part of the image can now be refreshed by calling
|
// Part of the image can now be refreshed by calling
|
||||||
// // WebPIDecGetRGB()/WebPIDecGetYUVA() etc.
|
// WebPIDecGetRGB()/WebPIDecGetYUVA() etc.
|
||||||
// }
|
}
|
||||||
// WebPIDelete(idec);
|
WebPIDelete(idec);
|
||||||
|
*/
|
||||||
|
|
||||||
// Creates a new incremental decoder with the supplied buffer parameter.
|
// Creates a new incremental decoder with the supplied buffer parameter.
|
||||||
// This output_buffer can be passed NULL, in which case a default output buffer
|
// This output_buffer can be passed NULL, in which case a default output buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user