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
f5151fa1f9
Remove some obsolete basic tests
2020-01-16 21:21:58 +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
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
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
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
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
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
Nigel Tao
0b1f43834f
Let GIF decode BGR/RGB, not just BGRA/RGBA
2019-06-09 08:42:13 +10:00
Nigel Tao
ba3db0d7e5
Have test/c/std/gif use frame background colors
2019-06-01 09:06:02 +10:00
Nigel Tao
73fcd7e502
Rename wuffs_gif__quirk_background_is_opaque
2019-05-26 17:43:58 +10:00
Nigel Tao
08dd41aa93
Tweak wuffs_gif__quirk_reject_empty_frame
2019-05-26 16:25:01 +10:00
Nigel Tao
143b19c564
Add wuffs_gif__quirk_reject_empty_frame
2019-05-26 13:12:22 +10:00
Nigel Tao
ded9ffb0c0
Add wuffs_gif__quirk_delay_num_decoded_frames
2019-05-26 09:01:20 +10:00
Nigel Tao
5780b406dc
Fix ignore_too_much_pixel_data infinite loop
2019-05-25 12:31:43 +10:00
Nigel Tao
31a2bc918e
Let GIF decode an opaque but non-black background
2019-05-21 08:53:35 +10:00
Nigel Tao
b1ff27fded
Decode multiple graphic controls in a GIF
2019-05-12 22:02:39 +10:00
Nigel Tao
24a2f12c30
Add wuffs_gif__quirk_ignore_too_much_pixel_data
2019-05-04 14:04:28 +10:00
Nigel Tao
746681ea68
Add wuffs_gif__quirk_reject_empty_palette
2019-05-04 13:49:22 +10:00
Nigel Tao
1311445408
Add wuffs_gif__quirk_initial_background_is_opaque
2019-05-04 12:35:37 +10:00
Nigel Tao
941cecca8c
Add wuffs_gif__quirk_image_bounds_are_strict
2019-05-04 12:19:52 +10:00
Nigel Tao
842500d51c
Report ICCP metadata
2019-04-20 16:48:18 +10:00
Nigel Tao
21f2890217
Report image metadata such as ICCP and XMP
2019-04-20 16:33:11 +10:00
Nigel Tao
ffeb2bff63
Split benchmarks for full / partial initialization
2019-02-24 16:54:19 +11:00
Nigel Tao
3c254cb5f5
Rename gif "not enough / too much" data tests
2019-02-24 11:31:37 +11:00
Nigel Tao
917a94b445
Add "gif-pixel-data-none" test
2019-02-24 11:28:11 +11:00
Nigel Tao
dd861416ff
Allow calling pure functions after seeing an error
...
Updates #20
2019-02-24 11:13:51 +11:00
Nigel Tao
045f180a6c
Rename errors from "?msg" to "#msg"
2019-02-23 17:06:24 +11:00
Nigel Tao
8b41881ba7
Rename gif's "too much pixel data"
2019-02-23 14:34:06 +11:00
Nigel Tao
d7f434c6e4
Have the GIF decoder check for "not enough data"
...
Fixes #20
2019-02-23 14:29:16 +11:00