Commit Graph
103 Commits
Author SHA1 Message Date
Nigel Tao 9256fe5e54 Have std/bzip2 check the number of sections
Updates #79
2022-06-08 16:41:46 +10:00
Nigel Tao e1b43cd767 Add test/data/artificial-bzip2/abraca.txt.bz2 2022-06-08 14:04:09 +10:00
Nigel Tao c5e41f0e65 Let std/png report metadata after the first frame
Fixes #58
2022-06-02 16:05:24 +10:00
Nigel Tao f1350825cc Fix cgen for an_array[i .. j] 2022-05-16 23:39:44 +10:00
Nigel Tao d6cece7e32 Add more test/data bzip2 files 2022-05-12 10:15:36 +10:00
Nigel Tao e0afb3dad3 Add test/data/romeo.txt.zst 2022-05-10 11:36:27 +10:00
Nigel Tao 985a756a48 Add test/data/hippopotamus.*.truncated.png 2022-01-23 22:17:59 +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 15c174634e Fix test/data/*.tga orientation
This re-ran imagemagick's convert program, but this time with an
"-auto-orient" option. See
https://issueexplorer.com/issue/ImageMagick/ImageMagick/3844

for i in {color,gray,nodither}; do \
  convert bricks-$i.png -auto-orient bricks-$i.tga; \
  done

The test/data/*.tga files only change in their 18th bytes, from 0x00
(bottom-to-top) to 0x20 (top-to-bottom).

Updates #67
2022-01-14 16:40:05 +11:00
Nigel Tao 546af5a7c3 Let magic_number_guess_fourcc sniff TGA
Updates #67
2022-01-14 14:40:58 +11:00
Nigel Tao c104ae296c Sort degenerate-huffman test Literal/Length table 2022-01-09 10:53:33 +11:00
Nigel Tao 42de49a938 Have make-artificial.go mark incomplete Huffman 2022-01-09 10:49:38 +11:00
Nigel Tao 4aa672af48 Drop "unused" in degenerate-huffman-unused tests 2022-01-08 13:59:53 +11:00
Nigel Tao f86c80e425 Fix std/deflate degenerate H-D Huffman table
RFC 1951 section 3.2.7. "Compression with dynamic Huffman codes
(BTYPE=10)" says, "If only one distance code is used, it is encoded
using one bit, not zero bits; in this case there is a single code length
of one, with one unused code."

I had previously mis-read that excerpt to also require that the sole
distance code was the shortest distance (code 0, a distance of 1).

Fixes #66
2022-01-08 13:57:34 +11:00
Nigel Tao dda01f1a77 Add WUFFS_BASE__FOURCC__QOI definition 2022-01-02 09:10:51 +11:00
Nigel Tao 72d4a9e769 Have std/png pass through EXIF data
Fixes #59
2021-11-26 19:14:30 +11:00
Nigel Tao e44920d382 Let gif "ignore too much" quirk skip lzw errors
The modified test/data/*/*.gif files differ by only one byte:
 00000000  47 49 46 38 39 61 02 00  02 00 81 00 00 00 00 ff  |GIF89a..........|
 00000010  11 00 ff 22 00 ff 33 00  ff 2c 00 00 00 00 02 00  |..."..3..,......|
-00000020  02 00 00 02 02 84 f1 00  3b                       |........;|
+00000020  02 00 00 02 02 84 5d 00  3b                       |......].;|

The etc-good-lzw.gif bits have changed, even though the
etc-good-lzw.etc.txt file only had comments added, due to a Go standard
library change: "compress/lzw: output a Clear code first, per GIF spec"
https://github.com/golang/go/commit/9c1dbdf60edbffeff10f58af21fa055eb0fdd29f

Updates PR #57
Updates https://crbug.com/1270631
2021-11-19 13:30:23 +11:00
Nigel Tao 3b882be500 Rename test/.../pixel-data-too-much.gif* 2021-11-19 11:54:39 +11:00
Nigel Tao 6737565c20 Let std/png decode iTXt, tEXt and zTXt chunks
Updates #55
2021-11-17 11:56:49 +11:00
Nigel Tao 3642d73714 Factor test/data/artificial into many directories 2021-11-16 15:37:57 +11:00
Nigel Tao 37ac4def8e Move some test/data/artificial files up one dir 2021-11-16 15:12:29 +11:00
Nigel Tao 6c2a591e84 Let script/make-artificial.go generate PNG files 2021-11-16 11:08:04 +11:00
Nigel Tao c19e3b1cab Add script/extract-nia-frames.go 2021-11-11 11:47:08 +11:00
Nigel Tao f4c2d4652e Fix test/data/animated-red-blue.apng loop count
The diff of the "hd" hex dump shows that the acTL chunk's nominal loop
count changed from 2 to 3. The 4-byte CRC-32 checksum was also updated.
 00000000  89 50 4e 47 0d 0a 1a 0a  00 00 00 0d 49 48 44 52  |.PNG........IHDR|
 00000010  00 00 00 40 00 00 00 30  08 02 00 00 00 2e 29 eb  |...@...0......).|
 00000020  48 00 00 00 08 61 63 54  4c 00 00 00 04 00 00 00  |H....acTL.......|
-00000030  02 92 c3 07 fc 00 00 00  06 74 52 4e 53 00 00 00  |.........tRNS...|
+00000030  03 e5 c4 37 6a 00 00 00  06 74 52 4e 53 00 00 00  |...7j....tRNS...|
 00000040  00 00 10 73 11 17 f5 00  00 00 1a 66 63 54 4c 00  |...s.......fcTL.|
 00000050  00 00 00 00 00 00 40 00  00 00 30 00 00 00 00 00  |......@...0.....|
 00000060  00 00 00 00 0a 00 64 00  00 80 50 f1 a2 00 00 03  |......d...P.....|
2021-11-07 10:43:32 +11:00
Nigel Tao 0a7168fd64 Add test/data/*.apng 2021-11-05 22:28:08 +11:00
Nigel Tao f40ef01244 Have make-red-blue-gradient use iCCP profile name 2021-10-31 15:35:14 +11:00
Nigel Tao a9a6332be2 Have etc__magic_number_guess_fourcc find ICO 2021-10-22 15:51:44 +11:00
Nigel Tao d557bc3836 Embiggen test/data/red-blue-gradient.*.png 2021-10-22 09:23:49 +11:00
Nigel Tao 35cb4df973 Rename test/data/red-blue-gradient.dcip3d65.png 2021-10-20 19:38:24 +11:00
Nigel Tao 6ea3144379 Add test/data/checkerboard.*.png 2021-10-20 09:58:42 +11:00
Nigel Tao e6733aec19 Add test/data/red-blue-gradient.dcip3d65.png 2021-10-15 11:29:26 +11:00
Nigel Tao dbc209dd7e Add test/data/red-blue-gradient.*.png 2021-10-14 15:58:03 +11:00
Nigel Tao de45ab1d2b Add archive.password-is-asdf.zip
$ zip --password asdf archive.password-is-asdf.zip etc etc
2021-09-21 11:54:02 +10:00
Nigel Tao 9d10438914 Add test/data/bricks-dither.no-ancillary.png 2021-09-06 22:57:55 +10:00
Nigel Tao 77f855206d Have JSON line-comment tokens exclude the "\n"
Before this commit, line-comment token chains included the final "\n"
the way block-comments included the final "*/". The "\n" was mandatory.

However, when parsing with both QUIRK_ALLOW_COMMENT_LINE and
QUIRK_ALLOW_TRAILING_FILLER, input like "123//xyz" (without a "\n"
before the EOF) was rejected before and accepted after this commit.

So that line-comments are consistent, in that they either always or
never include the final "\n", they now never include the final "\n".

An input fragment (parsed with QUIRK_ALLOW_COMMENT_LINE) like
"//abc\n\t\t" was, before this commit, parsed as a 6 byte comment token
and a 2 byte other-filler token. That split is now 5+3.
2021-07-20 14:17:09 +10:00
Nigel Tao b0826d2ab7 Add test/data/archive.*
$ 7z a     archive.7z \
    artificial/0.bytes github-tags.json hello.sh non-ascii/αβ.txt \
    non-ascii/😻.txt pjw-thumbnail.png romeo.txt romeo.txt.gz
$ zip      archive.zip     etc etc
$ rar a    archive.rar     etc etc
$ tar cvf  archive.tar     etc etc
$ tar cvjf archive.tar.bz2 etc etc
$ tar cvzf archive.tar.gz  etc etc
$ lcab etc etc archive.cab

And after curating a data/ directory (without non-ascii/😻.txt):

$ genisoimage -v -J -r -V WUFFS_TEST_DATA_SUBSET -o archive.iso data/
2021-05-03 22:25:35 +10:00
Nigel Tao 5477132298 Have std/png verify PLTE chunk checksums 2021-01-21 20:21:33 +11:00
Nigel Tao 6c2fb9a2fd Tweak test/data/artif*/gif-transparent-index.gif 2020-09-27 00:09:25 +10:00
Nigel Tao 344123b179 Add test/data/artificial/gif-transparent-index.gif 2020-09-25 23:01:43 +10:00
Nigel Tao 4284369bb8 Add TOKEN__VBD__FILLER__PUNCTUATION 2020-08-17 16:48:30 +10:00
Nigel Tao 2de1dfec97 Fix test/data/cbor*tokens losing DEFINITELY_ASCII
The change to the golden file was mistakenly left out of 2397d029 "Fix
std/cbor UTF-8 strings aren't always ASCII".
2020-08-12 23:32:40 +10:00
Nigel Tao 0b7eaf291b Add example/cbor-to-json 2020-08-09 23:03:42 +10:00
Nigel Tao 1adbc9547f Split std/json's QUIRK_ALLOW_BACKSLASH_X in two 2020-08-06 23:28:07 +10:00
Nigel Tao 1e96ef200c Add test/data/cbor-rfc-7049-examples.* 2020-07-27 22:00:28 +10:00
Nigel Tao 168f60a781 Add example/jsonptr -output-format=cbor flag 2020-07-14 15:57:05 +10:00
Nigel Tao b9afc26387 Add TOKEN__VBD__STRING__CHAIN_ETC 2020-07-03 13:36:13 +10:00
Nigel Tao dcb81a85bb Prepare to decode BMP embedding a JPEG or PNG 2020-05-27 13:37:54 +10:00
Nigel Tao 2c643aa704 Add example/convert-to-nia 2020-05-14 21:44:03 +10:00
Nigel Tao f602237490 Tweak NIA/NIA duration wire format
Durations now take 63 bits, not 62, which matches the bit depth of a
non-negative int64_t.

Frame durations now come before, not after, the frame pixels.
2020-05-14 21:11:08 +10:00
Nigel Tao 496e88b6c5 Remove wuffs_base__token__link_prev 2020-04-09 22:11:08 +10:00