webp-lossless-bitstream-spec: fix num_code_lengths check

in the 'Normal Code Length Code' description the number of valid code
lengths is 19, not 18.

Bug: webp:448
Bug: webp:551
Change-Id: Id929604e1d771cb09b2d0ac617e83f21077f21de
This commit is contained in:
James Zern 2022-11-21 11:02:45 -08:00
parent b5700efb70
commit c6ac672dbc

View File

@ -910,7 +910,7 @@ First, `num_code_lengths` specifies the number of code lengths.
int num_code_lengths = 4 + ReadBits(4); int num_code_lengths = 4 + ReadBits(4);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If `num_code_lengths` is > 18, the bitstream is invalid. If `num_code_lengths` is > 19, the bitstream is invalid.
The code lengths are themselves encoded using prefix codes: lower level code 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 lengths, `code_length_code_lengths`, first have to be read. The rest of those