forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

sb128b-r2.report.md6.4 KiBHistoryRawDownload

lane-sb128b r2 — ReelC's key frame is BIT-EXACT; the 128 chroma TU loop; the 128 root's residual

Branch lane-sb128b, worktree edith_codecs-sb128b, commits 4e13f60, 1524838, c415a31 (off r1's d3bc8da + git merge main b51719f, clean).

FIRST: the ReelC KEY-frame pixel check (the charter's first task — first ReelC pixel measurement ever)

EVIDENCE: $HOME/.cache/sb128b-work/{reelckf0.obu,ours.f0.yuv,ref.yuv} | ffmpeg -ss 0 -t 2 -c:v copy -frames:v 1 -f obu off the real film (74 B, 1920x792 yuv420p10le) → dump_yuv (release, 6G scope) vs ffmpeg -pix_fmt yuv420p10le -f rawvideo | cmp says BYTES EQUAL — ReelC's key frame decodes BIT-EXACT (4 561 920 bytes, 0 differing samples).

It was NOT exact before the merge. Pre-merge measurement (same artifacts, r1's tree): Y 36448 samples off (max |d| 2), U/V 9483 each (max |d| 4), all inside the bottom partial superblock row — luma rows 765..791 (768 = 6*128, frame is 792 tall) plus 3 deblock rows above, +1 per 16-row band, ref uniformly flat (this key frame is black). git merge main (lane-oddh's odd-frame-size work) removes it entirely. Class: [[stale-premise lanes]] — the lane's base predates the fix.

ReelC now stops at an inter frame under a 128x128 superblock (probe on the 2 s cut, 72 frame headers parsed) — the sibling lane-sb128 r3's residue, exactly as r1 predicted.

Merge seam (had to be fixed before anything could run)

main b51719f re-introduced lane-oddh's blanket refusal a sequence using 128x128 superblocks on a frame larger than 64x64 (stream.rs) — textually a clean merge, semantically a lane-killer (the ledger's recorded merge seam constraint). Deleted, with its inventory line, and its gate a_real_aomenc_128x128_superblock_stream_is_refused_by_name turned into ..._decodes_pixel_exact.

EVIDENCE: cargo test -p ec-av1 --lib -- a_real_aomenc_128x128_superblock_stream gate_coverage | real aomenc 64x72 mandelbrot --cpu-used=0 --sb-size=128 (use_128x128_superblock asserted in the stream), decoded vs ffmpeg | ok — 10 passed, 0 failed; the frame's Y/U/V match ffmpeg sample for sample. One recipe change was needed and is unrelated to the 128 root: at 64x72 aomenc also picks PARTITION_HORZ_4 below 16x16, so the gate now passes --enable-1to4-partitions=0 --min-partition-size=16 (gate_coverage green with it).

TASK A — the chroma half of a 128x128 PARTITION_NONE block (landed, not yet exact)

crates/ec-av1/src/decode.rs

  • decode_block's multi-TU arm now codes cn = chroma_side / chroma_tx squared chroma units per plane instead of one whole-plane unit. av1_get_max_uv_txsize(BLOCK_128X128) = av1_get_adjusted_tx_size(max_txsize_rect_lookup[BLOCK_64X64]) = TX_32X32, so a 128 block is 2x2 TX_32X32 per plane; cn == 1 (every block at 64 and below) is byte-for-byte the read this always did. Per unit: around_mi gathered over the unit's own 64-luma-pixel span (which is also its txb_skip_ctx, read_plane's chroma branch), tu_reach on the matching luma quadrant, own set_palette_pred.
  • Neighbours::record_mi_chroma (new, next to record_mi_luma): per-unit chroma coefficient context, luma-mi indexed with record_split_luma_rect_mi's own frame-edge clamp. Applied AFTER record_split_luma so the per-unit state is what the next block reads.
  • The skip arm predicts per transform unit now (libaom predicts inside the transform-block loop); n_axis == 1 / cn == 1 is the unchanged whole-block call.
  • counter chroma_split_tx_hits().

Result: not pixel-exact, so the refusal is BACK, reworded to what was measured. EVIDENCE: $HOME/.cache/sb128b-work/g42.obu (the gate's own arm reproduced by hand: gradients seed 42, 384x384, cq63, --sb-size=128 --cpu-used=0 --enable-tx-size-search=0) | dump_yuv vs ffmpeg -pix_fmt yuv420p | 139162/147456 luma samples differ, first at row 0 col 60 (ours 114, ffmpeg 115). ffmpeg's row 0 is a CONSTANT 115 across the whole first unit where ours ramps 115 → 112, and the stream is 76 bytes: the mode and the DC agree, our first TX_64X64 luma unit reads AC coefficients libaom never wrote. So the divergence is inside that unit's coefficient read, not in chroma and not in prediction.

Refusal now reads: a 128x128 PARTITION_NONE block (four TX_64X64 luma and four TX_32X32 chroma units all decode, but the first unit's coefficients already carry AC where libaom has DC only -- lane-sb128b r2's open entropy residual). Gate a_real_aomenc_key_frame_with_a_128x128_none_partition_decodes_pixel_exact stays #[ignore]d as the reproducer, with its plane asserts rewritten to LOCATE the divergence (count + first row/col/values) instead of printing 147 456 samples.

Also corrected in that gate's doc: r1 wrote "ONE TX_64X64 chroma unit per plane / TxbSet::Chroma64"; the truth is four TX_32X32 and no Chroma64 set exists or is needed.

Not done

  • deferred: TASK A's tx_select at 128 arm (--enable-tx-size-search=1) — not added — unblocked by the NONE arm being exact at all (an inexact arm cannot gate a tx-depth counter).
  • deferred: TASK B (HORZ/VERT + AB at 128) — not started, refused by name (a 128x128 superblock HORZ/VERT or AB partition) — unblocked by the same residual.
  • deferred: TASK C (inter 128) — not started, refused by name on both this tree and the sibling's (an inter frame under a 128x128 superblock) — unblocked by lane-sb128 r3 lifting its inter root refusal; nothing of TASK C was written, so nothing is "ready behind" it.
  • git merge lane-sb128 NOT done: the sibling's tip is dbf15a4 (gate-recipe fix only, no inter-128 lift yet), so there was nothing to take.

Suite

r2's first run ($HOME/.cache/sb128b-suite-r2.log, unit sb128b-suite-r2-1788322817.service) was armed at the intermediate commit 1524838 and is superseded. Its FAILED list: the 2 rect/AB reds inherited from 807c110 (a_real_aomenc_10bit_rect_and_ab_partitions_decode_pixel_exact, a_real_aomenc_10bit_stream_with_a_32_level_ab_partition_decodes_pixel_exact) — still red after git merge main b51719f, so main did NOT fix them — plus the two 128 gates that this round's final commit resolves (..._128x128_superblock_stream... now green, ..._128x128_none_partition... now #[ignore]d). The authoritative run for c415a31 is unit sb128b-suite-r2b-1788323051.service → $HOME/.cache/sb128b-suite-r2b.log; it was still running at this round's tool-call ceiling. NOT a clean-suite claim: read that log for the totals before merging.