Nigel Tao
b1e3a15c08
Add endwhile syntax
2020-02-22 13:11:02 +11:00
Nigel Tao
05b790d088
Refine pixel_format.bits_per_pixel return type
2020-02-08 18:27:38 +11:00
Nigel Tao
b40671ec84
Have wuffsfmt put underscores in long numbers
2020-02-08 18:21:29 +11:00
Nigel Tao
3fd6aca365
Change gif workbuf_len worst case from 1 to 0
2020-02-05 17:30:51 +11:00
Nigel Tao
555e8eaaa3
Add gif.config_decoder (part 2 of 2)
...
This runs script/preprocess-wuffs.go as foreshadowed by the previous
commit 1aa50163 "Add gif.config_decoder (part 1 of 2)".
The new gif.config_decoder type is largely a copy/paste (with minor
edits) of the existing decoder type, but it can decode GIF animation
metadata (e.g. frame timings) without the memory requirements of a
complete GIF decoder (which can also decode pixels). As of this commit,
sizeof(config_decoder) and sizeof(decoder) is 1320 and 65024, a
difference of over 62 KiB.
The trade-off is that binary size increased by around 1.5x or 18K for
the GIF package. Future refactorings might be able to claw that back,
but it might not.
"wuffs genlib; ls -l gen/lib/c/*/*gif* | awk etc" output:
Before:
25904 gen/lib/c/clang-5.0-dynamic/wuffs-std-gif.lo
26424 gen/lib/c/clang-5.0-static/wuffs-std-gif.o
30480 gen/lib/c/gcc-dynamic/wuffs-std-gif.lo
30064 gen/lib/c/gcc-static/wuffs-std-gif.o
After:
41168 gen/lib/c/clang-5.0-dynamic/wuffs-std-gif.lo
42328 gen/lib/c/clang-5.0-static/wuffs-std-gif.o
49040 gen/lib/c/gcc-dynamic/wuffs-std-gif.lo
48304 gen/lib/c/gcc-static/wuffs-std-gif.o
2020-02-05 17:25:39 +11:00
Nigel Tao
1aa501632f
Add gif.config_decoder (part 1 of 2)
...
This commit (part 1) adds script/preprocess-wuffs.go but running it is
deferred for part 2. Part 1 makes no change to the C code (release/c/**
and test/c/**).
2020-02-05 17:22:09 +11:00
Nigel Tao
fc48e65189
Factor out std/gif/common_consts.wuffs
2020-02-03 21:07:47 +11:00
Nigel Tao
7e4dc3bf12
Drop obsolete "foo.min(x:etc)" comment
2020-01-30 15:24:02 +11:00
Nigel Tao
55aedb34f9
Simplify gif.decoder.copy_to_image_buffer bpp calc
2020-01-28 10:37:05 +11:00
Nigel Tao
0e833f909a
Add WUFFS_BASE__PIXEL_FORMAT__BGR_565
2020-01-28 10:32:40 +11:00
Nigel Tao
09ed091fe3
Rename skip / copy_n_etc to skip32 / copy_n32_etc
2020-01-16 22:07:44 +11:00
Nigel Tao
2be1f63806
Remove wuffs_base__frame_config__blend
2020-01-15 10:42:36 +11:00
Nigel Tao
1a791217de
Add wuffs_base__pixel_blend type
2020-01-14 09:27:04 +11:00
Nigel Tao
c8e3a94200
Add base.image_decoder
2020-01-12 12:18:02 +11:00
Nigel Tao
5f8d2da74f
Rename decode_io_writer methods to transform_io
2020-01-11 10:19:25 +11:00
Nigel Tao
4f53f3101f
Make wuffs_base__pixel_format a struct
2020-01-05 14:18:48 +11:00
Nigel Tao
2a894eea2f
Spin out std/gif/decode_quirks.wuffs
2019-11-23 20:47:11 +11:00
Nigel Tao
098cad9c95
Add links to more wire format examples
2019-10-14 09:24:04 +11:00
Nigel Tao
a21ad25bb8
Rename x T to x: T for vars
2019-10-12 21:55:13 +11:00
Nigel Tao
1520a1f345
Rename x T to x: T for fields and func args
2019-10-12 21:49:04 +11:00
Nigel Tao
5b4e3647c0
Reformat x:y as x: y
2019-10-12 21:21:39 +11:00
Nigel Tao
a9ea63ff06
Rename [i:j] to [i .. j], the same as Rust
2019-10-12 21:14:18 +11:00
Nigel Tao
7872a8893b
Rename while:label to while.label
2019-10-12 19:04:32 +11:00
Nigel Tao
d501daddc3
Rename [i..j] to [i ..= j], the same as Rust
2019-10-12 18:40:53 +11:00
Nigel Tao
9089d37578
Clip std/gif replicated rows to the frame rect
...
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17802
2019-10-05 11:54:03 +10:00
Nigel Tao
aaebb17a01
Tweak how std/gif does interlace row replication
2019-10-05 11:45:14 +10:00
Nigel Tao
293a633e8a
Clip std/gif output to the image rect
2019-09-28 21:47:56 +10:00
Nigel Tao
59b2ddf37f
Clamp std/gif dirty rect to the image height
2019-09-28 20:27:27 +10:00
Nigel Tao
2819fb8e3f
Rename some built-in func's arg from x to a
2019-09-28 14:22:48 +10:00
Nigel Tao
851b7561d9
Fix dirty rect for interlaced GIFs
2019-09-28 14:17:42 +10:00
Nigel Tao
ca9015bd2d
Have std/gif replicate interlaced rows
2019-09-14 08:35:50 +10:00
Nigel Tao
f379f7f905
Fix parsing 0 length GIF metadata
2019-08-31 08:20:18 +10:00
Nigel Tao
fbece6d53a
Add std/gif comment about clipping to image rect
2019-08-09 09:38:08 +10:00
Nigel Tao
392c8c544a
Rename null_io_buffer etc to empty_io_buffer
2019-07-13 10:55:51 +10:00
Nigel Tao
4fcba3a760
Replace std/gif's use of since_mark
...
name old speed new speed delta
wuffs_gif_decode_1k_bw/clang5 380MB/s ± 1% 407MB/s ± 1% +7.09% (p=0.000 n=10+10)
wuffs_gif_decode_1k_color_full_init/clang5 137MB/s ± 0% 140MB/s ± 1% +1.87% (p=0.000 n=10+10)
wuffs_gif_decode_1k_color_part_init/clang5 182MB/s ± 1% 185MB/s ± 1% +1.50% (p=0.000 n=10+10)
wuffs_gif_decode_10k_bgra/clang5 736MB/s ± 1% 736MB/s ± 0% ~ (p=0.696 n=10+8)
wuffs_gif_decode_10k_indexed/clang5 199MB/s ± 1% 198MB/s ± 0% -0.45% (p=0.021 n=10+8)
wuffs_gif_decode_20k/clang5 246MB/s ± 0% 244MB/s ± 1% -0.61% (p=0.011 n=10+10)
wuffs_gif_decode_100k_artificial/clang5 541MB/s ± 1% 540MB/s ± 1% ~ (p=0.579 n=10+10)
wuffs_gif_decode_100k_realistic/clang5 222MB/s ± 0% 222MB/s ± 0% ~ (p=0.481 n=10+10)
wuffs_gif_decode_1000k_full_init/clang5 226MB/s ± 1% 225MB/s ± 0% -0.40% (p=0.035 n=10+10)
wuffs_gif_decode_1000k_part_init/clang5 226MB/s ± 0% 226MB/s ± 0% -0.23% (p=0.013 n=10+9)
wuffs_gif_decode_anim_screencap/clang5 1.07GB/s ± 1% 1.07GB/s ± 0% ~ (p=0.089 n=10+10)
wuffs_gif_decode_1k_bw/gcc7 438MB/s ± 1% 459MB/s ± 0% +4.67% (p=0.000 n=10+9)
wuffs_gif_decode_1k_color_full_init/gcc7 136MB/s ± 1% 139MB/s ± 0% +2.25% (p=0.000 n=10+9)
wuffs_gif_decode_1k_color_part_init/gcc7 177MB/s ± 1% 180MB/s ± 1% +1.66% (p=0.000 n=10+10)
wuffs_gif_decode_10k_bgra/gcc7 612MB/s ± 1% 615MB/s ± 1% +0.57% (p=0.022 n=10+9)
wuffs_gif_decode_10k_indexed/gcc7 192MB/s ± 0% 193MB/s ± 1% +0.38% (p=0.022 n=10+9)
wuffs_gif_decode_20k/gcc7 234MB/s ± 0% 234MB/s ± 1% ~ (p=0.631 n=10+10)
wuffs_gif_decode_100k_artificial/gcc7 499MB/s ± 1% 497MB/s ± 1% -0.48% (p=0.011 n=10+10)
wuffs_gif_decode_100k_realistic/gcc7 203MB/s ± 0% 203MB/s ± 0% ~ (p=0.489 n=9+9)
wuffs_gif_decode_1000k_full_init/gcc7 207MB/s ± 0% 206MB/s ± 0% -0.27% (p=0.010 n=8+8)
wuffs_gif_decode_1000k_part_init/gcc7 207MB/s ± 1% 207MB/s ± 1% ~ (p=0.604 n=10+9)
wuffs_gif_decode_anim_screencap/gcc7 1.03GB/s ± 1% 1.03GB/s ± 1% ~ (p=0.968 n=10+9)
2019-07-06 10:21:39 +10:00
Nigel Tao
944b9fb008
Add doc/note/quirks.md
2019-06-29 18:44:41 +10:00
Nigel Tao
4a85e39d87
Rename s/packed/interleaved/ for pixel formats
2019-06-16 11:44:29 +10:00
Nigel Tao
0b1f43834f
Let GIF decode BGR/RGB, not just BGRA/RGBA
2019-06-09 08:42:13 +10:00
Nigel Tao
7e5332cadf
Have swizzler.prepare return unsupported option
2019-06-08 22:27:55 +10:00
Nigel Tao
abaab57cfd
Remove image_config.background_color
2019-06-01 09:07:19 +10:00
Nigel Tao
cf26b93f2f
Re-assign GIF quirk numbers
2019-06-01 08:40:07 +10:00
Nigel Tao
fd72372312
Add wuffs_gif__quirk_first_frame_local_palette_etc
2019-06-01 08:38:30 +10:00
Nigel Tao
bb07118422
Re-assign GIF quirk numbers
2019-05-26 17:45:06 +10:00
Nigel Tao
73fcd7e502
Rename wuffs_gif__quirk_background_is_opaque
2019-05-26 17:43:58 +10:00
Nigel Tao
5cdf3197bd
Add frame_config.background_color
2019-05-26 16:54:37 +10:00
Nigel Tao
08dd41aa93
Tweak wuffs_gif__quirk_reject_empty_frame
2019-05-26 16:25:01 +10:00
Nigel Tao
d41430c4f5
Allow an LZW literal width of 0
2019-05-26 15:52:07 +10:00
Nigel Tao
af4e327a8f
Have set_quirk_enabled check call_sequence == 0
2019-05-26 15:08:45 +10:00
Nigel Tao
143b19c564
Add wuffs_gif__quirk_reject_empty_frame
2019-05-26 13:12:22 +10:00
Nigel Tao
fc9c2916f5
Add more commentary about quirks
2019-05-26 09:27:17 +10:00