forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on aa6d5262f674c7b07344f7a9d1f3a3f2d653cb65

2026-09-02

test(av1): EC_MCB rung -- the chroma OBMC prediction before and after the blendAhmet Kaan Gümüş · aa6d526
test(av1): EC_MCB rung -- the chroma OBMC prediction before and after the blend

An env-gated dump matching the instrumented aomdec's own EC_MCB rung
("<plane>:<px>:<py>[:<frame>]", chroma only): it prints the block's chroma
prediction rows on entry to the OBMC blend and again on exit, so a bottom-edge
residue can be attributed to the base motion compensation or to the overlap
blend in one run. Trace only, no behaviour change.
docs(av1): record the measured OBMC min-4 dead end at the chroma blend siteAhmet Kaan Gümüş · 07b88ab
docs(av1): record the measured OBMC min-4 dead end at the chroma blend site

libaom clamps the OBMC neighbour PREDICTION's plane dimension to a minimum
of 4 rows/columns, but the blend length stays the plain half (overlap >> ss),
so flooring the chroma blend at 4 is wrong: measured on a 10-bit 1920x792
cut it took 36 differing decode frames to 266 and the worst frame from 13 to
11007 bytes. Comment only, no behaviour change.
test(av1): witness the mi-granular uv_mode grid on the small-side GLOBALMV gateAhmet Kaan Gümüş · 86dc1a6
test(av1): witness the mi-granular uv_mode grid on the small-side GLOBALMV gate

The r12 chroma edge-filter fix (uv_mode read off the mi grid instead of a
one-slot-per-column map) shipped without a gate asserting it fired. The
existing 10-bit 1920x792 warp-reach fixture fires it 138 times, so the gate
now hard-asserts uv_mode_grid_override > 0 and reports the count; decode_probe
prints the counter too. No new fixture needed.
fix(av1): the chroma edge-filter type reads the mi grid's uv_mode, not a one-slot-per-column mapAhmet Kaan Gümüş · f6d6eda
fix(av1): the chroma edge-filter type reads the mi grid's uv_mode, not a one-slot-per-column map

get_intra_edge_filter_type takes the above/left uv_mode of the CHROMA
neighbour mi (libaom set_mi_row_col: chroma_above_mbmi = base_mi[-stride]),
and libaom writes one MB_MODE_INFO into every mi cell a block covers. Our
neighbour band kept a single (last_row, uv_mode) slot per mi column, so a
sub-8x8 pair's own first (non-chroma-ref) half stamped its DC_PRED over that
column before the pair's chroma-ref half -- which snaps its read to the base
(even) column -- looked at it: the mi-exact match failed and the coarse 16x16
band answered DC where a SMOOTH_PRED chroma block really sat one mi row above.
The edge-filter type flipped 1 -> 0, changing the chroma edge filter/upsample
decision: chroma-only +-1..3, luma bit-exact.

Adds a full mi-granular uv_mode grid (superblock-padded, per frame, tile
availability unchanged) read first, with the old maps kept as the fallback for
cells no block has written, plus counter uv_mode_grid_override_hits.

10-bit 3840x1608 10 s head: 66 of 241 decode frames differed (first 161, worst
199 B) -> 0 of 241 byte-exact vs instrumented aomdec. 10-bit 1920x792 cut:
134 of 275 differed (worst 2410 B, the 1942 B chroma-only intra-in-inter frame
included) -> 5, worst 3 B. Second 1920x792 cut unchanged (36 frames, 1-13 B,
the open bottom-edge MC residue).
fix(av1): the mv-stack frame-edge clamp window is signed -- a block overhanging the bottom/right edge was never clampedAhmet Kaan Gümüş · 3bd2894
fix(av1): the mv-stack frame-edge clamp window is signed -- a block overhanging the bottom/right edge was never clamped

libaom's `mb_to_right_edge` / `mb_to_bottom_edge` (`set_mi_row_col`,
av1_common_int.h) are signed: a block that overhangs the frame's right or
bottom edge keeps its full `bw4`/`bh4`, so `mi_cols - bw4 - mi_col` and
`mi_rows - bh4 - mi_row` go NEGATIVE and `clamp_mv_ref` (mvref_common.h)
narrows the predictor window by exactly that much. Our port computed both
terms with `usize::saturating_sub`, which clipped them to 0 and left the
window up to two block sizes too wide, so an edge block's stack entry was
never clamped.

On a 10-bit 3840x1608 stream (`mi_rows == 402`) every bottom-row 64x64 block
overhangs by 14 mi units: the 64x64 NEWMV block at mi(400,368) of decode
frame 88 took `mv0=(224,568)` where libaom takes `(32,568)` -- the entropy
stream is identical (same range at EC_MODE and EC_MODE_MV), only the
reconstructed value differed -- and its MC then read the reference's
replicated last row instead of real rows 1604..1606. That frame was the only
non-exact one in the 100-frame 4K head prefix (221 bytes); it is now exact.

New counter `mvstack::mv_clamp_edge_overhang_hits` (also printed by
decode_probe) counts stack entries the negative-edge window actually moves.

crates/ec-av1/fixtures/reelb_head_mvclamp_witness.obu (72158 bytes, sha256
451a9b138995e636f22308847a123b5c8621d4908cd93772cf5bbf2b37df39d7, truncated
twice to identical hashes) is the smallest prefix of that head firing it
(N=79 -> 0, N=80 -> 5); new gate
`a_10bit_film_frames_with_frame_edge_mv_clamping_decode_pixel_exact` decodes
its 52 shown frames pixel-exact against ffmpeg on every plane and hard-asserts
the counter. `clamp_mv_ref_window_is_signed_at_the_frame_bottom_edge` pins the
ladder's exact numbers.
test(av1): witness gate for the small-side GLOBALMV and rect warp-reach paths, and 7 gate helpers that deadlocked ffmpegAhmet Kaan Gümüş · 2696d88
test(av1): witness gate for the small-side GLOBALMV and rect warp-reach paths, and 7 gate helpers that deadlocked ffmpeg

New fixture `crates/ec-av1/fixtures/gm_small_side_witness.obu` (1158066 bytes,
sha256 f1cdbcbb8d6d469c7957d70252ab42b24ab75f48a717600ffa25991458775dca,
truncated twice independently to the same hash): the first 50 frame-carrying
OBUs of a 2 s 10-bit 1920x792 128-superblock cut -- 34 decode-order frames, 33
shown, ALL 34 byte-exact against instrumented aomdec. It is the smallest prefix
of that cut which fires `gm_nontrans_small_side` at all (49 OBUs fires 0, 50
fires 1); no fixture already in the repository fires it.

Gate `a_10bit_film_frames_with_small_side_globalmv_and_rect_warp_reach_decode_pixel_exact`
compares the 33 shown frames against ffmpeg on every plane and hard-asserts
`gm_nontrans_small_side_hits > 0` (1) and `tr_reach_longer_side_hits > 0`
(2295). The 128-superblock inter witness gate additionally hard-asserts
`tr_reach_longer_side` (600 there).

Also: seven copies of one gate helper wrote the whole stream to ffmpeg's stdin
INLINE and only afterwards read stdout, so any fixture whose raw output exceeds
the 64 KiB stdout pipe buffer deadlocks before the input is fully written. The
new 1.1 MB fixture (~150 MB of raw 10-bit frames) hung for 45 minutes with both
processes at 0% CPU. All seven now write on a dedicated thread; the same test
run finishes in 51.5 s.
fix(av1): the warp-sample top-right probe needs libaom's rect shape refinements, not just the longer sideAhmet Kaan Gümüş · 00aa449
fix(av1): the warp-sample top-right probe needs libaom's rect shape refinements, not just the longer side

r9 changed `av1_findSamples`' top-right probe to libaom's
`AOMMAX(xd->width, xd->height)` (mvref_common.c:1235) but left our
`has_top_right` port without the two shape refinements libaom applies right
after the mask loop (`av1_common_int.h:1419-1428`):

  is_last_vertical_rect  = !((mi_col + width) & (height - 1))   [width < height]
  is_first_horizontal_rect = !(mi_row & (width - 1))            [width > height]

Both are derivable from mi_row/mi_col/bw4/bh4 alone -- no partition context --
and they only bite when bw4 != bh4, i.e. exactly the blocks whose probe size
r9 changed. Probing at the longer side WITHOUT them is half a port: it fixed
the 64x128 block (bs=32 > 16, early-out, no top-right sample, 2-symbol obmc
alphabet) and broke a 32-wide tall leaf in an earlier superblock, moving the
first divergence of the 10-bit 1920x792 264-frame cut EARLIER (decode frame 49,
mi(24,376) -> its successor mi(24,380) read a different rng).

With the refinements ported, on that cut:
* mode ladder vs the instrumented reference decoder over ALL 264 frames:
  915 equal runs, 914 inserts (our per-sub-block prints the reference does not
  emit), ZERO replace/delete -- every EC_MODE (mi_row, mi_col, rng) triple the
  reference emits matches ours, previously the first mismatch was frame 49.
* pixel compare vs the reference decoder: 231/267 frames bit-exact, 36 frames
  differ by 1-3 bytes each (the known chroma-MC bottom-row clamp residue,
  lane-t900 r8); was 218/267 frames differing, frame 49 alone by 2.26 MB.

`tr_reach_longer_side_hits()` now counts blocks where the full probe disagrees
with the old square-at-width probe (9936 on that cut).

corner-cut: libaom's third refinement (PARTITION_VERT_A bottom-left square)
still not ported -- it needs the parent partition type; ceiling and upgrade
path recorded on `mvstack::has_top_right`.
fix(av1): the warp-sample top-right probe uses the block's LONGER side, plus EC_MM/EC_MM2/EC_PROJ/EC_PROBE_HDR rungsAhmet Kaan Gümüş · 864b5c6
fix(av1): the warp-sample top-right probe uses the block's LONGER side, plus EC_MM/EC_MM2/EC_PROJ/EC_PROBE_HDR rungs

libaom `av1_findSamples` (mvref_common.c:1235) probes the top-right neighbour
with `has_top_right(cm, xd, mi_row, mi_col, AOMMAX(xd->width, xd->height))`;
we passed the block's WIDTH. A 64x128 block therefore collected a top-right
warp sample libaom never sees, so `num_proj_ref >= 1` made
`motion_mode_allowed` resolve to WARPED_CAUSAL and read the 3-symbol
`motion_mode_cdf` where libaom reads the 2-symbol `obmc_cdf` -- same value,
different narrowing (class wrong-alphabet-same-value).

Localised on the 10-bit 1920x792 264-frame cut, decode frame 49, block
mi(64,144) 64x128 NEWMV ref0=1: after the mv both decoders sit at rng 47868;
aomdec's motion_mode lands at 45539 (47868 * 0.951, the BLOCK_64X128 obmc row
31014/32768) and ours at 41629 (47868 * 0.870, the motion_mode row
28898/32768). The offending sample was the top-right cell, a 64x16 neighbour
that `has_top_right(.., bw4=16)` reaches and `has_top_right(.., 32)` does not.

Counter `tr_reach_longer_side_hits()` counts only blocks where the two probes
disagree (1942 on that cut). NOT yet gate-asserted and the named gates were
NOT re-run after this hunk -- see lanes/t900-r9.handoff.md.

New rungs, all env-gated: EC_PROBE_HDR (one EC_HDR line per decode-order
frame: type/show/base_q/primary_ref/ref_idx/refresh/order_hint/tiles/txmode/
interp/allow_warp/cdef/lr), EC_MM + EC_MM2 under EC_TRACE_MODE_STEP (the
motion_mode eligibility terms and which ALPHABET was read -- a suppressed
symbol prints nothing otherwise), and EC_PROJ_MI=<row>,<col> listing a block's
warp-sample candidates in libaom's order.
fix(av1): a GLOBALMV block with a 4-px side must still read its interp filterAhmet Kaan Gümüş · defe73a
fix(av1): a GLOBALMV block with a 4-px side must still read its interp filter

libaom `is_nontrans_global_motion` (mvref_common.h) returns 0 at
`AOMMIN(mi_size_wide[bsize], mi_size_high[bsize]) < 2` BEFORE it looks at any
global-motion model, so no block with a 4-px side is ever "non-translational
global" and `av1_is_interp_needed` never suppresses its interp-filter symbol.
Our two sub-8x8 readers (quad-4x4 and the 4x8/8x4 rect pair) and the compound
arm of decode_inter_block computed `gm_nontrans` from the model alone and
skipped that symbol -- a one-symbol entropy desync at the block, before any
coefficient. The single-ref arm of decode_inter_block already carried the
guard; the 8x8-leaf reader cannot hit it (min side 2).

Counter `gm_nontrans_small_side_hits()` counts only the blocks where the guard
flips our answer (printed by decode_probe).

Measured on the 10-bit 3840x1608 head cut (170 decode frames), coefficient
ladder vs aomdec (tags all_zero/eob/after_bases + rng): decode frame 99 was
DIFF at element 11933 (we read txfm_split where aomdec read interp: our
rng 60039 vs 46640 at block mi(40,637), the second 4x8 of a vertical sub-8x8
group, GLOBALMV ref0=5); it is now element-exact over all 69065 elements.
Counter fires 109 times on that cut.
feat(av1): EC_TRACE_COEFF_FRAME rung, and the key-frame tile decoder clears TX_SELECT_INTERAhmet Kaan Gümüş · 42ede61
feat(av1): EC_TRACE_COEFF_FRAME rung, and the key-frame tile decoder clears TX_SELECT_INTER

Cherry-picked from lane-frame80 c5b1020e WITHOUT its two tx_size_context
delegations -- lane-frame80 r2 measured those redundant against this lane's
per-call-site intra-in-inter switch (same wall, same golomb signature) and
dropped them in d79559ab.

EC_TRACE_COEFF_FRAME=<decode idx> narrows the EC_TRACE_COEFF rungs to one
DECODE-order frame (a 4K stream prints gigabytes otherwise) and emits an
EC_COEFF_FRAME marker per frame so our trace is splittable.
decode_key_frame_tile_with_cdfs now clears TX_SELECT_INTER, which the inter
tile decoder sets and ~15 sites read -- an independent thread-local leak.
Merge commit '434ac12c' into lane-t900: rect chroma warp guard deduped, rect interintra gate arm keptAhmet Kaan Gümüş · f5530c9
Merge commit '434ac12c' into lane-t900: rect chroma warp guard deduped, rect interintra gate arm kept

Kept ONE copy of the per-plane warp guard: lane-t900 r5's `warp_plane_allowed(w, h)`
call sites, dropping lane-midcut's equivalent `warp_luma_ok`/`warp_chroma_ok`
bindings (same rule, same libaom source `av1_init_warp_params`). Kept lane-midcut's
`intra_rect_in_inter_txctx_override_hits` counter and its interintra RECT ARM gate
(the base recipe spells --enable-rect-partitions=0, so the rect delta assert was
unsatisfiable without it).
fix(av1): an inter block never stamped the luma/chroma mode maps, so a later intra block's edge-filter type fell back to a stale SMOOTH modeAhmet Kaan Gümüş · cb1dc1f
fix(av1): an inter block never stamped the luma/chroma mode maps, so a later intra block's edge-filter type fell back to a stale SMOOTH mode

`get_intra_edge_filter_type` (spec 7.11.2, libaom `reconintra.h`'s
`is_smooth`) reads the above/left neighbour's `mode` (luma) and `uv_mode`
(chroma). For an INTER neighbour libaom answers "not smooth" by
construction: `mbmi->mode` holds an inter mode (>= NEARESTMV) and
`is_smooth(mbmi, plane > 0)` returns 0 outright ("uv_mode is not set for
inter blocks"). Our mi-exact mode maps were written only by intra paths,
so an intra block whose neighbour was an 8x8 inter leaf found no mi entry
and fell back to the coarse SUB-row band -- which still held a SMOOTH
mode from an earlier block in that pixel row. The directional edge filter
then ran at strength 3 where libaom uses 2, and `use_intra_edge_upsample`
can flip with it.

`record_inter_rect_mi` now stamps DC_PRED into both maps for every inter
block. New counter `inter_neighbour_not_smooth_hits` counts the reads
where the coarse band would have said SMOOTH and the mi-exact map does
not; the 128-SB inter witness gate asserts it (375 hits, still pixel-exact
on all 15 shown frames). The square-block `OUR_PRED` trace now prints
`ft=` like the rect one, which is what localised this.

Decode-order compare against aomdec on a 10-bit 1920x792 125-frame cut:
frame 11 luma+U now exact (was 28 luma / 3 U samples off), whole-cut
differing bytes 18108 -> 12780.
test(av1): give the interintra gate an arm that can actually produce a rect interintra blockAhmet Kaan Gümüş · 30e3110
test(av1): give the interintra gate an arm that can actually produce a rect interintra block

The interintra gate's recipe spells `--enable-rect-partitions=0
--min-partition-size=32`, so it cannot emit a rectangular block at all and
lane-midcut r1's `interintra_rect_hits` delta assert was unsatisfiable on it
(40 pixel-exact matches, counter 0 -- the gate disabled the very shape the
assert claims to prove). Added a RECT ARM that re-encodes the same source with
`--enable-rect-partitions=1 --min-partition-size=8 --max-partition-size=64`
appended (aomenc keeps the LAST occurrence of a repeated flag) and compares
every decode-order frame of that stream against aomdec, running per seed until
the counter fires.

Result: seed 46's rect arm decodes 24/24 decode-order frames pixel-exact with
interintra_rect_hits=4, and the gate is green again (1 passed, 11.7 s).
fix(av1): a rect block's chroma warp was gated on the square prediction buffer's side, not the plane's block dimsAhmet Kaan Gümüş · 00a6ca0
fix(av1): a rect block's chroma warp was gated on the square prediction buffer's side, not the plane's block dims

libaom `av1_init_warp_params` (reconinter.c) bails out per PLANE at
`block_width < 8 || block_height < 8`, so the 8x4 / 4x8 chroma of a 16x8 /
8x16 luma block keeps the translational prediction even when the luma warps.
`decode_inter_block` allocates a SQUARE prediction buffer and tested
`chroma_side >= 8` -- the buffer's side -- so every rect block with a warp
(local or global) warped its chroma where libaom does not, and a 4-wide or
4-tall luma block warped its luma. Guard on `write_chroma_w/h` and
`write_w/h` instead (class rectchroma2 / narrow-block-sharp-kernel: dims read
off the enclosing square buffer).

Measured on the 2-frame cut of the 10-bit 3840x1608 stream (decode-order
PREFILT16 compare vs instrumented aomdec, frame 0 already exact): frame 1 goes
from 1317 wrong samples (Y 115, U 342, V 860) to 126 (Y 115, U 11, V 0).
refactor(av1): drop the duplicate in-inter tx-depth ctx override, keep the counter on the band readAhmet Kaan Gümüş · eec9297
refactor(av1): drop the duplicate in-inter tx-depth ctx override, keep the counter on the band read

lane-t900 r2 fixed the same defect at every rect intra reader's call site
(`tx_size_context_txfm_rect` under `INTRA_IN_INTER_MODE`), so this lane's
override inside `tx_size_context_rect` is now unreachable: every remaining
`tx_size_context_rect` call is in the `else` arm of exactly that condition.
Removed it and moved `intra_rect_in_inter_txctx_override_hits` into
`tx_size_context_txfm_rect`, where it still counts only the blocks whose CDF
row the deblock-grid approximation would have read wrong.

Verified on the 2-frame cut of the 10-bit 3840x1608 stream: with t900's
call-site switch alone, decode-order frame 0 is EXACT and frame 1 has the same
1317 wrong samples (Y 115, U 342, V 860) this lane measured with its own
override, i.e. the two fixes are equivalent and no site needs both.
fix(av1): a sub-8x8 inter group's chroma inherits the CHROMA-REFERENCE sub-block's tx_type, not the first sub-block'sAhmet Kaan Gümüş · 3898141
fix(av1): a sub-8x8 inter group's chroma inherits the CHROMA-REFERENCE sub-block's tx_type, not the first sub-block's

`av1_get_tx_type` (libaom `av1/common/blockd.h:1291-1305`) scales the chroma
transform's `blk_row`/`blk_col` back by the subsampling and indexes
`xd->tx_type_map` -- which `set_mi_offsets` (`av1_common_int.h:1679`) re-points
to the CURRENT sub-block's mi. For a sub-8x8 group the current block at the
chroma read is the chroma-reference (last) sub-block, so the group's one 4x4
chroma unit per plane inherits THAT sub-block's first transform unit's
tx_type. Both sub-8x8 inter paths took the group's FIRST sub-block instead.

No chroma tx_type symbol is coded, so the entropy stream stayed perfectly in
sync and the defect only inverted a chroma unit on the wrong basis: on the
10-bit 1920x792 128-superblock stream, decode-order frame 14 differed in
exactly 14 U pixels inside one aligned 4x4 chroma TU (V exact -- its unit was
all_zero), where instrumented aomdec reads tx_type=7 (ADST_FLIPADST, the
bottom 8x4 sub-block's own) and we read DCT_DCT (the top 8x4 sub-block was
skip).

New counter `sub8_chroma_tx_from_ref_hits` counts the groups that tell the two
rules apart: chroma-reference tx_type != first sub-block's AND the chroma unit
codes coefficients. The 128-SB witness fixture is extended from 19 to 23
frame-carrying OBUs (14 -> 16 decode-order frames, 12 -> 15 shown, 177773
bytes, sha256 09d995946d27695ef4b7b1a24a4d7ad85f8e2c8176d58ee54e825efc061f9cbc,
two independent cuts hash identically) so the gate covers frame 14, and it
hard-asserts the new counter (2 hits) alongside the eight it already had.
test(av1): pin the 10-bit 1920x792 128-superblock inter witness and lift the intra 16x4/4x16-in-inter opt-inAhmet Kaan Gümüş · 27cd698
test(av1): pin the 10-bit 1920x792 128-superblock inter witness and lift the intra 16x4/4x16-in-inter opt-in

`fixtures/reelc_sb128_inter_witness.obu` (166303 bytes, sha256
1191ce80e2c6c5855eaf7a8f5e8cda2cdf809f467b0dbc5e26df96dfa6b2c8bd) is the first
19 frame-carrying OBUs of a 2 s cut of a 10-bit 1920x792 AV1 stream with
`use_128x128_superblock=1`: 14 decode-order frames, 12 shown. Cut twice
independently from the source; both cuts hash identically.

All 14 decode-order frames are byte-exact against instrumented aomdec
(`EC_AV1_FINAL_DUMP`) and all 12 shown frames pixel-exact on every plane against
ffmpeg. It is the first stream here that decodes exactly while the paths of the
five defects this lane found in r2-r5 all fire, so the gate
`a_10bit_128sb_film_frames_with_warp_cdef_and_interintra_decode_pixel_exact`
hard-asserts every one: warp_plane_suppress=15, cdef_idx=763,
inter_sb128_vert=68, interintra_rect=118, non_chroma_ref_ctx_skip=163,
intra_in_inter_txctx=1946, edge_filter_mi_fix=195. Three of those counters are
new (the r2 in-inter tx-depth context, the r3 non-chroma-reference context skip
and the r4 mi-exact intra-edge-filter neighbour pair shipped with none).

REFUSAL LIFTED: the `EC_INTRA16X4_DECODE` opt-in over an intra 16x4/4x16 strip
in an inter 1:4 partition is gone. lane-wit16x4 r1 re-widened that refusal
because r3's witness counters were phantoms of a desync
(`counter-from-refused-stream`); here the arm fires 78x 16x4 + 149x 4x16 (108
chroma-paired) inside frames that are decoded AND compared exact. The named
refusal itself stays for a strip with no chroma-pair record. The
128x64/64x128 intra-in-inter arm fires 0 times on this stream, so its opt-in is
untouched.
refactor(av1): one warp_plane_allowed() gate for the per-plane 8px bail-out, with a hit counterAhmet Kaan Gümüş · 3aa99eb
refactor(av1): one warp_plane_allowed() gate for the per-plane 8px bail-out, with a hit counter

The five chroma and three luma warp call sites now route their
`av1_init_warp_params` bail-out through one helper that counts every
suppression, so a gate can prove a stream really carries the shape (the
square `side`/`chroma_side` can be 8 while the plane's own block is 4 wide).
No behaviour change: the conditions are the ones the previous commit
installed. Re-measured after the refactor -- the 2-frame cut stays exact on
both frames, and the 16-frame cut stays exact on decode-order frames 0..13
(14 and 15 unchanged at 14 / 24 differing bytes).
fix(av1): the second half of a 128-root HORZ/VERT inter block never read its own cdef_idx literalAhmet Kaan Gümüş · d5c0a13
fix(av1): the second half of a 128-root HORZ/VERT inter block never read its own cdef_idx literal

libaom keeps `cdef_transmitted[4]` -- one flag per 64x64 CDEF unit of a
128x128 superblock, indexed `(mi_col & 16) != 0` + 2 * `(mi_row & 16) != 0`
(`read_cdef`, decodemv.c:50-81) -- so both halves of a 128-root
PARTITION_HORZ/VERT read a `cdef_bits`-wide literal, each into its own unit.
Our flag is a single bool reset per coded piece, and the inter tile loop's
128-root HORZ/VERT arm was the one arm that never reset it between the two
halves (the key-frame loop already did), so the second half consumed
`cdef_bits` fewer bits than the encoder wrote and the tile desynced at that
block's mode info -- a literal-width divergence invisible to a value ladder
(the whole coefficient block before it is bit-identical, ranges rejoin only
at the next block's entry: 57521 -> aomdec 40079, ours 39850).

Witness, 10-bit 1920x792 128-superblock stream, decode-order frame 10, first
differing luma pixel px(192,0) = mi(0,48) = the right half of a 128x128
PARTITION_VERT. Pre-filter decode-order compare vs the instrumented aomdec
over a 16-frame cut: frames 10..13 go 2316966 / 1746025 / 1307747 / 2161740
differing bytes -> 0 each; frames 0..9 stay exact; residue moves to frame 14
(14 bytes).
fix(av1): the per-plane warp bail-out was gated on the square side, not the plane block's own width/heightAhmet Kaan Gümüş · 9385d73
fix(av1): the per-plane warp bail-out was gated on the square side, not the plane block's own width/height

`av1_init_warp_params` (reconinter.c) returns before setting WARP_PRED when
the PLANE's own block is `block_width < 8 || block_height < 8`, so in 4:2:0
the chroma of any luma block narrower or shorter than 16 is predicted
translationally even while its luma warps. Every warp site gated that on
`chroma_side` (`side / 2`, the SQUARE side), which for an 8x16 or 16x8 luma
block is 8 while the real chroma block is 4x8 / 8x4 -- so we warped chroma
libaom convolves. Same shape on the luma side: a PARTITION_HORZ/VERT strip
is `write_w`x`write_h`, not `side`x`side`, so a 16x4 / 4x16 strip under
global motion warped where libaom does not.

Guards now read `write_chroma_w`/`write_chroma_h` (chroma) and
`write_w`/`write_h` (luma) at all 5 chroma and 3 luma warp call sites
(single-reference and both compound taps).

On the 2-frame 10-bit 1920x792 128-superblock cut, decode-order compare vs
the instrumented aomdec: frame 1 chroma residue U 98 / V 62 samples (11
superblocks, deltas -2..+3) -> 0, and both frames are now bit-exact
pre-filter AND post-filter (was 258 differing bytes).
fix(av1): both halves of a split intra block read the FIRST half's edge-filter neighboursAhmet Kaan Gümüş · 4438a11
fix(av1): both halves of a split intra block read the FIRST half's edge-filter neighbours

`modes_above_left` keys its mi-exact lookup on the coarse 16x16 cell's own
top-left mi, so the second 8x16 (or 16x8) half of a rect intra block in an
inter frame asked for the neighbours of the first half. libaom reads
`above_mbmi`/`left_mbmi` for the block itself, so the intra-edge filter type
(`get_intra_edge_filter_type`, reconintra.c:974) came out 0 where libaom has
1, and every directional half whose real above/left neighbour was SMOOTH got
its edge filtered at the wrong strength.

Measured on a 2-frame 10-bit 1920x792 128-SB cut, decode-order frame 1
pre-loop-filter vs instrumented aomdec: luma 1269 differing pixels -> 0,
whole-frame 1549 -> 258 bytes (chroma-only residue left). The witness block
(8x16, p_angle 110, above neighbour SMOOTH_H) predicted sum 41742 where
aomdec has 41767; recomputing the spec walk with filter type 1 reproduces
aomdec exactly.

`OUR_PRED` now prints `ft=` so the two decoders' filter type can be diffed
directly (aomdec's `EC_PRED` already did).
feat(av1): counter for rect intra-in-inter blocks whose tx_depth CDF row moved under the inter-neighbour overrideAhmet Kaan Gümüş · a0c6951
feat(av1): counter for rect intra-in-inter blocks whose tx_depth CDF row moved under the inter-neighbour override

`intra_rect_in_inter_txctx_override_hits()` counts only the blocks where
libaom's "an INTER neighbour contributes its BLOCK size" override changes the
`tx_size_cat*` row versus the key frame's deblock-grid approximation -- i.e.
exactly the blocks the previous commit fixes. A plain "rect intra in an inter
frame" tally is green on the buggy code too, so a gate has to assert this one.
Not yet wired into a gate (turn cap); lanes/midcut-r2.handoff.md names the two
gate call sites and the fallback aomenc arm.
fix(av1): rect intra blocks inside an inter frame read tx_depth off the key frame's deblock-grid ctxAhmet Kaan Gümüş · 1ca3e1b
fix(av1): rect intra blocks inside an inter frame read tx_depth off the key frame's deblock-grid ctx

`tx_size_context_rect` is the KEY FRAME approximation of libaom
`get_tx_size_context` (pred_common.h:342): it reads the deblock tx grid and
never applies the "an INTER neighbour contributes its BLOCK size, not its
transform size" override, which only matters once a neighbour's var-tx tree
splits. The 1:4 16x4 strip already branched to `tx_size_context_txfm_rect` at
its own call site; every other rect intra reader reached from an inter frame
(the 2:1 strips, the 32-level and 64-level 1:4 bodies) did not. Fixed once in
`tx_size_context_rect` itself, so all six call sites inherit it.

Measured on a 2-frame cut of the 10-bit 3840x1608 stream: the 32x8 intra strip
at mi(118,280) of frame 1 read tx_size_cat2 row 1 where aomdec reads row 2
(both val=0, ranges 55568 vs 63652) and desynced the tile from there. After the
fix every one of the 6871 inter blocks aomdec reports in that frame matches
ours on entry range, and the decode-order PREFILT16 compare goes from 4386319
wrong luma samples to 115 (chroma 342/860, all |delta|=1).
fix(av1): interintra built a square intra predictor for rectangular blocksAhmet Kaan Gümüş · 9a73c30
fix(av1): interintra built a square intra predictor for rectangular blocks

`interintra_blend` took one `side` and used it for the edge fetch, the intra
predictor's `(bw, bh)`, `ii_size_scales` and the blend bounds. On a
rectangular block (`write_w != write_h`) `side` is the LONGER dimension, so a
32x16 block got a 32x32 SMOOTH/DC predictor built off 32 rows of left edge
(16 of which are not yet decoded) instead of libaom's 32x16 one. The mask
scale happened to come out right (`128 / max(bw,bh)` == `ii_size_scales`),
the predictor did not: the blend error is zero on the block's first row and
grows downward, exactly the `sm_weights_h` divergence between a height-32 and
a height-16 SMOOTH_PRED.

Blend now takes `(bw, bh, stride)`: `edges_rect`/`predict` at the true
footprint, mask scale off `max(bw, bh)`, loop over `bh x bw`, `pred` indexed
at the buffer's own stride. New `interintra_rect_hits()` counts the shape
(every existing interintra gate passed with the bug, so the rect arm was
vacuous) and `decode_probe` reports it.

Also `EC_AV1_NO_GRAIN=1` in `decode_stream`, which splits a mismatch into
reconstruction vs film-grain synthesis in one run (it is what ruled grain out
here).

Measured on a 2-frame cut of the 10-bit 3840x1608 stream (key frame + first
hidden alt-ref, 59 rect interintra blocks): the alt-ref's pre-filter dump vs
the instrumented aomdec goes from a first mismatch at luma (17,1088) to that
superblock exact; first remaining mismatch moves to (448,1152), a separate
NEARMV mv-stack defect (ours (-40,-340), aomdec (-32,-350)).
docs(av1): lane-t900 r3 handoff -- chroma coefficient contexts wiped by the non-chroma-reference inter block; the 2-frame cut is entropy-exact, the residue is reconstructionAhmet Kaan Gümüş · 3e2b507
docs(av1): lane-t900 r3 handoff -- chroma coefficient contexts wiped by the non-chroma-reference inter block; the 2-frame cut is entropy-exact, the residue is reconstruction
fix(av1): a non-chroma-reference inter block wiped its neighbours' chroma coefficient contextsAhmet Kaan Gümüş · 8b5425d
fix(av1): a non-chroma-reference inter block wiped its neighbours' chroma coefficient contexts

libaom codes no chroma transform at all for a block that is not the chroma
reference of its 4:2:0 pair (`av1_reset_entropy_context`:
`nplanes = 1 + (num_planes - 1) * xd->is_chroma_ref`), so such a block leaves
the above/left CHROMA entropy contexts exactly as it found them. Our inter
block reader recorded all three planes unconditionally, and for those strips
the chroma grids are all-zero -- so the even 4x16 strip of a VERT_4 pair
cleared the real left-neighbour chroma state, and the PAIR's own `all_zero`
symbol then read `txb_skip_ctx` one row low (base 1 where libaom gathers 2,
i.e. ctx 1 vs 9 with the chroma offset).

Measured on the 2-frame cut of the 10-bit 1920x792 128-superblock stream,
decode-order frame 1, mi(40,220): the chroma `all_zero` entry range 37582 now
leaves 51992, aomdec's value. The whole cut's coefficient ladder is exact:
15865 `all_zero` symbols in both decoders, identical value and range in
order, both frames. The frame-1 reconstruction gap drops from 1924240 to
114374 differing bytes and is now pre-loop-filter (an MC/prediction defect,
no longer entropy).

Also: `EC_DCDUMP` now dumps all three planes, not plane 0 only -- without the
chroma cells the wipe is invisible.
docs(av1): lane-midcut r1 handoff -- mid-film cuts are a reconstruction desync (not alignment, not grain); rect interintra fixed, NEARMV mv-stack defect namedAhmet Kaan Gümüş · 3667e83
docs(av1): lane-midcut r1 handoff -- mid-film cuts are a reconstruction desync (not alignment, not grain); rect interintra fixed, NEARMV mv-stack defect named

Adds the rect-interintra assert to the interintra gate (delta-counted, not yet
run) and the r1 handoff: reproducer, the three measurements that ruled out frame
alignment and film grain, the fixed defect, the next block-level witness
(mi 112,288 NEARMV: ours (-40,-340) vs aomdec (-32,-350)) and the re-measured
24-offset table.
fix(av1): interintra built a square intra predictor for rectangular blocksAhmet Kaan Gümüş · f48ab1b
fix(av1): interintra built a square intra predictor for rectangular blocks

`interintra_blend` took one `side` and used it for the edge fetch, the intra
predictor's `(bw, bh)`, `ii_size_scales` and the blend bounds. On a
rectangular block (`write_w != write_h`) `side` is the LONGER dimension, so a
32x16 block got a 32x32 SMOOTH/DC predictor built off 32 rows of left edge
(16 of which are not yet decoded) instead of libaom's 32x16 one. The mask
scale happened to come out right (`128 / max(bw,bh)` == `ii_size_scales`),
the predictor did not: the blend error is zero on the block's first row and
grows downward, exactly the `sm_weights_h` divergence between a height-32 and
a height-16 SMOOTH_PRED.

Blend now takes `(bw, bh, stride)`: `edges_rect`/`predict` at the true
footprint, mask scale off `max(bw, bh)`, loop over `bh x bw`, `pred` indexed
at the buffer's own stride. New `interintra_rect_hits()` counts the shape
(every existing interintra gate passed with the bug, so the rect arm was
vacuous) and `decode_probe` reports it.

Also `EC_AV1_NO_GRAIN=1` in `decode_stream`, which splits a mismatch into
reconstruction vs film-grain synthesis in one run (it is what ruled grain out
here).

Measured on a 2-frame cut of the 10-bit 3840x1608 stream (key frame + first
hidden alt-ref, 59 rect interintra blocks): the alt-ref's pre-filter dump vs
the instrumented aomdec goes from a first mismatch at luma (17,1088) to that
superblock exact; first remaining mismatch moves to (448,1152), a separate
NEARMV mv-stack defect (ours (-40,-340), aomdec (-32,-350)).
fix(av1): rect intra leaves inside an inter frame read the deblock-grid tx-depth context (sibling sweep)Ahmet Kaan Gümüş · a0c409b
fix(av1): rect intra leaves inside an inter frame read the deblock-grid tx-depth context (sibling sweep)

Class sweep of the measured `decode_block_rect4` defect: `decode_leaf_rect`
and `decode_leaf_rect8` still built their tx-depth CDF row from
[`tx_size_context_rect`] (the key frame's deblock-grid approximation) where
libaom's `get_tx_size_context` reads the `TXFM_CONTEXT` bands for every block
of an inter frame. No-op unless `INTRA_IN_INTER_MODE` is set, i.e. key frames
are byte-identical.

Unmeasured on their own (the measured instance is the 32x8 strip at
mi(48,176) of the 10-bit 1920x792 128-superblock stream) -- kept in a separate
commit so it can be reverted without losing that fix. lanes/t900-r2.handoff.md
carries the ladder state, the next divergence (a chroma txb_skip context row)
and the gate that was red mid-suite when the round ended.
fix(av1): a 1:4 intra strip in an inter frame took its tx-depth CDF row from the key frame's deblock grid, not the TXFM_CONTEXT bandsAhmet Kaan Gümüş · 27250ff
fix(av1): a 1:4 intra strip in an inter frame took its tx-depth CDF row from the key frame's deblock grid, not the TXFM_CONTEXT bands

`get_tx_size_context` reads `above_txfm_context`/`left_txfm_context` on an
inter frame; the 2:1 and 16x4 intra-in-inter arms already switch to
[`tx_size_context_txfm_rect`] for that, `decode_block_rect4` (32x8/8x32),
`decode_block_rect64` (64x16/16x64) and `decode_block_rect`'s own cat-2 read
did not. Measured on the 10-bit 1920x792 128-superblock stream, decode-order
frame 1: the 32x8 HORZ_4 strip at mi(48,176) read `tx_size_cat2` row 1 where
libaom reads row 2 (ours rng after the symbol did not occur anywhere in the
oracle's frame trace), and every symbol after it was off. With the bands the
cross-decoder ladder now runs from mi(0,320) to mi(40,221) inclusive.

Also adds the missing `EC_TRACE_MODE_STEP` tx_depth rung to those three
readers plus the 16x4 strip -- without it a range ladder cannot see the
symbol at all, which is what made the earlier bisection stop one block short.