Commit Graph
125 Commits
Author SHA1 Message Date
Nigel Tao 782e78a689 std/xz: support BCJ start option 2024-02-12 21:01:27 +11:00
Nigel Tao 6f4db1b138 std/xz: implement apply_filter_06_ia64 2024-02-12 20:15:45 +11:00
Nigel Tao 30133ad4b2 std/xz: implement apply_filter_05_powerpc 2024-02-11 19:10:55 +11:00
Nigel Tao d2a63a7e34 std/xz: implement apply_filter_04_x86 2024-02-11 13:04:29 +11:00
Nigel Tao 76a17ce742 std/xz: implement apply_filter_0a_arm64 2024-02-11 11:42:40 +11:00
Nigel Tao 8b3e598572 std/xz: implement apply_filter_08_armthumb 2024-02-11 11:11:47 +11:00
Nigel Tao 03bb04d80c std/xz: implement apply_filter_09_sparc 2024-02-11 10:54:44 +11:00
Nigel Tao af6c7b56af std/xz: implement apply_filter_07_arm 2024-02-10 21:46:36 +11:00
Nigel Tao 9ef114be43 std/xz: prepare to add BCJ filters 2024-02-09 22:15:09 +11:00
Nigel Tao ab06be047b test/data: add romeo.txt.delta1.xz
It was generated by:
xz -k --delta=dist=1 --lzma2 --stdout romeo.txt > romeo.txt.delta1.xz
2024-01-09 22:40:46 +11:00
Nigel Tao 7fb80a047b test/data: add enwik5 2023-11-19 10:27:47 +11:00
Patrick Georgi f563f32f82 Add SPDX identifier to license headers
SPDX is an ISO standard for describing licenses in a computer readable
format, which is useful when applying license compliance tools and the
like to source code.

In addition to ensuring that the Wuffs C distribution is properly
annotated to the benefit of projects using Wuffs and SPDX-supporting
tools, add it everywhere else where there's a license in this repo for
consistency, too.
2023-10-06 20:52:36 +02:00
Nigel Tao 74a6ea2fcd all: relicense from Apache2 to dual Apache2/MIT
The LICENSE has changed from a single license (Apache2) to a dual
license (Apache2 or MIT, at your option).

If you've previously used Wuffs under the Apache2 license, you are able
to keep doing so. No further action required by you.

The two files listed below (previous releases) are exceptions, as they
are older snapshots, frozen in time. Their license has not changed:
release/c/wuffs-v0.2.c
release/c/wuffs-v0.3.c

Every name in the AUTHORS file, other than Google Inc., has signed
Google's CLA (Contributor License Agreement).
2023-10-06 10:00:59 +11:00
Nigel Tao 721463be95 test/data: add PNGs of truncated-JPEG decodings
"Decoded by wuffs" means as of commit 268b9594.

"Decoded by djpeg" means as of libjpeg-turbo version 3.0.1.
2023-09-16 14:43:19 +10:00
Nigel Tao 45350db8ca test/data: add peacock.*.truncated.jpeg 2023-08-26 10:41:46 +10:00
Nigel Tao 2ca61b521f test/data: add ridiculously-fast.png 2023-06-17 19:50:47 +10:00
Nigel Tao fe5c1f25b8 test/data: add more peacock.*.jpeg files 2023-06-09 21:29:21 +10:00
Nigel Tao 27a3197727 script: add truncate-progressive-jpeg.go
"script/confirm-matches-djpeg.sh test/data/*.jpeg" shows differences on
"test/data/peacock.progressive.scan00[0-8].jpeg".
2023-06-01 22:32:37 +10:00
Nigel Tao 0aad753137 test/data: add peacock.*
"script/confirm-matches-djpeg.sh test/data/*.jpeg" shows a difference on
"test/data/peacock.progressive.jpeg".
2023-05-22 16:11:12 +10:00
Nigel Tao 85b244aa49 std/netpbm: add new package 2023-05-16 16:29:58 +10:00
Nigel Tao d0f0591f64 Add lib/litonlylzma 2022-06-24 13:22:36 +10:00
Nigel Tao 8c33dd503b Tighten std/bzip2 huffman_trees array size 2022-06-10 14:02:17 +10:00
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