From ac49e4e4dc05d6dcd4083aaa41965713e42c1c35 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 19 May 2016 23:14:02 -0700 Subject: [PATCH] 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 --- src/utils/bit_reader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/bit_reader.c b/src/utils/bit_reader.c index 453fe966..2b98d087 100644 --- a/src/utils/bit_reader.c +++ b/src/utils/bit_reader.c @@ -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;