Commit Graph
25 Commits
Author SHA1 Message Date
Nigel Tao 64ef0df550 mimiclib: #include <limits.h> and <stdint.h>
Updates #175
2026-07-11 20:18:00 +10: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 d5075c7e94 Push "int i" into "for (int i = etc; etc; etc)" 2021-11-02 14:07:58 +11:00
Nigel Tao cf4aff9ef0 Have testlib image_decoder helpers take quirks 2021-01-21 22:29:30 +11:00
Nigel Tao 10e8ee5e79 Roll back 0c7a8cc0 re do_bench_image_decode
Commit 0c7a8cc029 is "Have
do_bench_image_decode pass a non-NULL dst". Adding a mandatory memcpy to
do_bench_image_decode noticably slowed down the bench numbers. Removing
the memcpy speeds it back up.

wuffs_gif_decode_1k_bw/clang9                278MB/s ± 0%   373MB/s ± 0%  +34.42%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/clang9  85.0MB/s ± 0%  91.1MB/s ± 0%   +7.27%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/clang9   104MB/s ± 0%   114MB/s ± 0%   +9.51%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/clang9             434MB/s ± 0%   449MB/s ± 0%   +3.59%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/clang9          115MB/s ± 0%   120MB/s ± 0%   +4.63%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/clang9                  140MB/s ± 1%   145MB/s ± 0%   +3.16%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/clang9      301MB/s ± 0%   312MB/s ± 0%   +3.62%  (p=0.016 n=5+4)
wuffs_gif_decode_100k_realistic/clang9       125MB/s ± 0%   127MB/s ± 0%   +1.40%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/clang9      128MB/s ± 0%   129MB/s ± 0%   +0.78%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/clang9      128MB/s ± 0%   128MB/s ± 1%     ~     (p=0.151 n=5+5)
wuffs_gif_decode_anim_screencap/clang9       586MB/s ± 0%   671MB/s ± 0%  +14.60%  (p=0.016 n=5+4)

wuffs_gif_decode_1k_bw/gcc10                 271MB/s ± 0%   322MB/s ± 0%  +18.81%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/gcc10   94.8MB/s ± 0%  99.2MB/s ± 1%   +4.64%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/gcc10    116MB/s ± 0%   123MB/s ± 0%   +5.90%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/gcc10              374MB/s ± 0%   382MB/s ± 1%   +2.12%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/gcc10           116MB/s ± 1%   119MB/s ± 0%   +3.09%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/gcc10                   137MB/s ± 0%   139MB/s ± 0%   +1.46%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/gcc10       286MB/s ± 0%   293MB/s ± 0%   +2.49%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/gcc10        118MB/s ± 0%   119MB/s ± 0%   +0.80%  (p=0.016 n=5+4)
wuffs_gif_decode_1000k_full_init/gcc10       121MB/s ± 0%   121MB/s ± 0%   +0.33%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/gcc10       121MB/s ± 0%   121MB/s ± 0%   +0.28%  (p=0.016 n=5+5)
wuffs_gif_decode_anim_screencap/gcc10        582MB/s ± 0%   659MB/s ± 0%  +13.25%  (p=0.008 n=5+5)

wuffs_png_decode_19k_8bpp/clang9            88.7MB/s ± 0%  94.2MB/s ± 0%   +6.28%  (p=0.008 n=5+5)
wuffs_png_decode_40k_24bpp/clang9            104MB/s ± 0%   108MB/s ± 0%   +3.96%  (p=0.008 n=5+5)
wuffs_png_decode_77k_8bpp/clang9             335MB/s ± 0%   352MB/s ± 0%   +5.29%  (p=0.008 n=5+5)
wuffs_png_decode_552k_32bpp/clang9           118MB/s ± 0%   119MB/s ± 0%   +0.54%  (p=0.008 n=5+5)
wuffs_png_decode_4002k_24bpp/clang9          109MB/s ± 0%   112MB/s ± 0%   +2.36%  (p=0.008 n=5+5)

wuffs_png_decode_19k_8bpp/gcc10             96.7MB/s ± 0%  98.0MB/s ± 0%   +1.36%  (p=0.029 n=4+4)
wuffs_png_decode_40k_24bpp/gcc10             114MB/s ± 0%   115MB/s ± 0%   +0.79%  (p=0.008 n=5+5)
wuffs_png_decode_77k_8bpp/gcc10              316MB/s ± 0%   320MB/s ± 0%   +1.18%  (p=0.016 n=5+4)
wuffs_png_decode_552k_32bpp/gcc10            149MB/s ± 0%   149MB/s ± 0%   +0.17%  (p=0.016 n=5+4)
wuffs_png_decode_4002k_24bpp/gcc10           116MB/s ± 0%   116MB/s ± 0%   +0.09%  (p=0.032 n=5+5)
2020-12-29 21:29:32 +11:00
Nigel Tao 0c7a8cc029 Have do_bench_image_decode pass a non-NULL dst 2020-12-28 15:54:15 +11:00
Nigel Tao 2784613b49 Add n_bytes_out arg to gif bench functions 2020-06-01 13:14:14 +10:00
Nigel Tao 2914bae3b2 Re-format C function signatures 2020-02-26 09:40:30 +11:00
Nigel Tao ffeb2bff63 Split benchmarks for full / partial initialization 2019-02-24 16:54:19 +11:00
Nigel Tao f1c5bb6cb7 Add BGRA GIF benchmark, not just indexed color 2018-12-08 21:24:26 +11:00
Nigel Tao 6fed251b40 Split an io_buffer's fields into data and meta 2018-09-15 08:45:50 +10:00
Nigel Tao 76c6af4ff4 Use some more animated GIF test data 2018-05-10 10:14:07 +10:00
Nigel Tao 97aab37462 Rename buf1, reader1, etc to io_buffer, io_reader
Also remove the unused Buf1, Buf2 and Usize tokens.
2018-04-05 20:49:48 +10:00
Nigel Tao 3c708dfe59 Rename PUFFS to WUFFS, part 7 of N 2017-11-30 18:02:59 +11:00
Nigel Tao 79a94558be Rename PUFFS to WUFFS, part 5 of N 2017-11-30 16:37:20 +11:00
Nigel Tao 94eba81892 Have mimiclib accept both giflib v4 and v5. 2017-11-03 11:35:16 +11:00
Nigel Tao f29c4e278f Follow the pkg__type__method convention for base. 2017-10-21 15:59:08 +11:00
Nigel Tao d4372cb5b8 Change license to Apache 2.
Also remove explicit PATENTS file. The new LICENSE file already
discusses patents.

Note that the Puffs project has not yet been publicly released.
2017-10-12 11:17:41 +11:00
Nigel Tao fe96654119 Rename some tests and benches for consistency. 2017-07-07 12:37:15 +10:00
Nigel Tao 004a583aaf Add a comment about gif_mimic_DGifSlurp. 2017-07-02 13:26:42 +10:00
Nigel Tao 30f9c947f5 Roll back the custom gif_mimic_DGifSlurp function.
See the previous commit for the rationale.
2017-07-02 13:17:36 +10:00
Nigel Tao ab7e0ae795 Add a custom gif_mimic_DGifSlurp function.
This avoids some malloc's of intermediate buffers when using giflib,
i.e. for mimic benchmarks. The numbers don't show a huge difference:

name                          old speed      new speed      delta
gif_mimic_decode_1k/clang      158MB/s ± 0%   158MB/s ± 2%    ~     (p=0.421 n=5+5)
gif_mimic_decode_10k/clang    94.5MB/s ± 0%  93.8MB/s ± 1%  -0.70%  (p=0.016 n=5+5)
gif_mimic_decode_100k/clang    100MB/s ± 0%   100MB/s ± 0%  -0.42%  (p=0.008 n=5+5)
gif_mimic_decode_1000k/clang   102MB/s ± 0%   102MB/s ± 0%  -0.29%  (p=0.016 n=5+5)
gif_mimic_decode_1k/gcc        158MB/s ± 1%   160MB/s ± 0%  +1.34%  (p=0.008 n=5+5)
gif_mimic_decode_10k/gcc      94.3MB/s ± 0%  94.6MB/s ± 0%  +0.36%  (p=0.008 n=5+5)
gif_mimic_decode_100k/gcc      100MB/s ± 0%   101MB/s ± 0%  +0.46%  (p=0.008 n=5+5)
gif_mimic_decode_1000k/gcc     102MB/s ± 0%   103MB/s ± 0%  +0.70%  (p=0.008 n=5+5)

This commit will immediately be followed by a rollback, but it is
committed anyway so that we can refer to these numbers in the git log.
2017-07-02 13:12:45 +10:00
Nigel Tao c06580a4f9 Fix a typo. 2017-07-02 12:53:56 +10:00
Nigel Tao a65e2bacf0 Add mimic tests. 2017-07-02 11:19:23 +10:00