edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-sb128c r6 -> r7 handoff: the 128-root HORZ/VERT/AB partition work
Worktree edith_codecs-sb128c, CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sb128c.
r6 merged main 727f29a + lane-golomb 173b793 and re-greened the five 128 gate arms;
it did NOT start the partition work. Everything below is measured this round.
The blocker on the 1080p AV1 film is ONE arm: the GATHERED bottom-edge HORZ
decode_probe on four extracts of the 1080p 10-bit AV1 film (2 s each, -c:v copy)
all stop at a 128x128 superblock HORZ/VERT or AB partition, and
EC_AV1_TRACE=1 | grep partition_w128 shows values 0 and 3 only right up to the
stop -- i.e. the refusing partition never came from the full-alphabet symbol (which
traces every value) but from read_sb128_root's GATHERED branch (decode.rs:13317,
no trace line): frame height 1080 gives mi_rows = 270, so the bottom 128 row has
mi_r128 = 256, 256 + SB_MI(16) = 272 > 270 -> has_rows128 == false, one gathered
bit, and the film codes it as PARTITION_HORZ (a 128x64 block whose bottom 8 luma rows
are the only ones in frame). Frame width 1920 = 15*128 exactly, so has_cols128 is
always true and the VERT gathered arm is unreachable on this film.
=> r7's minimum for the film is the 128x64 block (key + inter), not the whole set.
What aomenc actually emits (measured, 90 streams)
- Sweep A, 72 streams (
sweep.sh: seeds 41/42/43/61/62/71 x 256x256,384x384 x cq 40/55/63 x 8+10-bit,--sb-size=128 --cpu-used=0 --min-partition-size=64 --enable-rect-partitions=1 --enable-ab-partitions=1): partition_w128 takes ONLY value 0 (NONE) and 3 (SPLIT). No HORZ, no VERT, no AB, at any setting. - Sweep B, 18 streams (
sweep2.sh, 512x512 synthetic sources designed to favour the arms): horizontal-stripe and vertical-stripe sources still give NONE only; the AB-shaped source (geq= top 64 rows of every 128 uniform, bottom split into two 64x64 levels) givesvalue=1(PARTITION_HORZ at the 128 root) at every cq (32/50/63) and both--min-partition-size64 and 16. Reproduce:nullsrc=s=512x512:d=0.32:r=25,geq=lum='if(lt(mod(Y\,128)\,64),200,if(lt(mod(X\,128)\,64),40,120))':cb=128:cr=128,noise=all_seed=7:alls=3:allf=tStreams kept at$HOME/.cache/sb128c-work/s2-abshape-*.obu(decode stops at the 5th 128 root of the KEY frame). - Whether VERT / the four AB values (4..7) are reachable is still UNKNOWN: our decoder
stops at the first refusing root, so nothing past it is observable. Re-run both
sweeps once HORZ decodes -- only then is "aomenc never picks arm X" a measured claim
(class
refusal-lifted-without-a-gate: keep the unreached arms refused BY NAME).
Shape of the 128x64 / 64x128 block (spec + libaom, for r7)
- luma:
max_txsize_rect_lookup[BLOCK_128X64] = TX_64X64-> two TX_64X64 units, each coding only its top-left 32x32 (default_scan(tx_px.min(32)), already the convention at decode.rs:17540/:18670). - chroma:
av1_get_max_uv_txsize(BLOCK_128X64) = TX_32X32over a 64x32 uv block -> two units per plane, uv block > uv tx, so the txb_skip CDF takes the offset-10 rows. - coding order: two 64x64 mu chunks (
decode_token_recon_block), Y then U then V per chunk -- the existingside > 64chunk loop indecode_inter_block(decode.rs:17568) already does this for four chunks; it keys the chunk on(row/16, col/16). motion_mode/obmcrows BLOCK_64X128 (14) / BLOCK_128X64 (15) are already incdf.rs(added r5, packed indices 14/15/16 with 128X128).has_top_right:mvstack::has_top_rightreturns 0 forbs0 = max(bw4,bh4) > 16, so both 128x64 and 64x128 have no top-right candidate; the probe is now gated (mvstack.rs:882/:1680), nothing more to do there.- lf grid: per-unit write with the skip-inter suppression, luma-only leaf write
(
fill_lf_grid_leaf_luma, from lane-golomb) -- both already merged in r6. - one
cdef_idxliteral per block, copied to every 64x64 CDEF unit the block covers (the pattern at decode.rs:13606 / :21744). - palette (>64), CfL (>32) and filter intra are all size-refused already.
- AB visit order (libaom
decode_partition): VERT_A = 64x64 TL, 64x64 BL, 64x128 right; VERT_B = 64x128 left, 64x64 TR, 64x64 BR; HORZ_A = 64x64 TL, 64x64 TR, 128x64 bottom; HORZ_B = 128x64 top, 64x64 BL, 64x64 BR.
Entry points to touch
read_sb128_rootdecode.rs:13277 (the refusal at :13345, both branches).- key-frame tile: decode.rs:13554 (
part128 == PARTITION_NONEarm; the 128 NONE block goes throughdecode_block(..., SB * 2, ...); a 128x64 needs the rect analogue --decode_block_rect64(decode.rs:8061) is the 64x32/32x64 one and is corner-cropped for a 32x32 real transform, so it does NOT generalise as-is). - inter tile: decode.rs:21642 + the
inter_piece!macro at :21683 -- there a 128x64 is plausiblyinter_piece!(mi, SB * 2, ..., ww = SB * 2, wh = SB)becausedecode_inter_blockis already (write_w, write_h)-general; try the inter arm FIRST, it is much cheaper than the key one. refusal_inventory.rs:46+gate_coverage.rsin the same commit as the gate.