forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

fi32x8-r1.report.md6.3 KiBHistoryRawDownload

lane-fi32x8 r1 — 32x8/8x32 strips read use_filter_intra

Defect (class symbol-consumption-gap), confirmed on main 11633d7

decode_block_rect4 (decode.rs:5817) decodes the 32x32-level PARTITION_HORZ_4/ PARTITION_VERT_4 arms — four 32x8 (or 8x32) strips — and hands (bw, bh) to read_intra_mode_rect, but filter_intra_size_class_rect returned None for both shapes, so the use_filter_intra symbol libaom writes for every DC_PRED block inside av1_filter_intra_allowed_bsize ("both sides <= 32") was never read there. Since --enable-filter-intra is ON by aomenc default, any such stream desynced the tile silently from that strip on. Every gate that reached these strips spelled --enable-filter-intra=0, so nothing could see it ([[tool-disabled-in-every-gate]]).

Changes

  • crates/ec-av1/src/cdf.rs:466 — FILTER_INTRA grows to 10 rows: [8] = 18101 (BLOCK_32X8, BLOCK_SIZES_ALL index 19), [9] = 20229 (BLOCK_8X32, index 18). Values come from scripts/extract-filter-intra-cdfs.py against ~/.cache/aom-oracle/src, not hand transcription.
  • crates/ec-av1/src/cdf_state.rs:544 — the Cdfs::filter_intra field's array size.
  • crates/ec-av1/src/decode.rs:4292 — filter_intra_size_class_rect maps (32, 8) => 8, (8, 32) => 9.
  • crates/ec-av1/src/decode.rs:950 — new orientation-split counters FILTER_INTRA_RECT4_HORZ_HITS / ..._VERT_HITS (rows 8/9 are asymmetric, so a one-sided gate would pass on a transposed pair), incremented in decode_block_rect4.
  • crates/ec-av1/src/decode.rs domain test filter_intra_classes_carry_their_own_libaom_default_row — (8, 32)/(32, 8) move from "refused before any leaf (PART32)" to owning a class; the stale PART32 refusal string is gone. The 16-level pair (4x16/16x4) is still listed as refused.
  • crates/ec-av1/src/stream.rs:16940 — the gate (below).

No refusal string was lifted this round, so refusal_inventory.rs is untouched: the 32-level 1:4 partition was already decoded, only its filter-intra symbol was missing. Prediction needed no new code — predict_filter_intra is already generic in (bw, bh) (lane-rectsplit r1) and reconstruct_rect already routes filter_intra into it. No fi_tx_row remap is needed at this shape either: TxbSet::LumaRect32x8 carries tx_type: None (tx_size_sqr_up is TX_32X32, ext-tx set 0), so no tx_type symbol is read on a 32x8/8x32 luma block at all.

Gate

stream::tests::a_real_aomenc_stream_with_filter_intra_on_a_32_level_1to4_strip_decodes_pixel_exact

Sibling band fixture (8-px bands + seeded noise, both orientations), 192x128, cpu-used=0, --enable-1to4-partitions=1 --min-partition-size=8 --max-partition-size=32 --enable-tx-size-search=0, with --enable-filter-intra=1 appended LAST (aomenc keeps the last occurrence of a repeated --enable-*). 16 attempts per bit depth; every decoded attempt is pixel-compared against ffmpeg (no SKIP on a mismatch or a decode error), and per bit depth the gate HARD-asserts filter-intra hits on BOTH shapes inside pixel-exact attempts, plus out_of_scope_mismatch == 0.

Run:

systemd-run --user --scope -q -p MemoryMax=6G env CARGO_TARGET_DIR=$HOME/.cache/cargo-target-fi32x8 \
  EC_NOMEMGUARD=1 EC_AV1_REQUIRE_AOMENC=1 nice -n 10 cargo test -p ec-av1 --lib -j3 -- \
  --nocapture filter_intra

Result: test result: ok. 7 passed; 0 failed; 2 ignored (17.3 s).

EVIDENCE: $HOME/.cache/cargo-target-fi32x8 gate stdout | 16 aomenc encodes per depth, each decoded by ec-av1 and by ffmpeg, full-frame Y/U/V compare | 8-bit: 4 pixel-exact matches, filter-intra 1:4 strips = 27x(32x8) + 14x(8x32) of 232; 10-bit: 5 matches, 9x(32x8) + 20x(8x32) of 332; 0 out-of-scope mismatches at either depth

Fixture tuning (measured, not guessed)

The sibling gate's noise level (6..15) is too low: with it, filter intra was picked on a 1:4 strip in 3 of 40 8-bit attempts and in 0 of 40 10-bit ones (EC_FI32X8_VERBOSE=1 per-attempt lines). Raising the noise layer to 18..27 makes the flag fire in most attempts at both depths — filter intra is what aomenc's RD reaches for on a noisy flat band. A gradient-ramp variant and --cq-level=63 were both tried and dropped: cq 63 mismatches on this fixture with filter intra disabled (see residue).

EC_FI32X8_GATE_ATTEMPTS (default 16 — attempt 13 is the first 8-bit VERT_4 firing) and EC_FI32X8_VERBOSE are the only knobs kept.

Suite

systemd-run --user --unit=fi32x8-suite-... -p MemoryMax=10G ... cargo test -p ec-av1 --lib -j3 → $HOME/.cache/fi32x8-suite.log: test result: FAILED. 339 passed; 1 failed; 31 ignored (428.5 s).

The one failure is stream::tests::a_real_aomenc_multi_tile_intra_stream_decodes_pixel_exact (frame 0 U plane, seed 46) and it is PRE-EXISTING on main 11633d7, not this lane's: the same test fails identically on a detached worktree at 11633d7 with its own target dir ($HOME/.cache/fi32x8-mainbase.log, stream.rs:17191 there vs :17437 here — same assertion, same seed, same plane).

EVIDENCE: $HOME/.cache/fi32x8-suite.log + $HOME/.cache/fi32x8-mainbase.log | full ec-av1 --lib suite on lane 76959e5 and the multi-tile gate on a detached worktree at main 11633d7 | lane 339 passed/1 failed/31 ignored; the single failure reproduces byte-identically on main (frame 0 U, seed 46), so 0 regressions from this round

Residue

  • deferred: a_real_aomenc_multi_tile_intra_stream_decodes_pixel_exact seed 46 frame 0 U mismatch — reproduced on main 11633d7 unchanged, so it belongs to the lane-tiles / chroma territory, not here — what unblocks it: a bisect of that seed's chroma plane against aomdec (EC_TRACE_MODE) on main.
  • deferred: an 8-bit/10-bit mismatch of ANOTHER shape on this band fixture at --cq-level=63 (seeds 58/59/64) — reproduced with --enable-filter-intra=0, so it predates this round and is not a filter-intra defect — what unblocks it: a lane that bisects the cq-63 stream (the 1:4 strip counters read 8..44 there, so it is inside the 1:4 territory). This gate stays at cq 32/45/55 to avoid the confound.
  • accepted: filter intra on a 1:4 strip with tx_depth != 0 is still refused by name ("a 32x32-level 1:4 strip with a split transform ... depth={depth}"); per-TU filter intra belongs to the round that lifts that refusal. The gate keeps --enable-tx-size-search=0, so a search-on arm would only harvest that refusal.