From 8aecbc5549e8747adb8684d2c46203f74ddd9c80 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:43:53 +0300 Subject: [PATCH] docs(sb128c): r3 handoff -- gate un-ignored and RED on a 128-root loop-filter residue --- lanes/sb128c-r3.handoff.md | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 lanes/sb128c-r3.handoff.md diff --git a/lanes/sb128c-r3.handoff.md b/lanes/sb128c-r3.handoff.md new file mode 100644 index 00000000..f1a34f9b --- /dev/null +++ b/lanes/sb128c-r3.handoff.md @@ -0,0 +1,95 @@ +# lane-sb128c r3 -> r4 handoff + +Tip `lane-sb128c` (worktree `edith_codecs-sb128c`, +`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sb128c`). Full detail: +`lanes/sb128c-r3.report.md`. + +## (0) r2 suite result line + +NONE EXISTS. `sb128c-suite-r2-1788326632.service` ran 50 min, logged 232 `ok` and +0 `FAILED`, never printed a `test result:` line, and was still `active` when r3 +stopped it to free the target dir. It also ran without the top-level `fixtures` +symlink (missing in this worktree until r3 created it) -- that is r2's `film_grain` +8-bit red, not a decode defect. + +## (1) uv_mode / is_cfl_allowed class sweep -- DONE + +`is_cfl_allowed` = `block_size_wide[bsize] <= 32 && block_size_high[bsize] <= 32` +on the LUMA bsize (libaom `blockd.h`, called from `read_intra_mode_uv` at every +`read_intra_block_mode_info` / `read_intra_frame_mode_info` site, `decodemv.c`). + +| site (pre-r3 line) | reader | before | after | +|---|---|---|---| +| 5521 `read_intra_mode_rect` | key-frame + rect strips | caller's `cfl` param; 4 of 5 call sites pass a hardcoded `true` | `cfl && bw <= 32 && bh <= 32`, decided IN THE READER | +| 8500 `read_intra_mode` | `decode_block` square path | caller's `cfl` param | `cfl && side <= 32`, decided IN THE READER | +| 6203 `decode_block_rect64` | SB-level 64x32/32x64 | `bw.max(bh) <= 32` (already right) | unchanged | +| 10360 `decode_leaf8` | 4x4 sub-8 leaf | always CFL (right) | unchanged | +| 20387 `decode_inter_block` 8x8 leaf | 8x8 inter-frame leaf | always CFL (right) | unchanged | +| 18722 `decode_inter_block` intra tail | intra-in-inter | `write_w.max(write_h) <= 32` (r2's fix) | unchanged | + +Only the two READERS decide now, so a future 64/128 caller cannot get it wrong. + +## (2) intra 128x128 inside an inter frame + +- IMPLEMENTED. Mu-chunk chroma in the intra tail (TX_32X32 per 64x64 chunk, + offset-10 `txb_skip` rows via `Some(3)`, per-unit `record_mi_chroma`, `tu_reach`). +- Refusal string DELETED from `decode.rs` + `refusal_inventory.rs`. +- New counter `decode::intra_128_in_inter_hits()`. +- Three more defects fixed on the way (all previously unreachable): + 1. `read_block_tx_size` TX_MODE_LARGEST early return was `is_inter && side > 64`; + an intra 128 block also resolves to four TX_64X64 units. Now `side > 64`. + 2. `tx_size_context_txfm(n, at_mi, side)` -> `side.min(64)` + (`get_tx_size_context` compares against `tx_size_wide[max_txsize_rect_lookup]`). + 3. inter tile 128 `PARTITION_NONE` root: `at128` passed in SUB16 units to a + MI-taking callee (every root but the first entered at 1/4 position), and + `inter_piece!` hardcoded `reject_residual = true` so the SQUARE 128 root + refused with the rect-strip string. Now `sub16_to_mi(at128)` and + `$ww != $side || $wh != $side`. +- GATE `a_real_aomenc_inter_128x128_none_root_decodes_pixel_exact`: + `#[ignore]` REMOVED, recipe `--min-partition-size=32` -> `64`, hard assert + `intra128_total >= 1`. **NOT GREEN -- it is RED and committed RED.** + `sb128c-inter-none-8-false: decode-order frame 4 of 9 differs at byte 2367 + (ours 125 vs 126), 372 bytes differ`. + +### The residue (exact, this is r4's whole job) + +Ours vs `aomdec --rawvideo`, seed 61 8-bit, `$HOME/.cache/sb128c-work/g-61-8-0.obu`: +``` +display frame 2 Y: 98 px rows 9..250 cols 58..66 <-- earliest +display frame 2 U: 151 px rows 0..126 cols 1..61 +display frame 2 V: 123 px rows 0..126 cols 0..35 +display frame 4 Y: 16932 px (whole frame -- propagation, not a new defect) +``` +A 9-px band centred on **x = 64** spanning nearly the full frame height = the +14-tap deblock footprint of the 128 root's INTERNAL TX_64X64 edge. Entropy stays +in sync for all 9 frames (no refusal, no desync) => loop filter / lf-grid, not a +symbol defect. + +EXACT NEXT STEP: `EC_AV1_PREFILT_DUMP` on display frame 2 of that stream. If +pre-filter is exact, the defect is `fill_lf_grid_rect` for the 128 root in +`decode_inter_block` (the block-level call publishes `write_w = 128` as the tx +dimension before the per-leaf loop overwrites 64, and the chroma side reads +`tx/2` while a 128 block's chroma is really four TX_32X32 -- see the +"Chroma still reads tx_h_grid / 2" corner-cut comment right above that loop). +Memory class: `tx-grid-published-block-side`. + +## (3) 128-level HORZ/VERT + AB -- NOT STARTED + +deferred: 128-level HORZ/VERT (128x64 / 64x128) + AB on key and inter paths -- +r3's budget went to (1)/(2) and the four defects (2) uncovered -- unblocked by +nothing, it is r4/r5 work. This is now the FRONTIER for his 10-bit AV1 film. + +## (4) Merge / ReelC / suite + +- `git merge --no-commit main` (85887c7) -- clean auto-merge, no conflicts, + `cdf.rs` untouched by both sides, `cargo check -p ec-av1` clean on the merged + tree. Committed as `merge: main (85887c7) into lane-sb128c`. +- ReelC re-probe (`reelc2s.obu` and `$HOME/.cache/reelc-head.obu`, both + `use_128x128_superblock=true bit_depth=10 max_frame=1920x792`): + STOP STRING `a 128x128 superblock HORZ/VERT or AB partition (only SPLIT and NONE + are decoded at the 128 root)`; `EC_AV1_FINAL_DUMP` count **1** frame each. + Unchanged by this round -- exactly task (3). +- Full suite: unit `sb128c-suite-r3-1788327685.service`, log + `$HOME/.cache/sb128c-suite-r3.log` -- STILL RUNNING at r3 close (181 `ok`, + 0 `FAILED` so far, no `test result:` line). r4 must read the final line. + One KNOWN RED is expected: the gate above.