diff options
author | Liang Qi <liang.qi@qt.io> | 2017-03-06 14:33:16 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-03-06 14:33:34 +0100 |
commit | f2dbc67c2b032a5f27d0224e020fb6dfcd3fd142 (patch) | |
tree | c5c195998f538fd7b9aa1382ced53caf2dec3926 /src/3rdparty/libwebp/src/enc/alpha.c | |
parent | d2306d74850986692c02b70df0d7a6a6e933d0dc (diff) | |
parent | 03e507c8f3816053257b3c351d79c494b6f9174d (diff) |
Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I9cf7f04769944935d7b836453c7982839857a909
Diffstat (limited to 'src/3rdparty/libwebp/src/enc/alpha.c')
-rw-r--r-- | src/3rdparty/libwebp/src/enc/alpha.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/3rdparty/libwebp/src/enc/alpha.c b/src/3rdparty/libwebp/src/enc/alpha.c index 3c970b0..03e3ad0 100644 --- a/src/3rdparty/libwebp/src/enc/alpha.c +++ b/src/3rdparty/libwebp/src/enc/alpha.c @@ -79,7 +79,11 @@ static int EncodeLossless(const uint8_t* const data, int width, int height, config.quality = 8.f * effort_level; assert(config.quality >= 0 && config.quality <= 100.f); - ok = (VP8LEncodeStream(&config, &picture, bw) == VP8_ENC_OK); + // TODO(urvang): Temporary fix to avoid generating images that trigger + // 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); WebPPictureFree(&picture); ok = ok && !bw->error_; if (!ok) { @@ -118,7 +122,6 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, assert(method >= ALPHA_NO_COMPRESSION); assert(method <= ALPHA_LOSSLESS_COMPRESSION); assert(sizeof(header) == ALPHA_HEADER_LEN); - // TODO(skal): have a common function and #define's to validate alpha params. filter_func = WebPFilters[filter]; if (filter_func != NULL) { |