Commit Graph
11 Commits
Author SHA1 Message Date
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 4417dcea4e std/jpeg: use default Huffman tables if missing 2023-08-24 16:18:11 +10:00
Nigel Tao 1acd74482a std/jpeg: add more EXTEND comments 2023-06-20 17:33:08 +10:00
Nigel Tao 48fa7182f4 std/jpeg: tweak UNZIG comments 2023-06-19 13:19:24 +10:00
Nigel Tao 36323abf87 std/jpeg: tighten EXTEND element type s/u32/u16/
I'm not sure of the underlying reason for the gcc benchmark anomaly (the
clang numbers don't change).

name                                             old speed     new speed     delta

wuffs_jpeg_decode_19k_8bpp/clang11               227MB/s ± 0%  227MB/s ± 0%     ~     (p=0.151 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/clang11  209MB/s ± 0%  213MB/s ± 0%   +1.62%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/clang11   379MB/s ± 0%  380MB/s ± 0%   +0.13%  (p=0.008 n=5+5)
wuffs_jpeg_decode_77k_24bpp/clang11              329MB/s ± 0%  329MB/s ± 0%   +0.06%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/clang11         342MB/s ± 0%  342MB/s ± 0%     ~     (p=0.690 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/clang11         468MB/s ± 0%  469MB/s ± 0%   +0.10%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/clang11            348MB/s ± 0%  348MB/s ± 0%   +0.08%  (p=0.016 n=5+5)

wuffs_jpeg_decode_19k_8bpp/gcc10                 213MB/s ± 0%  213MB/s ± 0%     ~     (p=0.151 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/gcc10    221MB/s ± 0%  246MB/s ± 0%  +11.51%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/gcc10     487MB/s ± 0%  482MB/s ± 0%   -0.98%  (p=0.008 n=5+5)
wuffs_jpeg_decode_77k_24bpp/gcc10                392MB/s ± 0%  392MB/s ± 0%     ~     (p=1.000 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/gcc10           413MB/s ± 0%  412MB/s ± 0%     ~     (p=0.190 n=4+5)
wuffs_jpeg_decode_552k_24bpp_444/gcc10           459MB/s ± 0%  460MB/s ± 0%   +0.09%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/gcc10              419MB/s ± 0%  419MB/s ± 0%   +0.04%  (p=0.008 n=5+5)
2023-06-18 21:35:49 +10:00
Nigel Tao 9b97c27ec6 std/jpeg: tweak UNZIG array
We'll hopefully claw back the performance in a follow-up commit.

name                                             old speed     new speed     delta

wuffs_jpeg_decode_19k_8bpp/clang11               222MB/s ± 0%  224MB/s ± 0%   +1.11%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/clang11  213MB/s ± 0%  210MB/s ± 0%   -1.53%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/clang11   376MB/s ± 0%  378MB/s ± 0%   +0.37%  (p=0.008 n=5+5)
wuffs_jpeg_decode_77k_24bpp/clang11              325MB/s ± 0%  328MB/s ± 0%   +0.66%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/clang11         339MB/s ± 0%  340MB/s ± 0%   +0.46%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/clang11         468MB/s ± 0%  469MB/s ± 0%   +0.27%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/clang11            344MB/s ± 0%  346MB/s ± 0%   +0.37%  (p=0.008 n=5+5)

wuffs_jpeg_decode_19k_8bpp/gcc10                 212MB/s ± 0%  213MB/s ± 0%   +0.46%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/gcc10    246MB/s ± 0%  221MB/s ± 0%   -9.98%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/gcc10     484MB/s ± 0%  484MB/s ± 0%     ~     (p=0.056 n=5+5)
wuffs_jpeg_decode_77k_24bpp/gcc10                390MB/s ± 0%  392MB/s ± 0%   +0.47%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/gcc10           415MB/s ± 0%  414MB/s ± 0%   -0.17%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/gcc10           463MB/s ± 0%  459MB/s ± 0%   -0.78%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/gcc10              420MB/s ± 0%  419MB/s ± 0%   -0.19%  (p=0.008 n=5+5)
2023-06-18 20:57:50 +10:00
Nigel Tao 19e5cccee3 std/jpeg: add an EXTEND look-up table
name                                             old speed     new speed     delta

wuffs_jpeg_decode_19k_8bpp/clang11               223MB/s ± 0%  222MB/s ± 0%  -0.81%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/clang11  208MB/s ± 0%  213MB/s ± 0%  +2.32%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/clang11   375MB/s ± 0%  376MB/s ± 0%  +0.34%  (p=0.016 n=4+5)
wuffs_jpeg_decode_77k_24bpp/clang11              319MB/s ± 0%  325MB/s ± 0%  +1.92%  (p=0.016 n=4+5)
wuffs_jpeg_decode_552k_24bpp_420/clang11         329MB/s ± 0%  339MB/s ± 0%  +3.00%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/clang11         465MB/s ± 0%  468MB/s ± 0%  +0.65%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/clang11            331MB/s ± 0%  344MB/s ± 0%  +4.02%  (p=0.008 n=5+5)

wuffs_jpeg_decode_19k_8bpp/gcc10                 208MB/s ± 0%  212MB/s ± 0%  +1.76%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/gcc10    243MB/s ± 0%  246MB/s ± 0%  +1.09%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/gcc10     479MB/s ± 0%  484MB/s ± 0%  +1.17%  (p=0.008 n=5+5)
wuffs_jpeg_decode_77k_24bpp/gcc10                385MB/s ± 0%  390MB/s ± 0%  +1.40%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/gcc10           407MB/s ± 0%  415MB/s ± 0%  +1.98%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/gcc10           457MB/s ± 0%  463MB/s ± 0%  +1.29%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/gcc10              411MB/s ± 0%  420MB/s ± 0%  +2.06%  (p=0.008 n=5+5)
2023-06-18 18:44:41 +10:00
Nigel Tao 8cfe304f3c std/jpeg: implement Inverse DCT
Updates #42
2023-05-08 21:51:47 +10:00
Nigel Tao c914f66a6c std/jpeg: decode Huffman entropy coded data
Updates #42
2023-05-06 09:47:10 +10:00
Nigel Tao 0ccceece0b std/jpeg: decode SOF, producing the image config
Updates #42
2023-04-24 11:14:54 +10:00