From 1b74214356d38ccb22c0a2584493d2a4cc27e399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Sep 2026 08:58:40 +0300 Subject: [PATCH] docs(sb128c): r4 handoff --- lanes/sb128c-r4.handoff.md | 79 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 lanes/sb128c-r4.handoff.md diff --git a/lanes/sb128c-r4.handoff.md b/lanes/sb128c-r4.handoff.md new file mode 100644 index 00000000..7777dbf2 --- /dev/null +++ b/lanes/sb128c-r4.handoff.md @@ -0,0 +1,79 @@ +# lane-sb128c r4 -> r5 handoff + +Tip `lane-sb128c` (worktree `edith_codecs-sb128c`, +`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sb128c`). Full detail: +`lanes/sb128c-r4.report.md`. + +## Done in r4 + +- r3 suite line: `371 passed; 1 failed; 32 ignored` (the known-RED gate). +- **Deblock root cause fixed** (`6226c27`): libaom's `curr_skipped` suppression + (`set_one_param_for_line_luma`, `av1_loopfilter.c`) -- a TU edge that is not + a PU edge is never filtered when `skip_txfm && is_inter`. Our 128 root + published four TX_64X64 luma leaves and a capped 32-px uv extent into the lf + grid even when skipped. Gated the per-leaf `fill_lf_grid_rect` loop on + `!(skip && is_inter)`; dropped the inert-and-harmful `.min(32)` uv cap. +- `dump_stage` now indexes per decode-order picture (`EC_AV1_POSTDEBLOCK_DUMP` + used to overwrite `.f0`). This is the instrument that found the defect. +- CDEF-for-128-root claim in the r4 charter DISPROVED by reading `read_cdef`: + ONE `cdef_idx` symbol for a NONE 128 root (one block => one call => index 0), + replicated across the four units via the shared `MB_MODE_INFO`. r1 was right; + no change needed. Four symbols only when the root SPLITs. +- ReelC re-probe: same stop string, 1 `EC_AV1_FINAL_DUMP` frame, and that frame + is byte-identical to ffmpeg's 10-bit decode (`cmp` clean, 4561920 bytes). + +## The residue -- this is r5's first job + +Gate `a_real_aomenc_inter_128x128_none_root_decodes_pixel_exact` is still RED, +now on a DIFFERENT, independent defect one frame later. + +Stream `$HOME/.cache/sb128c-work/g-61-8-0.obu` (8-bit, 256x256, sb-size 128, +9 decode-order pictures, 8 shown). All stages of decode-order frames 0..4 are +now exact -- pre-filter, post-deblock and final (`EC_AV1_FINAL_DUMP`, which +includes the hidden frame). Decode-order frame 5 is wrong ALREADY AT +PRE-FILTER, so every reference it uses is exact and this is not propagation: + +``` +frame 5 pre-filter Y: 19609 px, rows 128..255, cols 0..255, maxd 33, first (128,0) +frame 5 pre-filter C: 5207 px +per-64x64 quadrant Y: [0,0,0,0] [0,0,0,0] [3707,844,3137,3889] [183,177,3844,3828] +``` + +The whole BOTTOM superblock row (both 128x128 SBs), rows 0..127 exact. +Our mode trace lists that row as two `side=128 is_inter=1 skip=1` blocks -- a +skipped inter block is pure motion compensation. Entropy stays in sync for all +9 frames. The quadrant diff is content-dependent (flat quadrants mostly match), +which is a slightly-wrong PREDICTOR, not a wrong write geometry. Frame 4's own +`(32,0)` 128 skip block is exact, so 128-wide MC itself works. + +Suspects, in order: the 128 block's mv (mv stack / GLOBALMV resolution), its +`ref_frame`, its `switchable_interp` filter, and `motion_mode`/OBMC for a +128x128 block. NOT the lf grid (pre-filter dump). + +Reproduce: +``` +cd $HOME/.cache/sb128c-work +rm -f pf-o.f* pf-m.f* +systemd-run --user --scope -q -p MemoryMax=6G env EC_AV1_PREFILT_DUMP=$PWD/pf-o \ + ~/.cache/aom-oracle/build/aomdec --rawvideo -o /dev/null g-61-8-0.obu +systemd-run --user --scope -q -p MemoryMax=6G env EC_NOMEMGUARD=1 EC_AV1_PREFILT_DUMP=$PWD/pf-m \ + $HOME/.cache/cargo-target-sb128c/debug/examples/decode_probe g-61-8-0.obu +# compare pf-o.fN vs pf-m.fN, 256x256 yuv420p8 +``` +Oracle rungs available: `EC_AV1_PREFILT_DUMP`, `EC_AV1_POSTDEBLOCK_DUMP`, +`EC_AV1_FINAL_DUMP` (all indexed, decode order, hidden frames included), and +`EC_TRACE_MODE` (`EC_MODE_MV` / `EC_MODE_VAL` carry `mode`, `ref0`, `ref1`, +`mv0`, `stack`, `rng` -- 62 lines on this stream, none in the bottom SB row of +the failing frame, so a per-block mv trace for skip blocks has to come from +`EC_PRED`/`EC_PREDOUT` or a new rung). + +## (3) 128-level HORZ/VERT + AB -- NOT STARTED + +deferred: 128x64 / 64x128 and AB at the 128 root, key and inter paths -- r4's +budget went to the stage bisection; unblocked by nothing. This is the exact +string both ReelC extracts still stop at and it is the film frontier. +Charter facts from r4's charter that are still unverified: max tx TX_64X64, +2 mu chunks, chroma 64x32 -> 2x TX_32X32 with offset-10 `txb_skip` rows, +lf grid per unit, cdef per 64x64 quadrant (NOTE: for HORZ/VERT the 128 root has +TWO blocks, so `read_cdef` is called twice and can read up to 2 literals -- +re-derive the index per block from `decodemv.c:read_cdef` rather than assuming).