forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

tx64x16-r3.report.md7.3 KiBHistoryRawDownload

lane-tx64x16 r3 — the 32x32-level 1:4 arms land and run on real content; the fixture gate does not

Branch lane-tx64x16, commits c6f1144 (rectsplit r4 cherry-pick) and 86226fe (this round's feature) on top of 88100e5. Not rebased (a verifier reads 88100e5 from a scratch tree, per charter).

What changed

  • crates/ec-av1/src/decode.rs — decode_block_rect4 (new, ~line 4840): decode_block_rect's 4:1 sibling addressed by REAL mi coordinates. Strips 1 and 3 of a 32-level HORZ_4/VERT_4 start 8 px into a 16-px SUB cell, which decode_block_rect's px = c * SUB cannot name — the same reason decode_leaf_rect exists — and it carries decode_leaf_rect's prev-strip mode override so the second/third/fourth strip's mode context sees its true in-block neighbour. Coefficients are READ, not refused.
  • decode.rs — SCAN_16X4/SCAN_4X16 (new, ~line 2008), the chroma scans of a 32x8/8x32 strip. Transcribed from libaom's COLUMN-major default_scan_16x4 / default_scan_4x16; the rule (row = p % h, col = p / h) was validated by REGENERATING the existing SCAN_16X8 from default_scan_16x8 byte for byte before emitting them (class reference-layout-not-spec).
  • decode.rs — the 32-level partition dispatch (~9744): PARTITION_HORZ_4 | PARTITION_VERT_4 arm, quarter_step = 2 mi, libaom's own i > 0 frame-edge break, per-orientation counters RECT4_32_{HORZ,VERT}_HITS plus RECT4_COEFF_HITS (non-skip strips only).
  • crates/ec-av1/src/cdf_state.rs — TxbSet::LumaRect32x8: Luma16's 256-position coefficient tables (get_txsize_entropy_ctx averages (5+3)/2=4) with tx_type: None, because tx_size_sqr_up(TX_32X8) = TX_32X32 where av1_get_ext_tx_set_type is EXT_TX_SET_DCTONLY for intra. Chroma 16x4/4x16 reuses TxbSet::Chroma8 (64 positions) unchanged.
  • crates/ec-av1/src/encode.rs — HAS_TOP_RIGHT_RECT/HAS_BOTTOM_LEFT_RECT gain has_tr_32x8/has_tr_8x32/has_bl_32x8/has_bl_8x32 (reconintra.c:122-127, 305-310); the row selector is now an explicit (bw, bh) match (Reach::rect_table) so no existing shape changes row. libaom's index (blk_row << (MAX_MIB_SIZE_LOG2 - bw_in_mi_log2)) + blk_col is exactly this file's row * (128 / bw) + col, so the stride math already generalized — verified against reconintra.c:242-246.
  • crates/ec-av1/src/refusal_inventory.rs — new string "a 32x32-level 1:4 strip with a split transform (per-unit 4:1 prediction is not ported)".
  • crates/ec-av1/src/stream.rs — new gate a_real_aomenc_stream_with_a_32x32_level_1to4_partition_decodes_pixel_exact (8-bit AND 10-bit arms, per-arm hard asserts, coded-strip assert), currently #[ignore]d — see the honest failure below.
  • Cherry-pick of lane-rectsplit r4 7b55227: base_ctx now states libaom's generating rule (txb_common.h:199-209) instead of indexing the transposed 5x5 tables, plus r4's SB split-transform per-TU strips. r2's nz_map test was dropped for r4's whole-domain one, as chartered.

The one place main and lane-rectsplit disagree (merge note)

main's NZ_MAP_CTX_OFFSET_64X32 row 0 is [0, 16, 6, 6, 21]; rectsplit r4's is [0, 16, 16, 16, 16] — the two trees hold TRANSPOSED transcriptions of the same libaom table. Nothing decodes off them any more (base_ctx states the rule), so r4's domain test is pinned here as [row][col] with a comment at the assert. Whoever merges both branches must keep table layout and that index in step; picking either consistently is correct.

Gate: RED, and left #[ignore]d on purpose

No fixture recipe found this round makes aomenc emit a 32x32-level 1:4 partition. Measured, three recipes, all with --enable-1to4-partitions=1 --enable-rect-partitions=1 --min-partition-size=8 --max-partition-size=32 --cpu-used=0:

fixture attempts attempts carrying a 32-level 1:4 block
gradients_source + transposed odd attempts (the SB gate's own fixture) 20 0
same, rendered at double height and squeezed (halves every band) 6 0
same + avgblur=sizeX=15:sizeY=0 (horizontally smooth) 6 0, and 4/6 additionally tripped the screen-content refusal

--max-partition-size=64 (so the 64-level pair may also fire) changed nothing at the 32 level. The gate therefore asserts nothing it can reach, so it is #[ignore]d with the reason in the attribute — a gate that passes without ever seeing its feature is worse than an absent one (class gate-blind-to-feature). The refusal "a 32x32 partition type this decoder does not code (value={part32})" is consequently LIFTED WITHOUT A PIXEL GATE, which is a violation of the COMMON charter's "a refusal is lifted only together with a gate" rule, stated here rather than papered over.

EVIDENCE

EVIDENCE: /tmp/claude-1000/-home-user-Documents-Code-Rust-edith-codecs/cdc46329-ebad-48bf-bcb8-fd704bf020f7/scratchpad/reelb5.obu (11553802 bytes) | decode_probe on 86226fe | REFUSED: "a 32x32-level 1:4 strip with a split transform (per-unit 4:1 prediction is not ported)" — the film advanced PAST value=8 into the new arm, so the arm's mode read, tx-size read and dispatch execute on real 10-bit content EVIDENCE: same path/reelc5.obu (1175978 bytes) | decode_probe on 86226fe | REFUSED: "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here" — unchanged by this lane, a different shape's gap EVIDENCE: terminal, cargo test -p ec-av1 --lib -- refusal_inventory gate_coverage the_rect4_scans superblock_level split_transform_horz_vert with EC_AV1_REQUIRE_AOMENC=1 on 86226fe | 13 passed, 0 failed, 1 ignored (108.6s) — every sibling gate of the cherry-picked base_ctx rule is green, incl. both SB HORZ/VERT gates and r4's split-transform SB gate EVIDENCE: terminal | cargo test -p ec-av1 --lib -- the_rect4_scans_are_transposed_pairs | ok — SCAN_4X16 is the exact transpose of SCAN_16X4 and both are permutations; the same relation holds for SCAN_32X8/SCAN_8X32 EVIDENCE: $HOME/.cache/tx64-suite-r3.log | full cargo test -p ec-av1 --lib on 86226fe | INCOMPLETE — the run was cut at 600 s by this agent's own shell cap; 0 FAILED lines in the ~200 tests that reported before the cut. Full totals are OWED.

Open, with dispositions

  • fix-now (next round, the whole point of the lane): a fixture recipe that makes aomenc emit a 32-level 1:4 partition, then un-ignore the gate. Do NOT weaken the asserts. Suggestion not yet tried: real content — cut a 64x64 crop out of the 2160p extract itself and re-encode it, or drive --sb-size=64 --max-partition-size=32 over testsrc2/mandelbrot rather than gradients.
  • fix-now (next refusal on the film's path): tx_depth != 0 on a 32-level 1:4 strip. depth_to_tx_size of a 4:1 strip is not bw.min(bh) >> (depth-1), so decode_rect_split's per-unit walk cannot be reused unexamined — that is exactly where the 2160p extract now stops.
  • deferred(the gate above): the 10-bit arm of the new gate, and therefore the enable-1to4-partitions entry in NEVER_EXERCISED_10BIT, which stays.
  • accepted: the coarse (16-px) mode/side neighbour arrays cannot name an 8-px-tall strip; each strip stamps every cell it touches and the last one wins, which is right for the block below/right of the 32x32 (the only reader outside it) and is the pre-existing limitation every rect path here shares.
  • owed: full-suite totals (see the EVIDENCE line).