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
Nigel Tao
721e574398
base: avoid "#if SIZE_MAX < UINT64_MAX"
...
This fixes a -Werror=undef failure with coreboot's compiler.
2024-08-12 22:29:40 +10:00
Nigel Tao
d06700f00b
std/qoi: add new package
...
Fixes #63
2024-08-08 23:49:17 +10:00
Nigel Tao
ffb64df0a0
aux: add QuirkKeyValuePair type
2024-08-05 00:12:15 +10:00
Nigel Tao
d270839e3f
std/jpeg: let use_lower_quality work with CMYK
2024-08-04 23:16:58 +10:00
Nigel Tao
c9fff5b207
std/jpeg: add and use WUFFS_BASE__QUIRK_QUALITY
2024-08-04 23:15:58 +10:00
Nigel Tao
fb769ff82f
base: disable SIMD on MSVC x86_64 by default
...
This recreates the case as of commit f1698226 (tag v0.4.0-alpha.4), in
that, by default (without #define'ing a macro or passing an /arch:ETC
compiler flag), Wuffs does not use SIMD on MSVC x86_64.
Commit b64a7610 (after tag v0.4.0-alpha.4, before tag v0.4.0-alpha.5)
changed the default so that x86_64_v2 (roughly equivalent to SSE4.2) was
enabled by default, since the user from issue #148 was enabling that
anyway (in an unsupported way, by #define'ing a macro that was a private
implementation detail) with no problems (and better performance).
However, another user later reported (in issue #151 ) that enabling SIMD
on MSVC x86_64 somehow lead to ICEs (Internal Compiler Errors).
This commit restores the default to "no SIMD" and it is up to the MSVC
user to opt in to the SIMD code paths. Clang and GCC are unaffected:
SIMD remains enabled by default.
Updates #148
Updates #151
2024-07-31 17:12:55 +10:00
Nigel Tao
ce1f59e9ce
base: format token-public.h constants
2024-07-27 09:11:53 +10:00
Nigel Tao
8fe987e0b2
base: add sign_extend_convert_u8_u32
2024-07-09 16:31:58 +10:00
Nigel Tao
cc9ee184d0
cgen: omit consecutive Wconversion gcc pragmas
2024-07-09 12:39:16 +10:00
Nigel Tao
495f0280a8
base: add ETC__I_KNOW_THAT_ETC_BEST_WITH_ARCH_AVX2
...
Updates #148
2024-07-09 10:34:35 +10:00
Nigel Tao
b64a761067
base: enable ETC__CPU_ARCH__X86_64_V2 on MSVC
...
If I understand the https://github.com/google/wuffs/issues/148
discussion correctly, a user overrode WUFFS_BASE__CPU_ARCH__X86_FAMILY
(without also providing /arch:AVX) to enable SSE4.2 code (even though,
technically, x86_64 doesn't guarantee SSE4.2, only SSE2). This seemed to
work fine in practice, but was unsupported by Wuffs and 'broke' by
fixing #145 , now looking for WUFFS_BASE__CPU_ARCH__X86_64 instead of
WUFFS_BASE__CPU_ARCH__X86_FAMILY.
WUFFS_BASE__CPU_ARCH__X86_FAMILY has since been renamed to
WUFFS_PRIVATE_IMPL__CPU_ARCH__X86_FAMILY and then removed entirely.
As SSE4.2 (roughly equivalent to x86-64-v2) seems to work fine at
compile time (with the existing cpuid detection at runtime), enable it
by default for MSVC, without need /arch.
Enabling x86-64-v3 too, by default, is held back for now, pending
further confirmation from MSVC users. The #148 user was exercising
Wuffs' PNG codec, which uses SSE4.2 but not AVX or AVX2. Currently, only
Wuffs' JPEG codec (and YCbCr conversion) uses AVX or AVX2.
GCC and Clang don't need this fiddliness, because they support
"__attribute__((target(arg)))".
Updates #148
2024-07-09 10:25:42 +10:00
Nigel Tao
7a57e2b600
base: remove ETC__CPU_ARCH__X86_FAMILY
...
Updates #148
2024-07-09 09:33:34 +10:00
Nigel Tao
4111785304
base: have MSVC detect AVX2 not AVX
...
The x86-64-v3 micro-architecture level requires AVX2.
Updates #148
2024-07-09 09:22:23 +10:00
Nigel Tao
affa1e02d4
base: add WUFFS_PRIVATE_IMPL__CPU_ARCH__X86_64_V2
...
Updates #148
2024-07-09 09:17:09 +10:00
Nigel Tao
97b727a1ae
base: warn defining private implementation macros
...
Updates #148
2024-07-08 21:08:05 +10:00
Nigel Tao
37a3c3ce9b
base: rename WUFFS_BASE__CPU_ARCH__ETC
...
See
https://github.com/google/wuffs/issues/148#issuecomment-2130535812
Updates #148
2024-07-08 18:14:59 +10:00
Nigel Tao
5654506497
base: allow swizzling WebP Lossless to gray
2024-07-08 12:35:40 +10:00
Nigel Tao
09f4500e19
std/webp: add new package (and vp8 placeholder)
2024-05-10 13:52:07 +10:00