Commit Graph
754 Commits
Author SHA1 Message Date
Nigel Tao 1ed0f89948 Rename copy_n32_etc to limited_copy_u32_etc 2020-05-27 19:55:06 +10:00
Nigel Tao e74fd729a7 Re-organize internal/cgen/base/io-private.h 2020-05-27 17:06:47 +10:00
Nigel Tao 055e944584 Make cgen io_reader pointers' elements const 2020-05-27 14:28:31 +10:00
Nigel Tao dcb81a85bb Prepare to decode BMP embedding a JPEG or PNG 2020-05-27 13:37:54 +10:00
Nigel Tao 1239280ad8 Roll back 'dst_palette into the pixel_swizzler'
See the previous commit for the rationale.
2020-05-26 14:13:28 +10:00
Nigel Tao 2d8ec9ace9 Roll dst_palette into the pixel_swizzler struct
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.

name                                        old speed      new speed      delta

wuffs_gif_decode_1k_bw/clang5                286MB/s ± 1%   251MB/s ± 0%  -12.11%  (p=0.000 n=10+9)
wuffs_gif_decode_1k_color_full_init/clang5  96.0MB/s ± 0%  88.9MB/s ± 0%   -7.35%  (p=0.000 n=10+10)
wuffs_gif_decode_1k_color_part_init/clang5   119MB/s ± 0%   108MB/s ± 0%   -9.06%  (p=0.000 n=10+8)
wuffs_gif_decode_10k_bgra/clang5             469MB/s ± 1%   438MB/s ± 0%   -6.50%  (p=0.000 n=10+8)
wuffs_gif_decode_10k_indexed/clang5          125MB/s ± 1%   117MB/s ± 1%   -6.78%  (p=0.000 n=9+9)
wuffs_gif_decode_20k/clang5                  153MB/s ± 0%   139MB/s ± 0%   -9.40%  (p=0.000 n=9+9)
wuffs_gif_decode_100k_artificial/clang5      324MB/s ± 0%   304MB/s ± 0%   -6.22%  (p=0.000 n=10+9)
wuffs_gif_decode_100k_realistic/clang5       139MB/s ± 1%   125MB/s ± 1%   -9.69%  (p=0.000 n=9+10)
wuffs_gif_decode_1000k_full_init/clang5      141MB/s ± 0%   126MB/s ± 0%  -10.40%  (p=0.000 n=10+10)
wuffs_gif_decode_1000k_part_init/clang5      141MB/s ± 1%   126MB/s ± 0%  -10.50%  (p=0.000 n=10+8)
wuffs_gif_decode_anim_screencap/clang5       655MB/s ± 0%   617MB/s ± 1%   -5.91%  (p=0.000 n=9+9)

wuffs_gif_decode_1k_bw/gcc7                  299MB/s ± 0%   295MB/s ± 0%   -1.18%  (p=0.000 n=10+8)
wuffs_gif_decode_1k_color_full_init/gcc7    85.2MB/s ± 1%  88.2MB/s ± 0%   +3.58%  (p=0.000 n=10+10)
wuffs_gif_decode_1k_color_part_init/gcc7     104MB/s ± 0%   103MB/s ± 0%   -0.39%  (p=0.001 n=9+10)
wuffs_gif_decode_10k_bgra/gcc7               349MB/s ± 2%   352MB/s ± 0%   +0.77%  (p=0.000 n=9+10)
wuffs_gif_decode_10k_indexed/gcc7            106MB/s ± 0%   106MB/s ± 2%     ~     (p=0.762 n=8+10)
wuffs_gif_decode_20k/gcc7                    133MB/s ± 0%   133MB/s ± 0%     ~     (p=0.258 n=9+9)
wuffs_gif_decode_100k_artificial/gcc7        302MB/s ± 0%   301MB/s ± 1%   -0.41%  (p=0.035 n=10+10)
wuffs_gif_decode_100k_realistic/gcc7         118MB/s ± 1%   118MB/s ± 1%     ~     (p=0.095 n=9+10)
wuffs_gif_decode_1000k_full_init/gcc7        120MB/s ± 1%   119MB/s ± 0%   -0.34%  (p=0.007 n=10+10)
wuffs_gif_decode_1000k_part_init/gcc7        119MB/s ± 1%   119MB/s ± 1%     ~     (p=0.138 n=10+10)
wuffs_gif_decode_anim_screencap/gcc7         640MB/s ± 0%   640MB/s ± 0%     ~     (p=0.905 n=9+10)
2020-05-26 14:07:30 +10:00
Nigel Tao 3afdd91acb Make wuffs_base__load_etc arg const 2020-05-26 13:57:17 +10:00
Nigel Tao bc546b7383 Move more base funcs to the pixconv sub-module
$ ls -l gen/lib/c/*/{lib*,*base*} | awk '{print $5 " " $9}'

Before:
167976 gen/lib/c/clang-5.0-dynamic/libwuffs.so
 13944 gen/lib/c/clang-5.0-dynamic/wuffs-base-core.lo
 11640 gen/lib/c/clang-5.0-dynamic/wuffs-base-pixconv.lo
207150 gen/lib/c/clang-5.0-static/libwuffs.a
 14240 gen/lib/c/clang-5.0-static/wuffs-base-core.o
 12096 gen/lib/c/clang-5.0-static/wuffs-base-pixconv.o
188088 gen/lib/c/gcc-dynamic/libwuffs.so
 13296 gen/lib/c/gcc-dynamic/wuffs-base-core.lo
 27232 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
234766 gen/lib/c/gcc-static/libwuffs.a
 13432 gen/lib/c/gcc-static/wuffs-base-core.o
 27216 gen/lib/c/gcc-static/wuffs-base-pixconv.o

After:
167976 gen/lib/c/clang-5.0-dynamic/libwuffs.so
 11376 gen/lib/c/clang-5.0-dynamic/wuffs-base-core.lo
 14328 gen/lib/c/clang-5.0-dynamic/wuffs-base-pixconv.lo
207270 gen/lib/c/clang-5.0-static/libwuffs.a
 11696 gen/lib/c/clang-5.0-static/wuffs-base-core.o
 14760 gen/lib/c/clang-5.0-static/wuffs-base-pixconv.o
188088 gen/lib/c/gcc-dynamic/libwuffs.so
 10680 gen/lib/c/gcc-dynamic/wuffs-base-core.lo
 29968 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
234886 gen/lib/c/gcc-static/libwuffs.a
 10856 gen/lib/c/gcc-static/wuffs-base-core.o
 29912 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2020-05-26 11:54:36 +10:00
Nigel Tao 4d3a65763e Spin out base-interfaces sub-module
$ ls -l gen/lib/c/*/{lib*,*base*} | awk '{print $5 " " $9}'

Before:
167952 gen/lib/c/clang-5.0-dynamic/libwuffs.so
 20664 gen/lib/c/clang-5.0-dynamic/wuffs-base-core.lo
205656 gen/lib/c/clang-5.0-static/libwuffs.a
 20960 gen/lib/c/clang-5.0-static/wuffs-base-core.o
188064 gen/lib/c/gcc-dynamic/libwuffs.so
 18936 gen/lib/c/gcc-dynamic/wuffs-base-core.lo
232976 gen/lib/c/gcc-static/libwuffs.a
 18920 gen/lib/c/gcc-static/wuffs-base-core.o

After:
167976 gen/lib/c/clang-5.0-dynamic/libwuffs.so
 13944 gen/lib/c/clang-5.0-dynamic/wuffs-base-core.lo
  8128 gen/lib/c/clang-5.0-dynamic/wuffs-base-interfaces.lo
207150 gen/lib/c/clang-5.0-static/libwuffs.a
 14240 gen/lib/c/clang-5.0-static/wuffs-base-core.o
  8128 gen/lib/c/clang-5.0-static/wuffs-base-interfaces.o
188088 gen/lib/c/gcc-dynamic/libwuffs.so
 13296 gen/lib/c/gcc-dynamic/wuffs-base-core.lo
  7384 gen/lib/c/gcc-dynamic/wuffs-base-interfaces.lo
234766 gen/lib/c/gcc-static/libwuffs.a
 13432 gen/lib/c/gcc-static/wuffs-base-core.o
  7192 gen/lib/c/gcc-static/wuffs-base-interfaces.o
2020-05-26 11:43:54 +10:00
Nigel Tao 04ab8868bd Add some more WUFFS_BASE__MAYBE_STATIC's to base 2020-05-26 11:02:31 +10:00
Nigel Tao 092b03cd1e Add WUFFS_CONFIG__MODULE__BASE__ETC sub-modules
$ ls -l gen/lib/c/*/{lib*,*base*} | awk '{print $5 " " $9}'

Before:
167976 gen/lib/c/clang-5.0-dynamic/libwuffs.so
 40824 gen/lib/c/clang-5.0-dynamic/wuffs-base.lo
203306 gen/lib/c/clang-5.0-static/libwuffs.a
 41816 gen/lib/c/clang-5.0-static/wuffs-base.o
188080 gen/lib/c/gcc-dynamic/libwuffs.so
 53976 gen/lib/c/gcc-dynamic/wuffs-base.lo
230002 gen/lib/c/gcc-static/libwuffs.a
 53976 gen/lib/c/gcc-static/wuffs-base.o

After:
168024 gen/lib/c/clang-5.0-dynamic/libwuffs.so
 20664 gen/lib/c/clang-5.0-dynamic/wuffs-base-core.lo
 10784 gen/lib/c/clang-5.0-dynamic/wuffs-base-f64conv.lo
 11640 gen/lib/c/clang-5.0-dynamic/wuffs-base-pixconv.lo
205752 gen/lib/c/clang-5.0-static/libwuffs.a
 20960 gen/lib/c/clang-5.0-static/wuffs-base-core.o
 11024 gen/lib/c/clang-5.0-static/wuffs-base-f64conv.o
 12096 gen/lib/c/clang-5.0-static/wuffs-base-pixconv.o
188128 gen/lib/c/gcc-dynamic/libwuffs.so
 18936 gen/lib/c/gcc-dynamic/wuffs-base-core.lo
 10672 gen/lib/c/gcc-dynamic/wuffs-base-f64conv.lo
 27232 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
232984 gen/lib/c/gcc-static/libwuffs.a
 18920 gen/lib/c/gcc-static/wuffs-base-core.o
 10640 gen/lib/c/gcc-static/wuffs-base-f64conv.o
 27216 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2020-05-25 23:01:11 +10:00
Nigel Tao 43db33a345 Prepare to spin out base submodules 2020-05-25 22:44:29 +10:00
Nigel Tao 00fe18b98e Rename internal/cgen/base/core-* 2020-05-25 13:15:10 +10:00
Nigel Tao f3b9704e4d Rename some color_u32_argb_premul conversion funcs 2020-05-19 23:39:26 +10:00
Nigel Tao c7e5ca1545 Expand supported pixel_swizzler dst+src pixfmt's 2020-05-19 23:27:26 +10:00
Nigel Tao 509b3e7c43 Fix pixel_swizzler dst offset scalar 2020-05-19 23:23:05 +10:00
Nigel Tao 473427c015 Re-organize internal/cgen/base/image-impl.c 2020-05-19 23:21:09 +10:00
Nigel Tao ab257af2cf Let pixel_swizzler blend src_over a nonpremul dst 2020-05-18 10:58:37 +10:00
Nigel Tao d585f9b902 Add more pixel formats to set_color_u32_at 2020-05-16 11:23:44 +10:00
Nigel Tao 9a1b8def46 Tweak pixel_format bits 2020-05-16 10:12:16 +10:00
Nigel Tao f8f07d8e13 Move premul/non-premul conversions to image-public 2020-05-14 21:22:52 +10:00
Nigel Tao ad1cff3921 Add tell_me_more? mechanism 2020-05-12 11:12:39 +10:00
Nigel Tao 9f6c40246f Simplify cgen of empty functions 2020-04-16 09:34:50 +10:00
Nigel Tao 74871344f0 Capitalize Wuffs const names 2020-04-13 15:52:36 +10:00
Nigel Tao 873c6b400a Add alloc functions 2020-04-12 20:34:33 +10:00
Nigel Tao 496e88b6c5 Remove wuffs_base__token__link_prev 2020-04-09 22:11:08 +10:00
Nigel Tao 478d1b817c Add doc/note/tokens.md 2020-04-08 23:31:18 +10:00
Nigel Tao 2db88dd98e Fix -Wshadow warnings 2020-04-03 22:13:56 +11:00
Nigel Tao 1a1f36ce13 Disable clang's -Wunreachable-code warning 2020-04-03 21:57:49 +11:00
Nigel Tao 64dbd00b07 Rename wuffs_base__make_etc_buffer_{read,writ}er 2020-04-02 22:21:36 +11:00
Nigel Tao f515dc0848 Rename io_writer.write_fast_etc 2020-04-02 12:32:40 +11:00
Nigel Tao 3456f39f9d Rename token_writer.write_fast_token 2020-04-02 12:26:57 +11:00
Nigel Tao 293b3c7812 Remove unused token_writer.write_token method 2020-04-02 12:15:50 +11:00
Nigel Tao 462f86675d Add an "extended token" concept 2020-04-02 11:20:45 +11:00
Nigel Tao e2adb87cdd Fix etc__parse_number_f64 goto-crosses-init 2020-03-31 22:28:19 +11:00
Nigel Tao 17944aae67 Optimize wuffs_base__parse_number_f64
name                                          old time/op   new time/op   delta

strconv_parse_number_f64_1_lsh53_add0/clang5    100ns ± 0%    100ns ± 1%     ~     (p=1.000 n=4+5)
strconv_parse_number_f64_1_lsh53_add1/clang5    741ns ± 1%    749ns ± 0%   +1.05%  (p=0.024 n=5+5)
strconv_parse_number_f64_pi_long/clang5         153ns ± 1%    153ns ± 0%     ~     (p=0.238 n=5+4)
strconv_parse_number_f64_pi_short/clang5       62.0ns ± 2%   45.4ns ± 3%  -26.77%  (p=0.008 n=5+5)

strconv_parse_number_f64_1_lsh53_add0/gcc7     96.6ns ± 4%   95.8ns ± 1%     ~     (p=0.794 n=5+5)
strconv_parse_number_f64_1_lsh53_add1/gcc7      757ns ± 0%    752ns ± 0%   -0.63%  (p=0.008 n=5+5)
strconv_parse_number_f64_pi_long/gcc7           151ns ± 3%    162ns ± 0%   +7.43%  (p=0.016 n=5+4)
strconv_parse_number_f64_pi_short/gcc7         55.0ns ± 0%   49.0ns ± 2%  -10.91%  (p=0.000 n=4+5)
2020-03-31 22:20:01 +11:00
Nigel Tao d587c9e4fa Add medium-precision-binary floating point impl
name                                          old time/op   new time/op   delta

strconv_parse_number_f64_1_lsh53_add0/clang5    218ns ± 1%    100ns ± 0%  -54.13%  (p=0.016 n=5+4)
strconv_parse_number_f64_1_lsh53_add1/clang5    716ns ± 2%    741ns ± 1%   +3.46%  (p=0.008 n=5+5)
strconv_parse_number_f64_pi_long/clang5         438ns ± 2%    153ns ± 1%  -65.19%  (p=0.008 n=5+5)
strconv_parse_number_f64_pi_short/clang5        174ns ± 2%     62ns ± 2%  -64.37%  (p=0.008 n=5+5)

strconv_parse_number_f64_1_lsh53_add0/gcc7      221ns ± 1%     97ns ± 4%  -56.25%  (p=0.008 n=5+5)
strconv_parse_number_f64_1_lsh53_add1/gcc7      742ns ± 1%    757ns ± 0%   +2.02%  (p=0.008 n=5+5)
strconv_parse_number_f64_pi_long/gcc7           477ns ± 1%    151ns ± 3%  -68.40%  (p=0.008 n=5+5)
strconv_parse_number_f64_pi_short/gcc7          191ns ± 1%     55ns ± 0%  -71.14%  (p=0.000 n=5+4)
2020-03-31 22:18:54 +11:00
Nigel Tao 3c38f671fa Remove empty "if (coro_susp_point) {}" 2020-03-25 21:24:00 +11:00
Nigel Tao 9e50918718 Add single-quoted strings 2020-03-25 19:41:02 +11:00
Nigel Tao 59eab68360 Fix -Werror=conversion in hexadecimal__decodeN 2020-03-24 17:22:17 +11:00
Nigel Tao d7c72373f3 Add std/json quirk_allow_inf_nan_numbers 2020-03-24 13:58:38 +11:00
Nigel Tao c6b2aded30 Add wuffs_base__hexadecimal__decodeN 2020-03-20 22:48:06 +11:00
Nigel Tao b86373aff5 Add io_reader.peek_u64le_at 2020-03-19 11:33:22 +11:00
Nigel Tao dd8b315a6d Fix cgen for token_writer.write_token 2020-03-18 13:29:12 +11:00
Nigel Tao 9fd96e8e44 Add io_buffer and token_buffer methods 2020-03-17 13:38:37 +11:00
Nigel Tao c3ca77a539 Add WUFFS_BASE__TOKEN__VBD__NUMBER__FORMAT_ETC 2020-03-11 12:06:50 +11:00
Nigel Tao 499ca132f6 Add wuffs_base__parse_number_f64 2020-03-11 11:41:32 +11:00
Nigel Tao 2178dcd4da Fix wuffs_base__utf_8__encode conversion warning 2020-03-04 22:34:11 +11:00
Nigel Tao 757a4bd68c Add more test_strconv_parse_number_u64 test cases 2020-03-04 22:18:56 +11:00
Nigel Tao b9ad34fad3 Add wuffs_base__utf_8__encode 2020-03-03 12:44:01 +11:00