forge
Explore
Log in

Don't you dare go Hollow

Lane-intrarect r1 report -- DONE

Browse files at this commit

935cce61de37ed42bc845629143a229bc85aba1fAhmet Kaan GümüşParent: b526e26
  • docs
    • lane-intrarect r1 report -- DONE
Show full message
docs(av1): lane-intrarect r1 report -- DONE
lanes/intrarect-r1.report.mdadded+100 -0
@@ -0,0 +1,100 @@
1+# lane-intrarect r1 report
2+
3+VERDICT: DONE -- `intra::predict`/`Edges` are rect-capable (`bw != bh`),
4+C-verified for 8 rect shapes across DC/SMOOTH/PAETH + 17 directional angles
5+x {enable_edge_filter, smooth_neighbor}; full lib suite 224/224 (was
6+223/223, +1 the new C-verify test), square behaviour unchanged; tile
7+dispatch still refuses rect/AB partitions.
8+
9+## What changed
10+`crates/ec-av1/src/intra.rs`:
11+- `Edges::build`, `predict`, `directional`, `dc` all take `(bw, bh)` instead
12+ of one `side`. `Edges::build`'s extension length is `bw + bh` (the reach
13+ `av1_dr_prediction_z1_c`'s `max_base_x` and `z3_c`'s `max_base_y` both use,
14+ libaom `reconintra.c`).
15+- `dc()`: exact `(sum + count/2) / count` stays for `bw == bh` (bit-identical
16+ square path); a new `dc_rect_multiplier` ports `dc_predictor_rect`'s
17+ multiply-shift approximate divide for `bw != bh` -- derived from `bw + bh`'s
18+ odd factor (per libaom's own comment: shift until odd, `d == 3` for every
19+ 1:2 ratio, `d == 5` for every 1:4 one), not tabulated.
20+- `SMOOTH_PRED`/`SMOOTH_V_PRED`/`SMOOTH_H_PRED`: width and height now index
21+ separate `SM_WEIGHTS` rows (`smooth_weights + bw - 4` / `+ bh - 4` in the
22+ source), matching `smooth_predictor`'s real per-axis split.
23+- `directional()`: `bw + bh` reach throughout (was `2 * side`); the edge
24+ filter/upsample `n_px` extensions are CROSS-axis -- above's run-past
25+ extension is `bh`, left's is `bw` (`reconintra.c`'s `txwpx`/`txhpx` argument
26+ swap between the above and left calls). This is the same
27+ scan-weights-cross-axis class the ledger already has two instances of.
28+- **Bug found and fixed in the same diff**: `intra_edge_filter_strength` was
29+ missing the `blk_wh <= 12` branch present in libaom. No square block's
30+ `bw + bh` ever lands in `9..=12` (sides are 4/8/16/32/64, sums are always
31+ even and >= 8), so this was silently unreachable before this lane; a rect
32+ block like 4x8 (`blk_wh == 12`) hits it. Ported verbatim.
33+- 21 call sites (`encode.rs` x4, `decode.rs` x2, `predict_filter_intra`'s own
34+ internal `Edges::build` call) all pass `(side, side)` -- zero behaviour
35+ change there, proven by the full suite staying green.
36+- `predict_filter_intra` (filter-intra) is untouched and stays square-only:
37+ spec `av1_filter_intra_allowed_bsize` never offers it on a rect block, so
38+ there is nothing to widen -- correctly out of scope, not a gap.
39+
40+## C-verification (what's C-verified vs transcribed-only)
41+`lanes/intrarect_dump.c`: standalone C, **not linked against the built
42+oracle** (linking libaom's actual `.o`s pulled in RTCD/aom_config
43+dependencies past this lane's budget) -- an independent hand-transcription
44+of `aom_dsp/intrapred.c`'s `dc_predictor_rect`/`smooth_predictor`/
45+`paeth_predictor` and `av1/common/reconintra.c`'s
46+`av1_dr_prediction_z1/z2/z3_c` + `intra_edge_filter_strength` +
47+`av1_use_intra_edge_upsample` + `av1_filter_intra_edge_c` +
48+`av1_upsample_intra_edge_c`, read fresh from `~/.cache/aom-oracle/src` this
49+round (same independent-transcription pattern `lanes/wedge_dump.c` used,
50+per the charter's shared-oracle-blindness note).
51+
52+**C-verified** (checksum-matched, 568 cases, `intra::tests::rect_predictors_match_c_dump`):
53+- `DC_PRED` (both the exact-divide and `dc_predictor_rect` approximate-divide
54+ paths, since the test only exercises `bw != bh` shapes here)
55+- `SMOOTH_PRED`, `PAETH_PRED`
56+- All eight directional modes (`V_PRED`, `H_PRED`, `D45`/`D67`/`D113`/`D135`/
57+ `D157`/`D203_PRED`) across z1/z2/z3, both `enable_edge_filter` states, both
58+ `smooth_neighbor` states, for shapes 8x4/4x8/16x8/8x16/4x16/16x4/32x16/16x32
59+ (both 1:2 and 1:4 ratios, both orientations)
60+
61+**Transcribed-only, not independently C-verified this round**:
62+- `SMOOTH_V_PRED`/`SMOOTH_H_PRED` -- same weight-split code path as
63+ `SMOOTH_PRED` (which is verified), not separately dumped
64+- `filter_intra_edge_corner`'s rect gate (`reach >= 24`) -- exercised by the
65+ dump's angle/shape sweep whenever it applies, but not isolated as its own
66+ case
67+- The `n_top`/`n_left` < full-reach path (a block against the frame edge with
68+ fewer real neighbour samples than `bw`/`bh`) -- the dump feeds full-length
69+ synthetic neighbours throughout; this is unchanged pre-existing
70+ `Edges::build` repeat-extension logic, not something this lane's widening
71+ touches structurally, and it's exercised (for squares) by the full suite
72+
73+## Gate ladder run
74+(a) full lib suite: `EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --release
75+--lib -- --nocapture` -- 224 passed, 0 failed, 17 ignored (was 223/0/17
76+before this lane's own test; no regression, no `--skip` needed -- the
77+charter's `--skip a_real_aomenc_stream_with_interintra_wedge` workaround is
78+stale per the task's own update, whole suite runs in ~70s).
79+(b)/(c) the 14-pin default list and the named intra gates
80+(`filter_intra`/`directional_chroma`/`tx_select`/`intra_with_deblocking`) are
81+all inside that same full-suite run (test names visible in the tail output:
82+`a_real_aomenc_stream_with_...` for all of them), all green.
83+
84+## Commits (this worktree, lane-intrarect branch, not pushed)
85+- `bade5c8` feat(av1): widen intra::predict/Edges to rect (bw != bh)
86+- `6813a8a` test(av1): C-verify rect intra predictors against an independent transcription
87+
88+## Deviations from the charter
89+- Skipped the charter's stale `--skip a_real_aomenc_stream_with_interintra_wedge`
90+ per the task's explicit override.
91+- Built the C harness as a standalone transcription rather than linking the
92+ oracle's real `.o` files, matching `wedge_dump.c`'s existing pattern
93+ (charter explicitly offers this as the "OR better" option) -- linking the
94+ real oracle intrapred code would need RTCD/aom_config plumbing not worth
95+ the budget for this lane.
96+
97+## Next lane
98+Flip the KEY-frame tile dispatch (`decode.rs` ~3624/~3841) to accept the
99+17/40 refused rect/AB partition attempts now that the predictor underneath
100+is rect-capable -- out of scope for r1 by charter, unchanged this round.