webp-lossless-bitstream-spec: add amendment note

for recent changes to color transform, simple code length code, image
structure and details of decoding prefix codes

Bug: webp:551
Change-Id: I36a4d1ee3e25b8a56f5d926f4770374ace99bc2f
This commit is contained in:
James Zern 2022-03-24 19:36:30 -07:00
parent 86c669303a
commit a2093acc4b

View File

@ -16,6 +16,8 @@ _Jyrki Alakuijala, Ph.D., Google, Inc., 2012-06-19_
Paragraphs marked as \[AMENDED\] were amended on 2014-09-16. Paragraphs marked as \[AMENDED\] were amended on 2014-09-16.
Paragraphs marked as \[AMENDED2\] were amended on 2022-05-13.
Abstract Abstract
-------- --------
@ -367,6 +369,7 @@ the predicted value for the left-topmost pixel of the image is
0xff000000, L-pixel for all pixels on the top row, and T-pixel for all 0xff000000, L-pixel for all pixels on the top row, and T-pixel for all
pixels on the leftmost column. pixels on the leftmost column.
\[AMENDED2\]
Addressing the TR-pixel for pixels on the rightmost column is Addressing the TR-pixel for pixels on the rightmost column is
exceptional. The pixels on the rightmost column are predicted by using exceptional. The pixels on the rightmost column are predicted by using
the modes \[0..13\] just like pixels not on the border, but the leftmost pixel the modes \[0..13\] just like pixels not on the border, but the leftmost pixel
@ -375,6 +378,8 @@ on the same row as the current pixel is instead used as the TR-pixel.
### Color Transform ### Color Transform
\[AMENDED2\]
The goal of the color transform is to decorrelate the R, G and B values The goal of the color transform is to decorrelate the R, G and B values
of each pixel. Color transform keeps the green (G) value as it is, of each pixel. Color transform keeps the green (G) value as it is,
transforms red (R) based on green and transforms blue (B) based on green transforms red (R) based on green and transforms blue (B) based on green
@ -834,7 +839,7 @@ potentially better compression.
The encoded image data consists of several parts: The encoded image data consists of several parts:
1. Decoding and building the prefix codes 1. Decoding and building the prefix codes \[AMENDED2\]
1. Meta Huffman codes 1. Meta Huffman codes
1. Entropy-coded image data 1. Entropy-coded image data
@ -858,6 +863,8 @@ stream. This may be inefficient, but it is allowed by the format.
**(i) Simple Code Length Code:** **(i) Simple Code Length Code:**
\[AMENDED2\]
This variant is used in the special case when only 1 or 2 Huffman symbols are This variant is used in the special case when only 1 or 2 Huffman symbols are
in the range \[0, 255\] with code length `1`. All other Huffman code lengths in the range \[0, 255\] with code length `1`. All other Huffman code lengths
are implicitly zeros. are implicitly zeros.
@ -1031,6 +1038,8 @@ The decoder then uses Huffman code group `huff_group` to decode the pixel
#### 5.2.3 Decoding Entropy-coded Image Data #### 5.2.3 Decoding Entropy-coded Image Data
\[AMENDED2\]
For the current position (x, y) in the image, the decoder first identifies the For the current position (x, y) in the image, the decoder first identifies the
corresponding Huffman code group (as explained in the last section). Given the corresponding Huffman code group (as explained in the last section). Given the
Huffman code group, the pixel is read and decoded as follows: Huffman code group, the pixel is read and decoded as follows:
@ -1097,6 +1106,8 @@ of pixels (xsize * ysize).
#### Structure of the Image Data #### Structure of the Image Data
\[AMENDED2\]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<spatially-coded image> ::= <color cache info><meta huffman><data> <spatially-coded image> ::= <color cache info><meta huffman><data>
<entropy-coded image> ::= <color cache info><data> <entropy-coded image> ::= <color cache info><data>