Commit Graph
123 Commits
Author SHA1 Message Date
Nigel Tao 4dfd70928b std: add "get_quirk(key: u32) u64" 2023-07-16 12:04:09 +10:00
Nigel Tao a95f39e2d1 std/png: delete old comment re APNG is unsupported 2023-04-29 12:00:24 +10:00
Nigel Tao bc86394bef base: rename min/max arg to no_more/less_than 2023-04-16 12:12:27 +10:00
Nigel Tao e126c998e0 std: limit supported image dimensions to 0xFF_FFFF 2023-04-16 08:57:55 +10:00
Nigel Tao 6e84987d33 std: change set_quirk_enabled to set_quirk 2023-04-14 21:42:15 +10:00
Nigel Tao ea3fbc37f5 lang: change const array to const roarray 2023-04-10 16:06:10 +10:00
Nigel Tao 49fa501f0d lang/parse: struct private data now needs a "+" 2023-04-09 15:45:06 +10:00
Nigel Tao f5eb38d76e wuffsfmt: indent with 4 spaces (not a tab) 2023-04-09 15:28:07 +10:00
Nigel Tao 9c03b8c71d wuffsfmt: double-indents hanging lines 2023-04-09 15:22:25 +10:00
Nigel Tao 000b0a3445 std/png: decode "truncated input" for short chunks
Updates #101
2023-03-12 19:23:41 +11:00
Nigel Tao 248bddcfd2 std/*image_decoder*: add "#truncated input"
name                                                       old speed      new speed       delta

wuffs_bmp_decode_40k/clang11                               4.36GB/s ± 0%   4.48GB/s ± 0%   +2.74%  (p=0.008 n=5+5)

wuffs_bmp_decode_40k/gcc10                                 4.49GB/s ± 0%   4.50GB/s ± 0%   +0.15%  (p=0.008 n=5+5)

wuffs_gif_decode_1k_bw/clang11                              723MB/s ± 0%    742MB/s ± 0%   +2.64%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/clang11                 177MB/s ± 0%    177MB/s ± 0%     ~     (p=0.841 n=5+5)
wuffs_gif_decode_1k_color_part_init/clang11                 216MB/s ± 0%    217MB/s ± 0%   +0.66%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/clang11                           793MB/s ± 0%    785MB/s ± 0%   -1.04%  (p=0.016 n=4+5)
wuffs_gif_decode_10k_indexed/clang11                        210MB/s ± 0%    209MB/s ± 0%   -0.38%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/clang11                                254MB/s ± 0%    255MB/s ± 0%   +0.37%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/clang11                    568MB/s ± 0%    569MB/s ± 0%   +0.14%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/clang11                     221MB/s ± 0%    221MB/s ± 0%     ~     (p=0.222 n=5+5)
wuffs_gif_decode_1000k_full_init/clang11                    224MB/s ± 0%    224MB/s ± 0%     ~     (p=0.690 n=5+5)
wuffs_gif_decode_1000k_part_init/clang11                    224MB/s ± 0%    224MB/s ± 0%     ~     (p=0.841 n=5+5)
wuffs_gif_decode_anim_screencap/clang11                    1.30GB/s ± 0%   1.30GB/s ± 0%     ~     (p=0.111 n=5+5)

wuffs_gif_decode_1k_bw/gcc10                                638MB/s ± 0%    672MB/s ± 0%   +5.23%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/gcc10                   175MB/s ± 0%    181MB/s ± 0%   +3.03%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/gcc10                   203MB/s ± 0%    209MB/s ± 0%   +3.38%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/gcc10                             798MB/s ± 0%    804MB/s ± 0%   +0.70%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/gcc10                          210MB/s ± 0%    212MB/s ± 0%   +0.84%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/gcc10                                  265MB/s ± 0%    265MB/s ± 0%     ~     (p=0.222 n=5+5)
wuffs_gif_decode_100k_artificial/gcc10                      576MB/s ± 0%    577MB/s ± 0%     ~     (p=0.690 n=5+5)
wuffs_gif_decode_100k_realistic/gcc10                       226MB/s ± 0%    227MB/s ± 0%   +0.21%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/gcc10                      230MB/s ± 0%    231MB/s ± 0%   +0.32%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/gcc10                      230MB/s ± 0%    231MB/s ± 0%   +0.43%  (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/gcc10                      1.32GB/s ± 0%   1.32GB/s ± 0%   +0.18%  (p=0.008 n=5+5)

wuffs_png_decode_image_19k_8bpp/clang11                     267MB/s ± 0%    273MB/s ± 0%   +2.47%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/clang11                    326MB/s ± 0%    327MB/s ± 0%   +0.51%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang11                     954MB/s ± 0%    969MB/s ± 0%   +1.58%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang11   865MB/s ± 0%    864MB/s ± 0%   -0.18%  (p=0.016 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang11   832MB/s ± 0%    831MB/s ± 0%   -0.11%  (p=0.016 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang11                  331MB/s ± 0%    332MB/s ± 0%   +0.18%  (p=0.016 n=5+5)

wuffs_png_decode_image_19k_8bpp/gcc10                       298MB/s ± 0%    292MB/s ± 0%   -2.17%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc10                      352MB/s ± 0%    349MB/s ± 0%   -0.75%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/gcc10                      1.05GB/s ± 0%   1.03GB/s ± 0%   -1.56%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10     950MB/s ± 0%    949MB/s ± 0%     ~     (p=0.310 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10     905MB/s ± 0%    902MB/s ± 0%   -0.35%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10                    360MB/s ± 0%    358MB/s ± 0%   -0.40%  (p=0.008 n=5+5)

wuffs_tga_decode_19k_8bpp/clang11                          7.81GB/s ± 0%   7.90GB/s ± 0%   +1.22%  (p=0.008 n=5+5)
wuffs_tga_decode_77k_24bpp/clang11                         4.34GB/s ± 0%   4.36GB/s ± 0%   +0.59%  (p=0.008 n=5+5)

wuffs_tga_decode_19k_8bpp/gcc10                            7.10GB/s ± 0%   7.13GB/s ± 0%   +0.33%  (p=0.008 n=5+5)
wuffs_tga_decode_77k_24bpp/gcc10                           4.61GB/s ± 0%   4.60GB/s ± 0%   -0.35%  (p=0.008 n=5+5)

Updates #96
2023-02-01 16:36:56 +11:00
Nigel Tao c5e41f0e65 Let std/png report metadata after the first frame
Fixes #58
2022-06-02 16:05:24 +10:00
Nigel Tao 8d03a67e6e Re-do image decoders' call sequence state machine 2022-05-28 15:06:56 +10:00
Nigel Tao 4c56f5bdb2 Fix png.DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE 2022-05-12 22:30:28 +10:00
Nigel Tao 03fd43cfcc Add "#png: unsupported CgBI extension" status 2022-03-21 14:12:25 +11:00
Nigel Tao dd9679b56e Remove some redundant assignments after yields 2022-01-25 21:33:19 +11:00
Nigel Tao 5ecd84e0ed Have std/png partially decode invalid images 2022-01-25 14:36:31 +11:00
Nigel Tao a4b14a0f17 Simpify std/png "yield short read" loop 2022-01-25 14:29:18 +11:00
Nigel Tao d53f37997f Have std/png decode truncated images
Fixes #71
2022-01-23 22:59:06 +11:00
Nigel Tao 38b101d170 Push std/png decoder.tell_me_more goto_done later 2021-11-26 19:46:36 +11:00
Nigel Tao 5d1473a2ca Refactor std/png decoder.tell_me_more 2021-11-26 19:45:42 +11:00
Nigel Tao 72d4a9e769 Have std/png pass through EXIF data
Fixes #59
2021-11-26 19:14:30 +11:00
Nigel Tao 5f6a522563 Add a "while.goto_done" no-op to std/png 2021-11-26 17:26:12 +11:00
Nigel Tao f5c68a13cb Fix std/png for depth-16 grayscale interlaced 2021-11-20 22:54:21 +11:00
Nigel Tao a684928240 Let std/png allow PLTE for RGB, RGBA color types 2021-11-20 15:39:07 +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 e0cdaeb54f Fix std/png tell_me_more minfo with suspensions 2021-11-17 13:04:04 +11:00
Nigel Tao e7ed1dd43e Add std/png tell_me_more while.loop name 2021-11-17 13:01:05 +11:00
Nigel Tao 417b03a0ad Add std/png "#unsupported PNG compression method" 2021-11-17 12:07:44 +11:00
Nigel Tao 0d37acd6f6 Factor out std/png/common_consts.wuffs 2021-11-17 12:01:37 +11:00
Nigel Tao 6737565c20 Let std/png decode iTXt, tEXt and zTXt chunks
Updates #55
2021-11-17 11:56:49 +11:00
Nigel Tao f0c2a40d66 Resize std/png chunk_length field from u64 to u32 2021-11-16 13:06:30 +11:00
Nigel Tao ce9ab13ecd Let std/png decode first fcTL after the last IDAT 2021-11-16 12:55:43 +11:00
Nigel Tao 0045ce49f3 Rename table.row as table.row_u32 2021-11-15 10:49:42 +11:00
Nigel Tao fa56d92410 Clip std/png frame_dirty_rect to frame rect 2021-11-15 10:46:28 +11:00
Nigel Tao 8f1adea523 Hoist subslice out of std/png filter_and_swizzle
On an Intel NUC (Comet Lake, BXNUC10i5FNKPA):

name                                                      old speed      new speed      delta

wuffs_png_decode_image_19k_8bpp/clang9                     274MB/s ± 0%   273MB/s ± 0%  -0.25%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/clang9                    309MB/s ± 0%   308MB/s ± 0%  -0.22%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang9                     985MB/s ± 0%   982MB/s ± 0%  -0.29%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   846MB/s ± 0%   841MB/s ± 0%  -0.56%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   812MB/s ± 0%   808MB/s ± 0%  -0.55%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang9                  320MB/s ± 0%   320MB/s ± 0%  -0.15%  (p=0.008 n=5+5)

wuffs_png_decode_image_19k_8bpp/gcc10                      263MB/s ± 0%   276MB/s ± 0%  +5.00%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc10                     328MB/s ± 0%   333MB/s ± 0%  +1.49%  (p=0.016 n=5+4)
wuffs_png_decode_image_77k_8bpp/gcc10                      950MB/s ± 0%   976MB/s ± 0%  +2.78%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    865MB/s ± 0%   912MB/s ± 0%  +5.45%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    825MB/s ± 0%   868MB/s ± 0%  +5.19%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10                   336MB/s ± 0%   341MB/s ± 0%  +1.37%  (p=0.008 n=5+5)
2021-11-15 10:43:55 +11:00
Nigel Tao 4d64aff554 Rename std/png/decode_swizzle_fallback.wuffs 2021-11-14 19:58:23 +11:00
Nigel Tao a4fa6a2554 Let std/png decode (animated) APNG
The test/nia-checksums-of-data.txt checksums for the *.apng files now
match the (multiple frame) *.gif files. Previously, they matched the
(single frame) *.000000.nie files.

Fixes #41
2021-11-14 18:20:15 +11:00
Nigel Tao 9af2666aec Move std/png first_frame_io_position earlier 2021-11-10 16:52:59 +11:00
Nigel Tao 9c3d27fb43 Fix std/png decode_other_chunk skipping chunks 2021-11-09 22:10:00 +11:00
Nigel Tao e847766b02 Tweak std/png decode_other_chunk if-else chain 2021-11-09 09:05:11 +11:00
Nigel Tao ca76a01ac2 Have std/png support remapped transparency 2021-11-07 09:51:04 +11:00
Nigel Tao 00b329872a Tighten png.INTERLACING type refinement 2021-11-06 09:54:56 +11:00
Nigel Tao 744fbdd732 Have std/png decode iCCP chunks
Updates #39
2021-11-05 16:29:11 +11:00
Nigel Tao db5a407bab Have std/png decode sRGB chunks
Updates #39
2021-10-16 09:27:30 +11:00
Nigel Tao 911049e9f9 Have std/png decode cHRM and gAMA chunks
Updates #39
2021-10-15 15:08:47 +11:00
Nigel Tao d8ad363ef5 Tweak png.decoder.decode_image_config indentation 2021-10-15 13:35:15 +11:00
Nigel Tao f9c029c788 Fix std/png history_position for interlacing 2021-10-07 13:52:40 +11:00
Nigel Tao 28a54baa19 Add io_bind history_position arg 2021-08-15 08:36:14 +10:00
Nigel Tao 3358730f6f Have std/png reject zero width or height 2021-05-11 12:34:19 +10:00