forge
Explore
Log in

Don't you dare go Hollow

Lane-t900 r7 report -- sub-8x8 chroma tx_type from the chroma-reference sub-block, extended witness, film frontier

Browse files at this commit

18a7ed3ff4bc59b62e048b9f71fae02c1b8700c0Ahmet Kaan GümüşParent: 3898141
  • docs
    • lane-t900 r7 report -- sub-8x8 chroma tx_type from the chroma-reference sub-block, extended witness, film frontier
Show full message
docs(av1): lane-t900 r7 report -- sub-8x8 chroma tx_type from the chroma-reference sub-block, extended witness, film frontier
lanes/t900-r7.report.mdadded+119 -0
@@ -0,0 +1,119 @@
1+# lane-t900 r7 -- sub-8x8 inter chroma inherits the CHROMA-REFERENCE sub-block's tx_type
2+
3+Branch `lane-t900`, code+fixture commit `04154beb` on top of main `3b529205`
4+(merged first, fast-forward). `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-t900`
5+(suite/gates) and `-t900-b` (release `decode_probe`).
6+
7+## Root cause (r6's open defect, closed)
8+
9+`av1_get_tx_type` (`av1/common/blockd.h:1291-1305`) scales a chroma transform's
10+`blk_row`/`blk_col` back by the subsampling and indexes `xd->tx_type_map`.
11+`set_mi_offsets` (`av1/common/av1_common_int.h:1679`) re-points that pointer to
12+the CURRENT sub-block's mi, so for a sub-8x8 group the block current at the
13+chroma read is the CHROMA-REFERENCE (last) sub-block -- its first transform
14+unit's `tx_type` is what chroma inherits. Both sub-8x8 inter paths took the
15+group's FIRST sub-block:
16+
17+* `crates/ec-av1/src/decode.rs:23614` (`decode_inter_sub8_split4`): `i == 0` -> `i == 3`;
18+* `crates/ec-av1/src/decode.rs:24598` (`decode_inter_sub8_rect2`): `idx == 0 && (i == 0 || piece[0].is_none())` -> `idx == 0 && i == 1`.
19+
20+The `piece[0].is_none()` (INTRA first sub-block) special case disappears: under
21+the correct rule the chroma-reference block's own type is always the answer.
22+
23+No chroma `tx_type` symbol is coded, so the msac stream stayed in sync and only
24+the inverse transform's BASIS was wrong (class `tx-type-set-membership`).
25+
26+tx_type VALUES, both sides, at the defect (`~/.cache/t900-tmp/t900_h.obu`,
27+decode-order frame 14, luma 8x8 at (944,568) = mi(142,236) split HORZ into two
28+8x4 sub-blocks; the top one is skip, the bottom one codes `ADST_FLIPADST`):
29+
30+| side | rung | value |
31+|---|---|---|
32+| aomdec | `EC_TXTYPE mi=143,236 plane=0 br=0 bc=0 txs=6 tx_type=7` | luma 8x4 = ADST_FLIPADST |
33+| aomdec | `EC_TXTYPE mi=143,236 plane=1 br=0 bc=0 txs=0 tx_type=7` | chroma 4x4 = ADST_FLIPADST |
34+| ours (pre-fix) | `OUR_TXTYPE plane=1 x=472 y=284 side=4 tx_type=DctDct inh=Some(DctDct)` | chroma 4x4 = DCT_DCT |
35+
36+(V is absent from the oracle's list because its unit was `all_zero` -- which is
37+exactly why the residue was U-only.)
38+
39+Instrumentation added this round: additive, env-gated `EC_TRACE_TXTYPE` rungs --
40+oracle `av1/decoder/decodetxb.c:187` (`EC_TXTYPE mi= plane= br= bc= txs=
41+tx_type=`, built into the PRIVATE `~/.cache/t900-tmp/aom-build`, never
42+`~/.cache/aom-oracle/build`) and ours `decode.rs:14695/18480` (`OUR_TXTYPE
43+plane= x= y= (side|w,h)= tx_type= inh=`).
44+
45+EVIDENCE: ~/.cache/t900-tmp/pf_h3/, aom_tt.log:25618-25619, our_tt.log:29969-29971 | pf.sh h3 (aomdec vs ours, EC_AV1_PREFILT_DUMP16) then px.py per frame | frame 14 U diff 14 px -> 0; all 16 decode-order frames Y/U/V 0 px
46+
47+## Same-shape sweep
48+
49+Every site that hands an inherited chroma `tx_type` to
50+`read_inter_plane`/`read_inter_plane_rect` was checked (`grep -n
51+"Some(first_tx_type)\|Some(luma_tx_type)"`, 18 hits): 14 are WITHIN one block
52+(the block's own top-left var-tx unit, where the current-block rule and the
53+first-unit rule coincide -- correct), the 4 sub-8x8 group ones are the two
54+fixed paths' U and V reads. No other cross-sub-block inheritance exists.
55+
56+## Gate
57+
58+`a_10bit_128sb_film_frames_with_warp_cdef_and_interintra_decode_pixel_exact`
59+(`crates/ec-av1/src/stream.rs:30334`), the r6 witness, EXTENDED from 19 to 23
60+frame-carrying OBUs so it covers decode-order frame 14:
61+`crates/ec-av1/fixtures/reelc_sb128_inter_witness.obu`, 177773 bytes, sha256
62+`09d995946d27695ef4b7b1a24a4d7ad85f8e2c8176d58ee54e825efc061f9cbc`, 16
63+decode-order frames, 15 shown. Two independent `-ss 900 -t 2 -c:v copy` cuts +
64+`trunc.py <obu> 23` hash identically.
65+
66+New counter `sub8_chroma_tx_from_ref_hits` (`decode.rs:3323`, re-exported
67+`stream.rs:90`, printed by `decode_probe`) counts ONLY the groups that tell the
68+two rules apart: chroma-reference `tx_type` != first sub-block's AND the chroma
69+unit codes coefficients. The gate hard-asserts it > 0 (fires 2) next to its
70+eight existing counters.
71+
72+ a_10bit_128sb_film_frames_with_warp_cdef_and_interintra_decode_pixel_exact:
73+ 15 shown frames pixel-exact on every plane; warp_plane_suppress=15
74+ cdef_idx=852 inter_sb128_vert=76 interintra_rect=118
75+ non_chroma_ref_ctx_skip=194 intra_in_inter_txctx=2069
76+ edge_filter_mi_fix=206 intra16x4_in_inter=(80, 163, 113)
77+ sub8_chroma_tx_from_ref=2
78+
79+Refusals: none lifted, none added (`refusal_inventory` + `gate_coverage` green).
80+
81+## Suite
82+
83+`cargo test -p ec-av1 --lib` (systemd unit `t900-suite-r7-1788376817`, log
84+`$HOME/.cache/t900-suite-r7.log`): **426 passed, 0 failed, 38 ignored** --
85+identical to the r6 tip. Sibling gates named in the charter all green in that
86+run: the witness gate, `a_real_aomenc_10bit_stream_with_interintra_wedge_...`,
87+`a_real_aomenc_inter_sequence_with_intra_sub8x8_leaves_...`,
88+`a_real_aomenc_inter_sequence_with_a_sub8x8_inter_split_...`,
89+`a_real_aomenc_stream_with_a_sub8_rect_leaf_...`,
90+`a_real_aomenc_stream_with_a_sub8_split_...`,
91+`a_real_aomenc_stream_with_a_coded_strip_whose_chroma_is_a_4to1_or_sub8_rect_...`,
92+`refusal_inventory` (3), `gate_coverage` (9).
93+
94+## Film frontier, this tip (2 s cuts, decode-order vs aomdec `EC_AV1_FINAL_DUMP`)
95+
96+| cut | aom frames | ours | first differing | size of that diff | stop |
97+|---|---|---|---|---|---|
98+| t900 | 267 | 267 | **41** (was 14) | 1 sample: U(354,395) 490 vs 491 | -- |
99+| t5400 | 275 | 275 | **33** (was 1) | 1642397 bytes | -- |
100+| t6300 | 125 | 125 | **11** (was 1) | 35 bytes | -- |
101+| t8100 | 96 | 96 | 1 | 1313 bytes | none (r6's Golomb stop is GONE) |
102+
103+EVIDENCE: ~/.cache/t900-tmp/d_r7_{900,5400,6300,8100}/ | cmp.sh per cut, aomdec vs decode_probe, byte compare per decode-order frame | first differing frame 14->41, 1->33, 1->11, 1 (t8100 now decodes all 96 frames instead of stopping at 32)
104+
105+`~/.cache/reelc-0-10s.obu`: 240 frames decoded, NO env switches (r6's
106+"an intra-coded 128x64 block on the inter block path" stop is gone -- other
107+lanes' merges). With `EC_INTRA128_IN_INTER=1` the arm fires **0 times**
108+(`intra128_in_inter: 128x64=0 64x128=0`), so that refusal is NOT lifted: there
109+is still no witness for it.
110+
111+## Residue
112+
113+* fix-now(next round): t900 decode-order frame 41 -- ONE U sample at chroma
114+ (354,395), 490 vs 491, on the LAST chroma row, no cascade (frame 42 exact).
115+ Smells like a post-filter bottom-edge rounding, not an entropy defect.
116+* deferred(a round of its own): t5400 frame 33, t6300 frame 11 (35 bytes),
117+ t8100 frame 1 -- three independent untouched defects, each needs its own
118+ pf.sh -> sb.py -> EC_MODE ladder.
119+* accepted: the intra-128-in-inter refusal stays; 0 hits on every stream tried.