forge
Explore
Log in

Don't you dare go Hollow

Lane-sbpart r3 charter -- bisect the rect64 luma mismatch

Browse files at this commit

8aa2626d2584d1a9aec0f84979301a229ab50fa2Ahmet Kaan GümüşParent: da48368
  • docs
    • lane-sbpart r3 charter -- bisect the rect64 luma mismatch
Show full message
docs(av1): lane-sbpart r3 charter -- bisect the rect64 luma mismatch
lanes/sbpart-r3.charter.mdadded+49 -0
@@ -0,0 +1,49 @@
1+# lane-sbpart r3 — bisect the rect64 luma mismatch
2+
3+At 9379e99. Read `lanes/sbpart-r2.report.md` first — r2 built
4+`decode_block_rect64` and wired it at the SB-level `PARTITION_HORZ`/`PARTITION_VERT`
5+match (was a `_ =>` catchall), and built the gate that proves it fires. I
6+committed r2's uncommitted gate verbatim for you; it is RED on purpose.
7+
8+## The one job
9+`a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_decodes_pixel_exact`
10+reaches the new code (`sb_rect_hits() > 0` against real aomenc content) and
11+mismatches ffmpeg's luma from partway through row 0 of a 192x128 frame. Bisect
12+it. This is a pixel defect with a bit-exact oracle available, so hand-tracing is
13+the wrong instrument: use `EC_AV1_GATE_DUMP` plus the oracle's `EC_TRACE` /
14+`EC_TRACE_COEFF` rungs (`scripts/instrument-aom-oracle.sh`, rebuilt with
15+`scripts/build-aom-oracle.sh` into `~/.cache/aom-oracle`), exactly the way
16+`decode_block_rect`'s own r3–r5 desync was closed. Add a rung rather than guess
17+when a fact is not observable.
18+
19+r2's two prime suspects, neither checked: the corner-embed stride in the new
20+function versus `dequant_and_inverse_typed_wh`'s w/h ordering for non-square
21+64x32 vs 32x64 grids; and `default_scan(TX32)` versus the `scan32` other call
22+sites reuse (r2 believed these identical but never diffed them). Note the class
23+[[scan-weights-cross-axis]]: a scan weight or step can use the CROSS axis, and
24+square candidates hide every axis swap — if you touch scanning, sweep the
25+transposed copy in the SAME round.
26+
27+Since the symbol reads are already right (the partition fires and the stream
28+does not desync), the defect is in reconstruction, not entropy — check the
29+range ladder only if a coefficient value proves wrong.
30+
31+## Gate recipe facts r2 paid for — do not rediscover them
32+- `--enable-tx-size-search=0` is REQUIRED or every strip hits its own
33+ `tx-depth != 0` refusal before the pixels matter.
34+- `--enable-ab-partitions=0` does NOT gate AB partitions at 64x64: r2's blended
35+ `gradients`+`testsrc2` source made aomenc pick SB-level AB on ~40/40 attempts
36+ anyway. Plain `gradients_source` alone reaches real HORZ/VERT reliably. That
37+ aomenc quirk is out of this lane's scope; do not chase it.
38+
39+## After it is green
40+Commit, then stage 2: the 32x32 `part32` values, then the inter path. Do not
41+start either while the gate is red.
42+
43+Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sbpart`; foreground
44+`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms; fixtures
45+through `gradients_source(seed, w, h, tail)`; every ffmpeg generate bounded with
46+`-t`; `EC_AV1_REQUIRE_AOMENC=1`; aomenc `--threads=1 --row-mt=0 --sb-size=64`.
47+Sibling worktrees have live agents — never build in or edit them. Never push,
48+never merge into main. 75-turn cap, does not reset: COMMIT AT EVERY GREEN STEP.
49+End with `lanes/sbpart-r3.report.md`, VERDICT on line 1.