diff --git a/crates/ec-av1/fixtures/444_rect_strip_leaf_tx_type.obu b/crates/ec-av1/fixtures/444_rect_strip_leaf_tx_type.obu new file mode 100644 index 0000000000000000000000000000000000000000..eb9a7795508c8e2d19bd5ae6548c1e7b4752fa5e GIT binary patch literal 26839 zcmV(nK=Qv50165q000BO|M~y(1Tvw26ab)T5V@ayvrx0_`0K}%YR@)0kKRZ2Vjjpa zw-xdCs1VVoJ?6#DD(@dD?5168xQ755?Ttr#ydG^Rh}Qs1`QzG}BY5{&^#CNjbI@Gj zZ2e0nyIVeGT`S_4rL7S4G{=oS$K5Aat(#=$2~hKL*>MWM(vAFKx`qc}J-DdCM_Qx3 zeZLOD!EAK$M5DWx79DrDNwv!IrO!FO*L}i-Sn+q3_YfT3lYzAIHb7wJP#j5p{|}vt z5tZjTX7&1!52Ibs=aG=u@9o?q{_`M@hJFPqmzq~N1;><>{&2l&xb3OUumm)t4rE=K zT)wdZ3;8%US@oT^?JCe2o$KG(7eXE$g>c$N?PHbnb+mc0D`{V7Qa>-BPT-K7hPJ&3 zYuqC7GW_{+KA6@u&%C##a(^ESVc0Od{*{UFX$2dg(cFb4}n@V zbErc|1M{z~rbbs0y9+aiy*pg?+Fw7Ta@cNJdZ?>w`Q_33-@yTuAaG3Gx#$M2?-D+nY2xI_eqm?^Szna#ItPnTM|N zarD=}+6rfMDYGPTh>Vo{R(OWI3lHN-_R-}~J9r8S#m$`6j6NZ4&rrp=0!z3|kfKb{ z%D_^RMLz@_%)lT!S}*ROaJ&~gDTzk`1q%1D*}r}xNMbofm9E>fb{j9BS>Ql+ci9QH^l49k7ybRe*72L5w{&|MVD$4>1Kb!4v zhw;xHf>J4YZi+I0;ffSB!*%DNP!f8HAXy~k`nN#vFkz~il1S!^_S1g|y@H@YXLOx{ z0zkD_3&fH1`xw1-qmVR6WA(e5MXk-?2z{S239C9(krO-oxwEJii^82Lp65M3j2zqu zvZWEA-@vy`W^{SjjKb~IM06G>xH2~a6XTxt{h(cSp*`gWL0g;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(}=TJ2jU!l}}k(YG)~S-U!!{Mpy@9{G>;DlGv|h?5=d^L#qe)xq&h?@TEn+ zO>VoWfQo2g@m|)%qsYL^XW$W!^Tlz}t)9Fl{OF)AKi-NYF#sX0@_A z4KqN_9WO4lBjO(prrLLdyM_9EA{|rafk45B86(1SJ2;K+3r-;M@0^+c?T7XTj&W1W zegiHbp usize { RECT_CLASS1_HITS.with(|c| c.get()) } +// lane-av1readcensus: the PER-UNIT coefficient census -- one unit counted +// per `read_coeffs`/`read_coeffs_rect` call, i.e. per object this decoder +// actually walks, which is the unit the round-4 `av1444rect` count measured +// (636 square chroma reads against the oracle's 1086). The counters are +// 4:4:4-ONLY (`CENSUS_444`, set per frame beside `set_subsampling`), so a +// 4:2:0 control reads `(0, 0, 0)` -- a walk-shape change at 4:2:0 is another +// lane's business, and this census must not fire there. +thread_local! { + /// Per-plane unit counts, `[luma, u, v]`, at 4:4:4 only. + static CENSUS_444_UNITS: std::cell::Cell<[usize; 3]> = const { std::cell::Cell::new([0; 3]) }; + /// Of [`CENSUS_444_UNITS`], the units that coded at least one coefficient + /// (`txb_skip == 0`) -- the per-plane split is only comparable against + /// the oracle's when both sides count all-zero units the same way. + static CENSUS_444_CODED: std::cell::Cell<[usize; 3]> = const { std::cell::Cell::new([0; 3]) }; + /// Sequential unit index, so a trace line names its own position in the + /// frame's walk rather than relying on line order alone. + static CENSUS_UNIT_N: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// The plane the units read from here on belong to. A thread-local rather + /// than a `read_coeffs` parameter because the three luma call sites + /// (`decode_rect_split`, `decode_block_rect64`, `read_inter_plane_rect`) + /// are not this lane's to edit and would each grow an argument; the + /// plane-owning readers stamp it once on entry instead. + static CENSUS_PLANE: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// 4:4:4 (`subsampling_x == 0 && subsampling_y == 0`) for the frame being + /// decoded, set per frame from [`crate::stream`]. + static CENSUS_444: std::cell::Cell = const { std::cell::Cell::new(false) }; +} + +/// Current `[luma, u, v]` 4:4:4 coefficient-unit counts. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn census_444_units() -> [usize; 3] { + CENSUS_444_UNITS.with(|c| c.get()) +} + +/// Current `[luma, u, v]` 4:4:4 counts of units that coded coefficients. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn census_444_coded() -> [usize; 3] { + CENSUS_444_CODED.with(|c| c.get()) +} + +/// lane-av1readcensus: arms the 4:4:4 census for the frame about to decode, +/// called once per frame from [`crate::stream`]'s decode loop beside +/// [`set_subsampling`]. At 4:2:0 (or 4:2:2) every census counter stays zero -- +/// the walk-shape question this census answers is a 4:4:4 one. +pub(crate) fn set_census_444(ss_x: u8, ss_y: u8) { + CENSUS_444.with(|c| c.set(ss_x == 0 && ss_y == 0)); +} + +/// lane-av1readcensus: the plane the units read from here on belong to, +/// stamped by the plane-owning readers ([`read_plane`], [`read_inter_plane`], +/// [`read_inter_plane_rect`]) on entry. +pub(crate) fn set_census_plane(plane: usize) { + CENSUS_PLANE.with(|c| c.set(plane)); +} + +/// lane-av1readcensus: is the per-unit census trace on? Shares +/// [`coeff_trace_on`]'s per-frame narrowing so one frame's walk can be +/// dumped without the rest of the stream. +fn census_trace_on() -> bool { + if !crate::envflags::env_flag!("EC_CENSUS_UNIT") { + return false; + } + match COEFF_TRACE_FRAME.with(|c| c.get()) { + None => true, + Some(w) if w >= usize::MAX - 1 => true, + Some(w) => COEFF_TRACE_CUR.with(|c| c.get()) == w, + } +} + +/// lane-av1readcensus: one line per coefficient unit this decoder walks, the +/// twin of the oracle's `EC_COEFF` / `EC_COEFF_VAL` bracket around each +/// `av1_read_coeffs_txb` call. Pair the two sides by `post_rng` (or by `n`), +/// never by plane label or by walk position -- the walk order is exactly what +/// the census is measuring. +fn census_unit( + w: usize, + h: usize, + tx_type: TxType, + eob: usize, + all_zero: bool, + entry_rng: u32, + dec: &SymbolDecoder, +) { + let plane = CENSUS_PLANE.with(|c| c.get()).min(2); + let coded = usize::from(!all_zero); + CENSUS_UNIT_N.with(|c| c.set(c.get() + 1)); + hit_do! { + CENSUS_444_UNITS.with(|c| { + if CENSUS_444.with(|on| on.get()) { + let mut v = c.get(); + v[plane] += 1; + c.set(v); + } + }); + CENSUS_444_CODED.with(|c| { + if CENSUS_444.with(|on| on.get()) { + let mut v = c.get(); + v[plane] += coded; + c.set(v); + } + }); + } + if !census_trace_on() { + return; + } + let n = CENSUS_UNIT_N.with(|c| c.get()) - 1; + let post_rng = dec.debug_state().0; + eprintln!( + "EC_CENSUS_UNIT side=ours n={n} plane={plane} w={w} h={h} tx={tx_type:?} eob={eob} \ + all_zero={all_zero} entry_rng={entry_rng} post_rng={post_rng}" + ); +} + // As [`FILTER_INTRA_RECT_HITS`], counting only the strips BELOW 16x16 // (8x16/16x8 leaves of a 16x16 HORZ/VERT partition, lane-fistrip r1) -- the // shapes whose `use_filter_intra` symbol had no CDF class before this round. @@ -7561,6 +7674,11 @@ fn read_coeffs( ) -> Result<(Grid, TxType)> { let trace = crate::envflags::env_flag!("EC_AV1_TRACE"); let side = coding.side; + // lane-av1readcensus: this unit's own entry state, so the census line + // carries the pre-read rng and pairs against the oracle's `EC_COEFF` + // (which prints `r->ec.rng` before the same `txb_skip` read). + let census_entry_rng = dec.debug_state().0; + let (census_w, census_h) = rect_shape.unwrap_or((side, side)); if crate::envflags::env_flag!("EC_AV1_EOBPT_CDF") { let (range, value) = dec.debug_state(); eprintln!("EC_AV1_STATE_BEFORE_TXBSKIP range={range} value={value}"); @@ -7603,6 +7721,15 @@ fn read_coeffs( if all_zero { // lane-coefgrid: the all-zero unit (60% of the 4K segment's) names the // shared zero grid instead of allocating and zeroing its own. + census_unit( + census_w, + census_h, + TxType::DctDct, + 0, + true, + census_entry_rng, + dec, + ); return Ok((Grid::Zero(side * side), TxType::DctDct)); } let mut grid = vec![0i32; side * side]; @@ -7811,6 +7938,15 @@ fn read_coeffs( } grid[pos] = if negative { -level } else { level }; } + census_unit( + census_w, + census_h, + tx_type, + eob, + false, + census_entry_rng, + dec, + ); Ok((Grid::Own(grid), tx_type)) } @@ -7832,18 +7968,31 @@ fn read_coeffs_rect( skip_ctx: usize, sign_ctx: usize, default_tx_type: TxType, + // lane-av1chrtx: the plane this unit belongs to (0 luma, 1 U, 2 V) -- + // printed by the two `EC_COEFF_STEP` traces below, which hardcoded + // `plane=0` and so mis-attributed a CHROMA read as a luma one in two + // independent lane reports. + plane: usize, ) -> Result<(Grid, TxType)> { let rect_trace = coeff_trace_on(); let entry_rng = dec.debug_state().0; + // lane-av1readcensus: this reader is handed the real plane (lane-av1chrtx + // threaded it in for the `EC_COEFF_STEP` traces), so it stamps the census + // plane itself rather than inheriting whichever reader did last. The + // luma-only readers (`decode_rect_split`, `decode_block_rect64`, + // `read_inter_plane_rect`'s corner) are all plane 0 -- the stamp's initial + // value -- and the other plane-owning readers stamp on entry. + set_census_plane(plane); let all_zero = dec.symbol(&mut coding.txb_skip[skip_ctx]) == 1; if rect_trace { eprintln!( - "EC_COEFF_STEP tag=all_zero plane=0 ctx={skip_ctx} entry={entry_rng} all_zero={} rng={}", + "EC_COEFF_STEP tag=all_zero plane={plane} ctx={skip_ctx} entry={entry_rng} all_zero={} rng={}", all_zero as i32, dec.debug_state().0 ); } if all_zero { + census_unit(w, h, TxType::DctDct, 0, true, entry_rng, dec); return Ok((Grid::Zero(w * h), TxType::DctDct)); } let mut grid = vec![0i32; w * h]; @@ -7864,7 +8013,7 @@ fn read_coeffs_rect( })?; if rect_trace { eprintln!( - "EC_COEFF_STEP tag=tx_type plane=0 rng={}", + "EC_COEFF_STEP tag=tx_type plane={plane} rng={}", dec.debug_state().0 ); } @@ -8047,6 +8196,7 @@ fn read_coeffs_rect( nz.join(",") ); } + census_unit(w, h, tx_type, eob, false, entry_rng, dec); Ok((Grid::Own(grid), tx_type)) } @@ -8076,11 +8226,25 @@ fn read_chroma_coeffs_rect( sign_ctx: usize, default_tx_type: TxType, fctx: &crate::decode::FrameCtx, + // lane-av1chrtx: the plane index, threaded to `read_coeffs_rect`'s + // `EC_COEFF_STEP` traces (they used to print a hardcoded `plane=0`, so a + // V-plane read was indistinguishable from a luma one in the log). + plane: usize, ) -> Result<(Grid, TxType)> { if mono(fctx) { return Ok((Grid::Zero(w * h), TxType::DctDct)); } - read_coeffs_rect(dec, coding, scan, w, h, skip_ctx, sign_ctx, default_tx_type) + read_coeffs_rect( + dec, + coding, + scan, + w, + h, + skip_ctx, + sign_ctx, + default_tx_type, + plane, + ) } /// What one coded block leaves behind for the blocks that read it as a @@ -11537,6 +11701,7 @@ fn decode_rect_split( tu_skip_ctx, dc_sign_ctx(tu_around.2), TxType::DctDct, + 0, )?; let residual = dequant_and_inverse_typed_wh( &tu_grid, @@ -11962,6 +12127,7 @@ fn decode_rect_split( skip_ctx, dc_sign_ctx(cu_around[plane_idx].2), default_tx, + plane_idx, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -12046,6 +12212,7 @@ fn decode_rect_split( skip_ctx, dc_sign_ctx(around[plane_idx].2), default_tx, + plane_idx, )?; // The same delta_q proof the unsplit rect64 path records // (lane-rectsplit r4: lifting the split-transform refusal moved @@ -14510,6 +14677,7 @@ fn decode_block_rect( 0, dc_sign_ctx(around[0].2), TxType::DctDct, + 0, )?; if crate::envflags::env_flag!("EC_AV1_TRACE") { let (rng, _) = dec.debug_state(); @@ -14558,6 +14726,7 @@ fn decode_block_rect( dc_sign_ctx(around[1].2), u_default_tx, fctx, + 1, )?; if crate::envflags::env_flag!("EC_AV1_TRACE") { let (rng, _) = dec.debug_state(); @@ -14605,6 +14774,7 @@ fn decode_block_rect( dc_sign_ctx(around[2].2), v_default_tx, fctx, + 2, )?; if crate::envflags::env_flag!("EC_AV1_TRACE") { let (rng, _) = dec.debug_state(); @@ -15087,6 +15257,7 @@ fn decode_leaf_rect( 0, dc_sign_ctx(around[0].2), TxType::DctDct, + 0, )?; if crate::envflags::env_flag!("EC_AV1_RECTX_TRACE") { let nz: Vec<(usize, i32)> = l_levels @@ -15141,6 +15312,7 @@ fn decode_leaf_rect( dc_sign_ctx(around[1].2), u_default_tx, fctx, + 1, )?; u_levels = u_l; let u_residual = dequant_and_inverse_typed_wh( @@ -15185,6 +15357,7 @@ fn decode_leaf_rect( dc_sign_ctx(around[2].2), v_default_tx, fctx, + 2, )?; v_levels = v_l; let v_residual = dequant_and_inverse_typed_wh( @@ -15608,6 +15781,7 @@ fn decode_block_rect4( 0, dc_sign_ctx(around[0].2), TxType::DctDct, + 0, )?; hit!(RECT4_COEFF_HITS); let luma_residual = dequant_and_inverse_typed_wh( @@ -15758,6 +15932,7 @@ fn decode_block_rect4( 0, dc_sign_ctx(around[0].2), TxType::DctDct, + 0, )?; let mut planes = Vec::with_capacity(2); for plane in 1..3 { @@ -15783,6 +15958,7 @@ fn decode_block_rect4( dc_sign_ctx(around[plane].2), default_tx, fctx, + plane, )?; planes.push((levels, tx_type)); } @@ -17313,6 +17489,7 @@ fn decode_rect4_16_strip( tu_skip_ctx, dc_sign_ctx(tu_around.2), TxType::DctDct, + 0, )?; let residual = dequant_and_inverse_typed_wh( &tu_grid, @@ -17419,6 +17596,7 @@ fn decode_rect4_16_strip( 0, dc_sign_ctx(around.2), TxType::DctDct, + 0, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -17935,6 +18113,7 @@ fn decode_rect4_16_strip( dc_sign_ctx(around[plane].2), default_tx, fctx, + plane, )?; planes.push((levels, tx_type)); } @@ -18441,6 +18620,7 @@ fn decode_block_rect64( 0, dc_sign_ctx(around[0].2), TxType::DctDct, + 0, )? }; if coeff_trace_on() { @@ -18596,6 +18776,7 @@ fn decode_block_rect64( dc_sign_ctx(cu_around[plane_idx].2), TxType::DctDct, fctx, + plane_idx, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -19822,6 +20003,8 @@ fn read_plane( if plane_idx > 0 && mono(fctx) { return Ok(Grid::Zero(side * side)); } + // lane-av1readcensus: the units read from here on are this plane's. + set_census_plane(plane_idx); let skip_ctx = if plane_idx == 0 { luma_skip_ctx.unwrap_or(0) } else { @@ -20074,6 +20257,7 @@ fn read_rect_chroma_unit( usize::from(around.0) + usize::from(around.1) + chroma_skip_offset.unwrap_or(0), dc_sign_ctx(around.2), default_tx, + plane_idx, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -23125,6 +23309,7 @@ fn leaf8_chroma422_unit( usize::from(around.0) + usize::from(around.1), dc_sign_ctx(around.2), default_tx, + plane_idx, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -23775,6 +23960,7 @@ fn sub8_leaf_chroma444( skip_ctx, dc_sign_ctx(around[plane_idx].2), default_tx, + plane_idx, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -23954,6 +24140,7 @@ fn sub8_leaf_chroma444( skip_ctx, dc_sign_ctx(around[plane_idx].2), default_tx, + plane_idx, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -25337,6 +25524,7 @@ fn decode_leaf_rect8( skip_ctx, dc_sign_ctx(around.2), TxType::DctDct, + 0, )?; if li == 0 { chroma_tx = tx_type; @@ -25748,6 +25936,7 @@ fn decode_leaf_rect8( 0, dc_sign_ctx(around.2), TxType::DctDct, + 0, )?; if levels.iter().any(|&l| l != 0) { if vert { @@ -28200,6 +28389,13 @@ fn read_inter_rect_chroma( (write_chroma_w, write_chroma_h): (usize, usize), chroma_side: usize, mode_for_tx: usize, + // lane-av1chrtx: this block's coded luma transform leaves, `(row, col, + // tw, th, tx_type)` -- the same list the 4:4:4 four-unit arms resolve + // through `covering_leaf_tx_type`. This sibling used to hand EVERY unit + // the block-level `luma_tx_type` (the top-left leaf's type), so a rect + // inter block whose chroma plane splits (`nx*ny > 1`) over MIXED var-tx + // leaves read the wrong type per unit. + leaf_tx_types: &[(usize, usize, usize, usize, TxType)], luma_tx_type: TxType, fctx: &crate::decode::FrameCtx, ) -> Result<(Grid, Grid, Vec<((usize, usize), usize, Grid, usize, usize)>)> { @@ -28225,7 +28421,12 @@ fn read_inter_rect_chroma( let invalid_ss_plane = ss_x(fctx) == 1 && ss_y(fctx) == 0 && (write_chroma_w, write_chroma_h) == (4, 32); let (uw, uh) = if invalid_ss_plane { (4, 8) } else { (uw, uh) }; - let inherit_tx_type = Some(luma_tx_type); + // lane-av1chrtx: `inherit_tx_type` is resolved PER UNIT below, not once + // for the block -- `av1_get_tx_type` (blockd.h:1287-1297) reads + // `xd->tx_type_map` at the chroma unit's own position scaled back to + // luma, so a unit sitting over a luma leaf that coded NOTHING takes that + // leaf's `DCT_DCT` stamp (`decodetxb.c:199-203`), not the block-level + // (top-left leaf) type. let (nx, ny) = (write_chroma_w / uw, write_chroma_h / uh); let multi = nx * ny > 1; let set = rect_inter_chroma_set(uw, uh)?; @@ -28263,6 +28464,7 @@ fn read_inter_rect_chroma( at_mi.0 + cu_row * (span_y / MI), at_mi.1 + cu_col * (span_x / MI), ); + let unit_rel_mi = (cu_mi.0 - at_mi.0, cu_mi.1 - at_mi.1); let cu_around = if multi { // lane-av1422ctxgather: at ss (1,0) the unit's above // span covers `uw` chroma px = `2*uw` luma mi columns, @@ -28282,6 +28484,16 @@ fn read_inter_rect_chroma( }; let (cu_x, cu_y) = (cpx + cu_col * uw, cpy + cu_row * uh); let cu_pred = src.offset(cu_row * uh * chroma_side + cu_col * uw); + let inherit_tx_type = + if let Some(t) = covering_leaf_tx_type(leaf_tx_types, unit_rel_mi) { + hit!(CHROMA_RECT_LEAF_TX_HITS); + if Some(t) != Some(luma_tx_type) { + hit!(CHROMA_RECT_LEAF_TX_DIFF_HITS); + } + Some(t) + } else { + Some(luma_tx_type) + }; let cu_grid = read_inter_plane_rect( dec, cdfs, @@ -28366,6 +28578,8 @@ fn read_inter_plane_rect( if plane_idx > 0 && mono(fctx) { return Ok((Grid::Zero(w * h), TxType::DctDct)); } + // lane-av1readcensus: the units read from here on are this plane's. + set_census_plane(plane_idx); let skip_ctx = if plane_idx == 0 { // `get_txb_ctx_general`: 0 only when this unit IS the whole plane // block; a var-tx leaf passes its own neighbour-table context. @@ -28442,6 +28656,7 @@ fn read_inter_plane_rect( skip_ctx, dc_sign_ctx(around.2), default_tx_type, + plane_idx, )? }; let grid = extend_corner(corner, cw, ch, w, h); @@ -35435,6 +35650,8 @@ fn read_inter_plane( if plane_idx > 0 && mono(fctx) { return Ok((Grid::Zero(side * side), TxType::DctDct)); } + // lane-av1readcensus: the units read from here on are this plane's. + set_census_plane(plane_idx); let skip_ctx = if plane_idx == 0 { luma_skip_ctx.unwrap_or(0) } else { @@ -35661,10 +35878,7 @@ fn read_intra_chroma_lossless( /// skipped (the returned order is the identity). `changed` is `true` only /// when the sort actually permutes the list, so a no-op ordering reads zero /// on [`MU_CHUNK_ORDER_HITS`] and cannot make a gate look armed. -fn mu_chunk_order( - leaves: &[(usize, usize, usize, usize)], - side: usize, -) -> (Vec, bool) { +fn mu_chunk_order(leaves: &[(usize, usize, usize, usize)], side: usize) -> (Vec, bool) { let identity: Vec = (0..leaves.len()).collect(); if side <= 64 { return (identity, false); @@ -37943,6 +38157,39 @@ pub(crate) fn chroma_quad_leaf_tx_diff_hits() -> usize { CHROMA_QUAD_LEAF_TX_DIFF_HITS.with(std::cell::Cell::get) } +thread_local! { + /// lane-av1chrtx: chroma units of a RECT inter block + /// ([`read_inter_rect_chroma`], the sibling of the 4:4:4 four-unit arms) + /// that resolved their `tx_type` from the luma leaf covering their OWN + /// quadrant instead of the block-level one. A SEPARATE counter from + /// [`CHROMA_QUAD_LEAF_TX_HITS`] on purpose: that one gates a 4:2:0 control + /// that must stay at exactly 0, and this route IS reachable at 4:2:0, so + /// sharing the counter would destroy that control's meaning. + pub(crate) static CHROMA_RECT_LEAF_TX_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +thread_local! { + /// Of those, how many resolved a type that DIFFERS from the block-level + /// one -- the condition that changes pixels. A route counter alone fires + /// on every multi-unit rect chroma read, including the blocks whose + /// leaves all agree (the exact shape a no-op fix looks green on). + pub(crate) static CHROMA_RECT_LEAF_TX_DIFF_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// [`CHROMA_RECT_LEAF_TX_HITS`]: rect chroma units that took their type from +/// the covering luma leaf. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn chroma_rect_leaf_tx_hits() -> usize { + CHROMA_RECT_LEAF_TX_HITS.with(std::cell::Cell::get) +} + +/// [`CHROMA_RECT_LEAF_TX_DIFF_HITS`]: of those, the units whose covering +/// leaf's type differs from the block-level one. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn chroma_rect_leaf_tx_diff_hits() -> usize { + CHROMA_RECT_LEAF_TX_DIFF_HITS.with(std::cell::Cell::get) +} + fn decode_inter_block( dec: &mut SymbolDecoder, cdfs: &mut Cdfs, @@ -39874,6 +40121,7 @@ fn decode_inter_block( (write_chroma_w, write_chroma_h), chroma_stride, mode_for_tx, + &leaf_tx_types, luma_tx_type, fctx, )?; @@ -41666,6 +41914,7 @@ fn decode_inter_block( (write_chroma_w, write_chroma_h), chroma_stride, mode_for_tx, + &leaf_tx_types, luma_tx_type, fctx, )?; @@ -42316,8 +42565,7 @@ fn decode_inter_block( if side > 64 { let chunk = (row / 16, col / 16); let done = pos + 1 == order.len() - || (leaves[order[pos + 1]].0 / 16, leaves[order[pos + 1]].1 / 16) - != chunk; + || (leaves[order[pos + 1]].0 / 16, leaves[order[pos + 1]].1 / 16) != chunk; if !done { continue; } @@ -44693,6 +44941,7 @@ fn decode_intra_sub8_leaf( 0, dc_sign_ctx(around.2), TxType::DctDct, + 0, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -45078,6 +45327,7 @@ fn decode_intra_sub8_leaf( skip_ctx, dc_sign_ctx(around.2), uv_tx, + plane, )?; let residual = dequant_and_inverse_typed_wh( &levels, @@ -52761,6 +53011,46 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( #[cfg(test)] mod tests { + /// lane-av1chrtx: [`covering_leaf_tx_type`] resolves a chroma unit's + /// `tx_type` from the luma leaf covering the unit's OWN quadrant, and + /// reports "no leaf there" as `None` so the caller can fall back to the + /// block-level type. Both halves are load-bearing: the 128 mu-chunk tail, + /// the 4:4:4 four-unit arms and `read_inter_rect_chroma` all read the + /// `None` arm as "this block coded a single luma unit". + #[test] + fn covering_leaf_tx_type_picks_the_leaf_under_the_unit_or_reports_none() { + use TxType::*; + // A 32x64 strip's five-leaf tree, in decode order: one 32x32 leaf + // over mi rows 0..8, then 16x16 leaves. (row, col) are MI relative + // to the block, (tw, th) are PIXELS, MI == 4. + let leaves = [ + (0usize, 0usize, 32usize, 32usize, Idtx), + (8, 0, 16, 16, VDct), + (8, 4, 16, 16, DctDct), + (12, 0, 16, 16, HDct), + (12, 4, 16, 16, VDct), + ]; + // The TOP chroma unit (its own mi cell (0,0)) sits over the 32x32 + // leaf; the LOWER one (mi (8,0)) over the first 16x16 leaf. The + // block-level type is the first leaf's, so only the second read + // differs -- exactly the condition the gate's DIFF counter counts. + assert_eq!(covering_leaf_tx_type(&leaves, (0, 0)), Some(Idtx)); + assert_eq!(covering_leaf_tx_type(&leaves, (8, 0)), Some(VDct)); + // Interior cells resolve the same leaf as the cell's top-left: the + // lookup is a rectangle containment test, not a raster position. + assert_eq!(covering_leaf_tx_type(&leaves, (11, 3)), Some(VDct)); + assert_eq!(covering_leaf_tx_type(&leaves, (12, 4)), Some(VDct)); + // The bottom-right corner of the last leaf, and the mi cell just + // past the block's own extent, must not fall into a neighbour. + assert_eq!(covering_leaf_tx_type(&leaves, (15, 7)), Some(VDct)); + assert_eq!(covering_leaf_tx_type(&leaves, (16, 0)), None); + assert_eq!(covering_leaf_tx_type(&leaves, (0, 8)), None); + // A block with no var-tx tree (one coded luma unit) has no leaves at + // all: the caller's block-level fallback is the answer, and the + // resolver must say so rather than guess. + assert_eq!(covering_leaf_tx_type(&[], (0, 0)), None); + } + /// lane-av1422warp r33: the OBMC pair-merge snap must move the READ to /// libaom's position, not the reported offset. /// diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 8a53d0e9..ad3b403c 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -1837,6 +1837,10 @@ fn decode_frame( // 4:2:0 one never inherits the wrong plane count. crate::decode::set_mono(seq.mono_chrome, fctx); crate::decode::set_subsampling(seq.subsampling_x, seq.subsampling_y, fctx); + // lane-av1readcensus: the 4:4:4 coefficient-unit census is armed here, + // off the same sequence-header subsampling -- at 4:2:0/4:2:2 every census + // counter reads zero, so a 4:2:0 control can assert exactly that. + crate::decode::set_census_444(seq.subsampling_x, seq.subsampling_y); // lane-av1txr: spec 5.9.2 `disable_cdf_update` -- a frame that sets it // codes every tile symbol against the CDFs it started with, so the tile // readers must not adapt (libaom `decodeframe.c:2909`: @@ -19270,6 +19274,240 @@ pub(crate) mod tests { ); } + /// lane-av1chrtx: the SIBLING of lane-av1444chr's four-unit arm -- a RECT + /// inter block's chroma plane, read by `read_inter_rect_chroma`. That + /// helper was left handing every unit the block-level `luma_tx_type` + /// (the top-left leaf's type) after the four-unit arms were pointed at + /// `covering_leaf_tx_type`, so a rect block whose chroma plane splits + /// (`nx*ny > 1`) over MIXED var-tx leaves read the wrong type per unit. + /// + /// The witness is pinned into `fixtures/`: `testsrc2 256x256` yuv444p 3 + /// frames, aomenc `--profile=1 --cq-level=30 --cpu-used=0 --sb-size=64 + /// --min-partition-size=32 --max-partition-size=64 --enable-tx-size-search=1 + /// --passes=1 --end-usage=q --threads=1 --row-mt=0 --lag-in-frames=0 + /// --kf-max-dist=100 --limit=3 --obu`; 26839 bytes, sha256 + /// `06174a66e92aaeb751a8e86db59711fcb1f18d74bde2d77e1ef1be7983eb7c80`. + /// Its one qualifying block is the 32x64 inter strip at mi(32,48): a + /// 4:4:4 chroma plane of (32,64) = TWO TX_32X32 units, over a luma tree + /// of five leaves -- `Idtx` (32x32) on top, then `VDct`/`DctDct`/`HDct`/ + /// `VDct` 16x16 leaves. The lower chroma unit therefore inherits `VDct` + /// where the block-level value is `Idtx`. + /// + /// Getting a witness at all took a bounded hunt (200+ encodes): `multi` + /// is false by construction at 4:2:0 (a `side <= 64` block's chroma plane + /// is at most 32x32 = one unit), so the arm needs 4:4:4 AND a rect block + /// that keeps a 64-px axis, AND `--cpu-used=0` with `--min-partition-size=32` + /// to make aomenc actually pick the 32x64 strip. + /// + /// The non-vacuity bar is the DIFFERS counter, not the route counter: the + /// control below is a committed 4:4:4 rect stream where the route fires + /// and still changes nothing, because that block's leaves agree. + #[test] + fn a_pinned_444_rect_inter_stream_resolves_each_chroma_unit_from_its_own_luma_leaf() { + const NAME: &str = + "a_pinned_444_rect_inter_stream_resolves_each_chroma_unit_from_its_own_luma_leaf"; + const FIXTURE_LEN: usize = 26839; + const FIXTURE_FNV: u64 = 0xc77f_310c_036d_ff73; + let _gate_lock = lock_gate_counters(); + if !have_aomenc() { + eprintln!( + "SKIP {NAME}: no aomenc/aomdec oracle at {}", + aomenc_path().display() + ); + return; + } + let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/444_rect_strip_leaf_tx_type.obu"); + let stream = std::fs::read(&path) + .unwrap_or_else(|e| panic!("{NAME}: reading {}: {e}", path.display())); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let hits0 = crate::decode::chroma_rect_leaf_tx_hits(); + let diff0 = crate::decode::chroma_rect_leaf_tx_diff_hits(); + let (frames, hidden) = decode_all_frames_vs_oracle(&stream, NAME); + let hits = crate::decode::chroma_rect_leaf_tx_hits() - hits0; + let diff = crate::decode::chroma_rect_leaf_tx_diff_hits() - diff0; + assert_eq!( + frames, 3, + "{NAME}: expected 3 decode-order frames ({hidden} hidden)" + ); + assert!( + hits >= 2 * diff && hits > 0, + "{NAME}: no rect chroma unit took its type from the covering luma leaf (hits {hits}, \ + differs {diff}) -- the corrected route never ran" + ); + assert!( + diff >= 2, + "{NAME}: the per-unit resolve never CHANGED an answer (diff {diff}; measured 2 on this \ + stream, one per chroma plane). A route counter alone is not a witness: the control \ + below fires it and changes nothing." + ); + eprintln!( + "{NAME}: rect chroma units resolved from their own leaf {hits}, of which {diff} differed" + ); + + // Control: a committed 4:4:4 rect stream where the SAME route fires + // and every resolved type equals the block-level one -- the shape a + // no-op fix would also be green on. + let control = std::fs::read( + std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/444_sb128rect_lr_witness.obu"), + ) + .unwrap_or_else(|e| panic!("{NAME}: reading the rect-strip control: {e}")); + let c_hits0 = crate::decode::chroma_rect_leaf_tx_hits(); + let c_diff0 = crate::decode::chroma_rect_leaf_tx_diff_hits(); + let c_frames = decode_stream(&control) + .unwrap_or_else(|e| panic!("{NAME}: the rect-strip control no longer decodes: {e}")) + .len(); + let c_hits = crate::decode::chroma_rect_leaf_tx_hits() - c_hits0; + let c_diff = crate::decode::chroma_rect_leaf_tx_diff_hits() - c_diff0; + assert!( + c_frames > 0, + "{NAME}: the rect-strip control decoded no frames" + ); + assert!( + c_hits > 0 && c_diff == 0, + "{NAME}: the rect-strip control fired the route {c_hits} times with {c_diff} differing \ + types -- expected the single-unit/same-type shape (route fires, nothing changes)" + ); + } + + /// lane-av1readcensus: the 4:4:4 coefficient-UNIT census, pinned. + /// + /// The lane report `av1444rect` round 4 left an unexplained signal: 636 + /// square chroma reads against the oracle's 1086, and 2052 luma reads + /// against its 1309, recorded as "most likely a counting-shape difference" + /// with no evidence either way. This gate is that evidence. + /// + /// Measured on this arm (`ll444_minp8_inter`, pixel-exact against aomdec + /// on every plane of every frame -- see + /// `a_lossless_444_min_partition8_inter_stream_decodes_sample_exact`), + /// pairing each of our 11292 walked units with the oracle's + /// `av1_read_coeffs_txb` call BY `post_rng` (the msac state after the + /// unit) rather than by plane label or walk position: EVERY unit pairs, + /// and no unit's plane, shape, eob or all-zero flag differs. The per-plane + /// split is equal too -- 3764 units per plane on both sides, of which + /// 975 / 1793 / 1859 coded coefficients. So on a pixel-exact arm there is + /// no asymmetry to explain at all; the round-4 numbers came from + /// `444_intrabc_rect4_witness`, an arm that DIVERGES (390380 of 921600 + /// samples wrong), where our surplus is the divergence itself. + /// + /// What this gate pins is the walk's OBJECT SHAPE on the pixel-exact arm: + /// a change to the number or plane split of coefficient units this decoder + /// walks shows up here as an intentional diff, not as the next lane's + /// mystery signal. The 4:2:0 control asserts the census is inert there. + #[test] + fn a_pixel_exact_444_stream_walks_the_same_coefficient_units_the_oracle_does() { + const NAME: &str = + "a_pixel_exact_444_stream_walks_the_same_coefficient_units_the_oracle_does"; + const FIXTURE_LEN: usize = 34037; + const FIXTURE_FNV: u64 = 0x2c8f_4a2c_c025_52da; + let _gate_lock = lock_gate_counters(); + if !have_aomenc() { + eprintln!( + "SKIP {NAME}: no aomenc/aomdec oracle at {}", + aomenc_path().display() + ); + return; + } + let path = + std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("fixtures/ll444_minp8_inter.obu"); + let stream = std::fs::read(&path) + .unwrap_or_else(|e| panic!("{NAME}: reading {}: {e}", path.display())); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + let delta = |now: [usize; 3], before: [usize; 3]| { + [now[0] - before[0], now[1] - before[1], now[2] - before[2]] + }; + + let u0 = crate::decode::census_444_units(); + let c0 = crate::decode::census_444_coded(); + let (frames, hidden) = decode_all_frames_vs_oracle(&stream, NAME); + assert_eq!( + frames + hidden, + 8, + "{NAME}: expected 8 decode-order frames (6 shown + 2 hidden)" + ); + let walked = delta(crate::decode::census_444_units(), u0); + let coded = delta(crate::decode::census_444_coded(), c0); + + // The oracle's own census on the same stream, paired by post_rng: + // 3764 units per plane, 975 / 1793 / 1859 of them coded. + assert_eq!( + walked, + [3764, 3764, 3764], + "{NAME}: the 4:4:4 unit walk changed -- {walked:?} against the oracle's \ + [3764, 3764, 3764] (measured by post_rng pairing, every unit matching). A change \ + here is a WALK-SHAPE change: re-measure against aomdec before assuming it is a bug" + ); + assert_eq!( + coded, + [975, 1793, 1859], + "{NAME}: the coded-unit split changed -- {coded:?} against the oracle's [975, 1793, 1859]" + ); + assert!( + walked.iter().all(|&v| v > 0) && coded.iter().all(|&v| v > 0), + "{NAME}: an all-zero plane split means the census did not run, not that the walk is empty" + ); + + // A SECOND pixel-exact arm, with a MIXED unit-shape mix -- the pinned + // lossless stream above is all TX_4X4 (min-partition-8), so on its own + // it would not notice a var-tx walk that started folding 8x8/4x8 + // leaves. This one walks 4x4/8x8/8x4/4x8/4x16/16x4/8x16/16x16, and + // the oracle's census on it pairs unit-for-unit by post_rng with no + // shape, plane, eob or all-zero difference: 1373 units, 629 luma and + // 372 per chroma plane, of which 130 / 253 / 278 coded. + let path2 = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/444_lossy_rect4_inter_witness.obu"); + let stream2 = std::fs::read(&path2) + .unwrap_or_else(|e| panic!("{NAME}: reading {}: {e}", path2.display())); + let m0 = crate::decode::census_444_units(); + let mc0 = crate::decode::census_444_coded(); + let (frames2, hidden2) = decode_all_frames_vs_oracle(&stream2, NAME); + assert!( + frames2 + hidden2 > 0, + "{NAME}: the mixed-shape 4:4:4 arm decoded no frames" + ); + let walked2 = delta(crate::decode::census_444_units(), m0); + let coded2 = delta(crate::decode::census_444_coded(), mc0); + assert_eq!( + walked2, + [629, 372, 372], + "{NAME}: the mixed-shape 4:4:4 walk changed -- {walked2:?} against the oracle's \ + [629, 372, 372]. The all-4x4 arm above cannot see a var-tx fold; this one can" + ); + assert_eq!( + coded2, + [130, 253, 278], + "{NAME}: the mixed-shape coded-unit split changed -- {coded2:?} against the oracle's \ + [130, 253, 278]" + ); + + // 4:2:0 control: the census is a 4:4:4 question and must not fire. + let control = std::fs::read( + std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/av1_192x128_8bit_intra64_in_inter.obu"), + ) + .unwrap_or_else(|e| panic!("{NAME}: reading the 4:2:0 control: {e}")); + let k0 = crate::decode::census_444_units(); + let kc0 = crate::decode::census_444_coded(); + let k_frames = decode_stream(&control) + .unwrap_or_else(|e| panic!("{NAME}: the 4:2:0 control no longer decodes: {e}")) + .len(); + assert!(k_frames > 0, "{NAME}: the 4:2:0 control decoded no frames"); + assert_eq!( + delta(crate::decode::census_444_units(), k0), + [0, 0, 0], + "{NAME}: the 4:4:4 census fired on the 4:2:0 control" + ); + assert_eq!( + delta(crate::decode::census_444_coded(), kc0), + [0, 0, 0], + "{NAME}: the 4:4:4 coded-unit census fired on the 4:2:0 control" + ); + } + /// lane-inter4 r2: the 32x32-level inter `PARTITION_HORZ`/`PARTITION_VERT` /// strips (32x16 / 16x32) carrying a REAL residual -- the capability r1 /// found missing ("a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs @@ -39529,7 +39767,6 @@ pub(crate) mod tests { "{NAME}: no attempt decoded a depth-1 1:4 split strip -- the recipe no longer \ covers the shape this round fixed" ); - eprintln!("{NAME}: {depth1_decoded} depth-1 1:4 split strips decoded pixel-exact"); } /// The chroma-rect gate's fixture + aomenc recipe for one attempt, shared diff --git a/lanes/av1chrtx.report.md b/lanes/av1chrtx.report.md new file mode 100644 index 00000000..d6efca47 --- /dev/null +++ b/lanes/av1chrtx.report.md @@ -0,0 +1,187 @@ +# lane-av1chrtx — rect inter chroma per-unit tx_type (H1) + rect coeff-trace plane tag (H2) + +Branch `lane-av1chrtx` (worktree `~/.cache/wt/av1chrtx`), base `a21f3680`. +Oracle `~/.cache/aom-oracle/build/{aomdec,aomenc}` (instrumented). +`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1chrtx`. + +Commits: `d791c464` (H2), `2142d2cf` (H1) — one per defect, as chartered. + +--- + +## H1 — FIXED. `read_inter_rect_chroma` handed every chroma unit the BLOCK-level `tx_type` + +### The defect + +`read_inter_rect_chroma` is the sibling of the two 4:4:4 four-unit arms. +lane-av1444chr extracted `covering_leaf_tx_type` and re-pointed both +four-unit arms at it, but left this sibling passing the block-level +`luma_tx_type` (the top-left leaf's type) to **every** unit of the plane: + +```rust +let inherit_tx_type = Some(luma_tx_type); // before +``` + +`av1_get_tx_type` (`blockd.h:1287-1297`) reads `xd->tx_type_map` at the +chroma unit's own position scaled back to luma, and `read_coeffs`'s +`all_zero` arm stamps `DCT_DCT` into that leaf's map cell +(`decodetxb.c:199-203`) — so a unit sitting over a luma leaf that coded +**nothing** inherits `DctDct`, not the block-level type. With +`nx*ny > 1` over mixed var-tx leaves that is a per-unit wrong answer. + +### The witness hunt (bounded, then found) + +lane-av1444chr's report recorded the route as unreachable on five +4:4:4 rect recipes (`multi` = 0 on every one). Two facts explain why, +and they shape the hunt: + +1. **`multi` is false by construction at 4:2:0.** The arm is only reached + for `side <= 64` blocks (the `side > 64` mu-chunk path runs first), and + a `side <= 64` block's 4:2:0 chroma plane is at most 32x32 — exactly + one `uw x uh` unit, so `nx*ny == 1` always. The earlier hunt's + recipes were 4:4:4 but used partition settings that never produced a + block keeping a 64-px axis. +2. So the arm needs **4:4:4 AND a rect block with a 64-px luma axis** + (32x64 / 64x32 / 64x16 / 16x64) — a 4:4:4 chroma plane then exceeds + the 32 cap on one axis and splits. + +Hunt: 200+ encodes, three 4:4:4 sources (testsrc2 128/192/256, mandelbrot +128/256, testsrc2 192x256), swept over `--min-partition-size` 8/16/32, +`--max-partition-size` 32/64/128, `--enable-tx-size-search` 0/1, +`--enable-rect-partitions`, `cq-level` 18-44, `--cpu-used` 0/2/3/5/7, +sizes 128x128 through 256x256. Instrumented with a temporary +`EC_AV1_CHRTX_PROBE` eprintln in the arm printing `(nx, ny, multi, leaves)` +(removed before the commit). + +Result: the arm's `multi` is 0 on every 4:2:0 recipe and on every 4:4:4 +recipe whose rect strips keep a 32-px axis. It first fires with +**`--cpu-used=0 --min-partition-size=32 --max-partition-size=64` on a +256x256 source** — the slow encoder is what actually picks a 32x64 strip +over two 32x32 blocks. + +### The witness (pinned) + +`crates/ec-av1/fixtures/444_rect_strip_leaf_tx_type.obu`, 26839 bytes, +sha256 `06174a66e92aaeb751a8e86db59711fcb1f18d74bde2d77e1ef1be7983eb7c80`, +fnv1a64 `0xc77f310c036dff73`. + +``` +ffmpeg -f lavfi -i "testsrc2=size=256x256:rate=25" -frames:v 3 -pix_fmt yuv444p \ + -f yuv4mpegpipe ts256.y4m +aomenc --codec=av1 --profile=1 --cq-level=30 --cpu-used=0 --sb-size=64 \ + --min-partition-size=32 --max-partition-size=64 --enable-tx-size-search=1 \ + --passes=1 --end-usage=q --threads=1 --row-mt=0 --lag-in-frames=0 \ + --kf-max-dist=100 --limit=3 --obu -o w.obu ts256.y4m +``` + +The qualifying block is the **32x64 inter strip at mi(32,48)**: +a 4:4:4 chroma plane of `(32, 64)` = **two** TX_32X32 units, over a +five-leaf luma tree + +| leaf (row, col, tw, th, tx_type) | covering mi rows | +|---|---| +| `(0, 0, 32, 32, Idtx)` | 0..8 | +| `(8, 0, 16, 16, VDct)` | 8..12 | +| `(8, 4, 16, 16, DctDct)` | 8..12 | +| `(12, 0, 16, 16, HDct)` | 12..16 | +| `(12, 4, 16, 16, VDct)` | 12..16 | + +The **lower** chroma unit (its own mi cell `(8, 0)`) therefore resolves +`VDct` where the block-level value is `Idtx` — once per chroma plane, so +`diff = 2`. The upper unit resolves `Idtx`, i.e. the same as the +block-level value: the defect is strictly per-unit. + +### The fix + +- `read_inter_rect_chroma` takes the block's `leaf_tx_types` and resolves + `inherit_tx_type` **per unit** through the shared + `covering_leaf_tx_type(leaf_tx_types, unit_rel_mi)`, with + `.unwrap_or(luma_tx_type)` as the fallback for a block that coded a + single luma unit (no vartx tree, so `leaves` is empty). Both call sites + (the compound and single-reference copies of `decode_inter_block`) + pass their `&leaf_tx_types` — the same list the four-unit arms read. +- Two new gate counters, `CHROMA_RECT_LEAF_TX_HITS` / + `CHROMA_RECT_LEAF_TX_DIFF_HITS`, deliberately **separate** from + `CHROMA_QUAD_LEAF_TX_HITS` / `_DIFF_HITS`: the latter pair gates a + 4:2:0 control asserting exactly `(0, 0)`, and this route **is** + reachable at 4:2:0, so sharing the counter would destroy that + control's meaning. + +### Bar + +- **Red-before by mutation** (revert only the resolve to the block-level + type; everything else intact): + `decode-order frame 1 of 3 (3 shown, 0 hidden) differs from the oracle + at byte 105949 (ours 166 vs 167), 1998 bytes differ`. + Restored: green. (A first mutation attempt used `.or(None::)`, + which is the identity on `Option` and therefore did **not** bite — the + red run above uses `.and(None::)`, the real removal.) +- **New gate** `stream::tests::a_pinned_444_rect_inter_stream_resolves_each_chroma_unit_from_its_own_luma_leaf`: + fixture length + fnv pinned, `decode_all_frames_vs_oracle` (length- + asserting, byte-exact, 3 frames, 0 hidden), asserts `hits >= 2*diff && + hits > 0` and **`diff >= 2`**. + Measured: `rect chroma units resolved from their own leaf 4, of which 2 differed`. +- **In-gate control**: the committed + `fixtures/444_sb128rect_lr_witness.obu` fires the same route (2 units + resolved) with **0** differing types — the exact shape a no-op fix + looks green on, which is why the DIFF counter and not the route counter + is the non-vacuity bar. +- **Resolver unit test** `decode::tests::covering_leaf_tx_type_picks_the_leaf_under_the_unit_or_reports_none`: + mixed-leaf lookup on the witness's own five-leaf tree, interior cells + (containment, not raster position), the mi cell just past the block's + extent → `None`, and the empty leaf list → `None`. + Mutation-proven red: turning the containment `<` into `<=` → + `panicked at crates/ec-av1/src/decode.rs:52883, left: Some(Idtx), right: Some(VDct)`. + Restored: green. +- **Identity green** (13 tests, one binary, `--test-threads=4`, no SKIP + lines): the new gate, the resolver unit test, the av1444chr gate + (`quad-resolved chroma units 96, of which 8 differed` — unchanged), plus + `a_444_lossy_rect4_inter_stream_decodes_pixel_exact`, + `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact`, + `a_lossless_444_defaultp_inter_strip_stream_decodes_byte_exact`, + `a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact`, + `a_lossless_444_min_partition8_inter_stream_decodes_sample_exact`, + `a_real_aomenc_rect_inter_block_predicts_chroma_with_the_narrow_kernel_pixel_exact`, + `a_real_aomenc_rect_strip_palette_decodes_pixel_exact`, + `a_real_aomenc_inter_sequence_with_a_16_level_rect_leaf_decodes_pixel_exact`, + `a_444_intrabc_rect4_reads_its_own_chroma_plane_block`, + `a_lossless_444_rect16x4_chroma_reach_is_ss_aware` — **13 passed, 0 failed**. + +--- + +## H2 — FIXED. `read_coeffs_rect`'s `EC_COEFF_STEP` traces hardcoded `plane=0` + +`read_coeffs_rect` printed `plane=0` on both tagged lines +(`tag=all_zero`, `tag=tx_type`), so every **chroma** rect coefficient +read was logged as a luma one. Two independent lane reports mis-read a +chroma unit's `txb_skip` / `tx_type` symbol on those lines and followed +the luma arm — the log could not tell them apart. + +Fix: a `plane: usize` parameter on `read_coeffs_rect`, with each of the +twenty call sites passing its own plane (`0` for the luma readers, +`plane_idx` / `plane` where the enclosing reader already has one). +`read_chroma_coeffs_rect` takes the same parameter and passes it +through, so the U and V call sites in `decode_block_rect`, +`decode_leaf_rect`, `decode_block_rect4`, `decode_rect4_16_strip` and +`decode_block_rect64` stop collapsing into one tag. + +**Measurement** (`EC_TRACE_COEFF=1` on +`a_444_lossy_rect4_inter_stream_decodes_pixel_exact`): + +| line | before | after | +|---|---|---| +| `tag=all_zero` | 932 lines, all `plane=0` | 312 `plane=0` / 310 `plane=1` / 310 `plane=2` | +| `tag=tx_type` | 110 lines, all `plane=0` | 110 `plane=0` (this set's units are luma-only on this fixture) | + +No trace output changes in a default build: both lines are behind +`coeff_trace_on()`, i.e. the env-gated `EC_TRACE_COEFF`. No gate output +changes — the counter and assert set is untouched by this commit. + +--- + +## Not run here (Main's validation) + +Full crate suite, the multi-encode sweeps +(`a_real_aomenc_inter_sequence_with_a_16_level_rect_leaf_decodes_pixel_exact` +was run as a single named test only), the 4:2:0/10-bit/12-bit sweep +families, and the server stages. Local runs were single named tests / one +named-test batch, per the lane's local-scope rule. diff --git a/lanes/av1readcensus.report.md b/lanes/av1readcensus.report.md new file mode 100644 index 00000000..c7e24d21 --- /dev/null +++ b/lanes/av1readcensus.report.md @@ -0,0 +1,189 @@ +# lane-av1readcensus — the 4:4:4 coefficient-read count asymmetry, settled + +**Branch:** `lane-av1readcensus`, worktree `~/.cache/wt/av1readcensus`, stacked on +`lane-av1chrtx` (`ff7cf47c`, whose `d791c464` threaded the real plane index into +`read_coeffs_rect`'s traces — the census pairs on that). + +**Verdict: COUNTING SHAPE — and not even that. On every pixel-exact 4:4:4 arm +there is no asymmetry at all: both sides walk the same number of units, in the +same order, with the same plane, shape, eob and all-zero flag. The recorded +636-vs-1086 / 2052-vs-1309 signal came from an arm that DIVERGES, where the +surplus is the divergence itself, not a counting-shape difference.** + +## 1. The signal, and why the census was admissible only on a pixel-exact arm + +`av1444rect` round 4 recorded 636 square chroma reads against the oracle's 1086, +and 2052 luma reads against its 1309, on `444_intrabc_rect4_witness`, and filed +it as "most likely a counting-shape difference … it is NOT established either +way". Two things had to be settled before counting anything: + +- the arm must be **pixel-exact**. On a diverging arm the counts are polluted by + the divergence: a decoder reading the wrong coefficients also walks a different + number of units, so the count difference is a *symptom*, and the count cannot + distinguish cause from effect. Measured: `444_intrabc_rect4_witness` is wrong in + 390380 of 921600 samples, and `444_leaf8_oob` in 281306 of 737280. +- the pairing must not assume either side's own labels. + +Measured exactness of every 4:4:4 fixture in the crate (ours vs `aomdec +--rawvideo`, plane-concatenated, u16→u8): + +| fixture | pixels | pixel-exact? | +|---|---|---| +| `ll444_minp8_inter` | 6 frames | **yes** | +| `444_quad_leaf_tx_type` | 4 frames | **yes** | +| `444_lossy_rect4_inter_witness` | 2 frames | **yes** | +| `444_rect_strip_leaf_tx_type` | 3 frames | **yes** | +| `444_sb128rect_lr_witness` | 3 frames | **yes** | +| `444_intrabc_rect4_witness` | 1 frame | no (390380 / 921600 wrong) | +| `444_leaf8_oob` | 3 frames | no (281306 / 737280 wrong) | + +## 2. Method — the census, both sides, same frame + +**Ours.** A new env-gated rung `EC_CENSUS_UNIT` (`EC_CENSUS_UNIT=1`), one line +per coefficient unit **this decoder walks** — one per `read_coeffs` / +`read_coeffs_rect` call, which is exactly the object the round-4 count measured. +Fields: `n` (sequential index), `plane`, `w`, `h`, `tx`, `eob`, `all_zero`, +`entry_rng` (msac `range` before the unit's `txb_skip` read), `post_rng` (after +the unit). The plane comes from a thread-local stamped by the plane-owning +readers (`read_plane`, `read_inter_plane`, `read_inter_plane_rect`) and by +`read_coeffs_rect` from the real `plane` argument lane-av1chrtx already threads +in — a thread-local rather than a `read_coeffs` parameter because the three +luma-only call sites (`decode_rect_split`, `decode_block_rect64`, +`read_inter_plane_rect`'s corner) belong to other lanes. + +**Oracle.** No rebuild needed: the instrumented aomdec already brackets every +`av1_read_coeffs_txb` call with `EC_COEFF …rng=
` on entry and
+`EC_COEFF_VAL …rng=` on exit (`EC_TRACE_COEFF=1`), with
+`EC_COEFF_STEP tag=all_zero` / `tag=eob` inside the bracket. That is the same
+five fields.
+
+**Pairing: by `post_rng`, never by plane label and never by walk position or
+`n`.** `post_rng` is the msac state after the unit, so two units that consumed
+the same bits end at the same state. This matters concretely here: pairing by
+`n`/position invents matches the moment the two walks order a U and a V unit
+differently, and pairing by plane label invents them whenever a walk's plane
+attribution is what is in question. The walk is a two-pointer merge on `post_rng`;
+a unit is emitted only when the two sides agree on the pairing key.
+
+**Buckets** (each difference lands in exactly one):
+
+- **(i) SAME UNIT** — the two sides' units pair, and plane/shape/eob/all-zero agree.
+- **(ii) OUR-ONLY** — we walk a unit the oracle does not, at that bit position.
+- **(iii) ORACLE-ONLY** — the oracle walks one we do not.
+- **(iv) SIZE/ORDER** — the units pair but disagree on shape, plane label, eob
+  or all-zero.
+
+## 3. Per-bucket table (whole stream, paired by `post_rng`)
+
+| arm | pixels | units ours / oracle | (i) | (ii) | (iii) | (iv) |
+|---|---|---|---|---|---|---|
+| `ll444_minp8_inter` (6 frames) | exact | **11292 / 11292** | **11292** | 0 | 0 | 0 |
+| `444_lossy_rect4_inter_witness` (mixed shapes) | exact | **1373 / 1373** | **1373** | 0 | 0 | 0 |
+| `444_quad_leaf_tx_type` | exact | **192 / 192** | **192** | 0 | 0 | 0 |
+| `444_rect_strip_leaf_tx_type` | exact | 591 / 591 | 587 | 0 | 0 | 4 |
+| `444_sb128rect_lr_witness` | exact | 467 / 467 | 463 | 0 | 0 | 4 |
+| `444_intrabc_rect4_witness` | **diverges** | 2740 / 2395 | 1909 | 823 | 478 | 8 |
+| `444_leaf8_oob` | **diverges** | 1778 / 1678 | 1027 | 751 | 651 | 0 |
+
+Per-plane split on the primary arm, both sides identical:
+
+| | luma | u | v |
+|---|---|---|---|
+| units (ours) | 3764 | 3764 | 3764 |
+| units (oracle) | 3764 | 3764 | 3764 |
+| of which coded (`txb_skip == 0`) | 975 | 1793 | 1859 |
+
+So the round-4 asymmetry does not survive on an arm whose pixels are right.
+Reproduced exactly on the diverging arm: `444_intrabc_rect4_witness` reads 1518
+luma / 611 / 611 against the oracle's 1309 / 543 / 543 — the luma 1309 and the
+per-plane 543/543 are *the round-4 oracle numbers*, so the count was never a
+counting artefact. It was a real count, taken on an arm that does not decode.
+
+## 4. The eight (iv) entries on the exact arms are a tracing artefact, not a defect
+
+On `444_rect_strip_leaf_tx_type` and `444_sb128rect_lr_witness`, 4 units each
+bucket as (iv). All four have **identical `entry_rng`, `post_rng`, `eob` and
+all-zero flag on both sides** and differ only in the reported extent:
+
+```
+idx 202: ours plane=0 32x32 eob=0 az=true | oracle plane=0 txsz=TX_64X64 eob=0 az=true | post=41441
+idx 498: ours plane=0 32x32 eob=0 az=true | oracle plane=0 txsz=TX_64X64 eob=0 az=true | post=33499
+```
+
+Both sides read exactly one `txb_skip` symbol and consumed the same bits; ours
+reports the *corner* it decoded (the 32×32 low-frequency corner of a 64×64
+luma block — `read_coeffs`' `rect_shape` path, spec 5.11.40) while libaom's
+`EC_COEFF` prints the `TX_64X64` it was called with. A shape **label**
+difference on an otherwise identical unit, not a walk difference. Two of the
+four also carry a plane-label difference with the same entry/post rng — the same
+class. Under the ticket's own rule ("a real divergence requires a unit in (i) or
+(iv) whose **eob/values** differ") these are neither: no eob and no value
+differs anywhere on any pixel-exact arm.
+
+## 5. Gate
+
+`a_pixel_exact_444_stream_walks_the_same_coefficient_units_the_oracle_does`
+(`crates/ec-av1/src/stream.rs`) pins the walk's object shape on two
+pixel-exact 4:4:4 arms:
+
+- `ll444_minp8_inter` — all-TX_4X4 (min-partition-8 lossless): `[3764, 3764,
+  3764]` units, `[975, 1793, 1859]` coded;
+- `444_lossy_rect4_inter_witness` — **mixed shapes** (4×4, 8×8, 8×4, 4×8, 4×16,
+  16×4, 8×16, 16×16): `[629, 372, 372]` units, `[130, 253, 278]` coded.
+
+The second arm is not redundant: the first is uniformly 4×4 and would not notice
+a var-tx walk that started folding 8×8 leaves. Both numbers are the oracle's own
+census on the same stream.
+
+**Mutation-proven.** Dropping 8×8 units from the walk turns it red by name:
+
+```
+the mixed-shape 4:4:4 walk changed -- [571, 313, 313] against the oracle's [629, 372, 372]
+  left: [571, 313, 313]   right: [629, 372, 372]
+```
+
+and the all-4×4 arm is untouched by that mutation — which is exactly why both
+arms are pinned.
+
+**4:2:0 control.** The census is armed per frame from the sequence header's
+subsampling (`set_census_444(ss_x, ss_y)` in `stream.rs`, beside
+`set_mono`/`set_subsampling`), so at 4:2:0/4:2:2 every counter stays zero; the
+gate asserts exactly `(0, 0, 0)` for both the unit and coded-unit counters on a
+committed 4:2:0 stream that decodes. The accounting is separate from the sibling
+counter pair the ticket mentions.
+
+## 6. What this settles for the next lane
+
+- The 636-vs-1086 / 2052-vs-1309 signal is **retracted**: it was measured on
+  `444_intrabc_rect4_witness`, which is wrong in 390380 of 921600 samples. Do not
+  carry it forward as a walk-shape hypothesis.
+- Counting the coefficient units on a **pixel-exact 4:4:4** arm reproduces the
+  oracle exactly, per plane, per unit. The census is now a one-command check:
+  `EC_CENSUS_UNIT=1 cargo run -p ec-av1 --example decode_probe -- .obu`
+  against `EC_TRACE_COEFF=1 aomdec`, paired by `post_rng`.
+- If a future lane sees a count asymmetry, the first question is whether the arm
+  decodes — not whether the walk shape differs. That check is now the gate.
+
+## 7. Not fixed here, by design
+
+The 4:4:4 intra-BC chroma divergence (`444_intrabc_rect4_witness`, 390380 /
+921600) is untouched: this lane's deliverable is the census. Per §4 there is no
+value-level divergence on any pixel-exact arm for this census to point at, so the
+remaining fork is not a coefficient-read-count problem and needs a fresh charter.
+
+## 8. Method notes for whoever repeats this
+
+- **Pair by `post_rng`.** Position/`n` pairing invents matches when a walk
+  orders U and V differently; plane-label pairing invents them when plane
+  attribution is the thing in question.
+- **A pixel-exact arm is mandatory.** On `444_intrabc_rect4_witness` the counts
+  diverge by 823/478 units *because* the decode does; the count difference is a
+  symptom, not a cause.
+- **`EC_SYMR` is still the right rung for symbol-level work**; `EC_COEFF_STEP`
+  is filtered (the oracle prints `tag=tx_type` for all three planes but reads it
+  only for Y), so it is not a per-unit bracket. `EC_COEFF`/`EC_COEFF_VAL` are
+  the per-unit bracket and were already in the oracle build — no rebuild needed.
+- Our own rung must carry the real plane: `read_coeffs` had no plane parameter,
+  and a stamp inherited from whichever reader ran last mis-attributes chroma as
+  luma (this bit the census's first run and is the same trap `d791c464` fixed for
+  the rect trace).