Fix cross-color transform in lossless encoder

make elements of "Multiplier" struct unsigned, so that any negative values are
automatically converted to "mod 256" values.

Change-Id: Iab4f9bacc50dcd94a557944727d9338dbb0982f7
This commit is contained in:
Urvang Joshi 2012-04-18 11:31:07 +00:00 committed by James Zern
parent b96d8740c9
commit afd2102f43

View File

@ -557,9 +557,11 @@ static void AddGreenToBlueAndRed(const VP8LTransform* const transform,
} }
typedef struct { typedef struct {
int green_to_red_; // Note: the members are uint8_t, so that any negative values are
int green_to_blue_; // automatically converted to "mod 256" values.
int red_to_blue_; uint8_t green_to_red_;
uint8_t green_to_blue_;
uint8_t red_to_blue_;
} Multipliers; } Multipliers;
static WEBP_INLINE void MultipliersClear(Multipliers* m) { static WEBP_INLINE void MultipliersClear(Multipliers* m) {