mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
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
This directory contains Go packages that implement the Wuffs language.
Other (non-Wuffs-specific) packages are in the sibling ../lib directory.