mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
bit_reader.c: s/VP8L_USE_UNALIGNED_LOAD/VP8L_USE_FAST_LOAD/
no longer gate this on WEBP_FORCE_ALIGNED as WebPMemToUint32() provides this service. replace that check with WORDS_BIGENDIAN as the block is currently little-endian specific. Change-Id: Ie04ec0179022d20dab53da878008ae049837782f
This commit is contained in:
parent
d39ceb58ac
commit
ac49e4e4dc
@ -120,11 +120,11 @@ int32_t VP8GetSignedValue(VP8BitReader* const br, int bits) {
|
||||
|
||||
#define VP8L_LOG8_WBITS 4 // Number of bytes needed to store VP8L_WBITS bits.
|
||||
|
||||
#if !defined(WEBP_FORCE_ALIGNED) && \
|
||||
#if !defined(WORDS_BIGENDIAN) && \
|
||||
(defined(__arm__) || defined(_M_ARM) || defined(__aarch64__) || \
|
||||
defined(__i386__) || defined(_M_IX86) || \
|
||||
defined(__x86_64__) || defined(_M_X64))
|
||||
#define VP8L_USE_UNALIGNED_LOAD
|
||||
#define VP8L_USE_FAST_LOAD
|
||||
#endif
|
||||
|
||||
static const uint32_t kBitMask[VP8L_MAX_NUM_BIT_READ + 1] = {
|
||||
@ -192,7 +192,7 @@ static void ShiftBytes(VP8LBitReader* const br) {
|
||||
|
||||
void VP8LDoFillBitWindow(VP8LBitReader* const br) {
|
||||
assert(br->bit_pos_ >= VP8L_WBITS);
|
||||
#if defined(VP8L_USE_UNALIGNED_LOAD)
|
||||
#if defined(VP8L_USE_FAST_LOAD)
|
||||
if (br->pos_ + sizeof(br->val_) < br->len_) {
|
||||
br->val_ >>= VP8L_WBITS;
|
||||
br->bit_pos_ -= VP8L_WBITS;
|
||||
|
Loading…
Reference in New Issue
Block a user