# lane-mc64 r1 — RED (charter premise disproved; real defect re-localised) ## Verdict RED. The charter's defect description is wrong in its central fact: the mismatching block is **not** an inter NEWMV block off GOLDEN with a half-pel mv. It is a **64x64 INTRA block inside an inter frame** (no motion compensation happens for it in either decoder), so every one of the charter's six candidate causes (a)..(f) is about a code path this block never enters. No fix shipped; the lane is re-pointed, with the measurement chain below. ## Premise re-measurement (all commands run this round) Stream pinned as `crates/ec-av1/fixtures/av1_192x128_8bit_intra64_in_inter.obu` (byte-identical to the r2 scratch `s48.obu`, md5 `add55f625b6302c523455bb8662b19f5`, sha256 `e4cff46cb1700527c68efc866db27a2835705e949d646f73f0c9df577d594bd6`). The r2 recipe **does not regenerate it**: re-running the gate's exact aomenc argv (attempt 6 => seed 48, 192x128, `--cpu-used=2 --cq-level=40`, mandelbrot `start_scale=4.64`) on the identical y4m (md5 `6de0c8c6c3ff90715b476d966c622932`, hashed twice) yields a 19003-byte stream md5 `278be003743daed5ea116cd41056537a`, not the 26321-byte `s48.obu`. Both file-output and the gate's stdin/stdout form give the same 19003-byte result. So `s48.obu` came from some *other* r2 scratch invocation; the .obu is therefore pinned as a fixture instead of as a recipe. EVIDENCE: ~/.cache/mc64-tmp/{gen.sh,gen2.sh,g48.obu,g48b.obu,s48.obu} | ffmpeg lavfi -> aomenc twice, file and pipe forms | md5 278be00... twice vs pinned add55f6..., sizes 19003 vs 26321 Mismatch itself reproduces exactly as reported: EVIDENCE: ~/.cache/mc64-tmp/{A.ref.f0..f2,A.our.f0..f2} | aomdec EC_AV1_PREFILT_DUMP vs our EC_AV1_PREFILT_DUMP on the pinned obu | frame 0 diff 0, frame 1 diff 0, frame 2 luma diff 3720 confined to x 128..191 y 64..127, chroma diff 0 ## ROOT LOCALISATION — the block is intra, not inter 1. `aomdec EC_TRACE=1 EC_TRACE_MODE=1` interleaved: the frame-2 superblock at mi(16,32) reads `EC_PART_VAL mi_row=16 mi_col=32 bsize=12 value=0` (PARTITION_NONE, 64x64) and then **no `EC_MODE` and no `EC_IMODE` line at all** — the next trace line is the following frame's first `EC_PART` (`tell=1`). 2. Oracle source, `av1/decoder/decodemv.c:1698-1710`: `read_inter_frame_mode_info` prints `EC_MODE` only from `read_inter_block_mode_info`; the `read_intra_block_mode_info` arm (intra block in an inter frame) is **uninstrumented**. Silence there means `inter_block == 0`, not "no block". 3. Our decoder agrees: `EC_MODE mi_row=16 mi_col=32 is_inter=0 skip=false` with `EC_IB px=128 py=64 side=64 w=64 h=64`, and **zero** MC / warp / compound calls for it (`EC_MC_TRACE` instruments `mc::predict_with_filters`, `mc::predict_compound_intermediate` and `warp::warp_affine`; 33 MC calls in the whole decode, none at this block). 4. The charter's `mode=16 ref0=4 mv0=(-340,-116)` line is real but belongs to **decode-order frame 1**, where mi(16,32) is `EC_PART_VAL bsize=12 value=3` (SPLIT) into four 32x32 blocks. Frame 1 is pixel-exact for us. This is the class `[[dump-not-call-unique]]` / `[[stale-output-faked-measurement]]` again: a coordinate-keyed grep with no frame key picked the wrong call. EVIDENCE: ~/.cache/mc64-tmp/{aom_both.log,aom_part.log,mct4.log} | aomdec EC_TRACE+EC_TRACE_MODE and our EC_MC_TRACE on the pinned obu | frame-2 mi(16,32) = PARTITION_NONE 64x64 with no mode trace line; ours is_inter=0, 0 MC calls; frame-1 mi(16,32) = PARTITION_SPLIT, that is where mv=(-340,-116) lives ## What the defect actually is (direction, not yet a fix) A 64x64 **intra** block in an inter frame: luma wrong by -12..+9 over 3720 of 4096 samples, chroma (32x32, TX_32X32) bit-exact. Luma is the only plane with a 64-length transform, and `av1_get_adjusted_tx_size` codes only the top-left 32x32 of a TX_64X64. So the suspects are, in order: the TX_64X64 coefficient region / eob domain, the 64-point inverse transform's row/col zeroing, and the intra prediction of a 64x64 block. The error is structured, not a constant offset, which argues residual over prediction — 376 of 4096 samples are equal, so it is not a wholesale desync either. ## What changed * `crates/ec-av1/src/decode.rs` — `stage_dump_idx()`; `dump_stage`/`dump_stage16` now key their file on the decode-order picture index instead of always writing `.f0`. Before this, `EC_AV1_POSTDEBLOCK_DUMP`/`POSTCDEF_DUMP` compared the LAST decoded frame no matter which frame you meant (the ledger records this for the pre-8c6065e prefilt dump; the postdeblock/postcdef twins were never fixed). This is a real instrument defect, fixed, not a workaround. * `crates/ec-av1/src/decode.rs` — `EC_MC_TRACE` prints `EC_IB px py side w h` at `decode_inter_block` entry; `EC_MODE` now carries `is_inter=` and `skip=`. * `crates/ec-av1/src/mc.rs`, `crates/ec-av1/src/warp.rs` — `EC_MC_TRACE` prints `EC_MC_CALL` / `EC_MC_COMP` / `EC_MC_WARP` with the q4 position, block size, subpel fractions and resolved kernels. Placed BEFORE the whole-pel fast path so a block that takes no MC call at all is visible as an absence. * `crates/ec-av1/fixtures/av1_192x128_8bit_intra64_in_inter.obu` — the stream, pinned (`git add -f`), because its recipe does not reproduce it. ## Refusals None lifted, none added. No gate added: a gate asserting a counter for a shape whose cause is unidentified would be theatre, and the charter's counter ("64x64 NEWMV single-ref blocks with half-pel mvs") counts a population this defect is not in. deferred(root cause): the gate — needs the TX_64X64-vs-prediction split below. ## Residue * fix-now (r2): split prediction from residual for frame-2 mi(16,32) by reconstructing the block with the residual forced to zero and comparing the *shape* of the error; then bisect TX_64X64 (adjusted 32x32 coefficient region, eob domain, `row_shift_wh(64,64)==2`, the 64-point `hadamard` tail at `transform.rs:276`) against `EC_TRACE_COEFF` from the oracle. * accepted: the r2 recipe is not reproducible; the .obu is a fixture now.