Nigel Tao
3d46062176
cgen: note that base.io_buffer__struct is linear
2026-09-15 10:42:51 +10:00
Nigel Tao
466cf6f15d
std/webp: tweak workbuf_len determination
2026-08-10 09:23:05 +10:00
Nigel Tao
59176bb0c7
base: fix color_u64_argb_nonpremul for 64-bit
2026-08-07 09:09:42 +10:00
Nigel Tao
16d6267451
base: specialize swizzle_ycca for bgra_premul
2026-08-06 15:13:04 +10:00
Nigel Tao
0fe5509f1b
base: avoid (NULL + 0) in slice functions
...
Fixes #178
2026-08-06 12:09:47 +10:00
Nigel Tao
7b71d6840a
base: rename color_u32_at color_u32_argb_premul_at
2026-08-06 11:53:49 +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
6e9e2e00c2
std/vp8: accept VP8X (but ignore any ALPH chunk)
2026-07-20 21:24:35 +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
f3de333642
cgen: revert simplify "x ~mod+ 0", "1 ~mod* y" etc
...
This reverts commit a4ec3f8e , which triggers -Werror=sign-conversion
errors on C code like this:
v_foobar += blah;
instead of the equivalent (as all variables here have u32 type):
v_foobar += ((uint32_t)(0u + blah));
This compiler warning (or compiler error, with -Werror) is arguably a
false postive but it's easier not to fight the C compiler.
2026-06-23 21:28:06 +10:00
Nigel Tao
dc18293c00
base: support YCC_MODEL__BT_601_STUDIO_RANGE
2026-06-20 22:24:40 +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
a4ec3f8e92
cgen: simplify "x ~mod+ 0", "1 ~mod* y" etc
2026-06-19 19:08:04 +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
327a714118
cgen: simplify "x + 0", "1 * y" and "z << 0"
2026-06-13 08:57:33 +10:00
Nigel Tao
38a5e853c9
std/handsum: tweak magic identifier bytes
2026-05-01 23:23:21 +10:00
Nigel Tao
126a80a8f1
base: fix swizzle_ycc__convert_3_rgbx copy/pasto
2026-04-15 23:20:33 +10:00
Nigel Tao
752993e3a9
base: publicize color_swap_uxx_argb_abgr
2026-04-14 09:59:35 +10:00
Nigel Tao
b9145634fd
cgen: tweak STB "desired_channels == 0" support
2026-03-02 12:45:56 +11:00
zhuzeitou
da162b49ae
support 0 (STBI_default) and 2 (STBI_grey_alpha) in stb drop-in
2026-02-28 10:32:39 +08:00
Nigel Tao
2560db99aa
cgen: fix STB drop-in-replacement C++ warnings
...
Fixes #166
2026-02-09 16:13:33 +11: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
6e91caf241
std/netpbm: allow spaces and tabs as whitespace
2025-02-28 21:37:22 +11:00
Nigel Tao
43a6814dfe
std/handsum: add new package
2025-02-24 11:18:24 +11:00
Nigel Tao
9a9ab6ff86
base: add magic number for Handsum
2025-02-23 15:48:57 +11:00
Nigel Tao
71c6c97b86
script: fix WUFFS_BASE__FOURCC__TARGA typo
2024-11-06 22:37:33 +11:00
Nigel Tao
f6ccf2c990
base: add range_ie_i32 and rect_ie_i32
...
Just the C types for now. The Wuffs types can be added later (along with
the base.i32 type).
2024-10-24 19:43:17 +10:30
Nigel Tao
fae284be39
base: re-arrange range and rect types
...
No semantic changes. Just re-sorting the struct definitions to appear in
lexicographic order.
2024-10-24 19:28:35 +10:30
Nigel Tao
56ee4b5e7f
base: add IMAGE__DIMENSION_MAX_INCL comment
2024-09-23 17:02:09 +09:30
Nigel Tao
abdfa0d946
base: compact returns the change in writer length
2024-09-22 11:51:05 +09:30
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
72ae58b76e
base: add pixel_buffer.is_opaque
2024-09-18 12:09:52 +09:30
Nigel Tao
42ba720d4e
pixconv: allow swizzling to Y (gray) more often
...
Binary size, before:
124816 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
124816 gen/lib/c/clang-static/wuffs-base-pixconv.o
196736 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
196672 gen/lib/c/gcc-static/wuffs-base-pixconv.o
After:
142032 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
142032 gen/lib/c/clang-static/wuffs-base-pixconv.o
242712 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
242584 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2024-09-08 22:54:35 +10:00
Nigel Tao
affff51fbf
base: add pixel_format.coloration
2024-09-08 10:37:43 +10:00
Nigel Tao
85af5a4bed
std/tga: rename to std/targa
2024-09-08 09:00:10 +10:00
Nigel Tao
8924b5f003
cgen: add ETC__ENABLE_DROP_IN_REPLACEMENT__STB
...
Fixes #153
2024-09-07 22:21:00 +10:00
Nigel Tao
8c854ae702
std/thumbhash: implement do_decode_frame
2024-09-06 12:35:53 +10:00
Nigel Tao
b8740d8881
std/thumbhash: add new package
2024-09-03 20:07:37 +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
96eda2ec0d
std/etc2: support transparency
2024-08-18 15:09:51 +10:00
Nigel Tao
43df015669
std/etc2: add new package
2024-08-17 15:31:29 +10:00
Nigel Tao
5a8f636a66
base: add magic number for ETC2
2024-08-16 10:17:44 +10:00
Nigel Tao
5d69840f8e
cgen: swap calloc args
...
For calloc(nmemb, size), multiplication is commutative, but this still
fixes a -Werror=calloc-transposed-args failure with coreboot's compiler.
2024-08-12 22:33:33 +10:00