vp8l_enc.c: normalize index types
fixes conversion warnings in visual studio after:
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
@@ -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;
