forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

r14-r3.report.md7.9 KiBHistoryRawDownload

lane-r14 round 3 — the SPLIT transform of a 1:4 inter strip with a 64-px axis

What changed

  • crates/ec-av1/src/decode.rs sub_tx_size_map(tx_w, tx_h) — NEW, the full libaom sub_tx_size_map[TX_SIZES_ALL] (common_data.c) transcribed, with a unit test (sub_tx_size_map_matches_libaom) enumerating all 19 entries. The load-bearing rows are the ones r2 refused on: [TX_64X16] == TX_32X16, [TX_16X64] == TX_16X32 — RECTANGULAR.
  • crates/ec-av1/src/decode.rs read_var_tx_size — now takes (tx_w, tx_h) and recurses exactly as libaom read_tx_size_vartx (decodeframe.c) does: ctx from txfm_partition_context (already rect-general here — above vs tx_size_wide, left vs tx_size_high, category from txsize_sqr_up_map), sub_txs = sub_tx_size_map[tx_size], loop for row in (0..tx_size_high_unit[tx_size]).step_by(bsh) { for col in (0..tx_size_wide_unit).step_by(bsw) }, and libaom's sub_txs == TX_4X4 early return generalised to tx_h/4 x tx_w/4 cells. Leaves are now (row, col, tw, th) instead of the square (row, col, tx_px).
  • crates/ec-av1/src/decode.rs read_block_tx_size_rect — the refusal "a split transform on a 1:4 inter strip with a 64-px axis" is GONE; the depth-1 recursion starts from sub_tx_size_map(bw, bh) and can therefore hand back rectangular leaves.
  • crates/ec-av1/src/decode.rs — both duplicated inter var-tx leaf loops (the two the r2 report named, decode_inter_block's compound and non-compound arms) now branch on tw != th: a rectangular leaf reads through read_inter_plane_rect with rect_inter_luma_set(tw, th) (LumaRect32x16Inter, the 2-symbol EXT_TX_SET_DCT_IDTX inter row — av1_get_ext_tx_set_type at tx_size_sqr_up == TX_32X32), its own luma_skip_ctx_rect / around_mi_rect / record_mi_luma_rect spans, and the block's own square prediction stride offset at the leaf.
  • crates/ec-av1/src/decode.rs read_inter_plane_rect — gains luma_skip_ctx: Option<usize>: get_txb_ctx_general's txb_skip_ctx is 0 only when the unit IS the whole plane block, which a var-tx leaf is not. The 6 whole-block call sites pass None (unchanged behaviour).
  • crates/ec-av1/src/decode.rs + stream.rs — vartx_rect_leaf_hits() -> [usize; 2] ([32x16, 16x32]), and examples/decode_probe.rs prints it.
  • crates/ec-av1/src/refusal_inventory.rs — the refusal line dropped.
  • crates/ec-av1/src/gate_coverage.rs — enable-tx64 removed from NEVER_EXERCISED_8BIT and NEVER_EXERCISED_10BIT (the new gate spells --enable-tx64=1 at both depths); its own tests are what dictated the edit.
  • crates/ec-av1/src/stream.rs — new gate a_real_aomenc_inter_1to4_recipe_decodes_pixel_exact_or_refuses_by_name (see the honest scoping below).

Firing proof: his real film

EVIDENCE: decode_probe on seg4500.obu (ffmpeg -ss 4500 -t 2 -i <HG 2160p HDR10> -c:v copy -f obu, 213 frame headers) | run under systemd-run --user --scope -p MemoryMax=6G on the r3 tip | vartx_rect_leaf: 32x16=0 16x32=14, inter_rect: 64x32=24 32x64=24 64x16=0 16x64=16 — 14 rectangular var-tx leaves decoded, and the stop moved from a split transform on a 1:4 inter strip with a 64-px axis to an intra-coded HORZ/VERT strip needs rectangular intra prediction this decoder does not code yet (lane-intrarect's wall)

EVIDENCE: same command on seg3000.obu (288 frame headers) | before r3 it stopped at this round's refusal (r2 report) | now REFUSED: an intra-coded HORZ/VERT strip needs rectangular intra prediction this decoder does not code yet — this round's wall is off both mid-film segments

EVIDENCE: same command on seg300.obu (206 frame headers) | unchanged wall (intra-coded HORZ/VERT strip) | but it now decodes 4 16x64 strips and vartx_rect_leaf 16x32=1 on the way there

Gate — and what it can NOT assert (measured, not assumed)

EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -- --test-threads=1 1to4 superblock_level_rect_partition refusal_inventory gate_coverage sub_tx_size_map → 17 passed / 0 failed (log $HOME/.cache/r14-r3-g5.log, plus -g6 after the gate_coverage edit).

The new gate sweeps 16 attempts x 2 bit depths of the chartered recipe (--enable-tx64=1 --enable-rect-partitions=1 --enable-ab-partitions=0 --enable-1to4-partitions=1 --min-partition-size=16 --max-partition-size=64 --sb-size=64 --cpu-used=0, each flag spelled once, per-arm overrides last), compares EVERY decoded frame to ffmpeg on Y/U/V, counts named refusals, and hard-asserts oos_mismatch == 0. It does not assert the arm fired, and that is a measured limitation of this branch, written at the assert site:

5 recipe sweeps, 60+ real aomenc runs (lavfi banded-motion at 16-px band granularity, testsrc2, life, mandelbrot, smptebars; 192x128 and 384x256; cq 26..58; both --min-partition-size arms; --enable-dual-filter=0 --enable-obmc=0 to clear an unrelated switchable_interp desync panic): aomenc only picks a superblock-level 1:4 partition on content that ALSO contains at least one of {an intra HORZ/VERT strip, a 16x16-level AB or 1:4 partition, an SB-level AB partition, an inter partition below 8x8, a 32x8/8x32 rect residual}. Every one of those is another live refusal in this tree and stops the decode before the frame completes. With --min-partition-size=32 aomenc emits no 1:4 partition at all (measured: the 64x16/16x64 counters read 0 across 12 recipes), so the 64-axis 1:4 shape is unreachable there.

So the round's firing proof is the film, and the pixel-exactness proof is the sibling gates plus this gate's oos_mismatch == 0 sweep. That is a deviation from the charter's gate clause, stated rather than papered over: the charter's "counters proving >=1 rectangular var-tx leaf of each of 32x16/16x32 coded, decoded+compared" is not achievable on this branch's refusal set.

Sibling gates (COMMON's SIBLING GATES rule)

superblock_level_rect_partition, 16_level_1to4, 32x32_level_1to4, superblock_level_1to4, filter_intra_on_a_32_level_1to4_strip, refusal_inventory, gate_coverage — all green on the r3 tip ($HOME/.cache/r14-r3-g5.log / -g6.log); they share read_var_tx_size, txfm_partition_* and the leaf loops this round rewrote.

Residue

  • deferred(needs any one of lane-intrarect / SB-AB / 16-level-AB-1:4 / sub8 to merge — then flip the parked assert back on): a pixel-exact aomenc gate that hard-asserts a rectangular var-tx leaf. The assert and its restore instruction are in the gate body.
  • deferred(needs grain synthesis in the dump path): the chartered per-frame 16-bit dump-before- refusal diff on seg3000. EC_AV1_FINAL_DUMP already dumps every decoded frame (no new env needed — reuse, not a new mode), but the ledger records the measurement it produces on this film: the dump is the PRE-grain reference copy, so a compare against ffmpeg -pix_fmt yuv420p10le reads as a whole-frame mismatch whose delta histogram is zero-mean +-5 film grain. Dumping a 2 s 2160p 10-bit segment is also multi-GB. Not run.
  • flagged, not mine: --enable-ab-partitions=0 streams still hit an inter SB-level AB partition in this decoder (memory class refusal-from-own-desync: a refusal naming a DISABLED tool is usually our own desync). Seen on mandelbrot cq50 and on several banded-motion recipes. Worth its own lane.
  • flagged, not mine: a switchable_interp's alphabet is exactly 3 symbols PANIC (not a named refusal) on an aomenc stream with dual filter + OBMC enabled, 192x128 cq30. Reproduced with the new capability ABLATED, so it is pre-existing and unrelated to this round.

Suite

systemd-run --user --unit=r14-r3-suite-... -p MemoryMax=10G ... cargo test -p ec-av1 --lib -j3 -> log $HOME/.cache/r14-suite-r3.log; totals appended below.

Suite result (r3 tip 81b6f9e): 367 passed; 0 failed; 31 ignored, 622.33s — up from r2's 365/0/31 by the two tests this round adds (sub_tx_size_map_matches_libaom and the new gate).