RGBA4444: harmonize lossless/lossy alpha values

lossy was rounding with a bias toward opaque:
[232+, 8] -> [15, 1]
now both paths use the range:
[240+, 16] -> [15, 1]

Change-Id: I3da2063b4959b9e9f45bae09e640acc1f43470c5
This commit is contained in:
James Zern
2012-08-11 20:14:33 -07:00
committed by Gerrit Code Review
parent 681cb30ad2
commit fe1958f17d
2 changed files with 2 additions and 7 deletions

View File

@ -90,11 +90,6 @@ static WEBP_INLINE void VP8YuvToRgba(uint8_t y, uint8_t u, uint8_t v,
rgba[3] = 0xff;
}
static WEBP_INLINE uint32_t VP8Clip4Bits(uint8_t c) {
const uint32_t v = (c + 8) >> 4;
return (v > 15) ? 15 : v;
}
// Must be called before everything, to initialize the tables.
void VP8YUVInit(void);