forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to lanes/ab16-r2.report.mdClear filter

2026-09-01

fix(av1): the two rect nz_map ctx tables were transposed, and the 512-chroma eob CDF was the flat 1D rowAhmet Kaan Gümüş · 6906e60
fix(av1): the two rect nz_map ctx tables were transposed, and the 512-chroma eob CDF was the flat 1D row

The merged superblock HORZ/VERT gate's seed 43 decoded garbage from the
first 64x32 strip onward; base fad4d5a "passed" it only because the
desynced stream then produced a 16x16 partition symbol the AB refusal
caught (the gate's own recipe spells --enable-ab-partitions=0, so aomenc
never wrote one). Two transcription defects, found by comparing our
EC_TRACE_COEFF against the instrumented aomdec's msac range element by
element:

- NZ_MAP_CTX_OFFSET_32X64 / _64X32 were stored [col][row] and read
  [row][col]. libaom indexes av1_nz_map_ctx_offset by
  coeff_idx = (col << bhl) | row -- column-major, bhl = log2 of the
  transform's HEIGHT -- so a straight transcription is transposed. It is
  invisible on the square table (symmetric) and at row, col < 2 (both
  halves agree), which is every position lane-sbpart r8's gate reached.
- EOB_PT_512_CHROMA carried av1_default_eob_multi512_cdfs' SECOND inner
  index, which is eob_multi_ctx (the flat 1D-class row, flat for both
  planes), not the plane. The chroma 2D rows vary per q-context exactly
  like luma's; all four are spelled out and picked by q_ctx now.

Two unit tests pin both: the offset tables are re-derived from libaom's
own generating rule and cross-checked against base_ctx_rect, which
spells that rule out instead of reading a table (those two disagreed
silently before), and the chroma eob constant is pinned unequal to the
flat row.

Seed 43 now decodes bit-exact vs aomdec (36864/36864 bytes; 20494 luma
bytes differed before). cargo test -p ec-av1 --lib: 274 passed, 0 failed.
fix(av1): a transform unit is not a block of its own size -- Reach::of_tuAhmet Kaan Gümüş · 85bf4d6
fix(av1): a transform unit is not a block of its own size -- Reach::of_tu

The TX4 sub-grid of an 8x8 square inside a PARTITION_VERT_A/_B indexed a
4x4 row of the three-row has_tr_vert/has_bl_vert tables and panicked on a
real --enable-tx-size-search=1 stream. libaom has no such row on purpose
(has_tr_vert_tables[BLOCK_4X4] is NULL): a transform unit inside a block
answers from the block's geometry, and only its top row / left column
reaches the table -- the BLOCK's row, at the BLOCK's position. Both TU
sites (decode_block's multi-TU branch, decode_leaf8's TX4 grid) go
through the transcription; a unit test pins it equal to the old
unit-as-block answer everywhere outside a vertical AB partition.

The AB gate no longer pins --enable-tx-size-search=0 (aomenc's default is
ON, which is what hid the panic): four attempts run with it on, tolerate
only an 'unsupported' refusal from another lane, and hard-assert a TX4
unit inside a vertical AB partition was reached.