mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01: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
|
||||
// picture is only partially decoded, pending additional input.
|
||||
// Code example:
|
||||
//
|
||||
// WebPInitDecBuffer(&output_buffer);
|
||||
// output_buffer.colorspace = mode;
|
||||
// ...
|
||||
// WebPIDecoder* idec = WebPINewDecoder(&output_buffer);
|
||||
// while (additional_data_is_available) {
|
||||
// // ... (get additional data in some new_data[] buffer)
|
||||
// status = WebPIAppend(idec, new_data, new_data_size);
|
||||
// if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) {
|
||||
// break; // an error occurred.
|
||||
// }
|
||||
//
|
||||
// // The above call decodes the current available buffer.
|
||||
// // Part of the image can now be refreshed by calling
|
||||
// // WebPIDecGetRGB()/WebPIDecGetYUVA() etc.
|
||||
// }
|
||||
// WebPIDelete(idec);
|
||||
/*
|
||||
WebPInitDecBuffer(&output_buffer);
|
||||
output_buffer.colorspace = mode;
|
||||
...
|
||||
WebPIDecoder* idec = WebPINewDecoder(&output_buffer);
|
||||
while (additional_data_is_available) {
|
||||
// ... (get additional data in some new_data[] buffer)
|
||||
status = WebPIAppend(idec, new_data, new_data_size);
|
||||
if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) {
|
||||
break; // an error occurred.
|
||||
}
|
||||
|
||||
// The above call decodes the current available buffer.
|
||||
// Part of the image can now be refreshed by calling
|
||||
// WebPIDecGetRGB()/WebPIDecGetYUVA() etc.
|
||||
}
|
||||
WebPIDelete(idec);
|
||||
*/
|
||||
|
||||
// Creates a new incremental decoder with the supplied buffer parameter.
|
||||
// This output_buffer can be passed NULL, in which case a default output buffer
|
||||
|
Loading…
Reference in New Issue
Block a user