mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
fix MSVC warnings regarding implicit uint64 to uint32 conversions
Change-Id: I284dae9222a3817bba3c5ba6be271b31b5bf660d
This commit is contained in:
parent
f6c096aad3
commit
6920c71f0a
@ -169,7 +169,7 @@ void VP8LFillBitWindow(VP8LBitReader* const br) {
|
||||
}
|
||||
|
||||
uint32_t VP8LReadOneBit(VP8LBitReader* const br) {
|
||||
const uint32_t val = (br->val_ >> br->bit_pos_) & 1;
|
||||
const uint32_t val = (uint32_t)((br->val_ >> br->bit_pos_) & 1);
|
||||
// Flag an error at end_of_stream.
|
||||
if (!br->eos_) {
|
||||
++br->bit_pos_;
|
||||
@ -198,7 +198,7 @@ uint32_t VP8LReadBits(VP8LBitReader* const br, int n_bits) {
|
||||
if ((br->bit_pos_ + n_bits) > 64) return val;
|
||||
}
|
||||
}
|
||||
val = (br->val_ >> br->bit_pos_) & kBitMask[n_bits];
|
||||
val = (uint32_t)((br->val_ >> br->bit_pos_) & kBitMask[n_bits]);
|
||||
br->bit_pos_ += n_bits;
|
||||
if (br->bit_pos_ >= 40) {
|
||||
if (br->pos_ + 5 < br->len_) {
|
||||
|
@ -121,7 +121,7 @@ static WEBP_INLINE int VP8BitUpdate(VP8BitReader* const br, bit_t split) {
|
||||
|
||||
static WEBP_INLINE void VP8Shift(VP8BitReader* const br) {
|
||||
// range_ is in [0..127] interval here.
|
||||
const int idx = br->range_ >> (BITS);
|
||||
const bit_t idx = br->range_ >> (BITS);
|
||||
const int shift = kVP8Log2Range[idx];
|
||||
br->range_ = kVP8NewRange[idx];
|
||||
br->value_ <<= shift;
|
||||
@ -182,7 +182,7 @@ uint32_t VP8LReadOneBit(VP8LBitReader* const br);
|
||||
// 32 times after the last VP8LFillBitWindow. Any subsequent calls
|
||||
// (without VP8LFillBitWindow) will return invalid data.
|
||||
static WEBP_INLINE uint32_t VP8LReadOneBitUnsafe(VP8LBitReader* const br) {
|
||||
const uint32_t val = (br->val_ >> br->bit_pos_) & 1;
|
||||
const uint32_t val = (uint32_t)((br->val_ >> br->bit_pos_) & 1);
|
||||
++br->bit_pos_;
|
||||
return val;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user