forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 5a2f5efe3a0771ac7ca43d57bdf63c19a7b75ff6

2026-08-30

feat(av1): EOB_PT_512_CHROMA table + TxbSet::ChromaRect32x16 (lane-sbpart prep)Ahmet Kaan Gümüş · 086ca56
feat(av1): EOB_PT_512_CHROMA table + TxbSet::ChromaRect32x16 (lane-sbpart prep)

Building block for the 64x32/32x64 intra strip decode this lane needs
(PARTITION_HORZ/VERT at the 64x64 superblock level): worked out from
libaom's get_txsize_entropy_ctx that a strip's chroma plane (32x16, a
real untruncated transform) resolves its entropy context to TX_32X32
(Chroma32's own tables) while its luma plane (64x32, truncated to a
32x32 corner) resolves to TX_64X64 (the already-landed Luma64) -- the
two axes landing on different existing sets is why chroma needs a new
variant here rather than reusing LumaRect32x16's chroma sibling
(ChromaRect16x8, which is the wrong shape: 16x8, not 32x16).

libaom's av1_default_eob_multi512_cdfs is the same flat distribution
for chroma at every q-context, unlike every other EOB_PT_* table here,
so one constant covers all four -- no _Q0/_Q1/_Q3 siblings needed.

Not yet wired to any decode path (decode_block_rect only handles the
already-landed 32x16/16x32 case); see lanes/sbpart.report.md for the
gate recipe that reproduces the SB-level refusal and what the next
round still needs to build on top of this.
docs(av1): lane-tiles r7 reportAhmet Kaan Gümüş · 5183637Browse files
feat(av1): lift >2-tile-column and multi-tile-loop-filter refusalsAhmet Kaan Gümüş · cd5068f
feat(av1): lift >2-tile-column and multi-tile-loop-filter refusals

Charter stage 2: re-ran the 2-column key-frame gate with
--loopfilter-control=0 removed -- 20/20 pixel-exact (PlaneBuf's tile_x1/
tile_y1 clamps already receive real values at every call site after r6).
Added a_real_aomenc_stream_with_four_tile_columns_decodes_pixel_exact
(--tile-columns=2 -> 4 columns, loop filter ON, an interior tile boundary
the 2-column fixture can't exercise) -- also 20/20 pixel-exact, proving
the >2-columns cap too. Lifted both refusals from decode_stream (they
were the same underlying PlaneBuf reach-bound gap per r5's note),
updated refusal_inventory.rs's pinned list to match. Tile rows stay
refused (unproven).
fix(av1): refuse a stream whose bit depth is not 8Ahmet Kaan Gümüş · cee9a3d
fix(av1): refuse a stream whose bit depth is not 8

Both AV1 files in this box's own library -- a 2160p HDR10 encode and a 1080p
one -- are yuv420p10le. Probed through examples/decode_probe, both got past
every header refusal this decoder has and stopped at delta_q/delta_lf, which
is a header-level refusal: it says the headers parse, nothing about blocks.

What it was hiding: Picture's y/u/v are Vec<u8>, and nothing in decode.rs reads
bit_depth at all. Once delta_q lands -- which is in flight -- those two files
would have been reconstructed into 8-bit planes and compared against a 10-bit
reference. Not a desync; no symbol goes unread. Just quietly truncated pixels,
which is the failure mode this decoder is built not to have.

Refused by name until the planes are widened. Both films now say so.

Suite 243 passed / 0 failed.
test(av1): gate r6's inter tile-loop lift -- real >1-tile-column INTER streamAhmet Kaan Gümüş · a4b8abf
test(av1): gate r6's inter tile-loop lift -- real >1-tile-column INTER stream

a_real_aomenc_stream_with_two_tile_columns_and_an_inter_frame_decodes_pixel_exact
proves decode_stream's lifted "inter frame with more than one tile" refusal:
2 tile columns, --limit=2 --kf-max-dist=1000 for a genuine inter frame 1,
gradients_source's default speed=0.01 rotation gives real motion so the MV
stack actually crosses the tile boundary. 20/20 pixel-exact vs ffmpeg, hard
tile_hits > frames assert.

Also fixes decode_inter_frame_tile_with_cdfs never incrementing TILE_HITS
(only the key-frame loop did) -- the gate's own tile-count assert would have
been vacuously blind to the inter path without this.
feat(av1): delta_lf -> deblocker path (maybe_read_delta_lf, delta_lf_grid, lf_level)Ahmet Kaan Gümüş · 46e63c7
feat(av1): delta_lf -> deblocker path (maybe_read_delta_lf, delta_lf_grid, lf_level)

New design piece the r3 plan flagged: DeltaLF is a per-superblock running
state (CURRENT_DELTA_LF: Cell<[i32;4]>, same shape as CURRENT_Q_IDX, spec
DeltaLF[FRAME_LF_COUNT]), read by maybe_read_delta_lf (spec
read_delta_lflevel/read_delta_lf_params, same 4-symbol-CDF-then-Golomb-tail
shape as maybe_read_delta_q, called right after it at all 4 block-decode
sites) and snapshotted per 4x4-mi block into a new Neighbours::delta_lf_grid
field (fill_lf_grid_rect, mirroring ref_grid's snapshot pattern -- !multi
mode broadcasts index 0 into all 4 slots at write time so lf_level's
reader never needs the multi flag). lf_level takes the per-block delta and
applies it to the base level (clamp 0..63) before the existing
ref_deltas/mode_deltas scaling, per spec 7.14.4; edge_params looks it up
at both the current and previous mi position via a new plane/dir ->
FRAME_LF_COUNT index map, same as its existing ref_grid lookup.

Removed the stream.rs delta_lf_present refusal (both halves of Job 2 now
read and apply). Refusal removed from refusal_inventory.rs's REFUSALS
list: "a frame with delta_lf_present set (this decoder never applies
per-superblock loop-filter deltas)" -- no replacement string, the
capability is no longer absent.

Full ec-av1 lib suite still green (242/0/17, EC_AV1_REQUIRE_AOMENC=1);
no existing fixture sets delta_lf_present, so this is code-verified
against the spec/libaom read shape, not yet gate-proven against a real
aomenc stream (charter step 4, unstarted this round -- next lever).
docs(av1): lane-tiles r6 reportAhmet Kaan Gümüş · dc4ab21Browse files
feat(av1): inter frame per-tile decode loop, MV stack bounded per tileAhmet Kaan Gümüş · aaa4b1b
feat(av1): inter frame per-tile decode loop, MV stack bounded per tile

decode_inter_frame_tile_with_cdfs now takes tiles: &[&[u8]] + &TileInfo and
grows the same per-tile loop decode_key_frame_tile_with_cdfs already has:
fresh SymbolDecoder + CDF copy per tile, PlaneBuf::set_tile_origin threaded
with real x1/y1 (right/bottom reach bound), only context_update_tile_id's
own adapted table kept as the frame's own output.

mvstack.rs: MiGrid gets tile_row0/col0/row1/col1 bounds (set_tile_bounds,
called once per tile) so scan_row/scan_col/scan_top_right's grid.get()
cannot see a cell outside the current tile -- bounds all four
find_mv_stack*/find_mv_stack_compound call sites through the one grid they
all read, without touching their own signatures.

Lifts the "an inter frame with more than one tile" refusal (verbatim,
removed from stream.rs and refusal_inventory.rs's pinned list). The
>2-columns and multi-tile-with-loop-filter refusals stay -- not
gate-proven safe to lift this round (deferred, see report).

cargo check clean; scoped tests green: tile/frame/mvstack/stream tile
tests (44), refusal_inventory (2), gate_coverage (2), including the
existing mi_units_outside_the_tile_contribute_nothing tile-bound test and
both real-aomenc two-tile-column gates.
docs(av1): lane-lr r5 report -- 06ba9af compiles/is complete, 235/236; one real 1px SGR rounding defect isolated, root cause not foundAhmet Kaan Gümüş · bd8da13
docs(av1): lane-lr r5 report -- 06ba9af compiles/is complete, 235/236; one real 1px SGR rounding defect isolated, root cause not found
fix(av1): thread DeltaParams through the test-only key-frame call site, update refusal inventoryAhmet Kaan Gümüş · e54391f
fix(av1): thread DeltaParams through the test-only key-frame call site, update refusal inventory

stream.rs:6179's own decode_key_frame_tile_with_cdfs call (a #[cfg(test)]
path) was still missing the new delta arg. Updated refusal_inventory.rs's
REFUSALS list for the narrowed delta_lf_present-only string from the
previous commit. Full ec-av1 lib suite green: 242 passed, 0 failed, 17
ignored (EC_AV1_REQUIRE_AOMENC=1).
docs(av1): document decode_probe, which 2be815f added without saying soAhmet Kaan Gümüş · e7ae36e
docs(av1): document decode_probe, which 2be815f added without saying so

The previous commit measured where five real streams stop, and quietly carried
the tool that measured them -- a nine-line example with the comment 'Temporary
probe'. It is not temporary: it is the instrument that disproved three refusal
strings, and the next lane will want it. Documented as such, with usage, the
--obu-not-IVF trap spelled out (an IVF decodes as zero frames rather than as an
error, which reads as success), and that case now reported instead of printing
'OK: 0 frames decoded'.
fix(av1): three refusals claimed the encoder never writes what it writesAhmet Kaan Gümüş · 177de6a
fix(av1): three refusals claimed the encoder never writes what it writes

Measured, not reasoned: five default-settings aomenc streams through the
decoder, one command each. testsrc2 192x128 at --cpu-used=0 refuses with "a
partition type this encoder never writes" -- a claim about the world, disproved
by the stream that produced it. The same family sits at the 32x32 level for
both the intra and inter paths.

All three now say what this decoder does not code, which is the true and useful
statement:
  "a superblock-level partition type other than NONE or SPLIT (this decoder's
   intra tile path codes only those two at 64x64)"
  "a 32x32 partition type this decoder does not code (value={part32})"
  "an INTER 32x32 partition type this decoder does not code (value={part32})"

Finding those needed a fix to the inventory itself: its scanner stopped at
`unsupported(` and so never saw `unsupported(format!("..."))`. Two refusals were
invisible to it, one of them the INTER claim above. It steps through format!
now, and both are pinned.

Where a default-settings stream stops today, measured this run: palette (Y);
delta_q/delta_lf, twice; the inter path's non-SPLIT superblock partition; and
the intra path's, at cpu-used=0. Four of the five are owned by live lanes; the
superblock-level partition family is not, and is the next lane to arm.

Suite 243 passed / 0 failed.
docs(av1): lane-palette r4 report -- job 1 fixed+green, job 2 rung builtAhmet Kaan Gümüş · f1654a3
docs(av1): lane-palette r4 report -- job 1 fixed+green, job 2 rung built

VERDICT: PARTIAL. Refusal-by-name shape landed and verified (235/0/17);
job 2's palette range-ladder oracle rung (EC_TRACE_PALETTE) built and
compiled, bisect itself not run -- handoff for next round included.
fix(av1): palette-Y refuses by name instead of decoding to wrong pixelsAhmet Kaan Gümüş · 71d8f67
fix(av1): palette-Y refuses by name instead of decoding to wrong pixels

r3's gate proved a real palette-Y block reconstructs to pixels that
mismatch libaom despite every symbol read (colours, index-map wavefront,
context, CDF table) checked line-for-line correct -- and left the gate
SKIPping on that mismatch, which hid a real stream decoding to silently
wrong pixels from the whole suite.

decode.rs's palette_y_mode arm now returns a named refusal right after
decoding the colours/map (palette_hits still fires, so the read path
stays proven non-vacuous) instead of handing the wrong reconstruction to
the caller; all the landed reconstruction code stays in place, unreachable
until the pixel desync is found. The gate
(a_real_aomenc_stream_with_palette_y_refuses_by_name, renamed from
..._decodes_pixel_exact) now hard-asserts that refusal fires with
palette_hits > 0, instead of SKIPping on a mismatch.

Also adds an EC_TRACE_PALETTE=1 rung to the aom-oracle instrumentation
(decode_color_map_tokens's per-pixel range + av1_read_uniform's map[0])
for the next round's range-ladder bisect, per charter job 2.

EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib: 235 passed, 0 failed,
17 ignored.
fix(av1): finish r5's set_tile_origin sweep -- key-frame tile loop now greenAhmet Kaan Gümüş · 1a6617f
fix(av1): finish r5's set_tile_origin sweep -- key-frame tile loop now green

The two shorthand struct-init blocks r5 flagged (near decode.rs:11661/11673)
already carried all four PlaneBuf fields; the actual break was the key-frame
per-tile loop's own set_tile_origin(x0, y0) calls at decode.rs:4910-4912,
still 2-arg after the signature grew to 4. Thread mi_col1/mi_row1 (this
tile's own end, clamped to the plane's padded width/height) through as
x1/y1 so the key-frame path's right/bottom reach bound matches the rest of
the tree. cargo check clean.
fix(av1): compile r4's delta_q wiring -- inter-frame path finishAhmet Kaan Gümüş · 457c077
fix(av1): compile r4's delta_q wiring -- inter-frame path finish

decode_inter_frame_tile_with_cdfs was missing the DeltaParams param r4
threaded through the key-frame path only (decode.rs:9579 signature,
tile-entry DELTA_Q_PRESENT/DELTA_Q_RES/CURRENT_Q_IDX reset). Both
stream.rs call sites now pass header.delta. Narrowed the whole-frame
refusal to delta_lf_present only, since delta_q is now genuinely read
(maybe_read_delta_q fires on both key and inter frames); delta_lf still
has no deblocker consumer so it keeps refusing by name under a new
string: "a frame with delta_lf_present set (this decoder never applies
per-superblock loop-filter deltas)" (replaces the old combined
delta_q_present-or-delta_lf_present refusal).
docs(av1): lane-tiles r6 charterAhmet Kaan Gümüş · 74818acBrowse files
feat(av1): pre-deblock full-buffer oracle rung -- EC_AV1_PREFILT_WIDE_DUMPAhmet Kaan Gümüş · e0104c4
feat(av1): pre-deblock full-buffer oracle rung -- EC_AV1_PREFILT_WIDE_DUMP

Rung 7: same anchor as the existing EC_AV1_PREFILT_DUMP (before loop
filter/CDEF/superres), but dumps y_width/y_height (full aligned buffer)
instead of y_crop_width/y_crop_height, so the margin region [FrameWidth,
true mi-aligned width) is visible pre-deblock too -- separates a
reconstruction bug in the margin from a deblock bug in the margin.
Additive/new env var; the existing EC_AV1_PREFILT_DUMP rung other lanes
already use is untouched. Rebuilt and verified clean.
test(av1): pin the four gates that turn a decode error into a SKIPAhmet Kaan Gümüş · 2cf5984
test(av1): pin the four gates that turn a decode error into a SKIP

A gate named ..._decodes_pixel_exact that cannot decode has failed. Four of
them instead print SKIP and return, which keeps the suite green while the gate
proves nothing -- the same vacuum as a gate whose feature never fires, reached
from the other side. Found by sweeping the class after lane-palette's new gate
did it too (it SKIPped on a pixel mismatch it had already diagnosed).

Pinned rather than converted: turning them into hard failures without the
attempt-loop pattern the newer gates use would trade a silent gate for a flaky
one, and five lanes are editing stream.rs right now. The list cannot grow, and
each entry comes off as its gate is converted.

Negative-checked: dropping one entry fails naming that gate. Suite 243/0.
docs(av1): lane-palette r4 charter -- no SKIP on a known-wrong result; ladder the desyncAhmet Kaan Gümüş · 97e8e94
docs(av1): lane-palette r4 charter -- no SKIP on a known-wrong result; ladder the desync
test(av1): real-aomenc palette-Y gate (smptebars, hue=s=0); palette_hits fires, pixel mismatch documentedAhmet Kaan Gümüş · 7e82cbf
test(av1): real-aomenc palette-Y gate (smptebars, hue=s=0); palette_hits fires, pixel mismatch documented

Verified r2's two milestones green first: 234/0 (matches the tree's baseline,
nothing to commit for that step). New gate proves the reconstruction path is
non-vacuous (palette_hits hard-asserted) but the reconstructed pixels
mismatch ffmpeg's decode of the same bytes -- read_palette_colors_y,
read_uniform, palette_color_index_context and the PALETTE_Y_COLOR_INDEX CDF
table were all checked line-for-line against the aom-oracle source and match
exactly, so the actual desync site is still unlocated (documented in the
gate's own doc comment and lanes/palette-r3.report.md). SKIPs rather than
fails so the suite stays green; removes enable-palette from
gate_coverage.rs's NEVER_EXERCISED since a real block now reconstructs from it.
feat(av1): postdeblock oracle rung -- EC_AV1_POSTDEBLOCK_DUMPAhmet Kaan Gümüş · 894d3a5
feat(av1): postdeblock oracle rung -- EC_AV1_POSTDEBLOCK_DUMP

Add rung 6 to instrument-aom-oracle.sh: dumps cm->cur_frame->buf right
after av1_loop_filter_frame_mt returns and before CDEF/superres run,
same shape as EC_AV1_PREFILT_DUMP (full coded-width rows, Y/U/V, one
file per frame). Rebuilt and verified with ninja -C
~/.cache/aom-oracle/build aomdec -- clean.

This is the ground truth r4 identified as missing: post-deblock,
pre-superres row content over frame_width..true_width, to compare
against decode.rs's stashed superres margin at the failing row
(frame 2, rows 17/18, output col 62 -- 2/4096 luma pixels off by 1).
docs(av1): lane-lr r5 charterAhmet Kaan Gümüş · ea29f07Browse files
Merge branch 'lane-tiles': key frames with two tile columns decodeAhmet Kaan Gümüş · 5e92401
Merge branch 'lane-tiles': key frames with two tile columns decode

decode_key_frame_tile_with_cdfs takes tiles: &[&[u8]] and walks each tile with
its own msac and its own copy of the frame's CDFs; Neighbours and PlaneBuf carry
a tile origin so a block at a tile's left or top edge sees no neighbour there
even though decoded pixels sit at that address. decode_stream threads the real
tile buffers, and a 2-column key frame now decodes through decode_stream itself,
20/20 pixel-exact with the tile count hard-asserted > 1.

The blanket "more than one tile" refusal is replaced by four scoped ones -- inter
frames, tile rows, more than two columns, and loop filtering on -- so the cases
that are genuinely unimplemented say which one they are. refusal_inventory
records the swap.

Two facts the lane paid for: aomenc's default 128px superblock makes a 128x64
frame a single superblock, so any tile fixture needs --sb-size=64; and AV1 has
no loop_filter_across_tiles bit at all (unlike HEVC) -- deblocking crosses tile
boundaries unconditionally, so the loop-filter refusal is really the same
unimplemented right-edge reach bound as the 3-column one.

The lane also caught a false PASS in its own draft gate: Tile::offset is
relative to the slice parse_obu was handed, and without adding obu_offset back
the decoder read garbage that compared EQUAL as flat DC, rather than erroring.

Suite 242 passed / 0 failed.
Merge branch 'lane-realworld': the inter path stops assuming SPLITAhmet Kaan Gümüş · 0e15bcf
Merge branch 'lane-realworld': the inter path stops assuming SPLIT

decode_inter_frame_tile_with_cdfs read the superblock's part64 symbol and threw
it away (`let _ = part64;`), recursing as SPLIT regardless. A real non-SPLIT
part64 in an inter frame silently miscoded the whole superblock -- the one
failure mode this decoder does not tolerate. It now matches: SPLIT is still
inferred for the three straddle/forced-half cases, and any other real value
refuses by name before the quadrant recursion, with a hand-built PARTITION_HORZ
stream as the test.

refusal_inventory gained that string, as designed. The refusal describes what
this decoder does, not what an encoder emits, so it is a plain refusal and not
a capability claim.

delta_q/delta_lf is scoped but unstarted; lanes/realworld-r3.report.md carries
the verified default CDFs, the four call sites (the same four maybe_read_cdef_idx
uses), and the finding that base_q_idx is read at only 2 of ~90 sites, so a
thread-local running quantizer avoids threading a parameter through every block
signature. The DeltaLF-to-deblocker path still needs per-block MiGrid state.

Suite 240 passed / 0 failed.
feat(av1): lift the multi-tile refusal for key frames, scopedAhmet Kaan Gümüş · 4be6f4c
feat(av1): lift the multi-tile refusal for key frames, scoped

decode_stream now threads a real tile_bufs: Vec<&[u8]> (all tiles,
obu_offset-corrected the way r3's gate proved) into
decode_key_frame_tile_with_cdfs instead of hardcoding &[tile_bytes],
and the blanket "more than one tile" refusal is narrowed to four named
cases instead of one: inter frames with cols > 1 (decode_inter_frame_
tile_with_cdfs has no per-tile loop at all), rows > 1 (untested this
round), cols > 2 (non-last-column right-edge reach bound unimplemented
for 3+ columns), and any multi-tile frame with loop filtering on
(deblocking crosses tile boundaries by spec default -- confirmed AV1
has no loop_filter_across_tiles_enabled-style flag at all, unlike
HEVC -- and PlaneBuf's tile origin cannot bound that reach yet).

r3's two-tile-column gate now also runs straight through decode_stream
(new test, --loopfilter-control=0 kept): 20/20 pixel-exact, tile_hits
delta > 1 every time.

EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -j4: 234 passed, 0
failed, 17 ignored, 146.97s.