Commit Graph
313 Commits
Author SHA1 Message Date
Nigel Tao ea91e5ab69 Have std/json decode '[' and '{' 2020-02-13 13:01:27 +11:00
Nigel Tao 36857984c7 Add wuffs_base__token methods 2020-02-12 13:51:58 +11:00
Nigel Tao 737e31ff3a Add tokens 2020-02-11 12:02:58 +11:00
Nigel Tao 7a142168be Add std/json 2020-02-11 10:05:53 +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 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 f50e161677 Add image_config_decoder interface test 2020-02-02 20:18:10 +11:00
Nigel Tao 0e833f909a Add WUFFS_BASE__PIXEL_FORMAT__BGR_565 2020-01-28 10:32:40 +11:00
Nigel Tao 1dcb5a9283 Add wbmp.decoder.skip_frame 2020-01-16 21:46:18 +11:00
Nigel Tao f5151fa1f9 Remove some obsolete basic tests 2020-01-16 21:21:58 +11:00
Nigel Tao e2e51786a0 Add more test/data/*.wbmp files 2020-01-16 15:22:01 +11:00
Nigel Tao 4feb641841 Implement wbmp.decoder.decode_frame 2020-01-16 15:02:32 +11:00
Nigel Tao b4ff1bfb7f Add std/wbmp package 2020-01-16 13:06:00 +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 e77c5d7001 Have hasher_u32 test take a filename arg 2020-01-12 11:38:18 +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 72fcc2d94f Add upcast methods 2020-01-10 14:04:07 +11:00
Nigel Tao 9e802a5f84 Have wuffs_base__pixel_config__set take repr args 2020-01-05 15:34:05 +11:00
Nigel Tao b666ab06f7 Make wuffs_base__pixel_subsampling a struct 2020-01-05 15:27:11 +11:00
Nigel Tao 4f53f3101f Make wuffs_base__pixel_format a struct 2020-01-05 14:18:48 +11:00
Nigel Tao 0fa32bd09f Rename warnings to notes 2020-01-05 13:15:00 +11:00
Nigel Tao 0319777cce Have tests print all of status.repr 2020-01-05 12:56:48 +11:00
Nigel Tao 7f1572ca16 Add CHECK_STATUS testlib macro 2020-01-05 12:50:56 +11:00
Nigel Tao 77a5311c4b Add CHECK_STRING testlib macro 2020-01-05 11:19:22 +11:00
Nigel Tao e6db7f6a40 Make wuffs_base__status a struct 2020-01-05 10:48:20 +11:00
Nigel Tao c50f16e58b Separate status and status_msg local variables 2020-01-04 11:57:33 +11:00
Nigel Tao 8ff9cdb9a6 Rename hasher update_u32 method 2019-11-20 21:07:22 +11:00
Nigel Tao 498b7138f3 Remove "static const uint32_t etc" from cgen
They trigger compiler warnings (-Wunused-const-variable) precisely
because they're unused.
2019-11-02 12:15:01 +11:00
Nigel Tao ff7bffcffc Calculate deflate Huffman table worst case size 2019-10-14 09:21:29 +11:00
Nigel Tao 358ad7f918 Add an explicit deflate-etc.deflate.decompressed 2019-10-12 22:05:11 +11:00
Nigel Tao 745b5c41e0 Give test/c/std/gif error messages more context 2019-10-05 11:57:55 +10: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 efb18036cb Add gif-small-frame-interlaced.gif test 2019-10-05 11:40:24 +10:00
Nigel Tao 293a633e8a Clip std/gif output to the image rect 2019-09-28 21:47:56 +10:00
Nigel Tao 851b7561d9 Fix dirty rect for interlaced GIFs 2019-09-28 14:17:42 +10:00
Nigel Tao 15670546bb Let std/deflate decode a degenerate H-D table 2019-09-28 13:23:49 +10:00
Nigel Tao 18763813d5 Support zlib dictionaries 2019-09-28 10:38:30 +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 c36b4d79c4 Add a mimic test for zlib dictionaries 2019-08-11 20:06:29 +10:00
Nigel Tao aa846d2dd7 Remove io_{reader,writer} C types 2019-07-06 17:23:34 +10:00
Nigel Tao f34d189236 Collapse trivial io_{reader,writer} buffer field 2019-07-06 16:47:47 +10:00
Nigel Tao e5f535db4f Remove set_{reader,writer}_limit in test/c code 2019-07-06 08:43:41 +10:00
Nigel Tao 881474be5a Remove "0 means no I/O limit" in tests 2019-07-06 08:41:46 +10:00