forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/ec-av1/examples/gen_coverage_cells.rsClear filter

2026-10-01

lane-av1422lift: lift the 4:2:2 sequence-header refusal; 4:2:2 decodesAhmet Kaan Gümüş · fdcfd81
lane-av1422lift: lift the 4:2:2 sequence-header refusal; 4:2:2 decodes

The guard at `stream.rs` `if seq.subsampling_x != seq.subsampling_y` is
gone, the `refusal_inventory.rs` string and its `Proof::NegativeGate`
pairing are deleted in the SAME commit (the inventory gate asserts both
directions are empty, so a half-removal is red), and the residual
uncodable shape -- 4:4:0 `(0,1)`, which `ec-av1-syntax` cannot produce
because `color_config` reads `subsampling_y` only when `subsampling_x`
is 1 -- closes with an ASSERTION rather than a comment.

Seven gates whose only behavioural assertion was `err.contains(REFUSAL)`
are renamed and inverted into byte-exact decodes against ffmpeg 8.1.3:

* `a_non_420_subsampled_sequence_header_is_refused_by_name` ->
  `a_real_422_key_frame_and_inter_sequence_decode_pixel_exact`, on two
  NEW real 4:2:2 pins that replace its fake fixture (a profile-2 header
  bolted onto a 4:2:0 tile from this crate's own encoder, which could
  never be inverted into an exactness claim).
* `the_440_cell_is_not_a_codable_chroma_shape` arm 3 keeps its
  enumeration and its `(1,0)` read-back, and replaces the refusal with
  the one thing true of those bytes: the SEQUENCE HEADER, not the tile,
  fixes the decode's chroma geometry.
* the five `the_pinned_422_*` witnesses keep their size + fnv1a64 pins
  and now assert byte-exact planes, per frame, per plane.

New gates, each with a non-vacuity arm from the 4:2:2 coefficient-unit
census (`census_nonsub_units` / `census_nonsub_coded`, armed for `(1,0)`
by lane-av1422census422): 12-bit 4:2:2 and superres 4:2:2, which the
corpus had no cell for at all; 4:2:2 film grain, compared through the
POST-grain in-memory decode because `EC_AV1_FINAL_DUMP` is written
pre-grain; and the six closed corpus cells, byte-exact against ffmpeg.

`422_allskip_2f.obu` is the one cell whose identity is that it codes
nothing, so its chroma arm is asserted as a NEGATIVE measurement (units
walked, coefficients not coded) rather than inherited from the shared
body -- that is the phantom-residual read the cell exists to witness.

Prose corrected at every site named by `lanes/av1422liftrisk.report.md`:
`stream.rs` (guard block, `SeqFlags`, the 440 gate doc, the five "NO
committed test can decode a 4:2:2 stream" doc blocks, both
`sb128rect_chroma_replay_counters` tripwire gates, `cfl_ac_q3`), plus
`decode.rs` (`Chroma16` caller set, `SB128RECT_REPLAY_SPAN_MISMATCH_HITS`,
`RECT_TILED_CHROMA_NXN_HITS`, `INTRABC_RECT4_OWN_CHROMA422_HITS`),
`refusal_inventory.rs` (both strip-enumeration docs) and
`examples/gen_coverage_cells.rs` (module doc, cell-2 comment, printout).

NOT CLOSED: `s422_384x240` still diverges chroma-only (U=1780 V=1871 on
a 17-decode/16-display cell) -- the reserved group-tail chroma SKIP arm,
owned by another lane. The corpus therefore stands at 56/57 measured
here, not 51/51. THIS BRANCH MUST NOT LAND UNTIL THAT CELL CLOSES AND
THE CORPUS RE-MEASURES 51/51.

2026-09-30

ec-av1: the odd-luma cell DECODES and the 4:4:0 cell does not existAhmet Kaan Gümüş · 8ee7a88
ec-av1: the odd-luma cell DECODES and the 4:4:0 cell does not exist

Two coverage cells `lanes/av1formatsweep.report.md` left as declared debt,
because no encoder emits either. One is a decoder capability and is now
gated; the other is not a cell at all.

4:2:0 with an ODD luma dimension (`420_odd65x65_key.obu`, 2305 B, sha256
6698601...): aomenc rounds the coded size down to even, so the stream is
built offline by the new `examples/gen_coverage_cells.rs` through a new
`encode::encode_key_frame_at_size` -- a 96x96 card on the block grid with
a 65x65 frame header. It DECODES: 6403 raw bytes, byte-identical to the
instrumented aomdec (65*65 + 2*33*33, `ROUND_POWER_OF_TWO(65,1) = 33`).
Gate `an_odd_luma_420_key_frame_decodes_pixel_exact`; measured red-before
with `round_ss` floored: chroma 1024 vs 1089 samples, raw 6273 vs 6403.

The fixture also closed a defect the tree had documented and deferred:
`ref_chroma_shape`'s 4:2:0 arm was a `(w/2, h/2)` floor where the producer
stores `round_ss(w,1) x round_ss(h,1)`, under-declaring every
odd-dimension 4:2:0 reference. Now the producer's own crop; red-before
measured on the existing routing test (2x3: left (1,1) right (1,2)); even
sizes unchanged.

4:4:0 (ss 0,1): NOT CODABLE. Spec 5.5.2 codes `subsampling_y` only when
`subsampling_x` is 1, so the reachable set is exactly {(1,1),(1,0),(0,0)}
-- libaom's reader leaves `subsampling_y = 0` at sx=0
(av1/decoder/decodeframe.c:4171-4175) and its writer asserts
`"4:4:0 subsampling not allowed in AV1"` (av1/encoder/bitstream.c:2466).
Gate `the_440_cell_is_not_a_codable_chroma_shape` proves it in three arms
(reachable-shape sweep, all 256 values of the byte carrying
`subsampling_x`, and the pinned bytes), each with a measured mutation; the
pin `440_request_is_422.obu` is what the writer emits when HANDED (0,1)
-- it lands on (1,0) and still refuses by name. The 4:2:2 refusal string
and both inventory copies now say 4:4:0 cannot arrive either.