forge
Explore
Log in

Don't you dare go Hollow

Lane-chroma r1 charter (smooth/paeth chroma modes)

Browse files at this commit

24b6c719fa1f98ba4be993e8a15c230c687084adAhmet Kaan GümüşParent: 94033af
  • docs
    • lane-chroma r1 charter (smooth/paeth chroma modes)
Show full message
docs(av1): lane-chroma r1 charter (smooth/paeth chroma modes)
lanes/chroma-r1.charter.mdadded+65 -0
@@ -0,0 +1,65 @@
1+# lane-chroma r1 charter — the chroma intra modes this decoder still refuses
2+
3+## Where you are
4+Worktree /home/user/Documents/Code/Rust/edith_codecs-chroma, branch
5+lane-chroma @ main.
6+Build/test ONLY:
7+ `env CARGO_TARGET_DIR=$HOME/.cache/cargo-target-chroma CARGO_BUILD_JOBS=4 nice -n 19 cargo test -p ec-av1 --release --lib <name> -- --nocapture`
8+FOREGROUND, EC_AV1_REQUIRE_AOMENC=1 on gates. Never push. Never touch the main
9+checkout or the sibling -realworld worktree. WIP COMMIT after every green step.
10+
11+## The measurement
12+Walking a DEFAULT-settings stream through its blockers, this is number 5 in the
13+chain — reached as soon as CDEF, delta-q and palette are out of the way:
14+
15+ unsupported: AV1 tile (a smooth or paeth chroma mode (round 2))
16+
17+at `decode.rs`:
18+
19+ if (9..=12).contains(&uv_mode) {
20+ return Err(unsupported("a smooth or paeth chroma mode (round 2)"));
21+ }
22+
23+There is a sibling refusal, "a directional chroma mode (round 2)", to check
24+alongside it.
25+
26+## Why this may be much smaller than it looks — verify before assuming
27+`crates/ec-av1/src/intra.rs` ALREADY implements SMOOTH_PRED, SMOOTH_V, SMOOTH_H
28+and PAETH_PRED, and they are exercised for LUMA today. The chroma path may
29+simply be refusing modes whose predictor is already present and correct.
30+
31+Do NOT assume that. Establish it:
32+1. Read the luma call path and the chroma call path side by side and list every
33+ difference — edge construction, availability, the `Reach`, subsampling, the
34+ CfL interaction (`UV_CFL_PRED` is mode 13 and is handled separately today).
35+2. Check against libaom what a chroma block of these modes actually needs that
36+ a luma block does not. `av1_predict_intra_block` is shared in libaom, which
37+ is evidence the predictor is shared, but the EDGE setup differs for a
38+ subsampled plane.
39+3. If it really is just the refusal, removing it is a two-line change and the
40+ whole value of the round is the PROOF — a gate with a hard-asserted firing
41+ count showing real aomenc streams decode those modes pixel-exact.
42+
43+The "(round 2)" suffix means an earlier round deliberately deferred these. Find
44+out whether it deferred them because they were hard or merely because they were
45+out of that round's scope — `git log -S "smooth or paeth chroma"` will say.
46+
47+## Method
48+Refuse-by-name first, decode second. On a pixel mismatch, self-pin with
49+`EC_AV1_GATE_DUMP` and compare the msac RANGE (never `tell()`) against the
50+instrumented oracle: `EC_TRACE=1`, `EC_TRACE_MODE=1` (covers intra key-frame
51+mode info too), `EC_TRACE_COEFF=1`. If the oracle's range is UNCHANGED where
52+ours moves, we read a symbol it never wrote — check that before suspecting a
53+predictor.
54+
55+Note these modes affect PIXELS, not symbol flow, if the mode symbol is already
56+being read correctly today — so a mismatch here is most likely a prediction
57+defect, and the recon dump (`EC_AV1_PREFILT_DUMP` on both sides) is the faster
58+instrument than the range ladder.
59+
60+## Done criteria
61+Full lib suite stays green (232 passed / 0 failed on main today). Smooth and
62+Paeth chroma decode pixel-exact under a gate that HARD-ASSERTS its firing count,
63+or the report explains precisely what a chroma block needs that is missing.
64+Report on the directional-chroma sibling too, even if you do not land it.
65+REPORT `lanes/chroma-r1.report.md`, VERDICT on the FIRST line.