webp-lossless-bitstream-spec: mv up prefix code group def

Move this to the top-level of the "Details" section as prefix codes are
discussed in both "Decoding and Building the Prefix Codes" and "Decoding
of Meta Prefix Codes"

Bug: webp:611
Change-Id: Ide2dfedf081d6c94122ac16ecded968ed760f90c
This commit is contained in:
James Zern 2023-06-05 18:21:11 -07:00
parent e4f17a31a7
commit c437c7aace

View File

@ -816,6 +816,17 @@ The encoded image data consists of several parts:
1. Meta prefix codes 1. Meta prefix codes
1. Entropy-coded image data 1. Entropy-coded image data
For any given pixel (x, y), there is a set of five prefix codes associated with
it. These codes are (in bitstream order):
* **Prefix code #1**: used for green channel, backward-reference length, and
color cache.
* **Prefix code #2, #3, and #4**: used for red, blue, and alpha channels,
respectively.
* **Prefix code #5**: used for backward-reference distance.
From here on, we refer to this set as a **prefix code group**.
#### 6.2.1 Decoding and Building the Prefix Codes #### 6.2.1 Decoding and Building the Prefix Codes
There are several steps in decoding the prefix codes. There are several steps in decoding the prefix codes.
@ -975,17 +986,6 @@ The next bits contain an entropy image of width `prefix_xsize` and height
**Interpretation of Meta Prefix Codes:** **Interpretation of Meta Prefix Codes:**
For any given pixel (x, y), there is a set of five prefix codes associated with
it. These codes are (in bitstream order):
* **Prefix code #1**: used for green channel, backward-reference length, and
color cache.
* **Prefix code #2, #3, and #4**: used for red, blue, and alpha channels,
respectively.
* **Prefix code #5**: used for backward-reference distance.
From here on, we refer to this set as a **prefix code group**.
The number of prefix code groups in the ARGB image can be obtained by finding The number of prefix code groups in the ARGB image can be obtained by finding
the _largest meta prefix code_ from the entropy image: the _largest meta prefix code_ from the entropy image: