mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +02:00
Jump-lookup for Huffman coding
speeds up those codes that are not part of the main lookup. This gives a 10 % speedup for a photographic image. Change-Id: Ief54b0ad77db790a01314402ad351b40ac9a7be4
This commit is contained in:
@ -165,6 +165,10 @@ static WEBP_INLINE int ReadSymbol(const HuffmanTree* tree,
|
||||
VP8LSetBitPos(br, bitpos + lut_bits);
|
||||
return tree->lut_symbol_[lut_ix];
|
||||
}
|
||||
node += tree->lut_jump_[lut_ix];
|
||||
bitpos += HUFF_LUT_BITS;
|
||||
bits >>= HUFF_LUT_BITS;
|
||||
|
||||
// Decode the value from a binary tree.
|
||||
assert(node != NULL);
|
||||
while (HuffmanTreeNodeIsNotLeaf(node)) {
|
||||
|
Reference in New Issue
Block a user