Commits
Commits on
4331d177bfa8a60efe23bcf2dd6d94d3e27cf818Filtered to scripts/pgs-white-level.shClear filter2026-08-14
feat(image): WebP decoding, VP8 key frames and VP8LAhmet Kaan Gümüş · 22ac6ab
feat(image): WebP decoding, VP8 key frames and VP8L The RIFF container, both bitstreams, and the separate alpha plane an extended file carries. VP8 (RFC 6386) is a complete key frame decoder: boolean entropy decoder, segmentation, per-partition token decoding with the neighbour contexts, the WHT and DCT inversions bit-exactly as specified, all sixteen intra prediction modes including the six diagonal subblock ones, and both loop filters with their per-macroblock strength derivation. The probability and quantizer tables are generated from the RFC text rather than retyped — two thousand values transcribed by hand is a defect waiting to be found several macroblocks into a picture. VP8L is the lossless bitstream: canonical prefix codes with meta prefix groups, the colour cache, LZ77 over the two-dimensional distance map, and all four transforms applied in the reverse of the order they were read. The colour cache size is read *before* the meta prefix codes; the other order parses plausibly and then fails on the first real file. Alpha arrives either raw or as a headerless lossless stream in the green channel, then unfiltered by the method its chunk declares. Animation is refused by name: a still decoder that quietly returns frame one makes "this plays" and "this decoded" indistinguishable to its caller.