forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

t900-r1.handoff.md5.1 KiBHistoryRawDownload

lane-t900 r1 handoff -- 1:4 intra strips in an inter frame never published their TXFM_CONTEXT bands

Branch lane-t900 (base main 5dd3dcb), worktree edith_codecs-t900, CARGO_TARGET_DIR=$HOME/.cache/cargo-target-t900. Witness: ~/.cache/inter128intra-tmp/t900_2.obu (2-frame cut of the 10-bit 1920x792 128-superblock stream at 900 s). Ladders regenerated in one round in ~/.cache/t900-tmp/ (o3.trace ours EC_TRACE_PART=1 EC_TRACE_MODE_STEP=1 EC_TRACE_MODE=1, aom.trace aomdec EC_TRACE=1 EC_TRACE_MODE=1 EC_TRACE_MODE_STEP=1).

First diverging element -- before

Last common symbol: mi(24,312) tx_depth rng=38975 (filter-intra 32x32). First differing element, one superblock later:

ours aomdec
mi(0,320) tx_depth (BLOCK_8X16, cat 1) val=1 ctx=1 rng=39156 val=1 ctx=0 rng=54736

Same VALUE, different CDF ROW -> different range. EC_TXCTX mi=0,320 own=8x16 ... left_txfm=32 left=true -- our left TXFM band held 32 where libaom's set_txfm_ctxs had written 8.

Root cause

The block left of mi(0,320) is the first 32x8 strip of a PARTITION_HORZ_4 at mi(0,312) -- an INTRA strip inside an INTER frame, decoded through the key frame's own body (decode_block_rect4). libaom runs set_txfm_ctxs + txfm_partition_update for EVERY block of an inter frame, intra ones included; the 2:1 arm and the 16x4 arm of decode_intra_rect_in_inter do that at their call sites (the transform size comes back to them), but the 1:4 arms (decode_block_rect4 for 32x8/8x32, decode_block_rect64 for 64x16/16x64) keep the size inside and published nothing, so both bands stayed stale across the strip's footprint for the rest of the frame. Classes: tx-grid-published-block-side, early-return-skips-tail.

Fix (path:line, this branch)

  • crates/ec-av1/src/decode.rs publish_txfm_bands_if_in_inter() (new, next to txfm_partition_update_rect): txfm_partition_update_rect + both above_txfm/left_txfm band writes, a no-op unless INTRA_IN_INTER_MODE is set (key frames unchanged, bands unread there).
  • called right after the depth symbol resolves in decode_block_rect4 (32x8/8x32) and in decode_block_rect64 (64x16/16x64) -- depth 0 included, which is the measured case.
  • three new EC_TRACE_MODE_STEP rungs in decode_intra_rect_in_inter (y_mode, uv_mode, tx_depth with ctx/cat): that arm read six mode symbols with no rung of its own, so a bisection could previously only see the block's first coefficient.

Ladder -- after

mi(0,320) tx_depth val=1 ctx=0 cat=1 rng=54736 == aomdec; mi(0,322) rng=53468 == aomdec; next partition mi(0,324) bsize=6 rng=36404 == aomdec. The superblock at mi(0,320) now matches element for element.

Next difference in the deduped range ladder is at mi(0,152) (ours@15464 / aom@19643): aomdec prints motion_mode val=2 (WARPED_CAUSAL) + interp for the 32x16 HORZ half, ours prints txfm_split_rect -- but BOTH decoders are back at rng=37626 on the next block mi(4,152) and at rng=37736 for its mv, so this is a RUNG-SET artifact (ours reads motion_mode without a rung), not a proven divergence. Confirm with a rung before treating it as a defect.

State of the cut

  • default path: decode_probe now walks frame 2 to the known 128x64 wall -- REFUSED: an intra-coded 128x64 block on the inter block path (that arrival is no longer downstream of a desync; the r1 report's "premise is a downstream artifact" verdict is now STALE).
  • EC_INTRA128_IN_INTER=1: OK: 1 frames decoded, 1920x792, intra128_in_inter: 128x64=15 -- the whole 2-frame cut decodes, where r1 measured a Golomb-tail wall with 128x64=0.

Next step (in order)

  1. Pixel-compare the 2-frame cut vs ffmpeg (EC_PROBE_OUT16, census6/run6.sh recipe) with and without EC_INTRA128_IN_INTER=1.
  2. Re-run the full 2 s cuts ~/.cache/rectres-tmp/{t900,t5400,t6300,t8100}.obu (frames, stop string, per-frame exact).
  3. If the firing frame is exact, pin the smallest exact prefix (census4/trunc.py) as crates/ec-av1/fixtures/reelc_intra128_witness.obu (git add -f + sha256), gate every plane / every decode-order frame with a hard counter assert, lift the refusal, drop EC_INTRA128_IN_INTER, update refusal_inventory.rs + gate_coverage.rs.
  4. Full suite as a systemd unit (COMMON recipe). NOT RUN this round.
  5. Sibling sweep owed: every other caller of decode_block_rect4 / decode_block_rect64 under INTRA_IN_INTER_MODE, and the same publication question for decode_block_rect (2:1 key-frame body) if it is ever reached in-inter.

Deviations

  • Charter forbids rebase/merge, COMMON requires rebasing onto main first: the charter wins, so this branch is still on 5dd3dcb and does NOT carry main's 5d81a67 (vartxsplit) commits. The coordinator's note that main fixed decode_block_rect4's three exits refers to the frame36 r2 work already in this base (6202717); that fix covers the SPLIT/return tails, not the inter-frame band publication fixed here -- verified by the measured stale left_txfm=32.
  • Suite not run (coordinator instruction). cargo check -p ec-av1 clean.