edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-palette2 r7 report
(The charter for this round was labelled "round 3"; the branch was already at r6 — this is r7. The charter's own step numbering is kept below.)
VERDICT: GREEN. Both charter steps are implemented AND gated pixel-exact against real aomenc.
The r6 report's RED is resolved: it was NOT the decode_block_rect64 residual defect, it was
--min-partition-size=64 in the gate recipe forcing SB-level VERT-64 blocks through
decode_block_rect64. At --min-partition-size=16 the gate reaches real rect strips
(16x16..64x64) and is pixel-exact.
What changed (commit 5d67fd7 on lane-palette2)
crates/ec-av1/src/decode.rsdecode_block(~5056, ~5241) — palette-Y prediction is now windowed PER TRANSFORM UNIT: withlogical_tx != side, each TU copies its ownlogical_txxlogical_txwindow out of the block's index map right beforeread_plane, instead of the whole-block buffer (which the FIRST unit consumed at the wrong stride). Residual is added per TU over that prediction. Refusal "a palette block with a split luma transform (round 1)" LIFTED (charter step 3).decode.rsread_intra_mode(~4415) andread_intra_mode_rect(~3153) — a palette-Y block gets NOuse_filter_intrasymbol (av1_filter_intra_allowed, reconintra.h:77). We read one, consuming a bit the encoder never wrote, and desynced from every palette block <=32x32 (classsymbol-consumption-gap).decode.rsNeighbours::palette_ctx_and_cache(~2005) — the SB-top-row exclusion of the above neighbour belongs to the colour CACHE only (pred_common.c:76);av1_get_palette_mode_ctx(pred_common.h:197) reads plainxd->above_mbmi. Applying it to the ctx too made every SB in the frame's second SB row readpalette_y_modeoff CDF row 0 while libaom used row 1 (classcdf-row-held-constant).decode.rsdecode_leaf_rect(~3674) — sub-16x16 rect leaves now read palette syntax with their own real ctx/cache (previously row 0); RECONSTRUCTION on a sub-16x16 strip stays refused by name: new refusal "a palette block on a HORZ/VERT intra strip below 16x16 (reconstruction not ported)".crates/ec-av1/src/stream.rs(~2129, ~2285) — both palette gates' aomenc recipe--min-partition-size=64->16; r6's gate additionally assertspalette_split_tx_hits()moved on a pixel-exact attempt.crates/ec-av1/src/refusal_inventory.rs— split-transform refusal removed, sub-16x16 rect palette refusal added.gate_coverage.rsalready lists onlyenable-intrabc; palette is covered by an explicit--enable-palette=1in both gates. Both meta-tests green.
Gates
Command (worktree, CARGO_TARGET_DIR=$HOME/.cache/cargo-target-palette2, EC_AV1_REQUIRE_AOMENC=1):
cargo test -p ec-av1 --lib -j3 -- --nocapture \
stream::tests::a_real_aomenc_stream_with_rect_screen_content_decodes_pixel_exact \
stream::tests::a_real_aomenc_stream_with_rect_palette_decodes_pixel_exact \
refusal_inventory gate_coverage
# test result: ok. 7 passed; 0 failed; 0 ignored
aomenc line in both (CORRECTED r8 -- r7 wrote --tune-content=screen --enable-rect-partitions=1, which the code at stream.rs ~2118-2135 / ~2274-2291 passes
NEITHER of; the actual argv is): --codec=av1 --passes=1 --end-usage=q --cq-level=<cq> --cpu-used=4 --threads=1 --row-mt=0 --sb-size=64 --enable-palette=1 --min-partition-size=16 --max-partition-size=64 --obu -o - -,
70 attempts (5 sizes x 7 cq x smptebars/rgbtestsrc), pixel-compared against ffmpeg's decode.
EVIDENCE: /tmp/claude-1000/-home-user-Documents-Code-Rust-edith-codecs/b6d8a07f-96a4-4bbb-b378-af9ae25cf7c9/scratchpad/palette2-r7-gates.txt | 70 real-aomenc screen-content encodes decoded and pixel-compared vs ffmpeg | a_real_aomenc_stream_with_rect_screen_content: 14/70 pixel-exact, 13 of them through a split-transform palette block, rect_screen_content_hits=169, palette_split_tx_hits=356
EVIDENCE: same file | same sweep, r5's narrower gate | a_real_aomenc_stream_with_rect_palette: 14/70 pixel-exact, palette_rect_hits=78 rect-strip palette blocks reconstructed
EVIDENCE: full lib suite cargo test -p ec-av1 --lib -j3 | whole ec-av1 lib | 269 passed, 0 failed, 23 ignored (510s)
Charter steps
- Step 2 (palette on HORZ/VERT rect strips, >=16x16 both dims): DONE, gated
(
palette_rect_hits=78, pixel-exact). The blanket refusal "a HORZ/VERT intra strip in a screen-content frame (palette syntax is consumed for square blocks only)" is gone and now has a gate behind it. - Step 3 (palette + split luma transform): DONE, gated (
palette_split_tx_hits=356). - Step 2's inter-frame 8x8-leaf palette refusals (decode.rs ~10652, ~11748): NOT attempted —
deferred. Measured, not assumed: a 10-frame
rgbtestsrcscreen-content encode at cq 15/35/55 throughdecode_probestops at "a 32x32 partition type this decoder does not code (value=4)" and "filter intra on a HORZ/VERT strip", never at a palette refusal. Those paths are unreachable behind other lanes' refusals, so no gate could prove a lift today (classrefusal-lifted-without-a-gate).
Residue
- deferred: inter-frame palette reconstruction (decode.rs ~10652 intra-in-inter, ~11748 8x8 leaf) — unblocked by lane-part32 (32x32 partition types) and the filter-intra-on-rect-strip lane; once those land, screen-content inter frames become reachable and a gate is possible.
- deferred: sub-16x16 rect-strip palette reconstruction — refused by name, syntax read correctly;
unblocked by a rect (4x8/8x4) transform primitive, same ceiling as
lane-sub8. - accepted: the
decode_block_rect64real-residual defect (ledger lane-sbpart-r9) is untouched and still open; this lane's gates simply no longer route through it. It is NOT a palette defect.