Temporarily disable encoding of alpha plane with color cache.

This is to avoid triggering the related decoder bug.

Change-Id: I8fa074a5393bcd62aa4a2232cd4e02935e927a89
This commit is contained in:
Urvang Joshi
2015-01-28 15:28:02 -08:00
parent 1d575ccd4e
commit 2db15a9583
3 changed files with 14 additions and 8 deletions

View File

@ -74,7 +74,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) {