From c437c7aace880ce19e3cac709faf92e27d372595 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 5 Jun 2023 18:21:11 -0700 Subject: [PATCH] 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 --- doc/webp-lossless-bitstream-spec.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/webp-lossless-bitstream-spec.txt b/doc/webp-lossless-bitstream-spec.txt index 42cf0573..aa2e3880 100644 --- a/doc/webp-lossless-bitstream-spec.txt +++ b/doc/webp-lossless-bitstream-spec.txt @@ -816,6 +816,17 @@ The encoded image data consists of several parts: 1. Meta prefix codes 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 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:** -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 _largest meta prefix code_ from the entropy image: