edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-av1-422o — the (2, 16) stop is NAMED and dispositioned: libaom has no
such transform; the odd strip is the chroma reference and codes the PAIR's
(4, 16) as TWO TX_4X8 units per plane; the header refusal STAYS (the walk
now stops in decode_block_rect4's chroma shape set at 4x32)
Outcome
- Step 1 of the charter (print before adding): with the header refusal
temporarily bypassed (probe-only, restored byte-identical — see below),
the refusing shape printed as
(cw,ch)=(2,16) ss=(1,0). The walk's own(2, 16)is the EVEN strip's own chroma — a shape libaom never codes. The port does not chunk it; it is UNREACHABLE after the fix. decode_rect4_16'shas_chromais per axis now: a VERT 4x16 strip (1 mi wide) keeps libaomis_chroma_reference's column clause(mi_col & 1) || !(bw & 1) || !ss_x, which with bw == 1 mi reduces tomi_col oddat every ss_x == 1 format. The oldi % 2 == 1 || ss_y == 0marked even strips as chroma references at 4:2:2 — the source of the phantom (2, 16). HORZ strips keepi % 2 == 1 || ss_y == 0(all four strips are references at ss_y 0); 4:2:0 and 4:4:4 resolve to the exact same flags as before in all four strip/format combinations.decode_rect4_16_strip's own-chroma arm is HORZ-only now; a VERT strip falls through to the pair merge((lmi.0, lmi.1 - 1), 8, 16)— the closing strip codes the pair's chroma at the pair's origin (setup_pred_plane'smi_col -= 1snap), giving (cw, ch) = (4, 16) at ss(1,0). The old comment claiming "a conformant stream carries no such leaf" is disproven by the fixture itself and is gone.- The (4, 16) at ss_x == 1 is CHUNKED the way the pinned oracle walks it
(
chroma422_pair16arm):ss_size_lookup[BLOCK_4X16][1][0]is BLOCK_INVALID (common_data.c row{ { BLOCK_4X16, BLOCK_4X8 }, { BLOCK_INVALID, BLOCK_4X8 } }), soav1_get_tx_sizereadsmax_txsize_rect_lookup[255]— the out-of-bounds byte is TX_4X8 (skill-measured, 0x05) andav1_get_adjusted_tx_sizehas no TX_4X8 case.decode_token_recon_blockthen walks unit_width = ROUND_POWER_OF_TWO(1, 1) = 1, unit_height = 4, stepr = tx_size_high_unit[TX_4X8] = 2, stepc = 1: TWO TX_4X8 units per plane, plane-major, the lower one predicted off the upper one's samples. The skip arm walks the same two units (prediction runs per unit regardless ofskip_txfm). No coefficient-table row was added: the units ride the existing(4, 8) => ChromaRect8x4entropy class viaread_rect_chroma_unit. - The chunk's
txb_skip_ctxrides the same INVALID lookup: libaomget_txb_ctx_general's chroma branch picks the offset (7 vs 10) throughnum_pels_log2_lookup[plane_bsize] > num_pels_log2_lookup[BLOCK_4X8]with plane_bsize = 255. Measured, not guessed: the pinned Release oracle's decodetxb.c code indexes thenum_pels_log2_lookupcopy at vaddr0xc0db70(objdump:cmpb $0xb,0xc0db70(%r15)et al.), and the byte at that offset + 255 is 255 → offset 10 → the port's offset-7-first tables take+3(above + left + 3), the same shape the square multi-unit walks already use. - No tx_type symbol: only y plane's is transmitted (decodetxb.c "only y
plane's tx_type is transmitted"); the intra chroma unit's type is
intra_mode_to_tx_type(UV mode)kept by the all-16 ext-tx set — exactlyread_rect_chroma_unit's own default. CfL parameters are computed once per block over the pair's luma (are_parameters_computed) and shared by both units; the DC-pred cache is dead in this build (use_dc_pred_cachenever set true), so each unit predicts its own DC.
Counter (CHROMA422_RECT_HITS, instrumented per unit, temp print removed)
The walk reads EIGHT chunk units — two pairs (mi (28, 44) and (32, 52)),
each plane-major: U unit row 0, U unit row 1, then V units — mi rows 2
apart (8 px) — and the counter ticks 100 → 101 → … → 107 across them
(chroma422_rect=107 on the last line). Delta 8 = 2 planes x 2 units x 2
pairs. The pre-fix walk stops with the counter parked at 100.
Frontier (NOT fixed — another shape, another function)
decode_block_rect4's closed chroma-shape set has no 4x32 row:
decode.rs:13550 panics decode_block_rect4 chroma shape set is closed: 4x32 on the same probe walk after the (2, 16) fix. That function is the
VERT_4 pair reader one level up; it is NOT edited here — named for its
owning lane.
Pixels — delete condition unmet, refusal STAYS
- Frame 1: no VERT_4 4:2:2 strip occurs before the old stop point, so
frame 1's decode is untouched by this diff; its luma stays byte-exact vs
aomdecand its U/V keep the pre-existing keyframe chroma gap from chroma (23, 0) on (decode_block's own gap, present at e24dc84b, not this lane's function). - The walk stops inside frame 2 at
decode_block_rect4's 4x32, so the 16-frame pixel-exact + counter delete condition is unmet: the header refusal stands untouched (verified below).
Verification
cargo check -p ec-av1 --all-targets(target dir~/.cache/cargo-target-av1422o): 0 warnings.- 420 gate green under
EC_AV1_REQUIRE_AOMENC=1:a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_ decodes_pixel_exact: 1 passed, 0 failed. - Probe bypass reverted:
git diffshows ONLYcrates/ec-av1/src/decode.rs(+144/−12);stream.rsis byte-identical and the probe without the bypass printsREFUSED: unsupported: AV1 decode_stream (a chroma format of 4:2:2 ...)as before. - Oracle reference:
$HOME/.cache/aom-oracle/build/aomdecon the fixture (sha256d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129) → 16 shown frames. - Untouched:
read_inter_rect_chroma(the four TX_4X8 (4, 32) chunk stays), the 4:2:0 group-tail chroma SKIP arm, the k lane'sread_rect_chroma_unit(called, not edited),decode_block_rect4(the new frontier),decode_probe.rs, the lossless arm (shape-generic per-TX_4X4 walk already handles a (4, 16) pair).
State
- Commit on lane-av1-422o (no push): the has_chroma parity fix, the horz own-chroma arm, the chroma422_pair16 chunk arms, and this report.
- Next stop named for the owning lane:
decode_block_rect4chroma shape4x32(decode.rs:13550).