forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

sb128c-r2.report.md5.1 KiBHistoryRawDownload

lane-sb128c r2 — the 128 inter NONE desync is a uv_mode ALPHABET bug (root cause, cited); gate still RED on a NEW, real blocker

Branch lane-sb128c, tip edbdd7b (base r1 72a93d8). VERDICT: RED on the gate, GREEN on the defect: the desync r1 chartered is found and fixed at root cause, and the gate now stops on a genuinely different, unimplemented shape (proved against aomdec, not a self-desync).

TASK A — root cause

crates/ec-av1/src/decode.rs:18713 (decode_inter_block's intra tail) read cdfs.uv_mode_cfl[mode] unconditionally. libaom read_intra_block_mode_info calls read_intra_mode_uv(ec_ctx, r, is_cfl_allowed(xd), bsize) and is_cfl_allowed (~/.cache/aom-oracle/src/av1/common/blockd.h) is block_size_wide[bsize] <= 32 && block_size_high[bsize] <= 32. So any intra block 64 px or wider inside an INTER frame must read the 13-symbol uv_mode_no_cfl alphabet. Reading the 14-symbol CFL one yields the same VALUE from a different interval — class wrong-alphabet-same-value. Fix: let cfl_allowed = write_w.max(write_h) <= 32; then the two-branch read (the split every other uv_mode reader in the file already makes: decode.rs:5521, 6203, 8500).

Method (charter's ladder, RANGE never tell()):

  1. EC_TRACE_MODE=1 EC_TRACE=1 aomdec g8.obu vs ours; EC_MODE ranges agree block for block until the 64x64 block at mi (0,32) of an inter frame.
  2. Added the pre-read range to our partition_w64 trace: entry rng 61470 == aomdec 61470; the NEXT partition (mi (0,48)) is ours 35887 vs aomdec 54271 → the divergence is inside that block.
  3. EC_AV1_TELL bit ladder: the block spans tell 170→192 in ours, 154→173 in aomdec (same 16-bit constant offset at entry) → we over-read ~4 bits; is_inter=0 skip=0 side=64 on both sides, so it is the intra tail, and the only symbol whose alphabet depends on the 64-px size is uv_mode.
  4. After the fix the ladder tracks through this block and every later one, up to a real new stop.

EVIDENCE: $HOME/.cache/sb128c-work/{aomdec.all,ours.trace} | EC_TRACE/EC_TRACE_MODE/EC_TRACE_COEFF aomdec vs EC_AV1_TRACE/EC_TRACE_MODE/EC_AV1_TELL decode_probe on g8.obu, both under systemd-run --scope -p MemoryMax=6G | partition rng at mi (0,48): 35887 → 54271 (== aomdec) after the fix; refusal moves from "a split intra strip whose transform unit is 32x64" to a shape aomdec confirms exists

TASK A — the gate is still #[ignore]d, and why (this is NOT a self-desync)

g8.obu now decodes past every inter 128x128 PARTITION_NONE block (aomdec confirms four of them, e.g. EC_PART_VAL mi_row=0 mi_col=32 bsize=15 value=0 + EC_MODE ... rng=63756, which our trace matches exactly: EC_MODE mi_row=0 mi_col=8 rng=63756 is_inter=1 skip=1 side=128). It then stops on an INTRA-coded 128x128 block inside an inter frame — and aomdec's own trace shows that block is real: EC_PART_VAL mi_row=32 mi_col=32 bsize=15 value=0 with no EC_MODE line (aomdec only instruments the inter mode reader), followed by EC_COEFF plane=0 tx_size=4 / plane=1 tx_size=3 ctx=10 per 64x64 mu chunk. Exactly ONE such block exists in the whole 8-frame stream, in the same frame as the inter 128 NONE blocks, so no --limit truncation dodges it.

Recipe search for a stream carrying the inter 128 NONE without the intra one: seeds 62..67 on the same recipe all refuse on OTHER lanes' gaps (sub-8 inter leaf ×3, 16-level inter AB/1:4, non-skip rect strip) or on the same intra-128 (seed 63). Report line, not a claim of impossibility.

EVIDENCE: $HOME/.cache/sb128c-work/{s62..s67}.obu + seeds.sh | 6 aomenc encodes (flags spelled once) + decode_probe each | 0/6 decode whole; refusal strings listed above

TASK B — film_grain 8-bit gate: pre-existing flake, not lane-caused

  • base e8e64a6 in a detached worktree, own CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sb128c-base: a_real_aomenc_stream_with_film_grain_decodes_pixel_exact → 1 passed; 0 failed ($HOME/.cache/sb128c-base-fg.log).
  • this tree, same test alone → 1 passed; 0 failed. So r1's suite red was environmental (10 lanes sharing the box), not a lane regression. It is re-run in the r2 full suite below.

TASK C — not started (turn budget)

ReelC re-probe

reelc2s.obu (2 s, 10-bit, use_128x128_superblock=true): stop string moved a 128x128 superblock HORZ/VERT or AB partition (r1) → a split transform on a 1:4 inter strip with a 64-px axis (another lane's gap). EC_AV1_FINAL_DUMP frame count: 1.

Suite

$HOME/.cache/sb128c-suite-r2.log — see the tail of this file / the handoff for the final N/0.

Residue

  • fix-now(r3): decode an INTRA-coded 128x128 block inside an inter frame — the intra tail of decode_inter_block needs the same 64x64 mu-chunk interleave the inter branch already has (decode.rs:17304-17520): per chunk one TX_64X64 luma unit then that chunk's TX_32X32 U and V units (aomdec shows chroma txb_skip ctx 10). Unblocks the r1 gate.
  • deferred: 128-level HORZ/VERT and AB partitions (ReelC's r1 stop) — unblocked by the above.
  • accepted: the 8-bit --enable-tx-size-search=1 arm and a --tile-columns=1 arm ride the same gate.