std/handsum: add Potato, Gray variants

This commit is contained in:
Nigel Tao committed 2026-04-13 00:20:06 +10:00
1 parent cbdc4d5f64
commit dd8db5dbb8
9 files changed
+465 -104

No files matched your search

+44 -2
View File
@@ -66,7 +66,33 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the
// ---------------- Handsum Tests
const char* //
test_wuffs_handsum_decode_interface() {
test_wuffs_handsum_decode_interface_hvpc() {
CHECK_FOCUS(__func__);
wuffs_handsum__decoder dec;
CHECK_STATUS("initialize",
wuffs_handsum__decoder__initialize(
&dec, sizeof dec, WUFFS_VERSION,
WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED));
return do_test__wuffs_base__image_decoder(
wuffs_handsum__decoder__upcast_as__wuffs_base__image_decoder(&dec),
"test/data/bricks-color.hvpc.handsum", 0, SIZE_MAX, 32, 24, 0xFF052A90);
}
const char* //
test_wuffs_handsum_decode_interface_hvpg() {
CHECK_FOCUS(__func__);
wuffs_handsum__decoder dec;
CHECK_STATUS("initialize",
wuffs_handsum__decoder__initialize(
&dec, sizeof dec, WUFFS_VERSION,
WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED));
return do_test__wuffs_base__image_decoder(
wuffs_handsum__decoder__upcast_as__wuffs_base__image_decoder(&dec),
"test/data/bricks-gray.hvpg.handsum", 0, SIZE_MAX, 32, 24, 0xFF010101);
}
const char* //
test_wuffs_handsum_decode_interface_hvxc() {
CHECK_FOCUS(__func__);
wuffs_handsum__decoder dec;
CHECK_STATUS("initialize",
@@ -78,6 +104,19 @@ test_wuffs_handsum_decode_interface() {
"test/data/bricks-color.hvxc.handsum", 0, SIZE_MAX, 32, 24, 0xFF571218);
}
const char* //
test_wuffs_handsum_decode_interface_hvxg() {
CHECK_FOCUS(__func__);
wuffs_handsum__decoder dec;
CHECK_STATUS("initialize",
wuffs_handsum__decoder__initialize(
&dec, sizeof dec, WUFFS_VERSION,
WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED));
return do_test__wuffs_base__image_decoder(
wuffs_handsum__decoder__upcast_as__wuffs_base__image_decoder(&dec),
"test/data/bricks-gray.hvxg.handsum", 0, SIZE_MAX, 32, 24, 0xFF0D0D0D);
}
const char* //
test_wuffs_handsum_decode_truncated_input() {
CHECK_FOCUS(__func__);
@@ -164,7 +203,10 @@ test_wuffs_handsum_decode_frame_config() {
proc g_tests[] = {
test_wuffs_handsum_decode_frame_config,
test_wuffs_handsum_decode_interface,
test_wuffs_handsum_decode_interface_hvpc,
test_wuffs_handsum_decode_interface_hvpg,
test_wuffs_handsum_decode_interface_hvxc,
test_wuffs_handsum_decode_interface_hvxg,
test_wuffs_handsum_decode_truncated_input,
#ifdef WUFFS_MIMIC
+1
View File
@@ -0,0 +1 @@
ţ×וséĆ/Ą\ë„XY—WcŁFf—iĄS)z8‡’H|C#—’K¦rXš–7xbH;Ł(—–gxC9í†Hv•|Íd#Hö��f?ăĂeGv?´˛9…‰xa’'�x7fbHź–DČQ'z{�ÇŞ©uZxyę—cZ™Ţ{Š�kąhi“Ť•zŠvhhćČzZšĹx"µd�µVč�o§
+1
View File
@@ -0,0 +1 @@
þ×—’Dö¨’,Û�8j“7u¡'g“9–qyˆ€‹A˜�*•q(š”ˆp(;‘˜“(‡ã†¢LÍrgóiˆtıFGtµ�‡†Hb€ˆufp(®”$Èpy
+1
View File
@@ -0,0 +1 @@
ţ×#˙ŕÁđ_Z(›Öëď~ůŰ#4ţ'oG&źˇ_8T1z
+2
View File
@@ -0,0 +1,2 @@
þ×ô‡z¨‡{‡§„YG•˜¤VxTw*”Y‡“ˆý–v¨—{¸[/¸—‡%|¥fX>¸Äf¨µHd³f
s6˜ƒ+‡q'j¦fv�y‚X40ˆ’Hk�x‘8zc*—�'Šqx�y‡hw‡yˆ‡w…·vx‡y§˜Š—xyÈ˜šˆˆ™ªx‰˜ˆ™Ši‰˜‰—xˆ—y˜˜h‰‡‰
+4
View File
@@ -55,6 +55,7 @@ OK. 076cb375 test/data/bricks-color.bmp
OK. bdbbfadb test/data/bricks-color.etc1.pkm
OK. 41e6110e test/data/bricks-color.etc1s.pkm
OK. 5670f263 test/data/bricks-color.etc2.pkm
OK. 0fffe1d3 test/data/bricks-color.hvpc.handsum
OK. 1fef6814 test/data/bricks-color.hvxc.handsum
OK. 72a1f9cc test/data/bricks-color.jpeg
OK. 076cb375 test/data/bricks-color.lossless.webp
@@ -69,6 +70,8 @@ OK. f36c2e80 test/data/bricks-dither.no-ancillary.png
OK. f36c2e80 test/data/bricks-dither.png
OK. c2bce675 test/data/bricks-gray.bmp
OK. c2bce675 test/data/bricks-gray.gif
OK. 46a6768e test/data/bricks-gray.hvpg.handsum
OK. cd16ce62 test/data/bricks-gray.hvxg.handsum
OK. 3a2478ad test/data/bricks-gray.jpeg
OK. c2bce675 test/data/bricks-gray.lossless.webp
OK. 9d451b1c test/data/bricks-gray.lossy.webp
@@ -130,6 +133,7 @@ OK. ed4b78fc test/data/hippopotamus.regular.gif
OK. dcbb225a test/data/hippopotamus.regular.png
BAD e4c5926b test/data/hippopotamus.regular.truncated.png
OK. f6bb81e2 test/data/mona-lisa.21x32.etc2.pkm
OK. 7f351b34 test/data/mona-lisa.21x32.hvpc.handsum
OK. b507f884 test/data/mona-lisa.21x32.hvxc.handsum
OK. 012ce4cf test/data/mona-lisa.21x32.png
OK. 0a22e689 test/data/mona-lisa.21x32.q50.jpeg