going down to strict -ansi c89 is quite overkill (no 'inline',
and /* */-style comments).
But with these fixes, the code compiles with the stringent flags:
-Wextra -Wold-style-definition -Wmissing-prototypes
-Wmissing-declarations and -Wdeclaration-after-statement
Change-Id: I36222f8f505bcba3d9d1309ad98b5ccb04ec17e3
The object WebPIDecoder is available to store the
decoding state. The flow is typically:
WebPIDecoder* const idec = WebPINew(mode);
while (has_more_data) {
// ... (get additional data)
status = WebPIAppend(idec, new_data, new_data_size);
if (status != VP8_STATUS_SUSPENDED ||
break;
}
// The above call decodes the current available buffer.
// Part of the image can now be refreshed by calling to
// WebPIDecGetRGB()/WebPIDecGetYUV() etc.
}
WebPIDelete(idec);
Doing so, one can try and decode new macroblocks everytime fresh
bytes are available.
There's two operating modes: either appending fresh bytes, or
updating the whole buffer with additional data in the end.
The latter requires less memcpy()'s
main patch by Somnath Banerjee (somnath at google.com)
Change-Id: Ie81cbd0b50f175743af06b1f964de838b9a10a4a