edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-kf1200 r3 report — the partial-bottom-row desync, root cause found and fixed
Tip 9d18288 on lane-kf1200 (parent bee8ec0, main merged at d85d7d2).
Root cause (ONE symbol, not the partition path the charter suspected)
The charter's premise — "our 32-level gathered split_or_horz CDF/ctx differs" —
is REFUTED by measurement. A cross-decoder range ladder over the whole partial
bottom superblock row shows every partition symbol of mi_row=400 in sync,
including the gathered ones (our ctx values equal libaom's
partition_plane_context minus its bsl * PARTITION_PLOFFSET offset, and every
rng matches):
aomdec EC_PART mi_row=400 mi_col=44 bsize=6 ctx=6 rng=55482 value=3 (SPLIT)
ours OUR_PART mi_row=400 mi_col=44 bsize=6 ctx=2 rng=55482
aomdec EC_PART mi_row=400 mi_col=44 bsize=3 ctx=0 rng=52288
ours TRACE partition_w8 mi=(400,44) ctx=0 value=0 pre_rng=52288
aomdec EC_PART mi_row=400 mi_col=46 bsize=3 ctx=0 rng=53128
ours TRACE partition_w8 mi=(400,46) ctx=0 value=0 pre_rng=53128
The first differing element is the tx_depth symbol of the SECOND 8x8 leaf:
aomdec EC_ISTEP mi_row=400 mi_col=46 name=tx_depth val=0 ctx=1 rng=42998
ours EC_ISTEP mi_row=400 mi_col=46 name=tx_depth val=0 ctx=2 rng=54191
Same decoded value, different CDF row, therefore a different interval narrowing: the entropy stream is desynced from there on, and the rest of the row (and the 1595..1607 deblock spill) decodes as garbage. What the charter saw as "aomdec reads a 16x8 where we read 32x16" was our already desynced reader at mi (400,48), one block later.
ctx comes from libaom get_tx_size_context: above_txfm_context[0] >= max_tx_wide + left_txfm_context[0] >= max_tx_high. The left neighbour of
(400,46) is the 8x8 leaf at (400,44), which is skip=1 and whose tx_depth
resolved to TX_4X4 — so libaom's set_txfm_ctxs published 4 and its left term
is 0. Our decode_leaf8 skip branch fell through to a hardcoded
fill_lf_grid(leaf_mi, 2, 8, 0), publishing 8, so our left term read 1.
An intra block reads tx_depth whether or not it is skipped (libaom
read_intra_frame_mode_info calls read_tx_size above the skip branch); only a
skipped inter block records its block size instead of its transform.
Change
crates/ec-av1/src/decode.rs:10330—fill_lf_grid(leaf_mi, 2, resolved as u8, 0)(was the literal8). The non-skip TX_4X4 branch already returned early with 4; only the skip path was wrong. One line.crates/ec-av1/src/decode.rs:2652trace_edge()+ 5 call sites —OUR_PART mi_row/mi_col/bsize/ctx/rngunderEC_AV1_TRACEfor the three gathered frame-edge partition reads (there was no emitter for them, only for the full alphabet reads), pluspre_rngon the 8x8 partition trace. Instrument only.crates/ec-av1/examples/decode_probe.rs:34— printsskip_split_tx.
Sibling sweep for the same shape (a skip branch publishing the block side where
the resolved transform belongs): fill_lf_grid has 6 call sites.
decode_block (9872) already passes logical_tx; the inter 8x8 leaf (20449)
passes if split8 {4} else {8}; the inter-leaf skip early-return (19644) passes
8, which is CORRECT — a skipped inter block records its block size. The 4x4 leaf
(10541) passes 4. Only 10330 was wrong.
Gates
- NEW
the_reelb_ss600_key_frame_skipped_split_tx_decodes_pixel_exact(crates/ec-av1/src/stream.rs), pinningcrates/ec-av1/fixtures/reelb_ss600_key_frame.obu(94717 B, sha25636de46676ed7de7049d4dabe8571d8cd31c8a1f53d72011c0ee532a7c6725cd6, hashed twice,git add -f, present ingit ls-files): one 3840x1608 yuv420p10le key frame. HARD-assertsskip_split_tx_hits > 0(24 in this frame) then Y/U/V vs ffmpeg's 10-bit decode. Fixture, not aomenc, because the shape is not synthetically reachable: 80 recipes this round (4 frame shapes x 2 lavfi sources x cq 32/35/40/45/48/50/55/58/63 x cpu-used 0/3 x 8/10-bit, all with--enable-tx-size-search=1 --enable-filter-intra=1 --min-partition-size=8) returnedskip_split_tx_hits == 0every time. Widths with a partial right column (200, 264, 136, 776, 1288) additionally hit the existing named refusal "a 16x16 block whose true edge cuts through both axes", so the charter's 200x72 / 72x200 / 136x104 / 264x136 shapes cannot be compared at all today. - WIDENED
a_real_aomenc_stream_whose_frame_edge_partition_bit_is_horz_decodes_pixel_exact: three more partial-bottom-row shapes (200x72, 136x88, 264x104 — 2/4/6 mi rows) and an--enable-tx-size-search=1arm. The whole recipe ran with--enable-tx-size-search=0, so no block in it could carry a nonzerotx_depthat all (classtool-disabled-in-every-gate) — that is why 8 green arms never saw this defect. 18 arms compared pixel-exact, 10 named refusals (all the double-axis 16x16 one),edge_horz_total/edge_sub_totalstill hard-asserted; theskip_split_txcounter is reported, not gated, there.
24-key-frame census (1 frame each, ours vs ffmpeg 10-bit, differing BYTES)
r2: 11/24 exact, four multi-million-byte rows. r3: 17/24 exact, luma exact on all 24, every remaining row chroma-only.
| -ss | Y | U | V | r2 total |
|---|---|---|---|---|
| 0,300,600,1200,1500,1800,2400,3000,3300,3600,4200,4500,5100,5400,5700,6900 | 0 | 0 | 0 | 4 of these were 16.6M/48771/42343/39971/16375 |
| 900 | 0 | 40 | 50980 | 14057191 |
| 2100 | 0 | 1289 | 1067 | 15148697 |
| 2700 | 0 | 231 | 739 | 7726168 |
| 3900 | 0 | 4 | 4 | 7554023 |
| 4800 | 0 | 29 | 5 | 34 |
| 6000 | 0 | 210 | 0 | 15449720 |
| 6300 | 0 | 4 | 0 | 15410664 |
| 6600 | 0 | 124 | 124 | 15180826 |
The four charter segments (600/2400/3300/5700) are all 0/0/0.
EVIDENCE
EVIDENCE: /home/user/.cache/kf1200-tmp/a600s.part + o600s.trace | aomdec EC_TRACE=1 EC_TRACE_MODE_STEP=1 vs our EC_AV1_TRACE=1 EC_TRACE_MODE_STEP=1 on the pinned 1-frame stream | first differing element mi(400,46) tx_depth ctx 2 vs 1, rng 54191 vs 42998; after the fix ours reads ctx=1 rng=42998
EVIDENCE: /home/user/.cache/kf1200-tmp/ours600.yuv vs ref600.yuv | EC_PROBE_OUT16 decode vs ffmpeg -pix_fmt yuv420p10le | cmp -l = 0 differing bytes of 18524160 (was 48771)
EVIDENCE: /home/user/.cache/kf1200-census-r3.log | 24 key frames extracted with -frames:v 1 -c:v copy, per-plane byte diff vs ffmpeg | 17/24 all-zero, luma zero on 24/24
EVIDENCE: cargo test -p ec-av1 --lib a_real_aomenc_stream_whose_frame_edge_partition_bit_is_horz -- --nocapture | 7 shapes x 2 tx arms x 2 depths | 18 arms pixel-exact, 10 named refusals, edge bits 64-level horz/vert up to 3, sub-level up to 9
EVIDENCE: cargo test -p ec-av1 --lib the_reelb_ss600_key_frame -- --nocapture | pinned fixture decode vs ffmpeg 10-bit | "24 skipped 8x8 TX_4X4 leaves, frame pixel-exact"
Suite
cargo test -p ec-av1 --lib (systemd unit, EC_AV1_REQUIRE_AOMENC=1): 379 passed, 0 failed,
33 ignored, 514.26 s — /home/user/.cache/kf1200-suite-r3.log.
Residue
- deferred(-ss 4800, U=29/V=5): chroma-only, 8x4 chroma patch at (540,1200) —
unchanged by this round, still the r2 pair-mi sibling hypothesis. Unblocked by
an
EC_IMODE_VAL/EC_PREDladder at luma mi ~(270,600); I ran out of turn budget after the census. Same for the other six chroma-only rows (900 V=50980 is the largest and the only one big enough to be a second desync rather than a prediction/edge-filter off-by-one). - accepted: the charter's partial-RIGHT-column gate shapes (200x72 etc.) cannot be compared until the "16x16 block whose true edge cuts through both axes" refusal is lifted; they are in the gate and currently take the refusal arm.
- No refusal was lifted this round;
refusal_inventory.rs/gate_coverage.rsuntouched.