forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 052d1d3f81ff6b9e7c09b93b58c5e772d825fcb3Filtered to crates/ec-av1/src/decode.rsClear filter

2026-09-30

lane-av1422chrtx: a 32-point INTER chroma unit inherits the luma's IDTX; fix the tx_type clamp and flip the tripwireAhmet Kaan Gümüş · a3e343b
lane-av1422chrtx: a 32-point INTER chroma unit inherits the luma's IDTX; fix the tx_type clamp and flip the tripwire

libaom's av1_get_ext_tx_set_type (blockd.h) resolves a 32-point chroma
unit to EXT_TX_SET_DCT_IDTX when the block is_inter, and
av1_get_tx_type's chroma branch reads the SAME xd->tx_type_map cell the
luma unit stamped. So an Intra-Block-Copy block whose luma coded IDTX runs
the IDENTITY transform on its chroma.

read_plane and read_rect_chroma_unit both hardcoded '32-point chroma is
DCT_DCT', reading libaom's clamp as tx_size_sqr_up >= TX_32X32 when it is
txsize_sqr_up_map[tx_size] > TX_32X32 (64 and up). That arm ran before the
armed intrabc_chroma_tx slot could, so the inherited IDTX was swallowed and
a 32-point IDCT ran where libaom ran a plain copy of the dequantized
coefficients >>2.

Confined to 32-point chroma of an intrabc block whose luma coded IDTX:
64-point chroma still reduces to DctDct, intra chroma at 32+ is untouched,
sub-32 units are byte-identical.

- 320x232 and 320x248: 0/0/0 wrong, 16/16 frames exact each.
- Comparator control re-run: a flipped oracle byte reports exactly +1 in
  the right plane and one fewer exact frame.
- 27-cell sweep 19 -> 25 exact. 320x236 and 322x248 still fail, both with
  LUMA errors -- a separate odd-dimension defect, not claimed here.
- 4:4:4 chroma-tx gates pass; scoped intrabc/chroma run 68 passed, 0 failed.
- Ratchet flipped to exactness and renamed
  the_pinned_420_oddheight_witness_is_pinned_and_decodes_byte_exact;
  mutation proof reds with exactly the pre-fix (0, 200, 17658).
- The old non-vacuity test relied on the witness differing and was vacuous
  once it was exact; replaced by
  the_counting_oracle_diff_detects_one_flipped_oracle_byte.
Merge lane-av1ichromatx: close the last block-level chroma tx_type handoff in decode_inter_blockAhmet Kaan Gümüş · 909de54
Merge lane-av1ichromatx: close the last block-level chroma tx_type handoff in decode_inter_block

The recorded defect (777/640/554 wrong V samples on the pinned 444_quad_leaf_tx_type witness) does
NOT reproduce on main: 0 wrong on all four frames, byte-identical to the instrumented aomdec. The
recorded numbers are the MUTATION red from lanes/av1444chr.report.md, not a live measurement, and
both fix commits are ancestors (6c33f204 four-unit 4:4:4 arms; 2142d2cf read_inter_rect_chroma
sibling). The three sites were relocated: A and B already resolve per unit; C (the whole-plane square
chroma arm's Some(luma_tx_type)) is an IDENTITY, not a defect -- its single chroma unit reads the
block's own MI (0,0) cell and luma_tx_type is leaves[0]'s coded type (41 reads, 0 differ). What
lands: read_inter_rect_chroma's block-level FALLBACK -- the one live block-level handoff -- is closed
with debug_assert!(leaf_tx_types.is_empty()) naming the defect shape, two counters, and a gate
asserting multi_fallback >= 2 so the assertion cannot go vacuous. Mutation (forcing the covering-leaf
resolve to miss) reds both the assertion and the gate; 0 occurrences of the bad shape across 90
streams (87 committed pins + 3 fresh server encodes).
ec-av1: close the last block-level chroma tx_type site in decode_inter_blockAhmet Kaan Gümüş · 4ebd218
ec-av1: close the last block-level chroma tx_type site in decode_inter_block

The recorded 4:4:4 lossy divergence (777/640/554 wrong V samples on frames
1/2/3 of fixtures/444_quad_leaf_tx_type.obu, sha256 a06c9f7a...) does NOT
reproduce on main: that stream is byte-identical to instrumented aomdec on
all four frames, before and after this change. Those numbers are the PRE-fix
figure from lanes/av1444chr.report.md; the fixes 6c33f204 (both four-unit
4:4:4 arms) and 2142d2cf (the read_inter_rect_chroma sibling) are already
ancestors of main.

Re-located by grep, the three block-level handoff shapes are: the four-unit
arm (per-unit since 6c33f204), the rect sibling's per-unit resolve (since
2142d2cf), and the whole-plane square arm, which is an IDENTITY -- its one
chroma unit reads the block's own MI (0,0) cell, and luma_tx_type is
leaves[0]'s coded type, measured at MI (0,0) in 15/15 vartx blocks.

What remained is the rect sibling's FALLBACK: the branch taken when no luma
leaf covers a unit's own cell. It fires 4x on the pinned rect witness, all on
a multi-unit chroma plane -- the shape where a block-level value could
mistype a unit. Every observed firing has an empty leaf list, i.e. a block
that coded a SINGLE luma transform whose stamp covers the whole plane, so the
fallback is correct there; the wrong shape is a fallback while leaves is
NON-empty. Measured over the 87 committed fixtures plus 3 fresh 4:4:4 lossy
streams: 0 occurrences. Closed with an assertion rather than a comment, plus
CHROMA_RECT_BLOCK_TX_FALLBACK{,_MULTI} and a gate that asserts the guarded
shape is reached (measured 4/4) so the assertion cannot go vacuous.

Red-before by mutation: forcing the covering-leaf resolve to miss on a
multi-unit plane turns the assertion red on the same witness --
"a multi-unit rect chroma plane fell back to the block-level tx_type while 5
luma leaves were coded". Reverted; green.

Neighbours re-quoted unchanged, all compared against instrumented aomdec:
the two four-unit gates (96 quad-resolved units, 8 differing; 88/96
single-reference), the rect-sibling gate (4 resolved, 2 differing), both
4:4:4-lossless gates, and per-frame byte comparison on 8 streams (4:4:4
quadrant, rect strip, two lossless 4:4:4, a 4:2:0 control, three fresh server
encodes) -- all EXACT, 0 wrong samples per frame. cargo check --all-targets
clean.
Merge lane-av1dcunit: the 2x1/1x2 rect tiled chroma walk must give each unit its OWN above-right reachAhmet Kaan Gümüş · 73a4a77
Merge lane-av1dcunit: the 2x1/1x2 rect tiled chroma walk must give each unit its OWN above-right reach

The assigned defect was already fixed on main (chromadc, e05a6ceb/2c0fd2b9, merged 15 minutes after
the report that spawned the ticket measured on the older base 5324a685), and the ticket's stated
mechanism is wrong for that witness: an intra-BC block never goes through av1_predict_intra_block, so
there is no per-unit DC and no per-unit above/left -- the prediction is ONE whole-plane-block motion
copy (decodeframe.c:686-688, reconinter_template.inc:228 makes the reference the destination itself),
which is exactly what the crate's whole-plane PALETTE_PRED override is.
The class sweep then found the sibling cell genuinely broken: decode_rect_split's chroma walk handed
EVERY unit the block-level reach, so a 2x1/1x2 grid's units resolved has_top_right over the block's
extent instead of their own (reconintra.c:196/1847). Both call sites now pass cu_reach. Verified here
by mutation: restoring the block reach reds the gate at frame 0 plane U sample 49374 (x=222,y=192),
130 samples wrong -- the lane's own numbers. Declared limit: the 1x2 palette gate stays GREEN under
that mutation, so it does not bite on this substitution.
ec-av1: the odd-luma cell DECODES and the 4:4:0 cell does not existAhmet Kaan Gümüş · 8ee7a88
ec-av1: the odd-luma cell DECODES and the 4:4:0 cell does not exist

Two coverage cells `lanes/av1formatsweep.report.md` left as declared debt,
because no encoder emits either. One is a decoder capability and is now
gated; the other is not a cell at all.

4:2:0 with an ODD luma dimension (`420_odd65x65_key.obu`, 2305 B, sha256
6698601...): aomenc rounds the coded size down to even, so the stream is
built offline by the new `examples/gen_coverage_cells.rs` through a new
`encode::encode_key_frame_at_size` -- a 96x96 card on the block grid with
a 65x65 frame header. It DECODES: 6403 raw bytes, byte-identical to the
instrumented aomdec (65*65 + 2*33*33, `ROUND_POWER_OF_TWO(65,1) = 33`).
Gate `an_odd_luma_420_key_frame_decodes_pixel_exact`; measured red-before
with `round_ss` floored: chroma 1024 vs 1089 samples, raw 6273 vs 6403.

The fixture also closed a defect the tree had documented and deferred:
`ref_chroma_shape`'s 4:2:0 arm was a `(w/2, h/2)` floor where the producer
stores `round_ss(w,1) x round_ss(h,1)`, under-declaring every
odd-dimension 4:2:0 reference. Now the producer's own crop; red-before
measured on the existing routing test (2x3: left (1,1) right (1,2)); even
sizes unchanged.

4:4:0 (ss 0,1): NOT CODABLE. Spec 5.5.2 codes `subsampling_y` only when
`subsampling_x` is 1, so the reachable set is exactly {(1,1),(1,0),(0,0)}
-- libaom's reader leaves `subsampling_y = 0` at sx=0
(av1/decoder/decodeframe.c:4171-4175) and its writer asserts
`"4:4:0 subsampling not allowed in AV1"` (av1/encoder/bitstream.c:2466).
Gate `the_440_cell_is_not_a_codable_chroma_shape` proves it in three arms
(reachable-shape sweep, all 256 values of the byte carrying
`subsampling_x`, and the pinned bytes), each with a measured mutation; the
pin `440_request_is_422.obu` is what the writer emits when HANDED (0,1)
-- it lands on (1,0) and still refuses by name. The 4:2:2 refusal string
and both inventory copies now say 4:4:0 cannot arrive either.
4:4:4 2x1/1x2 chroma grids: each unit takes its OWN above-right reachAhmet Kaan Gümüş · e4e6f93
4:4:4 2x1/1x2 chroma grids: each unit takes its OWN above-right reach

The ticket's headline defect -- a 4:4:4 64x64 square block whose 64x64 chroma
plane block is a 2x2 Chroma32 grid, second unit reconstructing its sibling's
flat DC -- was ALREADY FIXED on main by e05a6ceb ("4:4:4 2x2 chroma walk: window
the intra-BC/palette override per unit", merged 2c0fd2b9 at 02:12), 15 minutes
AFTER lanes/av1chromarect-r2.report.md was merged with numbers measured on the
older base 5324a685. `git merge-base --is-ancestor e05a6ceb 5324a685` is false.
This commit does not redo that fix; it re-measures it (below) and fixes the one
cell of the class sweep that was still broken.

Also: the ticket's stated mechanism is wrong for this witness. The seed is
skip=1 on an INTRA-BC block, and libaom never sends an intra-BC block through
av1_predict_intra_block at all. decodeframe.c:1146 folds is_intrabc_block into
inter_block_tx; decodeframe.c:847 predict_inter_block -> :676
dec_build_inter_predictor calls dec_build_inter_predictors ONCE per plane with
bw = xd->plane[plane].width (decodeframe.c:686-688), i.e. the whole chroma
plane block, and reconinter_template.inc:228 makes the intra-BC reference the
destination buffer itself. So the prediction is one whole-plane-block motion
copy with no per-unit DC and no per-unit above/left; the units are then
reconstructed in place on top of it. The crate's whole-plane-block PALETTE_PRED
override IS that copy, and PlaneBuf::reconstruct (decode.rs:20939/21087) uses
the buffer it is handed as the UNIT's own chroma_tx x chroma_tx_h prediction --
which is what e05a6ceb's chroma_window fixes.

RE-MEASURED HERE (mutation M1: chroma_window back to the whole buffer, gate
a_444_skipped_64x64_square_block_windows_its_chroma_override_per_unit):

  test result: FAILED. 0 passed; 1 failed
  frame 0 plane U first divergence at sample 229728 of 262144 (x=352, y=448),
  7488 samples wrong

  f0  Y 0 | U 7488  | V 8128      f1  Y 0 | U 22571 | V 41782
  f2  Y 0 | U 0     | V 0        total 79969 of 2359296
  seed [320,384)x[448,512)  U 864/2048  V 1024/2048  first (352,448)
  victim [448,512)x[448,512) U 4096/4096 V 4096/4096 first (448,448)
  f0 U y=448, x=320..512 step 16:
    oracle 241 239 202 202 202 202 203 165 166 166 166 166
    ours   241 239 241 239 202 202 202 202 175 175 171 171

  AFTER the fix: 0 wrong on Y, U and V of all three frames, 0 of 2359296, and
  0 in all three named regions. Pin unchanged, already committed:
  fixtures/r512.obu, 6948 B, sha256 f587f0f980f149abce905e3ef66f2f1634f050c854
  30626eafb9c30a1e25bc21.

  (Correction to the ticket: [384,448)x[448,512) is NOT a clean control under
  this defect -- 1664 U and 1984 V wrong, first (416,448). What r2 measured was
  that its EDGE samples are all ~202, so any DC rule reproduces it; its pixels
  still move because an intra-BC block's reference is the current frame's own
  reconstruction.)

THE CLASS SWEEP, and the cell this commit fixes. Three sites walk a 4:4:4
chroma plane block as Chroma32 units:

  1 decode_block skip arm   (21897) 2x2  window: chroma_window (e05a6ceb)  reach: tu_reach_rect OK
  2 decode_block coded arm  (22182) 2x2  window: palette_window           reach: tu_reach_rect OK
  3 decode_rect_split       (12721) 2x1/1x2/2x2  window: palette_window   reach: BLOCK reach  <-- WRONG

Sites 1 and 2 can never be 2x1/1x2: a square luma block has
chroma_side == chroma_height at every supported subsampling and chroma_tx ==
chroma_tx_h, so cn_cols == cn_rows always. A 2x1/1x2 needs a rect luma block,
which only site 3 walks -- and it passed the BLOCK reach to every unit.

libaom resolves has_top_right PER TRANSFORM UNIT (defined reconintra.c:196,
called from av1_build_intra_predictors at reconintra.c:1847 with the chroma txb
walk's own blk_col/blk_row). The row_off == 0 arm is
`col_off + top_right_count_unit < plane_bw_unit`, so the FIRST unit of a 2-wide
grid reads its above-right out of the already-reconstructed block ABOVE even
when the block's own right edge is the frame's. PlaneBuf::edges (decode.rs:
20840) truncates the above row at own_across when above_right is false, so a
directional unit with angle < 90 (need_right, intra.rs:546) predicted from a
32-sample above row where libaom used 64.

NEW WITNESS fixtures/r512_rect2x1_1x2_444.obu, 2697 B, sha256 a009ec580a1ff
24250be53e11b8d09616da71e095cefd5eb621c941d40a8688b (recipe in the gate's doc
comment): 4:4:4 8-bit 256x256, one key frame, reaching BOTH shapes -- a 64x32
chroma plane block as nw=2 nh=1 of 32x32 and a 32x64 one as nw=1 nh=2.

  RED-BEFORE, per plane, own compare script over EC_AV1_FINAL_DUMP:
    f0  Y 0 wrong   U 130 wrong   V 30 wrong   (of 65536 per plane)
  All 160 sit in the right 6 columns of the cu=(0,0) unit at mi=(48,48)
  px=(192,192). Oracle vs ours for that unit:
    EC_PRED     mi_row=48 mi_col=48 plane=1 row_off=0 col_off=0 txw=32 txh=32
                mode=1 p_angle=84 n_top=32 n_left=32 n_tr=32 n_bl=-1 bsize=11
    EC_PREDOUT8 sum=172662  row0=179,185,190,195,197,198,197,194
    OUR_PRED    sum=171512  row0=[179,185,190,195,197,198,197,194]
  row0 and col0 match exactly and only the SUM differs, so the residual read is
  bit-identical and the divergence is prediction-side, not entropy. Same 130/30
  wrong in the oracle's EC_AV1_PREFILT_DUMP as in EC_AV1_FINAL_DUMP, so it is
  pre-loop-filter. The U per-column delta -1,-5,-9,-14,-18,-19 grows rightward,
  which is a directional prediction reaching further right as it goes.

THE FIX: one expression, both unit readers in that walk (the square read_plane
and the rect push_intra_rect) get the unit's own reach, from the crate's
EXISTING per-unit port -- the same call sites 1 and 2 already use:

  let cu_reach = tu_reach_rect(bw, bh,
      (cu_col * uw) << ss_x(fctx), (cu_row * uh) << ss_y(fctx),
      uw << ss_x(fctx), uh << ss_y(fctx),
      reach, px, py, y.width, y.height, fctx);

AFTER: 0 wrong on all three planes.

GATES, both aomdec-oracle with no silent skip, counters asserted before a
single sample is compared:

  a_444_rect_strip_chroma_tiled_2x1_and_1x2_units_take_their_own_above_right_reach
    asserts >= 4 units in a 2x1 grid AND >= 4 in a 1x2 grid, >= 1 unit whose
    per-unit reach differs from the block's, then full byte-exactness of all
    three planes. Pin fnv1a64 0x2751ccaa079cc422.
  a_444_rect_strip_chroma_tiled_1x2_palette_grid_decodes_byte_exact
    the UV-PALETTE cell lanes/av1chromadc.report.md section 5 left explicitly
    UNMEASURED ("its arm of the sweep is argued from the shared code path, not
    witnessed"). Pin fixtures/r512_rect1x2_444_palette.obu, 2250 B, sha256
    fad03c69087f316c1a117e8d8a70769d161b332bce7b2998e646312bb78fb067, which
    puts a UV-palette block on a 1x2 16x64 chroma grid at mi=(32,12).

MUTATION: M1, both readers back to the block reach -- RED at sample 49374
(x=222, y=192), 130 samples wrong. M2, cu_col/cu_row transposed -- GREEN, and
that is a real limit of the gate, not a pass: this witness's second/bottom
units sit flush against the frame edge, so the Reach clamp truncates the extra
reach back to nothing. The gates pin the reach VALUE, not the offset spelling;
no claim is made about the spelling.

CLASS SWEEP, all 19 set_palette_pred sites: every one is already windowed per
unit (12633, 12784, 16685, 16955, 21953/21975) or is a genuine single-unit read
where the whole buffer IS the window (decode_block_rect 15378/15396/15559/15607,
decode_leaf_rect 15996/16014/16175/16220, decode_block_rect4 16825/16859 which
loops PLANES of a 4x4 block). The one unwindowed site inside a unit loop,
decode.rs:12525's 4:2:2 (4,8) units, is unreachable -- both
chroma_422_pair_wide and chroma_422_oob require ss_x == 1 && ss_y == 0, the
4:2:2 that stream.rs:1783 refuses by name.

RE-QUOTES. cargo check -p ec-av1 --all-targets: 0 errors, 0 warnings.
  a_444 lossless_444 intrabc_rect 444_lossless 420_intrabc_rect4
    ok. 39 passed; 0 failed; 0 ignored  (4:4:4-lossless, intrabc_rect, 4:2:0 twin)
  rect intrabc ibc chroma 444 420 subsampl, once per tree, private target dir:
    base 70ed5601 (detached)  ok. 145 passed; 0 failed; 5 ignored; 623 filtered out
    this tip                  ok. 147 passed; 0 failed; 5 ignored; 623 filtered out
  The delta is exactly these two gates (775 tests on both trees by --list). No
  test renamed, dropped or newly ignored; no floor lowered anywhere.

Report: lanes/av1dcunit.report.md. NOT DONE is listed there in six items, the
first being that the 2x1/1x2 offset spelling is unproven (M2).

2026-09-29

ec-av1: lane-av1txctxband -- get_tx_size_context must read the block covering the ABUTTING CELL, not the last block written in the columnAhmet Kaan Gümüş · 366e4bc
ec-av1: lane-av1txctxband -- get_tx_size_context must read the block covering the ABUTTING CELL, not the last block written in the column

libaom's get_tx_size_context (pred_common.h:361-370) gates its inter-neighbour
override on xd->above_mbmi / xd->left_mbmi, which set_mi_offsets takes as
xd->mi[-mi_stride] / xd->mi[-1] (av1_common_int.h:1381-1389); setup_mbs
(decodeframe.c:355-361) writes the covering block's own MB_MODE_INFO pointer
into EVERY mi cell the block covers, so the granularity is the covering block
PER CELL. This decoder read the per-COLUMN above_inter/left_inter bands and
the per-column above_side_mi/left_side_mi bands -- the last block written in
that column, which names the abutting block only for the block directly below
it.

On a 4:4:4 lossy --sb-size=128 cq-62 256x256 stream the 8x4 intra leaf at
mi(57,52) read a stale above_inter=true with above_side=4 while the covering
block of cell (56,52) is 8 px wide, so the override fired with 4, above came
out 0 where libaom keeps 1, ctx came out 1 instead of 2, and tx_size_cat0[1]
was read where libaom reads row 2 -- the EC_SYMR fork at read 32813
(identical pre-state (7550,45492), identical n=2 s=1, only cdf0 differing:
ours 6424 -> 26384 vs oracle 19938, so not even the ICDF mirror convention).

New Neighbours::inter_grid (per 4x4 mi cell) carries is_inter_block of the
covering block, written by exactly the three places that already wrote the
bands: record_inter_rect_mi, record_intrabc_mi_rect, and fill_lf_grid_rect's
intra-only clear. The covering block's own size comes from blk_grid's existing
per-mi BlkCell::dim, so no new size array. Both readers
(tx_size_context_txfm_rect and tx_size_context_txfm) gate and size the
override from inter_at(mi_r-1, mi_c) / inter_at(mi_r, mi_c-1) and
blk_side_at(..); the TXFM_CONTEXT bands and the tile-border guards are
untouched.

  red-before (unpatched a1f818a9): frame 0 Y 841 / U 1295 / V 1372 of 65536,
    frame 1 Y 56986 / U 55974 / V 56442; EC_SYMR 41245 vs 37229 reads, fork
    at 32813
  green: 0/0/0 on both frames; EC_SYMR 37229/37229 with ZERO divergence over
    the whole stream
  class sweep: 99 cells of 4:4:4 lossy --sb-size=128 (10 sources x cq
    30..62) all EXACT-ENTROPY; 12 of them forked before and 4 of those also
    exited non-zero
  new pin 444_lossy_sb128_txctx_witness.obu (6186 B, sha256 14acb74e...) and
    gate a_444_lossy_sb128_txctx_reads_the_covering_block_per_cell, whose
    non-vacuity arm is TXCTX_INTER_CELL_BAND_DIVERGENCE_HITS (reads whose
    RESOLVED term differs between the two models): green 1, and RED on the
    band-revert mutation. The counter counts resolved terms, not booleans --
    on this stream the two is_inter booleans agree and the SIZE term is what
    is stale.
  neighbours re-quoted: 44 passed (444_lossy/444_rect/444_intrabc_rect4/
    ll444/lossless/intrabc_rect), 43 passed 2 pre-existing ignored
    (420/sb128/tile_rows/tilerows/intrabc/av1real_aomenc)

Named, not swept: av1_get_intra_inter_context and the ref_ctx family read the
same per-column is_inter bands and share the granularity hazard; nothing
observed them here. txfm_partition_context reads only the TXFM bands and is
correct as it stands.

scripts/fixture-library.tsv NOT regenerated: it records a file:line for every
fixture reference in the crate, so regenerating it in a feature lane produces a
501-line diff that collides with every sibling touching decode.rs/stream.rs. It
belongs to the post-wave merge (the row it yields is in the report).
av1: the per-unit bit-interval ladder, and the second 4:4:4 intra-BC witness at full exactnessAhmet Kaan Gümüş · a4597ea
av1: the per-unit bit-interval ladder, and the second 4:4:4 intra-BC witness at full exactness

The 4:4:4 intra-BC chroma fork at mi (20,40) is NOT an entropy fork, and the
count asymmetry that named it does not exist. Re-measured on
444_intrabc_rect4_witness.obu with a per-unit BIT-INTERVAL ladder against the
oracle's EC_ECDUMP_IN/_OUT/_END: 512 real txb_skip reads against the oracle's
513, not the ~1069 fewer an earlier round reported (that figure counted the
1883 zero-bit reads the rung fires for, and filtered one side only). Every one
of the 2365 in-stream units agrees on entry, post-txb_skip AND end-of-unit
position at a MEASURED constant offset of +14 bits; all_zero agrees on all 2395.
The 30 tail mismatches are end-of-buffer padding, not a fork. There is no first
divergent symbol, because there is no divergence in the coefficient ladder.

What the ladder ruled out is the finding. With entropy excluded and the filters
exonerated (oracle PREFILT == oracle FINAL on all three planes), the fork was a
wrong-PLACE write: our PREDICTION at the first divergent sample was byte-identical
to the oracle's (sum 26258 both, same first row), so the defect had to be a later
different write -- and the MC/inter write path had no rung to say so. Hence
EC_MCWR (the write's origin and shape) and EC_MCPUSH (the push site,
#[track_caller]), which named decode_intrabc_owned_rect's skip arm committing a
32x16 chroma window at (px/2, py/2) = (160,80) and leaving its own 64x32
footprint at (320,160) unwritten. Two difference components, 8 cells sharp and
1182 over the whole quadrant: one wrong-place write, not two defects.

That fix is ALREADY ON MAIN, in a more general form than this lane first wrote
it: 5324a685 (lane-av1chromarect) made the extent and origins ss-derived for
this whole function, skip arm included, after solving the missing-TxbSet blocker
that had forced this lane to scope its fix to the skip arm; 2c0fd2b9
(lane-av1chromadc) windowed the skipped-block chroma override per unit. Main's
version is kept, for a substantive reason: scoping to the skip arm would have
left a known-wrong shape in the arm that actually reads coefficients. This branch
is rebuilt from 79b2a73f and carries only the instrument, the gate and the
report; the pre-rebase commit e0a7b744 is on backup-av1ibcfork for the record.

With both landed the witness is byte-exact on all three planes, including the
"(416,192) residual tail" this lane had called a separate open defect -- it was a
consequence of the same wrong-place write, not an independent one.

Gate a_444_intrabc_rect4_witness_is_byte_exact_after_the_skip_arm_footprint: a
SECOND witness, not a repeat of chromarect's r512.obu gate, because the two
shapes fail differently -- r512's 128-root strips fail as a sizing error inside
the coefficient walk, while this witness's 64x32 skip block read no coefficient
at all, so its only symptom was pixels. Four arms: 4:4:4 header asserted, the
4:2:0 twin byte-exact (where >> ss_x IS / 2, so it is the measurement),
IBC_OWNED_RECT_CHROMA_FOOTPRINT_444_HITS >= 1, and FULL byte-exactness on all
three planes. Mutating the function back to the halving reds it at (x=160, y=80)
-- the same sample this lane measured by hand before the gate existed.

Also: SymbolDecoder::symr_mi(), because a per-unit rung needs a mi and
set_symr_mi only wrote it.
Merge lane-av1chromadc: the skipped-block chroma override is windowed per unit (79969 -> 0)Ahmet Kaan Gümüş · 8c19a27
Merge lane-av1chromadc: the skipped-block chroma override is windowed per unit (79969 -> 0)

decode_block's SKIP arm handed the whole chroma_side x chroma_height override buffer to EVERY unit,
and PlaneBuf::reconstruct uses the buffer it is given as that unit's own chroma_tx x chroma_tx_h
prediction - so the right and bottom units of a 2x2 chroma plane block predicted from the top-left
one. Invisible at 4:2:0 (a 64x64 block's chroma plane block is a SINGLE 32x32 unit, so the whole
buffer is that unit's window - which is why every 4:2:0 gate stayed green). Measured on the pinned
r512.obu: frame 1's skipped 64x64 intra-BC block at mi=(112,80) reconstructed cu=(1,0) as a flat 241
where the oracle has 202, byte-identical to cu=(0,0). EC_PRED showed identical sums and identical
row0/col0 for the two units and EC_DEBUG_EDGES printed nothing (the prediction came from the
override, not the edges). Fix: one windowing closure used for both planes, whole buffer when single
unit so every 4:2:0 and sub-64 4:4:4 path is byte-for-byte unchanged. Result: 79969 wrong samples ->
0 (2359296/2359296 byte-exact), red-before run on the unpatched tree.
4:4:4 2x2 chroma walk: window the intra-BC/palette override per unitAhmet Kaan Gümüş · 69d5cc5
4:4:4 2x2 chroma walk: window the intra-BC/palette override per unit

A skipped 64x64 square block at 4:4:4 has a 64x64 chroma plane block, which
libaom walks as a 2x2 grid of TX_32X32 units (get_vartx_max_txsize ->
av1_get_adjusted_tx_size(TX_64X64) = TX_32X32). Its chroma prediction is not
edge-derived: it is the intra-BC / UV-palette override, a whole
`chroma_side x chroma_height` buffer on the PALETTE_PRED slot, and
`PlaneBuf::reconstruct` uses the buffer it takes as the UNIT's own
`chroma_tx x chroma_tx_h` prediction (`let prediction = if let Some(buf) = pred
{ buf } else { ... }`). A multi-unit plane block must therefore hand each unit
its own WINDOW of it.

The pre-fix call was `set_palette_pred(ub.clone(), fctx)`: the whole buffer, for
every unit. At 4:2:0 the chroma plane block of a 64x64 block is a single 32x32
unit, so the whole buffer IS that unit's window and the bug is INVISIBLE --
which is why every 4:2:0 gate stayed green -- and at 4:4:4 every unit took the
buffer's first 32x32. The site already said so for LUMA ("its per-TU windowing
is the non-skip loop's own `palette_y_buf` slice, untested for skip and
unreachable in these streams"); the chroma half never got the same treatment and
r512.obu is the stream that makes it reachable.

MEASURED PROOF, before the fix (EC_PRED, per-unit prediction trace; identical
sums and identical row0/col0 are the signature of a copied window):

  OUR_PRED x=320 y=448 plane=1 side=32 sum=882176 row0=[241 x8] col0=[241,202,...]
  OUR_PRED x=352 y=448 plane=1 side=32 sum=882176 row0=[241 x8] col0=[241,202,...]
  OUR_PRED x=320 y=448 plane=2 side=32 sum=751936 row0=[110 x8] col0=[110,222,...]
  OUR_PRED x=352 y=448 plane=2 side=32 sum=751936 row0=[110 x8] col0=[110,222,...]

and EC_DEBUG_EDGES printed nothing for x=320/352 at y=448, i.e. edges() was
never called -- the prediction came from the override. The coded sibling at
x=448 DOES print its edges, and its units were already right.

RED-BEFORE, on the UNPATCHED tree, new gate
`a_444_skipped_64x64_square_block_windows_its_chroma_override_per_unit`:

  decode-order frame 0 plane U is byte-exact nowhere -- first divergence at
  sample 229728 of 262144 (x=352, y=448), 7488 samples wrong. The seed is frame
  0, mi=(112,80) px=(320,448) side=64 skip=1, whose chroma unit cu=(1,0) at
  px=(352,448) must be the SECOND 32x32 window of the block's chroma override
  and not a copy of cu=(0,0)'s.

AFTER, same oracle (aomdec EC_AV1_FINAL_DUMP vs set_final_dump_prefix, 512x512
8-bit 4:4:4, decode order), wrong samples per plane:

  f0  Y 0 | U 7488 -> 0 | V 8128 -> 0
  f1  Y 0 | U 22571 -> 0 | V 41782 -> 0
  f2  Y 0 | U 0 | V 0

79969 -> 0: every plane of every frame byte-exact, 2359296/2359296 samples. The
floors in `a_444_intrabc_owned_rect_strip_sizes_its_chroma_plane_block_and_decodes`
were RAISED from [[262144, 229728, 229728], [262144, 65704, 65704], [262144,
262144, 262144]] to [[262144; 3]; 3]; both floors' history is in that test's doc.
No floor was lowered. decode_intrabc_owned_rect is NOT touched.

CLASS SWEEP, all four unit positions of every multi-unit chroma-override walk on
the witness (temporary EC_ZZSRC probe, removed before this commit; win_head is
the unit window's first eight samples):

  f0 px=(320,448) skip=1 intrabc  (0,0)=241 (1,0)=202 (0,1)=241 (1,1)=202
  f0 px=(384,448) skip=1 intrabc  (0,0)=202 (1,0)=203 (0,1)=202 (1,1)=203
  f1 px=(128,128) skip=1 intrabc  (0,0)=54  (1,0)=54  (0,1)=54  (1,1)=54
  f1 px=(320,448) skip=1 intrabc  (0,0)=240 (1,0)=202 (0,1)=240 (1,1)=202
  f1 px=(448,384) skip=1 intrabc  (0,0)=166 (1,0)=166 (0,1)=166 (1,1)=166

The rule: invisible when the buffer is constant across the plane block, wrong at
exactly (1,0) and (1,1) when it varies, and (0,0)/(0,1) never wrong -- they
read offset 0, which is their own window. That is why the r2 dirty map starts at
x=352 = 320+32 and not at x=320. Every multi-unit walk on this witness is
src=intrabc; the UV-palette source shares the fixed line but has no multi-unit
witness here, and that cell of the class is argued, not measured.

f1 HYPOTHESIS CONFIRMED: r2 predicted f1's dirty column x=128..192 (first dirty
cell (168,128), 56/64 wrong) was the skipped 64x64 at px=(128,128). It is -- the
only multi-unit override walk in that column -- and frame 1 goes 22571 U + 41782
V wrong to 0 with this fix and no other change.

New counter SKIP_CHROMA_OVERRIDE_WINDOW_HITS counts chroma units whose override
had to be windowed (cn_cols * cn_rows > 1), exclusive to this walk; the gate
asserts >= 8 before it compares a single sample, so the exactness cannot be
vacuous.

Gates: 34/34 on the 4:4:4-lossless + intrabc_rect + 4:2:0-twin set (33 of r5
plus this lane's new gate). The wider `rect intrabc ibc chroma 444 420
subsampl` family is 141 passed / 0 failed / 5 ignored on this tip against
140 / 0 / 5 on the base 57834ee2, the set difference being exactly this lane's
new gate. Mutations, each reverted: M1 the pre-fix whole-buffer shape -> RED at
229728 (x=352,y=448); M2 window row stride chroma_side -> chroma_tx -> RED at
229824 (x=448,y=448); M3 cu_row/cu_col transposed -> RED at 229728.
Merge lane-av1f9singleland: the 'unlanded' single-ref fix was already on main; the real gap was attributionAhmet Kaan Gümüş · abe7034
Merge lane-av1f9singleland: the 'unlanded' single-ref fix was already on main; the real gap was attribution

6c33f204 was a TWIN-FLOW SWEEP - it collected leaf_tx_types at every size and pointed BOTH copies of
the four-unit arm at the shared covering_leaf_tx_type (decode.rs:38785). The branch census read that
commit's SUBJECT (which names only the compound arm) instead of its diff, so it ranked an
already-landed fix as the top unlanded one; the cited 'if side > 64 around 42271' is a different,
correct guard (the 128x128 mu-chunk walk) and the leaf push at 42304 is unconditional. Landing the
real gap instead: per-arm single-reference counters plus a gate asserting the single-reference arm
is what the existing witness measures - 96 covering-leaf units resolve, 88 single-ref / 8 compound,
and ALL 8 DIFFERS units (the existing non-vacuity bar) are single-ref. The 4:2:0 control fires
neither counter. Three mutations red it, including one that shows the shared total staying non-zero
while the witnessed arm resolves nothing.
ec-av1: the four-unit 4:4:4 quadrant witness is the SINGLE-REFERENCE arm's, and no gate said soAhmet Kaan Gümüş · 18d91c0
ec-av1: the four-unit 4:4:4 quadrant witness is the SINGLE-REFERENCE arm's, and no gate said so

The census called lane-av1-f9single tip c7fd5afa an unlanded fix and pointed at
"main still reads `if side > 64` around decode.rs:42271". Both are false. The
cherry-pick conflicts, and git blame attributes BOTH single-reference sites --
the leaf push and the covering-leaf resolve -- to 6c33f204, the commit the
census itself lists as the already-landed compound twin. 6c33f204 collected
leaf_tx_types at every size and pointed BOTH copies of the four-unit arm at the
covering lookup; its own subject line calls the single-reference side "the
single-reference twin", so it was a twin-flow sweep, not a compound-only change.
The `if side > 64` the census cited is the 128x128 mu-chunk walk from
lane-sb128c r1, which is correctly `side > 64`. Main's form is also the better
one: the shared covering_leaf_tx_type helper, where the branch inlines a fourth
copy of a convention main had already deduplicated.

What was genuinely missing is the attribution. CHROMA_QUAD_LEAF_TX_HITS and
..._DIFF_HITS are bumped from both arms, and the existing gate asserts only that
pair, so it cannot say which arm its witness came from and either arm can be
reverted while the other keeps the total non-zero. Measured on the pinned
444_quad_leaf_tx_type.obu: 96 covering-leaf units, 88 of them the
single-reference arm's; of the 8 DIFFERS units -- the existing gate's entire
non-vacuity bar -- ALL 8 are the single-reference arm's. The other 26 pinned
4:4:4 fixtures reach the arm zero times, so that one witness is all that pins
this arm.

Adds a single-reference counter pair and a gate that pins it. Proved
non-vacuous three ways, each mutating ONLY the single-reference arm: reverting
its resolve to luma_tx_type, gating its leaf push back behind `side > 64`, and
disabling its route outright all turn a gate red -- the first two with 777
bytes differing in decode-order frame 1, the same number 6c33f204 reports for
its own pre-fix state. The third fails while the shared total still reads 8,
which is exactly the blind spot.

+149/-0, additive; the compound arm is untouched and the two stay textually
comparable. cargo check -p ec-av1 --all-targets clean, 0 warnings. Gates:
444 family 39 passed, intrabc_rect 7, rect_strip 10, 4:2:0 controls 3+2+2, both
quadrant gates 1 each -- 0 failed, oracle required throughout.
Merge lane-av1pixprobe: EC_AV1_PIXPROBE write probe + the byte-identical diffwtd_mask cast moveAhmet Kaan Gümüş · 64a5043
Merge lane-av1pixprobe: EC_AV1_PIXPROBE write probe + the byte-identical diffwtd_mask cast move

A: the env-gated EC_AV1_PIXPROBE=x,y one-sample write probe, re-anchored by hand because both mc
stores now live in PlaneBuf::reconstruct_mc_rect (row-at-a-time slices) - it reports w, not the old
branch's side, so rectangular inter blocks are not misreported. Fires on the pinned fixture
(sha256 bc699af4...) and prints nothing when unset.
B: the diffwtd_mask cast move with its byte-identity argued from the clamp (clamp(0,64) keeps m in
0..=64, so both the forward use and the 64 - m inverse are value-preserving), plus the compound
transcription gate over all 256 phase pairs at 8 and 10 bits; two mutations red it, one proving the
10-bit arm is exercised rather than skipped.
C is recorded, not investigated: the parked branch's 8x8-leaf miss DOES NOT REPRODUCE on merged main
(byte-exact vs ffmpeg at that coordinate on the same fixture; the measuring tree was 439 commits
stale), so the row now tells the next charter to re-measure first.
lane-av1pixprobe: land the EC_AV1_PIXPROBE rung re-anchored + diffwtd_mask's cast move and its 8/10-bit gateAhmet Kaan Gümüş · 4b28b49
lane-av1pixprobe: land the EC_AV1_PIXPROBE rung re-anchored + diffwtd_mask's cast move and its 8/10-bit gate

The two items lanes/av1cheapwins.report.md §C triaged "land after rebase".

A: the env-gated one-sample write probe from lane-av1-ibcwrite @ 25f5c729,
re-anchored by hand -- the branch's two mc store hunks no longer attach
because those stores now live in reconstruct_mc_rect (lane-perf4 /
lane-recoparse reshaped it: row-at-a-time slices, an early
residual.is_empty() return, and a w/h block extent with side demoted to the
prediction stride). pix_write("mc_copy"/"mc_add", x, y, w, ...) reports w,
not the branch's side, because that is what the block=(bx,by)+SIDE field
means for a rectangular inter block. Fires on the pinned R5 fixture
(sha256 bc699af4..., re-encoded here byte-identically) at px (296,128), three
stores one per plane; prints nothing with the variable unset.

B: 295dc3fe's u8 cast move in diffwtd_mask plus its 8/10-bit libaom
transcription gate. The cast is value-preserving: clamp(0,64) leaves m in
{0..=64}, so `as u8` is a no-op on the binding and both uses
(forward `m`, inverse `64 - m`, which is 1..=64) emit the same mask byte as
the old `m as u8` / `(64 - m) as u8` pair. The gate is the 10-bit coverage
diffwtd_mask's (bd - 8) term landed without; adapted to main's
blend_masked_compound, whose `subsampled: bool` is now subw/subh. Proven
non-vacuous at both depths, including a 10-bit-only round mutation that is
inert at 8-bit and still fails the gate.

C: the 189-vs-170 intrabc partition defect is recorded, not chased -- and
does not reproduce on merged main (the fixture decodes byte-exact vs ffmpeg
at 1d47ff54; the measuring tree 37a64d99 is 439 commits stale). The hand-off
row carries the original coordinates and numbers plus that caveat, so the
next charter re-bisects instead of trusting the coordinates.

Report: lanes/av1pixprobe.report.md
Merge lane-av1cflac: the cfl_ac_q3_at 4:4:4 premise is REFUTED, and it is now guardedAhmet Kaan Gümüş · f82a113
Merge lane-av1cflac: the cfl_ac_q3_at 4:4:4 premise is REFUTED, and it is now guarded

The inherited '188 rung hits at 4:4:4' does not reproduce: 0 hits on all 26 *444* pins, while
cfl_ac_ss's own 4:4:4 arm fires 1834 times and is byte-exact vs aomdec. cfl_ac_ss dispatches 4:4:4
and 4:2:2 to their own libaom bodies BEFORE the 4:2:0 fallthrough that owns cfl_ac_q3_at, so the
halving and the 2x2 average are correct at every reachable call site (the 4:2:0 total on the same
counter is 33752 - where the 188 almost certainly came from). No decode behaviour change: two gates
(the 4:4:4 arm>0 AND cfl_ac_q3_at==0 on one counter with per-plane 0/0/0 vs aomdec; a static closure
proving cfl_ac_q3_at is reached only through the 4:2:0 fallthrough), an oracle_plane_diffs helper and
per-arm counters. Mutation reds the gate, and in its naive half-extent form it PANICS (len 16, index
16) rather than mis-colouring - correcting the inherited 'silent wrongness' framing.
lane-av1cflac: cfl_ac_q3_at's 4:4:4 defect is UNREACHABLE; closed with two gates, no behaviour changeAhmet Kaan Gümüş · d6bb506
lane-av1cflac: cfl_ac_q3_at's 4:4:4 defect is UNREACHABLE; closed with two gates, no behaviour change

The inherited premise ("188 rung hits on the 4:4:4 set") does not reproduce.
The env-gated EC_HALVSWEEP rung, swept over all 26 *444* pins, prints 0 hits
on every one, while the 4:4:4 arm of cfl_ac_ss fires 1834 times across the
same fixtures and stays byte-exact against the oracle. cfl_ac_ss gives 4:4:4
(and 4:2:2) its own libaom-anchored body before the 4:2:0 fallthrough, so
bw/2, bh/2 and the 2x2 luma average are correct at every reachable call site.
The defect is real and latent, not live.

Landed instead of a fix:
- four per-arm CfL counters + a cfl_ac_q3_at entry counter, one per cfl_ac_ss
  arm, so the routing is measurable from outside the crate;
- gate cfl_ac_444_routes_to_its_own_1x1_luma_body_and_420_to_the_2x2_average:
  two pinned fixtures, two-sided (4:4:4 arm > 0 AND cfl_ac_q3_at == 0; 4:2:0
  cfl_ac_q3_at > 0), plus per-plane Y/U/V counts vs the instrumented aomdec via
  the new oracle_plane_diffs helper -- 0/0/0 on both;
- gate cfl_ac_q3_at_is_reached_only_through_the_420_fallthrough_of_cfl_ac_ss:
  the static closure, enumerating the call-site set (3 sites), the single
  caller of each decode-side wrapper, cfl_ac_ss's arm ORDER, and the absence
  of any 4:4:4 ColorConfig in the encoder.

No decode behaviour changes: 4:2:0 is bit-identical (>> ss == / 2 there), no
stream newly refuses, nothing stopped decoding. Mutation proof: routing the
4:4:4 arm into cfl_ac_q3_at reds the gate (and in its naive half-extent form
panics in the reconstruct path, not a silent colour shift); a fourth call site
reds the enumeration. Green restored byte-identical.

Sweep: 0/26 on the 4:4:4 set; 33752 cfl_ac_q3_at entries across 17 4:2:0
fixtures; 4:2:2 arm 0 on all 85. Report: lanes/av1cflac.report.md
4:4:4 chroma plane block at the 128-root intra-BC strip: walk it in get_vartx_max_txsize units, and do not overwrite the per-unit contextsAhmet Kaan Gümüş · b88c866
4:4:4 chroma plane block at the 128-root intra-BC strip: walk it in
get_vartx_max_txsize units, and do not overwrite the per-unit contexts

Commit 1 landed the ss-derived extent and then REFUSED the witness with "a
rectangular inter chroma transform unit whose shape has no coefficient table set
here". That refusal named the shape this crate HANDED
`rect_inter_chroma_set`, not the shape libaom codes, and acting on it literally
-- a new `ChromaRect32x64` / `ChromaRect64x32` -- would have shipped a
coefficient table no bitstream can ever exercise.

libaom never forms a 64-point CHROMA transform:
  * `get_vartx_max_txsize` (blockd.h:1447) returns
    `av1_get_adjusted_tx_size(max_txsize_rect_lookup[bsize])` for `plane != 0`;
  * `av1_get_adjusted_tx_size` maps `TX_32X64 -> TX_32X32` and
    `TX_64X32 -> TX_32X32`;
  * `max_txsize_rect_lookup[BLOCK_SIZES_ALL]` (common_data.h:126) has
    `BLOCK_32X64 -> TX_32X64`;
  * `decode_token_recon_block` (decodeframe.c:994-1004) steps the plane block
    by that size's mi units, and `decode_reconstruct_tx`'s
    `tx_size == plane_tx_size || plane` arm never recurses for chroma.

So a 4:4:4 32x64 chroma plane block is TWO stacked `TX_32X32` units, each with
its own eob, scan and coefficient context -- `rect_inter_chroma_set(32, 32)` is
already `TxbSet::Chroma32` (decode.rs:28919, arm lane-av1-444 added). What was
missing was the WALK, not a set, and no `rect_scan` / rect
`base_ctx_rect` / `br_ctx_rect` change is needed either: a `TX_32X32` unit is
square, so `read_inter_plane_rect` takes its `(cw, ch) == (32, 32)` branch and
reads `default_scan(TX32)`.

New `read_intrabc_rect_chroma_split`: the same
`(cw.min(32), ch.min(32))` / `nx * ny` tiling `read_inter_rect_chroma` already
does for the other rect paths, entered ONLY when the plane block needs more
than one unit, so 4:2:0 and every 4:4:4 shape below 64 keep the caller's own
one-unit read byte-for-byte. Per unit: its own `around_mi_rect` gather, origin,
prediction slice, `covering_leaf_tx_type` inheritance (`av1_get_tx_type`,
blockd.h:1287), the `get_txb_ctx` plus-10 offset, and `record_mi_chroma`
immediately.

New `record_split_luma_rect_mi_modes` / `record_rect_mi_luma_only`, extracted
from the existing pair: when the chroma plane block was walked as several
units, the whole-block coefficient stamp would overwrite the per-unit spans
with one state (the `override-slot-on-one-arm` class -- the same reason the
lossless arm sets `mu_chroma = true`). Gated on `!skip`: a skipped strip reads
no chroma unit at all, so the whole-block stamp is still its only one.

MEASURED, same oracle (aomdec `EC_AV1_FINAL_DUMP` vs `set_final_dump_prefix`,
512x512 8-bit 4:4:4, decode order), wrong samples per frame:

              before            after
  f0  Y  166229 -> 0     |  U 155383 -> 7488   |  V 153498 -> 8128
  f1  Y       0 -> 0     |  U  74708 -> 22571  |  V  73501 -> 41782
  f2  Y       0 -> 0     |  U   9216 -> 0      |  V   8192 -> 0

640727 wrong samples -> 79969. Luma is byte-exact on all three frames and frame
2 is byte-exact on all three planes. The refusal string is gone from this
witness because nothing reaches it, not because it was deleted: the string is
still at decode.rs:28938 and in refusal_inventory.rs:55, and
`every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan`
still passes.

Gate `a_444_intrabc_owned_rect_strip_refuses_the_missing_rect_chroma_
coefficient_set` (commit 1) is replaced by
`a_444_intrabc_owned_rect_strip_sizes_its_chroma_plane_block_and_decodes`: a
per-(frame, plane) exact prefix against the oracle, plus
`IBC_OWNED_RECT_CHROMA_FOOTPRINT_444_HITS == 5` as the non-vacuity proof. The
prefixes are floors, not an exactness claim -- the frames 0/1 chroma tail is an
OPEN fork at a site this lane did not identify, measured and named in
lanes/av1chromarect.report.md.

Mutation proofs, each reverted:
  M1 extent back to `/ 2`                       -> RED, counter 6 != 5
  M3 `(nx, ny)` transposed                      -> RED, f0 Y diverges at 65728
  M5 per-unit chroma row origin dropped         -> RED, f0 U diverges at 65696
  M4 prediction slice column term dropped       -> GREEN (nx == 1 here, term dead)

Gates: 33/33 on the 4:4:4-lossless + intrabc_rect + 4:2:0-twin set. The wider
`rect intrabc ibc chroma 444 420 subsampl` family is 138 passed / 0 failed / 5
ignored on this tip against 137 / 0 / 5 on the base `edffad9e`, the set
difference being exactly this lane's new gate.
4:4:4 witness pin + ss-derived chroma extent at the 128-root intra-BC stripAhmet Kaan Gümüş · 287d79c
4:4:4 witness pin + ss-derived chroma extent at the 128-root intra-BC strip

Pins crates/ec-av1/fixtures/r512.obu (6948 B, blob bff992e9, taken from
lane-chromahalvings-r3 -- the only one of the three chromahalvings refs
that carries it) and replaces `decode_intrabc_owned_rect`'s hardcoded
`(bw / 2, bh / 2)` chroma extent and its eight `px / 2, py / 2` chroma MV
origin pairs with the ss-derived `>> ss_x` / `>> ss_y` forms.

libaom: `av1_get_max_uv_txsize` (blockd.h:1372) is
`max_txsize_rect_lookup[get_plane_block_size(bsize, ss_x, ss_y)]` through
`av1_get_adjusted_tx_size`, and `get_plane_block_size` is
`ss_size_lookup[bsize]` -- at ss (0,0) the chroma plane block IS the
luma footprint. At 4:2:0 the two forms are the same arithmetic.

RED-BEFORE, measured on the UNPATCHED line in this worktree, per-plane
sample counts against the instrumented aomdec (`EC_AV1_FINAL_DUMP`):

  f0  Y 166229 wrong from 65728 | U 155383 from 32848 | V 153498 from 32848
  f1  Y       0 (byte-exact)   | U 74708 from 49282  | V 73501 from 49280
  f2  Y       0 (byte-exact)   | U  9216 from 114880 | V  8192 from 229760

Luma byte-exact on f1 and f2 while chroma is wrong is the signature that
makes this a chroma-plane sizing defect and not a block-geometry one.

New counter IBC_OWNED_RECT_CHROMA_FOOTPRINT_444_HITS: the 128-root
intra-BC strips whose chroma plane block was sized at ss (0,0). At 4:2:0
the corrected and halving forms are identical, so >= 1 cannot be
satisfied by a 4:2:0 stream; the arm is exclusive to this function.

Gate `a_444_intrabc_owned_rect_strip_refuses_the_missing_rect_chroma_
coefficient_set` asserts -- deliberately -- that the witness is now
REFUSED with the exact string "a rectangular inter chroma transform unit
whose shape has no coefficient table set here". That is the state this
commit lands in: the extent is libaom-correct, and a 4:4:4 32x64 luma
block's chroma plane block is 32x64, which this crate has no
`TxbSet` for. The gate exists so the day that arm lands the gate goes RED
and the assertion has to become the pixel-exactness check. Reach proof
for the site, on the whole witness with EC_HALVSWEEP=1: 5 strips
(mi 32x64 skip=false at mi(32,40); 32x64 skip=true at mi(48,64); 16x64
skip=true at mi(64,108); 32x64 skip=true at mi(112,96) and mi(112,104)).
chroma halvings r5: rebased on 3b691e13; item (3) already fixed by C1, item (2) confirmed still deferredAhmet Kaan Gümüş · 26946b2
chroma halvings r5: rebased on 3b691e13; item (3) already fixed by C1, item (2) confirmed still deferred

Two of the three chartered items change status on the rebase, and both changes
are retractions in this lane's favour.

ITEM (3) suppress_internal_lf_edges -- ALREADY FIXED by Agent09-4's C1. On
3b691e13 the function now takes fctx and reads
  ((w_mi * MI) >> ss_x(fctx)).max(4), ((h_mi * MI) >> ss_y(fctx)).max(4)
which is exactly the fix r1/r2 chartered. The r1/r2 claim that this site is
"format-blind today, a structural constraint" was true of f33b9d41 and is
FALSE of current main. Retracted.

ITEM (2) cfl_ac_q3_at -- still format-blind, now with a measured reason
rather than an assumption. Post-rebase the signature is still
  fn cfl_ac_q3_at(px, py, bw, bh, sample) -> Vec<i32>
with `let (cw, ch) = (bw / 2, bh / 2);` at 19957 and no fctx, so the
subsampling cannot be derived inside the function. The witness is real (188
rung hits on the 4:4:4 set); what is missing is only the threading through
the CfL call tree plus a CfL-specific pixel gate. Deferred with that reason.

ITEM (1) -- the ChromaRect32x64 / ChromaRect64x32 coefficient sets and the
ss-derived extent -- NOT STARTED. Witness committed, red-before measured, the
refusal string exact, and the remaining work is real engineering rather than a
swap: a CDF set per shape, its rect_scan, and the rect forms of
base_ctx_rect/br_ctx_rect, following lane-inter4's precedent for the rect
inter sets. Shipping a partial version would put a silent wrongness into the
tree, which is the outcome this lane has been removing. Unblock order is in
the report.

decode_intra_sub8_leaf (decode.rs:45340, body 45340..46168) RECORDED as a
named gap: it takes has_chroma: bool and has NO chroma_444 branch and NO
chroma_422 branch -- a single chroma path, so at 4:4:4 it computes the 4:2:0
geometry and 4:2:2 has no path at all. Callers: decode.rs:44470 and
decode.rs:46356, both passing has_chroma. Not implemented: the 4:2:2 lift
needs the shape, but this lane has no 4:2:2 witness (the decoder refuses 4:2:2
by name at the sequence header), so a fix here would be unmeasured.

The stale-binary tell is written into the report: a green gate result
alongside a target that does not compile is a stale binary, and
`git checkout <branch> -- <file>` is what produces it. It bit this lane twice
in one turn. Any --no-run error that coincides with green gates invalidates
every gate result in that turn.
lanes/av1txsizeaudit r5: re-rebase onto ec4e9528, declare provenance of the foreign workAhmet Kaan Gümüş · 4e9b008
lanes/av1txsizeaudit r5: re-rebase onto ec4e9528, declare provenance of the foreign work

PROVENANCE, declared before wave 3e rather than at merge time. This branch
carries TWO lanes' work, not one.

  lane-av1txsizeaudit (this lane): the tx-size audit, the C1 fix + source-scan
  gate, the av1tilerows retraction.
  lane-av1ibc128arm, commit 4bfe8d8e "av1: 4:4:4 intra-in-inter 128-root
  mu-chunk chroma as a per-unit walk": 279 lines of decode.rs, 192 of
  stream.rs, 5 of examples/decode_probe.rs, 196 of lanes/av1ibc128arm.report.md
  -- and it has NEVER been merged to main.

Three checks against main:
  git merge-base --is-ancestor 4bfe8d8e main  -> NO
  git grep -c 'a_real_aomenc_444_intra_in_inter_128_root_codes_chroma_per_mu_chunk'
      main -- crates/ec-av1/src/stream.rs    -> 0
  git grep -n 'luma_span = cu_tx * 2' main -- crates/ec-av1/src/decode.rs
                                            -> main:...:43185

That last line is the proof of non-merge rather than a re-implementation: main
still carries the collapsed 4:2:0 arm verbatim -- `let luma_span = cu_tx * 2;`
-- which is exactly the line 4bfe8d8e deletes, and the string appears 0 times
on this branch. `git log --all -S"luma_span = cu_tx * 2"` finds only the two
lanes that CREATED the class (2050a065 lane-av1-ibc128chunk, 29550383
lane-av1-422bigblock) and the commit that removed it. `git grep -ln
"intra_in_inter_128_root" main -- lanes/` returns nothing, and
`git cat-file -e main:lanes/av1ibc128arm.report.md` fails -- so no other lane's
report claims it. Branch lane-av1ibc128arm still exists at 4bfe8d8e, so this is
not an orphan.

THE TWO FOREIGN REPORT FILES, individually:
 - lanes/av1ibc128arm.report.md (+196): deliberately KEPT, and it belongs to
   lane-av1ibc128arm, not to this lane. It is the only provenance record for
   the 279-line decode.rs change and the 4:4:4 gate. Not cherry-pick residue:
   it arrived with 4bfe8d8e whole. MERGE OWNER: if lane-av1ibc128arm is also
   merged, take code+report from whichever lands first and drop the duplicate;
   if it is not merged separately, this branch must carry it, because there is
   no other copy.
 - lanes/av1tilerows.report.md (38 changed): MINE and deliberate. The retraction
   of the `cu_tx = 32 << ss_x` rule at that report's own origin (lines 265-281,
   the section 8 "Recommendation") -- the one committed instance of the refuted
   rule in the repo. Zero code, zero gate. It must land whenever this branch
   lands or the rule stays re-derivable.

CONTENTION HANDED OVER, NOT PRE-RESOLVED: decode_intrabc_owned_rect's `let
(cw, ch) = (bw / 2, bh / 2);` -- the open cell this report lists at 2.3 and
5.0, line 16832 on this base -- is being fixed by another lane now. This branch
does not touch that line; it appears here only as a finding. Resolve at merge
there, where the witness lives.

RE-REBASE, and a second patch-base trap in the same family as r4's:
r4 nearly dropped the unmerged fix commit by patching from "my base"; r5 nearly
swept in all of main's wave-3 changes by patching from "the old main" 9b2f6c9d,
which produced an 18041-line patch touching crates/ec-aac and binary fixtures.
THE RULE, both times: the patch's left-hand side must be the commit this
branch's base actually is (git merge-base HEAD main) -- never a remembered
ancestor, never a self-describing "my base". Verify with `git apply --stat`
BEFORE applying; the wrong base names files you have never touched and is
invisible in --3way's exit status.

Correct patch: git diff 08f8ffb3 99f25b1f, 1894 lines, 7 files. Applied onto
ec4e9528:

  git diff ec4e9528 --shortstat -> 7 files, 1671 insertions(+), 103 deletions(-)

identical in shape to the pre-rebase measurement, with per-file removed-line
counts unchanged (decode.rs 97, av1tilerows 6, rest 0). Main's move touched
NOTHING under crates/ec-av1/, so decode.rs is 56316 lines with
suppress_internal_lf_edges at 9277 and C2 at 43315 -- report section 5.0's
line-shift table is valid verbatim on this base, no adjustment. Silent-restore
check against this move: 0/0/0.

Re-run after touch: cargo check --all-targets clean; the new source-scan gate
1/1; gate_coverage 13/13; refusal_inventory 20/20; the 13-gate identity set
13/13. 47 tests, 0 failures, 4:4:4 gate present and green.
Merge branch 'lane-av1rungs17'Ahmet Kaan Gümüş · 8f6b16fBrowse files
rungs 16/17: script EC_PREDOUT8 (with mode=) and EC_PREDND onto current mainAhmet Kaan Gümüş · 079a7cd
rungs 16/17: script EC_PREDOUT8 (with mode=) and EC_PREDND onto current main

Reconstruction, not replay. lane-av1cmpaudit's commit 3d0001bc predates the HBD
repair block that has since landed on main, so re-applying it as a patch would
clobber that block; the rung bodies were re-applied to the CURRENT script instead.
The script diff is one insert-only hunk (@@ -1076,0 +1077,153 @@), zero deletions,
so the repair block provably survives.

What was actually absent from main is bigger than it looked: NOT just the script
half. `grep -c 'OUR_PRED x={x} y={y} plane=' crates/ec-av1/src/decode.rs` is 0 on
main, so the Rust twin field (RECON_PLANE / recon_plane() / PlaneGuard, `plane=` on
both OUR_PRED sites) is absent as well, and 3d0001bc is not an ancestor of main.

1. rung 16, EC_PREDOUT8 at BOTH 8-bit prediction sites in reconintra.c (the
   non-directional early return and the directional / filter-intra tail), with
   `mode=` on both. Install on a pristine file, and upgrade of the no-mode form the
   oracle tree's git HEAD carries, so a rebuild reproduces the live tree.

2. rung 17, EC_PREDND, the 10/12-bit non-directional site. This is the one that
   matters: rung 16 and the pre-existing EC_PREDOUT both sit after the is_hbd early
   return, so without rung 17 a rebuilt oracle prints NOTHING on a high-bitdepth
   stream -- the failure the rung exists to remove.

3. decode.rs gains `plane=` on both OUR_PRED sites so an EC_PREDOUT8/EC_PREDND vs
   OUR_PRED diff can tell a luma/chroma disagreement from a same-plane one. Behind
   the existing EC_PRED flag; RECON_PLANE is read only by that rung.

4. check-aom-oracle-rungs.sh now also restores reconintra.c to pristine before
   deriving (it previously only restored decodeframe.c, so a rung living in
   reconintra.c was never exercised at all), and asserts: rung 16 installed at both
   sites, mode= on both, rung 17 installed once, mode= present, plus a round-trip of
   the no-mode upgrade form. All ten pre-existing checks still print ok, exit 0.
   Mutation-proved: deleting rung 17, dropping rung 16's directional site, and
   dropping its mode= each red the corresponding assertion.

Evidence (one configure, two aomdec builds differing only in reconintra.c):
12-bit av112bit-key.obu -> 118 EC_PREDND lines with the rungs, 0 lines and empty
stderr without them. 8-bit ii-flake-1.obu -> 15 EC_PREDOUT8 lines, 15/15 with
mode=, 0 without. Decoded output byte-identical either way (md5 6b29cc50... /
482b5e04...). On ours, decode_probe prints 177 OUR_PRED lines, all 177 carrying
plane=, pairing field-for-field with the oracle's first three EC_PREDND lines.

cargo check -p ec-av1 --lib: clean, no warnings.
4:4:4 intrabc rect chroma: size the plane block from ss_size_lookup, not a halvingAhmet Kaan Gümüş · e7a1a68
4:4:4 intrabc rect chroma: size the plane block from ss_size_lookup, not a halving

Rebuilt on f33b9d41 (wave3c-b). decode_intrabc_rect sized a rect intra-BC
block's chroma plane block with a hardcoded 4:2:0 halving. libaom decides that
shape twice and neither site halves: av1_get_max_uv_txsize (blockd.h) is
ss_size_lookup[bsize] -- bw >> ss_x by bh >> ss_y at (px >> ss_x, py >> ss_y)
-- and get_vartx_max_txsize (blockd.h:1447) reads that plane block as
max_txsize_rect_lookup[plane_bsize], with decode_token_recon_block
(decodeframe.c:972-1005) walking the units from it. At 4:4:4 an 8x16 luma
block's chroma plane block is 8x16 and libaom codes it as ONE TX_8X16; the
halving read that same footprint as ONE 4x8 rect unit. This also UNSCOPES
lane-whtshape's `if lossless` conditional, which named the lossy 4:4:4 cell as
another lane's open cell. Identical arithmetic at 4:2:0.

MEASURED by trace, not by reading. This commit adds EC_IBCTX to
read_coeffs_rect (w, h, skip_ctx, sign_ctx, entry/post STREAM BIT, call site
via #[track_caller], deliberately NO plane label), EC_IBCTX2 to read_coeffs,
and EC_IBCBLOCK to decode_intrabc_rect; pairs against the oracle's EC_ECDUMP_IN
by stream bit position. Caller and plane, previously unestablished:

  oracle  bit 6870  plane=0 mi=(92,104) tx=7 (TX_8X16) all_zero=0
  ours    bit 6885  8x16 skip_ctx=0  read_inter_plane_rect
  oracle  bit 6878  plane=1 mi=(92,104) tx=7 (TX_8X16) all_zero=1
  ours    bit 6893  4x8  skip_ctx=0  read_inter_plane_rect  all_zero=0  <-- FORK
  oracle  bit 6879  plane=2 mi=(92,104) tx=7 (TX_8X16) all_zero=1

The txb_skip VALUE first disagrees one unit before the bit position does.
Reverting only the two arithmetic lines makes the gate's luma floor bite at
sample 205264 -- the exact ceiling lanes/av1444rect.report.md rounds 3-4
documented.

The gate doc states the CORRECTED finding, not the retracted one: the
coefficient ladder is NOT exact. Measured here with the 0-bit filter on BOTH
sides -- oracle 2395 all_zero reads (2359 with a real position), ours 3999
lines of which 1326 consumed bits, 71 interval matches. The chroma tail is a
second ENTROPY fork (~1069 reads missing), first at U/V (160, 80) = mi
(20, 40); the gate pins a measured per-plane exact prefix [307200, 51360,
51360] and says so. The doc also states that pairing must be by BIT INTERVAL,
not by index, and names the one-line oracle instrumentation that unblocks it
(aom_reader_tell after the aom_read_symbol at decodetxb.c:158).

Gate guard calls main's shared aomdec_available(NAME): ONE presence-check
shape in the crate, and with EC_AV1_REQUIRE_AOMDEC / EC_AV1_REQUIRE_AOMENC set a
missing aomdec FAILS instead of reporting green with the compare skipped.

A/B on a real tree -- `git diff main --stat` is exactly 2 files, +271/-20,
zero mu_chunk_order / read_intra_chroma_lossless churn, zero scripts/ touched;
both halves rebuilt in a lane-private target dir with touch before each run:

                            MAIN ONLY (f33b9d41)    MAIN + THIS LANE
  -- list                    753 tests                754 tests  (+1 = my gate)
  444                       ok. 36 passed; 0 failed  ok. 37 passed; 0 failed
  lossless                  ok. 25 passed; 0 failed  ok. 25 passed; 0 failed
  intrabc_rect              ok.  6 passed; 0 failed  ok.  7 passed; 0 failed
  gate_coverage             ok. 13 passed; 0 failed  ok. 13 passed; 0 failed
  refusal_inventory         ok. 19 passed; 0 failed  ok. 19 passed; 0 failed

Zero failures on either half; no test green on main is red here. Full batch:
a_444_intrabc_rect_chroma_plane_block ok 1 (4:2:0 twin byte-exact; luma
byte-exact 307200/307200; U and V byte-exact to sample 51360),
a_444_intrabc_rect4 ok 1, lossless_tx_tests ok 5, cargo check --all-targets 0
errors 0 warnings.

Straggler twins of the same halving are NAMED in the report, not merged:
decode.rs:16758 in decode_intrabc_owned_rect and decode.rs:19846 in
cfl_ac_q3_at. Neither is reached on this lane's witness, so fixing them would
be an unmeasured change to another path; lane-av1oraclepost's class sweep should
take them. The 3-way apply reported no conflict in either region.
Merge branch 'lane-av1loss444kf'Ahmet Kaan Gümüş · 3bc9845Browse files
lane-av1refusalspan: bound a proving gate's body by its own closing braceAhmet Kaan Gümüş · cc885c2
lane-av1refusalspan: bound a proving gate's body by its own closing brace

The refusal inventory's anchor check needed a gate's own text, and the
window rule it used ("the body ends at the next `fn` at the same
indentation, or at end of file") is not a function boundary on this tree:
a top-level `#[test] fn` in decode.rs has its next same-indent `fn` tens
of thousands of lines away, so the window reached end of file constantly
and one row's 27,427-line "body" was satisfied by the CHROMA sibling's
string seven lines down.

`gate_body` now ends the slice at the brace that closes the gate's body,
found by a scan that walks Rust rather than lines: string, raw-string,
byte-string, char and lifetime forms, line comments and nestable block
comments are skipped, so a brace inside one cannot move the boundary.
Every failure mode is a FAILURE -- no definition, a definition that is
never closed, an ambiguous name, or a body that still carries another
same-indent `fn` -- and none of them widens the window.

Re-measured over real bodies: 26 rows quote the whole refusal string, 7
quote its leading clause, 0 match neither. Nine rows the previous
measurement counted as anchored were not (their anchor was neighbour
text), so the nine gates now name the refusal they prove and pin its
guard site through `pins_refusal`.

New tests: the boundary's own non-vacuity (neighbour isolation, a brace in
a literal, the last function in a file, an unclosed body), and the same
boundary exercised over all three real sources.
lane-av1loss444kf: a sub-8x8 RECT leaf's chroma unit gets the LEAF's reachAhmet Kaan Gümüş · cecc096
lane-av1loss444kf: a sub-8x8 RECT leaf's chroma unit gets the LEAF's reach

The 4:4:4 lossless 256x256 key frame (109215 B, sha256 4563a01f17786000...)
decoded with 21 U + 28 V samples wrong over x 196..207 / y 200..203, luma
exact, entropy bit-locked over all 81933 symbol reads and its 12288
transform units at identical absolute (plane, x, y). The whole filter chain
is inert on both sides of that frame (the oracle's pre-deblock, post-deblock,
post-CDEF and final dumps are byte-identical to each other, and so are ours),
and on a lossless frame the pixel delta IS the prediction delta -- so the
residual, the dequant scale and the 4x4 WHT placement are exonerated by
arithmetic, not by search.

libaom asks has_bottom_left with the LEAF's bsize, the unit's (row_off,
col_off) and tx_size, and answers TRUE inside the left column whenever
`row_off + count < plane_bh_unit` -- the block's own next row, already
reconstructed. A 4x8 leaf's first TX_4X4 unit therefore has four real
bottom-left samples. sub8_leaf_chroma444 looked a standalone BLOCK_4X4 up at
the unit's own position instead, got false, and PlaneBuf::edges replicated
the last left sample across the edge's full reach: the unit predicted
D203/CFL from a fabricated edge. A from-scratch transcription of libaom's
z3 + edge filter + upsample reproduces all 16 oracle samples of each damaged
unit with the real column and all 16 of ours with the replicated one, and the
damage in the 2nd and 3rd blocks is that first wrong block's pixels read back
as their left edge.

Fix: Reach::of_tu over the leaf's own (bw, bh, col_off, row_off, tx) with the
block reach the function already computes -- at both lossless 4:4:4 arms, the
intra one and the intrabc one, which is what the 4:2:2 twin of this function
was already fixed to do (lane-av1-422kf2). 49 -> 0 on the 109215 B carrier and
on the independent 109909 B one.

Witness: a_lossless_444_sub8_rect_leaf_chroma_reach_decodes_the_key_frame_pixel_exact
-- live re-encode pinned by length and fnv1a64, 4:4:4 header asserted,
key frame byte-exact against aomdec --limit=1, and the new
sub8_chroma444_lossless_tu_reach_hits() counter (86 on this cell) proving the
fixed path fired. Red-before with only the two reach expressions reverted:
"differs from aomdec in 49 samples (first Some((1, 201, 200, 160, 159)))".

4:2:0 and 4:2:2 are structurally untouched (every call site sits behind
`chroma_444`), and a square 4x4 leaf is provably unchanged (of_tu falls
through to the block's own answer, which for a square leaf IS the old
lookup). -- lossless 444: 48/0. -- 420: 2/0. -- intrabc: 21/0. -- 422: 6/0.
ec-av1: step the intrabc-rect lossless chroma replay by the unit's own mi footprintAhmet Kaan Gümüş · 30d94ca
ec-av1: step the intrabc-rect lossless chroma replay by the unit's own mi footprint

lane-whtshape (f541d062, merged afa13bcf) gave `decode_intrabc_rect` the
per-TX_4X4 lossless chroma walk and the tail replay that re-stamps each
unit's own coefficient context over the whole-block record. The replay
stepped the mi origin by `4 >> ss_y(fctx)` cells, which is 4:2:0-only
arithmetic.

A TX_4X4 chroma unit covers `4 << ss` LUMA pixels, so its origin in the
luma-mi grid advances by `(4 << ss) / MI`. That is the form
`decode_inter_block`'s reference `mu_chroma_units` construction already
writes (decode.rs:43688, `at.0 + cr * ((cu << ss_y(fctx)) / MI)` with
cu = 4 on a lossless frame); this site was the outlier.

  ss (1,1) 4:2:0: `4 >> 1` = 2 mi, and `(4 << 1) / 4` = 2 mi -- the SAME
              number, so 4:2:0 is unchanged BY CONSTRUCTION, not by
              measurement alone.
  ss (0,0) 4:4:4: `4 >> 0` = 4 mi = 16 luma px per 4x4 chroma unit, where
              the unit covers `4 << 0` = 4 luma px = ONE mi. Every replayed
              unit was stamped at 4x its own mi row/column, writing over
              cells belonging to other blocks.

Measured on `ll444_intrabc_rect_l2.obu` (testsrc2 512x128 yuv444p,
aomenc --lossless=1 --cpu-used=2 --lag-in-frames=0 --kf-max-dist=100
--limit=6, 121844 bytes, sha256 f0de080edce35d34cdd628b71f63dc452
f946e8328352b69d3c1da090a54ec67), which reaches it: before, 10604 samples
wrong in the KEY frame, first at byte 33216 (Y(64,448)) -- the corrupted
chroma context desyncs the following luma, which is why the first
divergence is luma at all; frames 1-5 123987..171988 wrong. After: all
six frames byte-exact against the oracle aomdec in decode order, and the
EC_SYMR ladder is 540833 reads on both sides with zero fork.

Gate `a_lossless_444_intrabc_rect_replay_steps_by_the_units_own_mi_footprint`
asserts the 4:4:4 shape from the stream's OWN parsed sequence header (at
(1,1) the two steps are the same number, so a 4:2:0 stream cannot fail
this gate), that lane-whtshape's own INTRABC_RECT_LOSSLESS_CHROMA4_HITS
counter fired so the corrected expression was evaluated, luma-sized chroma
extents, and decode-order byte-exactness. Control arm: the 128x96
4:4:4 lossless pin must read that counter 0 -- whole square blocks have no
multi-unit chroma plane block to step.

Mutation proof, run: reverting only the step expression and nothing else
turns the gate RED at "decode-order frame 0 of 6 differs from the oracle
at byte 33216 (ours 101 vs 100), 10604 bytes differ"; restored from a
saved copy with cp, verified with diff -q, LIVE run ok.
Merge lane-av1superpin @ 9646f74d — superres den=9 + mode-2 pins, shared helper, report correctionsAhmet Kaan Gümüş · c1b1e89
Merge lane-av1superpin @ 9646f74d — superres den=9 + mode-2 pins, shared helper, report corrections

- crates/ec-av1/fixtures/:
  444_lossy_rect4_odd_130x122.obu (8945 B), 444_lossy_rect4_wide_256x128.obu
  (15239 B), 444_lossy_superres_256x128_d9.obu (17437 B),
  444_lossy_superres_256x128_d12.obu (14808 B),
  444_lossy_superres_mode2_256x128.obu (16620 B) and the shared
  a_444_superres_arm helper.
- crates/ec-av1/src/stream.rs: a_444_lossy_superres_stream_decodes_pixel_exact,
  a_444_lossy_superres_mode1_den9_stream_decodes_pixel_exact,
  a_444_lossy_superres_mode2_random_denom_stream_decodes_pixel_exact,
  a_444_lossy_rect4_strip_stream_decodes_pixel_exact_at_odd_and_wide_geometries
  and the flag-ignoring control arm.
- crates/ec-av1/src/decode.rs, lanes/av1444edge.report.md,
  lanes/av1superpin.report.md, lanes/av1formatsweep.report.md.
- crates/ec-av1/src/gate_coverage.rs: the wave-wide retirement reconciliation
  (below).
- lanes/merge-wave-2.report.md: the wave's merge table, every conflict
  resolution, and the two post-merge fix tasks.

SPLICE from lane-park-av1444edge @ a02a2511 (that branch is NOT merged): the
§6.2 `130x122` row of lanes/av1formatsweep.report.md carries av1444edge's
CORRECTION — the cell is EXACT 4/4 (8945 B, sha c87ac65b…), the same H1
1:4-inter-strip chroma class, closed by lane-av1444rect's f92776ba (an ancestor
of main) and gated by
a_444_lossy_rect4_strip_stream_decodes_pixel_exact_at_odd_and_wide_geometries.
The original measurement text is KEPT inside the row ("was DIVERGENT from f3,
11521 samples, first (f3, s2208) = Y(128,16); now EXACT 4/4"), not deleted.
Nothing else from a02a2511 is taken: its r4 gates are content-equivalent
duplicates of superpin's a_444_superres_arm, and its two other fixtures are
byte-identical blobs under different names.

Conflicts resolved:
* decode.rs (2 hunks, both @ours): one comment-only hunk where MAIN's text is
  more informative (it states what the counter is NOT evidence for), and one
  where theirs has no counterpart — INTRABC_RECT4_OWN_CHROMA444_HITS is a
  main-only addition from an earlier lane that superpin's older base predates.
* stream.rs: add/add at the end of `mod tests` producing INTERLEAVED hunks
  that split ours' last gate mid-statement, so marker surgery does not apply.
  Resolved by construction: this branch's stream.rs delta against its merge
  base is 933 added lines at a single hunk, so merged = HEAD verbatim + that
  block. That block re-adds a_444_lossy_rect4_inter_stream_decodes_pixel_exact,
  byte-IDENTICAL (5905 B, extracted and compared) to the copy main already has
  from lane-av1444rect e10a3b25, which superpin also carries; the appended
  copy is DELETED here. All six of this branch's gates are present exactly once
  afterwards.
* lanes/av1formatsweep.report.md (add/add): superpin's version with the spliced
  130x122 row, as above.

gate_coverage.rs — the union of the wave's retirements, so
never_exercised_{8,10}bit_matches_the_gate_recipes is green on derived
evidence rather than on an edit:
  enable-dist-wtd-comp (8b)  a_distance_weighted_compound_stream_decodes_pixel_exact
  enable-dual-filter   (8b)  a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact
  enable-dual-filter   (10b) a_real_aomenc_10bit_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact
  enable-flip-idtx     (8b)  a_real_aomenc_stream_with_a_1d_tx_class_on_a_rect_transform_…
  enable-rect-tx  (8b and 10b) a_real_aomenc_{8,10}bit_stream_with_a_rect_transform_decodes_pixel_exact
Both lists are now empty; the census derives EMPTY (0 of 26 tools) at both
depths across 255 real-aomenc gate bodies. TOOL_UNIVERSE keeps all 26 tools,
enable-rect-tx included. The test was NOT weakened: it was red with
"the 8-bit list still names [\"enable-rect-tx\"] …" and
"the 10-bit list still names [\"enable-dual-filter\", \"enable-rect-tx\"] …"
immediately before this edit, and the retirement evidence is preserved as
comments above each emptied list.

Duplicate fixtures: measured after this merge, crates/ec-av1/fixtures/ holds
63 files with 63 DISTINCT sha256 prefixes — zero duplicates, so no blob is
carried twice under two names and no file was deleted for that reason.
lane-av1leftwit: the +ss_y left-reference shape is reachable, and pinnedAhmet Kaan Gümüş · aec3e0f
lane-av1leftwit: the +ss_y left-reference shape is reachable, and pinned

The shipped `+ss_y` term on `smooth_uv_neighbour_unsnapped`'s left read had no
witness, and the two claims standing in for evidence were both wrong.

1. "Structurally absent, because aomenc never starts a block on an odd mi
   row" -- 1 mi is 4 luma px, not 8; libaom's PARTITION_HORZ_4 puts its
   `i == 0` child on the PARENT's own mi row, which for a 16x16 is a multiple
   of 4 and therefore even (av1/decoder/decodeframe.c, `mi_row + i * bw / 4`),
   and av1_ss_size_lookup[..][1][1] is non-INVALID for every 4-px-tall bsize.
2. "Six committed 4:2:0 fixtures reach it, and on reelb_ss600_key_frame.obu the
   boolean flips" (a comment in decode.rs) -- never measured. Measured over all
   48 committed fixtures that decode, reelb_ss600 reads mode_diff=0
   smooth_diff=0 split1mi=0.

`uv_left_ss_y_reads` cannot tell "reached the shape" from "read two cells of
the same block", which is why both claims survived. New `uv_owner` per-cell
owner stamp (epoch-tagged per tile, written beside `uv_mode_grid`) plus
`UV_LEFT_1MI_SPLIT_HITS` / `uv_left_1mi_split_hits()` count decode-path reads
whose two cells were written by different blocks -- the run-of-length-1
geometry. It is NOT zero: 5 of 48 fixtures, 15 reads (gm_small_side 5,
reelc_sb128_inter 7, av112bit-{inter,compound,compound-masked} 1 each), all on
the decode path, all at even mi rows, with a 32x16 block above a 16x4 one.

The term is kept: `chroma_left_mi = base_mi[ss_y * mi_stride - 1]`
(av1_common_int.h:1411) is exactly the shipped read. What stays unwitnessed is
narrower and now says so: in all 15 reads the two blocks agree on `uv_mode`,
so the term moves no pixel (byte-identical on all five with the term reverted,
§6 of the report). A 115-encode targeted hunt -- 1-mi chroma bands, phase-
shifted vertical stripes, sub-transform noise, random mosaics, 36 real lavfi
arms, min/max-partition 4..128, lossless and cq 8..45 -- produced no
1-mi-tall leaf at all, and the `EC_LEFTSSY` leaf census says why: a wide block
codes 1-D structure almost for free, and content fine enough to force small
blocks stops at 8x8, which is 2 mi tall.

Gate: `a_committed_4to20_stream_presents_a_one_mi_left_neighbour_to_a_decode_path_read`
pins the census on two fixtures. Non-vacuous: removing the `uv_owner` stamp
drops both arms to 0 and fails it. Deliberately NOT a mutation of the term
itself, which leaves these reads untouched.

The 16x4/4x16 pair witness's counter-only mirror (decode.rs:17629) is kept --
it measures a live comparison and fires 51/24/121/0/1 on the fixtures
censused -- but both it and the `decode_path` flag no longer claim to be
evidence about this term.

Report: lanes/av1leftwit.report.md (hunt table, corpus census, red/green).
Merge lane-whtshape @ f541d062 — the lossless WHT shape-total fixAhmet Kaan Gümüş · ec131f6
Merge lane-whtshape @ f541d062 — the lossless WHT shape-total fix

- crates/ec-av1/src/transform.rs: a non-4x4 unit is RECONSTRUCTED as a 4x4
  raster instead of being asserted away — of libaom's
  highbd_inv_txfm_add_*_c only the 4x4 one carries a `lossless` branch, the
  rest fall through to the IDCT, and this call site was passing a rect
  lossless shape that no such function can accept.
- crates/ec-av1/src/decode.rs: decode_intrabc_rect no longer codes a rect
  intra-BC block's chroma plane as ONE rect transform unit.
- crates/ec-av1/fixtures/ll444_sb64_1to4_lossless.obu (51107 B).
- crates/ec-av1/src/stream.rs: a_444_lossless_sb64_intrabc_rect_chroma_walks_4x4_units.
- lanes/whtshape.report.md (the RELEASE premise refuted, the call site fixed,
  the residual fork named).

Conflict resolved in stream.rs: add/add at the end of `mod tests`. Both lanes
append at the same anchor and git produced TWO interleaved hunks that split
ours' last gate mid-statement, so the marker surgery does not apply. Resolved
by construction instead: this lane's stream.rs delta against the common base
is a single 199-line block appended at the tail, so the merged file is
HEAD's stream.rs verbatim (tail brace kept) + that block + the module's
closing brace. `cargo check -p ec-av1 --all-targets` is clean and the
per-parent `fn a_*` set difference shows zero lost and zero replaced.
Merge lane-av1lm444loss @ 9249442f — the lossless frame-edge TX-grid clip fix + gateAhmet Kaan Gümüş · cb2465d
Merge lane-av1lm444loss @ 9249442f — the lossless frame-edge TX-grid clip fix + gate

- crates/ec-av1/src/decode.rs: libaom clips the transform-unit grid at the
  frame edge (max_block_high/max_block_wide fold mb_to_bottom_edge /
  mb_to_right_edge in before the shift), so decode_token_recon_block now
  bounds the square AND the rect mu walks by the part of the block inside the
  frame, with the LOSSLESS_EDGE_CLIPPED / LOSSLESS_EDGE_CLIP_UNITS counters as
  the non-vacuity evidence. Identical arithmetic for a block that fits.
- crates/ec-av1/src/stream.rs: the H1 gate.
- lanes/av1lm444loss.report.md (appendix r2 diagnoses the remaining lead (b)
  blocking defect).

No conflict: decode.rs auto-merged — the region is disjoint from
lane-av1chrtx's per-unit leaf tx_type work (~7.8k/~28.2k) and from
lane-av1distwtd's compound counter.

Tip note: the branch head 5519aaf8 is one commit past this tip
("ec-av1: ss-aware chroma geometry + lossless TX_4X4 raster in
decode_intrabc_rect") and is NOT merged here; the dispatched tip is 9249442f.
That delta is the follow-on lead (b) work the report's appendix names as
still open.
Merge lane-av1distwtd @ 1aaf7e0b — dist-wtd-comp witness gate + census detector fix + two retirementsAhmet Kaan Gümüş · deb9682
Merge lane-av1distwtd @ 1aaf7e0b — dist-wtd-comp witness gate + census detector fix + two retirements

- crates/ec-av1/src/decode.rs: DIST_WTD_COMP_HITS counter on the `compound_idx
  == 0` arm in decode_inter_block / decode_inter_block8, with
  dist_wtd_comp_hits() / reset_dist_wtd_comp_hits().
- crates/ec-av1/src/stream.rs: a_distance_weighted_compound_stream_decodes_pixel_exact
  — spells --enable-dist-wtd-comp=1 AND asserts the PARSED sequence header's
  enable_jnt_comp, with the =0 arm asserting false from the same recipe.
- crates/ec-av1/src/gate_coverage.rs: gate_bodies() now resolves CALLS as well
  as spellings (encoder_fns/calls_fn/fn_units/legacy_gate_tokens) and
  covers_both_depths() recognises the pair-of-pixel-formats marker; the new
  test the_detector_sees_the_gates_the_spelling_filter_missed pins the fix as
  strictly ADDITIVE against the old spelling-only filter. Retirements:
  enable-dist-wtd-comp, enable-dual-filter (8-bit) and enable-flip-idtx
  (8-bit) leave NEVER_EXERCISED_8BIT; enable-dual-filter STAYS in the 10-bit
  list with a corrected reason.
- lanes/av1distwtd.report.md.

Conflict resolved in stream.rs: add/add at the end of `mod tests` (both lanes
append there). Kept BOTH sides; the shared trailing `    }` / `}` was hoisted
out of the hunk, so ours' last test needed its closing `    }` re-inserted
between the two blocks — verified by `cargo check -p ec-av1 --all-targets`.

FOREIGN EDITS PRESERVED, NOT COMMITTED: while this merge was in flight two
untracked/unstaged changes belonging to other lanes appeared in the primary
checkout. Neither is part of this lane.
1. A 465-line addition to crates/ec-av1/src/gate_coverage.rs (the
   lane-av1txsearch `bound_values` / `spelling_values` / `resolved_on_state`
   detector work, which duplicates four functions this merge had just added).
   Byte copy: $HOME/.cache/merge-wave-2-keep/gate_coverage.rs.lane-av1txsearch-leak
   — its owner lands it in /home/user/.cache/wt/av1txsearch.
2. lanes/av1mergecheck.report.md (a sibling read-only review pass's verdict).
   Byte copy: $HOME/.cache/merge-wave-2-keep/av1mergecheck.report.md.foreign
   — left untracked in the worktree for its owner to commit.
ec-av1: settle the 4:4:4 coefficient-read count asymmetry by measurementAhmet Kaan Gümüş · cf7d7f8
ec-av1: settle the 4:4:4 coefficient-read count asymmetry by measurement

The av1444rect round-4 report left 636 square chroma reads against the
oracle's 1086 (and 2052 vs 1309 luma) as "most likely a counting-shape
difference", established neither way. This measures it.

A new per-unit census rung (EC_CENSUS_UNIT) counts one unit per
read_coeffs/read_coeffs_rect call -- the object the round-4 count measured
-- carrying plane, w/h, tx_type, eob, all_zero and the msac state before
and after the unit. Paired against the oracle's existing EC_COEFF /
EC_COEFF_VAL bracket per av1_read_coeffs_txb call BY post_rng, never by
plane label or walk position.

On every pixel-exact 4:4:4 arm the counts are identical, unit for unit:
ll444_minp8_inter 11292/11292 (3764 per plane both sides, 975/1793/1859
coded), 444_lossy_rect4_inter_witness 1373/1373, 444_quad_leaf_tx_type
192/192. Bucket (i) is the whole census; there is no asymmetry to explain.

The round-4 numbers came from 444_intrabc_rect4_witness, which DIVERGES
(390380 of 921600 samples wrong) -- there the surplus is the divergence
itself, so the count could never have separated the two hypotheses.
Verdict: counting shape, and not even that on a pixel-exact arm.

Gate: a_pixel_exact_444_stream_walks_the_same_coefficient_units_the_oracle_does
pins the walk's object shape on two exact arms -- the all-TX_4X4 lossless
stream and a mixed-shape rect4 stream, which is what makes a var-tx fold
visible. Mutation-proven: dropping 8x8 units turns it red by name. The
census is armed per frame from the sequence subsampling, so the 4:2:0
control asserts exactly (0, 0, 0).
lossless WHT: a non-4x4 unit is reconstructed as a 4x4 raster, not asserted awayAhmet Kaan Gümüş · c465d06
lossless WHT: a non-4x4 unit is reconstructed as a 4x4 raster, not asserted away

libaom cannot code a lossless transform unit that is not 4x4: read_tx_mode
(decodeframe.c:140) returns ONLY_4X4 for a coded_lossless frame before it
looks at the tx_mode symbol, read_tx_size (:1117) returns TX_4X4 before it
looks at a tree, get_vartx_max_txsize (blockd.h:1447) returns TX_4X4 for
EVERY plane of a lossless block, and of idct.c's highbd_inv_txfm_add_*_c only
highbd_inv_txfm_add_4x4_c carries a lossless branch -- the rest fall through
to the IDCT, because there is no non-4x4 lossless inverse transform to
dispatch to. So a non-4x4 lossless unit is this decoder's own transform-unit
geometry being wrong, and neither refusing nor papering over it is what the
reference does: the honest total is the raster of 4x4 WHT units libaom's
lossless geometry would have produced for that footprint.

MEASURED, not assumed: the premise that a RELEASE build "silently runs a
wrong-shape transform" is REFUTED. On the two independent 4:4:4 lossless
witnesses the debug build stops at decode.rs:2787
`debug_assert_eq!((self.w, self.h), (4, 4))` with `left: (8, 4)`, and the
RELEASE build dies one frame later with an opaque
`range end index 8 out of range for slice of length 0` -- it panics, it does
not mis-transform. The defect is real either way: a debug-only assert was the
only thing naming the invariant, and release's failure message named neither
lossless nor the transform.

decode.rs
  - TxParams::run: the debug-only shape assert (and the debug-only
    `tx_type == DctDct` assert on an argument the WHT never reads) are
    replaced by a counted call into the shape-total entry. Counted by
    LOSSLESS_WHT_SPLIT_UNITS, which must read 0 on any stream whose lossless
    unit geometry is right.
  - decode_intrabc_rect: a LOSSLESS rect intra-BC block's chroma plane block
    is now `bw >> ss_x` by `bh >> ss_y` (av1_get_max_uv_txsize is
    ss_size_lookup[bsize], no halving of its own -- at 4:4:4 that is the
    block's own footprint) walked as a (cw/4)*(ch/4) PLANE-MAJOR raster of
    TX_4X4 units through the existing read_inter_chroma_lossless, with the
    per-unit coefficient contexts replayed over the whole-block
    record_split_luma_rect_mi (class override-slot-on-one-arm, the same one
    decode_rect_split's ll_chroma_units replay exists for). Counted by the
    exclusive INTRABC_RECT_LOSSLESS_CHROMA4_HITS. Scoped to `lossless` on
    purpose: the 4:2:0 halving is right at 4:2:0, and zero pinned fixtures
    decode a LOSSLESS intrabc rect block, so no green pin moves.
transform.rs
  - dequant_and_inverse_wht: the shape-total lossless entry. 4x4 is the same
    single call it always was, so the lossless fast path is bit-for-bit
    unchanged; any other shape is the raster of 4x4 WHT units over a
    row-major w-wide grid, zero-filled on a partial tile, empty-grid marker
    preserved. No shape panics and no shape returns a buffer its caller
    cannot index.

MEASURED: the pinned witness (fixtures/ll444_sb64_1to4_lossless.obu, 51107 B,
sha256 fdb64679.., testsrc2 256x256 yuv444p10le, aomenc --lossless=1
--profile=1 --i444 --enable-1to4-partitions=1 --min-partition-size=4
--max-partition-size=64 --sb-size=64 --enable-intrabc=1) went from a RELEASE
panic / DEBUG Golomb-tail refusal to 2 decoded frames, 24576 lossless WHT
units and 0 non-4x4 ones. 43 named lossless / 4:4:4 / intrabc-rect gates stay
green (21 `lossless`, 16 `444`, 5 `intrabc_rect`, 1
`rect16x4_chroma_reach`), in release.

The gate's pixel arm is a measured per-frame, per-plane exact PREFIX, not an
exactness claim: frame 0 is byte-exact to sample 32992 of 65536 on all three
planes and frame 1 to 55008 (Y) / 9378 (U,V). The residual forks are a
separate defect, named with their coordinates in lanes/whtshape.report.md r3.
ec-av1: clip a lossless block's TX grid at the frame edgeAhmet Kaan Gümüş · 589db23
ec-av1: clip a lossless block's TX grid at the frame edge

A lossless block's transform-unit grid was built as `side / MI` square,
unbounded by the frame. libaom bounds it: `max_block_high` /
`max_block_wide` (av1_common_int.h:1565, :1579) fold `mb_to_bottom_edge`
/ `mb_to_right_edge` into `block_size_high/wide` before `>>
MI_SIZE_LOG2`, and `decode_token_recon_block` then caps every mu chunk
with `unit_height = ROUND_POWER_OF_TWO(AOMMIN(mu_blocks_high + row,
max_blocks_high), ss_y)` -- so the units of an overhanging block that
fall outside the frame are never read. The var-tx branch of
`read_block_tx_size` twenty lines below already applied exactly this
clip (`max_w_mi`/`max_h_mi`); the lossless branch, and the same branch
of `read_block_tx_size_rect`, did not.

Mechanism, measured on the pinned 128x96 4:4:4 lossless stream (96 is
not a multiple of the 128 superblock, so each of its five inter frames
carries one unsplit 128 root overhanging the bottom by 32 px). The frame
is 24 mi tall, so `max_blocks_high >> 2` is 24 transform rows where the
block's own `side / MI` is 32. The unclipped walk therefore read 8 rows
x 32 columns = 256 transform units per inter frame that libaom never
codes: 2560 all_zero reads per frame against the oracle's 2304.

The `EC_SYMR` ladder put the first fork at read 71322, exactly on that
row-24 boundary -- `EC_COEFF_STEP tag=all_zero` shows the oracle moving
to `plane=1 bc=0 br=16` (chroma, txb_skip ctx 10) where we were still
reading `plane=0` luma ctx 1. Both sides read the same
`decodetxb.c:158` txb_skip CDF, so this was never the coefficient
reader Agent04-2's census excluded: the walk was still in the wrong
PLANE. After the fix the ladder is 235940 reads on both sides with zero
fork, and all six frames match the oracle `aomdec --rawvideo` in decode
order exactly (the unclipped tree was wrong from frame 1: 5596 samples
at the first differing byte 16544, growing to 33561 by frame 5).

The clip is a no-op on any block that fits, which is what keeps every
other lossless and 4:2:0 pin byte-identical; the gate's control arm
pins that direction (both counters must read 0 on a stream whose blocks
all fit).

Gate: `a_lossless_block_clips_its_transform_grid_at_the_frame_edge`.
Non-vacuous -- `lossless_edge_clipped()` fires 5 times (once per 128
root) and reads 0 on a frame that fits, `lossless_edge_clip_units()`
reads exactly 1280 = 5 x 256, and every sample of every frame is
asserted against the oracle. Mutation proof, run: reverting the clip to
the unclipped grid turns it RED at the counter assertion (0/5 roots),
and the same reverted build is 5596..33561 samples off the oracle.
av1: close the enable-dist-wtd-comp coverage hole with a real witness streamAhmet Kaan Gümüş · b93fec6
av1: close the enable-dist-wtd-comp coverage hole with a real witness stream

The coverage census listed `enable-dist-wtd-comp` in NEVER_EXERCISED_8BIT
with the reason "distance-weighted compound is unimplemented". That reason
was WRONG. The combine is implemented: `compound::dist_wtd_comp_weight_assign`
(lane-av1comp) and `mc::combine_compound`'s weighted path have been in the
tree for a long time. What was missing was a stream CARRYING the tool, so
the census read the entry as open and no gate ever proved the tool fires.

STEP 0 (producibility, against aom 3.13.3): the flag maps onto the sequence
header's `enable_jnt_comp` bit -- `av1_cx_iface.c:1062` ->
`order_hint_info.enable_dist_wtd_comp`, written at `bitstream.c:2681` under
`enable_order_hint` and AND-masked by it at `av1_cx_iface.c:1491`. The
parsed header is asserted, never the flag spelling. Measured: the same recipe
parses `jnt_comp=true` with `=1` and `jnt_comp=false` with `=0`, and the arms
differ on the wire (6855 B vs 6911 B). A flag the encoder accepted but
ignored would fail both asserts.

The gate: `--enable-dist-wtd-comp=1` over rotating mandelbrot at
`--min-partition-size=32 --cq-level=30` (both load-bearing -- at min=16 the
encoder emits 8x8 inter leaves this decoder refuses BY NAME before the
`compound_idx` read runs, and at cq 45/55 the stream has no compound block at
all). Three hard asserts: the PARSED header carries `enable_jnt_comp`; the
`compound_idx == 0` arm fired (`dist_wtd_comp_hits() > 0`); and every frame is
pixel-compared against the oracle with lengths asserted first.

decode.rs is additive only -- a `DIST_WTD_COMP_HITS` counter and two `hit!`
calls inside the existing `idx == 0` arm. No blend arithmetic is touched, so
the single-reference path is unaffected (neither bump site is reachable
without a second reference) and 12-bit is unaffected (`combine_compound`
already carries the `round_delta` post-round from lane-av112bit).

Measured: 25 oracle frames, 21 distance-weighted blocks. Red-before, both
directions. Mutating `dist_wtd_comp_weight_assign` to return the (8, 8)
simple average reds the pixel compare at decode-order frame 7 (552 bytes
differ); disabling the counter reds `dist_wtd_comp_hits > 0` with the pixels
still green, which is what separates "the counter can fire" from "the pixel
compare alone would catch it".

Regression: 35/35 compound gates green (8/10/12-bit, including the 12-bit
8x8 leaf) and 15/15 4:4:4 gates green. 4:4:4 reaches the same arm
independently (22 blocks at cq 20, 21 at cq 30, pixel-exact both) and 12-bit
reaches it too (15 blocks), so the tool is not 4:2:0-only.
ec-av1: resolve each rect inter chroma unit's tx_type from its own luma leafAhmet Kaan Gümüş · 7a36733
ec-av1: resolve each rect inter chroma unit's tx_type from its own luma leaf

read_inter_rect_chroma -- the sibling of the two 4:4:4 four-unit arms --
still handed every chroma unit the BLOCK-level luma_tx_type (the
top-left leaf's type) after lane-av1444chr pointed those two arms at
covering_leaf_tx_type. av1_get_tx_type (blockd.h:1287-1297) instead
reads xd->tx_type_map at the chroma unit's own position scaled back to
luma, and read_coeffs' all_zero arm stamps DCT_DCT into that leaf's map
cell (decodetxb.c:199-203), so a unit over a luma leaf that coded
NOTHING inherits DctDct, not the block's type.

Measured on a new pinned witness (fixtures/444_rect_strip_leaf_tx_type.obu,
26839 bytes, sha256 06174a66e92aaeb751a8e86db59711fcb1f18d74bde2d77e1ef1be7983eb7c80,
testsrc2 256x256 yuv444p x3, aomenc --profile=1 --cq-level=30 --cpu-used=0
--sb-size=64 --min-partition-size=32 --max-partition-size=64
--enable-tx-size-search=1 --passes=1 --end-usage=q --threads=1 --row-mt=0
--lag-in-frames=0 --kf-max-dist=100 --limit=3 --obu): the 32x64 inter
strip at mi(32,48) has a 4:4:4 chroma plane of (32,64) = TWO TX_32X32
units over a five-leaf luma tree (Idtx 32x32 on top, then VDct/DctDct/
HDct/VDct 16x16). The lower unit inherits VDct where the block-level
value is Idtx, once per chroma plane.

Red-before: reverting only the resolve to the block-level type turns the
new gate red -- "decode-order frame 1 of 3 (3 shown, 0 hidden) differs
from the oracle at byte 105949 (ours 166 vs 167), 1998 bytes differ".
Restored: green. The DIFF counter (not the route counter) is the
non-vacuity bar: a route counter fires on any rect chroma read, and a
committed control (444_sb128rect_lr_witness.obu, 2 units resolved, 0
differing) is exactly the shape a no-op fix would look green on.

Witness hunt (200+ encodes over 4:4:4 sources, partition / tx-size-search
and cpu-used sweeps): multi (nx*ny > 1) is false BY CONSTRUCTION at
4:2:0 -- a side <= 64 block's chroma plane is at most 32x32, one unit --
so the arm needs 4:4:4 AND a rect block that keeps a 64-px axis, and
only cpu-used=0 with --min-partition-size=32 made aomenc pick the
32x64 strip. Two new gate counters CHROMA_RECT_LEAF_TX_HITS /
CHROMA_RECT_LEAF_TX_DIFF_HITS, separate from CHROMA_QUAD_LEAF_TX_HITS
because that pair gates a 4:2:0 control asserting exactly 0 and this
route IS reachable at 4:2:0.

Plus a unit test on covering_leaf_tx_type itself (mixed-leaf lookup,
interior cells, out-of-extent -> None, empty leaf list -> None),
mutation-proven red by turning the containment '<' into '<='.
ec-av1: thread the real plane index into read_coeffs_rect's EC_COEFF_STEP tracesAhmet Kaan Gümüş · 0789576
ec-av1: thread the real plane index into read_coeffs_rect's EC_COEFF_STEP traces

read_coeffs_rect printed a hardcoded plane=0 on its two tagged trace lines
(tag=all_zero, tag=tx_type), so every chroma rect coefficient read was
logged as a luma one. Two independent lane reports mis-read a chroma
unit's txb_skip / tx_type symbol on those lines and followed the luma
arm; the log could not tell them apart.

Adds a plane parameter and passes the caller's own plane index at all
twenty call sites (read_inter_plane_rect / read_rect_chroma_unit /
leaf8_chroma422_unit / sub8_leaf_chroma444 carry plane or plane_idx;
the luma readers pass 0). read_chroma_coeffs_rect takes the same
parameter and passes it through, so the U/V call sites in
decode_block_rect, decode_leaf_rect, decode_block_rect4,
decode_rect4_16_strip and decode_block_rect64 stop collapsing U and V
into one tag.

Measurement (EC_TRACE_COEFF=1 on the 4:4:4 rect gate
a_444_lossy_rect4_inter_stream_decodes_pixel_exact): the all_zero lines
now split 312 plane=0 / 310 plane=1 / 310 plane=2 where every chroma
line previously read plane=0. No gate output changes; the traces are
env-gated and off by default.

2026-09-28

Merge branch 'lane-av1444chr'Ahmet Kaan Gümüş · 236bad3Browse files
Merge branch 'lane-av1h5'Ahmet Kaan Gümüş · f0bc1acBrowse files
Merge branch 'lane-av1444rect'Ahmet Kaan Gümüş · 0d240a7Browse files
Merge branch 'lane-av1tilerows'Ahmet Kaan Gümüş · 048a859Browse files
ec-av1: 4:4:4 inter chroma units inherit their own quadrant's luma tx_typeAhmet Kaan Gümüş · dc2a1dd
ec-av1: 4:4:4 inter chroma units inherit their own quadrant's luma tx_type

The 64x64 four-unit chroma arm (ss 0/0, chroma_side > chroma_tx) handed all
four TX_32X32 units the block-level luma_tx_type -- the TOP-LEFT luma leaf's
coded type. libaom's av1_get_tx_type (blockd.h:1287-1297) instead reads the map
cell at the chroma unit's own position scaled back to luma, and a luma leaf
that coded nothing is stamped DCT_DCT there (decodetxb.c:199-203), so every
unit sitting over a skipped luma quadrant was reconstructed with the wrong
transform.

leaf_tx_types was only collected under , so at 64 it was empty and
there was nothing to resolve from; it is now collected at every size, both
copies of the arm resolve per quadrant through the shared
covering_leaf_tx_type (extracted from the three inline copies that already
existed -- one convention, not four), and two counters record the route and
the cases where the resolved type DIFFERS from the block-level one.

Witness pinned as fixtures/444_quad_leaf_tx_type.obu (27933 B, sha256
a06c9f7a0862252f6ab7ebdcec340d0602e730e38089365f14747db37f8e78d5): decode-order
frames 1/2/3 went from 777/640/554 wrong V samples to byte-exact, and the
per-unit type census against aomdec's EC_DQCOEFF goes from 4 disagreements to
0 of 136. Reverting only the per-quadrant resolve turns the new gate red on
frame 1 with 777 bytes differing.

The new gate asserts the DIFFERS count (8 on the witness), not the route count
(96) -- a route counter fired on the one block of an earlier no-op port that
changed zero pixels. A 4:2:0 control asserts both counters stay at 0.
ec-av1: lane-av1444rect -- a 1:4 inter strip's chroma context was gathered at the 4:2:0 pair extent at ss (0,0), forking the coder (H1)Ahmet Kaan Gümüş · 84fa44c
ec-av1: lane-av1444rect -- a 1:4 inter strip's chroma context was gathered at the 4:2:0 pair extent at ss (0,0), forking the coder (H1)

At 4:4:4 `is_chroma_reference` (av1_common_int.h:1454) reduces both parity
clauses to `!subsampling_y` / `!subsampling_x`, so EVERY block is its own
chroma reference and no 1:4 pair exists. `decode_inter_block`'s `around_c`
never gated on ss, so a HORZ_4 16x4 strip read its chroma coefficient
context over the 4:2:0 pair extent (16x8 luma = left[mi_r] and
left[mi_r+1]) instead of its own 4-px one. The U unit's `get_txb_ctx` then
saw a left neighbour libaom does not have and forked the arithmetic coder.

The 4:4:4 lossy + RECT cell -- the largest correctness gap the chroma-format
sweep left (lanes/av1formatsweep.report.md H1) -- had NO exactness gate at
all: the whole committed 4:4:4 base is lossless 8-bit.

Witness: testsrc2 128x96 rate=25 yuv444p, aomenc --profile=1 --passes=1
--end-usage=q --cq-level=20 --cpu-used=2 --threads=1 --row-mt=0
--lag-in-frames=0 --kf-max-dist=100 --limit=2, 6441 B, sha256 77f727e7...
Red before: frame 1, 8884/36864 samples wrong, first at Y(91,32); the first
wrong symbol was read 26263, both sides at mi (8,16) -- ours a luma-shaped
txb_skip row (re-indexed chroma ctx 1), the oracle decodetxb.c:158 on the U
plane with txb_skip_ctx 7. Green after: 2/2 frames byte-exact vs aomdec.

Gate `a_444_lossy_rect4_inter_stream_decodes_pixel_exact` pins the fixture
(len + FNV), asserts the ss (0,0) full-resolution chroma shape, the
byte-exact compare through the oracle aomdec, and non-vacuity on the
corrected route via `rect4_inter_own_chroma444_hits` (9 gathers here, 0 on
the 4:2:0 control, which also carries 16 HORZ_4 / 28 VERT_4 strips and is
itself compared byte-for-byte so a widening past ss_x 0 goes red).
Mutation proof: restoring the old arm with the counter left in place turns
the gate red at byte 4187 (ours 35 vs 38), 8884 bytes differing.

Identity: the crate's whole 444 family (9), rect_strip family (10), the
16-level rect-leaf gate, and all three new chroma-format-sweep gates
(444 lossless 10-bit, 444 12-bit, odd coded dimensions) run green against
this decode.rs. H2 (4:4:4 lossy tx-size-search chroma +/-1, 608/36864 from
frame 2) is unchanged and still divergent -- it is reconstruction
arithmetic, not entropy, and belongs to its own lane. H3's tile-column
recipe (77847 B, 6 frames) is byte-exact here.

(cherry picked from commit f92776bab2442319e32d4f56844af6956e2fc18b)
ec-av1: lane-av1444edge -- the inter-frame pre-filter rung did not exist, and its counter restartedAhmet Kaan Gümüş · 689d3e0
ec-av1: lane-av1444edge -- the inter-frame pre-filter rung did not exist, and its counter restarted

Two defects in the same measurement rung, both of which report success
while measuring nothing useful. `EC_AV1_PREFILT_WIDE_DUMP` is the only
rung that writes the pre-loop-filter reconstruction cropped to each
plane's mi-ALIGNED extent, i.e. the shape aomdec's own rung 7 writes
(`y_width`/`y_height`), so it is the rung that separates "already wrong
in reconstruction" from "introduced by a loop filter".

1. It was inlined in the KEY-frame tile path only
   (`decode_key_frame_tile_with_cdfs`). `decode_inter_frame_tile_with_cdfs`
   has no wide prefilter dump at all, so every divergence localized to an
   inter frame had no pre-filter rung on our side to compare against the
   oracle's, and the nearest usable rung (the padded `EC_AV1_PREFILT_DUMP`)
   has a different byte shape from every oracle rung. Measured cost on the
   4:4:4 lossy cells this lane was handed: `EC_AV1_POSTDEBLOCK_DUMP` /
   `EC_AV1_POSTCDEF_DUMP` came out 61440 B against the oracle's 52224 B
   (our 160x128 padded surface vs its 136x128 aligned buffer) and the
   oracle's POSTDEBLOCK wrote 3 files for a 4-frame stream, so the stage
   ladder could not be read at all. With the rung on the inter path the
   same two cells' pre-filter dumps are 52224 B and 4 files, and the
   verdict is immediate: reconstruction already diverges at the same first
   sample as the final output, so no filter is involved.

2. Its counter was a FUNCTION-LOCAL `static IDX2`. Rust gives each
   monomorphisation of the enclosing function its own copy, so the index
   restarted and every frame after the first overwrote `.f0` -- a
   per-frame bisection silently compared the last decoded frame and
   reported it as frame 0. Measured directly: before this change the rung
   wrote exactly one file for a four-frame stream.

The counter is now the shared per-var `dump_stage_idx` map the other
stage dumps already use, and the block is a shared `dump_prefilter_wide`
called from both tile paths, beside each path's existing padded
`EC_AV1_PREFILT_DUMP` so the two agree on the point they sample. No
decode-path behaviour changes: the only writes are inside the existing
`if let Ok(path) = crate::envflags::var(...)` arms, which are off unless
the env var is set.

(cherry picked from commit b2148831481f741a05830ac7014876dfc67f8d07)
docs+ec-av1: lane-av1444rect r5 -- the counters document that they prove reach, not that the fix bites; the retraction derives its length from plane extentsAhmet Kaan Gümüş · 4b6247d
docs+ec-av1: lane-av1444rect r5 -- the counters document that they prove reach, not that the fix bites; the retraction derives its length from plane extents

Main's two notes, both taken.

1. Both route counters now say in their own doc comments that a non-zero
   count proves REACH and nothing more, and point at
   skill://ec-av1-pipeline-gate-counters: a counter needs a DIFFERS-style
   assertion to carry a claim. The intra-BC one is also recorded as
   deliberately armed OUTSIDE the own444 expression, so the mutation still
   increments it and the red lands on the pixel/entropy arm -- what carries
   the claim is the measured fork move (read 11750 -> 12465, luma first wrong
   164416 -> 205264, 455240 -> 390380) and the mutation, not the count.

2. The retraction's re-measurement wrote assert len(ours) == 2 * len(ref).
   That factor is a coincidence of 4:4:4 against 4:2:0 at the same geometry --
   it is the bits-per-sample ratio (our dump_yuv emits u16, the oracle's 8-bit
   dump is u8) and has nothing to do with chroma, so it is wrong at 4:2:2, at
   any high bit depth, or on any fixture where the two sides disagree on bit
   depth. The report now says to derive the expected byte length from the
   plane extents and the two bit depths and assert the oracle dump against
   that, never against a copied constant.

Also recorded in the method notes: the 636-vs-1086 chroma and 2052-vs-1309
luma unit-count asymmetry from the round-4 census is explicitly NOT claimed
as a defect, since luma is pixel-exact to 205264 and the surplus is most
likely a counting-shape difference (our var-tx leaves vs libaom's unit walk).
av1h5: shared mu_chunk_order helper, control pin, gate helpersAhmet Kaan Gümüş · 0bb7c3c
av1h5: shared mu_chunk_order helper, control pin, gate helpers

Folds the four copies of the chunk-major sort into one mu_chunk_order()
helper that also reports whether it permuted the list, so
mu_chunk_order_hits counts real reorderings rather than executions.
Pins the --max-partition-size=64 control stream and factors the pinned-
fixture read and the aomdec rawvideo comparison into read_pin() and
assert_rawvideo_matches().
av1h5: read a 128 root's tokens CHUNK-major, not block-rasterAhmet Kaan Gümüş · f93609f
av1h5: read a 128 root's tokens CHUNK-major, not block-raster

libaom's decode_token_recon_block (decodeframe.c:972) walks 64x64 mu
chunks with the PLANE loop INSIDE the chunk loop. The var-tx leaf list
is a BLOCK-wide raster, so a chunk's members are not contiguous: leaf
0..15 is chunk (0,0) row 0, but chunk (0,0) rows 1..15 are leaves
32..47, 64..79, ... The chunk test on the given order therefore closed
the chunk every SIXTEEN leaves and coded each chunk's chroma sixteen
times -- 64 chroma walks per 128 root where libaom codes 4, and 24576
chroma units per inter frame against the oracle's 1536.

Reorder the leaf walk chunk-major at side > 64 (a no-op below 64, where
a block IS one chunk) at all four sites carrying this test: the 128x128
inter arm, the 128x64/64x128 inter arm, and the two intra arms.

Measured on the pinned 128x96 yuv444p10le lossless 10-bit stream
(sha256 bbffb979..., 63429 B), against aomdec:
  chroma walks per frame   64 -> 4
  chroma units per frame   24576 -> 1536 (oracle: 1536, exact)
  first ctx divergence      unit 1539 -> unit 2573
  first differing pixel     byte 74769 -> byte 90272

Control arm (--max-partition-size=64, no 128 root) stays byte-exact.
New gate a_lossless_444_128_root_lossless_stream_reads_chunks_chunk_major
pins the route (mu_chunk_order_hits) and the first-difference position;
mutating the chunk key back to the block raster turns it red.