Lane-intradisp r1 charter (intra rect partition dispatch)
Browse files at this commit0e4b5d50c255cb8e05df412ebcc4ee95437aa9cbParent: e33ddfa- docs
- lane-intradisp r1 charter (intra rect partition dispatch)
1 changed file +62 -0
lanes/intradisp-r1.charter.mdadded+62 -0
| @@ -0,0 +1,62 @@ | |||
| 1 | +# lane-intradisp r1 charter — decode rect (HORZ/VERT) partitions on INTRA frames | ||
| 2 | + | ||
| 3 | +Worktree /home/user/Documents/Code/Rust/edith_codecs-intradisp, branch lane-intradisp @ 00de8d3. | ||
| 4 | +Build/test ONLY: `env CARGO_TARGET_DIR=$HOME/.cache/cargo-target-intradisp CARGO_BUILD_JOBS=4 nice -n 19 cargo test -p ec-av1 --release --lib <name> -- --nocapture` (full lib ~70s; run it whole). | ||
| 5 | +Set EC_AV1_REQUIRE_AOMENC=1 on gate runs. Never push, never merge, never touch sibling worktrees (lane-gm is live). | ||
| 6 | +libaom oracle: ~/.cache/aom-oracle/src (v3.13.3); aomenc/aomdec/inspect in ~/.cache/aom-oracle/build/. | ||
| 7 | +BUDGET: commit after every green milestone; report by the time you are 3/4 through. | ||
| 8 | + | ||
| 9 | +## Why now | ||
| 10 | +The free-partition and AB gates refuse ~17/40 attempts on KEY frames with | ||
| 11 | +`unsupported: AV1 tile (a partition type this encoder never writes (value=1|2|...))` | ||
| 12 | +raised at decode.rs:3874 (inside the 32x32 intra dispatch) and decode.rs:3882 | ||
| 13 | +(the 64x64 level). The INTER side already decodes HORZ/VERT/HORZ_A/VERT_A/VERT_B. | ||
| 14 | +The blocker was the square-only intra predictor -- that is now FIXED and merged: | ||
| 15 | +`intra::predict` and `Edges` take `(bw, bh)` and are C-verified over 568 rect | ||
| 16 | +cases (see lanes/intrarect_dump.c and lanes/intrarect-r1.report.md on main). | ||
| 17 | + | ||
| 18 | +## Scope: PARTITION_HORZ (1) and PARTITION_VERT (2) on intra frames ONLY | ||
| 19 | +Leave AB (4/6/7) and 1to4 (8/9) refusing this round -- land the smaller, | ||
| 20 | +provable step first. | ||
| 21 | + | ||
| 22 | +1. `decode_block` (decode.rs:1962) currently takes one `side`. Widen it to a | ||
| 23 | + rect block the same way the inter side did: the strip is a real | ||
| 24 | + 32x16/16x32 block, so it needs | ||
| 25 | + - the true (bw, bh) into `intra::predict` (already rect-capable); | ||
| 26 | + - the right TRANSFORM size for the strip: check libaom's | ||
| 27 | + `max_txsize_rect_lookup[bsize]` in ~/.cache/aom-oracle/src/av1/common/common_data.h | ||
| 28 | + for BLOCK_32X16/BLOCK_16X32 (TX_32X16/TX_16X32) -- our transform code | ||
| 29 | + already has rect TX support on the inter path (grep TX32X16/TX_16X32 or | ||
| 30 | + the tx-size enum in transform.rs); reuse it, do not invent a new path; | ||
| 31 | + - the correct CDF ROWS. Every table indexed by bsize must use the strip's | ||
| 32 | + own row, not the 32x32 row (class cdf-row-held-constant, which cost the | ||
| 33 | + inter lane a whole round): check `intra_frame_y_mode`, `uv_mode`, | ||
| 34 | + `txfm_partition`/`tx_size`, `skip`, and the txb sets. `size_group_lookup` | ||
| 35 | + for BLOCK_32X16/BLOCK_16X32 is what indexes the y-mode CDF -- read it in | ||
| 36 | + common_data.h, do not guess. | ||
| 37 | +2. Wire the two arms into the intra dispatch (the `match part32` at | ||
| 38 | + decode.rs ~3624, whose `_ =>` at :3873 is the refusal) plus the 64x64-level | ||
| 39 | + `_ =>` at :3882 if it is reachable for HORZ/VERT. | ||
| 40 | +3. Neighbour/context recording must stamp the strip's TRUE footprint | ||
| 41 | + (above/left mode arrays, skip grid, tx grids) -- the inter side learned this | ||
| 42 | + the hard way; mirror what the inter HORZ/VERT arms do. | ||
| 43 | + | ||
| 44 | +## Gate ladder (in order, commit at each green step) | ||
| 45 | +(a) full lib suite -- every existing stream must stay bit-identical; | ||
| 46 | +(b) 14-pin default list: `cargo test -p ec-av1 --release --lib pinned_warp_stream_decodes_pixel_exact -- --ignored`; | ||
| 47 | +(c) `a_real_aomenc_stream_with_free_partitions_decodes_pixel_exact` -- report | ||
| 48 | + the intra-refusal count before and after (that is this lane's score); | ||
| 49 | +(d) the AB gate and the intra gates by name (filter_intra, tx_select, | ||
| 50 | + directional_chroma, intra_with_deblocking). | ||
| 51 | +Any pixel mismatch: pin it with EC_AV1_GATE_DUMP=/tmp/claude-1000/intradisp-flake-N.obu, | ||
| 52 | +then localize -- our EC_AV1_PREFILT_DUMP vs the oracle's (same env var on | ||
| 53 | +~/.cache/aom-oracle/build/aomdec) to find the first bad frame, then | ||
| 54 | +EC_TRACE=1 on aomdec vs EC_AV1_TRACE on ours to compare msac RANGE per | ||
| 55 | +partition symbol. Do NOT guess-fix; a pinned, localized mismatch reported | ||
| 56 | +honestly is a good outcome. | ||
| 57 | + | ||
| 58 | +## Done criteria | ||
| 59 | +Intra HORZ/VERT decode pixel-exact with the free-partition gate's intra | ||
| 60 | +refusals measurably reduced; suite + pins green; AB still refusing by name; | ||
| 61 | +report lanes/intradisp-r1.report.md with VERDICT first line and the | ||
| 62 | +before/after refusal counts. | ||