Claude
d74d28bef9
Merge branch 'm1c-decoder-extensions' into claude/project-thread-0izcgq
...
Combines the encoder (quality 0 and 1) with the decoder's large-window
mode and custom dictionaries. The test and mimic files take both sides'
new sections; the fuzzer gains the std/softfloat module that the
encoder now pulls into std/brotli.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_011NoosQNe7DKWnqDCBeqw1p
2026-10-26 23:59:14 +00:00
Claude
b9be8feaee
std/brotli: large-window mode, custom dictionaries and a fuzzer
...
Completes the decoder's feature set relative to libbrotlidec v1.2.1:
- QUIRK_LARGE_WINDOW mirrors BROTLI_DECODER_PARAM_LARGE_WINDOW: the
large-window WBITS escape, window bits up to 30, the 544-symbol distance
alphabet and 64-bit distance arithmetic, with workbuf_len growing to
(1 << 30) + 542 when the quirk is set.
- decoder.add_dictionary! mirrors BrotliDecoderAttachDictionary for raw
(LZ77 prefix) and serialized shared dictionaries: compound-dictionary
distance mapping, the shared-dictionary parser (custom word lists,
transform lists including the SHIFT transforms, context-dependent
dictionary selection, prefix dictionaries) and all of its validation.
Wuffs structs cannot hold slices, so the dictionary bytes are copied
into the front of the caller's workbuf; the layout is documented in
the README. Serialized dictionaries are accepted as in a
BROTLI_EXPERIMENTAL build of libbrotli.
- fuzz/c/std/brotli_fuzzer.c, exercising the quirk, dictionaries and
random I/O limits.
Tests: new golden vectors for large windows (including a 17 MiB
far-distance stream generated in the test), raw and serialized
dictionaries, nine more malformed inputs, and mimic comparisons that
attach the same dictionaries to libbrotlidec. Differential runs over
2.7 million mutated large-window and dictionary streams found no
divergence from libbrotlidec.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_011NoosQNe7DKWnqDCBeqw1p
2026-10-26 23:45:06 +00:00
Nigel Tao
85a0283cfc
base: tweak swizzle_ycck ycc_upsampling parameter
...
This moves from a 2-valued "basic (box) or fancy (triangle)" upsampling
parameter to a 3-valued one, which can now represent the fact that
libjpeg's and libwebp's fancy (triangle) upsampling is ever-so-slightly
different (see script/script/replicate-libwebp-chroma-upsampling.go and
its comments).
This is not an optimization or pessimization per se, but for the record,
the performance impact is mixed.
name old speed new speed delta
wuffs_jpeg_decode_19k_8bpp/clang14 317MB/s ± 0% 314MB/s ± 0% -0.99% (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/clang14 318MB/s ± 0% 328MB/s ± 0% +3.13% (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/clang14 879MB/s ± 0% 871MB/s ± 0% -0.83% (p=0.008 n=5+5)
wuffs_jpeg_decode_77k_24bpp/clang14 719MB/s ± 0% 713MB/s ± 0% -0.89% (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/clang14 779MB/s ± 0% 771MB/s ± 0% -1.01% (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/clang14 902MB/s ± 0% 890MB/s ± 0% -1.32% (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/clang14 784MB/s ± 0% 779MB/s ± 0% -0.66% (p=0.008 n=5+5)
wuffs_jpeg_decode_19k_8bpp/gcc12 358MB/s ± 0% 362MB/s ± 0% +0.93% (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/gcc12 305MB/s ± 0% 311MB/s ± 0% +1.91% (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/gcc12 912MB/s ± 0% 918MB/s ± 0% +0.73% (p=0.016 n=4+5)
wuffs_jpeg_decode_77k_24bpp/gcc12 749MB/s ± 0% 763MB/s ± 0% +1.83% (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/gcc12 813MB/s ± 0% 824MB/s ± 0% +1.37% (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/gcc12 969MB/s ± 0% 984MB/s ± 0% +1.62% (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/gcc12 815MB/s ± 0% 832MB/s ± 0% +2.06% (p=0.008 n=5+5)
2026-07-03 21:38:28 +10:00
Nigel Tao
5db6a08b6a
fuzz: add webp fuzzer
2026-05-05 14:08:26 +10:00
Nigel Tao
eec7d22ea3
pixconv: swizzle PIXEL_FORMAT__BGRA_PREMUL_4X16LE
...
Binary size, before:
145472 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
145472 gen/lib/c/clang-static/wuffs-base-pixconv.o
247720 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
247688 gen/lib/c/gcc-static/wuffs-base-pixconv.o
After:
155120 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
155120 gen/lib/c/clang-static/wuffs-base-pixconv.o
266992 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
266896 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2025-07-15 15:34:48 +10:00
Nigel Tao
5ec14737f3
pixconv: allow swizzle from PIXEL_FORMAT__Y_16LE
...
Binary size, before:
142648 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
142648 gen/lib/c/clang-static/wuffs-base-pixconv.o
243368 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
243240 gen/lib/c/gcc-static/wuffs-base-pixconv.o
After:
145472 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
145472 gen/lib/c/clang-static/wuffs-base-pixconv.o
247720 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
247688 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2025-06-10 11:33:08 +10:00
Nigel Tao
d662ef5484
fuzz: remove rapidjson_corpus
...
https://github.com/guidovranken/rapidjson-fuzzers has disappeared.
See https://issues.oss-fuzz.com/issues/380676571
2024-11-27 18:26:48 +11:00
Nigel Tao
85af5a4bed
std/tga: rename to std/targa
2024-09-08 09:00:10 +10:00
Nigel Tao
ffb64df0a0
aux: add QuirkKeyValuePair type
2024-08-05 00:12:15 +10:00
Nigel Tao
3215f6afac
fuzz: remove "not enough data" from pixel swizzler
2024-08-04 23:36:10 +10:00
Nigel Tao
c9fff5b207
std/jpeg: add and use WUFFS_BASE__QUIRK_QUALITY
2024-08-04 23:15:58 +10:00
Nigel Tao
bdfbdf407e
pixconv: add PIXEL_FORMAT__YA_NONPREMUL support
...
Binary size, before:
115152 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
115152 gen/lib/c/clang-static/wuffs-base-pixconv.o
162280 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
165352 gen/lib/c/gcc-static/wuffs-base-pixconv.o
After:
123464 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
123464 gen/lib/c/clang-static/wuffs-base-pixconv.o
180768 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
180880 gen/lib/c/gcc-static/wuffs-base-pixconv.o
Updates #143
2024-03-27 19:07:03 +11:00
Nigel Tao
e8ec21976c
fuzz: shrink xz WORK_BUFFER_ARRAY_SIZE
2024-02-09 16:02:54 +11:00
Nigel Tao
caa7711b30
fuzz: fix seed_corpora xzsuite_corpus dir name
...
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65668
2024-01-11 08:57:00 +11:00
Nigel Tao
0719c911f6
fuzz: add xz_fuzzer
2024-01-07 17:34:15 +11:00
Patrick Georgi
f563f32f82
Add SPDX identifier to license headers
...
SPDX is an ISO standard for describing licenses in a computer readable
format, which is useful when applying license compliance tools and the
like to source code.
In addition to ensuring that the Wuffs C distribution is properly
annotated to the benefit of projects using Wuffs and SPDX-supporting
tools, add it everywhere else where there's a license in this repo for
consistency, too.
2023-10-06 20:52:36 +02:00
Nigel Tao
74a6ea2fcd
all: relicense from Apache2 to dual Apache2/MIT
...
The LICENSE has changed from a single license (Apache2) to a dual
license (Apache2 or MIT, at your option).
If you've previously used Wuffs under the Apache2 license, you are able
to keep doing so. No further action required by you.
The two files listed below (previous releases) are exceptions, as they
are older snapshots, frozen in time. Their license has not changed:
release/c/wuffs-v0.2.c
release/c/wuffs-v0.3.c
Every name in the AUTHORS file, other than Google Inc., has signed
Google's CLA (Contributor License Agreement).
2023-10-06 10:00:59 +11:00
Nigel Tao
8e42e01d3c
std/gif: remove the std/lzw dependency
...
name old speed new speed delta
wuffs_gif_decode_1k_bw/clang11 683MB/s ± 0% 682MB/s ± 0% ~ (p=0.690 n=5+5)
wuffs_gif_decode_1k_color_full_init/clang11 168MB/s ± 0% 184MB/s ± 0% +10.01% (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/clang11 204MB/s ± 0% 230MB/s ± 0% +12.77% (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/clang11 746MB/s ± 0% 819MB/s ± 0% +9.90% (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/clang11 200MB/s ± 0% 218MB/s ± 0% +8.97% (p=0.008 n=5+5)
wuffs_gif_decode_20k/clang11 246MB/s ± 0% 257MB/s ± 0% +4.33% (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/clang11 543MB/s ± 0% 562MB/s ± 0% +3.44% (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/clang11 210MB/s ± 0% 220MB/s ± 0% +4.90% (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/clang11 214MB/s ± 0% 224MB/s ± 0% +4.96% (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/clang11 214MB/s ± 0% 224MB/s ± 0% +4.98% (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/clang11 1.24GB/s ± 0% 1.29GB/s ± 0% +3.85% (p=0.008 n=5+5)
wuffs_gif_decode_1k_bw/gcc10 649MB/s ± 0% 588MB/s ± 0% -9.42% (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/gcc10 167MB/s ± 0% 198MB/s ± 0% +18.57% (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/gcc10 195MB/s ± 0% 251MB/s ± 0% +28.64% (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/gcc10 753MB/s ± 0% 871MB/s ± 0% +15.64% (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/gcc10 199MB/s ± 0% 233MB/s ± 0% +16.86% (p=0.008 n=5+5)
wuffs_gif_decode_20k/gcc10 258MB/s ± 0% 265MB/s ± 0% +2.93% (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/gcc10 560MB/s ± 0% 561MB/s ± 0% +0.19% (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/gcc10 221MB/s ± 0% 227MB/s ± 0% +2.65% (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/gcc10 227MB/s ± 0% 232MB/s ± 0% +2.29% (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/gcc10 227MB/s ± 0% 232MB/s ± 0% +2.28% (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/gcc10 1.29GB/s ± 0% 1.28GB/s ± 0% -0.22% (p=0.008 n=5+5)
2023-10-04 20:19:25 +11:00
Nigel Tao
7d4ef9c122
fuzz: let pixel_swizzler_fuzzer do 4 components
2023-08-22 16:31:38 +10:00
Nigel Tao
7cdeeadbf4
fuzz: fix pixel_swizzler_fuzzer build
2023-08-21 22:22:31 +10:00
Nigel Tao
94df43c530
std/jpeg: prepare for triangle-filter upsampling
2023-05-21 22:04:45 +10:00
Nigel Tao
382303a99d
fuzz: add jpeg_fuzzer.c
...
Updates #42
2023-05-15 12:22:26 +10:00
Nigel Tao
6e84987d33
std: change set_quirk_enabled to set_quirk
2023-04-14 21:42:15 +10:00
Nigel Tao
43ca567205
fuzz: check "short read" and io_reader.is_closed
...
Updates #96
2023-02-01 22:32:36 +11:00
Nigel Tao
b8d44be783
Touch fuzz/c/std/bzip2_fuzzer.c again
...
This undoes commit c1283e49 now that issue #79 was closed.
Updates #79
2022-06-24 13:32:04 +10:00
Nigel Tao
c1283e4989
Touch fuzz/c/std/bzip2_fuzzer.c
...
Updates #79
2022-06-20 19:13:40 +10:00
Nigel Tao
886e7f3e8f
Simplify fuzzers' io_buffer construction
2022-06-08 17:08:49 +10:00
Nigel Tao
fbc686f9b7
Add memrandomize to fuzz/c/fuzzlib
2022-06-08 17:06:59 +10:00
Nigel Tao
cda8b1950a
Add fuzz/c/std/bzip2_fuzzer.c
2022-05-18 00:15:40 +10:00
Nigel Tao
48e457204f
Add "./build-{example,fuzz}.sh" instructions
2022-01-19 14:58:40 +11:00
Nigel Tao
6d35660651
Add fuzz/c/std/tga_fuzzer.c
...
Updates #67
2022-01-15 14:53:41 +11:00
Nigel Tao
010e0a69f4
Fix fuzz seed_corpora for test filename rename
...
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41167
2021-11-20 17:58:08 +11:00
Nigel Tao
d5075c7e94
Push "int i" into "for (int i = etc; etc; etc)"
2021-11-02 14:07:58 +11:00
Nigel Tao
d259f7a579
Fix json_fuzzer for wuffs_aux::FooArgBar types
2021-10-18 00:46:50 +11:00
Nigel Tao
1a94a6f1b3
Choose fuzzer's static-ness on program vs library
...
Some sanitizers don't work well with static functions.
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39767
2021-10-10 10:46:05 +11:00
Nigel Tao
55784030e4
Have fuzzers use WUFFS_CONFIG__STATIC_FUNCTIONS
...
Compile time:
$ time ./build-fuzz.sh
Before: user 0m36.656s
After: user 0m18.534s
2021-10-07 14:26:08 +11:00
Nigel Tao
f7b1b87c70
Fix "-Wnarrowing -m32" warning for some fuzzers
2021-08-14 12:49:04 +10:00
Nigel Tao
13f2e44aca
Have JSON fuzzer segfault on internal errors
2021-08-13 17:45:23 +10:00
Nigel Tao
128d0386bd
Fuzz wuffs_aux::DecodeJson
2021-08-12 23:07:26 +10:00
Nigel Tao
d8796aa6d9
Add wuffs_base__uxx__rotate_etc functions
2021-06-28 09:59:32 +10:00
Nigel Tao
ec32eb3eb7
Add fuzz/c/std/gif_fuzzer.c quirks
2021-06-18 22:37:29 +10:00
Nigel Tao
13f9ecec68
Have pixel_swizzler_fuzzer use no-r/w guard pages
2021-03-22 23:20:30 +11:00
Nigel Tao
41bfcabd3a
Add fuzz/c/std/pixel_swizzler_fuzzer.c
2021-03-22 14:02:39 +11:00
Nigel Tao
3e5afc3e52
Remove png_fuzzer "smoke alarm test"
...
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31984
2021-03-13 13:39:35 +11:00
Nigel Tao
49c5692c32
Add png_fuzzer "smoke alarm test"
2021-03-11 11:05:20 +11:00
Nigel Tao
2f78804e62
Use more inclusive language
2021-01-23 19:50:47 +11:00
Nigel Tao
0de64ee8b7
Use WUFFS_BASE__QUIRK_IGNORE_CHECKSUM
2021-01-21 22:49:57 +11:00
Nigel Tao
1ff74749f0
Add fuzz/c/std/png_fuzzer.c
2020-12-28 15:58:05 +11:00
Nigel Tao
1c8f9280fd
Add fuzz/c/std/bmp_fuzzer.c
2020-12-15 22:25:21 +11:00
Nigel Tao
4346028a23
Factor out fuzz/c/fuzzlib/fuzzlib_image_decoder.c
2020-12-15 22:21:55 +11:00