diff --git a/lanes/COMMON-20260901.md b/lanes/COMMON-20260901.md index 6da7ff3d..07c3a305 100644 --- a/lanes/COMMON-20260901.md +++ b/lanes/COMMON-20260901.md @@ -89,3 +89,14 @@ NEVER wait with a foreground `until/while ... sleep` loop or `tail --pid`. ## NEVER pkill BY BINARY NAME (2026-09-02: one lane's `pkill -f ec_av1-` killed another lane's suite) The test binary hash is identical across worktrees. Kill only by PID you own (`$!`, or the systemd unit name you started). `pkill -f`/`killall` on cargo/ec_av1 patterns is forbidden. + +## NEVER `cargo fmt` IN A LANE (3 lanes lost their diffs to it on 2026-09-02) +main is not rustfmt-clean (~6000 lines of churn). Hand-indent; `cargo test --no-run` is the check. +If you ran it: extract your own hunks, `git checkout -- crates/`, re-apply. + +## MEMORY (user order 2026-09-02: an unsteady box fails the job) +30 GB box shared by ~10 agents. Every decode/encode/probe invocation runs under +`systemd-run --user --scope -q -p MemoryMax=6G `; suites under a unit with `-p MemoryMax=10G`; +never two suites per lane; film extracts ≤2 s; a watchdog (`ec-memwatch` user unit, log +`$HOME/.cache/ec-memwatch.log`) SIGKILLs any codec/test process above 6 GiB RSS or the largest one +when MemAvailable < 3 GiB — a killed run means YOUR command exceeded the budget: bound it, do not retry as-is. diff --git a/lanes/mcomp64-r1.report.md b/lanes/mcomp64-r1.report.md new file mode 100644 index 00000000..e0c0c454 --- /dev/null +++ b/lanes/mcomp64-r1.report.md @@ -0,0 +1,77 @@ +# lane-mcomp64 r1 — inferred COMPOUND_DIFFWTD at 64x64 + +## What changed +- `crates/ec-av1/src/decode.rs:13376` — `wedge_bsize` is now `Option`; `None` + (side 64) means libaom codes **no** `compound_type` symbol and infers + `COMPOUND_DIFFWTD` (`read_compound_type`, decodemv.c 1634-1656; guard is + `is_interinter_compound_used(COMPOUND_WEDGE, bsize)` → + `av1_wedge_params_lookup[BLOCK_64X64].wedge_types == 0`). Only the 1-bit + `mask_type` literal follows. Refusal deleted. +- `crates/ec-av1/src/decode.rs:759` — new `DIFFWTD_INFERRED_HITS` / `diffwtd_inferred_hits()`: + strictly the inferred (no-symbol) arm, narrower than `DIFFWTD_HITS`. +- `crates/ec-av1/src/refusal_inventory.rs:66` — refusal string removed (47 → 46). +- `crates/ec-av1/src/gate_coverage.rs:252` — `NEVER_ON_10BIT` is now **empty**: the new + 10-bit arm is the first recipe to spell `--enable-diff-wtd-comp=1` *and* fire it. +- `crates/ec-av1/src/stream.rs:9683` — new gate + `run_diffwtd_inferred_64x64_gate` + 8-bit and 10-bit `#[test]` arms. + +No new mask/blend code was needed: `mc::diffwtd_mask` already carries the `bd - 8` +round term and `mc::blend_masked_compound` already takes block dims + the subsampled +chroma read, so both are size- and bit-depth-generic. The `comp_group_idx` context +(`get_comp_group_idx_context`) and `record_compound_ctx_rect_mi` already gather/write +over the whole `side` span, so 64x64 needed no context work either. + +## Scope note (charter asked for more shapes) +The charter listed 64x32/32x64/64x16/16x64/8x32/32x8. This decoder's square inter path +(`decode_inter_block(.., side, ..)`, plus the 8x8 leaf `decode_inter_block8`) is the ONLY +path that reaches `read_compound_type`; every rectangular inter shape is refused one level +up by `"a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding"` +(ledger constraint, decode.rs). So 64x64 is the only wedge-less size reachable, and code for +the other shapes would be unreachable and ungateable. `deferred: rect wedge-less shapes — +unreachable until rect inter residual coding exists — unblocked by the rect-inter lane`. + +## Gate +`a_real_aomenc_stream_with_a_diffwtd_compound_64x64_block_decodes_pixel_exact` and +`a_real_aomenc_10bit_stream_with_a_diffwtd_compound_64x64_block_decodes_pixel_exact` +(`crates/ec-av1/src/stream.rs`). 128x128, 16 frames, 3 cq × 2 mandelbrot+noise variants. +Recipe pins every block to the inferred size (`--sb-size=64 --max-partition-size=64 +--min-partition-size=64`) with `--enable-masked-comp=1 --enable-diff-wtd-comp=1 +--enable-dist-wtd-comp=0` so `comp_group_idx == 1` has no other masked choice; every +frame's Y/U/V compared against ffmpeg; a decode error or mismatch FAILS (the old refusal +string is explicitly forbidden); hits snapshotted per attempt and accumulated only for +attempts that decoded AND pixel-compared (class `counter-from-refused-stream`). + +Run: +``` +CARGO_TARGET_DIR=$HOME/.cache/cargo-target-mcomp64 EC_NOMEMGUARD=1 EC_AV1_REQUIRE_AOMENC=1 \ + nice -n 10 cargo test -p ec-av1 --lib -j3 diffwtd_compound_64x64 -- --nocapture --test-threads=1 +``` +EVIDENCE: $HOME/.cache/cargo-target-mcomp64 test stdout | 2 gates, 6 aomenc encodes each, every frame Y/U/V vs ffmpeg | 8-bit 6/6 pixel-exact diffwtd_inferred_hits=79; 10-bit 6/6 pixel-exact diffwtd_inferred_hits=51; 2 passed 0 failed + +## Film probe +EVIDENCE: scratchpad/hg-head.obu (ReelB 10-bit head) | `cargo run --release -p ec-av1 --example decode_probe` on b92150f, and on b92150f + cherry-picked lane-fi8 2d5c425 (scratch worktree, main lacks fi8) | on b92150f alone: `filter intra on a HORZ/VERT strip` (fi8's refusal, hit first); with fi8: `a Golomb tail longer than this decoder reads` — the masked-compound-64x64 stop the charter recorded on lane-fi8 is GONE. + +`open: the new ReelB stop "a Golomb tail longer than this decoder reads" is not +proven to be a genuine next capability rather than a downstream desync of the newly +decoded 64x64 masked block; the gate says the blend and symbol order are pixel-exact on +real aomenc streams, but the film is not decoded end-to-end. Unblocked by a lane that +bisects that frame against the instrumented aomdec range ladder.` + +## Suite +See "Suite result" below (full `cargo test -p ec-av1 --lib` under systemd-run, log +`$HOME/.cache/mcomp64-suite.log`). + +## Suite result +`systemd-run --user --unit=mcomp64-suite-... -p MemoryMax=10G` → +`EC_NOMEMGUARD=1 EC_AV1_REQUIRE_AOMENC=1 CARGO_TARGET_DIR=$HOME/.cache/cargo-target-mcomp64 +nice -n 10 cargo test -p ec-av1 --lib -j3`, log `$HOME/.cache/mcomp64-suite.log`. +EVIDENCE: $HOME/.cache/mcomp64-suite.log | full ec-av1 lib suite on b92150f | `test result: ok. 335 passed; 0 failed; 31 ignored; finished in 405.30s` +Sibling gates re-run inside that suite and green: masked_compound / wedge / interintra / +wedge-interintra / compound_* / inter_sequence* / refusal_inventory / gate_coverage. + +## Same-shape sweep (class: alphabet collapses at a size) +The only other size-conditional wedge alphabet is interintra's `wedge_interintra` +(`is_interintra_wedge_used`); interintra itself is allowed only for BLOCK_8X8..BLOCK_32X32, +every one of which has `wedge_types > 0`, so no second instance exists on this decode path. +The 8x8 leaf (`decode_inter_block8`) is hard-coded to `wedge_bsize == 3`, correct by +construction.