forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

av1422g.report.md5.7 KiBHistoryRawDownload

lane-av1-422g — sub-8 even-column chroma-ref arm; STOP: split4 is never reached on t422

Outcome

STOP with the 4:2:2 header refusal in place, byte-identical (the local EC_AV1_ALLOW_422_PROBE bypass was reverted before commit; the probe refuses without the env — frames_dispatched: 0). The even-column chroma-reference arm for ss (1,0) is in decode_leaf_split4 per the parent's rule (is_chroma_ref = !(mi_col & ss_x), one TX_4X4 chroma unit per plane per even-column leaf, 4:2:0 keeps its single bottom-right leaf), but it is UNPROVEN and — the round's real finding — UNREACHABLE on this fixture:

the frame-0 partition walk never takes an 8x8 PARTITION_SPLIT. An EC_AV1_TRACE probe printed zero split8 group entries before the run dies at decode_rect4_16_strip's closed-shape panic. Our trace is byte-identical to 422f's (modulo pid), so the divergence 422f attributed to the mi(9,10) sub-8 chroma begins EARLIER: by the time the walk reaches the 8x8 at mi(8,10), ours reads a partition value that is not SPLIT, while the oracle's own trace decodes four 4x4 leaves at mi(8,10)/(8,11)/(9,10)/(9,11). Per instruction 2 the named stop line is:

crates/ec-av1/src/decode.rs:14888 — unreachable!("decode_rect4_16_strip chroma shape set is closed")

reached with chroma shape (16, 64) off a luma=32x64 tx=16x16 strip (the EC_RECTCHROMA_GAP luma=32x64 tx=16x16 chroma=16x64 diagnostic prints right before the panic; the 16 prints of luma=16x8 → chroma=8x8 earlier are the 4:2:2 square rows downstream and are harmless). decode_rect4_16_strip was not edited; that panic is the next lane's gate, not this one's fix.

Change (decode.rs + decode_probe.rs only)

  • decode_leaf_split4: has_chroma now branches per subsampling — 4:4:4 every leaf, 4:2:2 (lmi.1 & 1) == 0 (every even-mi-column leaf), 4:2:0 i == 3 unchanged. A chroma_422 flag (ss_x 1, ss_y 0) and a last_uv422 coarse-slot value were added; the group tail gained a 4:2:2 branch that only fills above_uv_mode/left_uv_mode from the group's last chroma-reference leaf (bottom-left), and the tail's chroma state stamp is skipped at 4:2:2 (the per-leaf units already stamped).
  • New sub8_leaf_chroma422 (beside sub8_leaf_chroma444): one square TX_4X4 chroma unit per plane at the chroma position (px >> ss_x, py >> ss_y) — ss_size_lookup[BLOCK_4X4][1][0] is BLOCK_4X4, so the (2,4) plane area rounds up to the square 4x4 read — via read_plane's proven TxbSet::Chroma4 + TX4 route, with Neighbours::around_mi_422_chroma(lmi, 8, 4) context reads (the unit's 4 chroma-px width spans TWO luma mi columns; sampling every second above cell counts each chroma column once), cfl_src_rect(px, py, 8, 4) CfL source, skip arm (predict-only, intrabc-slot disarm counted), intrabc arm (frame copy at the DV with the ss shifts), and per-leaf entropy stamping (1 mi row tall, both luma mi columns of the one chroma column).
  • New CHROMA422_SUB8_HITS witness counter, bumped only on the two coefficient-reading arms (skip does not count); printed as chroma422_sub8 by examples/decode_probe.rs.
  • Untouched: decode_leaf8, decode_rect4_16_strip, decode_block_128rect, decode_rect_split, the 4:2:0 group tail (including its SKIP arm at decode.rs:19169-19170 — the sibling-owned flat-DC miss), the square-block selection arm, stream.rs (bypass reverted; refusal string byte-identical), refusal_inventory.rs.

Measurement

Fixture /tmp/t422.obu, sha256 d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129 (reused by hash, 256x144, 22 frames). Ours decode_probe (debug, gate-counters, private target dir) with the LOCAL env bypass; oracle traces from 422f left at /tmp/oracle422.txt.

  • Reach probe: with EC_AV1_TRACE=1, a temporary per-group print in decode_leaf_split4 (since removed) fired ZERO times before the panic — split4 never runs on this stream; the arm cannot fire, and the chroma422_sub8 counter reads 0 for the trivial reason.
  • Trace identity: our full run (stderr trace, 13029 lines) is byte-identical to 422f's /tmp/ours422f.txt except the panic line's thread id — the 422g changes do not alter the trajectory, confirming the pre-split8 divergence.
  • cargo check -p ec-av1 (private target dir): 0 warnings.
  • 420 gate green: a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ whose_tx_split_decodes_pixel_exact 1/1 passed (cargo test -p ec-av1 --lib); all new arms are keyed on ss (1,0), unreachable at 4:2:0/4:4:4.

Next divergence (restated, for the lane that owns the walk)

The first live defect is UPSTREAM of sub-8: between the last symbol-level match (mi(8,0) 8x8 leaf's V) and the mi(8,10) 8x8, ours mis-reads the 8x8 partition symbol (oracle SPLITs, we do not), and the desynced walk later lands on the 32x64 strip whose 16x64 chroma has no table row (panic above). Two candidate sites for whoever picks this up: the partition-symbol context feeding partition_w8 after an 8x8 leaf run (422f's tail bookkeeping changed side_mi/partition ctx for the following sibling), or an 8x8-leaf chroma/context read that consumes the wrong rng count and shifts every later partition read. Note the rect split4 sibling (the 8x16/16x8 group walker with bw/bh args, ~decode.rs:20500) has the same 4:2:0-style chroma and will need the same even-column treatment once the walk reaches any rect sub-8 group at 4:2:2.

State

  • Refusal a chroma format of 4:2:2 (subsampling_x != subsampling_y)... byte-identical; git diff touches only decode.rs and decode_probe.rs; probe refuses without the env (frames_dispatched: 0).
  • Committed on lane-av1-422g (5e163e94). No push.
  • Traces left at /tmp/ours422g_trace.txt (EC_TRACE_COEFF run) and /tmp/ours422g_t2.txt (EC_AV1_TRACE reach run).