nx_webp_alpha_gate.nx
buildroot/runtime/nx_webp_alpha_gate.nx
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
imports: nx_syscalls.nxnx_webp_alpha.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 22 | func g_puts(s: *u8) -> i64 |
| 29 | func g_putn(v: i64) -> i64 |
| 43 | func main() -> i64 |