code wiki / (root) / nx_webp_alpha_gate.nx

nx_webp_alpha_gate.nx

buildroot/runtime/nx_webp_alpha_gate.nx

8842 B201 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic webp
docsdependenciesstructsconstsfunctions

about

nx_webp_alpha_gate.nx -- proves VP8X + ALPH by exact filter ROUND-TRIP. T3 runs all four filters over pseudo-random alpha planes at several shapes and requires the filtered-then-unfiltered plane to be byte-identical. A filter pair that disagrees anywhere -- including only at the edges -- fails. T4 pins the EDGE PREDICTION explicitly. Horizontal predicts the first column from ABOVE and vertical predicts the first row from the LEFT. Using the nominal direction at an edge reads outside the plane; substituting zero leaves the interior correct and both edges wrong, which reads as a subtle halo rather than a decode failure. The test uses a 1-pixel-wide and a 1-pixel-tall plane, where the whole image IS the edge case. T5 pins the gradient clamp ORDER: clamp(left + top - topleft) to 0..255, THEN add the residual modulo 256. It uses values that deliberately overshoot both ends, since that is the only place the orders differ. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_webp_alpha.nx nx_webp_alpha_gate.nx

imports: nx_syscalls.nxnx_webp_alpha.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

22func g_puts(s: *u8) -> i64
29func g_putn(v: i64) -> i64
43func main() -> i64