forge
Explore
Log in

Don't you dare go Hollow

Lane-sbpart charter -- superblock and 32x32 partition types

Browse files at this commit

84bcd828934cca9fdee1e8fde1f371f6689d0ea8Ahmet Kaan GümüşParent: e7ae36e
  • docs
    • lane-sbpart charter -- superblock and 32x32 partition types
Show full message
docs(av1): lane-sbpart charter -- superblock and 32x32 partition types
lanes/sbpart.charter.mdadded+82 -0
@@ -0,0 +1,82 @@
1+# lane-sbpart — superblock- and 32x32-level partition types
2+
3+Worktree `/home/user/Documents/Code/Rust/edith_codecs-sbpart`, branch
4+`lane-sbpart`, off main 53f5358.
5+
6+## Why this lane exists — measured, not guessed
7+Five default-settings aomenc streams were run through
8+`cargo run -p ec-av1 --example decode_probe -- <stream.obu>` on 2026-08-30.
9+Where each stopped:
10+- testsrc2 192x128 `--cpu-used=4` -> palette (Y) [lane-palette]
11+- testsrc2 192x128 `--cpu-used=0` -> **a superblock-level partition type**
12+- smptebars 320x240 `--cpu-used=4` -> delta_q/delta_lf [lane-realworld]
13+- flat gray 128x128 `--cpu-used=4` -> **an inter superblock-level partition**
14+- mandelbrot 256x192 `--cpu-used=4` -> delta_q/delta_lf [lane-realworld]
15+
16+Two of the five are yours, and they are the same family. Note that these
17+refusals used to claim "a partition type this encoder never writes" — the
18+measurement above disproved that, and main reworded them (2be815f).
19+
20+## The four refusals you own, verbatim
21+- `"a superblock-level partition type other than NONE or SPLIT (this decoder's
22+ intra tile path codes only those two at 64x64)"` (decode.rs, intra tile path)
23+- `"an inter SB-level partition type other than SPLIT (this decoder's inter tile
24+ path only recurses a superblock as SPLIT)"` (decode.rs, inter tile path)
25+- `"a 32x32 partition type this decoder does not code (value={part32})"`
26+- `"an INTER 32x32 partition type this decoder does not code (value={part32})"`
27+
28+## What is already there
29+The decoder already codes rectangular partitions BELOW the superblock level —
30+`decode_block_rect`, HORZ/VERT strips, HORZ_A/VERT_A/VERT_B arms, and
31+rectangular inverse transforms for all 14 sizes are landed and gated. What is
32+missing is the same alphabet at the 64x64 and 32x32 levels, on both the intra
33+and inter tile paths. Read how the existing sub-16x16 arms do it before writing
34+anything; this is mostly extending an existing recursion, not new theory.
35+
36+Spec 5.11.4 `decode_partition`, and libaom `av1/decoder/decodeframe.c`
37+`decode_partition` — which is one function handling every level, so the
38+structure you want is visible there in one place.
39+
40+## Staging — COMMIT AFTER EVERY GREEN STEP
41+1. Intra path, 64x64: HORZ and VERT. Gate with a real
42+ `--cpu-used=0` stream (that is the recipe that produces them). COMMIT.
43+2. Intra path, 32x32: the same, plus whatever `part32` values the gate turns up
44+ — the refusal prints the value, so run it and read it. COMMIT.
45+3. Inter path, both levels. COMMIT.
46+4. HORZ_A / HORZ_B / VERT_A / VERT_B at these levels, then HORZ_4 / VERT_4.
47+ COMMIT each.
48+
49+## Gate rules
50+`EC_AV1_REQUIRE_AOMENC=1` on every run (a missing oracle must FAIL, not SKIP);
51+`-t <seconds>` on every ffmpeg generate; fixtures through the existing
52+`gradients_source(seed, w, h, tail)` helper (ffmpeg's `gradients` ignores its own
53+seed); aomenc `--threads=1 --row-mt=0 --sb-size=64` (this decoder hardcodes 64px
54+superblocks; aomenc's default 128 lands in a dead-ended gap). Firing counts are
55+HARD asserts via thread-local `Cell<usize>` counters like the existing `*_HITS`
56+(thread-local, NOT atomics). Main FAILS the suite if a gate turns a decode error
57+into a printed SKIP — write the gate as an attempt loop that requires at least
58+one decode. A gate that cannot prove its partition type fired is vacuous.
59+
60+## Method
61+CLASS `compare-range-not-tell`: compare the msac RANGE against the oracle after
62+each element, never `tell()`. Oracle at `~/.cache/aom-oracle`, rungs `EC_TRACE=1`
63+(partitions — exactly your subject), `EC_TRACE_COEFF=1`, `EC_TRACE_MODE=1`,
64+`EC_AV1_PREFILT_DUMP`, `EC_AV1_POSTDEBLOCK_DUMP`, `EC_AV1_PREFILT_WIDE_DUMP`,
65+`EC_TRACE_PALETTE=1`. Add rungs via `scripts/instrument-aom-oracle.sh` +
66+`scripts/build-aom-oracle.sh` in the existing shape if you need one.
67+CLASS `equal-range-means-unread`: reference range unchanged where ours moves =
68+we read a symbol it never wrote; theirs moves and ours does not = we skipped one.
69+
70+## Hard rules
71+`export CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sbpart`; foreground builds
72+`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms (the suite
73+runs ~3 min). Sibling worktrees (edith_codecs, -realworld, -lr, -superres,
74+-tiles, -palette) have live agents — never build in or edit them, and do not
75+create additional worktrees. Baseline 243 passed / 0 failed. Never push, never
76+merge, never touch `main`. Refuse-by-name rather than desync, and never write a
77+refusal claiming an encoder cannot emit a case — this lane exists because three
78+such claims were false. 75-turn cap, does not reset: COMMIT AT EVERY GREEN STEP,
79+and do wide signature changes as ONE scripted sweep plus `cargo check`, not N
80+hand edits — three lanes have hit the cap mid-sweep. Report every refusal string
81+you remove, verbatim, for `refusal_inventory.rs`. End with
82+`lanes/sbpart.report.md`, VERDICT on line 1.