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
e6cc2fe8f0
Implement bmp.decoder.decode_frame
2020-02-07 16:27:04 +11:00
Nigel Tao
8378d9f3b4
Implement bmp.decoder.skip_frame
2020-02-06 13:45:41 +11:00
Nigel Tao
f69f849f11
Implement bmp.decoder.decode_image_config
2020-02-06 13:11:23 +11:00
Nigel Tao
0853a716bb
Add std/bmp
2020-02-06 12:16:12 +11:00
Nigel Tao
096b7146f0
Have wbmp decoder check for "#bad restart"
2020-02-06 11:49:25 +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
149204c14e
Remove wbmp seen_etc fields
2020-01-16 22:18:29 +11:00
Nigel Tao
0d0a74c9a8
Fix wbmp.decoder.skip_frame final call sequence
2020-01-16 22:16:04 +11:00
Nigel Tao
6ef3ffe6c8
Add io_reader.skip
2020-01-16 22:15:33 +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
1dcb5a9283
Add wbmp.decoder.skip_frame
2020-01-16 21:46:18 +11:00
Nigel Tao
47b9dcd118
Have wbmp's restart_frame check call_sequence
2020-01-16 21:15:53 +11:00
Nigel Tao
fdd0675f51
Avoid "-Werror=conversion" build failure
2020-01-16 15:37:52 +11:00
Nigel Tao
4feb641841
Implement wbmp.decoder.decode_frame
2020-01-16 15:02:32 +11:00
Nigel Tao
bec5d6fa5c
Implement wbmp.decoder.decode_frame_config
2020-01-16 14:18:24 +11:00
Nigel Tao
d9958e2524
Add wbmp.decoder base.image_decoder stubs
2020-01-16 14:01:35 +11:00
Nigel Tao
2ae4a8a21c
Add wbmp.decoder.ack_metadata_chunk
2020-01-16 13:45:10 +11:00
Nigel Tao
b4ff1bfb7f
Add std/wbmp package
2020-01-16 13:06:00 +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
92a5bfd7ec
Have various structs implement base.io_transformer
2020-01-11 22:25:31 +11:00
Nigel Tao
5f8d2da74f
Rename decode_io_writer methods to transform_io
2020-01-11 10:19:25 +11:00
Nigel Tao
ea54c2ea11
Add syntax support for implementing interfaces
2020-01-09 15:45:29 +11:00
Nigel Tao
4f53f3101f
Make wuffs_base__pixel_format a struct
2020-01-05 14:18:48 +11:00
Nigel Tao
8c8d9d8b52
Fix "noticable" typo
2019-12-07 11:51:54 +11:00
Nigel Tao
2a894eea2f
Spin out std/gif/decode_quirks.wuffs
2019-11-23 20:47:11 +11:00
Nigel Tao
8ff9cdb9a6
Rename hasher update_u32 method
2019-11-20 21:07:22 +11:00
Nigel Tao
dc1218fec0
Spell std/deflate's "literal/length" consistently
2019-10-14 09:28:28 +11:00
Nigel Tao
098cad9c95
Add links to more wire format examples
2019-10-14 09:24:04 +11:00
Nigel Tao
ff7bffcffc
Calculate deflate Huffman table worst case size
2019-10-14 09:21:29 +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