Nigel Tao
d54d330601
base: let parse_number_xxx return "arg too long"
...
Updates PR #184
2026-10-21 12:04:44 +11:00
Nigel Tao
c677bef7fd
std/png: parse cICP chunk
...
Updates #180
2026-10-18 18:13:59 +11:00
Nigel Tao
89b7cc7a36
base: add WUFFS_BASE__MIME_TYPE__ETC
2026-10-05 16:55:53 +11:00
Nigel Tao
466cf6f15d
std/webp: tweak workbuf_len determination
2026-08-10 09:23:05 +10:00
Nigel Tao
d9cf0751ca
std/vp8: blend VP8X ALPH chunk
2026-08-06 11:05:26 +10:00
Nigel Tao
e7f6c79752
std/vp8: decode VP8X ALPH chunk
2026-07-29 15:58:52 +10: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
9a027b8016
base: add WUFFS_BASE__YCC_MODEL__ETC
2026-06-20 18:19:45 +10:00
Nigel Tao
40f39a3ba3
cgen: omit "x ~mod+= y ~mod* 0"
2026-06-19 20:28:56 +10:00
Nigel Tao
1f3df26c7f
lang/token: add IsXBinaryTildeModOp
2026-06-19 19:09:26 +10:00
Nigel Tao
68d13b8740
std/vp8: implement IDCT/IWHT
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-17 16:11:36 +10:00
Nigel Tao
b51fcb811a
std/vp8: parse the first partition
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications. There
were many stylistic changes but also:
- decoder.workbuf_len was fixed to account for all of the partitions,
not just the first two (the first partition and the first 'other'
partition). The PR's vp8 code, after an update to handle multiple
other partitions (which then implied random access to the partitioned
source bytes), assumed that enough workbuf was available (which it
often is, test/c/std/webp.c tests pass the entire g_work_slice_u8).
But strictly speaking, this isn't guaranteed unless workbuf_len
reports (after decode_image_config is called) what's needed.
- Calculating that workbuf_len (at decode_image_config time) lead to
introducing a new base.QUIRK_SOURCE_LENGTH quirk, to pass that
contextual information from std/webp to std/vp8. This calculation
belongs in std/vp8, not std/webp (or a future std/webm).
- Added support (and a test) for the case when the source bytes are
streamed and some (but not yet all) of the partition data in args.src
can be copied to args.workbuf.
Updates PR #168
2026-05-29 14:36:04 +10:00
Nigel Tao
9a9ab6ff86
base: add magic number for Handsum
2025-02-23 15:48:57 +11:00
Nigel Tao
b369d233ce
std: fix frame config background_color re alpha
2024-09-20 13:38:26 +09:30
Nigel Tao
13617c4907
convert-to-nia: add -output-uncompressed-png flag
2024-09-19 17:17:30 +09:30
Nigel Tao
8c854ae702
std/thumbhash: implement do_decode_frame
2024-09-06 12:35:53 +10:00
Nigel Tao
aa28bb076c
test/data: add thumbhash (*.th) files
2024-09-03 10:02:30 +10:00
Nigel Tao
1723532443
base: add ABXR, ABXS magic numbers
2024-08-31 14:37:32 +10:00
Nigel Tao
6693250aa9
lang: add io_reader.peek_u8_at
2024-08-25 15:07:29 +10:00
Nigel Tao
5a8f636a66
base: add magic number for ETC2
2024-08-16 10:17:44 +10:00
Nigel Tao
c9fff5b207
std/jpeg: add and use WUFFS_BASE__QUIRK_QUALITY
2024-08-04 23:15:58 +10:00
Nigel Tao
8fe987e0b2
base: add sign_extend_convert_u8_u32
2024-07-09 16:31:58 +10:00
Nigel Tao
d1a9749571
check: drop pointer-typed facts on suspension
2024-07-09 16:21:47 +10:00
Nigel Tao
f37cfcf554
check: drop more facts when calling coroutines
2024-07-09 14:11:31 +10:00
Nigel Tao
3be81643cc
hello-wuffs-c: update endwhile syntax
...
Also fix lang/check
2024-07-09 10:39:24 +10:00
Nigel Tao
aae5997e12
lang: remove endwhile keyword
2024-07-08 17:15:48 +10:00
Nigel Tao
d446e71e1f
check: reject io_bind an io_writer to a roslice
2024-04-25 10:44:42 +10:00
Nigel Tao
bf3afab25a
check: bounds-check roslice peeks, not just slice
2024-04-23 23:19:25 +10:00
Nigel Tao
e541e0cf79
std/crc64: re-write x86_sse42 implementation
...
name old speed new speed delta
wuffs_crc64_ecma_10k/clang14 5.84GB/s ± 0% 23.43GB/s ± 0% +301.23% (p=0.008 n=5+5)
wuffs_crc64_ecma_100k/clang14 6.18GB/s ± 0% 30.23GB/s ± 1% +389.45% (p=0.008 n=5+5)
wuffs_crc64_ecma_10k/gcc12 5.87GB/s ± 1% 24.02GB/s ± 0% +309.21% (p=0.008 n=5+5)
wuffs_crc64_ecma_100k/gcc12 6.21GB/s ± 0% 30.68GB/s ± 0% +394.22% (p=0.008 n=5+5)
$ time example-mzcat < linux-6.8.2.tar.xz > /dev/null
Before: user 0m7.604s
After: user 0m7.432s
2024-04-22 14:05:16 +10:00
Nigel Tao
b6b0f84187
std/lzma: use 8-byte-copy if applicable
...
name old speed new speed delta
wuffs_lzma_decode_100k/clang14 56.2MB/s ± 0% 60.7MB/s ± 0% +7.96% (p=0.008 n=5+5)
wuffs_lzma_decode_100k/gcc12 56.4MB/s ± 1% 61.7MB/s ± 1% +9.44% (p=0.008 n=5+5)
$ time example-mzcat < linux-6.8.2.tar.xz > /dev/null
Before: user 0m8.396s
After: user 0m8.392s
2024-03-31 16:02:06 +11:00
Nigel Tao
f5bb519320
base: add ETC__DST_PIXEL_FORMAT__ENABLE_ALLOWLIST
...
Binary size, before:
412128 gen/bin/example-convert-to-nia
50680 gen/bin/example-gifplayer
449680 gen/bin/example-imageviewer
439000 gen/bin/example-sdl-imageviewer
151848 gen/bin/example-toy-aux-image
After:
302232 gen/bin/example-convert-to-nia
46144 gen/bin/example-gifplayer
352112 gen/bin/example-imageviewer
329168 gen/bin/example-sdl-imageviewer
138656 gen/bin/example-toy-aux-image
For further data points, if you hard-code define'ing
WUFFS_CONFIG__DST_PIXEL_FORMAT__ENABLE_ALLOWLIST and
WUFFS_CONFIG__DST_PIXEL_FORMAT__ALLOW_BGRA_PREMUL:
Binary size, before:
121368 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
121368 gen/lib/c/clang-static/wuffs-base-pixconv.o
181088 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
181136 gen/lib/c/gcc-static/wuffs-base-pixconv.o
After:
54784 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
54784 gen/lib/c/clang-static/wuffs-base-pixconv.o
72144 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
72272 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2024-03-29 22:19:47 +11:00
Nigel Tao
0c9b700df0
base: fix PIXEL_FORMAT__YA_{NON,}PREMUL values
...
These pixel formats have two channels (gray, alpha), not one.
Updates #143
2024-03-27 16:53:19 +11:00
Nigel Tao
793ab36569
std/lzip: add new package
2024-03-01 09:52:54 +11:00
Nigel Tao
569a91892e
check: drop facts before/after an IOManip
2024-02-09 15:31:50 +11:00
Nigel Tao
9fb3859488
lang: more anticipating io_forget_history
2024-02-09 15:03:44 +11:00
Nigel Tao
e8af2d0635
lang: refactor anticipating io_forget_history
2024-02-09 14:55:35 +11:00
Nigel Tao
c21cc95713
std/lzma: use args.workbuf for io_buffer history
2024-02-08 21:38:30 +11:00
Nigel Tao
d9bb6d4b4f
base: add {io_reader,io_writer}.peek_undo_byte
2024-02-05 22:58:18 +11:00
Nigel Tao
992fd9622a
base: rename bitvec256.get to bitvec256.get_u64
2023-12-27 17:05:54 +11:00
Nigel Tao
79af52bb24
std/xz: add SHA-256 checksum support
2023-12-26 17:04:16 +11:00
Nigel Tao
eed1af7bee
base: rename history_retain_length
...
It was renamed to dst_history_retain_length.
It also was removed from image_decoders and token_decoders. It only
applies to io_transformers, as retaining history applies to the
destination (not source) IO buffer.
Also adjust example/bzcat and example/zcat to apply the history retain
length to the dst (not src) buffer.
2023-12-17 12:26:08 +11:00
Nigel Tao
0164364106
ast: add TypeExpr.IsSmallInteger method
2023-12-14 10:22:38 +11:00
Nigel Tao
57f01ec3f6
std/lzma: add new package
2023-12-12 23:41:26 +11:00
Nigel Tao
4f45ddcb0c
lang/check: renumber canLimitedEtcFast
2023-11-25 10:51:30 +11:00
Nigel Tao
8de7f559e0
base: io_writer.limited_etc_fast now needs len>=1
2023-11-25 10:50:02 +11:00
Nigel Tao
82ea1985b4
base: add optional_u63 type
2023-11-19 12:02:24 +11:00
Nigel Tao
e517ca4bee
base: add io_writer.limited_copy_etc_return_cusp
2023-11-19 10:32:59 +11:00
Nigel Tao
df1d4f64e2
check: ban recursive function calls
2023-11-04 22:51:40 +11:00
Nigel Tao
b20c177a08
check: run some phases once not once-per-file
2023-11-04 16:36:04 +11:00
Nigel Tao
357bfdaef3
check: ban non-base types from method args
2023-11-04 09:34:18 +11:00