edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-ab16 r1 — the four AB partitions at 16x16, arm by arm
Branch lane-ab16, off lane-rectx fad4d5a.
What changed
crates/ec-av1/src/decode.rs~7140: the 16x16-levelPARTITION_HORZ_A/_B/VERT_A/_Barms (replacing the old VERT_B-only arm and the "codes only the square arms" refusal). libaomdecode_partitionvisit order: HORZ_A = TL 8x8, TR 8x8, bottom 16x8; HORZ_B = top 16x8, BL, BR; VERT_A = TL, BL, right 8x16; VERT_B = left 8x16, TR, BR. Squares go throughdecode_leaf8, strips throughdecode_leaf_rect(lane-rectx's real non-skip 16x8/8x16 coefficient path — the old VERT_B arm useddecode_block_rect, which refuses non-skip at this size).write_back_split_modesfor the coarse slot; mi-granular records come from the two leaf writers. VERT_A/_B takeReach::vert_ab_partition()(TL,BL,TR,BR visit order).crates/ec-av1/src/decode.rs~7395: the surviving refusal is narrowed to the 1:4 case,"a 1:4 partition below 16x16 (PARTITION_HORZ_4/VERT_4 ...)". The arm test is(PARTITION_HORZ_A..=PARTITION_VERT_B).contains(&part16)— values 8/9 must NOT fall into it.crates/ec-av1/src/decode.rs~3401:decode_block_rect's"a coded (non-skip) HORZ_B/VERT_B rect strip below 16x16"branch deleted — every remaining call site passes 32x16 or 16x32, so it was dead once VERT_B moved todecode_leaf_rect.crates/ec-av1/src/decode.rs~430:AB16_HITS: [usize; 4]+ab16_hits_by_arm().- Coordinator-reported base defects, fixed here too (same hunks are being made on
lane-sub8 r6 / lane-rectx r5 — semantically identical, keep either at merge):
mode_above_mi/mode_left_miguard with> self.tile_row0_mi/> self.tile_col0_miinstead of> 0, and the mi-exact mode maps are reset instart_tile(col span) andstart_row(decode.rs~2037/~2304/~2581).encode.rstop_right_rect/bottom_left_rectindex withblk_row << (5 - bw_log2)(libaomMAX_MIB_SIZE_LOG2), not 4.
crates/ec-av1/src/encode.rs: lane-part32fd1a2eb's encode half cherry-picked (HAS_TOP_RIGHT_VERT/HAS_BOTTOM_LEFT_VERT,VERT_AB_PARTITION,VertAbGuard,Reach::vert_ab_partition()). Their decode.rs/stream.rs halves were NOT taken (they depend on part32's own 32-level AB arms and counters) — a merge of both branches touches the same twotop_right/bottom_lefttable-pick hunks.crates/ec-av1/src/stream.rs~5460: the gate.crates/ec-av1/src/refusal_inventory.rs: one refusal deleted, one narrowed.gate_coverage.rsneeded no edit (--enable-ab-partitionsis now positively exercised and was never on a NEVER_EXERCISED list; this base has noNEVER_EXERCISED_10BITlist — that is on main79d4f16, so the merge must delete the AB entry there if present).
Gate
a_real_aomenc_stream_with_ab_partitions_below_16x16_decodes_pixel_exact, 6 real-aomenc
streams (--enable-ab-partitions=1 --enable-rect-partitions=1 --min-partition-size=8 --max-partition-size=16, reproducibility-checked, per-arm counter sampled per attempt and
summed only over attempts that decoded AND compared, each arm hard-asserted > 0).
CARGO_TARGET_DIR=$HOME/.cache/cargo-target-ab16 EC_AV1_REQUIRE_AOMENC=1 \
cargo test -p ec-av1 --lib -- ab_partitions_below_16x16 --nocapture
EVIDENCE: gate stdout | 6 aomenc streams (yuvtestsrc cq22 8b, rgbtestsrc cq20/cq50 8b,
mandelbrot start_x=-1.0 cq14 8b, yuvtestsrc cq30 10b, mandelbrot start_x=0.4 cq30 10b),
each decoded and compared plane-by-plane against ffmpeg |
pixel-exact on 6 streams, ab16 arms(HORZ_A,HORZ_B,VERT_A,VERT_B)=[2, 1, 2, 1],
test result: ok. 1 passed.
EVIDENCE: /tmp/.../scratchpad/{c30.obu,po30.f0,pa30.f0} | instrumented aomdec EC_TRACE_MODE
vs our EC_TRACE_MODE_STEP on a 4-arm stream | every mode/uv_mode value AND msac range match
(52624 / 55900 / 38256 / 35312 / 59042 / 54968 / 64576) — the AB arms are entropy-exact; the
residual mismatch in that stream starts at luma (40,9), inside a plain SPLIT 8x8 leaf with
mode=9 (SMOOTH), i.e. reconstruction, not desync, and not an AB block.
Scoped run after the fixes: -- ab_partitions_below_16x16 refusal_inventory gate_coverage coded_rect_strip → 7 passed; 0 failed.
Refusals
- LIFTED
"a HORZ_A/HORZ_B/VERT_A partition below 16x16 ..."→ replaced by the 1:4-only string. HORZ_A/HORZ_B/VERT_A/VERT_B at 16x16 are real-stream-proven above. - LIFTED
"a coded (non-skip) HORZ_B/VERT_B rect strip below 16x16 ..."(branch deleted; the gate's HORZ_B/VERT_B strips run the real coefficient path).
Open residue
- fix-now(not this lane): full-suite gate
a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_decodes_pixel_exactFAILS on this branch. It is not any of this lane's three change groups: it still fails with the mi-map/tile hunks reverted, and with the5 - bw_log2fix reverted, and the AB arms never run in it (SB-level partitions). It is therefore pre-existing onlane-rectx fad4d5aor comes from the part32encode.rscherry-pick. Not re-measured on the base commit (turn cap) — the orchestrator should reconcile with lane-rectx r5 / lane-part32. - deferred(base chroma/SMOOTH prediction defect — a lane of its own): at
--max-partition-size=16most cells of a ~200-cell sweep decode to completion but mismatch, first error always in a plain (non-AB) 8x8 SPLIT leaf, luma-exact-then-chroma-off or SMOOTH-mode luma. Reproducer:mandelbrot=size=64x64:start_x=-0.6 cq30, recipe as the gate. - deferred(base tile defect): the charter's
--tile-columns=1arm is NOT in the gate. Reproducer:mandelbrot=size=96x96:start_x=-0.6 cq32 --tile-columns=1, same recipe → 491 luma diffs at x=32..63,y=80..95 (last SB of tile 0); the failing superblock's partitions arevalue=0(NONE) andvalue=2(VERT), no AB symbol, and this survives the mi-map tile fixes above. - accepted: 10-bit proves HORZ_A + VERT_A only; the 10-bit HORZ_B/VERT_B cells of the sweep all trip the base chroma defect above.
- deferred(turn cap): full
EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --libtotals — the run was SIGTERMed by the memguard runner partway (one FAILED test observed, the SB-level one above; the AB gate passed inside that same run).