Commit Graph
3106 Commits
Author SHA1 Message Date
Nigel Tao bb7b75ff86 Add Přemysl Eric Janouch to A+C 2021-10-03 13:34:48 +11:00
Nigel Tao 66bcef6fff Merge pull request #54 from pjanx/main
Fix both imageviewers on X.org with DefaultDepth 30
2021-10-03 13:33:29 +11:00
Přemysl Eric Janouch 7ee081f4b9 Add Makefiles to image viewer demos
There doesn't seem to be much of a point in making it difficult
to try out Wuffs's most practical feature.
2021-09-30 12:38:32 +02:00
Přemysl Eric Janouch 6f39b9641b Fix the sdl-imageviewer demo on DefaultDepth 30
Using SDL renderers should make this work reliably
with pratically any root window visual.
2021-09-30 12:35:43 +02:00
Přemysl Eric Janouch 550fabd15d Fix the imageviewer demo on DefaultDepth 30
Using Render compositing should make this work reliably
with pratically any root window visual.
2021-09-30 12:14:51 +02:00
Přemysl Eric Janouch a1d9c6a8e6 Make imageviewer not segfault on XCB errors
Fixing the issue properly doesn't seem worth the effort,
shared memory is ugly, and incremental loading is a lot of code.

Xlib - XCB 1:0
2021-09-30 07:31:45 +02:00
Nigel Tao de45ab1d2b Add archive.password-is-asdf.zip
$ zip --password asdf archive.password-is-asdf.zip etc etc
2021-09-21 11:54:02 +10:00
Nigel Tao c8592d2b7a Remove obsolete comments re s/gAMA/hAMA/ PNG chunk
The one-byte patch was added in commit 88616cc9 but no longer applied as
of commit 54771322.
2021-09-06 23:14:29 +10:00
Nigel Tao 9d10438914 Add test/data/bricks-dither.no-ancillary.png 2021-09-06 22:57:55 +10:00
Nigel Tao 0d57d6a2e1 Add internal/cgen/base/README.md 2021-09-04 15:54:31 +10:00
Nigel Tao 26d9ec41fd Fix some markdown links to /doc/glossary.md 2021-09-04 15:48:25 +10:00
Nigel Tao a66a083e82 Have X86_FAMILY allow 32-bit x86, not just x86_64
Fixes #53
2021-08-22 22:37:48 +10:00
Nigel Tao cb2e49ab09 Rename CPU arch macro s/X86_64/X86_FAMILY/ 2021-08-22 22:23:49 +10:00
Nigel Tao 75faea996d Add parse "122.416294033786585" test case 2021-08-22 16:02:44 +10:00
Nigel Tao 1d19157668 Remove After editing... run "go generate" lines 2021-08-22 12:57:39 +10:00
Nigel Tao bdfee5053c Delete obsolete ".../internal/cgen/data" package 2021-08-22 12:54:07 +10:00
Nigel Tao 2f65d6fc74 Use go:embed instead of ".../internal/cgen/data" 2021-08-22 12:52:52 +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 17b624c038 Bump go.mod from "go 1.13" to "go 1.16" 2021-08-22 09:58:58 +10:00
Nigel Tao 786fc74b92 wuffs gen -version=0.3.0-beta.9 v0.3.0-beta.9 2021-08-15 13:49:26 +10:00
Nigel Tao a86fd7fa79 Fix -Werror=sign-conversion in intconv-submodule.c 2021-08-15 13:48:04 +10:00
Nigel Tao 341dd50800 Add more internal errors to wuffs_aux Cbor, Json 2021-08-15 13:40:17 +10:00
Nigel Tao a83b5cabaf Fix "-(int64_t)0x8000000000000000" undef behavior
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37191
2021-08-15 12:39:01 +10:00
Nigel Tao 8a4f61501b Add NULL-check for io_{read,writ}er.position() 2021-08-15 11:13:26 +10:00
Nigel Tao 592bc14ed1 Have std/deflate allow non-compact dst history
Fixes #52

On a mid-range x86_64 laptop (2016, Skylake):

name                                                      old speed      new speed      delta

wuffs_deflate_decode_1k_full_init/clang9                   101MB/s ± 1%   100MB/s ± 1%   -1.22%  (p=0.000 n=9+9)
wuffs_deflate_decode_1k_part_init/clang9                   119MB/s ± 1%   119MB/s ± 1%     ~     (p=0.139 n=8+9)
wuffs_deflate_decode_10k_full_init/clang9                  221MB/s ± 1%   210MB/s ± 1%   -4.94%  (p=0.000 n=9+9)
wuffs_deflate_decode_10k_part_init/clang9                  225MB/s ± 3%   215MB/s ± 1%   -4.33%  (p=0.000 n=10+8)
wuffs_deflate_decode_100k_just_one_read/clang9             290MB/s ± 0%   284MB/s ± 1%   -2.26%  (p=0.000 n=8+9)
wuffs_deflate_decode_100k_many_big_reads/clang9            188MB/s ± 3%   177MB/s ± 1%   -5.78%  (p=0.000 n=9+10)

wuffs_deflate_decode_1k_full_init/gcc10                    101MB/s ± 0%    97MB/s ± 1%   -3.65%  (p=0.000 n=8+9)
wuffs_deflate_decode_1k_part_init/gcc10                    119MB/s ± 1%   113MB/s ± 2%   -4.65%  (p=0.000 n=9+9)
wuffs_deflate_decode_10k_full_init/gcc10                   214MB/s ± 3%   224MB/s ± 1%   +4.83%  (p=0.000 n=10+10)
wuffs_deflate_decode_10k_part_init/gcc10                   222MB/s ± 1%   231MB/s ± 1%   +4.03%  (p=0.000 n=9+10)
wuffs_deflate_decode_100k_just_one_read/gcc10              281MB/s ± 2%   297MB/s ± 0%   +5.78%  (p=0.000 n=9+9)
wuffs_deflate_decode_100k_many_big_reads/gcc10             184MB/s ± 0%   194MB/s ± 0%   +5.85%  (p=0.000 n=10+8)

mimic_deflate_decode_1k_full_init                          138MB/s ± 1%   138MB/s ± 0%     ~     (p=0.546 n=9+9)
mimic_deflate_decode_10k_full_init                         156MB/s ± 2%   156MB/s ± 0%     ~     (p=0.387 n=9+9)
mimic_deflate_decode_100k_just_one_read                    191MB/s ± 1%   190MB/s ± 2%   -0.94%  (p=0.004 n=9+10)
mimic_deflate_decode_100k_many_big_reads                   147MB/s ± 1%   147MB/s ± 1%     ~     (p=0.356 n=9+10)

wuffs_gzip_decode_10k/clang9                               220MB/s ± 1%   209MB/s ± 1%   -5.29%  (p=0.000 n=10+9)
wuffs_gzip_decode_100k/clang9                              283MB/s ± 2%   279MB/s ± 1%   -1.47%  (p=0.002 n=10+10)

wuffs_gzip_decode_10k/gcc10                                218MB/s ± 1%   214MB/s ± 2%   -1.76%  (p=0.000 n=9+10)
wuffs_gzip_decode_100k/gcc10                               274MB/s ± 0%   264MB/s ± 2%   -3.61%  (p=0.000 n=7+10)

mimic_gzip_decode_10k                                      131MB/s ± 2%   132MB/s ± 0%   +0.81%  (p=0.000 n=10+8)
mimic_gzip_decode_100k                                     156MB/s ± 0%   156MB/s ± 1%     ~     (p=0.423 n=8+9)

wuffs_zlib_decode_10k/clang9                               223MB/s ± 2%   209MB/s ± 2%   -6.41%  (p=0.000 n=10+10)
wuffs_zlib_decode_100k/clang9                              285MB/s ± 0%   280MB/s ± 0%   -1.87%  (p=0.000 n=8+9)

wuffs_zlib_decode_10k/gcc10                                235MB/s ± 0%   215MB/s ± 1%   -8.22%  (p=0.000 n=10+9)
wuffs_zlib_decode_100k/gcc10                               293MB/s ± 0%   268MB/s ± 1%   -8.38%  (p=0.000 n=8+10)

mimic_zlib_decode_10k                                      145MB/s ± 1%   145MB/s ± 1%   -0.45%  (p=0.004 n=9+9)
mimic_zlib_decode_100k                                     175MB/s ± 1%   174MB/s ± 0%     ~     (p=0.055 n=10+8)

wuffs_png_decode_image_19k_8bpp/clang9                     142MB/s ± 1%   152MB/s ± 1%   +6.98%  (p=0.000 n=9+9)
wuffs_png_decode_image_40k_24bpp/clang9                    172MB/s ± 0%   170MB/s ± 0%   -1.63%  (p=0.000 n=8+9)
wuffs_png_decode_image_77k_8bpp/clang9                     504MB/s ± 2%   540MB/s ± 1%   +7.28%  (p=0.000 n=9+10)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   462MB/s ± 1%   470MB/s ± 0%   +1.57%  (p=0.000 n=9+10)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   445MB/s ± 1%   451MB/s ± 0%   +1.49%  (p=0.000 n=8+10)
wuffs_png_decode_image_4002k_24bpp/clang9                  175MB/s ± 3%   175MB/s ± 1%     ~     (p=0.356 n=9+10)

wuffs_png_decode_image_19k_8bpp/gcc10                      150MB/s ± 0%   153MB/s ± 1%   +2.03%  (p=0.000 n=10+10)
wuffs_png_decode_image_40k_24bpp/gcc10                     186MB/s ± 0%   186MB/s ± 0%     ~     (p=0.408 n=10+8)
wuffs_png_decode_image_77k_8bpp/gcc10                      543MB/s ± 0%   542MB/s ± 0%   -0.23%  (p=0.019 n=9+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    478MB/s ± 1%   498MB/s ± 0%   +4.12%  (p=0.000 n=10+9)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    451MB/s ± 4%   476MB/s ± 0%   +5.37%  (p=0.000 n=10+9)
wuffs_png_decode_image_4002k_24bpp/gcc10                   185MB/s ± 2%   190MB/s ± 1%   +2.78%  (p=0.000 n=10+9)

mimic_png_decode_image_19k_8bpp                           63.0MB/s ± 0%  62.9MB/s ± 1%     ~     (p=0.673 n=8+9)
mimic_png_decode_image_40k_24bpp                          78.7MB/s ± 0%  78.9MB/s ± 0%     ~     (p=0.059 n=9+8)
mimic_png_decode_image_77k_8bpp                            192MB/s ± 1%   193MB/s ± 3%   +0.44%  (p=0.028 n=10+9)
mimic_png_decode_image_552k_32bpp_verify_checksum          157MB/s ± 0%   158MB/s ± 1%     ~     (p=0.053 n=10+9)
mimic_png_decode_image_4002k_24bpp                         113MB/s ± 1%   113MB/s ± 1%     ~     (p=0.053 n=10+9)
2021-08-15 10:50:41 +10:00
Nigel Tao f73f95b698 Rename from ast.IOBind to ast.IOManip 2021-08-15 08:40:05 +10:00
Nigel Tao 28a54baa19 Add io_bind history_position arg 2021-08-15 08:36:14 +10:00
Nigel Tao b60a2cacd9 Add io_writer.history_position 2021-08-15 08:19:40 +10:00
Nigel Tao f7b1b87c70 Fix "-Wnarrowing -m32" warning for some fuzzers 2021-08-14 12:49:04 +10:00
Nigel Tao 13f2e44aca Have JSON fuzzer segfault on internal errors 2021-08-13 17:45:23 +10:00
Nigel Tao 128d0386bd Fuzz wuffs_aux::DecodeJson 2021-08-12 23:07:26 +10:00
Nigel Tao 1b9a6cb85b wuffs gen -version=0.3.0-beta.8 v0.3.0-beta.8 2021-07-20 14:21:21 +10:00
Nigel Tao 77f855206d Have JSON line-comment tokens exclude the "\n"
Before this commit, line-comment token chains included the final "\n"
the way block-comments included the final "*/". The "\n" was mandatory.

However, when parsing with both QUIRK_ALLOW_COMMENT_LINE and
QUIRK_ALLOW_TRAILING_FILLER, input like "123//xyz" (without a "\n"
before the EOF) was rejected before and accepted after this commit.

So that line-comments are consistent, in that they either always or
never include the final "\n", they now never include the final "\n".

An input fragment (parsed with QUIRK_ALLOW_COMMENT_LINE) like
"//abc\n\t\t" was, before this commit, parsed as a 6 byte comment token
and a 2 byte other-filler token. That split is now 5+3.
2021-07-20 14:17:09 +10:00
Nigel Tao 40ffa334ee Add more json allow_trailing_comments test cases 2021-07-18 23:27:56 +10:00
Nigel Tao e88e28259e wuffs gen -version=0.3.0-beta.7 v0.3.0-beta.7 2021-07-18 11:36:39 +10:00
Nigel Tao 6a30c1ede0 Inline wuffs_aux::DecodeJson work_buf variable 2021-07-18 11:25:46 +10:00
Nigel Tao 9c07523a84 Have wuffs_aux::DecodeJson consume trailing filler
Prior to this commit, wuffs_aux::DecodeJson would almost always consume
(optional) trailing filler, but in rare coincidences, it might not if a
wuffs_base__suspension__short_write coroutine suspension was needed
between the last token of the actual JSON value and the first token of
the filler after that JSON value.

This commit should change behavior only if the wuffs_aux::DecodeJson
caller had opted into WUFFS_JSON__QUIRK_ALLOW_TRAILING_FILLER or
WUFFS_JSON__QUIRK_EXPECT_TRAILING_NEW_LINE_OR_EOF.

Also remove an unnecessary std::move on a size_t typed value.
2021-07-18 11:12:41 +10:00
Nigel Tao 816475b285 Add "b" (for "binary") to fopen calls
Updates #50
2021-07-07 20:28:35 +10:00
Nigel Tao d0451190ca wuffs gen -version=0.3.0-beta.6 v0.3.0-beta.6 2021-07-05 21:51:37 +10:00
Nigel Tao 3842c519c9 Delete the WUFFS_BASE__FALLTHROUGH macro
Getting it to work on various compilers has been more trouble than it's
worth. The previous commit ignores "-Wimplicit-fallthrough" instead.
2021-07-05 21:40:25 +10:00
Nigel Tao ea50956b5a Ignore "-Wimplicit-fallthrough" 2021-07-05 21:40:25 +10:00
Nigel Tao fd90553a8f Tweak the WUFFS_BASE__FALLTHROUGH macro
When compiling with "-Werror,-Wimplicit-fallthrough", commit c90cc7b6
tweaked WUFFS_BASE__FALLTHROUGH to work with newer clang compilers, when
defined(__cplusplus) is false, but inadvertently broke older clang
compilers, when __has_attribute(fallthrough) is false.

This commit reverts some of c90cc7b6 to handle more cases. The next two
commits will delete the WUFFS_BASE__FALLTHROUGH macro entirely and
render this commit redundant, as the whole business is proving more
trouble than it's worth. But it's checked into the commit history in
case somebody in the future wants to revive WUFFS_BASE__FALLTHROUGH.
2021-07-05 21:40:18 +10:00
Nigel Tao 963a574f7d wuffs gen -version=0.3.0-beta.5 v0.3.0-beta.5 2021-07-02 13:44:55 +10:00
Nigel Tao edd87f0eda Merge pull request #49 from pkasting/main
Fix -Wunreachable-code-aggressive.
2021-06-30 10:10:05 +10:00
Peter Kasting 56d5aa0907 Fix -Wunreachable-code-aggressive.
Bug: chromium:1066980
2021-06-29 12:00:03 -07:00
Nigel Tao 6bfaf0f008 wuffs gen -version=0.3.0-beta.4 v0.3.0-beta.4 2021-06-28 10:11:25 +10:00
Nigel Tao b9a10d051a Fix -Werror=conversion in fundamental-public.h 2021-06-28 10:10:13 +10:00
Nigel Tao 7f93a94e7a Tweak WUFFS_BASE__FALLTHROUGH comment 2021-06-28 10:07:01 +10:00