Commit Graph
3313 Commits
Author SHA1 Message Date
Nigel Tao 2422997ee5 Tweak std/bzip2's "inverse of T" description 2022-05-17 00:10:46 +10:00
Nigel Tao 84ef91dda8 Tweak cgen for an_array[i .. j] 2022-05-17 00:00:25 +10:00
Nigel Tao f1350825cc Fix cgen for an_array[i .. j] 2022-05-16 23:39:44 +10:00
Nigel Tao 68b76a8a56 Implement std/bzip2 2022-05-16 23:35:32 +10:00
Nigel Tao 787ff21cc7 Let magic_number_guess_fourcc sniff compression 2022-05-13 11:01:28 +10:00
Nigel Tao fc635d76f7 Add std/bzip2/README.md note about bzip 1 2022-05-13 10:37:36 +10:00
Nigel Tao ce8d08598d Add std/bzip2 package
This is just a placeholder decoder implementation.
2022-05-12 23:52:12 +10:00
Nigel Tao 4c56f5bdb2 Fix png.DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE 2022-05-12 22:30:28 +10:00
Nigel Tao b5f12153db Add std/bzip2/README.md 2022-05-12 22:15:31 +10:00
Nigel Tao d6cece7e32 Add more test/data bzip2 files 2022-05-12 10:15:36 +10:00
Nigel Tao 9c6db2673d Add .clang-format 2022-05-10 11:40:08 +10:00
Nigel Tao e0afb3dad3 Add test/data/romeo.txt.zst 2022-05-10 11:36:27 +10:00
Nigel Tao e9cb3c8b34 Use hd consistently, not xxd, in docs 2022-04-30 13:20:08 +10:00
Nigel Tao 7eaf488bae Fix gifplayer for still images with 0 loop count 2022-04-06 17:45:58 +10:00
Nigel Tao 03fd43cfcc Add "#png: unsupported CgBI extension" status 2022-03-21 14:12:25 +11:00
Nigel Tao a55e0a02a2 Fix test/c/std/json.c -Wunused-but-set-variable 2022-02-08 22:08:14 +11:00
Nigel Tao 23c9de18c6 Update doc/std/image-decoders.md Metadata for v0.3
Fixes #60
2022-02-06 21:38:41 +11:00
Nigel Tao 9719073707 Fix test/c/testlib 'const char *' vs 'char *'
Prior to this commit, `g++ test/c/std/png.c` failed with:
test/c/std/../testlib/testlib.c:107:14: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
...
test/c/std/../testlib/testlib.c:741:5: note: in expansion of macro ‘RETURN_FAIL’
  741 |     RETURN_FAIL("hex_dump: NULL argument");

Likewise, clang++ also failed with:
test/c/std/../testlib/testlib.c:741:5: error: cannot initialize return object of type 'char *' with an rvalue of type 'const char *'
    RETURN_FAIL("hex_dump: NULL argument");

Also run "clang-format-9 -style=Chromium"
2022-02-06 14:31:28 +11:00
Nigel Tao 94736e2eae Add "API Listing" sections to doc/std 2022-02-06 13:38:21 +11:00
Nigel Tao e4d237df89 Add std/tga to doc/std
Updates #67
2022-02-06 13:30:46 +11:00
Nigel Tao dd9679b56e Remove some redundant assignments after yields 2022-01-25 21:33:19 +11:00
Nigel Tao 7b51266642 Remove redundant json decode_comment "while true" 2022-01-25 21:26:27 +11:00
Nigel Tao 5a93c63f0a Tweak json.decoder.decode_comment 2022-01-25 21:24:54 +11:00
Nigel Tao 656c0bdf92 Remove some redundant assignments after yields 2022-01-25 20:37:50 +11:00
Nigel Tao b374b2b34f Tweak json decode_trailer whitespace_length var 2022-01-25 20:36:10 +11:00
Nigel Tao ad46513ded Remove some redundant assignments after yields 2022-01-25 20:25:46 +11:00
Nigel Tao 97eb1290f5 Tweak liveness analysis for if-else chains 2022-01-25 19:40:22 +11:00
Nigel Tao 14f5859311 Prohibit iterate loops inside coroutines 2022-01-25 15:22:56 +11:00
Nigel Tao 79ce1a7b0e Clear livenesses after jumps and returns 2022-01-25 15:04:07 +11:00
Nigel Tao 5ecd84e0ed Have std/png partially decode invalid images 2022-01-25 14:36:31 +11:00
Nigel Tao a4b14a0f17 Simpify std/png "yield short read" loop 2022-01-25 14:29:18 +11:00
Nigel Tao 63d8564b3c Tweak liveness analysis for "while true" loops 2022-01-25 14:21:49 +11:00
Nigel Tao 84d0576419 Tweak liveness analysis for return statements 2022-01-25 14:15:32 +11:00
Nigel Tao 6614ed0e90 Tweak liveness analysis for while loops 2022-01-25 13:58:37 +11:00
Nigel Tao 54646d826d Fix liveness analysis typo for break/continue 2022-01-25 12:56:48 +11:00
Nigel Tao d53f37997f Have std/png decode truncated images
Fixes #71
2022-01-23 22:59:06 +11:00
Nigel Tao 985a756a48 Add test/data/hippopotamus.*.truncated.png 2022-01-23 22:17:59 +11:00
Nigel Tao fa1bf3415e Add std/tga benchmarks
Updates #67
2022-01-21 16:13:07 +11:00
Nigel Tao 48e457204f Add "./build-{example,fuzz}.sh" instructions 2022-01-19 14:58:40 +11:00
Nigel Tao 418847fe94 wuffs gen -version=0.3.0-beta.14 v0.3.0-beta.14 2022-01-19 11:04:21 +11:00
Nigel Tao adfd2965cc Merge pull request #70 from MichaelMcDonnell/fix-rust-png-bench
Fix Rust PNG benchmark
2022-01-18 12:31:29 +11:00
Michael Mc Donnell 3fa3928c68 Fix Rust PNG benchmark
The Rust PNG benchmark no longer compiles. This is similar to the issue
that was fixed in pull request #68 for the Rust GIF benchmark. A new
version of the png crate was published that broke clean builds. I've
pinned the version to 0.17, which is the newest, and changed the code to
use the new API.

NOTE: Parts of the png crate documentation hasn't been updated to
correctly list the new transformation defaults. The documentation for
the `normalize_to_color8` method does say that the defaults changed from
version 0.16 to 0.17.
2022-01-17 13:36:18 -08:00
Nigel Tao 03e6188bea Add Michael Mc Donnell to A+C 2022-01-16 08:34:57 +11:00
Nigel Tao 2f61d7dbd4 Merge pull request #68 from MichaelMcDonnell/fix-rust-gif-bench
Fix Rust GIF benchmark
2022-01-16 08:32:14 +11:00
Nigel Tao c203818556 Have std/tga ignore X-Origin and Y-Origin fields
Updates #67
2022-01-15 15:10:03 +11:00
Nigel Tao 6d35660651 Add fuzz/c/std/tga_fuzzer.c
Updates #67
2022-01-15 14:53:41 +11:00
Nigel Tao c82793a984 Tighten magic_number_guess_fourcc TGA heuristic
Prior to this commit, test/data/cbor-rfc-7049-examples.cbor was
incorrectly sniffed as TGA. /usr/bin/file did this too.

$ file test/data/cbor-rfc-7049-examples.cbor
test/data/cbor-rfc-7049-examples.cbor: Targa image data - Map 59395 x 26
x 15 +6169 +6500 - 2-bit alpha - interleave "@\033"

Updates #67
2022-01-15 14:32:51 +11:00
Nigel Tao ed4d556721 Re-create test/data/bricks-gray.tga
We now convert it from the BMP file, not the PNG file:
$ convert bricks-gray.bmp -auto-orient bricks-gray.tga

The bricks-gray.png file has some gamma correction metadata that meant
that the previous TGA file (when converted to NIA) didn't match the
other bricks-gray.* files. After this commit, they all match:

$ grep bricks-gray test/nia-checksums-of-data.txt
c2bce675 test/data/bricks-gray.bmp
c2bce675 test/data/bricks-gray.gif
c2bce675 test/data/bricks-gray.no-ancillary.png
c2bce675 test/data/bricks-gray.png
c2bce675 test/data/bricks-gray.tga

Updates #67
2022-01-15 14:18:36 +11:00
Nigel Tao fd69133c5d Fix std/tga opaque-ness
Updates #67
2022-01-15 14:11:56 +11:00
Nigel Tao f4002c5b21 Have std/tga decode RLE images
Updates #67
2022-01-15 14:10:05 +11:00