Nigel Tao
e9ebad85a7
std/vp8: fix skip for all-zero DCT coefficients
...
"wuffs test -mimic std/webp" now passes.
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-22 15:23:11 +10:00
Nigel Tao
b4c8b9c238
test/c/mimiclib/webp: use no_fancy_upsampling
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-22 11:03:14 +10:00
Nigel Tao
9e274bee24
std/vp8: use YCC_MODEL__BT_601_STUDIO_RANGE
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-22 10:42:05 +10:00
Nigel Tao
ecca245226
std/vp8: fix luma_mode == 4 HZNC tracking
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-19 19:05:15 +10:00
Nigel Tao
cae59b4ce8
std/vp8: fix luma subblock prediction modes
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-19 19:04:31 +10:00
Nigel Tao
24fae427c1
std/vp8: swizzle to the dst pixel buffer
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-19 08:45:56 +10:00
Nigel Tao
68d13b8740
std/vp8: implement IDCT/IWHT
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-17 16:11:36 +10:00
Nigel Tao
bb3c85e2ef
std/vp8: calculate the predicted values
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168
2026-06-16 14:00:28 +10:00
Nigel Tao
b51fcb811a
std/vp8: parse the first partition
...
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications. There
were many stylistic changes but also:
- decoder.workbuf_len was fixed to account for all of the partitions,
not just the first two (the first partition and the first 'other'
partition). The PR's vp8 code, after an update to handle multiple
other partitions (which then implied random access to the partitioned
source bytes), assumed that enough workbuf was available (which it
often is, test/c/std/webp.c tests pass the entire g_work_slice_u8).
But strictly speaking, this isn't guaranteed unless workbuf_len
reports (after decode_image_config is called) what's needed.
- Calculating that workbuf_len (at decode_image_config time) lead to
introducing a new base.QUIRK_SOURCE_LENGTH quirk, to pass that
contextual information from std/webp to std/vp8. This calculation
belongs in std/vp8, not std/webp (or a future std/webm).
- Added support (and a test) for the case when the source bytes are
streamed and some (but not yet all) of the partition data in args.src
can be copied to args.workbuf.
Updates PR #168
2026-05-29 14:36:04 +10:00
Nigel Tao
979a9d898c
lib/handsum: renumber quality from 0..=3 to 1..=4
2026-05-06 21:39:21 +10:00
Nigel Tao
fdf742186d
test/data: add transparent-1x1.gif
2026-05-04 16:11:56 +10:00
Nigel Tao
15645dbb10
std/handsum: apply cube root mapping to alpha
2026-05-04 12:58:34 +10:00
Nigel Tao
3ad22468ce
std/handsum: fix frame config background color
2026-05-04 12:53:33 +10:00
Nigel Tao
30ac5c2e89
std/handsum: add alpha channel support
2026-05-01 23:24:29 +10:00
Nigel Tao
38a5e853c9
std/handsum: tweak magic identifier bytes
2026-05-01 23:23:21 +10:00
Nigel Tao
acbf9d2ecf
test/data: rename some *.handsum files
2026-05-01 20:36:12 +10:00
Nigel Tao
f8c6b35ff5
std/handsum: redo Handsum image file format
2026-04-28 21:12:28 +10:00
Nigel Tao
5e1b00df7f
test/data: add more mona-lisa images
2026-04-13 22:40:47 +10:00
Nigel Tao
dd8db5dbb8
std/handsum: add Potato, Gray variants
2026-04-13 00:20:06 +10:00
Nigel Tao
50b62c7704
test/data: rename some *.handsum files
2026-04-12 15:55:39 +10:00
Nigel Tao
a6c89da981
std/handsum: change version bits from 0x00 to 0x40
2026-04-08 21:08:43 +10:00
Nigel Tao
2ed84b6c00
std/nie: support premultiplied alpha formats
2025-07-15 15:57:36 +10:00
Nigel Tao
eec7d22ea3
pixconv: swizzle PIXEL_FORMAT__BGRA_PREMUL_4X16LE
...
Binary size, before:
145472 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
145472 gen/lib/c/clang-static/wuffs-base-pixconv.o
247720 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
247688 gen/lib/c/gcc-static/wuffs-base-pixconv.o
After:
155120 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
155120 gen/lib/c/clang-static/wuffs-base-pixconv.o
266992 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
266896 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2025-07-15 15:34:48 +10:00
Nigel Tao
1222a6886d
std/nie: support NIA (animated NIE)
2025-06-30 22:03:55 +10:00
Nigel Tao
67e9078eab
example/convert-to-nia: allow 16-bit PNG output
2025-06-23 09:51:31 +10:00
Nigel Tao
5ec14737f3
pixconv: allow swizzle from PIXEL_FORMAT__Y_16LE
...
Binary size, before:
142648 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
142648 gen/lib/c/clang-static/wuffs-base-pixconv.o
243368 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
243240 gen/lib/c/gcc-static/wuffs-base-pixconv.o
After:
145472 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
145472 gen/lib/c/clang-static/wuffs-base-pixconv.o
247720 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
247688 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2025-06-10 11:33:08 +10:00
Nigel Tao
7250990196
test/data: rename non-ascii/😻 .txt
...
Prior to this, pkg.go.dev would reject the repo (due to an error from
golang.org/x/mod/module). See https://go.dev/play/p/cGG7piSw1Wl and
https://proxy.golang.org/github.com/google/wuffs/@v/v0.3.4.info also
said:
not found: create zip: test/data/non-ascii/😻 .txt: malformed file path
"test/data/non-ascii/😻 .txt": invalid char '😻 '
2025-04-01 13:39:28 +11:00
Nigel Tao
b6be81a83b
std/handsum: implement do_decode_frame
2025-02-24 22:16:08 +11:00
Nigel Tao
43a6814dfe
std/handsum: add new package
2025-02-24 11:18:24 +11:00
Nigel Tao
12b404f58d
cmd/handsum: new tool for the Handsum file format
2025-02-23 12:15:59 +11:00
Egor Pugin
fd388e08f8
Fix typo in huffman-primlen-9.deflate.commentary.txt
2025-01-21 00:02:18 +03:00
Nigel Tao
b369d233ce
std: fix frame config background_color re alpha
2024-09-20 13:38:26 +09:30
Nigel Tao
53120477f8
test: update nia-checksums-of-data.txt
...
This was accidentally omitted from 0b2d8d15 "std/vp8: decode to a
placeholder gradient".
2024-09-19 22:47:13 +09:30
Nigel Tao
0b2d8d15f5
std/vp8: decode to a placeholder gradient
2024-09-15 11:35:13 +10:00
Nigel Tao
9e76d545b6
test/3pdata: add call-out to corrupted byte
2024-09-08 23:24:25 +10:00
Nigel Tao
42ba720d4e
pixconv: allow swizzling to Y (gray) more often
...
Binary size, before:
124816 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
124816 gen/lib/c/clang-static/wuffs-base-pixconv.o
196736 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
196672 gen/lib/c/gcc-static/wuffs-base-pixconv.o
After:
142032 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo
142032 gen/lib/c/clang-static/wuffs-base-pixconv.o
242712 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
242584 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2024-09-08 22:54:35 +10:00
Nigel Tao
85af5a4bed
std/tga: rename to std/targa
2024-09-08 09:00:10 +10:00
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
43b6fef8b1
std/thumbhash: add QUIRK_JUST_RAW_THUMBHASH
2024-09-06 13:23:38 +10:00
Nigel Tao
78f4e4ccc4
test/data: add official thumbhash PNG renderings
2024-09-06 12:56:00 +10:00
Nigel Tao
8c854ae702
std/thumbhash: implement do_decode_frame
2024-09-06 12:35:53 +10:00
Nigel Tao
b8740d8881
std/thumbhash: add new package
2024-09-03 20:07:37 +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
408ab25f04
script: have confirm-matches-djpeg say "too large"
...
+Differ (large)
2024-08-25 13:05:59 +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
7637982814
std/etc2: support ETC2PACKAGE_RGB_NO_MIPMAPS
2024-08-18 09:42:22 +10:00