mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
VP8LSetBitPos: remove the eos_ setting
This code is ultra-critical for lossless decoding, especially on ARM. The extra call VP8LIsEndOfStream() was causing unnecessary slow-down. Now, we check for bitstream-end separately in the main loop. Change-Id: I739b5d74cc29578e2b712ba99b544fd995ef0e0d
This commit is contained in:
@ -155,9 +155,10 @@ static WEBP_INLINE int VP8LIsEndOfStream(const VP8LBitReader* const br) {
|
||||
|
||||
// For jumping over a number of bits in the bit stream when accessed with
|
||||
// VP8LPrefetchBits and VP8LFillBitWindow.
|
||||
// This function does *not* set br->eos_, since it's speed-critical.
|
||||
// Use with extreme care!
|
||||
static WEBP_INLINE void VP8LSetBitPos(VP8LBitReader* const br, int val) {
|
||||
br->bit_pos_ = val;
|
||||
br->eos_ = VP8LIsEndOfStream(br);
|
||||
}
|
||||
|
||||
// Advances the read buffer by 4 bytes to make room for reading next 32 bits.
|
||||
|
Reference in New Issue
Block a user