edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-sb128c r10 report
Tip 1f6d885 on lane-sb128c (from c24a2ac). The r9 blocker is closed: two
root causes, both in code shared by every block wider or taller than 64.
Root cause 1 -- tx_size_context_rect compared against the block side
crates/ec-av1/src/decode.rs:5845 tx_size_context_rect tested the above/left
neighbour transform sizes against the block's own bw/bh. libaom's
get_tx_size_context tests against max_txsize_rect_lookup[bsize], which tops
out at TX_64X64: a 64x128 block must compare against 64, not 128. The square
path (read_tx_depth, decode.rs:11838) already capped with side.min(64)
(lane-sb128b r1); the rect path never did. Consequence: the right 64x128 half
of a 128-root PARTITION_VERT at mi_col 80 read its tx-depth symbol off CDF row
0 where libaom uses row 1, decoded depth 0 (TX_64X64) instead of depth 2
(TX_16X16), and the tile desynced from that block on.
Fix: cap both dimensions at 64 inside the helper (one min), so all eight call
sites are covered at once.
Root cause 2 -- Reach::of_tu ignored the 64x64 "mu" chunk order
crates/ec-av1/src/encode.rs:1252 Reach::of_tu used the plain
col_off + tx_w < bw rule. A block wider than 64 is coded in 64x64 chunks in
raster order, so has_top_right (reconintra.c) takes col_off MODULO the
64-wide chunk in its row_off > 0 branch (with one exception: the unit whose
top-right corner is the centre of a 128x128), and has_bottom_left grants the
left edge of a right-hand chunk what the already-coded left chunk holds.
Without it the last unit column of every chunk of a 128x64 intra block
predicted from a chunk libaom has not decoded yet -- 375 wrong luma samples in
the first such block of a 512x512 key frame, entropy exact.
Evidence
EVIDENCE: $HOME/.cache/sb128c-r10/{aom.trace,our.trace} | EC_TRACE_MODE EC_TRACE_COEFF aomdec vs EC_TRACE_MODE EC_TRACE_MODE_STEP EC_TRACE_COEFF decode_probe on $HOME/.cache/sb128c-r9/noab.obu, both under systemd-run --scope -p MemoryMax=6G, all_zero rng ladder | first divergence at element 151 = the block at mi_row 0 mi_col 80 (bsize 13, 64x128): oracle reads a tx-depth symbol (rng 32968 -> 42504) and codes TX_16X16 units, ours read none and coded TX_64X64. After fix 1 the whole 5370-element ladder is IDENTICAL.
EVIDENCE: $HOME/.cache/sb128c-r10/pred.trace | EC_PRED=1 aomdec on the same stream | the 128x64 block at mi_col 32 has n_tr=16 for col_off 0/4/8 and n_tr=0 for col_off 12 at every row_off > 0 -- exactly the unit column where our recon differed (diff map: 375 samples, all in x 176..191 and 192..255's last column).
EVIDENCE: $HOME/.cache/sb128c-r10/{o.f*,m.f*} | EC_AV1_PREFILT_DUMP both decoders over all five r9 streams (noab, ab45, ab18, abi45, ab55; recipe $HOME/.cache/sb128c-r9/mk.sh) | every frame of every stream byte-identical after both fixes (before: 5/5 streams DIFF on every frame, 326839/393216 bytes on noab f0).
EVIDENCE: gate a_real_aomenc_sb128_intra_rect_block_decodes_pixel_exact arm 47 | cargo test -p ec-av1 --lib a_real_aomenc_sb128_intra_rect_block_decodes_pixel_exact -- --nocapture | arm 47 cq --cq-level=45 512x512 8bit txsearch=1: 5 frames pixel-exact (0 hidden), intra_128x64 +164 intra_64x128 +156 depth[64/32/16] [26, 0, 294].
EVIDENCE: $HOME/.cache/reelc-head.obu | decode_probe under systemd-run --scope -p MemoryMax=6G after both fixes | OK: 48 frames decoded, 1920x792, sb128_rect: edge_horz=720 inter_128x64=720 -- no refusal, no regression.
Gate arm added
crates/ec-av1/src/stream.rs:19176 -- a 512x512 arm (tag 47) on the sb128
intra_rect_block gate: a SECOND 128 superblock column, which no earlier arm had
(192x256 / 384x320 / 256x192 all stop at one 128 column), plus the r9 witness's
own higher-frequency luma source, because the gate's smooth two-term source
gives every 128-rect block a whole-block TX_64X64 and no VERT root -- the exact
combination that hid the defect. Counters prove the shape: 156 64x128 blocks,
294 units at TX_16X16.
Suite
cargo test -p ec-av1 --lib (unit sb128c-suite-r10-1788351731, after fix 1
only): 387 passed, 1 failed, 35 ignored -- the one failure was
a_real_aomenc_sb128_ab_partition_at_the_128_root_decodes_pixel_exact, which
fix 2 closes. Final run: unit sb128c-suite-r10b-*, log
$HOME/.cache/sb128c-suite-r10b.log -- 388 passed, 0 failed, 35 ignored (475 s), including a_real_aomenc_sb128_ab_partition_at_the_128_root_decodes_pixel_exact, ..._intra_rect_block_... (with the new 512x512 arm), ..._gathered_edge_horz_... and the r7 inter gate.
Residue
- No refusal string was lifted this round; the r9 gate that the AB refusal lift needs is now green. accepted.