forge
Explore
Log in

Don't you dare go Hollow

Commits

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

2026-09-02

feat(av1): decode 128x128 superblocks on key frames (the ReelC blocker)Ahmet Kaan Gümüş · e749a4d
feat(av1): decode 128x128 superblocks on key frames (the ReelC blocker)

His ReelC encode codes use_128x128_superblock=1 (aomdec EC_TRACE: EC_PART
mi_row=0 mi_col=0 bsize=15); ec-av1 never read that sequence bit and decoded
every frame as 64x64 superblocks, so every earlier ReelC stop was a desync
artefact.

- decode.rs: SB128 thread-local + set_sb128; the key-frame tile loop now walks
  the 64x64 quadrants in libaom's nested order (sb_visit_order), reads the
  128 root's loop-restoration units once per 128x128 and one partition symbol
  off the 8-symbol partition_w128 CDF (forced-split gather at the frame edge),
  and recurses SPLIT into the existing 64 path; the other seven 128-level arms
  refuse by name. delta_q/delta_lf now key off the real superblock size.
- Neighbours' no-neighbour partition-context sentinel was SB (64), which reads
  identically up to the 64 root but set the bit at BLOCK_128X128 -- the 128
  symbol came off CDF row 3 where libaom uses row 0.
- Reach (has_top_right/has_bottom_left) masked the block's position with a
  hardcoded 64 superblock; libaom masks with the sequence's own sb_size.
- stream.rs: inter frames under a 128 superblock refuse by name (scoped to
  frames larger than one 64x64 superblock, since a <=64x64 frame decodes
  identically either way).

Gates: a_real_aomenc_stream_with_128x128_superblocks_decodes_pixel_exact
(6/6 pixel-exact, 8- and 10-bit, 256x192 + 384x384, part128_symbols=26,
part128_split_hits=34) and a_real_aomenc_128x128_inter_stream_refuses_by_name.
Merge branch 'lane-rectsplitx': per-transform-unit rect intra prediction under split transforms at every strip size (ReelB mid-film / ReelC head blockers); depth_to_tx_wh; three neighbour-map fixes; 16x8 tx_depth reads cat1; sub-16 filter-intra gates liveAhmet Kaan Gümüş · 4bf9109
Merge branch 'lane-rectsplitx': per-transform-unit rect intra prediction under split transforms at every strip size (ReelB mid-film / ReelC head blockers); depth_to_tx_wh; three neighbour-map fixes; 16x8 tx_depth reads cat1; sub-16 filter-intra gates live

Merge resolution (main's fixes kept where they overlap):
- decode_rect_split chroma map: superset of rectchroma's and rectsplitx's rows
  (32x8/8x32/16x4/4x16/8x4/4x8), one comment.
- Reach::of_tu WIDENED to (tx_w, tx_h); square callers pass (tx, tx). The lane's
  inline per-unit Reach collapses onto it, and main's palette window inside the
  unit loop is kept (windowed by tx_w/tx_h).
- One fimode->intradir helper: main's fi_tx_row; the lane's identical
  tx_type_mode_row is dropped and its call site rebound.
- depth_to_tx_wh wins at every depth site, including decode_block_rect64's,
  replacing `bw.min(bh) >> (depth - 1)`; the "splits only once" refusal is gone.
- refusal_inventory: the lane's list minus its stale AB-below-16x16 entry (main
  lifted that refusal in lane-ab16).

Two merged gates asserted on counters that the lifted refusals fed, and both went
vacuous/false in the cross-product (class counter-from-refused-stream):
- chroma_is_a_4to1_or_sub8_rect counted attempts REFUSED at the depth-1 1:4
  strip; it now counts depth-1 1:4 strips that DECODED and compared pixel-exact.
- ab_partitions_below_16x16 required a vert-AB TX4 unit "reached" on
  tx-size-search attempts that used to stop at the strip refusal. Those attempts
  now decode to the end and compare pixel-exact, carrying zero such units -- the
  old nonzero count came from a still-desynced decode. The assert is now that
  every tx-size-search attempt compares exact; the lookup values stay pinned by
  of_tu_keeps_the_ordinary_answer_and_uses_the_block_row_under_vert_ab.

Suite on the merged tree: 347 passed / 3 failed / 29 ignored, the 3 being exactly
those two gates plus refusal_inventory; after the resolutions above all 3 pass
(15/15 in the targeted rerun).
Merge branch 'lane-band46': band-fixture seed-46 mismatch was per-transform-unit reach (third instance); seed 46 un-excluded from the chroma-rect gateAhmet Kaan Gümüş · dfba0f5
Merge branch 'lane-band46': band-fixture seed-46 mismatch was per-transform-unit reach (third instance); seed 46 un-excluded from the chroma-rect gate

Main already carries the per-TU fix (lane-palette2 r12's Reach::of_tu), so the
lane's own third implementation is dropped: kept main's of_tu and its three call
sites, took the lane's SPLIT_TU_REACH_FIX_HITS counter rewired as a `tu_reach`
wrapper that fires when the per-unit answer differs from the standalone-block
one, its gate a_real_aomenc_band_stream_seed46_decodes_pixel_exact, and its
gate_coverage tx-size-search delta. the_chroma_rect_gates_excluded_seed_46_
decodes_pixel_exact is un-ignored and EXCLUDED_SEEDS is now empty (both pass at
8- and 10-bit).
Merge branch 'lane-palette2': palette Y/UV incl. rect strips and split transforms; above-right/below-left reach decided per transform unit (D203 wedge under VERT_A)Ahmet Kaan Gümüş · 5b07c13
Merge branch 'lane-palette2': palette Y/UV incl. rect strips and split transforms; above-right/below-left reach decided per transform unit (D203 wedge under VERT_A)

Conflicts: kept lane-palette2's rect-capable Reach::of_tu(bw,bh,col_off,row_off,tx,block)
and deleted lane-ab16's square-only one, retargeting ab16's two call sites and porting
its vert-AB test to the surviving signature; decode_leaf_rect8's per-TU reach moved off
Reach::of(4,..) onto of_tu (same class); main's decode_block_rect4 wired to the new
read_intra_mode_rect signature and refuses a 1:4 strip that actually uses a palette.
Merge branch 'lane-ab16': 16x16-level HORZ_A/HORZ_B/VERT_A/VERT_B; transform units inside a block take the block's reach rowAhmet Kaan Gümüş · 776f14b
Merge branch 'lane-ab16': 16x16-level HORZ_A/HORZ_B/VERT_A/VERT_B; transform units inside a block take the block's reach row

Conflict resolutions: cdf.rs kept main's NZ_MAP_CTX_OFFSET_32X64/64X32 rows
(standing hazard) and dropped the lane's rect_nz_map_ctx_offset_tables_are_row_major
test; encode.rs kept main's rect_reach_tables/table_row form; decode.rs took the
lane's four-arm AB block, retargeted onto main's decode_leaf8(prev_leaf: Option)
signature; write_back_split_modes and Reach::in_vert_ab carried over from the lane.
fix(av1): split transform units answered their intra reach as if each were a standalone block -- libaom answers from the unit's row_off/col_off inside its parent, so a D203_PRED 8x8 unit at col_off=2 read bottom-left samples that are not reconstructed yet; seed 46 of the 1:4-strip recipe mismatched ffmpeg on 916 luma samples of frame 0 with a fully exact entropy ladderAhmet Kaan Gümüş · b4b7e7c
fix(av1): split transform units answered their intra reach as if each were a standalone block -- libaom answers from the unit's row_off/col_off inside its parent, so a D203_PRED 8x8 unit at col_off=2 read bottom-left samples that are not reconstructed yet; seed 46 of the 1:4-strip recipe mismatched ffmpeg on 916 luma samples of frame 0 with a fully exact entropy ladder

Class reach-is-per-transform-unit. `Reach::of(logical_tx, tu_px, tu_py, ..)` at three
per-TU call sites asked the standalone-block has_top_right/has_bottom_left tables.
libaom `reconintra.c` never does that inside a block:
  * has_bottom_left: `if (col_off > 0) return 0`
  * has_bottom_left leftmost-SB-column: counts row_off + tx_high_unit from the UNIT
  * has_top_right: `if (row_off > 0) return col_off + tx_wide_unit < plane_bw_unit`
New `Reach::of_tu` ports that ladder and delegates the (0,0) fallback to the existing
square/rect block answers; `decode::tu_reach` wraps it and counts every unit whose answer
differs from the old one (`split_tu_reach_fix_hits`).

Gate `a_real_aomenc_band_stream_seed46_decodes_pixel_exact` (stream.rs): the sibling
rectchroma recipe, seeds 42..=51 on 8 AND 10 bit, plane-exact vs ffmpeg, seed 46 asserted
to decode on both depths, fix-fired counter > 0 overall and > 0 on 10 bit.
10 pixel-exact streams / 10 named 1:4-chroma refusals / 22 fixed transform units (10 10-bit).
`enable-tx-size-search` leaves gate_coverage::NEVER_ON_10BIT -- first 10-bit gate to spell it.

Suite: 323 passed, 0 failed, 30 ignored.
fix(av1): a transform unit inside a block is not a block at that positionAhmet Kaan Gümüş · b7ad53c
fix(av1): a transform unit inside a block is not a block at that position

`Reach::of(tx, tu_px, tu_py, ..)` answered the standalone-block
has_top_right/has_bottom_left tables for every transform unit of a
split-transform SQUARE block (decode_block's multi-TU branch and
decode_leaf8's 2x2 4x4 grid), where libaom's reconintra.c takes its
TU branches instead: bottom-left is 0 outright for col_off > 0, and
1 while the unit below-left is still inside the block. The rect path
(decode_rect_split, lane-rectsplit r1) already had the right rule
inline; it now shares it as Reach::of_tu.

Measured on the seed-46 gate stream: the TL 16x16 (D203, VERT_A,
tx depth 1) at px(128,64) has four 8x8 luma TUs; aomdec reports
n_bl=8,0,8,0 for them, ours granted bottom-left to the col_off=8
units and reconstructed a 25-pixel diagonal wedge at rows 68..71
that then propagated over the whole last superblock (2242 samples).

a_real_aomenc_stream_with_filter_intra_on_a_horz_vert_strip_decodes_pixel_exact
RED -> GREEN. New enumeration test
encode::tests::of_tu_matches_libaom_has_top_right_and_has_bottom_left_per_unit
checks of_tu against an MI-unit transcription of both libaom functions
over every (block, tx, row_off, col_off, block-level answer).
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).
fix(av1): a transform unit is not a block of its own size -- Reach::of_tuAhmet Kaan Gümüş · 85bf4d6
fix(av1): a transform unit is not a block of its own size -- Reach::of_tu

The TX4 sub-grid of an 8x8 square inside a PARTITION_VERT_A/_B indexed a
4x4 row of the three-row has_tr_vert/has_bl_vert tables and panicked on a
real --enable-tx-size-search=1 stream. libaom has no such row on purpose
(has_tr_vert_tables[BLOCK_4X4] is NULL): a transform unit inside a block
answers from the block's geometry, and only its top row / left column
reaches the table -- the BLOCK's row, at the BLOCK's position. Both TU
sites (decode_block's multi-TU branch, decode_leaf8's TX4 grid) go
through the transcription; a unit test pins it equal to the old
unit-as-block answer everywhere outside a vertical AB partition.

The AB gate no longer pins --enable-tx-size-search=0 (aomenc's default is
ON, which is what hid the panic): four attempts run with it on, tolerate
only an 'unsupported' refusal from another lane, and hard-assert a TX4
unit inside a vertical AB partition was reached.
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).
feat(av1): PARTITION_HORZ_A/HORZ_B/VERT_A/VERT_B at 16x16 for intra framesAhmet Kaan Gümüş · 95d8523
feat(av1): PARTITION_HORZ_A/HORZ_B/VERT_A/VERT_B at 16x16 for intra frames

Two 8x8 squares (decode_leaf8) plus one 16x8/8x16 strip (decode_leaf_rect's
real non-skip coefficient path) per arm, libaom visit order, VERT_A/_B under
Reach::vert_ab_partition() (lane-part32 fd1a2eb's encode.rs half cherry-picked).
Lifts 'a HORZ_A/HORZ_B/VERT_A partition below 16x16' (narrowed to the 1:4 case)
and 'a coded (non-skip) HORZ_B/VERT_B rect strip below 16x16' (dead branch
deleted), gated by 6 real aomenc streams, 8-bit and 10-bit, each arm asserted:
ab16 arms(HORZ_A,HORZ_B,VERT_A,VERT_B)=[2,1,2,1], all pixel-exact vs ffmpeg.

Also, coordinator-reported base defects fixed here (same hunks on lane-sub8 r6 /
lane-rectx r5): mi-exact mode map read with tile-relative guards and reset in
start_tile/start_row; has_tr/has_bl rect index uses MAX_MIB_SIZE_LOG2 (5), not 4.
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.