mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +02:00
Speedup for decoding lossless WebP photographs:
use bit_pos instead num_bit to update the bit-reader 37.69 MB/s -> 39.79 MB/s, 5.6 % Change-Id: Ica476cc3e2fc2db084d6961bea8586b050bb221d
This commit is contained in:
@ -316,9 +316,10 @@ static WEBP_INLINE uint32_t VP8LPrefetchBits(VP8LBitReader* const br) {
|
||||
return (uint32_t)(br->val_ >> br->bit_pos_);
|
||||
}
|
||||
|
||||
// Discard 'num_bits' bits from the cache.
|
||||
static WEBP_INLINE void VP8LDiscardBits(VP8LBitReader* const br, int num_bits) {
|
||||
br->bit_pos_ += num_bits;
|
||||
// For jumping over a number of bits in the bit stream when accessed with
|
||||
// VP8LPrefetchBits and VP8LFillBitWindow.
|
||||
static WEBP_INLINE void VP8LSetBitPos(VP8LBitReader* const br, int val) {
|
||||
br->bit_pos_ = val;
|
||||
}
|
||||
|
||||
// Advances the Read buffer by 4 bytes to make room for reading next 32 bits.
|
||||
|
Reference in New Issue
Block a user