Commit Graph
139 Commits
Author SHA1 Message Date
Nigel Tao bb2600e423 test/data: add mona-lisa.*
wget -q -O mona-lisa.322x480.jpeg 'https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/322px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg'
convert mona-lisa.322x480.jpeg -resize 32x32 mona-lisa.21x32.png
pngcrush -ow -brute -rem alla mona-lisa.21x32.png
convert mona-lisa.21x32.png mona-lisa.21x32.ppm
cjpeg -quality 50 mona-lisa.21x32.ppm > mona-lisa.21x32.q50.jpeg
cjpeg -quality 90 mona-lisa.21x32.ppm > mona-lisa.21x32.q90.jpeg
etcpack mona-lisa.21x32.ppm mona-lisa.21x32.etc2.pkm
rm mona-lisa.21x32.ppm mona-lisa.322x480.jpeg

The *.th file was manually encoded by uploading mona-lisa.21x32.png to
https://evanw.github.io/thumbhash/ and prepending the magic identifier.
2024-09-06 14:26:38 +10:00
Nigel Tao 78f4e4ccc4 test/data: add official thumbhash PNG renderings 2024-09-06 12:56:00 +10:00
Nigel Tao aa28bb076c test/data: add thumbhash (*.th) files 2024-09-03 10:02:30 +10:00
Nigel Tao bd42fa7af2 base38: reassign alphabet and numbers
It changes from " 0-9?a-z" to ".0-9a-z~". The default or placeholder
changes from " " to "." so it's now always visible. The wildcard changes
from "?" to "~" so it's now sorted last.
2024-08-26 12:30:20 +10:00
Nigel Tao 6a9347843b std/jpeg: ignore too-short COM or APPn markers 2024-08-25 13:46:16 +10:00
Nigel Tao a824c55c3d std/jpeg: allow DHT markers before SOF 2024-08-24 16:13:31 +10:00
Nigel Tao 60e3b8cb1c test/data: add bricks-color.etc1s.pkm 2024-08-23 22:14:33 +10:00
Nigel Tao 96eda2ec0d std/etc2: support transparency 2024-08-18 15:09:51 +10:00
Nigel Tao 4423a0cbbe test/data: add bricks-color.etc?.pkm 2024-08-16 09:21:12 +10:00
Nigel Tao 793ab36569 std/lzip: add new package 2024-03-01 09:52:54 +11:00
Nigel Tao 5b62289c63 test/data: add *.two-concatenated-streams.xz
lo128.dat and hi128.dat were constructed manually, then the
256.bytes.two-concatenated-streams.xz file was constructed by:

xz --keep lo128.dat
xz --keep hi128.dat
cat lo128.dat.xz hi128.dat.xz > 256.bytes.two-concatenated-streams.xz
2024-02-26 22:11:51 +11:00
Nigel Tao 6c71bb229b test/data: add enwik5.block-size-32k.xz
It was created with a vanilla xz binary:
  xz --keep --block-size=32k --stdout enwik5 > enwik5.block-size-32k.xz
2024-02-14 15:49:54 +11:00
Nigel Tao 2f7fbd0f34 test/data: add enwik5.lzma2-chunk-max-1-13.xz
It was created wih a custom xz binary (built from the source at
https://github.com/tukaani-project/xz), with this command:
  xz --compress --keep --stdout enwik5 > enwik5.lzma2-chunk-max-1-13.xz
after applying this patch to xz's src/liblzma/lzma/lzma2_encoder.h:

-#define LZMA2_CHUNK_MAX (UINT32_C(1) << 16)
+#define LZMA2_CHUNK_MAX (UINT32_C(1) << 13)

The resultant enwik5.lzma2-chunk-max-1-13.xz file has multiple LZMA2
chunks, unlike the existing enwik5.xz (created with the normal chunk
limit). Wuffs' std/xz currently does not decode this new file properly.
2024-02-13 22:17:35 +11:00
Nigel Tao 749e3559f2 std/xz: implement apply_filter_0b_riscv 2024-02-13 21:11:06 +11:00
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