edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-av1-422p — the 4x32 chroma stop is NAMED and CHUNKED: libaom HAS the
transform (the BLOCK_INVALID plane block reads max_txsize_rect_lookup[255]
= TX_4X8 out of bounds), so decode_block_rect4 walks FOUR TX_4X8 units per
plane on the offset-10 skip rows; the whole 16-frame stream now decodes, the
pixels are NOT exact, so the header refusal STAYS byte-identical
Outcome
- Step 1 of the charter (print before adding): with the header refusal
temporarily bypassed (probe-only, restored byte-identical), the stop
printed
EC_422P_STOP decode_block_rect4 chroma shape (4,32) luma=(8,32) ss=(1,0)— the portrait 1:4 leaf the av1422o report named as its frontier, on the pinned fixture (sha256d3fa4beeb1309033e4a03f5ae5c4 31c8fa8386ba1ada088684710423c7938129). - Measured, not guessed:
av1_get_tx_sizereadsmax_txsize_rect_lookup[plane_bsize]with plane_bsize =ss_size_lookup[BLOCK_8X32][1][0]= BLOCK_INVALID (255,enums.h). The byte at +255 of the copydecode_token_recon_blockactually reads (objdump: everymovzbl 0xc0d030(%r*)in that function) is0x05= TX_4X8;av1_get_adjusted_tx_sizehas no TX_4X8 case. The decodetxb copy ofnum_pels_log2_lookup(thecmpbagainst0xc0db70(%r15), symbol at 0xc0de70) reads0xffat +255, soget_txb_ctx_general's chroma branch (txb_common.h:num_pels_log2_lookup[255] > num_pels_log2_lookup [BLOCK_4X8]) takes the offset-10 arm. Both bytes re-measured on the pinned Release oracle this session. - The chunk (libaom
decode_token_recon_blocksemantics: stepr =tx_size_high_unit[TX_4X8]= 2 4-px rows, stepc = 1, unit_width/height ROUND_POWER_OF_TWO down to (1, 4)): FOUR stacked TX_4X8 units per plane (chroma rows 0, 8, 16, 24), plane-major, riding the existing(4, 8) => ChromaRect8x4entropy class via [read_rect_chroma_unit] — no coefficient-table row added (BLOCK_4X32 is not a table libaom has). Each unit is read and recorded immediately: unit row 0's txb_skip_ctx sees the real neighbour states, lower units see the block's own upper unit's, and each unit predicts off the upper one's samples. The skip arm walks the same units (predict_and_reconstruct_intra_blockpredicts every unit regardless ofskip_txfm). CfL parameters are computed once per block over the strip's 8x32 luma and shared by all units. Luma is the same single TX_8X32 rect the general arm reads. - The chunk units'
txb_skip_ctxisabove + left + 10(get_txb_ctx_general): the port's offset-7-firsttxb_skip_chroma_8stores the offset-10 rows at rows 3..6 (lane-av1-422b), so [read_rect_chroma_unit] gained achroma_skip_offset: Option<usize>parameter (mirroring [read_plane]'schroma_ctx_offset) and this arm passesSome(3). Every existing caller passesNone= behavior-identical (their rect unit IS the whole plane block, offset-7 rows); the whole-rect read never sees the new(4, 32)match row. - 4:2:0 and 4:4:4 are on their existing paths: the chunk is gated on
(chroma_w, chroma_h) == (4, 32)at ss(1,0), which only an 8x32 luma strip at 4:2:2 produces (4:2:0 reads (4, 16), 4:4:4 reads (8, 32)); the stale "portrait leaves are unreachable / a conformant stream cannot carry that leaf size" comment is disproven by the fixture and replaced.
Counter (probe, bypass env; temp print removed)
rect4_32: vert=1 coded=1— exactly one 8x32 rect4 strip in the stream, the block that used to stop.- Eight unit reads at mi=(24,52), plane-major (U rows 0..3, V rows 0..3), the temp trace printing skip_ctx 3/4/5 — i.e. the offset-10 rows (base 0..2 + 3) — and varying unit-to-unit as the block's own upper units enter the context.
chroma422_rect: 172total rect 422 chroma units across the 16 decoded frames (CHROMA422_RECT_HITS, ticked inside [read_rect_chroma_unit]).- Pre-fix walk: panics at the stop before any report; post-fix probe prints
OK: 16 frames decoded, 256x144.
Pixels — delete condition UNMET, refusal STAYS
- Frame 0 (keyframe): luma byte-EXACT vs
aomdec --rawvideo; U/V carry 4491/4888 sample diffs from offset ~23 — the PRE-EXISTING keyframe chroma gap in [decode_rect_split] (the liveEC_RECTCHROMA_GAP luma=16x8 tx=8x8 chroma=8x8diagnostics, ×21 plus one 64x32; present at e24dc84b per the av1422o report, not this lane's function). - Frames 1..15 diverge widely (luma included), consistent with an entropy divergence somewhere in the inter walk — this is the first time the stream decodes past the old stop, so there is no earlier full-stream baseline to diff against.
- Frontier (NOT fixed — larger than this one shape; named per charter):
decode_rect4_16_strip'schroma422_pair16chunk passes no chroma skip offset — it reads the offset-7 rows (txb_skip rows 0..3) where the same measured rule (plane_bsize BLOCK_INVALID for the pair's BLOCK_4X16 too) demands offset 10, i.e.Some(3). That function is the protected av1422o lane fix, so this lane only plumbedNonethrough the new parameter (behavior-identical) and names the defect for its owning lane. It runs in frame 2 before the 4x32, making it the prime suspect for the inter-frame divergence.- [
decode_rect_split]'s own-chroma gap (the EC_RECTCHROMA_GAP class above). - Our dump carries out-of-range u16 samples on frames 1 (2 samples) and 14 (6 samples) — an unclipped-output class, unattributed.
- The header refusal stands untouched:
git diffshows ONLYcrates/ec-av1/src/decode.rs(+255/−40);stream.rsis byte-identical and the probe without the bypass printsREFUSED: unsupported: AV1 decode_stream (a chroma format of 4:2:2 ...)as before.
Verification
cargo check -p ec-av1 --all-targets(target dir~/.cache/cargo-target-av1422p): 0 warnings, 0 errors.- 420 gate green under
EC_AV1_REQUIRE_AOMENC=1:stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ whose_tx_split_decodes_pixel_exact: 1 passed, 0 failed ("6 pixel-exact matches, 0 named refusals"). - Oracle reference:
$HOME/.cache/aom-oracle/build/aomdecon the fixture → 16 frames raw 4:2:2, per-frame per-plane diffed againstdump_yuv. - Untouched:
decode_rect4_16_strip(mechanicalNonearg only, no behavioral edit),read_inter_rect_chroma(the four TX_4X8 (4, 32) inter chunk stays), the 4:2:0 group-tail chroma SKIP arm,decode_probe.rs, the lossless arm (depth != 0 || lossless returns before the chroma table), the landscape (16,8)/(8,4) arms, and every existing [read_rect_chroma_unit] caller's decode behavior.
State
- Commit on lane-av1-422p (no push): the chroma_skip_offset parameter, the 4x32 chunk arms (skip and non-skip), the corrected portrait-leaf comment, and this report.
- Next stop named for the owning lane: the
chroma422_pair16offset-10 skip rows indecode_rect4_16_strip, then the inter-frame walk's first divergence against the oracle.