forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on e4a75c61d6ebdfe37b84d3a74b82d5f0a7c13cd8

2026-09-02

2026-09-01

test(av1): the 32x32-level 1:4 gate fires and is pixel-exact -- 8-pixel bands, not gradientsAhmet Kaan Gümüş · 3e19c89
test(av1): the 32x32-level 1:4 gate fires and is pixel-exact -- 8-pixel bands, not gradients

r3 lifted the "a 32x32 partition type this decoder does not code (value=8)"
refusal with its gate #[ignore]d because no gradients-derived fixture ever made
aomenc's RD pick a 32-level HORZ_4/VERT_4 (class refusal-lifted-without-a-gate).
The content those shapes win on is 8-pixel BANDS: a 32x8 strip is flat, a 32x16
one straddles two bands, so HORZ_4 beats HORZ and SPLIT; a noise layer with an
explicit seed keeps the flat bands out of screen-content mode. Measured 16
HORZ_4 / 24 VERT_4 strips per frame at both bit depths.

Gate un-ignored unchanged in its asserts: 8-bit 7/8 attempts pixel-exact
(64 HORZ_4 + 72 VERT_4 + 136 coded strips), 10-bit 5/8 (48 + 48 + 96), zero
attempts out of scope, zero mismatches, refusals all named. gate_coverage:
enable-1to4-partitions leaves NEVER_EXERCISED_10BIT.

decode_probe now prints the rect4_32 counters (via stream::rect4_32_counters),
which is how the fixture search was measured rather than reasoned about.
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).
chore(av1): cherry-pick lane-rectsplit r4 (7b55227) -- base_ctx generating rule + SB split-tx per-TU strips; r2's nz_map test dropped for r4's whole-domain oneAhmet Kaan Gümüş · 30e5597
chore(av1): cherry-pick lane-rectsplit r4 (7b55227) -- base_ctx generating rule + SB split-tx per-TU strips; r2's nz_map test dropped for r4's whole-domain one
fix(av1): SB-level 1:4 gate is GREEN on current main -- plus two main-red pins (nz_map test read the abandoned transposition, 1:4 coverage hole closed)Ahmet Kaan Gümüş · 7820978
fix(av1): SB-level 1:4 gate is GREEN on current main -- plus two main-red pins (nz_map test read the abandoned transposition, 1:4 coverage hole closed)

r1's red 16x64 gate was a STALE BASE, not a defect: rebasing lane-tx64x16 from
dc5553f onto main (5811ec5 -> 6d86d3a) turns
`a_real_aomenc_stream_with_a_superblock_level_1to4_partition_decodes_pixel_exact`
green with no change to the 1:4 wiring, and the r1 suite's "17 failures" drop to
2, neither of them this lane's:

- `decode::tests::nz_map_ctx_offset_tables_match_the_rect_rule` (RED on main,
  not on this branch's diff): the test read `NZ_MAP_CTX_OFFSET_32X64/_64X32` as
  `[col][row]` (lane-rectsplit r2's column-major premise, later disproved and
  reverted) while the tables and their only real consumer -- `base_ctx`'s
  `TxClass::TwoD` arm, decode.rs:1829 -- are display-major `[row][col]`. Read in
  the consumer's order; table content untouched, so every merged rect gate keeps
  the reading it is green under.
- `gate_coverage::tests::never_exercised_8bit_matches_the_gate_recipes`: this
  lane's gate passes `--enable-1to4-partitions=1` at 8 bit, so the 8-bit hole is
  retired; the 10-bit entry stays and now says so.

Rebase conflicts resolved keeping BOTH SB partition arms (main's AB arms from
part32 r4 and this lane's HORZ_4/VERT_4), with `reduced_tx_set` threaded into
the 1:4 `decode_block_rect64` calls; the unreachable `_` arm now refuses an
out-of-range partition value instead of the (now coded) 1:4 pair.
feat(av1): 1:4 partitions at 64x64 (TX_64X16/TX_16X64 luma, 32x8/8x32 chroma) -- wiring lands, gate still REDAhmet Kaan Gümüş · 1dd6e1e
feat(av1): 1:4 partitions at 64x64 (TX_64X16/TX_16X64 luma, 32x8/8x32 chroma) -- wiring lands, gate still RED

PARTITION_HORZ_4/VERT_4 wired at the superblock level (four 64x16 / 16x64
strips, libaom's quarter_step + frame-edge break), decode_block_rect64
generalised from a hardcoded 32x32 luma corner to bw.min(32) x bh.min(32),
and the two new chroma scans SCAN_32X8/SCAN_8X32 transcribed from libaom's
column-major default_scan_32x8/8x32 (conversion validated by reproducing the
existing SCAN_16X8 first -- libaom's default_scan_16x8 literal equals this
repo's SCAN_8X16, so a naive copy installs the transpose).

No new CDF table is owed: av1_get_adjusted_tx_size maps TX_64X16->TX_32X16,
get_txsize_entropy_ctx and txsize_log2_minus4 agree for both pairs
(TX_64X16 == TX_32X16, TX_32X8 == TX_16X16), av1_scan_orders gives TX_64X16
default_scan_32x16, and av1_nz_map_ctx_offset[TX_64X16] IS
av1_nz_map_ctx_offset_32x16. The transform primitives were already generic
(charter premise was stale): inverse_transform_2d_typed_wh already zeroes
past 32 on a 64 axis, already skips the sqrt2 scale at 4:1, and
row_shift_wh already matched inv_shift_64x16/inv_shift_32x8.

The gate (a_real_aomenc_stream_with_a_superblock_level_1to4_partition_...)
FAILS: seed 73's four real 16x64 VERT_4 strips mismatch ffmpeg (10754 luma
samples, first at (64,56), across the deblock edge above the strips), stream
pinned at crates/ec-av1/fixtures/tx64x16-vert4-mismatch-seed73.obu. The
skip-case VERT_4 decodes pixel-exact. Refusal string narrowed but NOT proven
lifted -- see lanes/tx64x16-r1.report.md for the ruled-out list and the
pre-existing seed-55 defect this recipe also exposes.
docs(inter8): r3 report -- 10-bit desync pinned to the leaf's post-mv mode info, tile-band audit, two ablated candidatesAhmet Kaan Gümüş · 1c02f8f
docs(inter8): r3 report -- 10-bit desync pinned to the leaf's post-mv mode info, tile-band audit, two ablated candidates

Suite on this branch: 270 passed / 0 failed / 25 ignored.
Merge branch 'lane-hbdgates': 10-bit gates for filter/smooth/paeth intra, intra-edge-filter, rect+ab partitions; ten_bit_tool_gate driver; gate_coverage drops ignored gates (279/0/24 on branch); 10-bit LR gate un-ignored on the merged treeAhmet Kaan Gümüş · 8c9548c
Merge branch 'lane-hbdgates': 10-bit gates for filter/smooth/paeth intra, intra-edge-filter, rect+ab partitions; ten_bit_tool_gate driver; gate_coverage drops ignored gates (279/0/24 on branch); 10-bit LR gate un-ignored on the merged tree

NEVER_EXERCISED_10BIT keeps the union of both removals: main's three
(restoration, dist-wtd-comp, global-motion, closed by lane-hbdinter and
lane-cwarp) and hbdgates' six (filter/smooth/paeth intra, intra-edge-filter,
rect and ab partitions). gate_bodies()/is_ten_bit() take hbdgates' versions
(ignored gates excluded, helper-built recipes recognised).

a_real_aomenc_10bit_restoration_stream_decodes_pixel_exact was #[ignore]d on
the branch because hbdgates' base lacked main's 10-bit LR fix (SGR box-sum
scaling, Wiener clamp). On the merged tree it passes 16/16 attempts
pixel-exact, lr_hits=28, so the #[ignore] is removed.
fix(av1): revert r2's nz_map transposition -- it regressed the merged SB HORZ/VERT partition gate; SB split-tx refusal restoredAhmet Kaan Gümüş · 429edc6
fix(av1): revert r2's nz_map transposition -- it regressed the merged SB HORZ/VERT partition gate; SB split-tx refusal restored

r3 ran the gates r2 never reached. r2's claimed root cause (base_ctx reading
the rect av1_nz_map_ctx_offset tables [row][col] instead of [col][row]) turns
the split-transform SB gate green at the cost of turning the MERGED gate
a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_decodes_pixel_exact
RED at seed 43. All four index/shape combinations measured; two fail both. The
real unknown is the orientation of (row,col) out of the square 32x32-corner
scan vs libaom's column-major coeff_idx, so the SB-level split-transform
refusal is restored and gate (b) is #[ignore]d again with that reason.

Kept from r2: per-attempt gate counters (no vacuous pass from a stream that
later refuses), the SB-interior-TU counter gate (b) asserts, the chroma shape
guard justification, gate (c)'s corrected recipe comment, the nz_map table
packing pin, and the EC_NZOFF_DUMP / decode_probe dump instruments.
feat(av1): localize the 10-bit 8x8-leaf desync to the leaf's post-mv mode info; tile-band auditAhmet Kaan Gümüş · aba325a
feat(av1): localize the 10-bit 8x8-leaf desync to the leaf's post-mv mode info; tile-band audit

lane-inter8 r3.

Instrumentation: `EC_MODE_VAL` in `decode_inter_block8`'s compound arm,
byte-format-identical to the oracle's rung-4 line, plus (in the oracle tree,
not in scripts/) `EC_MODE_MV` right after libaom's `assign_mv` and `stack=` on
its `EC_MODE_VAL`. With those, the 10-bit twin's first divergent element is
pinned: on the compound 8x8 leaf mi=(4,14) the entry range (37004) and the
post-mv range (57308) are IDENTICAL to aomdec, as are mode=20, ref0=1, ref1=4,
mv0=(0,-9) and mv-stack size 2. The divergence is strictly in the leaf's
post-mv mode info, where the only symbol aomdec reads for a compound 8x8 leaf
is read_mb_interp_filter -- which decode_inter_block8 never reads (it hardcodes
Regular, decode.rs:11181). Class symbol-consumption-gap. lane-gmaffine r3 owns
that read (0b8cb54); a cherry-pick onto this branch conflicts, so it is left to
merge from there rather than duplicated.

8-bit ladder re-measured: 57/57. 10-bit: 41/57.

Tile audit (lane-sub8 verifier's class warning): every reader of the
mi-granular inter bands guards tile-relative (zero `mi_r > 0`/`mi_c > 0` hits in
decode.rs; the leaf uses tile_row0_mi/tile_col0_mi), start_tile resets the above
mi bands over the tile's own mi column span, start_row resets every left mi
band. The `--tile-columns=1` gate arm added to prove it at runtime is RED for an
unrelated reason (128x64 makes aomenc code an SB-level rect partition on the key
frame: lane-sbpart's arm) and is ignored with that reason spelled out.
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.
feat(av1): superblock-level HORZ/VERT strips with a split transform -- root cause was a transposed nz_map ctx offset tableAhmet Kaan Gümüş · c936fdc
feat(av1): superblock-level HORZ/VERT strips with a split transform -- root cause was a transposed nz_map ctx offset table

r2's WIP (bf53652) built the SB-level per-transform-unit path and found the
real cause of r1's RED gate: av1_nz_map_ctx_offset is packed COLUMN-major, so
base_ctx read the TX_32X64/TX_64X32 offset tables [row][col] and desynced the
first SB-level strip with a coefficient below row 1. r3 ran the gates it never
reached: gate (b) 20/20 pixel-exact, SB-interior-TU delta 7; gates (a)/(c)
green; refusal_inventory + gate_coverage green. Relabelled gate (b)'s summary
line, which named the shared counter while asserting the SB-interior one.
test(av1): 10-bit gates for the seven tools only an 8-bit gate ever enabledAhmet Kaan Gümüş · 576f72d
test(av1): 10-bit gates for the seven tools only an 8-bit gate ever enabled

His two films are yuv420p10le, so a tool gated only at 8 bits is ungated where
it matters (lane-covbd r1). Six of the seven holes close with real-aomenc
10-bit streams, pixel-exact vs ffmpeg on every shown frame:

- a_real_aomenc_10bit_intra_tools_stream_decodes_pixel_exact -- filter-intra,
  smooth-intra, paeth-intra, intra-edge-filter on one key frame, a separate
  hard-asserted counter each (6/6 attempts exact; filter_intra_hits=2
  smooth_pred_hits=16 paeth_pred_hits=3 intra_edge_filter_hits=22).
- a_real_aomenc_10bit_rect_and_ab_partitions_decode_pixel_exact -- the 8-bit
  free-partition/AB inter recipe at 10 bits (12/16 attempts exact, 4 named
  refusals; rect_partition_hits=32 partab_hits=4).
- a_real_aomenc_10bit_restoration_stream_decodes_pixel_exact -- WRITTEN AND
  FAILING, so #[ignore]d with the pin in the attribute: seed 42, frame 0,
  plane Y index 122, ours 351 vs ffmpeg 350, on a stream where lr_hits=2.
  That is a real 10-bit loop-restoration defect for a follow-on lane; the gate
  is not weakened and enable-restoration stays a listed 10-bit hole.

intra.rs gains per-tool counters (smooth_pred_hits / paeth_pred_hits /
intra_edge_filter_hits) because smooth_uv_hits lumps SMOOTH..=PAETH together
and would have let a paeth-only stream "prove" smooth intra.

ten_bit_tool_gate() samples every counter PER ATTEMPT and sums only over
attempts that decoded AND compared, so a refused stream can never contribute a
firing; a pixel mismatch panics with plane + first-diff index + both values +
the firing deltas, never SKIPs.

gate_coverage: gate_bodies() now drops #[ignore]d gates (an ignored gate
exercises nothing) and recognises gates whose --passes=1 lives in the shared
10-bit helper; 45 -> 49 gates, 4 -> 7 ten-bit, NEVER_EXERCISED_10BIT 19 -> 13.
test(av1): gate the square intra path with tx-size search ON and real chroma; the chartered square-path chroma defect does not reproduceAhmet Kaan Gümüş · 213865e
test(av1): gate the square intra path with tx-size search ON and real chroma; the chartered square-path chroma defect does not reproduce

lane-rectsplit r1 recorded, in a comment on two live gates, that a plain
SQUARE-partition intra key frame with real chroma and aomenc's tx-size search
left at its default (ON) mismatches on the U plane, and guarded both gates with
`-vf hue=s=0`. Re-measured at HEAD, that is false: seeds 42..61 at cq 45 and at
cq 20, plus testsrc2/mandelbrot/smptebars/rgbtestsrc at cq 12/32, with and
without CFL and filter intra, all decode pixel-exact against ffmpeg on all three
planes (`--enable-rect-partitions=0`, the charter's own recipe). Seed 42 does
fire the pairing the defect was attributed to -- 6 blocks with `tx_depth != 0`
and uv_modes 0/1/2/5/11 -- and still matches.

So this ships the gate that was missing rather than a fix:
`a_real_aomenc_intra_stream_with_tx_size_search_and_chroma_decodes_pixel_exact`
sweeps 10 8-bit square streams (cq 20/40) plus one 10-bit stream of the same
recipe (his films are yuv420p10le; sequence-header bit_depth asserted before any
pixel compare), and hard-asserts a new `sq_chroma_tx_hits()` counter -- square
blocks whose luma transform split under a non-DC `uv_mode` -- summed only over
attempts that decoded AND pixel-compared, so a refusing stream cannot lend it
firings. 11/11 exact, 23 firing blocks 8-bit + 2 10-bit, 0 refusals.

The stale `hue=s=0` guard is dropped from both live rect gates (and the ignored
SB-strip one); both stay green with real chroma, so they now cover chroma too.
Merge branch 'lane-hbdinter': 10-bit loop restoration (SGR box sums scaled by bd-8, wiener clamp at the bd bound), combine_compound two-step rounding; 10-bit inter+LR gate (verifier PASS, 271/0/23); restoration leaves NEVER_EXERCISED_10BITAhmet Kaan Gümüş · b933555
Merge branch 'lane-hbdinter': 10-bit loop restoration (SGR box sums scaled by bd-8, wiener clamp at the bd bound), combine_compound two-step rounding; 10-bit inter+LR gate (verifier PASS, 271/0/23); restoration leaves NEVER_EXERCISED_10BIT

Also drops enable-dist-wtd-comp and enable-global-motion from
NEVER_EXERCISED_10BIT: lane-cwarp's 10-bit compound global-warp gate passes
=1 for both, so never_exercised_10bit_matches_the_gate_recipes was already
failing at 9c35ecc. gate_coverage is green again after this commit.

Conflict resolutions: warp.rs took main's (cwarp warp_inner/warp_affine_compound
is a superset of hbdinter's const BD -> bit_depth()); mc.rs kept hbdinter's
single (bd-8) diffwtd_mask round plus its combine_compound two-step and
inter_pred_hits counter; stream.rs kept main's encode_10bit_gradients helper
and cwarp gates plus hbdinter's a_real_aomenc_10bit_inter_sequence gate.
fix(av1): refuse bit_depth 12 in decode_stream -- twelve_bit parsed fine but warp REDUCE_BITS_HORIZ is a hard 3 (libaom needs 5 at bd 12), MC round_0/round_1 and wiener rounding change, CDEF/film grain ungated: a 12-bit stream decoded silently wrong; refusal + inventory entry + reachability testAhmet Kaan Gümüş · efb4f45
fix(av1): refuse bit_depth 12 in decode_stream -- twelve_bit parsed fine but warp REDUCE_BITS_HORIZ is a hard 3 (libaom needs 5 at bd 12), MC round_0/round_1 and wiener rounding change, CDEF/film grain ungated: a 12-bit stream decoded silently wrong; refusal + inventory entry + reachability test
fix(av1): a warp-capable frame under a scaled reference read the 3-symbol motion_mode_cdf where libaom reads the 2-symbol obmc_cdfAhmet Kaan Gümüş · cd8ea46
fix(av1): a warp-capable frame under a scaled reference read the 3-symbol motion_mode_cdf where libaom reads the 2-symbol obmc_cdf

libaom motion_mode_allowed (blockd.h:1484) drops WARPED_CAUSAL eligibility when
av1_is_scaled(block_ref_scale_factors[0]), so a superres block reads obmc_cdf.
We read motion_mode_cdf: the decoded value stayed SIMPLE_TRANSLATION, so nothing
errored -- the stream decoded "OK: 24 frames" with quietly wrong pixels from the
diverged coder state (frame 1: 1342 luma pixels off, growing to |d|=18 by frame
23). The existing warp refusal could not see it (warp_params is None there).

Gate: the superres gate now runs --enable-warped-motion=1 by DEFAULT and
hard-asserts scaled_warp_suppressed_hits() > 0 -- 12/12 pixel-exact, 25 blocks
took the obmc_cdf arm only because of this fix. decode_probe gains EC_PROBE_OUT
(raw yuv420p dump), the instrument that located it. Sibling site in
decode_inter_block8 is unreachable (refused earlier) and carries a note.
fix(av1): eob_pt CDF kept no TX_CLASS_HORIZ/VERT row above 8x8 -- a V_DCT 16x16 var-tx leaf read the 2D table and desyncedAhmet Kaan Gümüş · 5ec0940
fix(av1): eob_pt CDF kept no TX_CLASS_HORIZ/VERT row above 8x8 -- a V_DCT 16x16 var-tx leaf read the 2D table and desynced

libaom picks eob_multi_ctx = (tx_class == TX_CLASS_2D) ? 0 : 1 at EVERY
eob_pt table size (decodetxb.c:200); this crate carried the class-1 sibling
only for 4x4 and 8x8 luma. TxMode::Select made the hole reachable: a 32x32
inter block's var-tx leaf is a 16x16 luma TU, whose inter tx set
EXT_TX_SET_DTT9_IDTX_1DDCT is the only 16x16 set holding V_DCT/H_DCT.

Adds eob_pt_256_luma_class1 and the three chroma siblings (an inter block's
chroma TU inherits its luma unit's tx_type, so 1D classes reach chroma too),
their defaults from av1_default_eob_multi{256,64,16}_cdfs[q][plane][1], and
their per-frame counter resets. 32-point and larger need none (DCT_IDTX /
DCTONLY hold no 1D type).

Found by msac range ladder vs instrumented aomdec on r1's failing seed-43
stream: first divergent element is the eob of the 16x16 leaf at mi (4,8),
ref eob=248 rng=65032 vs ours eob=247 rng=56584 with identical all_zero and
tx_type ranges. All four frames of that stream are now pre-filter bit-exact.

Gate a_real_aomenc_inter_sequence_with_tx_select_decodes_pixel_exact is
green and gains a 10-bit arm (-b 10 --input-bit-depth=10); suite 269 passed
/ 0 failed / 23 ignored.
fix(av1): mi-granular inter neighbour bands + three 8x8-leaf context defects (8-bit 8x8-split gate GREEN)Ahmet Kaan Gümüş · cbf9f54
fix(av1): mi-granular inter neighbour bands + three 8x8-leaf context defects (8-bit 8x8-split gate GREEN)

lane-inter8 r2. `Neighbours`' inter side bands (skip, skip_mode, is_inter,
ref0/ref1, comp_group_idx, compound_idx, interp filter) were SUB(16px)-granular,
so all four 8x8 leaves of a split 16x16 shared one slot. They are now mi(4px)
granular (`record_inter_rect_mi` / `record_compound_ctx_rect_mi`, readers index
by mi), which makes the r1 `prev_leaves` sibling-override hack unnecessary --
each leaf stamps its own 2x2-mi span right after it decodes.

Two further defects that the granularity change exposed, both class
context-read-from-one-cell:

1. `decode_inter_block8`'s COMPOUND arm `return`ed before the end-of-function
   `record_mi`/`fill_lf_grid` the single-ref arm falls through to. Every leaf in
   the gate's stream is compound, so a split 16x16 left `above_side_mi` at 16:
   the 16x16 below it computed partition ctx 0 instead of 1 and read
   PARTITION_NONE where aomdec read PARTITION_SPLIT.
2. `get_comp_group_idx_context`/`get_comp_index_context` took the leaf's
   ENCLOSING 16x16 corner (`outer_at`); they now take mi coordinates and the
   leaf passes its own.

Also threaded the frame's temporal mv field (`tpl_frame`) into the leaf's two mv
stacks, which passed `None` while `decode_inter_block` one level up always
passed it (class parsed-then-discarded). Alignment only: it did not move this
stream's ladder (no `use_ref_frame_mvs` here).

Gate a_real_aomenc_inter_sequence_with_an_8x8_leaf_split_decodes_pixel_exact is
GREEN and un-ignored (4 frames pixel-exact vs ffmpeg, interior-split counter
asserted). aomdec EC_MODE ladder 42/57 -> 57/57. The 10-bit twin stays ignored:
it dies on "an INTER 32x32 partition type ... (value=9)", and `EC_TRACE=1
aomdec` proves that stream contains no value=9 anywhere -- our own desync
(class refusal-from-own-desync), disproving the r1 ledger line that blamed
aomenc for emitting PARTITION_VERT_4.
feat(av1): hidden-frame pixel oracle -- EC_AV1_FINAL_DUMP on both sides + the repo's first alt-ref gateAhmet Kaan Gümüş · 3f461cf
feat(av1): hidden-frame pixel oracle -- EC_AV1_FINAL_DUMP on both sides + the repo's first alt-ref gate

Every pixel gate here compared decode_stream's output against ffmpeg/aomdec
y4m, and both emit SHOWN frames only, so a hidden (show_frame=0) alt-ref
frame -- which his films are full of, aomenc's default --lag-in-frames --
was decoded, stored into a reference slot and never compared to anything
(class gate-blind-to-hidden-frames).

- scripts/instrument-aom-oracle.sh rung 12: EC_AV1_FINAL_DUMP=<prefix> in the
  instrumented aomdec -> <prefix>.f<N> per DECODED frame (decode order, hidden
  included), after CDEF+superres+loop restoration, i.e. the frame as stored
  into the reference buffer; Y/U/V crop-sized rows, 8-bit u8 / high bitdepth
  u16 LE (bit-depth correct, unlike the u16->u8 narrowing debug dumps).
- ec-av1 stream.rs: matching EC_AV1_FINAL_DUMP at the ref-slot store site,
  same layout; prefix from a thread-local (set_final_dump_prefix) falling back
  to the env var so a gate cannot race a sibling test's decode.
- test helper decode_all_frames_vs_oracle() + gate
  a_real_aomenc_altref_sequence_hidden_frames_decode_pixel_exact: aomenc
  --auto-alt-ref=1 --lag-in-frames=25 --arnr-maxframes=0 on moving content,
  8-bit and 10-bit, hard assert hidden >= 2, byte-exact per decode-order
  frame. Result: 43 frames / 3 hidden each depth, all pixel-exact.
  --arnr-maxframes=0 is load-bearing and measured: with libaom's temporal
  alt-ref filter on, the same recipe emits 0 hidden frames (vacuous gate).
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.
test(av1): gate coverage is per (tool x bit depth), not per toolAhmet Kaan Gümüş · 0810a85
test(av1): gate coverage is per (tool x bit depth), not per tool

Every 10-bit gate ran --enable-restoration=0, so the 10-bit loop-restoration
path was never exercised and two hbd defects (SGR box sums unscaled, Wiener
clamp at the 8-bit bound) survived the '10-bit bit-exact' milestone.
gate_coverage.rs now classifies each real-aomenc gate by bit depth and pins
NEVER_EXERCISED_8BIT (12) and NEVER_EXERCISED_10BIT (19) over a fixed
26-flag TOOL_UNIVERSE, with the same 'defaulted means unknown' rule: only an
explicit --enable-<tool>=1 in a gate of that depth retires an entry.
45 gates, 4 of them 10-bit.
test(av1): gate coverage is per (tool x bit depth), not per toolAhmet Kaan Gümüş · 969b81e
test(av1): gate coverage is per (tool x bit depth), not per tool

Every 10-bit gate ran --enable-restoration=0, so the 10-bit loop-restoration
path was never exercised and two hbd defects (SGR box sums unscaled, Wiener
clamp at the 8-bit bound) survived the '10-bit bit-exact' milestone.
gate_coverage.rs now classifies each real-aomenc gate by bit depth and pins
NEVER_EXERCISED_8BIT (12) and NEVER_EXERCISED_10BIT (19) over a fixed
26-flag TOOL_UNIVERSE, with the same 'defaulted means unknown' rule: only an
explicit --enable-<tool>=1 in a gate of that depth retires an entry.
45 gates, 4 of them 10-bit.
fix(av1): combine_compound folded two shifts libaom keeps separateAhmet Kaan Gümüş · cc39f29
fix(av1): combine_compound folded two shifts libaom keeps separate

libaom's `av1_highbd_dist_wtd_convolve_2d_c` (and its lowbd twin) applies a
TRUNCATING `>> DIST_PRECISION_BITS` to the weighted sum and only then
`ROUND_POWER_OF_TWO(.., round_bits)`. We folded both into `Round2(sum, 8)`,
which rounds one LSB high whenever `(sum >> 4) + 8` is one below a multiple
of 16 and the dropped low 4 bits are non-zero. Bit-depth independent (the
CONV_BUF round_offset cancels exactly in this crate's unbiased intermediate
domain), so it is a rare off-by-one at any depth -- raised by lane-cwarp's
measurement that 10-bit compound still mismatches frame 1 luma while
single-reference 10-bit is 6/6 exact. Unverified against that fixture.

cargo test -p ec-av1 --lib -j3 compound: 16 passed, 0 failed, 73.58s
(includes the real-aomenc 8-bit compound and masked-compound gates).
fix(av1): 10-bit loop restoration, diffwtd mask and warp all ran with 8-bit constantsAhmet Kaan Gümüş · 42752a0
fix(av1): 10-bit loop restoration, diffwtd mask and warp all ran with 8-bit constants

lane-hbdinter r1. The charter's premise (a 10-bit inter frame 2 mismatch)
did NOT reproduce with the tool-restricted inter recipe; widening the
recipe to real loop restoration did, and the defect turned out to be
bit-depth-wide, not inter-specific -- it fires on the KEY frame too, and
lane-hbd's 10-bit gate simply had `--enable-restoration=0`.

Four sites carried hardcoded 8-bit constants, all checked against the
oracle source (~/.cache/aom-oracle/src):

- restoration.rs `compute_ab`: libaom `restoration.c:660-662` scales the
  box sums back to the 8-bit range before forming `p`
  (`a = Round2(A, 2*(bd-8))`, `b = Round2(B, bd-8)`; `B[k]` keeps the raw
  sum). We never did -> wrong `z`, wrong blend factor at 10-bit. This is
  the site the gate attributes the mismatch to (ablation below).
- restoration.rs `apply_wiener_stripe`: the horizontal intermediate was
  clamped to a fixed `[0, 8191]`, i.e. `WIENER_CLAMP_LIMIT(3, bd=8) - 1`
  (`convolve.h:43`), in this crate's *unbiased* domain. Correct bounds are
  the libaom limit shifted down by its `1 << (bd + 3)` bias. At 8-bit
  neither end is reachable (which is why every 8-bit gate passed); at
  10-bit the top of the range is 16368, so most Wiener intermediates were
  truncated.
- mc.rs `diffwtd_mask`: libaom `reconinter.c:307` rounds the CONV_BUF
  difference by `INTER_POST_ROUND + (bd - 8)`; we used the constant 4.
- warp.rs `warp_affine`: `const BD: i32 = 8` fed both offset terms and the
  final `sum - (1<<(bd-1)) - (1<<bd)` (tip from lane-gmaffine, confirmed
  against `av1_warp_affine_c`).

Non-compound sub-pel MC needs no change: libaom only shifts round_0/round_1
when `bd + FILTER_BITS - round_0 + 2 > 16` (`convolve.h:83`), which is
12-bit only -- 10-bit keeps 3/11 and 3/7.

Gate: `a_real_aomenc_10bit_inter_sequence_decodes_pixel_exact` (stream.rs)
-- real aomenc yuv420p10le, 128x64, 16 frames, forward P frames, deblock +
loop restoration on, hard-asserting the new `mc::inter_pred_hits` counter,
`deblock_hits`, and a non-RESTORE_NONE LR filter, comparing all 16 frames
against ffmpeg's own 10-bit decode. Green with the fix; reverting only the
`compute_ab` scaling turns it red at frame 0 (V plane, sample 52: ours 289,
ffmpeg 288).

cargo test -p ec-av1 --lib: 268 passed, 0 failed, 23 ignored (664s).
feat(av1): per-reference GLOBAL warp on compound blocks (was silently translational)Ahmet Kaan Gümüş · e67ae7f
feat(av1): per-reference GLOBAL warp on compound blocks (was silently translational)

decode_inter_block's compound branch predicted both taps through
mc::predict_compound_intermediate; libaom runs av1_init_warp_params per
reference, so each ref of a GLOBAL_GLOBALMV block under a ROTZOOM/AFFINE
model is filtered through av1_warp_plane into the compound intermediate.
No refusal named this -- silently wrong pixels.

warp.rs: warp_affine split into warp_inner + store closure, hardcoded BD=8
replaced by crate::decode::bit_depth(), new warp_affine_compound
(av1_highbd_warp_affine_c's is_compound branch, unbiased to match this
crate's intermediate domain). mc.rs: diffwtd_mask's round was missing
libaom's (bd - 8) term. New gate a_real_compound_global_warp_stream_decodes_pixel_exact:
6/6 pixel-exact, compound_warp_hits=37. 10-bit arm ignored, blocked by a
pre-existing 10-bit compound MC defect (ablation in its doc comment).