edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-sb128c r1 — the 128x128 INTER block is wired (ReelC advances one refusal), its gate is RED
Branch lane-sb128c (worktree edith_codecs-sb128c), base e8e64a6 (= lane-sb128b r3, contains main 18bf7dc).
VERDICT: RED — the code lands and ReelC moves past its old stop, but no pixel-exact gate proves it yet.
MEASURED first (never assumed)
ffmpeg -t 2 -i ReelC... -c:v copy -an -f obu -> $HOME/.cache/sb128c-work/reelc2s.obu (1428 bytes; the
film's first 2 s are near-black, that size is real), decode_probe:
- BEFORE (base e8e64a6):
REFUSED: unsupported: AV1 tile (a 128x128 superblock PARTITION_NONE root on an inter frame (only the key-frame path codes a whole 128x128 block)), after the key frame decoded.SEQ: use_128x128_superblock=true bit_depth=10 max_frame=1920x792, 72 frame headers, 1 tile. - AFTER this round:
REFUSED: ... (a 128x128 superblock HORZ/VERT or AB partition (only SPLIT and NONE are decoded at the 128 root))— the next 128-level refusal in line. - Mid-film (
-ss 600 -t 2,reelc60.obu, 1.58 MB): stops on another lane's gap,an intra-coded 1:4 (or other non-2:1) rect strip on the inter block path.
EVIDENCE: $HOME/.cache/sb128c-work/{reelc2s.obu,reelc60.obu} | decode_probe under systemd-run --scope -p MemoryMax=6G, before and after the change | stop string moved from "PARTITION_NONE root on an inter frame" to "HORZ/VERT or AB partition"
Every remaining 128 refusal (grep of decode.rs + refusal_inventory.rs), after this round
a 128x128 superblock HORZ/VERT or AB partition (only SPLIT and NONE are decoded at the 128 root)—decode.rsread_sb128_root. ReelC's new stop.intrabc under a 128x128 superblock (...)— key-frame path,allow_intrabconly.an INTRA-coded 128x128 block inside an inter frame (...)— NEW this round, deliberately narrow. (The olda 128x128 superblock PARTITION_NONE root on an inter frameis gone from both files.)
What changed
decode.rsread_sb128_rootcall site in the inter tile loop (~20826):PARTITION_NONEnow setssb128_noneand decodes one 128x128 block through the existinginter_piece!macro (TxbSet::Luma64/Luma64/Chroma32,TX32,scan32, size group 3 —size_group_lookup[BLOCK_128X128] == 3), then replicates the block'scdef_idxacross its four 64x64 units and skips the superblock's other three quadrant items (same skip the key-frame loop runs).decode.rsinter_txbset_for:64 => TxbSet::Luma64—av1_get_ext_tx_set_typeisDCT_ONLYattx_size_sqr_up == TX_64X64, so notx_typesymbol is coded and the intra/inter sets coincide.decode.rsread_block_tx_size: withtx_mode == TX_MODE_LARGESTa 128x128 inter block is still FOUR TX_64X64 units (max_txsize_rect_lookup[BLOCK_128X128]), returned as leaves; the var-tx leaf refusal moves from> 32to> 64.decode.rsdecode_inter_block(both identical coefficient regions, compound and single-ref): the leaf loop's scan isdefault_scan(tx_px.min(32))(a 64-point transform codes only its 32x32 corner), and atside > 64each 64x64 mu chunk's U and V units are read INSIDE the leaf loop right after that chunk's luma leaves (libaomdecode_token_recon_blockcodes every plane of a chunk before the next chunk — sb128b r3 measured this against aomdec), recorded per unit, and collected for the block-level write-back.decode.rsread_inter_plane: on a chroma plane theluma_skip_ctxparameter now carriesget_txb_ctx's offset (+3 selectstxb_skip_chroma_32's offset-10 rows, the uv-plane-block-larger-than- the-transform case). All existing chroma callers passNone— inert.decode.rsOBMC:overlap_above/leftcapped atmin(write_h|write_w, 64) / 2, libaomreconinter.c:860/:899(AOMMIN(block_size_high[bsize], block_size_high[BLOCK_64X64]) >> 1). Without it a 128 block askedobmc_mask(64), which panickedunreachable!— the first thing ReelC hit.stream.rs: new gatea_real_aomenc_inter_128x128_none_root_decodes_pixel_exact(currently#[ignore]d, see below).refusal_inventory.rs: one line replaced.
CHARTER PREMISE CORRECTED (cited)
The charter states max_neighbor_obmc[...] = {0,1,2,3,4,8} so "128 blocks get 8 neighbours". The oracle
source says otherwise: $HOME/.cache/aom-oracle/src/av1/common/blockd.h:1466
static const int max_neighbor_obmc[6] = { 0, 1, 2, 3, 4, 4 };. Our existing max_nb (_ => 4) is already
right at 128; no change was made. What DID need changing is the overlap cap above.
The gate, and why it is RED
a_real_aomenc_inter_128x128_none_root_decodes_pixel_exact — real aomenc --sb-size=128 --cpu-used=0 --max-partition-size=128 --min-partition-size=32 --cq-level=62 --limit=8, 256x256 (both dims > 128, so
NONE/HORZ/VERT at 128 are real choices), 3 arms (8-bit tx-size-search=0, 10-bit tx-size-search=0, 8-bit
tx-size-search=1), sequence-header assert on use_128x128_superblock + bit depth, hard
inter_sb128_none_hits >= 1 per arm, every decode-order frame through decode_all_frames_vs_oracle
(panics on refusal or any differing byte, so out-of-scope mismatches are structurally 0), flags spelled once.
It FAILS on arm 1: sb128c-inter-none-8-false: this decoder refused the stream: unsupported: AV1 tile (a split intra strip whose transform unit is 32x64 ...).
Triage done this round:
- The recipe genuinely fires the shape:
EC_AV1_TRACE=1 decode_probe g8.obushowspartition_w128 value=0(PARTITION_NONE) 4 times andvalue=3(SPLIT) 10 times. - The KEY frame alone (
--limit=1,k1.obu) decodes:OK: 1 frames decoded, 256x256. - The stream is encoded with
--enable-rect-partitions=0, so a 64x128/32x64 intra strip cannot be in it: the 32x64 refusal is OUR desync talking (classrefusal-from-own-desync) somewhere at or after the first inter 128 NONE block. - An INTRA block at 128 inside an inter frame was ruled out as the cause by adding a named refusal for it (it is not what the stream stops on).
EVIDENCE: $HOME/.cache/sb128c-work/{g8.obu,k1.obu} | aomenc recipe above at --limit=8 and --limit=1, EC_AV1_TRACE=1 decode_probe | 4 partition_w128 value=0 roots; key-frame-only stream OK; 8-frame stream refuses at a 32x64 strip the encoder never coded
Suite
$HOME/.cache/sb128c-suite-r1.log (unit sb128c-suite-r1-1788325119.service, tip 31d4d68):
test result: FAILED. 370 passed; 1 failed; 33 ignored; 1034.05s. The one red was
a_real_aomenc_stream_with_film_grain_decodes_pixel_exact, and it is NOT a decode defect: it panicked on
Os { code: 2, NotFound } reading fixtures/golden6-mismatch.obu -- this worktree was created without the
fixtures symlink every sibling has (fixtures -> /home/user/Documents/Code/Rust/edith_codecs/fixtures,
gitignored). Symlink created, test re-run: test result: ok. 1 passed; 0 failed. So the suite is 371/0 in
substance; the new 128 inter gate stays #[ignore]d.
EVIDENCE: $HOME/.cache/sb128c-suite-r1.log | full lib suite as a systemd unit, then
cargo test -p ec-av1 --lib -- a_real_aomenc_stream_with_film_grain_decodes_pixel_exact after creating the
symlink | 370+1 passed, 0 failed; the red was a missing fixtures symlink in this worktree
FOREIGN EDIT: crates/ec-av1/src/decode.rs gained an EC_AV1_TRACE-only rng= field on the
partition_w64 trace at 08:15:19, after this lane's last commit (08:11:18) and by no edit of mine -- another
agent wrote into this worktree. Kept (inert unless EC_AV1_TRACE is set, and useful for r2's ladder) and
committed separately as chore(av1).
of the commit message / see the log; the new gate is #[ignore]d so the suite measures the untouched paths.
Residue
- fix-now(r2): the 128 inter NONE desync. Next step is the range ladder (instrumented aomdec
EC_TRACE_COEFFvs ours) ong8.obu's FIRST inter frame, first 128 NONE block — compare msac RANGE element by element, nevertell(). Prime suspects in order: (1)read_cdef's per-quadrant index/CDEF_TRANSMITTEDfor a NONE 128 block on the inter path; (2)maybe_read_delta_q/delta_lf granularity at a 128 root; (3) the mvstack at bw4=bh4=32 (has_top_rightat 128, tpl sample positions); (4) my mu-chunk chroma interleave (offsetSome(3)row choice / per-unitrecord_mi_chroma). - deferred: 128-level HORZ/VERT/AB on both the key and inter paths (ReelC's new stop) — unblocked by the NONE block being exact first.
- deferred:
--enable-tx-size-search=1arm at 128 and a--tile-columns=1arm — same blocker. - accepted:
an INTRA-coded 128x128 block inside an inter framestays refused by name.