mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 07:22:52 +01:00
VP8LFillBitWindow: respect WEBP_FORCE_ALIGNED
Change-Id: I23eddf01590de002efc21d8c7acc545a08fc3e48
This commit is contained in:
parent
e458badcc3
commit
4f7f52b2a1
@ -11,6 +11,10 @@
|
|||||||
//
|
//
|
||||||
// Author: Skal (pascal.massimino@gmail.com)
|
// Author: Skal (pascal.massimino@gmail.com)
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "../webp/config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "./bit_reader_inl.h"
|
#include "./bit_reader_inl.h"
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -172,7 +176,11 @@ static void ShiftBytes(VP8LBitReader* const br) {
|
|||||||
|
|
||||||
void VP8LFillBitWindow(VP8LBitReader* const br) {
|
void VP8LFillBitWindow(VP8LBitReader* const br) {
|
||||||
if (br->bit_pos_ >= WBITS) {
|
if (br->bit_pos_ >= WBITS) {
|
||||||
#if (defined(__x86_64__) || defined(_M_X64))
|
// TODO(jzern): 1) this might be of benefit in 32-bit builds too, along with
|
||||||
|
// reducing the load size.
|
||||||
|
// 2) given the fixed read size it may be possible to force
|
||||||
|
// alignment in this block.
|
||||||
|
#if !defined(WEBP_FORCE_ALIGNED) && (defined(__x86_64__) || defined(_M_X64))
|
||||||
if (br->pos_ + sizeof(br->val_) < br->len_) {
|
if (br->pos_ + sizeof(br->val_) < br->len_) {
|
||||||
br->val_ >>= WBITS;
|
br->val_ >>= WBITS;
|
||||||
br->bit_pos_ -= WBITS;
|
br->bit_pos_ -= WBITS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user