mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-15 14:02:20 +00:00
LibGfx/WebPWriter: Remove two obsolete comments
In an early version of the huffman writing code, we always used 8 bits here, and the comments still reflected that. Since we're now always writing only as many bits as we need (in practice, still almost always 8), the comments are misleading.
This commit is contained in:
parent
925bea444b
commit
a2ddf054f2
Notes:
sideshowbarker
2024-07-17 21:11:12 +09:00
Author: https://github.com/nico
Commit: a2ddf054f2
Pull-request: https://github.com/SerenityOS/serenity/pull/24483
Reviewed-by: https://github.com/gmta ✅
1 changed files with 2 additions and 2 deletions
|
@ -189,8 +189,8 @@ static ErrorOr<CanonicalCode> write_normal_code_lengths(LittleEndianOutputBitStr
|
|||
unsigned needed_length_nbits = ceil(log2(encoded_lengths_count - 2));
|
||||
VERIFY(needed_length_nbits <= 16);
|
||||
needed_length_nbits = ceil_div(needed_length_nbits, 2) * 2;
|
||||
TRY(bit_stream.write_bits((needed_length_nbits - 2) / 2, 3u)); // length_nbits = 2 + 2 * 3 == 8
|
||||
TRY(bit_stream.write_bits(encoded_lengths_count - 2, needed_length_nbits)); // max_symbol = 2 + 254
|
||||
TRY(bit_stream.write_bits((needed_length_nbits - 2) / 2, 3u));
|
||||
TRY(bit_stream.write_bits(encoded_lengths_count - 2, needed_length_nbits));
|
||||
}
|
||||
|
||||
// The rest is identical to write_dynamic_huffman() again. (Code 16 has different semantics, but that doesn't matter here.)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue