diff options
author | Pascal Massimino <pascal.massimino@gmail.com> | 2013-05-11 03:53:01 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2013-06-11 15:00:46 -0700 |
commit | 07db70d20fc93594d624f88cec57c8b41e781033 (patch) | |
tree | 9713d11032748808051d425581b245187836af66 | |
parent | eda8a7dec52f6a858029b50d89cf1bccc3e9f9c9 (diff) | |
download | libwebp-07db70d20fc93594d624f88cec57c8b41e781033.tar.gz |
fix for big-endian
(Issue #150: https://code.google.com/p/webp/issues/detail?id=150)
Change-Id: Iad46d375a8c5eabae37cde8f55b3e7448601f264
(cherry picked from commit 443706173516408b5a6a95fcb912326ab783d340)
-rw-r--r-- | src/utils/bit_reader.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils/bit_reader.h b/src/utils/bit_reader.h index ccf450c5..7c5b3b1f 100644 --- a/src/utils/bit_reader.h +++ b/src/utils/bit_reader.h @@ -194,6 +194,7 @@ static WEBP_INLINE void VP8LoadNewBytes(VP8BitReader* const br) { #endif #else // BIG_ENDIAN bits = (bit_t)in_bits; + if (BITS != 8 * sizeof(bit_t)) bits >>= (8 * sizeof(bit_t) - BITS); #endif #ifndef USE_RIGHT_JUSTIFY br->value_ |= bits << (-br->bits_); |