mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-19 02:12:52 +01:00
vp8l_enc.c: normalize index types
fixes conversion warnings in visual studio after: b1674240 Add modified Zeng's method to palette sorting. src\enc\vp8l_enc.c(296) : warning C4244: '=' : conversion from 'const uint16_t' to 'uint8_t', possible loss of data src\enc\vp8l_enc.c(299) : warning C4244: '=' : conversion from 'const uint16_t' to 'uint8_t', possible loss of data Change-Id: I981b1ba4912edbbafbd49f1f5b1043bf12266920
This commit is contained in:
parent
b6513fbaa8
commit
05b72d4205
@ -230,7 +230,7 @@ static WebPEncodingError CoOccurrenceBuild(const WebPPicture* const pic,
|
||||
}
|
||||
|
||||
struct Sum {
|
||||
uint16_t index;
|
||||
uint8_t index;
|
||||
uint32_t sum;
|
||||
};
|
||||
|
||||
@ -282,7 +282,7 @@ static WebPEncodingError PaletteSortModifiedZeng(
|
||||
}
|
||||
|
||||
while (num_sums > 0) {
|
||||
const uint16_t best_index = best_sum->index;
|
||||
const uint8_t best_index = best_sum->index;
|
||||
// Compute delta to know if we need to prepend or append the best index.
|
||||
int32_t delta = 0;
|
||||
const int32_t n = num_colors - num_sums;
|
||||
|
Loading…
x
Reference in New Issue
Block a user