summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2022-11-21 11:24:16 -0800
committerJames Zern <jzern@google.com>2022-11-22 11:38:01 -0800
commit0ceeeab987cba59ef7ee3369bdc167067094ddc2 (patch)
treec9a293cc131db17f983c90e57ef459bc17a11876
parent607611cd86a5ac19c481de567f8e5d5328347c40 (diff)
downloadlibwebp-0ceeeab987cba59ef7ee3369bdc167067094ddc2.tar.gz
webp-lossless-bitstream-spec: add amendment note
for fixes to the distance_map pseudo-code, the inverse color transform description and the num_code_lengths check. Bug: webp:448 Bug: webp:551 Change-Id: Id7e791b97704dd64bb9519657ce48b92cb457ae4
-rw-r--r--doc/webp-lossless-bitstream-spec.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/webp-lossless-bitstream-spec.txt b/doc/webp-lossless-bitstream-spec.txt
index 450bc050..fc7591f9 100644
--- a/doc/webp-lossless-bitstream-spec.txt
+++ b/doc/webp-lossless-bitstream-spec.txt
@@ -18,6 +18,8 @@ Paragraphs marked as \[AMENDED\] were amended on 2014-09-16.
Paragraphs marked as \[AMENDED2\] were amended on 2022-05-13.
+Paragraphs marked as \[AMENDED3\] were amended on 2022-11-21.
+
Abstract
--------
@@ -465,7 +467,7 @@ During decoding, `ColorTransformElement` instances of the blocks are
decoded and the inverse color transform is applied on the ARGB values of
the pixels. As mentioned earlier, that inverse color transform is just
adding `ColorTransformElement` values to the red and blue
-channels.
+channels. \[AMENDED3\]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void InverseTransform(uint8 red, uint8 green, uint8 blue,
@@ -771,6 +773,8 @@ Similarly, the distance code `3` indicates the left-top pixel.
The decoder can convert a distance code `i` to a scan-line order distance
`dist` as follows:
+\[AMENDED3\]
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(xi, yi) = distance_map[i - 1]
dist = xi + yi * xsize
@@ -910,7 +914,7 @@ First, `num_code_lengths` specifies the number of code lengths.
int num_code_lengths = 4 + ReadBits(4);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-If `num_code_lengths` is > 19, the bitstream is invalid.
+If `num_code_lengths` is > 19, the bitstream is invalid. \[AMENDED3\]
The code lengths are themselves encoded using prefix codes: lower level code
lengths, `code_length_code_lengths`, first have to be read. The rest of those