forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to lanes/av1subsizesweep.report.mdClear filter

2026-10-01

lane-av1subsizesweep r2: a real witness, a derived read-spelling scan, a scoped censusAhmet Kaan Gümüş · bee9cbf
lane-av1subsizesweep r2: a real witness, a derived read-spelling scan, a scoped census

Main's r2 review was right on all counts. Fixed, plus the three items still
open from r1.

WITNESS. There is one, and the earlier "no witness exists" claim was wrong.
422_header_edge16_walk.obu (128 bytes) is a 4:2:2 sequence header over a 4:2:0
key frame's tile at 88x64. Width 88 is 8 mod 16, so the last 16x16 column block
is column-short and the frame-edge arm fires; height 64 is 16-aligned, so the
both-cut arm is not taken. aomdec says:

    Block size 8x16 invalid with this subsampling mode

and so do we. What makes this pin different from every other refusal gate here
is that the 8x16 is the ONLY offending subsize in the stream: over a
260-candidate sweep (4 card textures x 5 quantizers x 13 declared widths) it is
the one candidate whose decode with the guard DELETED SUCCEEDS -- the decoder
returned a full 88x64 picture where libaom refuses the frame. So the guard is
load-bearing, not a redundant second refusal, and the new gate reds when it is
deleted.

The witness had to be built from this crate's own encoder with a DECLARED width
(encode_key_frame_at_size, the gen_coverage_cells cell-2 construction): aomenc
rounds the coded size to even and never declares 88. That also corrects the
report: my earlier `partition_rect_allowed` explanation for the aomenc non-hit
was WRONG -- that gate governs the encoder's partition search, whereas this
arm's partition comes from a single gathered bit after a frame-edge geometry
test. Why aomenc never produces the shape is not known. Severity is a
false-accept, not a pixel divergence: libaom refuses the whole frame, so there
is no correct output to diverge from.

MATCHER GAP WIDENED, AND DERIVED. A partition-symbol READ is now defined as a
`dec.<name>(..)` call whose OWN ARGUMENT LIST names a `partition_w<N>[` CDF.
That needs no hand-list: `dec.symbol(..partition_w..)` qualifies, the frame-edge
gather's `dec.symbol_fixed(&gather(..partition_w..))` qualifies, and
`dec.debug_state()` does not. The old test's read test was the literal
`dec.symbol(`, which is not a substring of `dec.symbol_fixed(` -- that spelling
gap is what hid the hole. The `var == "b"` skip is gone too: edge reads are
sites now and must carry a guard for their own level before the first
chroma-walking dispatch after them. Stated limitation: the definition is
syntactic, so a read reaching a partition CDF through a helper that does not
name it would not be enumerated; there is no such call in this file.

CENSUS ROWS NOW CLAIM A REAL GUARD. r2 was right that AtResolution asserted only
that some shape was BLOCK_INVALID and never mentioned a guard, so rows 5-12 and
19's guard column were prose. A resolution row now CARRIES the guard it depends
on -- (function scope, level) -- and the check looks for
refuse_invalid_subsize((L,L)) inside that function and before the walk's first
call there. Per-guard deletion now reds the census on its own for ten of the
twelve guards. Two are claimed by LEVEL, not by site -- the key-frame 8x8 second
resolution and the inter decoder's own 128-root -- and are caught instead by the
merged scan's resolution-count cross-check; the report says so rather than
papering over it. Three inter rows were added, because the inter 32- and
64-level guards were previously claimed by nothing at all.

ORDERING CHECK NO LONGER VACUOUS. The per-route loop resolved each pair's guard
with find() over the whole decode body, which returns the FIRST 16x16 guard --
the key-frame one -- so the inter pair was satisfied by a guard three quarters
of the file away and deleting the inter guard left it green. Each pair now
scopes its guard search to its own enclosing function. Verified: deleting the
inter 16-level guard at 54809 reds naming decode_intra_rect_in_inter.

ALSO: the stale inter-edge citation (54720/54733 -> the reads, 54777/54790), a
one-line note that two edits leaked into the primary through relative paths and
were reverted before any commit, and the headline that the find came from
censusing WALK sites rather than SYMBOL sites -- that reframing is the only
reason the hole was visible.

cargo check --tests clean. 28 named 422/sub8/subsize/chroma_422 tests pass
(includes the new witness gate). 270 pixel_exact/byte_exact pass, which is the
over-refusal control at scale.
lane-av1subsizesweep: census every chroma-plane walk a BLOCK_INVALID subsize reachesAhmet Kaan Gümüş · 67c524e
lane-av1subsizesweep: census every chroma-plane walk a BLOCK_INVALID subsize reaches

Closes the residue lane/av1unwritten named, and finds a wider one it could
not see.

The named residue, decode_rect4_16_intrabc, is CLOSED at the resolution rather
than guarded a third time. Its own else arm (decode.rs:18336-18337) halves both
axes unconditionally -- `(pw / 2, ph / 2)` -- and `own422` requires `horz`, so a
VERT strip at ss (1,0) would derive a BLOCK_4X8 plane block, itself BLOCK_INVALID
there. It is dead because the walk has exactly one caller chain into two
16x16-level 1:4 arms, and `partition_subsize_dims((16,16), PARTITION_VERT_4) ==
(4,16)` is in PLANE_BLOCK_INVALID_422, so `refuse_invalid_subsize((16,16), part16)`
refuses exactly the shape that would be invalid. HORZ_4 gives (16,4) whose (1,0)
cell is BLOCK_8X4 and is legal, so the surviving strip is the one `own422` is
written for. All of that is now derived in the test, not asserted in a comment.

The wider one: the key-frame 16-level FRAME-EDGE arm (decode.rs:37034) is the
only partition read in the file that dispatches on its own symbol instead of
resolving it into a `partN` the level's guard covers. The 128/64/32-level edge
arms and the inter 16-level edge arm all resolve into a guarded partN; this one
feeds `decode_leaf_rect` straight from `edge_split`. With a short column the
strip is BLOCK_8X16, whose (1,0) plane block is BLOCK_INVALID -- a subsize libaom
refuses at decodeframe.c:1456. The merged lane's structural scan cannot see it:
its window keys on `dec.symbol(`, and this arm reads `dec.symbol_fixed(&gather(..))`.

The guard names the LEVEL, not a shape: the gathered bit resolves to
PARTITION_HORZ when the columns are full and PARTITION_VERT when they are not, and
refuse_invalid_subsize reduces that through the same partition_subsize_dims every
other site uses. So the 16x8 strip -- legal at 4:2:2, BLOCK_8X8 -- keeps decoding.
Measured on real aomenc 4:2:0 streams of exactly this shape, the new site is
REACHED with part=2 (VERT, the 8x16 strip) and reports codable=true while the frame
decodes; it reds on the cell list, not a hand-picked shape list.

No aomenc witness proves it FIRING, and none can: aomenc gates
partition_rect_allowed on the same av1_ss_size_lookup table, so a conformant
encoder never emits the symbol. 45 real 4:2:2 encodes were built and none reached
the arm. That is the same residue-not-live-pixels status the merged lane's own
guards carry; no witness is claimed. Red-before-green is mutation-based instead,
both directions: deleting the guard reds, and moving it below the dispatch -- r5's
defect in a new place -- reds.

The new gate is a CENSUS over walk sites rather than symbol sites: 19 walks, each
with the luma footprints its dispatch can hand it and the mechanism that protects
it (dispatch-time guard / resolution guard / unreachable-with-reason). It derives
the residue's subsize split from partition_subsize_dims, pins the caller counts,
and checks guard < 1:4-arm-test < dispatch on each of the residue's two routes.
4:4:0 (0,1) is excluded from the offending set because no color_config can select
it -- counting it would be the merged lane's own r2 mistake.

It caught two errors in my own census before shipping: it flagged 16x4 as needing
a guard because 4x4:0 marks it invalid, and it flagged the square walks as
resolution-guarded when no shape they walk is ever invalid. Both fixed.

cargo check --tests clean. 27 named 422/sub8/subsize/chroma_422 tests pass,
including the pinned 4:2:2 corpus, bigblock, lossless-inter and intrabc-sb128
pixel-exactness gates.

Report: lanes/av1subsizesweep.report.md -- the 19-row census table, and the
wider hardcoded-chroma-halving sweep named for the owning lanes (the oracle
helpers that slice chroma at width*height/4 are the dangerous ones: a future
4:2:2 gate using them compares half the oracle's bytes and passes green).