Skip to content

Add a test-only differential lane between govpx and go-avkit/vpx (M0 D0b) - #140

Merged
tannevaled merged 1 commit into
mainfrom
m0-d0b-differential
Nov 29, 2026
Merged

tannevaled merged 1 commit into
mainfrom
m0-d0b-differential

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

What

M0 step D0b of docs/design/vpx-decoder.md: a test-only differential lane between govpx v0.5.3 (what decode uses) and go-avkit/vpx v0.1.0 (its port). Nothing outside the tests imports the new module; the shipped decoder is unchanged. D0c switches decode.

Every step is compared: whether a picture is produced, the corrupt flag, the picture itself (size, chroma layout, bit depth and each visible sample, hashed) and the class of the error through classifyVPX. A panic in either decoder fails.

Evidence

  • libvpx's 376 vectors, serial and with 4 threads, 4:4:0 included (compared as pictures, not through Frame): 376 of 376 identical (LIBVPX_VECTORS_DIR, 217 s).
  • The five committed streams, serial and threaded, run in CI.
  • FuzzVP8Differential and FuzzVP9Differential (each packet sent twice): 90 s each, no disagreement and no panic; the seeds are the committed streams' first packets plus the two size bombs.
  • TestVPXDiffCanTell shows the comparison can fail: a one-sample, one-chroma-sample, width, chroma-layout or bit-depth change moves the digest, and each port sentinel lands in its govpx twin's class.

go.mod gains github.com/go-avkit/vpx v0.1.0 (no dependencies of its own).

🤖 Generated with Claude Code

M0 step D0b of docs/design/vpx-decoder.md. The same packets go to govpx
v0.5.3 and to github.com/go-avkit/vpx v0.1.0, and every step must agree:
whether a picture comes out, the corrupt flag, the picture (size, chroma
layout, bit depth, every visible sample) and the class of the error.

- TestVPXDifferentialVectors: libvpx's 376 vectors, serial and with 4
  threads (LIBVPX_VECTORS_DIR): 376 of 376 identical.
- TestVPXDifferentialStreams: the committed streams, in CI.
- FuzzVP8Differential, FuzzVP9Differential: arbitrary packets, sent
  twice; same outcome and no panic. 90 s of each ran clean.
- TestVPXDiffCanTell: the digest and the error classes tell a difference.

Nothing outside the tests imports go-avkit/vpx yet; D0c switches decode.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit e0e4285 into main Nov 29, 2026
18 checks passed
@tannevaled
tannevaled deleted the m0-d0b-differential branch November 29, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant