open-standards/wai/wai-rs/tests/vectors/int_video/int_video.json
Transaction Science 661ecf410c wai.video.int_motion: deterministic integer inter-frame video (byte-exact)
Extends "conformance is a hash" to VIDEO. The float learned-video family (DCVC)
propagates a float reference feature frame to frame, so ~1e-5 of drift compounds
down the GOP and the reconstruction is reproducible only on the same build. This
is the opposite: every frame is reconstructed by INTEGER block motion compensation
from the previous reconstructed frame plus an INTEGER-quantized residual, no float
anywhere — so each frame is byte-identical on every machine. Frame-state-
equivalence: a per-frame portable hash, a whole clip you can put in a receipt.

- src/int_video.rs (feature video_int, pure i64, wasm-ready): decode loop reads
  the residual symbols from the rANS stream (raster y,x,c); prediction is constant
  grey for the I-frame and prev[clamp(y+dy), clamp(x+dx)] per block for P-frames;
  frame = clamp(prediction + r·q, 0, 255). Dependency-free base64 for the rANS.
- tools/wai_int_video_encode.py: encodes a deterministic clip — integer whole-pixel
  block-MC search against the previous *reconstructed* frame + quantized residual +
  CompressAI rANS (the byte-exact match of the Rust RansDecoder). Emits the bitstream
  + committed per-frame and whole-clip hashes.
- Committed tiny vector (tests/vectors/int_video/, 5×48×48 RGB) + NEVER-skip test:
  decodes every frame to its committed FNV-1a + the clip hash 27573cdba1ad6628,
  byte-for-byte. Verified visually: the disc translates (MC works), decode exact.
- Wired wai.video.int_motion (Lossy tier — quantized residual — StandardDefined
  replicate class — deterministic integer decode). SPEC table + capability comment.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-27 07:22:53 -04:00

1 line
No EOL
184 B
JSON

{"n_frames": 5, "h": 48, "w": 48, "frame_hashes": ["db8fe9a7b7f31a05", "82d3d1fe15743cbb", "e97d3b7d4799a6e5", "55475f7063c46737", "ebf12c100d45a2db"], "clip_hash": "27573cdba1ad6628"}