mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-19 15:29:48 +02:00
Add progress hook granularity in lossless
A WebPPicture instance is necessary to call WebPReportProgress() which sets WebPPicture::error_code so as well use WebPEncodingSetError() to record errors too, instead of functions returning a WebPEncodingError. However there must be one WebPPicture instance per thread, with error codes merged at sync time. A mutex could simplify that but it is not the objective of this change. https://groups.google.com/a/webmproject.org/g/webp-discuss/c/yOiP8APubgc/m/vCTvxl6ODgAJ Change-Id: Ia1a8f9d1199202e1c88484ce719b0180a80447ce
This commit is contained in:
@ -86,7 +86,7 @@ static int EncodeLossless(const uint8_t* const data, int width, int height,
|
||||
// a decoder bug related to alpha with color cache.
|
||||
// See: https://code.google.com/p/webp/issues/detail?id=239
|
||||
// Need to re-enable this later.
|
||||
ok = (VP8LEncodeStream(&config, &picture, bw, 0 /*use_cache*/) == VP8_ENC_OK);
|
||||
ok = VP8LEncodeStream(&config, &picture, bw, /*use_cache=*/0);
|
||||
WebPPictureFree(&picture);
|
||||
ok = ok && !bw->error_;
|
||||
if (!ok) {
|
||||
|
Reference in New Issue
Block a user