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