From 61c9d161d59b6e4102bc7dffc35151855864e3af Mon Sep 17 00:00:00 2001 From: James Zern Date: Sun, 1 Jul 2012 14:10:32 -0700 Subject: [PATCH] doc: correct lossless prefix coding table & code extra bit counts and literal distance return value Change-Id: I290e3ee8900469503a323f87e9dbb8ca5cb4afc7 --- doc/webp-lossless-bitstream-spec.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/webp-lossless-bitstream-spec.txt b/doc/webp-lossless-bitstream-spec.txt index c2ad23bb..ab23f27e 100644 --- a/doc/webp-lossless-bitstream-spec.txt +++ b/doc/webp-lossless-bitstream-spec.txt @@ -662,14 +662,14 @@ instead of a million (distance) or several thousands (length). | 6 | 9..12 | 2 | | 7 | 13..16 | 2 | | ... | ... | ... | -| 38 | 262145..524288 | 17 | -| 39 | 524289..1048576 | 17 | +| 38 | 262145..524288 | 18 | +| 39 | 524289..1048576 | 18 | The code to obtain a value from the prefix code is as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (prefix_code < 4) { - return prefix_code; + return prefix_code + 1; } int extra_bits = (prefix_code - 2) >> 1; int offset = (2 + (prefix_code & 1)) << extra_bits;