mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
lossless_enc: fix some conversion warning
object code is unchanged. Change-Id: I40fc16056c0ab44c5c57ef6b02af14be767abe87
This commit is contained in:
parent
4627c1c91b
commit
812a6b49fc
@ -520,8 +520,8 @@ void VP8LTransformColor_C(const VP8LMultipliers* const m, uint32_t* data,
|
||||
int i;
|
||||
for (i = 0; i < num_pixels; ++i) {
|
||||
const uint32_t argb = data[i];
|
||||
const uint32_t green = argb >> 8;
|
||||
const uint32_t red = argb >> 16;
|
||||
const int8_t green = (argb >> 8) & 0xff;
|
||||
const int8_t red = (argb >> 16) & 0xff;
|
||||
int new_red = red & 0xff;
|
||||
int new_blue = argb & 0xff;
|
||||
new_red -= ColorTransformDelta(m->green_to_red_, green);
|
||||
@ -535,7 +535,7 @@ void VP8LTransformColor_C(const VP8LMultipliers* const m, uint32_t* data,
|
||||
|
||||
static WEBP_INLINE uint8_t TransformColorRed(uint8_t green_to_red,
|
||||
uint32_t argb) {
|
||||
const uint32_t green = argb >> 8;
|
||||
const int8_t green = (argb >> 8) & 0xff;
|
||||
int new_red = argb >> 16;
|
||||
new_red -= ColorTransformDelta(green_to_red, green);
|
||||
return (new_red & 0xff);
|
||||
@ -544,8 +544,8 @@ static WEBP_INLINE uint8_t TransformColorRed(uint8_t green_to_red,
|
||||
static WEBP_INLINE uint8_t TransformColorBlue(uint8_t green_to_blue,
|
||||
uint8_t red_to_blue,
|
||||
uint32_t argb) {
|
||||
const uint32_t green = argb >> 8;
|
||||
const uint32_t red = argb >> 16;
|
||||
const int8_t green = (argb >> 8) & 0xff;
|
||||
const int8_t red = (argb >> 16) & 0xff;
|
||||
uint8_t new_blue = argb & 0xff;
|
||||
new_blue -= ColorTransformDelta(green_to_blue, green);
|
||||
new_blue -= ColorTransformDelta(red_to_blue, red);
|
||||
@ -558,7 +558,7 @@ void VP8LCollectColorRedTransforms_C(const uint32_t* argb, int stride,
|
||||
while (tile_height-- > 0) {
|
||||
int x;
|
||||
for (x = 0; x < tile_width; ++x) {
|
||||
++histo[TransformColorRed(green_to_red, argb[x])];
|
||||
++histo[TransformColorRed((uint8_t)green_to_red, argb[x])];
|
||||
}
|
||||
argb += stride;
|
||||
}
|
||||
@ -571,7 +571,8 @@ void VP8LCollectColorBlueTransforms_C(const uint32_t* argb, int stride,
|
||||
while (tile_height-- > 0) {
|
||||
int x;
|
||||
for (x = 0; x < tile_width; ++x) {
|
||||
++histo[TransformColorBlue(green_to_blue, red_to_blue, argb[x])];
|
||||
++histo[TransformColorBlue((uint8_t)green_to_blue, (uint8_t)red_to_blue,
|
||||
argb[x])];
|
||||
}
|
||||
argb += stride;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user