Nigel Tao
466cf6f15d
std/webp: tweak workbuf_len determination
2026-08-10 09:23:05 +10:00
Nigel Tao
8ed5d1327b
example/gifplayer: tweak try_allocate workbuf len
2024-04-05 13:33:15 +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
5407f39386
base: use wuffs_base__empty_slice_u8 more often
2023-11-02 22:43:01 +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
6e84987d33
std: change set_quirk_enabled to set_quirk
2023-04-14 21:42:15 +10:00
Nigel Tao
7eaf488bae
Fix gifplayer for still images with 0 loop count
2022-04-06 17:45:58 +10:00
Nigel Tao
d5075c7e94
Push "int i" into "for (int i = etc; etc; etc)"
2021-11-02 14:07:58 +11:00
Nigel Tao
7f9f37ce5a
Have examples use WUFFS_CONFIG__STATIC_FUNCTIONS
...
Compile time:
$ time ./build-example.sh
Before: user 1m15.750s
After: user 0m50.343s
Binary size (excluding the statically linked example-toy-genlib):
$ ls -l gen/bin/example-* | awk '{print $5 " " $9}'
Before:
212624 gen/bin/example-cbor-to-json
284192 gen/bin/example-convert-to-nia
344744 gen/bin/example-crc32
184304 gen/bin/example-gifplayer
324952 gen/bin/example-imageviewer
209632 gen/bin/example-json-to-cbor
241432 gen/bin/example-jsonfindptrs
196320 gen/bin/example-jsonptr
309768 gen/bin/example-sdl-imageviewer
200704 gen/bin/example-zcat
After:
85280 gen/bin/example-cbor-to-json
242216 gen/bin/example-convert-to-nia
344744 gen/bin/example-crc32
53328 gen/bin/example-gifplayer
282840 gen/bin/example-imageviewer
95152 gen/bin/example-json-to-cbor
122720 gen/bin/example-jsonfindptrs
60448 gen/bin/example-jsonptr
267672 gen/bin/example-sdl-imageviewer
64792 gen/bin/example-zcat
Before total: 2508672
After total: 1619192
2021-10-04 12:35:32 +11:00
Nigel Tao
2f2bbc6ab0
Rename default github.com branch s/master/main/
2021-01-25 11:30:15 +11:00
Nigel Tao
2f78804e62
Use more inclusive language
2021-01-23 19:50:47 +11:00
Nigel Tao
a1c22caa15
Rename load and store to peek and poke
2021-01-17 22:44:39 +11:00
Nigel Tao
621ea5adf3
Have examples use overwrite_instead_of_blend
2020-05-14 21:20:31 +10:00
Nigel Tao
2db88dd98e
Fix -Wshadow warnings
2020-04-03 22:13:56 +11:00
Nigel Tao
d60815c93f
Have example/* global variable names start with g_
2020-03-26 14:32:35 +11:00
Nigel Tao
fdac24a425
Rename FOO_BUFFER_SIZE to FOO_BUFFER_ARRAY_SIZE
2020-03-06 21:53:08 +11:00
Nigel Tao
6892095998
Have C programs handle flags consistently
2020-03-03 11:25:18 +11:00
Nigel Tao
1ad5cfac4d
Make wuffs_base__{load,store}_uNNxe public
2020-02-27 10:58:14 +11:00
Nigel Tao
2914bae3b2
Re-format C function signatures
2020-02-26 09:40:30 +11:00
Nigel Tao
3fd6aca365
Change gif workbuf_len worst case from 1 to 0
2020-02-05 17:30:51 +11:00
Nigel Tao
9373749b07
Have example/gifplayer use calloc
2020-01-26 11:54:42 +11:00
Nigel Tao
b781617159
Re-organize example/gifplayer global variables
2020-01-26 11:43:58 +11:00
Nigel Tao
a2d6483b3b
Remove example/gifplayer intermediate pixel buffer
2020-01-26 11:20:55 +11:00
Nigel Tao
071c97769a
Have gifplayer work with uint8_t* buffers
2020-01-26 10:56:01 +11:00
Nigel Tao
1a791217de
Add wuffs_base__pixel_blend type
2020-01-14 09:27:04 +11:00
Nigel Tao
9e802a5f84
Have wuffs_base__pixel_config__set take repr args
2020-01-05 15:34:05 +11:00
Nigel Tao
b666ab06f7
Make wuffs_base__pixel_subsampling a struct
2020-01-05 15:27:11 +11:00
Nigel Tao
4f53f3101f
Make wuffs_base__pixel_format a struct
2020-01-05 14:18:48 +11:00
Nigel Tao
0fa32bd09f
Rename warnings to notes
2020-01-05 13:15:00 +11:00
Nigel Tao
e6db7f6a40
Make wuffs_base__status a struct
2020-01-05 10:48:20 +11:00
Nigel Tao
c50f16e58b
Separate status and status_msg local variables
2020-01-04 11:57:33 +11:00
Nigel Tao
355a95eeea
Add wuffs_base__status__message
2019-12-15 13:31:17 +11:00
Nigel Tao
9557d89c56
Add example/gifplayer/README.md
2019-11-07 15:33:50 +11:00
Nigel Tao
498b7138f3
Remove "static const uint32_t etc" from cgen
...
They trigger compiler warnings (-Wunused-const-variable) precisely
because they're unused.
2019-11-02 12:15:01 +11:00
Nigel Tao
050bca9120
Have example/gifplayer show partial results
2019-09-14 08:33:07 +10:00
Nigel Tao
aa846d2dd7
Remove io_{reader,writer} C types
2019-07-06 17:23:34 +10:00
Nigel Tao
1e4f86cfa0
Have example/gifplayer use frame background colors
2019-06-01 09:01:44 +10:00
Nigel Tao
929d36d877
Update example/gifplayer for quirk rename
2019-05-26 17:46:45 +10:00
Nigel Tao
31a2bc918e
Let GIF decode an opaque but non-black background
2019-05-21 08:53:35 +10:00
Nigel Tao
7e384e079e
Take some unistd.h dependencies out of examples
2019-03-09 11:06:26 +11:00
Nigel Tao
c4b8a6a4cc
Don't use designated initializers
...
Some C/C++ compilers, such as MSVC, don't always support them. They're
also not supported by GCC's "g++ -std=c++11 -Wpedantic".
2019-03-09 10:08:00 +11:00
Nigel Tao
53760ce0fd
Call initialize instead of check_wuffs_version
2019-02-16 14:18:25 +11:00
Nigel Tao
670b45be53
Add some "horizontal rule" comment lines
2019-02-02 08:10:08 +11:00
Nigel Tao
278200f560
Fix example for initialize method name change
2019-01-26 16:59:01 +11:00
Nigel Tao
d4be1fdf72
Add some #ifndef's to the examples
2018-12-29 13:28:01 +11:00
Nigel Tao
dd94ad3821
Rename z variable to status, in C code
2018-12-28 16:14:03 +11:00
Nigel Tao
04c91f1410
Generate .c files instead of .h files
...
The files' contents haven't changed (other than some relative #include's
that refer to other .c files).
Some build systems have difficulty recognizing .h files as things to be
compiled, instead of just things referred to by things to be compiled.
2018-12-22 15:29:00 +11:00
Nigel Tao
529ebb0a61
Introduce binary alpha
2018-12-22 08:48:49 +11:00