Nigel Tao
27a3197727
script: add truncate-progressive-jpeg.go
...
"script/confirm-matches-djpeg.sh test/data/*.jpeg" shows differences on
"test/data/peacock.progressive.scan00[0-8].jpeg".
2023-06-01 22:32:37 +10:00
Nigel Tao
56fae16567
script: add confirm-matches-djpeg.sh
2023-05-18 10:17:08 +10:00
Nigel Tao
85b244aa49
std/netpbm: add new package
2023-05-16 16:29:58 +10:00
Nigel Tao
8cfe304f3c
std/jpeg: implement Inverse DCT
...
Updates #42
2023-05-08 21:51:47 +10:00
Nigel Tao
6e84987d33
std: change set_quirk_enabled to set_quirk
2023-04-14 21:42:15 +10:00
Nigel Tao
00d5e35865
floatconv: optimize parse_number_f64 fallback
...
The time taken running script/manual-test-parse-number-f64.cc on the
parse-number-fxx-test-data suite falls from 3.565s to 2.491s (a 1.43x
ratio; the inverse is 0.70 = 100% - 30%).
Fixes #113
2023-04-08 14:56:32 +10:00
Nigel Tao
05f0172b93
script/manual-test-truncated-input: re-enable WBMP
2023-04-07 16:06:09 +10:00
Nigel Tao
baac49dca7
script: add manual-test-truncated-input.cc
...
Updates #96
2023-03-27 21:15:38 +11:00
Nigel Tao
a12a807d0e
script/print-image-metadata: fix infinite loop
...
Fixes #107
2023-03-18 14:49:50 +11:00
Nigel Tao
be1f605108
Run gofmt
2022-08-21 21:41:06 +10:00
Nigel Tao
d0f0591f64
Add lib/litonlylzma
2022-06-24 13:22:36 +10:00
Nigel Tao
e1b43cd767
Add test/data/artificial-bzip2/abraca.txt.bz2
2022-06-08 14:04:09 +10:00
Nigel Tao
3ff4bf4674
Add script/print-image-metadata.cc
...
Updates #58
2022-06-03 14:15:13 +10:00
Nigel Tao
89411bc91d
Add lib/nie Go library for decoding NIE images
2022-05-28 16:26:59 +10:00
Nigel Tao
a56dbb3e3b
Tweak script/print-average-pixel.cc output
2022-05-26 14:28:30 +10:00
Nigel Tao
0f98004914
Add script/print-average-pixel.cc
2022-05-25 16:59:13 +10:00
Nigel Tao
68b76a8a56
Implement std/bzip2
2022-05-16 23:35:32 +10:00
Michael Mc Donnell
3fa3928c68
Fix Rust PNG benchmark
...
The Rust PNG benchmark no longer compiles. This is similar to the issue
that was fixed in pull request #68 for the Rust GIF benchmark. A new
version of the png crate was published that broke clean builds. I've
pinned the version to 0.17, which is the newest, and changed the code to
use the new API.
NOTE: Parts of the png crate documentation hasn't been updated to
correctly list the new transformation defaults. The documentation for
the `normalize_to_color8` method does say that the defaults changed from
version 0.16 to 0.17.
2022-01-17 13:36:18 -08:00
Michael Mc Donnell
d17fc6e6eb
Fix Rust GIF benchmark
...
The Rust GIF benchmark no longer compiles. The Cargo.toml file uses a
star to specify the gif crate version. That means a clean compile will
use the latest version even if it has breaking changes. Version 0.11 has
breaking changes which means the benchmark can no longer be compiled
from a clean start.
I fixed the benchmark by pinning the version to 0.11 and updating the
code to use the new API.
2022-01-14 11:01:11 -08:00
Nigel Tao
42de49a938
Have make-artificial.go mark incomplete Huffman
2022-01-09 10:49:38 +11:00
Nigel Tao
92ea631055
Have make-artificial.go check canonical Huffman
2022-01-09 10:41:31 +11:00
Nigel Tao
f86c80e425
Fix std/deflate degenerate H-D Huffman table
...
RFC 1951 section 3.2.7. "Compression with dynamic Huffman codes
(BTYPE=10)" says, "If only one distance code is used, it is encoded
using one bit, not zero bits; in this case there is a single code length
of one, with one unused code."
I had previously mis-read that excerpt to also require that the sole
distance code was the shortest distance (code 0, a distance of 1).
Fixes #66
2022-01-08 13:57:34 +11:00
Nigel Tao
425eefeb35
Replace "go get" advice with "go install"
...
Fixes #62
2021-12-30 22:58:12 +11:00
Nigel Tao
1d8fb411ba
Let bench-history.sh handle compile/bench failures
2021-11-22 13:12:57 +11:00
Nigel Tao
fe15c471df
Use LANG=C sort for test/nia-checksums-of-data.txt
2021-11-19 17:09:10 +11:00
Nigel Tao
29560a336b
Convert std/png text from Latin-1 to UTF-8
...
Fixes #55
2021-11-17 23:04:49 +11:00
Nigel Tao
6c2a591e84
Let script/make-artificial.go generate PNG files
2021-11-16 11:08:04 +11:00
Nigel Tao
c19e3b1cab
Add script/extract-nia-frames.go
2021-11-11 11:47:08 +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
f40ef01244
Have make-red-blue-gradient use iCCP profile name
2021-10-31 15:35:14 +11:00
Nigel Tao
d557bc3836
Embiggen test/data/red-blue-gradient.*.png
2021-10-22 09:23:49 +11:00
Nigel Tao
6ea3144379
Add test/data/checkerboard.*.png
2021-10-20 09:58:42 +11:00
Nigel Tao
e6733aec19
Add test/data/red-blue-gradient.dcip3d65.png
2021-10-15 11:29:26 +11:00
Nigel Tao
dbc209dd7e
Add test/data/red-blue-gradient.*.png
2021-10-14 15:58:03 +11:00
Nigel Tao
62125d8967
Add test/nia-checksums-of-data.txt
2021-10-07 16:49:38 +11:00
Nigel Tao
6fb7697b4a
Have scripts use WUFFS_CONFIG__STATIC_FUNCTIONS
2021-10-07 14:36:35 +11:00
Nigel Tao
75faea996d
Add parse "122.416294033786585" test case
2021-08-22 16:02:44 +10:00
Nigel Tao
226c476994
Remove calls to Go's deprecated "io/ioutil"
2021-08-22 11:17:34 +10:00
Nigel Tao
788479dd64
Run "gofmt -w ." for new "//go:build" lines
2021-08-22 10:53:06 +10:00
Nigel Tao
d3c7d103ca
Update script/*.go module dependencies
2021-08-22 10:49:18 +10:00
Nigel Tao
816475b285
Add "b" (for "binary") to fopen calls
...
Updates #50
2021-07-07 20:28:35 +10:00
Nigel Tao
a51867dc63
Fix "forseen" typo
2021-05-19 21:34:09 +10:00
Lander Brandt
ab5f974b66
Use iterators for converting RGB to BGRA in the Rust PNG benchmark
2021-04-07 14:34:35 -07:00
Nigel Tao
61635213cd
Add "‼" to "WUFFS C HEADER ENDS HERE" comment
2021-03-25 14:11:23 +11:00
Nigel Tao
7a73708a56
Have script/bench-*-png convert to BGRA
...
On a mid-range x86_64 laptop:
Compared to the previous commit:
go_decode_19k_8bpp 39.3MB/s ± 1% 39.4MB/s ± 1% ~ (p=0.548 n=5+5)
go_decode_40k_24bpp 46.5MB/s ± 1% 46.7MB/s ± 1% ~ (p=0.095 n=5+5)
go_decode_77k_8bpp 78.3MB/s ± 0% 78.3MB/s ± 0% ~ (p=0.286 n=4+5)
go_decode_552k_32bpp_verify_checksum 120MB/s ± 1% 118MB/s ± 0% ~ (p=0.056 n=5+5)
go_decode_4002k_24bpp 50.7MB/s ± 0% 50.5MB/s ± 0% -0.58% (p=0.016 n=5+4)
rust_decode_19k_8bpp 88.3MB/s ± 0% 89.8MB/s ± 0% +1.76% (p=0.008 n=5+5)
rust_decode_40k_24bpp 133MB/s ± 0% 122MB/s ± 0% -8.58% (p=0.008 n=5+5)
rust_decode_77k_8bpp 180MB/s ± 0% 158MB/s ± 0% -12.04% (p=0.008 n=5+5)
rust_decode_552k_32bpp_verify_checksum 146MB/s ± 0% 136MB/s ± 0% -6.59% (p=0.016 n=4+5)
rust_decode_4002k_24bpp 134MB/s ± 0% 122MB/s ± 0% -9.02% (p=0.008 n=5+5)
Compared to libpng (the C library):
libpng_decode_19k_8bpp 58.0MB/s ± 0% 1.00x
libpng_decode_40k_24bpp 73.1MB/s ± 0% 1.00x
libpng_decode_77k_8bpp 177MB/s ± 0% 1.00x
libpng_decode_552k_32bpp_verify_checksum 146MB/s ± 0% 1.00x
libpng_decode_4002k_24bpp 104MB/s ± 0% 1.00x
go_decode_19k_8bpp/go1.16 39.4MB/s ± 1% 0.68x
go_decode_40k_24bpp/go1.16 46.7MB/s ± 1% 0.64x
go_decode_77k_8bpp/go1.16 78.3MB/s ± 0% 0.44x
go_decode_552k_32bpp_verify_checksum/go1.16 118MB/s ± 0% 0.81x
go_decode_4002k_24bpp/go1.16 50.5MB/s ± 0% 0.49x
rust_decode_19k_8bpp/rust1.48 89.8MB/s ± 0% 1.55x
rust_decode_40k_24bpp/rust1.48 122MB/s ± 0% 1.67x
rust_decode_77k_8bpp/rust1.48 158MB/s ± 0% 0.89x
rust_decode_552k_32bpp_verify_checksum/rust1.48 136MB/s ± 0% 0.93x
rust_decode_4002k_24bpp/rust1.48 122MB/s ± 0% 1.17x
2021-03-25 12:38:02 +11:00
Nigel Tao
5dd7ede975
Add more png benchmarks for alternative mimic libs
...
On a mid-range x86_64 laptop:
"libpng" (Debian's /usr/lib/x86_64-linux-gnu/libpng16.so) numbers are
used as a 1.00x baseline for the other libraries.
(†): libpng's "simplified API" doesn't provide a way to ignore the
checksum. We copy the "verify_checksum" numbers for a 1.00x baseline.
Some of the other libraries don't have the option to ignore or verify
the checksum, always doing only one or the other.
----
libpng_decode_19k_8bpp 58.0MB/s ± 0% 1.00x
libpng_decode_40k_24bpp 73.1MB/s ± 0% 1.00x
libpng_decode_77k_8bpp 177MB/s ± 0% 1.00x
libpng_decode_552k_32bpp_ignore_checksum 146MB/s ± 0% (†)
libpng_decode_552k_32bpp_verify_checksum 146MB/s ± 0% 1.00x
libpng_decode_4002k_24bpp 104MB/s ± 0% 1.00x
----
wuffs_decode_19k_8bpp/clang9 131MB/s ± 0% 2.26x
wuffs_decode_40k_24bpp/clang9 153MB/s ± 0% 2.09x
wuffs_decode_77k_8bpp/clang9 472MB/s ± 0% 2.67x
wuffs_decode_552k_32bpp_ignore_checksum/clang9 370MB/s ± 0% 2.53x
wuffs_decode_552k_32bpp_verify_checksum/clang9 357MB/s ± 0% 2.45x
wuffs_decode_4002k_24bpp/clang9 156MB/s ± 0% 1.50x
wuffs_decode_19k_8bpp/gcc10 136MB/s ± 1% 2.34x
wuffs_decode_40k_24bpp/gcc10 162MB/s ± 0% 2.22x
wuffs_decode_77k_8bpp/gcc10 486MB/s ± 0% 2.75x
wuffs_decode_552k_32bpp_ignore_checksum/gcc10 388MB/s ± 0% 2.66x
wuffs_decode_552k_32bpp_verify_checksum/gcc10 373MB/s ± 0% 2.55x
wuffs_decode_4002k_24bpp/gcc10 164MB/s ± 0% 1.58x
----
libspng_decode_19k_8bpp/clang9 59.3MB/s ± 0% 1.02x
libspng_decode_40k_24bpp/clang9 78.4MB/s ± 0% 1.07x
libspng_decode_77k_8bpp/clang9 189MB/s ± 0% 1.07x
libspng_decode_552k_32bpp_ignore_checksum/clang9 236MB/s ± 0% 1.62x
libspng_decode_552k_32bpp_verify_checksum/clang9 203MB/s ± 0% 1.39x
libspng_decode_4002k_24bpp/clang9 110MB/s ± 0% 1.06x
libspng_decode_19k_8bpp/gcc10 59.6MB/s ± 0% 1.03x
libspng_decode_40k_24bpp/gcc10 77.5MB/s ± 0% 1.06x
libspng_decode_77k_8bpp/gcc10 189MB/s ± 0% 1.07x
libspng_decode_552k_32bpp_ignore_checksum/gcc10 223MB/s ± 0% 1.53x
libspng_decode_552k_32bpp_verify_checksum/gcc10 194MB/s ± 0% 1.33x
libspng_decode_4002k_24bpp/gcc10 109MB/s ± 0% 1.05x
----
lodepng_decode_19k_8bpp/clang9 65.1MB/s ± 0% 1.12x
lodepng_decode_40k_24bpp/clang9 72.1MB/s ± 0% 0.99x
lodepng_decode_77k_8bpp/clang9 222MB/s ± 0% 1.25x
lodepng_decode_552k_32bpp_ignore_checksum/clang9 skipped
lodepng_decode_552k_32bpp_verify_checksum/clang9 162MB/s ± 0% 1.11x
lodepng_decode_4002k_24bpp/clang9 70.5MB/s ± 0% 0.68x
lodepng_decode_19k_8bpp/gcc10 61.1MB/s ± 0% 1.05x
lodepng_decode_40k_24bpp/gcc10 62.5MB/s ± 1% 0.85x
lodepng_decode_77k_8bpp/gcc10 176MB/s ± 0% 0.99x
lodepng_decode_552k_32bpp_ignore_checksum/gcc10 skipped
lodepng_decode_552k_32bpp_verify_checksum/gcc10 139MB/s ± 0% 0.95x
lodepng_decode_4002k_24bpp/gcc10 62.3MB/s ± 0% 0.60x
----
stbimage_decode_19k_8bpp/clang9 75.1MB/s ± 1% 1.29x
stbimage_decode_40k_24bpp/clang9 84.6MB/s ± 0% 1.16x
stbimage_decode_77k_8bpp/clang9 234MB/s ± 0% 1.32x
stbimage_decode_552k_32bpp_ignore_checksum/clang9 162MB/s ± 0% 1.11x
stbimage_decode_552k_32bpp_verify_checksum/clang9 skipped
stbimage_decode_4002k_24bpp/clang9 80.7MB/s ± 0% 0.78x
stbimage_decode_19k_8bpp/gcc10 73.3MB/s ± 0% 1.26x
stbimage_decode_40k_24bpp/gcc10 81.8MB/s ± 0% 1.12x
stbimage_decode_77k_8bpp/gcc10 214MB/s ± 0% 1.21x
stbimage_decode_552k_32bpp_ignore_checksum/gcc10 145MB/s ± 0% 0.99x
stbimage_decode_552k_32bpp_verify_checksum/gcc10 skipped
stbimage_decode_4002k_24bpp/gcc10 79.7MB/s ± 0% 0.77x
----
go_decode_19k_8bpp/go1.16 39.3MB/s ± 1% 0.68x
go_decode_40k_24bpp/go1.16 46.5MB/s ± 1% 0.64x
go_decode_77k_8bpp/go1.16 78.3MB/s ± 0% 0.44x
go_decode_552k_32bpp_ignore_checksum/go1.16 skipped
go_decode_552k_32bpp_verify_checksum/go1.16 120MB/s ± 1% 0.82x
go_decode_4002k_24bpp/go1.16 50.7MB/s ± 0% 0.49x
----
rust_decode_19k_8bpp/rust1.48 88.3MB/s ± 0% 1.52x
rust_decode_40k_24bpp/rust1.48 133MB/s ± 0% 1.82x
rust_decode_77k_8bpp/rust1.48 180MB/s ± 0% 1.02x
rust_decode_552k_32bpp_ignore_checksum/rust1.48 skipped
rust_decode_552k_32bpp_verify_checksum/rust1.48 146MB/s ± 0% 1.00x
rust_decode_4002k_24bpp/rust1.48 134MB/s ± 0% 1.29x
2021-03-24 23:36:48 +11:00
Nigel Tao
85bdcd1e1e
Fix script/benchstat-ratio.go when there's no '/'
2021-03-13 22:40:37 +11:00
Nigel Tao
ee62582609
Tweak some mimic bench names for benchstat-ratio
2021-03-13 13:31:41 +11:00
Nigel Tao
9e4c87b6ab
Add script/benchstat-ratio.go
2021-03-13 00:11:50 +11:00
Nigel Tao
79c7ba0ae9
Add script/print-crc32-x86-sse42-magic-numbers.go
2021-03-07 22:18:52 +11:00