Gitweb links:
...log
http://git.netsurf-browser.org/libnsgif.git/shortlog/7149b17577f04f3c34d6e1c938eeaf88c06b10ad
...commit
http://git.netsurf-browser.org/libnsgif.git/commit/7149b17577f04f3c34d6e1c938eeaf88c06b10ad
...tree
http://git.netsurf-browser.org/libnsgif.git/tree/7149b17577f04f3c34d6e1c938eeaf88c06b10ad
The branch, master has been updated
via 7149b17577f04f3c34d6e1c938eeaf88c06b10ad (commit)
from 50e568df2ca8252019460a7d43cb83efa600d02d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libnsgif.git/commit/?id=7149b17577f04f3c34d6e1c938eeaf88c06b10ad
commit 7149b17577f04f3c34d6e1c938eeaf88c06b10ad
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
LZW decoder: Tiny optimisation.
When the next code fits exactly in what's left of the
current sub-block, we can use the fast path.
Spotted by Adrian Lees.
diff --git a/src/lzw.c b/src/lzw.c
index d65f77e..31cf7d4 100644
--- a/src/lzw.c
+++ b/src/lzw.c
@@ -163,7 +163,7 @@ static inline lzw_result lzw__next_code(
assert(byte_advance <= 2);
- if (ctx->sb_bit + code_size < ctx->sb_bit_count) {
+ if (ctx->sb_bit + code_size <= ctx->sb_bit_count) {
/* Fast path: code fully inside this sub-block */
const uint8_t *data = ctx->sb_data + (ctx->sb_bit >> 3);
switch (byte_advance) {
-----------------------------------------------------------------------
Summary of changes:
src/lzw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lzw.c b/src/lzw.c
index d65f77e..31cf7d4 100644
--- a/src/lzw.c
+++ b/src/lzw.c
@@ -163,7 +163,7 @@ static inline lzw_result lzw__next_code(
assert(byte_advance <= 2);
- if (ctx->sb_bit + code_size < ctx->sb_bit_count) {
+ if (ctx->sb_bit + code_size <= ctx->sb_bit_count) {
/* Fast path: code fully inside this sub-block */
const uint8_t *data = ctx->sb_data + (ctx->sb_bit >> 3);
switch (byte_advance) {
--
NetSurf GIF Decoder
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org