forge
Explore
Log in

Don't you dare go Hollow

Commits

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

2026-09-29

4:4:4 intrabc rect chroma: size the plane block from ss_size_lookup, not a halvingAhmet Kaan Gümüş · e7a1a68
4:4:4 intrabc rect chroma: size the plane block from ss_size_lookup, not a halving

Rebuilt on f33b9d41 (wave3c-b). decode_intrabc_rect sized a rect intra-BC
block's chroma plane block with a hardcoded 4:2:0 halving. libaom decides that
shape twice and neither site halves: av1_get_max_uv_txsize (blockd.h) is
ss_size_lookup[bsize] -- bw >> ss_x by bh >> ss_y at (px >> ss_x, py >> ss_y)
-- and get_vartx_max_txsize (blockd.h:1447) reads that plane block as
max_txsize_rect_lookup[plane_bsize], with decode_token_recon_block
(decodeframe.c:972-1005) walking the units from it. At 4:4:4 an 8x16 luma
block's chroma plane block is 8x16 and libaom codes it as ONE TX_8X16; the
halving read that same footprint as ONE 4x8 rect unit. This also UNSCOPES
lane-whtshape's `if lossless` conditional, which named the lossy 4:4:4 cell as
another lane's open cell. Identical arithmetic at 4:2:0.

MEASURED by trace, not by reading. This commit adds EC_IBCTX to
read_coeffs_rect (w, h, skip_ctx, sign_ctx, entry/post STREAM BIT, call site
via #[track_caller], deliberately NO plane label), EC_IBCTX2 to read_coeffs,
and EC_IBCBLOCK to decode_intrabc_rect; pairs against the oracle's EC_ECDUMP_IN
by stream bit position. Caller and plane, previously unestablished:

  oracle  bit 6870  plane=0 mi=(92,104) tx=7 (TX_8X16) all_zero=0
  ours    bit 6885  8x16 skip_ctx=0  read_inter_plane_rect
  oracle  bit 6878  plane=1 mi=(92,104) tx=7 (TX_8X16) all_zero=1
  ours    bit 6893  4x8  skip_ctx=0  read_inter_plane_rect  all_zero=0  <-- FORK
  oracle  bit 6879  plane=2 mi=(92,104) tx=7 (TX_8X16) all_zero=1

The txb_skip VALUE first disagrees one unit before the bit position does.
Reverting only the two arithmetic lines makes the gate's luma floor bite at
sample 205264 -- the exact ceiling lanes/av1444rect.report.md rounds 3-4
documented.

The gate doc states the CORRECTED finding, not the retracted one: the
coefficient ladder is NOT exact. Measured here with the 0-bit filter on BOTH
sides -- oracle 2395 all_zero reads (2359 with a real position), ours 3999
lines of which 1326 consumed bits, 71 interval matches. The chroma tail is a
second ENTROPY fork (~1069 reads missing), first at U/V (160, 80) = mi
(20, 40); the gate pins a measured per-plane exact prefix [307200, 51360,
51360] and says so. The doc also states that pairing must be by BIT INTERVAL,
not by index, and names the one-line oracle instrumentation that unblocks it
(aom_reader_tell after the aom_read_symbol at decodetxb.c:158).

Gate guard calls main's shared aomdec_available(NAME): ONE presence-check
shape in the crate, and with EC_AV1_REQUIRE_AOMDEC / EC_AV1_REQUIRE_AOMENC set a
missing aomdec FAILS instead of reporting green with the compare skipped.

A/B on a real tree -- `git diff main --stat` is exactly 2 files, +271/-20,
zero mu_chunk_order / read_intra_chroma_lossless churn, zero scripts/ touched;
both halves rebuilt in a lane-private target dir with touch before each run:

                            MAIN ONLY (f33b9d41)    MAIN + THIS LANE
  -- list                    753 tests                754 tests  (+1 = my gate)
  444                       ok. 36 passed; 0 failed  ok. 37 passed; 0 failed
  lossless                  ok. 25 passed; 0 failed  ok. 25 passed; 0 failed
  intrabc_rect              ok.  6 passed; 0 failed  ok.  7 passed; 0 failed
  gate_coverage             ok. 13 passed; 0 failed  ok. 13 passed; 0 failed
  refusal_inventory         ok. 19 passed; 0 failed  ok. 19 passed; 0 failed

Zero failures on either half; no test green on main is red here. Full batch:
a_444_intrabc_rect_chroma_plane_block ok 1 (4:2:0 twin byte-exact; luma
byte-exact 307200/307200; U and V byte-exact to sample 51360),
a_444_intrabc_rect4 ok 1, lossless_tx_tests ok 5, cargo check --all-targets 0
errors 0 warnings.

Straggler twins of the same halving are NAMED in the report, not merged:
decode.rs:16758 in decode_intrabc_owned_rect and decode.rs:19846 in
cfl_ac_q3_at. Neither is reached on this lane's witness, so fixing them would
be an unmeasured change to another path; lane-av1oraclepost's class sweep should
take them. The 3-way apply reported no conflict in either region.