1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:07:34 +00:00
serenity/Userland/Libraries/LibGfx/ImageFormats
Nico Weber e5e9d3b877 LibGfx: Implement hopefully correct max_symbol handling in webp decoder
The spec is at best misleading here, suggesting that max_symbol should
be set to "num_code_lengths" if it's not explicitly stored.

But num_code_lengths doesn't mean the num_code_lengths mentioned a few
lines further up in the spec, but alphabet_size!

(I had to cheat and look at libwebp instead of the spec for this: See
vp8l_dec.c, ReadHuffmanCode() which passes alphabet_size to
ReadHuffmanCodeLengths() as num_symbols, and ReadHuffmanCodeLengths()
then sets max_symbol to that.)

I haven't yet found a file that uses max_symbol, so this isn't actually
tested. But it's close to what's in libwebp, so maybe it works!
2023-04-06 00:16:52 +01:00
..
BMPLoader.cpp
BMPLoader.h
BMPWriter.cpp
BMPWriter.h
DDSLoader.cpp
DDSLoader.h
GIFLoader.cpp
GIFLoader.h
ICOLoader.cpp
ICOLoader.h
ImageDecoder.cpp
ImageDecoder.h
JPEGLoader.cpp LibGfx/JPEG: Add YCCK and CMYK to RGB color transformations 2023-04-03 17:12:27 +01:00
JPEGLoader.h
PBMLoader.cpp LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
PBMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
PGMLoader.cpp LibGfx/PortableFormat: Use static_cast instead of C-style casts 2023-03-24 10:56:58 +01:00
PGMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
PNGLoader.cpp
PNGLoader.h
PNGShared.h
PNGWriter.cpp
PNGWriter.h
PortableFormatWriter.cpp
PortableFormatWriter.h
PortableImageLoaderCommon.h LibGfx/PortableFormat: Propagate errors from decode() 2023-03-24 10:56:58 +01:00
PortableImageMapLoader.h LibGfx/PortableFormat: Propagate errors from decode() 2023-03-24 10:56:58 +01:00
PPMLoader.cpp LibGfx/PortableFormat: Use static_cast instead of C-style casts 2023-03-24 10:56:58 +01:00
PPMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
QOILoader.cpp
QOILoader.h
QOIWriter.cpp
QOIWriter.h
TGALoader.cpp
TGALoader.h
WebPLoader.cpp LibGfx: Implement hopefully correct max_symbol handling in webp decoder 2023-04-06 00:16:52 +01:00
WebPLoader.h