From b7346a1ed25d5091618f9d76c5f270e9408ba910 Mon Sep 17 00:00:00 2001 From: Jyrki Alakuijala Date: Fri, 28 Jun 2013 12:33:01 +0000 Subject: [PATCH] 0.1 % speedup to decoding Change-Id: If2add8a8b6f339f1d4b6a9581ce8d3d0f792d372 --- src/dec/vp8l.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dec/vp8l.c b/src/dec/vp8l.c index fb0201a6..119eb2f6 100644 --- a/src/dec/vp8l.c +++ b/src/dec/vp8l.c @@ -171,11 +171,11 @@ static WEBP_INLINE int ReadSymbol(const HuffmanTree* tree, // Decode the value from a binary tree. assert(node != NULL); - while (HuffmanTreeNodeIsNotLeaf(node)) { + do { node = HuffmanTreeNextNode(node, bits & 1); bits >>= 1; ++bitpos; - } + } while (HuffmanTreeNodeIsNotLeaf(node)); VP8LSetBitPos(br, bitpos); return node->symbol_; }