forge
Explore
Log in

Don't you dare go Hollow

lane/av1422rect4dead: lane report

Browse files at this commit

c9f9b402936a80139103ea2acd9e0b1fcc878937Ahmet Kaan GümüşParent: 2cfb795
lanes/av1422rect4dead.report.mdadded+91 -0
@@ -0,0 +1,91 @@
1+# lane/av1422rect4dead — `decode_rect4_16_intrabc` `else` arm at ss (1,0)
2+
3+Branch of main `c38dd788ec4fc12e0b5d616f6c9773d7f849bb89`. Lane commit
4+`3a7f31c9`. Primary stayed on `main` throughout; nothing pushed, nothing merged.
5+
6+## Verdict
7+
8+UNREACHABLE at ss (1,0) — closed with an assertion, per the repo rule. The
9+arm is LIVE at ss (1,1) and inert at ss (0,0); behaviour at both is unchanged
10+(no decode-path edit, no halving rewrite).
11+
12+## The arm (re-read on main, unchanged in the worktree)
13+
14+`decode.rs` `decode_rect4_16_intrabc`, the `else` of the `(cw, ch)` select
15+(was 18500–18504) and the origin select (was 18516–18524):
16+
17+- `!own_chroma` ⇒ `(pw / 2, ph / 2)` with `(pw, ph)` = (16,8)/(8,16) → (8,4)/(4,8)
18+- `!own_chroma` ⇒ origin `(pair_mi.1 * MI / 2, pair_mi.0 * MI / 2)`
19+- `own_chroma = own444 || own422`, `own422 = ss_x==1 && ss_y==0 && horz`
20+
21+So at ss (1,0) the arm runs only with `!horz`, i.e. the (4,16) VERT_4 strip.
22+
23+## Reachability, re-derived from the guard's own predicate (not inherited)
24+
25+1. Sole caller: `decode_rect4_16_intrabc(` appears exactly once as a call in
26+ the decode body (`decode_rect4_16_strip`, 19100 on main). Crate-wide grep
27+ over `crates/**.rs`: only that site plus a doc mention in stream.rs.
28+2. `decode_rect4_16_strip(` has exactly two callers: `decode_rect4_16`
29+ (17746) and `decode_intra_rect_in_inter` (13951).
30+3. `decode_rect4_16` is dispatched only from the key-frame 16-level 1:4 arm
31+ (37569), inside `if part16 == PARTITION_HORZ_4 || part16 == PARTITION_VERT_4`
32+ (37555), BELOW `refuse_invalid_subsize((16, 16), part16)` (37248).
33+4. `decode_intra_rect_in_inter` reaches `decode_rect4_16_strip` only through
34+ `strip16` (46277), built from `fctx.inter_strip_chroma` (42346) whose ONLY
35+ writer is the inter 16-level 1:4 arm (56021), inside
36+ `part16 == PARTITION_HORZ_4 || part16 == PARTITION_VERT_4` (55939), BELOW
37+ `refuse_invalid_subsize((16, 16), part16)` (55705).
38+5. The guard's own predicate: `partition_subsize_dims((16,16), PARTITION_VERT_4)
39+ == (4,16)` and `(4,16) ∈ PLANE_BLOCK_INVALID_422` ⇒
40+ `chroma_plane_block_codable(4, 16, 1, 0) == false` ⇒ the guard errs before
41+ either dispatch. HORZ_4 gives (16,4), legal at (1,0) — and that strip takes
42+ `own422`, never the else arm.
43+
44+Per-format disposition:
45+
46+- ss (1,0): the only shape that could enter the arm is refused one level up;
47+ the arm is dead. The dispatch itself can never be reached with VERT_4.
48+- ss (1,1): both 1:4 subsizes are codable; the arm is live and correct (4:2:0
49+ pair geometry).
50+- ss (0,0): `own444` wins the select; the arm is unreachable by construction.
51+
52+## Change
53+
54+- `decode_rect4_16_intrabc` `else` arm: added
55+ `assert!(!(ss_x(fctx) == 1 && ss_y(fctx) == 0), ...)` naming the (4,16)
56+ VERT_4 shape and the ss (1,0) subsampling, above the unchanged
57+ `(pw / 2, ph / 2)` halving. Fires only if the closure breaks; cannot fire
58+ at ss (1,1) (condition false) or ss (0,0) (`own444` selected first).
59+- New gate `decode::tests::decode_rect4_16_intrabc_else_arm_stays_closed_at_422`:
60+ (a) the assertion must exist inside the function's `(cw, ch)` else arm and
61+ name `ss_x(fctx) == 1 && ss_y(fctx) == 0`; (b) caller counts re-derived
62+ (1 and 2); (c) both routes' `refuse_invalid_subsize((16, 16)` ordered above
63+ their 1:4 arm tests, scoped per enclosing function; (d) the closed cell's
64+ arithmetic re-executed — (4,16) invalid at (1,0), (16,4) codable at (1,0),
65+ both codable at (1,1) and (0,0).
66+
67+`decode_intrabc_owned_rect` untouched (other lane's function).
68+
69+## Non-vacuity (mutation-proof, red-before)
70+
71+| Mutation | Gate |
72+|---|---|
73+| M1: delete the in-arm assertion | FAILED (expected) |
74+| M2: delete key-frame 16-level guard (37248) | FAILED (expected) |
75+| M3: delete inter 16-level guard (55705) | FAILED (expected) |
76+
77+Worktree restored clean after each; committed tree is the unmuted one.
78+
79+## Checks
80+
81+- `cargo check -p ec-av1`: clean (one pre-existing `pin_reporting` dead-code
82+ warning, present on main).
83+- Scoped test: gate PASSES (1 passed). Pre-existing census test
84+ `every_chroma_walking_leaf_dispatch_is_guarded_or_closed_with_a_reason`
85+ still PASSES. No full suite per charter.
86+
87+## Item 5 disposition
88+
89+`lanes/av1floorshift.report.md` item 5: CLOSED by construction (assertion),
90+not merely by the guard one level up — the guard chain is now checked by the
91+gate, and the arm self-reports if it is ever entered at ss (1,0).