forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 5a2f5efe3a0771ac7ca43d57bdf63c19a7b75ff6Filtered to crates/ec-av1/src/encode.rsClear filter

2026-09-02

Merge branch 'lane-tx4x8': 4x8/8x4 leaves read tx_depth (TX_MODE_SELECT) and code TX_4X8/8X4 (ReelB head blocker); every rect shape carries its own libaom reach rowAhmet Kaan Gümüş · a07b869
Merge branch 'lane-tx4x8': 4x8/8x4 leaves read tx_depth (TX_MODE_SELECT) and code TX_4X8/8X4 (ReelB head blocker); every rect shape carries its own libaom reach row

Conflicts: cdf_state.rs (union -- main's eob_pt_*_class1 fields plus the
lane's eob_pt_32_luma pair and the two rect TxbSets, all three hunks),
decode.rs (lane's read_coeffs_rect: it implements the TX_CLASS_HORIZ/VERT arm
main refused; duplicate SCAN_4X8/SCAN_8X4 transcriptions collapsed to one,
trace names unified on rect_trace), encode.rs (lane's per-shape
HAS_TR_*/HAS_BL_* consts + rect_reach_tables win over main's
has_tr_rect_table/has_bl_rect_table, kept main's documented
Reach::rect_table_index as the index and its bijection test, kept main's
VERT_A/B tables), gate_coverage.rs (10-bit "multi-tile" hole closed by the
merged recipes -- its own test demanded the entry go), lanes/COMMON-20260901.md
(main's systemd-run suite section).
Merge branch 'lane-tx64x16': 32x32-level HORZ_4/VERT_4 (four 32x8/8x32 strips, ReelB mid-film blocker) gated on a band fixture at 8/10-bit; 1:4 gates assert out-of-scope pixel mismatchesAhmet Kaan Gümüş · 3ac3386
Merge branch 'lane-tx64x16': 32x32-level HORZ_4/VERT_4 (four 32x8/8x32 strips, ReelB mid-film blocker) gated on a band fixture at 8/10-bit; 1:4 gates assert out-of-scope pixel mismatches

Conflicts: decode.rs (kept main's base_ctx domain test read table[col][row],
kept the lane's transposed-scan-pair test), encode.rs (kept main's
has_tr_rect_table/has_bl_rect_table + rect_table_index from lane-rectx r5 and
folded the lane's 32x8/8x32 rows into them; the lane's HAS_*_RECT arrays and
Reach::rect_table are dropped as redundant), gate_coverage.rs (lane's side:
1:4 partitions leave NEVER_EXERCISED_10BIT).
Merge branch 'lane-rectx': coded (non-skip) 16x8/8x16 strips with TX_16X8/8X16 luma and 8x4/4x8 chroma coefficient paths (ReelC blocker)Ahmet Kaan Gümüş · e47e7ce
Merge branch 'lane-rectx': coded (non-skip) 16x8/8x16 strips with TX_16X8/8X16 luma and 8x4/4x8 chroma coefficient paths (ReelC blocker)

Conflict resolution: cdf.rs/cdf_state.rs take the union (lane's EOB_PT_128_LUMA*
/EOB_PT_32_CHROMA* tables + main's q-dependent EOB_PT_512_CHROMA row);
decode.rs keeps main's sub8 mi-exact neighbour maps and its Option<prev_leaf>
decode_leaf8 (lane's prev_leaves/write_back_split_modes duplicate of the same
fix dropped), lane's coded rect leaf path, both scan-table families;
encode.rs keeps main's VERT_A/B Reach tables with the table_row naming.
fix(av1): every rect block shape gets its own has_tr/has_bl row -- a `_` arm sent 16x8 strips to libaom's has_tr_32x16Ahmet Kaan Gümüş · 2159b11
fix(av1): every rect block shape gets its own has_tr/has_bl row -- a `_` arm sent 16x8 strips to libaom's has_tr_32x16

`rect_reach_tables` held 4x8/8x4/16x32 and routed everything else, live 16x8
strips included, to the 32x16 row: wrong at 10 of the 21 reachable superblock
positions for above-right and 7 for below-left (the pre-lane
`HAS_TOP_RIGHT_RECT[bw == 16]` selection was wrong at 14 and 14). All 14 rect
shapes this decoder codes or will code now carry their own table, generated
from the oracle's reconintra.c, and the match is exhaustive with an
`unreachable!` naming the shape; the rect index no longer wraps modulo the
table length, which was masking the mis-routing.

Domain test `every_rect_shape_reaches_what_libaom_says_over_the_whole_superblock`
compares Reach::of_rect against a port of has_top_right/has_bottom_left for
every shape at every position in two superblocks, plus a per-shape (len, byte
sum) fingerprint from the oracle's arrays; restoring the old routing for 16x8
fails it. The asymmetric directional-strip STREAM gate is written but
`#[ignore]`d: 38/40 attempts die on the live "coded (non-skip) HORZ/VERT rect
strip below 16x16" refusal (details + the measured recipe table in
lanes/tx4x8-r3.report.md). Suite: 275 passed, 0 failed, 23 ignored.

2026-09-01

fix(av1): Reach::top_right/bottom_left shadowed the block's position row with the table-row index -- the sub8 merge's has_tr_4x4/has_bl_4x4 row lookup rebound `row`, so the bit index (row * table_stride + col) read the wrong bit for EVERY block size; split_transform_horz_vert seed 55 (3080 luma samples) and the sub8 gate both green againAhmet Kaan Gümüş · 5c19acd
fix(av1): Reach::top_right/bottom_left shadowed the block's position row with the table-row index -- the sub8 merge's has_tr_4x4/has_bl_4x4 row lookup rebound `row`, so the bit index (row * table_stride + col) read the wrong bit for EVERY block size; split_transform_horz_vert seed 55 (3080 luma samples) and the sub8 gate both green again
feat(av1): 32x32-level PARTITION_HORZ_4/VERT_4 -- four 32x8/8x32 strips, mi-granularAhmet Kaan Gümüş · 8e9a081
feat(av1): 32x32-level PARTITION_HORZ_4/VERT_4 -- four 32x8/8x32 strips, mi-granular

The arm the 2160p 10-bit AV1 mkv extract stops at ("a 32x32 partition type
this decoder does not code (value=8)"). What landed:

- decode_block_rect4 (decode.rs): decode_block_rect's 4:1 sibling addressed by
  REAL mi coordinates -- strips 1 and 3 start 8 px into a 16-px SUB cell, which
  an at-derived px = c * SUB cannot name (decode_leaf_rect's own reason), with
  decode_leaf_rect's prev-strip mode override for the in-block neighbour.
  Coefficients are read, not refused: luma TX_32X8/TX_8X32 -> TxbSet::LumaRect32x8
  (Luma16's 256-position tables, tx_type None because tx_size_sqr_up is TX_32X32
  = EXT_TX_SET_DCTONLY for intra) with the existing SCAN_32X8/SCAN_8X32; chroma
  TX_16X4/TX_4X16 -> TxbSet::Chroma8 (64 positions) with new SCAN_16X4/SCAN_4X16.
- SCAN_16X4/SCAN_4X16 transcribed from libaom's column-major default_scan_*; the
  conversion rule was validated by REGENERATING SCAN_16X8 from default_scan_16x8
  byte for byte first (class reference-layout-not-spec). Transposed-pair unit
  test over both the new chroma pair and the 32x8/8x32 luma pair.
- Reach: has_tr_32x8/has_tr_8x32/has_bl_32x8/has_bl_8x32 (reconintra.c:122-127,
  305-310) added; the row selector is now an explicit shape match, so no existing
  shape changes row. libaom's index formula (blk_row << (5 - bw_in_mi_log2)) is
  exactly this file's row * (128 / bw) + col, so the stride math generalizes.
- Cherry-picked lane-rectsplit r4 (7b55227): base_ctx states libaom's generating
  rule instead of indexing the transposed 5x5 tables, plus the SB split-tx per-TU
  strips. main's cdf transcriptions are the TRANSPOSE of rectsplit's, so r4's
  domain test is pinned here as [row][col] (documented at the test; the consumer
  reads neither table).

Evidence: the 2160p extract advances past value=8 to the NEXT refusal INSIDE the
new arm ("a 32x32-level 1:4 strip with a split transform"), i.e. the arm executes
on real content. Siblings green: superblock_level_{1to4,horz_vert,ab},
split_transform_horz_vert, refusal_inventory, gate_coverage (13 passed / 0 failed).

NOT PROVEN, and the gate says so: the new pixel gate
a_real_aomenc_stream_with_a_32x32_level_1to4_partition_decodes_pixel_exact is
#[ignore]d because no fixture recipe found this round makes aomenc emit a
32-level 1:4 partition -- 20/20 attempts at min-partition-size=8 carried zero,
as did a vertically-squeezed and a horizontally-blurred variant. Ignoring is
deliberate: a gate that passes without ever seeing its feature is worse than an
absent one (class gate-blind-to-feature).
wip(merge): lane-sub8 merged into main 61c6a5b -- conflicts resolved, gates RED, NOT for mainAhmet Kaan Gümüş · 6795386
wip(merge): lane-sub8 merged into main 61c6a5b -- conflicts resolved, gates RED, NOT for main

Conflict resolutions kept here so a successor need not redo them:
- decode.rs Neighbours::new -- main's mi-granular inter bands + sub8's four
  mi mode maps (sub8_mode_col/row, uv_mode_col/row).
- decode.rs record_split_luma_rect -- main's rect (w_mi,h_mi) span with
  sub8's record_mode_mi/record_uv_mode_mi calls.
- encode.rs Reach::top_right/bottom_left -- main's VERT_A/B tables kept,
  sub8's has_tr_4x4/has_bl_4x4 row kept, side-4 falls back to the ordinary
  table inside a VERT_A/B (no vert 4x4 row exists) with a corner-cut note.
- examples/decode_probe.rs -- main's EC_PROBE_OUT + dimensions print.
- refusal_inventory.rs -- sub8's sub-8x8 reader still refuses intrabc while
  main's 8x8-and-up reader reconstructs one; refusal string narrowed to
  "a sub-8x8 leaf that uses intrabc" and listed.
- gate_coverage.rs -- enable-1to4-partitions retired from the 8-bit list
  (sub8's gate passes =1), 10-bit entry reworded.

RED on the merged tree (both fail; each side is green alone):
- a_real_aomenc_stream_with_a_sub8_split_decodes_pixel_exact (seed=100 cq=6)
- a_real_aomenc_stream_with_a_split_transform_horz_vert_strip_decodes_pixel_exact
  (seed 55, luma (191,76) ours=127 ffmpeg=128, 3080 samples, bbox x94..191
  y76..127) -- green at main 61c6a5b, absent from the sub8 lane's tree.
feat(av1): TX_4X8/TX_8X4 leaves below 8x8 -- rect scan, 32-position eob_pt, TX_8X8 coeff tables with a TX_4X4 tx_type row (gate still RED)Ahmet Kaan Gümüş · d471e3e
feat(av1): TX_4X8/TX_8X4 leaves below 8x8 -- rect scan, 32-position eob_pt, TX_8X8 coeff tables with a TX_4X4 tx_type row (gate still RED)

Lifts the "a HORZ/VERT partition below 8x8 (square-only transform)" refusal and
the two rect tx_type/tx-class capability claims: decode_leaf_rect8 codes the two
BLOCK_4X8/BLOCK_8X4 sub-blocks of an 8x8 (mode reads, chroma once at the group's
4x4 unit, dequant_and_inverse_typed_wh, Reach::of_rect off libaom's has_tr_4x8/
has_bl_8x4 rows, fill_lf_grid_rect, partition_context_lookup{31,30}/{30,31}), and
read_coeffs_rect now reads a real tx_type symbol including V_DCT/H_DCT (rect
mrow/mcol scans + 1D-class contexts + eob_pt_class1).

Table derivations: get_txsize_entropy_ctx(TX_4X8) = TX_8X8 (coefficient tables),
txsize_sqr_map[TX_4X8] = TX_4X4 (tx_type CDF row), txsize_log2_minus4 = 1
(32-position eob_pt, new from av1_default_eob_multi32_cdfs, both class rows).
Scan conversion (p%h)*w + p/h re-proved by regenerating SCAN_16X8/SCAN_8X16 first.

Gate a_real_aomenc_stream_with_a_sub8_rect_leaf_decodes_pixel_exact (16x16 8-bit,
128x16 --tile-columns=1, 16x16 10-bit; both orientations hard-asserted per attempt)
is RED: seed 303 mismatches luma from sample 0 with no decode error. See
lanes/tx4x8-r1.report.md for the ranked suspect list and the recipe findings
(--max-partition-size=8 does not stop 16x16-level rect strips).
fix(av1): rect has_tr/has_bl row stride is 32 mi (MAX_MIB_SIZE_LOG2=5), not 16 -- r4's '4 - bw_log2' halved it and every table row but the first read the wrong byte; pinned by a bijection test over a whole superblock walkAhmet Kaan Gümüş · b4af125
fix(av1): rect has_tr/has_bl row stride is 32 mi (MAX_MIB_SIZE_LOG2=5), not 16 -- r4's '4 - bw_log2' halved it and every table row but the first read the wrong byte; pinned by a bijection test over a whole superblock walk
fix(av1): the 16x16-level PARTITION_VERT_B arm missed the vert availability tablesAhmet Kaan Gümüş · 1f9bde4
fix(av1): the 16x16-level PARTITION_VERT_B arm missed the vert availability tables

decode.rs:7008 visits its two 8x8 squares TR then BR, out of raster order, so
like the 32/64-level AB arms r5 fixed it must read libaom's has_tr_vert_8x8 /
has_bl_vert_8x8 (get_has_tr_table / get_has_bl_table take the partition type).
has_bl_8x8 is 0 where has_bl_vert_8x8 is 1 at all 16 even-row/odd-col 8x8 slots
-- exactly the TR square -- so its below_left was wrongly false for the
directional modes that read below-left (angle > 180: D203_PRED, D157_PRED with a
positive delta). Class swept: this was the only remaining unguarded VERT_A/_B
site at any level, intra or inter.

Gated by a table pin (encode.rs) rather than a stream: a bounded 112-encode
aomenc sweep produced no decodable 16-level VERT_B -- every stream that
partitions that small first hits the still-refused HORZ_A/HORZ_B/VERT_A-below-16
or coded-rect-strip-below-16 arms. Counts in lanes/part32-r6.report.md.

EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib: 270 passed, 0 failed.
Merge branch 'lane-part32': SB-level HORZ/VERT/HORZ_A/HORZ_B/VERT_A/VERT_B at 64x64 gated pixel-exact (has_tr_vert/has_bl_vert tables for VERT_A/B visit order); refusal narrowed to HORZ_4/VERT_4 (verifier PASS, 269/0/24)Ahmet Kaan Gümüş · 9235c22
Merge branch 'lane-part32': SB-level HORZ/VERT/HORZ_A/HORZ_B/VERT_A/VERT_B at 64x64 gated pixel-exact (has_tr_vert/has_bl_vert tables for VERT_A/B visit order); refusal narrowed to HORZ_4/VERT_4 (verifier PASS, 269/0/24)

Merge fixup: lane-part32's new decode_block_rect/decode_block_rect64 call sites
(4 AB arms + the strip64! macro) needed HEAD's added `reduced_tx_set` argument.
fix(av1): rect leaves read has_tr/has_bl from the wrong block-size table; mi-exact intra mode neighbours (cherry-pick lane-sub8 1841406)Ahmet Kaan Gümüş · ae5d89d
fix(av1): rect leaves read has_tr/has_bl from the wrong block-size table; mi-exact intra mode neighbours (cherry-pick lane-sub8 1841406)

Two defects, both on the sub-16x16 rect strip path:

1. `Reach::of_rect` looked up `HAS_TOP_RIGHT_RECT`/`HAS_BOTTOM_LEFT_RECT`
   indexed by `bw == 16` -- tables transcribed for the 32x16/16x32 strips
   only. A 16x8 block therefore read has_tr_16x32/has_bl_16x32 (4 bytes)
   where libaom reads has_tr_16x8/has_bl_16x8 (16 bytes), and an 8x16 read
   the 32x16 rows. `top_right_rect`/`bottom_left_rect` are now libaom
   `has_top_right`/`has_bottom_left` verbatim at block granularity, with the
   16x8/8x16 tables added. Symptom: a D203 16x8 strip's prediction was exact
   until the ray first reads BELOW its own height, then diverged (first diff
   at (44,18) of a 64x64 key frame, growing to the whole lower-right frame).

2. Cherry-picked lane-sub8 1841406's mi-granular intra-mode neighbour map
   (`sub8_mode_col/row`, `record_mode_mi`, `mode_above_mi`/`mode_left_mi`,
   plus `has_tr_4x4`/`has_bl_4x4` in encode.rs); the split-4x4 hunks are
   dropped, this branch has no `decode_leaf_split4`. `decode_leaf_rect` now
   reads through that map and records its own bw x bh span, which fixes the
   wrong `kf_y_mode` CDF row r3 located at leaf mi=(4,12).

Gate `a_real_aomenc_stream_with_a_coded_rect_strip_below_16x16_decodes_pixel_exact`
is green: pixel-exact vs ffmpeg, rect_leaf_coeff_hits=8 (6 non-skip 16x8 +
1 non-skip 8x16 luma transforms). Its recipe moved to mandelbrot start_x=-0.6
cq16 with --enable-filter-intra=0 (filter intra on a strip is a separate,
still-refused predictor).
fix(av1): PARTITION_VERT_A/_B square sub-blocks must read libaom's _vert_ has_tr/has_bl tablesAhmet Kaan Gümüş · 02e331f
fix(av1): PARTITION_VERT_A/_B square sub-blocks must read libaom's _vert_ has_tr/has_bl tables

lane-part32 r5. A VERT_A/VERT_B partition visits its square sub-blocks
TL, BL, TR, BR -- not raster order -- so the bottom-left square's
top-right neighbour is the partition's own right-hand rectangle, which
is not decoded yet. libaom switches has_top_right/has_bottom_left onto
has_tr_vert_*/has_bl_vert_* for exactly these two partition types
(reconintra.c get_has_tr_table); this crate's `Reach` had only the
raster tables, so the BL 32x32 of an SB-level VERT_A predicted from
never-written samples (has_tr_32x32[0] bit 4 = 1 vs
has_tr_vert_32x32[0] bit 4 = 0).

Symptom on the pinned seed-63 stream: every symbol in sync with the
oracle (aomdec EC_TRACE/EC_TRACE_MODE agree on partition=6 and on every
mode, and the msac range at mi_col=40 matches ours exactly, 53240) yet
the prefilter reconstruction diverges from x=157 of the BL square, and
the 32x64 strip to its right then DC-predicts off that corrupted left
column (107 instead of ~149) and the next superblock row's V_PRED
copies it down -- 4683 luma pixels wrong from one availability bit.

Also lifts the r4 refusal narrowing into a proven capability: the four
SB-level AB arms now decode pixel-exact, hard-asserted arm by arm
(sb_ab_hits_by_arm), and PARTITION_HORZ_4/VERT_4 at 64x64 remain the
only refused 64x64 partition types.
fix(av1): have_ffmpeg() SKIPped green under EC_AV1_REQUIRE_AOMENC=1Ahmet Kaan Gümüş · 91c1335
fix(av1): have_ffmpeg() SKIPped green under EC_AV1_REQUIRE_AOMENC=1

Every real-aomenc gate opens `if !have_ffmpeg() || !have_aomenc()`, and
only have_aomenc() asserted under the require flag -- have_ffmpeg() is
evaluated first and short-circuits, so a machine without ffmpeg printed
SKIP and the whole 20-gate batch reported green with the require flag
set (class gate-skips-on-its-own-failure).

have_ffmpeg() now mirrors have_aomenc(): absence panics when
EC_AV1_REQUIRE_FFMPEG=1 or EC_AV1_REQUIRE_AOMENC=1 is set (an aomenc
gate decodes its stream through ffmpeg, so requiring the oracle implies
requiring ffmpeg). Applied to all five copies of the helper
(stream/tile/decode/encode/encoder test modules), which had the same
silent-false shape.
fix(av1): mi-exact intra mode neighbours + has_tr_4x4/has_bl_4x4Ahmet Kaan Gümüş · c24ba5d
fix(av1): mi-exact intra mode neighbours + has_tr_4x4/has_bl_4x4

The coarse 16x16 above_mode/left_mode slots cannot hold the two (or four)
different modes a split cell leaves behind, so every 8x8/4x4 leaf whose
neighbour sat in a split cell read the wrong kf_y_mode CDF row and desynced
the tile -- which surfaced as hallucinated HORZ/VERT/AB partition symbols
(the reference stream contains only PARTITION_NONE/SPLIT). Neighbours now
keeps a mi-granular mode map (sub8_mode_col/row, written by record_rect,
record_split_luma, decode_leaf8 and every 4x4 leaf) that wins over the
coarse slot when it holds the exact neighbouring mi. Reach gains libaom's
has_tr_4x4/has_bl_4x4 rows (the corner-cut the old comment named): sub-8x8
leaves were clamping into the 8x8 table and predicting from above-right
samples the decoder has not written yet.

2026-08-30

Merge branch 'lane-gm': non-IDENTITY global motion decodes through the warp pathAhmet Kaan Gümüş · 384a874
Merge branch 'lane-gm': non-IDENTITY global motion decodes through the warp path

Four rounds. The first three ported the syntax correctly -- gm_get_motion_vector,
the mvstack neighbour substitution, the is_global_mv_block vs
is_nontrans_global_motion split -- and the wedge gate still mismatched, because
every check that compared mv VALUES passed. A range ladder settled it: our msac
range and the instrumented aomdec's were both 38664 at the offending block, so
entropy was in sync and the defect was prediction-side. libaom's allow_warp has
a global_warp_allowed branch that predicts every is_global_mv_block block with
the full per-pixel affine warp, independent of motion_mode; this decoder only
ever warped for local WARPED_CAUSAL and fell back to translational MC on the
block-centre mv -- a centre-point approximation whose error grows with distance
from the centre, which is exactly the error shape that was observed.

r4 implements that path, reusing the existing warp_affine and shear machinery
rather than writing a second one. The seed-43 pin's frame 1 luma, the divergence
r3 root-caused, now matches, as do frames 0-13. The blanket "any non-IDENTITY
global motion" refusal is replaced by two named ones: AFFINE models, and more
than one concurrently active ROTZOOM/AFFINE ref slot -- the latter is a real
residue r4 localized but did not root-cause, and refusing it beats guessing.

Also fixed en route: gm_get_motion_vector was missing the -1 on both block-centre
offsets that libaom's block_center_x/y apply.

Full lib suite 231 passed / 0 failed. The wedge gate's match count is 11-16 of 40
across runs -- it selects a different aomenc attempt each run, so single-run
counts from any one round are not comparable.
wip(av1): intra HORZ/VERT strip dispatch (skip-only), recovered from stashAhmet Kaan Gümüş · 770cfc0
wip(av1): intra HORZ/VERT strip dispatch (skip-only), recovered from stash

Builder hit its turn cap with the whole implementation sitting in a stash;
committed verbatim as recovered so it cannot be lost. Gate ladder, report and
scope-down rationale still owed.
wip(av1): mvstack global-motion substitution plumbing (inert: NO_GM_MV, all flags false)Ahmet Kaan Gümüş · 149fd7a
wip(av1): mvstack global-motion substitution plumbing (inert: NO_GM_MV, all flags false)

MiInfo gains is_global_mv0/1 (all ctors false), GmMvTable threaded through the
single-ref scans, and the TPL zero_mv_ctx comparison now measures against gm_mv
instead of zero (mvref_common.c:369-370). decode.rs still passes NO_GM_MV, so
behaviour is unchanged until the wiring lands.
feat(av1): widen intra::predict/Edges to rect (bw != bh)Ahmet Kaan Gümüş · 24d69ed
feat(av1): widen intra::predict/Edges to rect (bw != bh)

Predictor + Edges::build now take (bw, bh) instead of one side: DC's
dc_predictor_rect multiply-shift divide (derived, not tabulated, per
libaom's own comment -- AV1's only rect ratios 1:2/1:4 leave d==3/5),
smooth's separate width/height weight rows, and the directional walk's
bw+bh reach with cross-axis edge-filter/upsample extensions (above
extends by bh, left by bw -- reconintra.c's txwpx/txhpx swap). Also
fixes a latent bug this widening surfaced: intra_edge_filter_strength
was missing the blk_wh<=12 branch, unreachable for any square side sum
but live for e.g. a 4x8 block.

All 21 call sites still pass (side, side); full lib suite green
(223/223) proves square behaviour is bit-identical. Tile dispatch
still refuses rect/AB partitions -- next lane's job.

2026-08-28

fix(av1): rect-flake-1 byte-exact -- MiInfo size_h, rect warp samples/projection dims, OBMC per-pass overlap, deblock tx-height gridAhmet Kaan Gümüş · 8e2b541
fix(av1): rect-flake-1 byte-exact -- MiInfo size_h, rect warp samples/projection dims, OBMC per-pass overlap, deblock tx-height grid

Three prediction-side root causes after the CDF rows: (1) neighbour records
carry true height (size_h) so a rect strip donates warp samples at ITS
center and col scans step/weight by height; find_projection gets the
strip's true dims -- wmmat now matches aomdec exactly. (2) obmc_blend:
per-pass neighbour caps (width-log2 above, height-log2 left) and overlaps
(bh/2 above, bw/2 left). (3) tx_h_grid: deblock horizontal edges gate by
transform HEIGHT; the single-scalar grid deblocked the strip seam wrong
(1-px chroma drift).
WIP(av1): compound mvstack candidate machinery, not yet wiredAhmet Kaan Gümüş · 368413c
WIP(av1): compound mvstack candidate machinery, not yet wired

find_mv_stack_compound: parallel entry point to find_mv_stack_with_sign_bias
for a block predicted against a reference-frame pair (spec 7.10.2's
is_compound path). Adds:
- MiInfo.mv1 (the compound second MV, paired with r3's ref_frame1)
- scan_row_compound/scan_col_compound/scan_top_right_compound/
  scan_corner_compound: exact-pair-matched twins of the single-ref scans
- process_compound_ref_mv_candidate + CompoundRefLists +
  combine_compound_candidates: the compound extension/topping pass
  (mvref_common.c's process_compound_ref_mv_candidate + the combine step)
- CompoundTplArgs: compound temporal-MV fold-in, reusing motion_field's
  existing single-ref add_tpl_ref_mv once per side of the pair
- new_mv_ctx/ref_mv_ctx reuse the existing (nearest_match, ref_match_count)
  switch, which libaom's own mode_context switch is ref-count-agnostic about

Documented deviations: tpl compound candidates drop (not zero-fill) a
missing side; the extension combine step dedups by weight-bump instead of
libaom's real is_dup skip-on-first-match. Both noted in find_mv_stack_compound's
doc for a later round to tighten if a live compound gate's drl_ctx disagrees.

Every existing single-reference caller (find_mv_stack/
find_mv_stack_with_sign_bias and their 23 pre-existing tests) is untouched;
this is purely additive, unwired code, same pattern as r1/r3. 6 new tests,
cargo test --release -p ec-av1 --lib: 205 passed / 0 failed / 16 ignored.
WIP(av1): carry a compound second reference through MiInfo/NeighboursAhmet Kaan Gümüş · cfa1e23
WIP(av1): carry a compound second reference through MiInfo/Neighbours

Step 1 of the compound-decode chain (lane-av1comp): MiInfo grows
ref_frame1: Option<i8> (spec RefFrames[1]) and decode.rs's Neighbours
grows above_ref1/left_ref1 alongside above_ref/left_ref, mirroring the
existing i8 single-ref tracking. Every one of the 24 MiInfo literal
sites across decode.rs/encode.rs/mvstack.rs/tile.rs sets it to None --
no decode or encode path here ever produces a compound block yet, so
this is pure plumbing: find_mv_stack's scan still matches candidates
on ref_frame alone, and reference_mode_ctx/comp_reference_type_ctx
(landed r1, 1fcb059) still have no caller.

Next: read_ref_frames replacing stream.rs:181-195's reference_select
refusal (decodemv.c:966-990/1000+, is_comp_ref_allowed blockd.h:65-67),
then inter_compound_mode CDF/tree + compound DRL, then mvstack's dual-
ref candidate scan (process_compound_ref_mv_candidate,
mvref_common.c:435-455/696-762 -- the largest remaining piece), then
the COMPOUND_AVERAGE/dist_wtd_comp_avg MC blend. See the lane-av1comp
ledger entries for the full ordered plan.

2026-08-27

feat(av1): implement the intra edge filter/upsample (spec 7.11.2.7-2.9)Ahmet Kaan Gümüş · 645882d
feat(av1): implement the intra edge filter/upsample (spec 7.11.2.7-2.9)

r5 left directional()'s edge filter/upsample as an unimplemented corner-cut
and left the two new predict() bool params half-plumbed (encode.rs call
sites done, stream.rs/decode.rs test-module sites missing). This round:

- finished the plumbing: decode.rs threads the sequence header's
  enable_intra_edge_filter through a thread-local (ENABLE_EDGE_FILTER,
  set once per decode_key_frame_tile_with_cdfs call, not per-block --
  documented why a thread-local beats touching two dozen call sites)
  down to PlaneBuf::reconstruct's predict() call; stream.rs sets it from
  the parsed seq header; encode.rs sites already passed false (our
  encoder never turns it on, so round-trips stay bit-green regardless).
- filter_intra_edge (5-tap kernel, 3 strength buckets via
  intra_edge_filter_strength's two smooth/non-smooth threshold tables),
  the filter_corner blend, and upsample_intra_edge (av1_upsample_intra_edge_c)
  were transcribed against libaom's reconintra.c and wired into
  directional()'s z1/z2/z3 walk (base/shift math doubled for the
  upsampled-density case). All present, none stubbed.
- flipped the gate's --enable-intra-edge-filter=0 to =1 so
  a_real_aomenc_stream_with_directional_chroma_decodes_pixel_exact
  actually exercises the new path instead of the disabled one.

The gate still fails, but NOT from this filter: patched-aomdec
cross-checks (EC_UDUMP dqcoeff/pred/recon dumps, /tmp/libaom-src's
decodeframe.c, not committed) prove the failing TU (chroma cpx=0/cpy=0,
DC_PRED, tx_type DctDct, skip=1 both sides) reconstructs bit-identically
pre-loop-filter in both decoders -- flat 128 either way, edge filter
inapplicable there (no real neighbours, corner-filter's 2n>=24 gate
doesn't fire at n=8). A PREDEBLOCK/POSTDEBLOCK trace (also not committed)
localizes the actual divergence to apply_deblock: our decoder introduces
a value our own pre-filter data does not justify at the row6-9/col6-9
TU-corner intersection, where both a horizontal and a vertical deblock
edge are filtered back to back. r4/r5's "intra edge filter gap" and
"tx_type path" suspects are both now falsified for this failure; the
next round's target is deblock_plane's edge-intersection order/read-back
(vertical-then-horizontal at a corner where an already-filtered vertical
sample feeds the horizontal filter's taps).

Suite: 174 passed, 1 failed (the known gate above) -- no regression from
r5's own checkpoint of the same numbers; the cdffwd flake did not fire
this run.
wip(av1): chroma tx_type derivation from Intra_Mode_To_Tx_Type, wires default_tx_typeAhmet Kaan Gümüş · 637d48a
wip(av1): chroma tx_type derivation from Intra_Mode_To_Tx_Type, wires default_tx_type

read_coeffs already carried a default_tx_type parameter from a prior round;
both call sites (read_plane's intra path and read_inter_plane's inter path)
didn't pass it yet, so the tree didn't compile. Wires them:

- read_plane (intra): plane_idx==0 or side>=32 -> DctDct (av1_get_tx_type,
  blockd.h: 64-and-up is unconditional, 32x32 chroma survives
  intra_mode_to_tx_type only to be re-forced by EXT_TX_SET_DCTONLY gating
  in av1_get_ext_tx_set_type); otherwise chroma takes
  default_intra_tx_type(predict_mode), a from-libaom transcription of
  intra_mode_to_tx_type's static table (D45_PRED is DCT_DCT, not an ADST
  mode -- transcribed exactly, no set-membership fallback needed since
  every entry the table can produce (DCT_DCT/ADST_DCT/DCT_ADST/ADST_ADST)
  is already inside both TX_SET_INTRA_1 and _2).
- read_inter_plane: always DctDct -- Intra_Mode_To_Tx_Type only applies to
  an intra block's chroma plane per av1_get_tx_type's own is_inter branch.

Cross-checked against a live patched aomdec (EC_CHROMA_TXTYPE trace in
/tmp/libaom-src/av1/decoder/decodetxb.c, not committed here) on the
lane's own seed-42 aomenc fixture: every uv_mode -> tx_type pair libaom
picked for this stream's chroma matches default_intra_tx_type exactly.

Suite: 174 passed, 1 failed (the new
a_real_aomenc_stream_with_directional_chroma_decodes_pixel_exact) --
NOT the pre-existing cdffwd flake. Confirmed the failure predates and
survives this fix: reverting default_tx_type to always-DctDct made the
mismatch start at pixel row 0 (whole-plane wrong); with this fix it
starts at row 6 and grows outward in a triangular fan, meaning the
tx_type choice is not itself wrong (matches libaom's own choice
byte-for-byte) but something downstream of it -- reconstruction/
directional-prediction propagation -- still diverges. Left failing,
not silenced or adjusted, for the next round to chase with the two
named suspects (intra edge filter gap, this tx_type path) now narrowed
to one.
fix(av1): V_DCT/H_DCT coefficient scan order + TX4 leaf8 scan table mixupAhmet Kaan Gümüş · 700543b
fix(av1): V_DCT/H_DCT coefficient scan order + TX4 leaf8 scan table mixup

Two real desync causes past r3's tx-class context-derivation fix:

1. read_coeffs always read coefficients in the default zigzag scan
   regardless of tx_type. libaom's V_DCT/H_DCT classes use Mrow_Scan/
   Mcol_Scan instead (scan.c av1_scan_orders index 10/11) -- decoded
   here as class_scan_table: V_DCT's class-scan is our grid's own
   natural row-major order (0..N), H_DCT's is that walk transposed.
   base_ctx/br_ctx's row/col-offset formulas (r3's fix) were already
   correct; only the scan order feeding position/row/col into them
   was wrong.

2. decode_leaf8's TX4 split loop (an 8x8 leaf's tx_depth=1 case) read
   its four 4x4 luma transform units with `scans.0` -- the leaf's own
   *8x8* scan table (64 entries) -- instead of `scans.1` (the 4x4
   table), so `pos` values up to 63 got written into a 16-cell grid.
   Pre-existing bug, only reachable/visible once (1) stopped eating
   the stream earlier.

5-scale probe (examples/probe_tx4.rs, /tmp/tx4work/s*.obu) moved
past every prior refusal point to new, later ones (scale 1.5 now
refuses on "a directional chroma mode (round 2)" instead of an
angle_delta/partition desync) -- real progress, not yet clean;
next round needs the same trace-correlation to chase the remaining
divergence(s). Suite green 172/172.
test(av1): let the leaf8 straddle-sequence test dump its stream (EC_AV1_DUMP)Ahmet Kaan Gümüş · fd61351
test(av1): let the leaf8 straddle-sequence test dump its stream (EC_AV1_DUMP)

Same pattern as the single-frame round-trip test, needed to feed the
sequence's frame 2 to an instrumented aomdec for lane-av1inter8 r4's
real-decoder mv comparison.
feat(av1): extend the 8x8-leaf straddle path to inter framesAhmet Kaan Gümüş · cc290f5
feat(av1): extend the 8x8-leaf straddle path to inter frames

Mirrors lane-av1-rect's key-frame 16x16-straddles-one-axis -> up-to-two
8x8-leaf path (code_square side==8, tile.rs write_leaf8) on the inter
side: code_square_inter takes a `side` param (8 or 16) and picks
Luma8Inter/Chroma4 or Luma16Inter/Chroma8 accordingly; the encoder's
inter loop builds `eight` leaves per straddling 16x16 the same way the
key-frame search does, each leaf's own NEARESTMV mv-stack window at
2x2-mi; the tile writer (write_inter_frame_leaf8) and decoder
(decode_inter_block8) mirror that leaf-by-leaf, with the same
prev_leaf skip/intra-inter context override write_leaf8 uses for mode
context (Neighbours' above/left arrays only resolve to SUB=16
granularity). New TxbSet::Luma8Inter/INTER_TX_TYPE_SET3_8 CDF
(libaom default_inter_ext_tx_cdf[EXT_TX_SET_DCT_IDTX][TX_8X8] = 4167,
distinct default+adaptation state from the 16x16/32x32 rows already
carried).

Encoder-side round-trips clean (both-axis-cut still refuses correctly);
a real multi-frame decode round-trip through ffmpeg desyncs starting
at the third coded frame (the second inter frame, U plane) -- logged
as an open dead-end for the next round, not chased further this round.
feat(av1dec): teach the decoder the 8x8-leaf straddle path, lift the RD guardAhmet Kaan Gümüş · ca24626
feat(av1dec): teach the decoder the 8x8-leaf straddle path, lift the RD guard

decode.rs's key-frame partition walk now mirrors write_leaf8: at a
straddling 16x16 (exactly one axis in-frame at the 16 level), it reads
the gathered split bool, then per in-frame 8x8 leaf reads partition_w8
NONE and decodes mode + Luma8/Chroma4 coefficients (decode_leaf8),
carrying the mi-precise Neighbours split (above_side_mi/left_side_mi,
record_mi/around_mi/partition_ctx_mi) already used for the coefficient
context, and mirroring the r15 above_mode/left_mode writeback rule from
the last leaf.

40x32 and 640x360 key frames decode byte-exact against the encoder's
own reconstruction, and 40x32 agrees with ffmpeg. With the read path
proven, encode.rs's `!has_leaf8` RD-cost guard is lifted: leaf8 can now
win on cost anywhere, not just when forced by an illegal whole block.
Full gate: 155 passed, 0 failed, 10 ignored.
fix(av1): keep the leaf8 RD-cost guard until crate::decode reads leaf8Ahmet Kaan Gümüş · 1d41e74
fix(av1): keep the leaf8 RD-cost guard until crate::decode reads leaf8

r15 proved the 8x8-leaf path against ffmpeg, but the in-crate software
decoder has no leaf8 read path yet; letting leaf8 win on cost at sizes
decode_stream round-trips broke 3 decoder tests. Guard re-instated with
the new reason; lifts when decode.rs learns the path.
Merge branch 'lane-av1-rect': mod-32==8 key frames — the 8x8-leaf straddle pathAhmet Kaan Gümüş · e05f550
Merge branch 'lane-av1-rect': mod-32==8 key frames — the 8x8-leaf straddle path

Fifteen rounds: side-8 CDF layer (TX_8X8/TX_4X4, partition_w8), Reach and
scan tables for 8x8 leaves, mi-precise partition/mode contexts, the CFL
alphabet, reduced_tx_set declared in the key-frame header, and the leaf
mode-neighbour write moved out of the per-leaf loop. 640x360-class key
frames now encode and round-trip through ffmpeg bit-exact; the 8x8-leaf
split competes on RD cost; 40x40-class both-axes sizes still refuse.
fix(av1): thread the last leaf's mode past the whole straddling quadrantAhmet Kaan Gümüş · d02638d
fix(av1): thread the last leaf's mode past the whole straddling quadrant

write_leaf8's above_mode[c]/left_mode[r] forced write (r12) ran once per
leaf inside the quadrant's leaf loop, so the first leaf's write clobbered
the true external neighbour mode a second leaf of the *same* straddling
16x16 still needed to read on its non-adjacency axis. Move the write out
of write_leaf8 to run once, after the whole leaf loop, from the last
(bottom/right-most) leaf. a_single_axis_straddle_round_trips_through_ffmpeg
now decodes clean; un-ignored. Lifted the RD-cost guard that kept leaf8
splits from competing on cost (now decoder-proven); full gate 136/0/9.
fix(av1): declare reduced_tx_set in the key-frame header; rng in tracesAhmet Kaan Gümüş · a9fbebe
fix(av1): declare reduced_tx_set in the key-frame header; rng in traces

The writer coded 8x8-leaf tx types against TX_SET_INTRA_2 tables while
the header's reduced_tx_set:false told decoders to read TX_SET_INTRA_1 —
a 7-vs-5-symbol alphabet skew that shifts the arithmetic coder's range
with no symbol value ever differing. All existing sizes still round-trip
bit-exact (16x16 resolves to the same 5-symbol set under both headers).
Straddle test stays ignored: a further divergence remains past leaf(0,8).
fix(av1): 8x8 leaf reads the CFL-allowed uv_mode CDF, threads its mode forwardAhmet Kaan Gümüş · e3b2c93
fix(av1): 8x8 leaf reads the CFL-allowed uv_mode CDF, threads its mode forward

write_leaf8 hardcoded cfl:false for write_intra_mode's chroma-mode CDF, but
is_cfl_allowed (spec 5.11.5) is true up to 32x32 -- every other write_block
caller at 16x16 and up already passes true. The narrower uv_mode_no_cfl
alphabet is one symbol short of uv_mode_cfl, so even an identical DC_PRED
decision consumed a different amount of arithmetic range and derailed the
stream from that leaf onward.

record()'s above_mode/left_mode write is also a no-op at an 8x8 leaf's own
side (side/SUB == 0), and write_leaf8 only called record_mi, never updating
those coarse arrays -- so a second straddling 16x16 quadrant stacked above
or left of the first (outside r11's same-call prev_leaf override) read
whatever stale mode sat in that slot. Fixed by writing the leaf's own mode
into above_mode[c]/left_mode[r] directly.

Full suite still 134/0/10; the straddle round-trip stays ignored -- a
residual divergence now shows up one leaf further in (leaf(2,8) reads its
own luma coefficient block at the wrong tx size), not yet isolated to a
single symbol.
wip(av1): r11 checkpoint — leaf-8 trace instrumentation and partial ctx fixesAhmet Kaan Gümüş · 3a1f168
wip(av1): r11 checkpoint — leaf-8 trace instrumentation and partial ctx fixes

Full suite green (134/0/10); the 40x32 straddle round-trip still desyncs
and stays ignored. Diff spans cdf/cdf_state/encode/tile from the r11
trace session; r12 continues from the committed trace artifacts.
feat(av1dec): decode skip blocks, directional intra modes, odd frame sizesAhmet Kaan Gümüş · 632319a
feat(av1dec): decode skip blocks, directional intra modes, odd frame sizes

Extends the software key-frame tile decoder past round 1's whole-superblock
DC_PRED-only scope: skip=1 blocks decode to pure prediction (no residual
read); all thirteen intra modes decode via crate::intra::predict, reusing
encode.rs's Reach edge/reach rules (made pub(crate)) for the directional
above-right/below-left reads; frames that are not a whole number of 64x64
superblocks or 32x32 blocks decode via the same gathered-CDF partial-block
path tile.rs's writer uses, with a duplicated (not shared -- tile.rs is
another lane's territory) Neighbours/gather implementation kept in step by
the byte-exact round-trip tests.

Fixed along the way: read_plane's cdfs.txb() lookup was hardcoded to
DC_PRED's table for every plane, which only worked by coincidence while
every stream really was DC_PRED; real modes need the block's own luma mode
there (matching write_block_planes) even though chroma's own prediction
mode stays DC_PRED.

decode_key_frame_tile's signature grows frame_width/frame_height (the
header's separate true render size) to crop the reconstruction the same way
crop_encoded does, since mi_cols/mi_rows alone cannot invert to it losslessly.
feat(av1): begin a software key-frame decoder (round 1)Ahmet Kaan Gümüş · e6eadb9
feat(av1): begin a software key-frame decoder (round 1)

Promotes msac's test-only SymbolDecoder to a real, non-test decoder
(the inverse of SymbolEncoder, already spec-derived and roundtrip
tested), and adds crates/ec-av1/src/decode.rs: a from-spec reader that
mirrors tile.rs's sb_coeff_key_frame_tile symbol order (partition tree
through 64x64/32x32/16x16, coefficient base/base-range/EOB/Golomb/sign
syntax, CDF adaptation) without importing from tile.rs, which a
sibling lane is editing concurrently.

Round 1 scope: key frames only, DC_PRED blocks only, unskipped, and
frames a whole number of 64x64 superblocks -- everything else refuses
with a named error rather than miscoding. Within that scope, real
encoder output (encode_key_frame_with_modes forced to DC_PRED, two
sizes, real quantised AC/DC residual) decodes byte-exact against the
encoder's own reconstruction. Encoded gains three pub(crate) fields
(tile, mi_cols, mi_rows, base_q_idx) so a decoder test can reach the
raw tile payload without re-deriving it from the OBU stream.

Deferred to round 2: non-DC_PRED intra modes (needs the directional
edge-reach plumbing), inter frames, skipped blocks, and the
partial-superblock/gathered-CDF true-edge path.
fix(av1): mi-precise partition ctx for 8x8 leaves; falsify r7's ctx hypothesisAhmet Kaan Gümüş · 9a69856
fix(av1): mi-precise partition ctx for 8x8 leaves; falsify r7's ctx hypothesis

Neighbours gained above_side_mi/left_side_mi (mi-granularity, mirroring
above/left) and partition_ctx_mi, so a straddling 16x16's second 8x8
leaf reads its own finer neighbour state instead of the enclosing
16x16 slot. Spec-accurate improvement, does not regress the gate
(134 passed, 10 ignored, unchanged).

r7's named falsification candidate for the 40x32 dav1d desync --
partition_w8's ctx reading the enclosing slot -- is FALSIFIED by an
EC_RNG/EC_TRACE2 trace diff against a debug aomdec: libaom's own
partition_plane_context masks at bsl=0 for BLOCK_8X8, and every
partition_context_lookup entry a 4x4-free writer ever produces has
bit 0 clear, so ctx is provably 0 on both sides regardless. The real
first divergence is later, inside leaf0's own luma transform
(TxbSet::Luma8/Chroma4, exercised by no other caller): the decoder
reads a wrong EC_EOBPT category (eob=36 vs the writer's real eob=7)
somewhere between the TX_TYPE and EOB_PT symbols. Named in the test's
doc comment for the next round.
feat(av1): a quality/size targeting surface over base_q_idxAhmet Kaan Gümüş · a55d2ef
feat(av1): a quality/size targeting surface over base_q_idx

RateTarget::{QIndex,Quality,BytesPerFrame} on Av1Encoder::with_rate_target,
additive alongside the existing EncoderConfig::base_q_idx path. Quality
maps to base_q_idx via the calibration sweep's linear fit; BytesPerFrame
steers it with a clamped proportional controller (no accumulated debt, so
no windup class to bound). Calibration sweep test records the curve.
fix(av1): Reach tables for side=8, coeff_bits TX4 scan; wire key-frame 8x8-leaf pathAhmet Kaan Gümüş · 51db03e
fix(av1): Reach tables for side=8, coeff_bits TX4 scan; wire key-frame 8x8-leaf path

Root-caused the r6 panic to two independent bugs, both fixed:
- Reach::of's HAS_TOP_RIGHT/HAS_BOTTOM_LEFT tables only ever covered side
  16/32 (libaom's 128-superblock-relative bit tables); side==8 fell through
  to the 16-table with a 16-wide stride and indexed past its 8-byte length.
  Added libaom's has_tr_8x8/has_bl_8x8 as a third table row.
- tile::coeff_bits's SCANS cache had no TX4 entry, so an 8x8 leaf's 4x4
  chroma coefficient search read TX32's 1024-entry scan against a 16-entry
  grid. Added the missing TX4 scan.

Wired encode_key_frame_inner's key-frame block-generation loop to build
BlockCoeffs::eight for a 16x16 sub-block that straddles the true frame edge
on exactly one axis (mirroring `write_leaf8`'s 1-or-2-leaf geometry), while
still refusing a sub straddling on both axes (needs a rectangular transform
neither writer has). The leaf-8 split is only ever taken when the whole
32x32 is illegal (forced) -- never chosen on RD cost over an already-legal
whole block, since the leaf path is not yet proven against a real decoder
and must not regress sizes that already round-tripped correctly.

Narrowed both_writers_refuse_the_same_strictly_before_half_straddle_size
(now key_frame_encodes_the_inter_frame_still_refuses_at_half_straddle_size)
and a_picture_off_the_block_grid_is_refused to the classes that are still
genuinely refused (both-axes-cut, e.g. 40x40) vs. now accepted without
erroring (640x360, 40x32). Added a decoder round-trip test at 40x32,
`#[ignore]`d: the leaf-8 stream is not yet decoder-clean (dav1d rejects it,
"Invalid data found") -- a genuine desync, not yet traced to its first
mismatched symbol. Added EC_PART/EC_TOK tracing to the leaf-8 write path
for that follow-up.
feat(av1): 8x8-leaf CDF, mi-precise neighbour contexts, write_leaf8 (r6, unwired)Ahmet Kaan Gümüş · 83656d8
feat(av1): 8x8-leaf CDF, mi-precise neighbour contexts, write_leaf8 (r6, unwired)

Lands the groundwork for lane-av1-rect's 8x8-leaf write path: the
PARTITION_W8 CDF (+ adapted state field), Neighbours::record_mi/around_mi
(mi-precise coeff-context entry points, the SUB-granularity above_mode/
above_side arrays untouched), and write_leaf8 (mirrors write_block for one
8x8 leaf, reading its intra-mode context from the enclosing 16x16 slot).
BlockCoeffs gained an `eight: Option<Vec<BlockCoeffs>>` carrier and the
coded-mode-validation loop flat_maps it.

The key-frame Quadrant::Split writer now wires write_leaf8 for a straddling
16x16 (one axis only, mod-32==8 targets): the gathered split bit + per-leaf
partition_w8 symbol + write_leaf8, matching the existing 32x32/64x64 edge
pattern.

encode.rs's block-generation loop does NOT populate `.eight` yet: an attempt
to wire it hit an index-out-of-bounds in code_square's edge-sample read
(Plane::edges, encode.rs ~1027) for a leaf at the frame's own edge, and a
"exactly one straddler" geometry assumption that also turned out wrong (a
32x32-aligned straddling 16x16 row/column band is generically two leaves,
not one) -- both are next-round work, not this round's budget. The refusal
at encode.rs's split loop is therefore unchanged; both_writers_refuse_the_
same_strictly_before_half_straddle_size is unchanged and still green.

Suite: 134/0/9, unchanged from cf71e1e.
fix(av1): correct the r4 chroma-granularity assumption for 8x8 leavesAhmet Kaan Gümüş · b91e4ec
fix(av1): correct the r4 chroma-granularity assumption for 8x8 leaves

libaom's is_chroma_reference (av1_common_int.h) is unconditionally true
for bsize >= BLOCK_8X8 (4:2:0 or not), so a split 16x16's 8x8 children
each code their own chroma at 4x4 -- chroma does not stay at the
parent's 8x8 granularity as the r4 doc comments claimed (never checked
against a real decoder). Corrects TxbSet::Chroma4's doc and flips
code_square's still-unreached side==8 branch to the chroma set a real
caller will need, so the next lane does not inherit a wrong premise.

No behavior change (134/0/9, unchanged): the branch has no caller yet.
feat(av1): land TX_8X8/TX_4X4 CDF tables for the mod-32==8 straddle leafAhmet Kaan Gümüş · dc6d790
feat(av1): land TX_8X8/TX_4X4 CDF tables for the mod-32==8 straddle leaf

Extracted byte-exact libaom Default_*_Cdf tables for Luma8/Chroma4
coefficient coding plus the TX_8X8 intra tx_type table, wired through
new TxbSet::Luma8/Chroma4 variants and code_square's third side==8
branch. Not yet reachable from the tile writer -- SPLIT_BLOCKS still
refuses mod-32==8 sizes -- landing the compiling infrastructure layer
per the charter's budget-exhausted fallback; the 16x16-leaf split
emission (tile.rs Quadrant::Split), the leaf-under-leaf carrier, and
aomdec/dav1d parity verification are unstarted.

134 baseline ec-av1 tests still green; no behavior change.
test(av1): exercise the 16x16 straddle-leaf inter path on real contentAhmet Kaan Gümüş · cdf3858
test(av1): exercise the 16x16 straddle-leaf inter path on real content

real_clip_encodes_within_its_quality_and_size_budget uses 640x384 (both
axes 32-aligned), so Quadrant::Split never fires and the e19bb47
NEARESTMV leaf path was untouched by real, mixed intra/inter content.
Add a sibling at 704x400 (400 mod 32 == 16, the exactly-half straddle
class), same three gates: dav1d decodes every frame, mean luma PSNR
floor, byte ceiling.
fix(av1): mvstack extended row/col scan, intra-aware coverage; enable 16x16 inter leavesAhmet Kaan Gümüş · b26ee9f
fix(av1): mvstack extended row/col scan, intra-aware coverage; enable 16x16 inter leaves

Ports spec 7.10.2.4's extended row/col scan (libaom scan_row_mbmi/
scan_col_mbmi's idx=2..MVREF_ROW_COLS positions), invisible at pure
8-mi geometry because the immediate scan's own processed_rows/cols
coverage already reaches as far -- but only once that coverage counts
every *coded* neighbour cell, intra or inter, the way libaom's
processed_rows update sits outside add_ref_mv_candidate's ref-frame
match. The straddle-test attempt this round started from computed
coverage only from ref-matching (inter) cells, so an intra neighbour
above an 8-mi query silently un-suppressed the extended scan -- a real
8-mi behavior change, caught by two new differential tests
(extended_{row,col}_scan_is_a_no_op_at_8mi_geometry_even_behind_an_intra_neighbour)
that place a distinctively-MV'd tracer candidate at the extended
offsets and assert it never gets picked up. MiGrid now records intra
cells (encode.rs/tile.rs's else branches) so mvstack sees them.

With the no-op proven, lifts the `false &&` gate on 16x16-leaf
NEARESTMV (encode.rs:1231, wired r1, gated since dead code never
touched write_inter_frame_leaf's real symbol chain): full suite
130+3 new = 133/0/9, straddle and real_clip both green with the gate
live. The 640x384 real-clip fixture tiles exactly into 32x32
quadrants (no true-edge straddle), so its numbers are unchanged
(45.41 dB / 69861 bytes) -- the gate's leaf path is unexercised there;
the straddle test is what proves it live.
feat(av1): wire NEARESTMV inter coding for 16x16 straddle leaves, gated offAhmet Kaan Gümüş · cac7aab
feat(av1): wire NEARESTMV inter coding for 16x16 straddle leaves, gated off

Adds the full machinery for real inter coding of the 16x16 leaves a
half-straddling 32x32 inter-frame quadrant splits into: a Luma16Inter
TxbSet/CDF table (reduced_tx_set forces the same two-symbol DCT_IDTX set
16x16 already shares the shape of with Luma32Inter), a leaf writer
(write_inter_frame_leaf) that codes is_inter/single_ref/mv-stack/DRL/mv at
this leaf's own 4x4-mi window, and an encode-side NEARESTMV-vs-intra cost
comparison (code_square_inter) with matching per-leaf MvStack/grid updates.

The NEARESTMV selection itself is left gated off (`false &&`, corner-cut
comment at the site) -- enabling it desyncs the decoder ("Invalid data
found") on the existing straddle round-trip test, not yet isolated within
this round's budget. Confirmed via a false/true toggle that the desync is
in the new is_inter leaf path, not in the reduced_tx_set frame-header flag
(that alone round-trips clean). Gate: cargo test -p ec-av1 --release ==
130 passed, 9 ignored, 0 failed (same as baseline).