Commit Graph
102 Commits
Author SHA1 Message Date
Nigel Tao 6e84987d33 std: change set_quirk_enabled to set_quirk 2023-04-14 21:42:15 +10:00
Nigel Tao 7eaf488bae Fix gifplayer for still images with 0 loop count 2022-04-06 17:45:58 +10:00
Nigel Tao d5075c7e94 Push "int i" into "for (int i = etc; etc; etc)" 2021-11-02 14:07:58 +11:00
Nigel Tao 7f9f37ce5a Have examples use WUFFS_CONFIG__STATIC_FUNCTIONS
Compile time:
$ time ./build-example.sh
Before: user 1m15.750s
After:  user 0m50.343s

Binary size (excluding the statically linked example-toy-genlib):
$ ls -l gen/bin/example-* | awk '{print $5 " " $9}'

Before:
212624 gen/bin/example-cbor-to-json
284192 gen/bin/example-convert-to-nia
344744 gen/bin/example-crc32
184304 gen/bin/example-gifplayer
324952 gen/bin/example-imageviewer
209632 gen/bin/example-json-to-cbor
241432 gen/bin/example-jsonfindptrs
196320 gen/bin/example-jsonptr
309768 gen/bin/example-sdl-imageviewer
200704 gen/bin/example-zcat

After:
 85280 gen/bin/example-cbor-to-json
242216 gen/bin/example-convert-to-nia
344744 gen/bin/example-crc32
 53328 gen/bin/example-gifplayer
282840 gen/bin/example-imageviewer
 95152 gen/bin/example-json-to-cbor
122720 gen/bin/example-jsonfindptrs
 60448 gen/bin/example-jsonptr
267672 gen/bin/example-sdl-imageviewer
 64792 gen/bin/example-zcat

Before total: 2508672
After  total: 1619192
2021-10-04 12:35:32 +11:00
Nigel Tao 2f2bbc6ab0 Rename default github.com branch s/master/main/ 2021-01-25 11:30:15 +11:00
Nigel Tao 2f78804e62 Use more inclusive language 2021-01-23 19:50:47 +11:00
Nigel Tao a1c22caa15 Rename load and store to peek and poke 2021-01-17 22:44:39 +11:00
Nigel Tao 621ea5adf3 Have examples use overwrite_instead_of_blend 2020-05-14 21:20:31 +10:00
Nigel Tao 2db88dd98e Fix -Wshadow warnings 2020-04-03 22:13:56 +11:00
Nigel Tao d60815c93f Have example/* global variable names start with g_ 2020-03-26 14:32:35 +11:00
Nigel Tao fdac24a425 Rename FOO_BUFFER_SIZE to FOO_BUFFER_ARRAY_SIZE 2020-03-06 21:53:08 +11:00
Nigel Tao 6892095998 Have C programs handle flags consistently 2020-03-03 11:25:18 +11:00
Nigel Tao 1ad5cfac4d Make wuffs_base__{load,store}_uNNxe public 2020-02-27 10:58:14 +11:00
Nigel Tao 2914bae3b2 Re-format C function signatures 2020-02-26 09:40:30 +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 9373749b07 Have example/gifplayer use calloc 2020-01-26 11:54:42 +11:00
Nigel Tao b781617159 Re-organize example/gifplayer global variables 2020-01-26 11:43:58 +11:00
Nigel Tao a2d6483b3b Remove example/gifplayer intermediate pixel buffer 2020-01-26 11:20:55 +11:00
Nigel Tao 071c97769a Have gifplayer work with uint8_t* buffers 2020-01-26 10:56:01 +11:00
Nigel Tao 1a791217de Add wuffs_base__pixel_blend type 2020-01-14 09:27:04 +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 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 355a95eeea Add wuffs_base__status__message 2019-12-15 13:31:17 +11:00
Nigel Tao 9557d89c56 Add example/gifplayer/README.md 2019-11-07 15:33:50 +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 050bca9120 Have example/gifplayer show partial results 2019-09-14 08:33:07 +10:00
Nigel Tao aa846d2dd7 Remove io_{reader,writer} C types 2019-07-06 17:23:34 +10:00
Nigel Tao 1e4f86cfa0 Have example/gifplayer use frame background colors 2019-06-01 09:01:44 +10:00
Nigel Tao 929d36d877 Update example/gifplayer for quirk rename 2019-05-26 17:46:45 +10:00
Nigel Tao 31a2bc918e Let GIF decode an opaque but non-black background 2019-05-21 08:53:35 +10:00
Nigel Tao 7e384e079e Take some unistd.h dependencies out of examples 2019-03-09 11:06:26 +11:00
Nigel Tao c4b8a6a4cc Don't use designated initializers
Some C/C++ compilers, such as MSVC, don't always support them. They're
also not supported by GCC's "g++ -std=c++11 -Wpedantic".
2019-03-09 10:08:00 +11:00
Nigel Tao 53760ce0fd Call initialize instead of check_wuffs_version 2019-02-16 14:18:25 +11:00
Nigel Tao 670b45be53 Add some "horizontal rule" comment lines 2019-02-02 08:10:08 +11:00
Nigel Tao 278200f560 Fix example for initialize method name change 2019-01-26 16:59:01 +11:00
Nigel Tao d4be1fdf72 Add some #ifndef's to the examples 2018-12-29 13:28:01 +11:00
Nigel Tao dd94ad3821 Rename z variable to status, in C code 2018-12-28 16:14:03 +11:00
Nigel Tao 04c91f1410 Generate .c files instead of .h files
The files' contents haven't changed (other than some relative #include's
that refer to other .c files).

Some build systems have difficulty recognizing .h files as things to be
compiled, instead of just things referred to by things to be compiled.
2018-12-22 15:29:00 +11:00
Nigel Tao 529ebb0a61 Introduce binary alpha 2018-12-22 08:48:49 +11:00
Nigel Tao 45ab79b451 Allow GIF decoding to non-indexed pixel formats 2018-12-08 16:08:02 +11:00
Nigel Tao fc1002cb89 Implement gif.decoder.workbuf_len
Also relax decode_frame's workbuf length check from not-equals to
less-than.
2018-11-17 21:52:26 +11:00
Nigel Tao f06126c85a Rename color_u32argb; add YCoCg color 2018-11-17 11:43:34 +11:00
Nigel Tao 7be9c39283 Move num_loops out of the image_config
For the GIF format, it isn't necessarily before the first frame.
2018-10-13 17:00:45 +11:00
Nigel Tao 6fed251b40 Split an io_buffer's fields into data and meta 2018-09-15 08:45:50 +10:00
Nigel Tao 180ce5e481 Add wuffs_base__malloc_slice_uxx functions 2018-09-09 21:31:37 +10:00
Nigel Tao 2c7fd8058a Repurpose a pixbuf's plane 3 for the palette 2018-09-08 11:03:22 +10:00