Commit Graph
89 Commits
Author SHA1 Message Date
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
Nigel Tao 5764f77913 Have std/png produce PIXEL_FORMAT__Y_16LE
Updates #46
2021-04-16 14:34:48 +10:00
Nigel Tao 3b5d8fdfba Use arm_neon_uAxB types and methods 2021-02-24 16:48:09 +11:00
Nigel Tao 62ee403d06 Add arm_neon u8x8, u16x4, etc types 2021-02-24 14:28:45 +11:00
Nigel Tao d4c23d091a Add base.x86_sse42_utility.make_m128i_single_u32 2021-02-18 20:30:59 +11:00
Nigel Tao 8c8f534a5c Add base.x86_sse42_utility 2021-02-18 20:02:58 +11:00
Nigel Tao 869be76fae Rename some std/png c/p variables 2021-02-18 14:32:35 +11:00
Nigel Tao 8c4348b8f6 Rename some std etc_sse42 functions 2021-02-18 13:48:46 +11:00
Nigel Tao 02e0955897 Rename std/png/decode_filter_sse42.wuffs 2021-02-18 13:40:40 +11:00
Nigel Tao 26c7fb941f Un-choosy-fy std/png decoder.filter_2 2021-02-18 13:32:25 +11:00
Nigel Tao 4d2df86a6d Fix some -Werror=conversion false positives 2021-02-16 22:45:50 +11:00
Nigel Tao b77137686d Remove redundant arm_neon zero-initialization 2021-02-16 22:32:06 +11:00
Nigel Tao d13039d96e Add std/png decoder.filter_4_distance_?_arm_neon
On a Raspberry Pi 4 (32-bit armv7l) with -march=native and -mfpu=neon
("native" means "armv8-a+crc+simd"):

wuffs_png_decode_filt_4_dist_3/clang9                      180MB/s ± 0%    217MB/s ± 0%   +20.57%  (p=0.008 n=5+5)
wuffs_png_decode_filt_4_dist_4/clang9                      161MB/s ± 0%    287MB/s ± 0%   +78.75%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/clang9                   99.1MB/s ± 0%   99.4MB/s ± 0%    +0.27%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   123MB/s ± 0%    165MB/s ± 0%   +33.61%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   112MB/s ± 0%    146MB/s ± 0%   +29.64%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang9                 93.1MB/s ± 0%   93.2MB/s ± 0%    +0.15%  (p=0.040 n=5+5)

wuffs_png_decode_filt_4_dist_3/gcc8                       80.5MB/s ± 0%  211.7MB/s ± 0%  +163.12%  (p=0.008 n=5+5)
wuffs_png_decode_filt_4_dist_4/gcc8                       77.3MB/s ± 0%  280.4MB/s ± 0%  +262.98%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc8                     98.1MB/s ± 0%  100.8MB/s ± 0%    +2.78%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc8     114MB/s ± 0%    162MB/s ± 0%   +41.95%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc8     103MB/s ± 0%    140MB/s ± 0%   +36.07%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc8                   93.2MB/s ± 0%   94.1MB/s ± 0%    +0.96%  (p=0.008 n=5+5)
2021-02-14 23:53:36 +11:00
Nigel Tao 41825fcaae Add std/png decoder.filter_3_distance_4_arm_neon
On a Raspberry Pi 4 (32-bit armv7l) with -march=native and -mfpu=neon
("native" means "armv8-a+crc+simd"):

wuffs_png_decode_filt_3_dist_4/clang9                      639MB/s ± 0%   906MB/s ± 0%  +41.71%  (p=0.008 n=5+5)
wuffs_png_decode_filt_3_dist_4/gcc8                        656MB/s ± 0%   714MB/s ± 0%   +8.89%  (p=0.008 n=5+5)
2021-02-14 22:12:48 +11:00
Nigel Tao 435330494e Add std/png decoder.filter_1_distance_4_arm_neon
On a Raspberry Pi 4 (32-bit armv7l) with -march=native and -mfpu=neon
("native" means "armv8-a+crc+simd"):

wuffs_png_decode_filt_1_dist_4/clang9                     1.09GB/s ± 1%  1.42GB/s ± 0%  +30.50%  (p=0.008 n=5+5)
wuffs_png_decode_filt_1_dist_4/gcc8                        859MB/s ± 0%   891MB/s ± 0%   +3.66%  (p=0.008 n=5+5)
2021-02-14 21:43:56 +11:00
Nigel Tao 77d5fa01e5 Have std/png decode 16-bit depth images 2021-02-06 23:41:37 +11:00
Nigel Tao d8d951b729 Remove std/png tricky field 2021-02-05 23:06:49 +11:00
Nigel Tao 0a1b8ddf78 Factor out std/png/decode_swizzle_fallback.wuffs 2021-02-05 22:59:26 +11:00
Nigel Tao f1a8019f41 Drop std/png filter_and_swizzle_low_bit_depth 2021-02-05 22:56:55 +11:00
Nigel Tao baad01d50f Have std/png decode interlaced PNG images 2021-02-05 22:53:05 +11:00
Nigel Tao 4053c2abe6 Refactor some std/png internals 2021-02-03 22:08:26 +11:00
Nigel Tao 4942324f25 Swizzler support src_pixfmt = PIXEL_FORMAT__Y_16BE
Binary size, before:
30800 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
32424 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
56200 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
56152 gen/lib/c/gcc-static/wuffs-base-pixconv.o

After:
33416 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
35120 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
59504 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
59440 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2021-02-03 13:11:22 +11:00
Nigel Tao e77e16cd98 Add fact for "lhs = x[i .. j]" for constant i, j 2021-02-02 22:53:02 +11:00
Nigel Tao 10146b75dd Drop old facts after an impure function call 2021-02-02 22:11:45 +11:00
Nigel Tao f1a27fd980 Tweak std/png's swizzle_low_bit_depth scratch use 2021-02-01 22:48:01 +11:00
Nigel Tao 4d8e179279 Have std/png process the tRNS chunk 2021-02-01 21:34:28 +11:00
Nigel Tao a4d818699a Have std/png support low bit depths 2021-01-29 22:44:27 +11:00
Nigel Tao 0e76de7c65 Add std/png bench comment for the roll back 2021-01-25 10:12:32 +11:00
Nigel Tao 7de3742121 Roll back 'png filter_1_distance_? use more SIMD'
See the previous commit for the rationale.
2021-01-25 10:08:33 +11:00
Nigel Tao 1660f92686 Have std/png filter_1_distance_? use more SIMD
This commit will soon be followed by a rollback, but it is committed
anyway so that we can refer to these numbers in the git log.

wuffs_png_decode_filt_1_dist_3/clang9  1.82GB/s ± 0%  1.03GB/s ± 0%  -43.49%  (p=0.008 n=5+5)
wuffs_png_decode_filt_1_dist_4/clang9  6.02GB/s ± 0%  5.23GB/s ± 0%  -13.05%  (p=0.008 n=5+5)

wuffs_png_decode_filt_1_dist_3/gcc10   1.82GB/s ± 1%  1.03GB/s ± 0%  -43.36%  (p=0.008 n=5+5)
wuffs_png_decode_filt_1_dist_4/gcc10   5.42GB/s ± 0%  5.13GB/s ± 1%   -5.39%  (p=0.008 n=5+5)
2021-01-25 10:05:33 +11:00
Nigel Tao 8e89a17bb1 Rename std/png/decode_filter_sse128.wuffs 2021-01-24 22:05:40 +11:00
Nigel Tao 73d95387f5 Change some more s/sse128/sse42/ 2021-01-24 22:04:53 +11:00
Nigel Tao 5941e7e5cc Rename sse128/sse128i to x86_sse42/x86_m128i 2021-01-24 21:58:00 +11:00
Nigel Tao 07b5e017e1 Unroll some std/png fallback loops
wuffs_png_decode_filt_1_dist_3/clang9                     1.57GB/s ± 0%   1.84GB/s ± 0%  +16.85%  (p=0.008 n=5+5)
wuffs_png_decode_filt_3_dist_3/clang9                      909MB/s ± 0%   1153MB/s ± 0%  +26.92%  (p=0.008 n=5+5)

wuffs_png_decode_image_40k_24bpp/clang9                    127MB/s ± 0%    129MB/s ± 0%   +1.56%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang9                  128MB/s ± 0%    131MB/s ± 0%   +2.05%  (p=0.008 n=5+5)

wuffs_png_decode_filt_1_dist_3/gcc10                      1.84GB/s ± 0%   1.85GB/s ± 0%     ~     (p=0.095 n=5+5)
wuffs_png_decode_filt_3_dist_3/gcc10                      1.08GB/s ± 0%   1.14GB/s ± 1%   +5.87%  (p=0.008 n=5+5)

wuffs_png_decode_image_40k_24bpp/gcc10                     131MB/s ± 0%    132MB/s ± 0%   +0.46%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10                   131MB/s ± 0%    132MB/s ± 0%   +0.66%  (p=0.008 n=5+5)
2021-01-23 18:25:08 +11:00
Nigel Tao d09788938b Unroll some std/png sse128 loops
wuffs_png_decode_filt_1_dist_3/clang9                     1.57GB/s ± 0%  1.57GB/s ± 0%     ~     (p=0.151 n=5+5)
wuffs_png_decode_filt_1_dist_4/clang9                     4.62GB/s ± 0%  5.87GB/s ± 1%  +26.93%  (p=0.008 n=5+5)
wuffs_png_decode_filt_2_dist_3/clang9                     13.3GB/s ± 0%  13.1GB/s ± 1%   -1.52%  (p=0.008 n=5+5)
wuffs_png_decode_filt_2_dist_4/clang9                     13.3GB/s ± 0%  13.1GB/s ± 1%   -1.50%  (p=0.008 n=5+5)
wuffs_png_decode_filt_3_dist_3/clang9                      910MB/s ± 0%   909MB/s ± 0%     ~     (p=0.095 n=5+5)
wuffs_png_decode_filt_3_dist_4/clang9                     1.78GB/s ± 0%  1.84GB/s ± 0%   +3.65%  (p=0.008 n=5+5)
wuffs_png_decode_filt_4_dist_3/clang9                      542MB/s ± 0%   571MB/s ± 0%   +5.31%  (p=0.016 n=4+5)
wuffs_png_decode_filt_4_dist_4/clang9                      844MB/s ± 0%   819MB/s ± 0%   -3.00%  (p=0.008 n=5+5)

wuffs_png_decode_image_40k_24bpp/clang9                    127MB/s ± 0%   127MB/s ± 0%     ~     (p=0.310 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   326MB/s ± 0%   322MB/s ± 0%   -1.19%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   259MB/s ± 0%   256MB/s ± 0%   -1.31%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang9                  128MB/s ± 0%   128MB/s ± 0%     ~     (p=0.278 n=5+5)

wuffs_png_decode_filt_1_dist_3/gcc10                      1.84GB/s ± 0%  1.84GB/s ± 0%     ~     (p=0.190 n=4+5)
wuffs_png_decode_filt_1_dist_4/gcc10                      3.38GB/s ± 1%  5.41GB/s ± 1%  +59.98%  (p=0.008 n=5+5)
wuffs_png_decode_filt_2_dist_3/gcc10                      8.29GB/s ± 0%  8.30GB/s ± 0%     ~     (p=0.222 n=5+5)
wuffs_png_decode_filt_2_dist_4/gcc10                      8.28GB/s ± 0%  8.30GB/s ± 0%   +0.24%  (p=0.008 n=5+5)
wuffs_png_decode_filt_3_dist_3/gcc10                      1.07GB/s ± 0%  1.08GB/s ± 0%     ~     (p=0.421 n=5+5)
wuffs_png_decode_filt_3_dist_4/gcc10                      2.13GB/s ± 0%  2.36GB/s ± 0%  +10.74%  (p=0.008 n=5+5)
wuffs_png_decode_filt_4_dist_3/gcc10                       587MB/s ± 0%   616MB/s ± 0%   +4.95%  (p=0.016 n=4+5)
wuffs_png_decode_filt_4_dist_4/gcc10                       796MB/s ± 0%   871MB/s ± 0%   +9.44%  (p=0.008 n=5+5)

wuffs_png_decode_image_40k_24bpp/gcc10                     130MB/s ± 0%   131MB/s ± 0%   +0.78%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    320MB/s ± 0%   325MB/s ± 0%   +1.69%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    270MB/s ± 0%   273MB/s ± 0%   +1.30%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10                   131MB/s ± 0%   131MB/s ± 0%   +0.40%  (p=0.008 n=5+5)
2021-01-22 23:25:19 +11:00