forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

av1422h.report.md5.5 KiBHistoryRawDownload

lane-av1-422h — 4:2:2 sub-8/rect chroma model proven rng-exact to the bottom-edge SBs; refusal stays

Outcome

The assignment's premise — "ours reads a non-SPLIT partition at mi(8,10)" — was FALSE, and this round proves it with partition-level oracle traces: at mi(8,10) both decoders read bsize=3 ctx=0 rng=37068 → value=1 (PARTITION_HORZ). read_partition in the oracle source already carried an EC_PART probe (patch never enabled by the 422f/g generation recipe), so this round's traces are the first with the walk checkpointed per partition read; pairing them (EC_PART rng values, tell offset constant +14) shows the true first divergences and lets every fix below be verified rng-for-rng.

Four 4:2:2 chroma-model defects found and fixed (all in decode_leaf_rect8, decode_leaf8, decode_leaf_split4/sub8_leaf_chroma422, decode_block):

  1. decode_leaf_rect8 (BLOCK_8X4/BLOCK_4X8 strips) used the 4:2:0 i == 1-only chroma rule. is_chroma_reference (av1_common_int.h:1459) at ss (1,0): a HORZ pair's BLOCK_8X4 strips are BOTH chroma references (!(bw & 1)), a VERT pair's BLOCK_4X8 strips keep the odd-column leaf. Oracle evidence at the mi(8,10) HORZ pair: uv_mode read at BOTH (8,10) and (9,10), each strip followed by its own one-TX_4X4 chroma unit per plane. Fixed has_chroma to !vert || i == 1 at 4:2:2 and decoded each reference strip's chroma right after its luma via sub8_leaf_chroma422 (split path, whole-leaf path, intrabc path), with the 4:2:0 group tail gated off at 4:2:2 and the coarse uv slots filled from the last reference strip. The mi(8,10) pair now decodes rng-for-rng (strip mode reads end at oracle's exact rngs 63250/33264).
  2. decode_leaf_split4's 4:2:2 column parity was inverted (422g's (mi_col & 1) == 0 "even-column" rule — derived by 422f from a pre-partition-trace misreading of the (8,10) HORZ pair as a split group). Oracle, mi(30,42) split group: uv_mode read at mi(30,43) and mi(31,43) ONLY — the ODD columns, per the formula's column clause (mi_col & 1). Fixed to (lmi.1 & 1) == 1.
  3. sub8_leaf_chroma422 anchored the odd-column leaf's ctx read/write at the leaf's own column. libaom anchors at the FLOOR chroma cell (pd->above_entropy_context + blk_col with blk_col = mi_col >> ss_x): an odd-column 4x4 leaf's unit starts at chroma px 86, whose containing cell is luma mi col 42, so the ctx read AND the per-TU state write land on luma mi 42,43, not 43,44. Added ctx_mi = (lmi.0, lmi.1 & !1).
  4. decode_leaf8's 4:2:2 chroma rect unit read its txb ctx through the plain around_mi — the 422f-class dc-vote double-count (one chroma ctx cell spans TWO luma mi columns at ss_x 1) in the leaf8 path. Oracle evidence at mi(2,24) plane 2: ours dc_sign row 0, oracle row 2. Both 422 arms now read around_mi_422_chroma(leaf_mi, 8, 8).

Measurement

Fixture /tmp/t422.obu reused by hash d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129 (256x144, 22 frames). Oracle $HOME/.cache/aom-oracle/build/aomdec EC_TRACE=1 EC_TRACE_MODE_STEP=1 EC_TRACE_COEFF=1 EC_PALSYN=1 (the EC_PART probes ship in the patched tree's read_partition); ours decode_probe with a LOCAL EC_AV1_ALLOW_422_PROBE bypass at the stream.rs refusal — REVERTED before commit, refusal re-proven to fire by name without the env.

  • After fixes 1–3, the frame-0 partition streams pair 1:1 rng-for-rng from the tile start through oracle #327 — tell offset constant +14 — covering every HORZ/VERT 8x8 pair, every split4 group, the (28,44) 16x16 square (one TX_8X16 chroma per plane, ctx row 9 = our 7-base row 2 after fix 1's stamp anchor) and the (30,42)/(24,56) bodies.
  • Fix 4 (leaf8 dc-sign sampling) was located by the same pairing: the mi(2,24) 8x8 NONE leaf consumed the oracle's exact 13 bits but landed at rng 53768 vs 61448; the sign phase of its V plane diverged (dcctx 0 vs 2).

Next divergence (named stop, for the lane that owns the partial-SB walk)

Frame 0 now desyncs where the bottom superblock row begins: the 64x64 at mi(32,0) hangs over the bottom edge (has_rows=false), and libaom READS a gathered two-symbol partition there (EC_PART mi_row=32 mi_col=0 bsize=12 ctx=13 tell=19221 rng=54818 → EC_PART_VAL value=1, i.e. HORZ from the partition_gather_horz_alike cdf, splitting the SB into two 64x32 strips). Our walk reads NO partition symbol for that SB and dispatches straight into a 64x32 strip walk (EC_RECTCHROMA_GAP luma=64x32 tx=32x32 chroma=32x32), one symbol behind from there. Note the strip reader's 4:2:2 chroma for a 64x32 strip (32x32 square, ss (1,0)) rides the existing square arm. The decode.rs:14888 closed-shape panic and the decode.rs:19169 skip arm were not touched.

State

  • Refusal a chroma format of 4:2:2 (subsampling_x != subsampling_y)... byte-identical; git diff touches only decode.rs; the probe refuses without EC_AV1_ALLOW_422_PROBE (measured this round).
  • cargo check -p ec-av1 (private target dir $HOME/.cache/cargo-target-av1422h): 0 warnings.
  • 420 gates green: a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ whose_tx_split_decodes_pixel_exact 2/2 (both variants) and a_non_420_subsampled_sequence_header_is_refused_by_name 1/1. Every changed arm is keyed on ss (1,0); the 4:2:0/4:4:4 paths keep their proven rows and stamps.
  • Temporary EC_RECTDBG/LEAFDBG/CHROMAWALK instrumentation removed before commit.
  • No push. Traces left at /tmp/o_pal.txt (full-probe oracle), /tmp/o_part.txt, /tmp/u_cur.txt.