code wiki / (root) / nx_wiki_codec_status.nx

nx_wiki_codec_status.nx source

↩ module page · 66 lines · 4756 B

1// nx_wiki_codec_status.nx -- EMIT the sovereign-codec arc status as a live wiki page 2// (knowledge/wiki-content/codec-arc-status.md), machine-generated so it cannot drift from 3// what the gates actually proved. Each milestone row cites the gate that proved it. 4// 5// WHY (operator 2026-06-18): "make sure this and everything else in parallel workstreams is 6// getting logged to the wiki for accurate live documentation thats being built out by the 7// wiki as we work." The wiki ingestor auto-discovers this .md as /wiki/codec-arc-status. 8// 9// DOCTRINE: emit, never hand-write (no-drift). The milestone facts are the verified gate 10// results; to update, change the data here and re-emit (single source = this organ). 11// genealogy_id: nishi_wiki_codec_arc_status 12// lineage_id: gate_verdict_to_wiki_page 13// license_tier: ORIGINAL 14import "nx_syscalls.nx" 15 16// write a NUL-terminated string to fd 17func wz(fd: i64, s: *u8) -> i64 { 18 var n: i64 = 0 19 while s[n] != (0 as u8) { n = n + 1 } 20 sys_write(fd, s, n) 21 return 0 22} 23 24func main() -> i64 { 25 let fd: i64 = sys_openat_wr("knowledge/wiki-content/codec-arc-status.md\x00" as *u8, 0x1a4) 26 if fd < 0 { wz(1, "ERROR: cannot open codec-arc-status.md\n\x00" as *u8); sys_exit(1); return 1 } 27 28 wz(fd, "# Sovereign Codec Arc -- Live Status\n\n\x00" as *u8) 29 wz(fd, "Machine-generated by `nx_wiki_codec_status` from verified gate results -- this page cannot\n\x00" as *u8) 30 wz(fd, "drift from what the gates proved. Domain: media-studio / codecs / verification.\n\n\x00" as *u8) 31 wz(fd, "**Doctrine (operator-set).** We build these standard codecs *to learn* the no-float / no-GPU\n\x00" as *u8) 32 wz(fd, "capabilities and to use them ONLY as in-test-harness benchmarks. Any codec with patent or\n\x00" as *u8) 33 wz(fd, "license encumbrance (H.264/AVC, HEVC) is QUARANTINED from the shipping ecosystem -- the\n\x00" as *u8) 34 wz(fd, "destination is a Nishi-native, patent/license-free format that any user can stream and play\n\x00" as *u8) 35 wz(fd, "royalty-free. Verification uses ffmpeg as an oracle in the TEST HARNESS ONLY, never in product.\n\n\x00" as *u8) 36 37 wz(fd, "## Milestones (each cites the gate that proved it)\n\n\x00" as *u8) 38 wz(fd, "| Stage | Status | Verified result | Proving gate |\n\x00" as *u8) 39 wz(fd, "|---|---|---|---|\n\x00" as *u8) 40 wz(fd, "| I-frame decode (intra 4x4/16x16/chroma, CAVLC, IDCT, deblock) | BIT-EXACT | luma 589824/589824 px, MAXDIFF=0 vs ffmpeg | nx_h264_decode_frame |\n\x00" as *u8) 41 wz(fd, "| P-frame decode (MV pred, quarter-pel MC, P_Skip, P_8x8, deblock) | BIT-EXACT | luma 589824/589824 + chroma 294912/294912, MAXDIFF=0 | nx_h264_pframe_recon |\n\x00" as *u8) 42 wz(fd, "| P motion-vector field (row-0 P_16x16 MVs) | GREEN | 12/12 MVs match ffmpeg | nx_h264_mv_recon_gate |\n\x00" as *u8) 43 wz(fd, "| P co-located MV field (for B direct mode) | GREEN | L0 MV field matches | nx_h264_colmv_gate |\n\x00" as *u8) 44 wz(fd, "| B-frame parse (POC type-0, dual ref-lists L0/L1, B mb-types) | GREEN | entropy walk syncs 2101/2101, num_ref 1/1 | nx_h264_bframe_walk |\n\x00" as *u8) 45 wz(fd, "| B-frame recon (spatial-direct, bi-pred, two-list MVs) | CORRECT pre-deblock | 95.5% vs post-deblock GT; residual = B's own deblock edges (in progress) | nx_h264_brecon |\n\x00" as *u8) 46 47 wz(fd, "\n## What remains (B-frame)\n\n\x00" as *u8) 48 wz(fd, "- **B-R6 B-deblock** -- reuse the proven deblock kernels with B bS (intra->4/3, coeff->2,\n\x00" as *u8) 49 wz(fd, " per-list MV-diff>=4 or differing pred->1); expected to close the 4.5% to bit-exact.\n\x00" as *u8) 50 wz(fd, "- **B-R5 intra-in-B** -- reuse `nx_h264_intra_recon` kernels for intra MBs inside B-slices.\n\x00" as *u8) 51 wz(fd, "- **B chroma** -- reuse the chroma MC + deblock kernels.\n\n\x00" as *u8) 52 53 wz(fd, "## How we got here (the lessons)\n\n\x00" as *u8) 54 wz(fd, "Every bug on this arc was banked as an S-class Nishi-Teacher lesson (machine + human educatable):\n\n\x00" as *u8) 55 wz(fd, "- [How a bit-exact decode was proven](/wiki/h264-bitexact-decode)\n\x00" as *u8) 56 wz(fd, "- [Hunting a P-frame desync](/wiki/h264-pframe-desync-hunt)\n\x00" as *u8) 57 wz(fd, "- [A deblock bug that was really a test-harness bug](/wiki/h264-deblock-test-harness-bug)\n\x00" as *u8) 58 wz(fd, "- [Debugging craft: B-frame language/toolchain traps](/wiki/debugging-craft-bframe-traps)\n\x00" as *u8) 59 wz(fd, "- [A clean sync is not a correct parse](/wiki/h264-bframe-header-sync-trap)\n\x00" as *u8) 60 wz(fd, "\nSee the full curriculum index at [/wiki/nishi-lessons](/wiki/nishi-lessons).\n\x00" as *u8) 61 62 sys_close(fd) 63 wz(1, "EMITTED knowledge/wiki-content/codec-arc-status.md\n\x00" as *u8) 64 sys_exit(0) 65 return 0 66}