mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibGfx/WebPLossless: Move around a spec comment
That way, we don't need a comment that wasn't from the spec. No behavior change.
This commit is contained in:
parent
076a8e5d0b
commit
5897e9bd29
Notes:
sideshowbarker
2024-07-17 07:38:17 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/5897e9bd29 Pull-request: https://github.com/SerenityOS/serenity/pull/24249
@ -940,7 +940,6 @@ ErrorOr<NonnullRefPtr<Bitmap>> decode_webp_chunk_VP8L_contents(VP8LHeader const&
|
||||
auto stored_size = IntSize { vp8l_header.width, vp8l_header.height };
|
||||
|
||||
// optional-transform = (%b1 transform optional-transform) / %b0
|
||||
// "Each transform is allowed to be used only once."
|
||||
u8 seen_transforms = 0;
|
||||
Vector<NonnullOwnPtr<Transform>, 4> transforms;
|
||||
while (TRY(bit_stream.read_bits(1))) {
|
||||
@ -964,7 +963,7 @@ ErrorOr<NonnullRefPtr<Bitmap>> decode_webp_chunk_VP8L_contents(VP8LHeader const&
|
||||
TransformType transform_type = static_cast<TransformType>(TRY(bit_stream.read_bits(2)));
|
||||
dbgln_if(WEBP_DEBUG, "transform type {}", (int)transform_type);
|
||||
|
||||
// Check that each transform is used only once.
|
||||
// "Each transform is allowed to be used only once."
|
||||
u8 mask = 1 << (int)transform_type;
|
||||
if (seen_transforms & mask)
|
||||
return Error::from_string_literal("WebPImageDecoderPlugin: transform type used multiple times");
|
||||
|
Loading…
Reference in New Issue
Block a user