forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on cbbd6e2ef6acafb00aeb55e460423f024126f90f

2026-09-02

fix(av1): an OBMC neighbour with no recorded switchable filter aborted the process instead of refusingAhmet Kaan Gümüş · a1a5ef8
fix(av1): an OBMC neighbour with no recorded switchable filter aborted the process instead of refusing

`neighbour_filter` handed the `[3, 3]` "no filter recorded" sentinel straight to
`from_switchable_symbol`, which panics on anything above 2 -- a crash on stream
data, reproducible on a real 192x68 cq40 8-bit aomenc stream where an inter leaf
below 8x8 desyncs upstream. It now returns `Result` and refuses by name; the
desync itself belongs to lane-intersub8.

Also: an `EC_AV1_DEBLOCK_TRACE_V` rung (per-edge len/level plus the vertical
pass's real bounds), and `a_frame_edge_straddling_band_decodes_pixel_exact`,
an ignored pinned test carrying the four 192x68 / 68x192 straddle arms. The
+-1 straddling-band defect is bisected to CDEF this round: reconstruction and
post-deblock both match the instrumented reference on the failing frame.
fix(av1): the compound_type/wedge_idx CDF row of a rectangular inter block is its own BLOCK_SIZES_ALL index, not the enclosing square side'sAhmet Kaan Gümüş · 0665419
fix(av1): the compound_type/wedge_idx CDF row of a rectangular inter block is its own BLOCK_SIZES_ALL index, not the enclosing square side's

decode_inter_block carries the enclosing SQUARE `side` (the accepted strip
corner-cut), and the masked-compound read derived its CDF row from it:
`match side { 8 => 3, 16 => 6, 32 => 9 }`. A 16x8 PARTITION_HORZ strip with
`comp_group_idx == 1` therefore read `compound_type_cdf[BLOCK_16X16]` where
libaom reads `compound_type_cdf[BLOCK_16X8]` (decodemv.c read_compound_type),
desyncing the tile from that block on. Same class one path over: the
single-ref wedge-interintra row was `if side == 16 { 6 } else { 9 }`.

New helper `bsize_all_index(bw, bh)` (libaom enum BLOCK_SIZE order) plus
`wedge_used_bsize` (av1_wedge_params_lookup wedge_types > 0); the wedge MASK
codebook is still square-only, so a rectangular COMPOUND_WEDGE or wedge
interintra block is refused by name rather than blended with the wrong mask
(two new refusal_inventory entries; the 16x4 split-transform refusal is gone
with the lane-r14 merge).

Evidence: 192x128 8-bit cq34 aomenc stream (gate attempt 5), decode-order
frame 5 was 8683 luma pixels wrong from (96,59); aomdec EC_TRACE_MODE ladder
diverged at the block after mi(24,0) (ours rng=64901 vs oracle 47271) and the
oracle's EC_PART histogram shows ZERO 1:4 partitions in that stream, i.e. our
1:4 counters there were phantom reads of an already-diverged stream. After the
fix the whole 6-frame sequence is byte-identical to ffmpeg and the phantom
counters read 0.
test(av1): pin the square-only 64x64 intra superblock inside an inter frameAhmet Kaan Gümüş · f0eee74
test(av1): pin the square-only 64x64 intra superblock inside an inter frame

With rect partitions off the encoder can hand a whole 64x64 superblock of an
inter frame to an intra block. That block's uv_mode must come off the 13-symbol
no-CFL alphabet (is_cfl_allowed caps CFL at 32x32); reading the 14-symbol CFL
one gave the same DC_PRED value with the wrong interval and desynced the tile
from that block on -- silently, since the decoder then read a phantom refusal
out of the diverged stream. Gate: real aomenc, 192x128 mandelbrot, two detail
levels x two quantisers x two bit depths, 8 decode-order frames each compared
Y/U/V against ffmpeg, hard-asserting a nonzero no-CFL uv_mode counter.
fix(av1): the 8x8 COMPOUND leaf predicted both taps translationally -- libaom warps every is_global_mv_block slot independently of motion_mode, so a GLOBAL_GLOBALMV 8x8 compound leaf under a non-TRANSLATION model drifted a few luma levels; the 16-frame dual-filter/OBMC gate is now pre-filter byte-exact on all 16 decode-order frames and un-ignoredAhmet Kaan Gümüş · 8ff77a4
fix(av1): the 8x8 COMPOUND leaf predicted both taps translationally -- libaom warps every is_global_mv_block slot independently of motion_mode, so a GLOBAL_GLOBALMV 8x8 compound leaf under a non-TRANSLATION model drifted a few luma levels; the 16-frame dual-filter/OBMC gate is now pre-filter byte-exact on all 16 decode-order frames and un-ignored

Third instance of the twin-functions-drift class in this lane: decode_inter_block's
compound arm has applied allow_warp's GLOBAL branch per reference slot since
lane-cwarp r1, decode_inter_block8's compound arm never did.

Also adds the EC_OBMC rung (aomdec's own byte format) plus an EC_PICT
decode-order frame marker; the 325 EC_OBMC lines diff clean against the
instrumented aomdec, which exonerates the OBMC neighbour fields the r2
handoff suspected.
Merge branch 'lane-kf1200' (bee8ec0): the 16x4/4x16 chroma pair's edge-filter type comes from the pair's base mi, and a chroma-carrying gate source to prove itAhmet Kaan Gümüş · a8d25d4
Merge branch 'lane-kf1200' (bee8ec0): the 16x4/4x16 chroma pair's edge-filter type comes from the pair's base mi, and a chroma-carrying gate source to prove it

Root cause found on a 3840x1608 10-bit key frame that decoded with no refusal
and 12 wrong U samples (Y and V exact, and already wrong before the loop
filter, so reconstruction rather than deblock/CDEF/LR/grain):

libaom builds chroma_above_mbmi / chroma_left_mbmi from
mi[-((mi_row & ss_y) * stride + (mi_col & ss_x))] (set_mi_offsets,
av1/common/blockd.h), i.e. from the PAIR's top-left luma mi, never the odd
row/column of the closing strip. Reading the strip's own mi named a
non-chroma-reference 4-row block whose uv_mode is UV_DC_PRED and so lost a
SMOOTH neighbour: filt_type 0 instead of 1 turned av1_use_intra_edge_upsample
on (blk_wh 12 <= 16) for a directional chroma strip and moved 4 samples by 1.

Gate: a_real_aomenc_stream_with_a_16_level_1to4_partition_decodes_pixel_exact
now alternates a CHROMA-CARRYING source (smooth cb/cr gradients) into the odd
attempts -- the old gray source left both chroma planes constant, so every
uv_mode was DC and the shape was unreachable -- and hard-asserts a new
RECT4_16_UV_PAIR_FILT_HITS counter (pairs where the pair-base answer differs
from the strip-mi answer). Measured on this merge: 13 flips at 8-bit, 8 at
10-bit; the lane reports the gate FAILS with the fix reverted.

Also merged: a second tracked fixture crates/ec-av1/fixtures/reelb_ss300_key_frame.obu
(3840x2160 10-bit key frame, one temporal unit) with gate
the_reelb_ss300_key_frame_skipped_cfl_decodes_pixel_exact.

MERGE NOTE -- the two sub-8x8 skip arms (decode_leaf_split4, decode_leaf_rect8)
are the SAME arms lane-reelckf fixed on main, not additional ones: both lanes
wrote the identical "a skipped chroma block still gets its CfL alpha" fix
independently. The resolution keeps ONE fix and bumps BOTH lanes' counters
(CHROMA_SKIP_CFL_HITS and SKIP_CFL_HITS) so neither lane's gate becomes
vacuous. Likewise the pair-mi read exists once, with lane-kf1200's counter.

Lane suite: 378 passed, 0 failed, 33 ignored.
docs(sb128c): r4 handoffAhmet Kaan Gümüş · 1b74214Browse files
debug(av1): localise the square-only silent pixel drift to one 64x64 PARTITION_NONE intra-in-inter blockAhmet Kaan Gümüş · f359f69
debug(av1): localise the square-only silent pixel drift to one 64x64 PARTITION_NONE intra-in-inter block

A 192x128 8-bit real-aomenc stream encoded with rect/AB/1:4 partitions, cdef,
restoration, obmc, warp, order-hint and every compound tool disabled decodes
frames 0-3 byte-exact (pre-filter AND post-filter) and then puts 3540 wrong luma
samples (max |d| 6, chroma exact) into decode-order frame 4 -- confined to the
single superblock the frame codes as PARTITION_NONE at 64x64, an intra block
inside an inter frame. Frames 5-7 then drift via the adapted CDFs.

Measurements: aomdec's own partition histogram shows the stream contains no rect,
AB or 1:4 partition at all, so the "intra-coded 1:4 rect strip" refusal this
stream stops at on main is read out of an already-diverged stream; the msac range
before that block's partition symbol matches aomdec's exactly (33730), so the
divergence is inside the block; and the block's five non-zero levels pushed
through real libaom av1_inv_txfm2d_add_64x64_c reproduce our residual with 0
mismatches, exonerating the TX_64X64 dequant and inverse transform.

Two env-gated rungs added, no decode behaviour changed: partition_w64's trace now
carries the pre-read msac range (directly comparable to aomdec's EC_PART rng), and
EC_IIS prints the square intra-in-inter y_mode read.
fix(av1): a SKIP inter 128x128 block's internal TX_64X64 edges were deblockedAhmet Kaan Gümüş · a176458
fix(av1): a SKIP inter 128x128 block's internal TX_64X64 edges were deblocked

libaom `set_one_param_for_line_luma`/`_chroma` suppress every edge that is a
transform-unit edge but not a prediction-unit edge when
`curr_skipped = mbmi->skip_txfm && is_inter_block(mbmi)`. `get_transform_size`
still reports TX_64X64 (luma) / TX_32X32 (chroma) for a skipped 128x128 inter
block, so the tu_edge at the block's own x=64 / y=64 exists -- it is simply
never filtered. This decoder published those units into the lf grid
unconditionally and filtered them.

Two changes in `crates/ec-av1/src/decode.rs`:
- the per-leaf `fill_lf_grid_rect` loop is now gated on `!(skip && is_inter)`,
  leaving the block-level 128 publication (no internal luma edge) in place --
  the 128 root is the only block that reaches that loop skipped, because
  `read_block_tx_size` hands back four TX_64X64 leaves for `side > 64`
  regardless of `skip`.
- `fill_lf_grid_rect`'s uv extent drops its `.min(32)` cap: inert for every
  block up to 64 wide (64/2 == 32) and wrong for a 128-sided one, where it
  published an internal chroma edge every 32 chroma px. A non-skip 128 block
  still gets uv 32 through its own per-leaf calls (`w_mi * MI == 64`).

Also indexes `dump_stage`'s output per decode-order picture (`EC_AV1_POSTDEBLOCK_DUMP`
overwrote `.f0` every frame, so only the last picture was comparable against
aomdec's own indexed rung -- that rung is what isolated this defect).

Measured on the 8-bit 256x256 sb128 inter gate stream: decode-order frames 0-4
were pre-filter exact and frame 4 diverged post-deblock (98 luma px in a 9-px
band at x=64, 274 chroma); all five stages are now exact. aomdec's post-deblock
dump changes ZERO pixels in columns 50..78 of that frame -- it filters nothing
there.
Merge branch 'lane-r14' (b86eb38) into lane-inter16ab: general (tx_w,tx_h) read_var_tx_size with the full sub_tx_size_map and rectangular inter leavesAhmet Kaan Gümüş · 0402f49
Merge branch 'lane-r14' (b86eb38) into lane-inter16ab: general (tx_w,tx_h) read_var_tx_size with the full sub_tx_size_map and rectangular inter leaves

Both split-transform refusals in read_var_tx_size drop out with r14's general
recursion; the probe keeps both lanes' counters.
fix(av1): palette colours were read at 8 bits on every stream -- the raw literal widths, the delta range and the clamp are all sized by the sequence bit_depthAhmet Kaan Gümüş · 769ba67
fix(av1): palette colours were read at 8 bits on every stream -- the raw literal widths, the delta range and the clamp are all sized by the sequence bit_depth

read_palette_colors_y/_uv (decodemv.c:478/:509) size every raw literal by
bit_depth: the first colour is bit_depth bits, min_bits is bit_depth-3 (Y/U)
and bit_depth-4 (V), range starts at 1<<bit_depth and the clamp/wrap bound is
(1<<bit_depth)-1. Ours hardcoded 8, so a 10-bit palette block read two bits
too few per transmitted colour and decoded the whole rest of the tile from
the wrong bit position -- with no refusal.

It was silent because raw literals are EQUIPROBABLE and at the ranges this
content reaches an equiprobable read maps the msac range onto itself
(62728 -> 31364 -> renormalised 62728), so a cross-decoder RANGE ladder stays
bit-identical straight through the miscount and only the VALUE moves
(compare-range-not-tell's blind spot). Pinned on a 256x192 10-bit cq59
stream whose first block is a 32x16 palette: aomdec's EC_PAL ladder and ours
agreed on every range and disagreed on the first colour index, 0 vs 1. After
the fix all 1024 EC_PAL lines of that block match aomdec line for line and
the block grid matches aomdec's for the rest of the frame.

Gate: a_real_aomenc_palette_stream_decodes_pixel_exact_at_8_and_10_bit --
the existing 8-bit palette recipe with the depth as the only variable, both
arms hard-asserting palette_hits() moved and comparing all three planes
against ffmpeg. Reverting the fix to a literal 8 makes the 10-bit arm fail
on luma; the 8-bit arm is unaffected.
feat(av1): 16x16-level 1:4 partitions decode in inter frames -- four 16x4/4x16 strips, chroma coded once per pair from BOTH strips' motion (gate RED on one attempt)Ahmet Kaan Gümüş · 9f8067c
feat(av1): 16x16-level 1:4 partitions decode in inter frames -- four 16x4/4x16 strips, chroma coded once per pair from BOTH strips' motion (gate RED on one attempt)

The 16-level PARTITION_HORZ_4/VERT_4 arm of the inter partition chain, with
the three things that are new at this size:

  * is_chroma_reference (av1_common_int.h:1454): a 4:2:0 block one mi tall
    (wide) carries chroma only on an ODD mi_row (mi_col), so strips 0 and 2
    read and reconstruct no chroma at all and the odd strip codes one 8x4
    (4x8) transform at the PAIR's origin.
  * build_inter_predictors_sub8x8 (reconinter_template.inc:87-160): that
    chroma block covers two luma blocks, so it is built in 8x2 (2x8) pieces,
    each from its own strip's mv/ref/interp filters -- and only when
    is_sub8x8_inter holds (both strips single-ref inter), else the whole
    block falls back to this strip's mv.
  * min(bw,bh) == 4 kills skip_mode, comp_mode (is_comp_ref_allowed,
    blockd.h:65), motion_mode/OBMC/warp (is_motion_variation_allowed_bsize,
    blockd.h:1455) and interintra: none of those symbols is read now.

Tables: TX_16X4/TX_4X16 luma through the new TxbSet::LumaRect16x4Inter{,1}
(Luma8 coefficient tables, eob_pt_64, INTER tx_type at txsize_sqr_map =
TX_4X4 -> EXT_TX_SET_ALL16 / DCT_IDTX per blockd.h:1097-1106) and
SCAN_16X4/SCAN_4X16; chroma through the existing ChromaRect8x4.

The 2160p 10-bit AV1 film this lane tracks now decodes past the 1:4 partition
and stops one refusal deeper, at a SPLIT transform on a 16x4 strip
(sub_tx_size_map[TX_16X4] is the rectangular TX_8X4, which the square vartx
leaf list cannot express).

Gate a_real_aomenc_inter_sequence_with_16x16_level_1to4_partitions_decodes_
pixel_exact is committed FAILING: attempt 5 (8-bit, cq 34) fires 8 strips /
4 chroma pairs / 4 two-mv chroma pairs and desyncs in its last frame (8683
luma px, first at (96,59)). Frames 0-4 exact. See lanes/inter16ab-r2.report.md
-- this branch does not merge until that is closed.
test(av1): un-ignore the intra 1:4-in-inter gate on the merged tree, then re-ignore it on a MEASURED new blockerAhmet Kaan Gümüş · 9704835
test(av1): un-ignore the intra 1:4-in-inter gate on the merged tree, then re-ignore it on a MEASURED new blocker

Merging main 18bf7dc (lane-r14 a2e2e29) lifts the refusal r1 named, and the
gate goes from 0 to 3 of 40 attempts pixel-compared, one firing 64x16=4
16x64=3. All three mismatch -- but so do the two that fire ZERO 1:4 strips,
identically (frame 3/4 luma ~4k samples max |d| 6..17, then reference drift),
and --enable-1to4-partitions=0 re-encodes byte-identical. The blocker is a
pre-existing inter-frame defect of the mandelbrot gate source, not this path.
Gate unchanged and unweakened; only the #[ignore] reason is now the measured
one.
fix(av1): the compound 8x8 leaf voted its reference-frame CDFs off a hard-coded LAST_FRAME and cleared both per-slot is_global_mv_block flags -- entropy on the dual-filter/OBMC 8x8 stream is now range-exact end to endAhmet Kaan Gümüş · db58f21
fix(av1): the compound 8x8 leaf voted its reference-frame CDFs off a hard-coded LAST_FRAME and cleared both per-slot is_global_mv_block flags -- entropy on the dual-filter/OBMC 8x8 stream is now range-exact end to end

Two twin-function drifts in `decode_inter_block8`'s COMPOUND arm, both found by a
phase-by-phase diff against `decode_inter_block` plus an msac RANGE ladder vs the
instrumented aomdec (class twin-functions-drift, memory adjacent-same-typed-args):

1. `read_compound_ref_frames` was passed `LAST_FRAME` for any inter neighbour and
   `-1` otherwise -- the old "coarse LAST_FRAME-or-intra" approximation -- while the
   side bands have carried the neighbour's REAL reference per mi since lane-inter8 r2.
   Every `av1_collect_neighbors_ref_counts` vote (uni_comp_ref_p1, comp_ref,
   comp_bwdref, ...) came off the wrong CDF row: the first compound 8x8 leaf of the
   pinned 5-frame stream decoded (LAST, LAST2) where aomdec reads (LAST, GOLDEN).
   Now passes `above_ref0`/`left_ref0`, the same two args `decode_inter_block` passes.

2. The leaf's grid stamp wrote `is_global_mv0: false, is_global_mv1: false`
   unconditionally, while `decode_inter_block`'s compound arm computes libaom's
   PER-SLOT `is_global_mv_block` (blockd.h:421-429). A neighbour carrying the flag
   makes `setup_ref_mv_list` substitute the READER's global mv for the neighbour's
   stored one, so the next block's stack held a stored mv where libaom has the global
   candidate -- 3 entries vs libaom's 2 at the 8x8 leaf mi (8,8), a different mv and
   a desync one block later.

Also: the leaf's single-ref arm now prints the same per-entry `EC_STACK` ladder
`decode_inter_block` prints (that is how (2) was isolated).

Gate `a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact` stays
ignored, on a NEW and much smaller failure: the whole 16-frame stream now parses and
all 570 mode elements match aomdec's range line for line; what remains is a luma-only
reconstruction residue (|delta| <= 8) from decode frame 7.
fix(av1): a skipped sub-8x8 chroma block dropped its CfL alpha entirelyAhmet Kaan Gümüş · f4f89df
fix(av1): a skipped sub-8x8 chroma block dropped its CfL alpha entirely

Both sub-8x8 leaf paths (decode.rs:10554 4-leaf, :10916 2-leaf) passed
`None` for the CfL argument in their `skip_txfm` arm, so a chroma block
with `uv_mode == UV_CFL_PRED` and no residual reconstructed as flat DC.
libaom's `av1_predict_intra_block_facade` (av1/common/reconintra.c:1719)
calls `cfl_predict_block` whenever `mbmi->uv_mode == UV_CFL_PRED`;
`skip_txfm` only drops the residual, never the alpha.

Sweep of the class: every `reconstruct`/`reconstruct_rect` chroma call
site was checked for a literal `None` in the cfl slot -- the rect skip
arms (6015/6519/8078) already pass it, and the one remaining `None`
(20284) sits behind a refusal that forces `uv_mode == DC_PRED`.

Gate: a new pinned 1-frame 3840x1608 10-bit AV1 key frame fixture plus a
test that hard-asserts `skip_cfl_hits > 0` (the shape fires exactly once
in that frame; lane-reelckf r1 already burned 20 aomenc recipes hunting a
skipped sub-8x8 CfL block and never produced one, so a synthetic gate is
out of reach). Before the fix 463 bytes of that frame's chroma were
wrong; after it the frame is pixel-exact against ffmpeg.
Merge main 8e9ba81 (lane-reelckf 55532c7) into lane-kf900Ahmet Kaan Gümüş · 87836ae
Merge main 8e9ba81 (lane-reelckf 55532c7) into lane-kf900

Both chroma-reference-mi fixes kept: reelckf passes pair_mi at the sub-8 call
site, kf900 snaps mi_r/mi_c inside smooth_uv_neighbour -- idempotent together.
merge: main (85887c7) into lane-sb128cAhmet Kaan Gümüş · 350a0db
merge: main (85887c7) into lane-sb128c

No conflicts (auto-merge in decode.rs, stream.rs, gate_coverage.rs, mvstack.rs).
cdf.rs untouched by both sides. `cargo check -p ec-av1` clean on the merged tree.
Merge branch 'lane-reelckf' (55532c7): skipped CfL blocks still predict, and a 1:4 chroma pair reads its edge-filter type at the chroma-reference miAhmet Kaan Gümüş · cfef385
Merge branch 'lane-reelckf' (55532c7): skipped CfL blocks still predict, and a 1:4 chroma pair reads its edge-filter type at the chroma-reference mi

Two chroma defects found on real 1920x792 10-bit AV1 key frames, whose luma
was already bit-exact at every seek point:

1. A SKIPPED intra block whose uv_mode is UV_CFL_PRED must still PREDICT with
   the chroma-from-luma term. libaom predict_and_reconstruct_intra_block calls
   av1_predict_intra_block_facade unconditionally and guards only the residual
   on mbmi->skip_txfm. Three skip arms dropped the CfL term entirely
   (decode_rect4_16's 16x16-level 1:4 chroma pair, decode_leaf_split4 and
   decode_leaf_rect8's 4x4 groups); one key frame had 499 wrong chroma samples
   from this alone.

2. The chroma intra-edge FILTER TYPE of a 1:4 pair comes from the CHROMA
   REFERENCE position (libaom get_intra_edge_filter_type -> chroma_above_mbmi /
   chroma_left_mbmi), not from the closing strip: at the closing strip the cell
   above is the pair's own first strip, so the mi-exact UV map missed and the
   coarse fallback answered, flipping av1_use_intra_edge_upsample and moving
   directional chroma by +-1..3.

Gates:
* a_real_aomenc_sb128_stream_whose_skipped_cfl_and_1to4_chroma_pairs_decode_pixel_exact
  -- real aomenc --sb-size=128 --cpu-used=0 --enable-cfl-intra=1
  --enable-1to4-partitions=1, both bit depths, hard-asserts the directional
  1:4 chroma pair counter per compared attempt.
* a_real_film_key_frame_with_a_skipped_cfl_block_decodes_pixel_exact -- new
  tracked fixture crates/ec-av1/fixtures/reelc_kf2700.obu, a 1920x792 10-bit
  key frame truncated to one temporal unit; the only stream we have with a
  skipped UV_CFL_PRED block (48 aomenc recipes never produced one). The
  skipped-CfL counter is hard-asserted BEFORE the ffmpeg compare so an absent
  ffmpeg cannot make the gate vacuous.

gate_coverage: covers_both_depths also recognises `for depth in [8usize, 10]`,
which had classified such a gate as 10-bit only and hid --enable-cfl-intra=1
from the 8-bit never-exercised list; enable-cfl-intra leaves BOTH lists.
decode_probe prints the two new counters.

Lane suite: 379 passed, 0 failed, 33 ignored.
docs(lanes): worktree setup rules left uncommitted in main's tree by another laneAhmet Kaan Gümüş · 95b6784
docs(lanes): worktree setup rules left uncommitted in main's tree by another lane

Byte-identical to the same addition on lane-reelckf 55532c7; committed
separately so the merge does not overwrite an uncommitted working-tree edit.
fix(av1): an INTRA-coded 128x128 block inside an inter frame decodes; three 128-root defectsAhmet Kaan Gümüş · 3084278
fix(av1): an INTRA-coded 128x128 block inside an inter frame decodes; three 128-root defects

lane-sb128c r3.

- CLASS SWEEP (uv_mode alphabet): `is_cfl_allowed` is now decided inside the
  two readers every caller routes through -- `read_intra_mode_rect` (from
  `bw`/`bh`) and `read_intra_mode` (from `side`) -- instead of at each call
  site. Four call sites passed a hardcoded `true`; only the 128/64 ones were
  wrong, but the decision no longer lives where a new caller can get it wrong
  (class wrong-alphabet-same-value).
- The intra tail of `decode_inter_block` now codes its chroma per 64x64 mu
  chunk (TX_32X32 units, offset-10 `txb_skip` rows, per-unit
  `record_mi_chroma`), exactly as the inter half does; the refusal
  "an INTRA-coded 128x128 block inside an inter frame" is gone.
- `read_block_tx_size`'s TX_MODE_LARGEST early return produced four TX_64X64
  luma leaves for INTER 128 blocks only; an intra 128 block resolves the same
  way and got a single 128-wide unit that codes nothing.
- `get_tx_size_context` compares against `tx_size_wide[max_txsize_rect_lookup]`
  (64 at BLOCK_128X128), never the block's own 128 side.
- The inter tile's 128 PARTITION_NONE root passed its `at` in SUB16 units to a
  callee that takes MI, so every 128 root except the first decoded at a quarter
  of its position; and the `inter_piece!` macro hardcoded `reject_residual =
  true`, which refused the square 128 root at its first non-skip block.

Gate `a_real_aomenc_inter_128x128_none_root_decodes_pixel_exact` is un-ignored
and RED: all three arms now decode all 9 frames with no refusal (recipe moved
to --min-partition-size=64; at 32 two arms stop on other lanes' AB refusals),
but display frame 2 differs in 98 luma px in a band at x=58..66 spanning the
frame height, plus scattered chroma -- a reconstruction/loop-filter residue at
the 128 root's internal 64-px edge, not an entropy desync (9 frames stay in
sync). See lanes/sb128c-r3.report.md.
docs(sbrect10): r3 report -- three reds, two causes, suite 378/0Ahmet Kaan Gümüş · 0ecdfcb
docs(sbrect10): r3 report -- three reds, two causes, suite 378/0

film_grain was the worktree's missing top-level `fixtures` symlink (gitignored,
per-worktree), not a temp-path race: that gate writes no temp file, and the two
helpers that do already key their scratch dir on test-name + pid.

The other two reds were one cause: r2's half-random lavfi source was written
into the superblock-rect gate instead of the no-CFL uv_mode gate it was measured
for. The CFL gate kept the flat source that codes the right half skip (8-bit
arm: 0 intra blocks above 32x32) and the rect gate lost its 10-bit 64-axis
residual TU. Sources swapped back; no assert weakened. Both gates now fire at
both depths (15/43 no-CFL uv_mode reads, 2/2 64-axis residual TUs, zero
out-of-scope mismatches), which also clears r2's comp_list global-motion tail
fill of any regression suspicion.
fix(av1): a same-size reference at a height that is not a multiple of 8 was refused, and loop restoration ran over the mi-rounded plane instead of the cropped oneAhmet Kaan Gümüş · 570d099
fix(av1): a same-size reference at a height that is not a multiple of 8 was refused, and loop restoration ran over the mi-rounded plane instead of the cropped one

Two true-size-vs-mi-rounded defects (class av1-truesize-lane), both found by
the (192,68)/(68,192) straddling arms lane-golomb r7 measured but could not add.

1. decode.rs `decode_inter_frame_tile_with_cdfs` compared the reference
   picture's height against `true_height = mi_rows * 4` (the mi-rounded
   size). A decoded `Picture` is cropped to the header's `fh`, so for any
   height that is not a multiple of 8 (68 -> mi_rows 18 -> 72) this compared
   68 against 72 and refused EVERY same-size reference by name ("a reference
   picture whose height does not match this frame's own true size"). libaom
   compares references on the CROPPED dimensions --
   `av1_setup_scale_factors_for_frame(&sf, ref->y_crop_width,
   ref->y_crop_height, cm->width, cm->height)` -- and calls a reference
   scaled only when those differ. Height must still match: AV1 superres never
   scales height. MEASURED: with `arms.push((192, 68, 5, false))` all eight cq
   attempts refused before this commit; after it none do (they now stop at
   another lane's inter SB-level AB partition, or reach a compare).

2. `apply_loop_restoration` passed each plane's `true_width`/`true_height`.
   LR is the one post-decode filter that does NOT walk the mi grid: libaom
   sizes every plane with `av1_get_upsampled_plane_size`
   (av1/common/restoration.c:47), asserts it equals the buffer's crop width
   (restoration.c:1106) and extends the border from that cropped edge
   (restoration.c:1109) before filtering. Deblock and CDEF do walk the mi
   grid, which is why this went unnoticed until a non-multiple-of-8 size.
   NOT exercised by any gate here: every straddle gate recipe runs
   `--enable-restoration=0`. Source-cited only.

edge32 gate stays green on the merged tree: 38 pixel-exact attempts, 64-level
edge bits [horz_or_vert=7 split=197] right-VERT=7, 2 named refusals, all eight
cq levels at both depths.
docs(r14): r4 report -- main merge (no conflicts, cdf.rs identical), firing assert restored as a hard 8-bit assert, film-depth regression attributed to main; suite 372/0/32Ahmet Kaan Gümüş · 5677085
docs(r14): r4 report -- main merge (no conflicts, cdf.rs identical), firing assert restored as a hard 8-bit assert, film-depth regression attributed to main; suite 372/0/32
Merge main 85887c7 (lane-mvtwin, lane-sb128b) into lane-kf1200Ahmet Kaan Gümüş · 28188f3
Merge main 85887c7 (lane-mvtwin, lane-sb128b) into lane-kf1200

Clean auto-merge; cdf.rs byte-identical to main's. The r1 pair-mi
chroma edge-filter fix at decode.rs:7736 and its counter survive.
docs(sb128c): r2 handoffAhmet Kaan Gümüş · 2617a22Browse files