diff --git a/crates/ec-av1/examples/decode_probe.rs b/crates/ec-av1/examples/decode_probe.rs index ab64eea2..bc36ce1f 100644 --- a/crates/ec-av1/examples/decode_probe.rs +++ b/crates/ec-av1/examples/decode_probe.rs @@ -105,6 +105,10 @@ fn main() { ); let (h84, h48) = ec_av1::decode::sub8_inter_rect_hits(); println!("sub8_inter_rect: horz8x4={h84} vert4x8={h48}"); + println!( + "llintra8_chroma_walk: {}", + ec_av1::decode::llintra8_chroma_walk_hits() + ); let si = ec_av1::stream::sub8_intra_rect_hits(); println!( "sub8_intra_rect: horz8x4={} vert4x8={} chroma_ref={} mixed={} split4x4={}", @@ -216,6 +220,10 @@ fn main() { ec_av1::decode::chroma_edge_tu_clip_hits(), ec_av1::decode::skip_lossless_band_reset_hits(), ); + println!( + "llband: rect_split_lossless_chroma444={}", + ec_av1::decode::rect_split_lossless_chroma444_hits() + ); // lane-t900 r12: chroma edge-filter neighbour answered from the mi-granular // uv_mode grid instead of the coarse one-slot-per-column map. println!( diff --git a/crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu b/crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu new file mode 100644 index 0000000000000000000000000000000000000000..daaf7c390403b24a0f429616cd75f8cf2a5ddd26 GIT binary patch literal 794 zcmV+#1Lgb@0165q000BM{QLj&1TxbD5CDV#004vlz%$H>DK2Qo4+3BhKlfi^z}gF% z!}VW`2(ut$4!j4(oUD4z+wEe1MM>bxirx&8ARl_a9?PoA9HC<($6=pf>qPcKim}aBrT0$RIat1VieS@8AitwU7fZ| zt)X*(Q3JX|6yQvTBNC1Bb8&0R#0~F**l!9U$I>d_WkIV~&`=Kbj98Z5bZv%>r}YYW zaEmt+JLMw$UzvV3BV;L^b##ER3Fd#1wQms5|Mei)sWvAGUMgFv8jN+fOd*rEvAO^yi@F@l5Ux0m4q2 zgK=8G;(d-}=8q!qiMMb-R%zyT+76Hs05XmNFav;q002gcAOHZAF~bx60H++~MC9g1 ztinHYq@S^hSNf$0M?=U38loD|oH7&vacaROMxoI451S!i*Xc4SF$4;hA)MVIx4f02 z*}2#G6p=A`2~9dRA@|>oFM8L+x9s3gaM{a`rjMFP2Kr_(=E01|hcEx3cHihd~0QJSvM& zzM@kQN|UV}OXojZdBN(6u9zTFct4&CVO<`zH9t4=*qtFW@@6qzl;qmGS~*4U-Oo$! z9Qh9Q(mk3?fdx_vH`L$nL}Z>9lB^U@mHk!We>}tqQMXT<&TuZGSz-5Pl(g2+r8bWH YHr5r-6x3L($&{_ki@hu^WUx5$XEuj_{r~^~ literal 0 HcmV?d00001 diff --git a/crates/ec-av1/fixtures/ll444_minp64_inter.obu b/crates/ec-av1/fixtures/ll444_minp64_inter.obu new file mode 100644 index 0000000000000000000000000000000000000000..c27b15130ee7ed3ad656d8d46f1a8b143bcf5786 GIT binary patch literal 37658 zcmV(+K;6F*0165q0009w`{a|r5Hj;c6aXLq0FwVxv-%dt30H;(UG!X|Q`OyojFr>^ z$B<|c$c>iaVfOH$hD}`Dyf1Y$%Zj+uPc+Mp->>l%uSKL-qTCVLfKbr{ZZShc{*VJs zKB4bFfw*0II8-1-evmmHlj4q*dO+lB>y1v7I4CaQh8MHn9!;%!|f)#eNELS#&GS~Z=F+Rd!nWX32E z1Rh<`QRdPWcXhDyRBhFUmn9X&hJmGWVPnvXZ!k#&{m<%eCglEXhaYR`I_C-j*gDW^ zaIDgp3NhN{=dNCQ<>=yoz_JlwvB%-~ejmE&e`;G)%!u^9qYE^S;WpvkAUQYpe~<(6 z>z4y@Pz~>ZxNXi6bE)E?c%ljVh*)J!I_MTWfL6B12(kkn_faEvQF!5!-@&l5<15C` zbSFtR*E>VpcLC1`*|u6aXJS zRcnz7C%mw6mj@Yb4+NDIr|#h-!q+I}eRCW}z@by6!(8kIq;3z`F=s=Ci4@+c)d0au+KClQ>B=UBPnNezv# z<~bC8A7+lW3{r(!)sGGQ@ZZl1ug3!NdIzF<6qPATQwzp-*Q#J(ES*Nhw~!c~2e5cA zNRF-1>LRr+NiI`$c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84&*0Va6 z%PL%KQ~>DrVzpUQ1kYv`gfE3#ba%{BqklC6?M`I#{Oix1{5Be@SUlPqItKvi$NHLF zAy&H`c&^iA3L4!H$-5_R3mIM<~`jHy{jm>yVn z11Dw@FJPm|7#1g?EB@G@3>I1C@pJGu%7@0u{sXDh+^_=wpEb0t7cU@w@Kl#xf%MQ% zLrnwyZqzr_YL+XPGhhf&qf?xR5bEZad$Dr#SJvy*L&*W_9z~a9$W_PYpw!CN418tq z{@0%@d%3V{`T8`Kd|U-Z+vUbuAq(9&Jwm}o7;FuuN370ZubuDgmmP5Oex!?OTpExQgt_Fy5>992|97fzvQ08Y{c1vtHmxbOStj0 z;FtDYNQ`g(XqNoTE314jNqm~zj)tpd*{EN!qxV^&&67iaRN3;slBDm6%c%&zv}o1; zpC2#IZag`{U@6%4l*|!h(B0t8eYAR}bF@iXfwDnn{2XY63x}3sI^P-AUdGZniNt%> z*bZbWzqo@;-sNPrlkzIT-T47NzMEEk!;7k2luj)<(C`0C9DpwgWf=PaJ2nKDJ1dM$ e+nI-DhBxT3+vSI_K~k=(4qjzK;FBj-c%DoZB%$#D literal 0 HcmV?d00001 diff --git a/crates/ec-av1/fixtures/ll444_minp8_inter.obu b/crates/ec-av1/fixtures/ll444_minp8_inter.obu new file mode 100644 index 0000000000000000000000000000000000000000..ee63334825cb75cd3cca80b775b9494c6cb52dc0 GIT binary patch literal 34037 zcmV(lK=i*70165q0009w`|tnE5Hg=Z6aXLq0Qtv~ogL^tek9%H+W&~VS=t`UKRp+@ zGFAdU{2|!26 zWPj&vfKj5EZrsj|>KfgofREHAJDT8y88PnVj{SOyf@i+QUu6V=? z3uOZbAFG7^oxm>ff(r=>E^`QPmRLr~zw3MWIHYDB=x3c(u)Se|S)$?Z&t}`7WRjos zXqKywD1;?04noGu>igW$RS;}81L$0n?RLueHkW`JZo)FF{Tz`7b|2E(9rFYW(Z25? z=re2^lvLe6g!Xi&$R=SkFnT4q*10pFr+^twB;_4!yrW6Hr5JhXp13)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1D-cYWzghZwW_o+KjQZvdK z4d{P*=Nz67u%H8)tRH?#@$mZCWh-`x-nyFJZu>?bQ9_C&=4#6 literal 0 HcmV?d00001 diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index cf2f181e..e233c064 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -486,7 +486,15 @@ pub(crate) fn lossless_tx(px: usize, fctx: &crate::decode::FrameCtx) -> usize { /// picks the 13-symbol one (class `wrong-alphabet-same-value`). pub(crate) fn cfl_allowed_px(bw: usize, bh: usize, fctx: &crate::decode::FrameCtx) -> bool { if lossless(fctx) { - bw <= 8 && bh <= 8 + // `is_cfl_allowed`: at lossless CfL is available only when the + // partition size equals the transform size -- the CHROMA plane block + // must be a single TX_4X4. True for an 8x8 partition at 4:2:0 (its + // plane block is 4x4) and for 4x4 partitions; FALSE for an 8x8 + // partition at 4:4:4, whose plane block is 8x8 -- that partition + // reads the 13-symbol uv_mode CDF, and reading the CFL alphabet + // there desynced the tile from the leaf's own uv_mode symbol (class + // `wrong-alphabet-same-value`). + (bw >> ss_x(fctx)).max(4) == 4 && (bh >> ss_y(fctx)).max(4) == 4 } else { bw <= 32 && bh <= 32 } @@ -5313,6 +5321,10 @@ thread_local! { /// entropy bands were zeroed per unit (libaom `av1_reset_entropy_context`, /// decodeframe.c:1262) instead of leaking the previous occupant's. static SKIP_LOSSLESS_BAND_RESET_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// lane-av1-llband: 4x4 chroma transform units a lossless HORZ/VERT strip + /// walked at subsampling 0/0 (one unit per mi cell -- the geometry the + /// hardcoded 4:2:0 span mis-stepped). + static RECT_SPLIT_LOSSLESS_CHROMA444_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; } /// How many skipped sub-8x8 chroma blocks carried a CfL alpha (the shape @@ -5335,6 +5347,14 @@ pub fn skip_lossless_band_reset_hits() -> usize { SKIP_LOSSLESS_BAND_RESET_HITS.with(|c| c.get()) } +/// How many 4x4 chroma transform units a lossless HORZ/VERT strip walked at +/// subsampling 0/0 (lane-av1-llband). Zero means a stream never decoded the +/// 4:4:4 lossless unit walk this counter proves -- a gate asserting the fix +/// must see this nonzero. +pub fn rect_split_lossless_chroma444_hits() -> usize { + RECT_SPLIT_LOSSLESS_CHROMA444_HITS.with(|c| c.get()) +} + /// Gate-side reset for the two lane-av1-loss64 counters above. pub fn reset_loss64_hits() { CHROMA_EDGE_TU_CLIP_HITS.with(|c| c.set(0)); @@ -8960,6 +8980,13 @@ impl Neighbours { let round_up_even = |n: usize| n.div_ceil(2) * 2; let (bound_h, bound_w) = (round_up_even(self.mi_rows), round_up_even(self.mi_cols)); let state = neighbour_state(grid); + if crate::envflags::env_flag!("EC_CHROMA_PUB") { + eprintln!( + "EC_CHROMA_PUB plane={plane} mi=({mi_r},{mi_c}) wh=({w_px},{h_px}) lvl={} dc={}", + state.level, + state.dc.map_or(-1, |s| i32::from(s)) + ); + } for cell in 0..(h_px / MI).min(bound_h.saturating_sub(mi_r)) { self.left[mi_r + cell][plane] = state; } @@ -10083,6 +10110,10 @@ fn decode_rect_split( (4, 8) => Some((TxbSet::ChromaRect8x4, &SCAN_4X8[..])), _ => None, }; + // A 4:4:4 64-axis strip's chroma plane block is larger than one adjusted + // UV transform (TX_64X32 adjusts to TX_32X32). Those sizes are tiled + // below; everything else still needs a single-unit table. + let chroma_tiled = matches!((chroma_w, chroma_h), (64, 32) | (32, 64) | (64, 16) | (16, 64)); if !m.skip { if let Some(i) = match (chroma_w, chroma_h) { (32, 8) => Some(0), @@ -10099,11 +10130,24 @@ fn decode_rect_split( }); } } - if chroma.is_none() { + if chroma.is_none() && !chroma_tiled { // Diagnostic for the next caller that lands here (class // refusal-names-a-correlate: the message names the tool, not the // shape); the refusal below keeps its inventory-pinned wording. - eprintln!("EC_RECTCHROMA_GAP luma={bw}x{bh} tx={tx_w}x{tx_h} chroma={chroma_w}x{chroma_h}"); + // The condition is the refusal's exact precondition, so the + // print can never fire without the refusal (or vice versa): the + // four 64-axis chroma shapes are tiled below and at LOSSLESS the + // 4x4 walk never consults `chroma` at all -- libaom has no such + // transform to name a row for (`av1_get_tx_size` returns TX_4X4 + // for every plane at lossless, blockd.h:1383; outside it + // `av1_get_adjusted_tx_size` collapses TX_64X32/32X64 to TX_32X32 + // for chroma, blockd.h:1361-1367). lane-av1-ll64: the old + // ungated print fired on those working routes and mislabelled + // them a gap (one lane report cited it as a decode stop). + eprintln!( + "EC_RECTCHROMA_GAP luma={bw}x{bh} tx={tx_w}x{tx_h} \ + chroma={chroma_w}x{chroma_h} libaom_lossless_tx=none" + ); } } // lane-rectsplit r2 (verifier finding): with both callers wired @@ -10113,10 +10157,6 @@ fn decode_rect_split( // caller -- a new strip size would otherwise hit the `expect` below and // panic instead of refusing by name -- and so stays in // `refusal_inventory::REFUSALS`. - // A 4:4:4 64-axis strip's chroma plane block is larger than one adjusted - // UV transform (TX_64X32 adjusts to TX_32X32). Those sizes are tiled - // below; everything else still needs a single-unit table. - let chroma_tiled = matches!((chroma_w, chroma_h), (64, 32) | (32, 64) | (64, 16) | (16, 64)); if !m.skip && chroma.is_none() && !chroma_tiled { return Err(unsupported( "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here", @@ -10395,7 +10435,7 @@ fn decode_rect_split( // them with the LAST unit's state (class `override-slot-on-one-arm`: the // next block then read `dc_sign_ctx` 1 where libaom reads 0). They are // collected here and replayed after that record. - let mut ll_chroma_units: Vec<((usize, usize), usize, Grid)> = Vec::new(); + let mut ll_chroma_units: Vec<((usize, usize), usize, Grid, usize, usize)> = Vec::new(); // The chroma_tiled arm below stamps each unit's coefficient context // immediately (so the NEXT unit reads it), then the whole-strip // `record_split_luma_rect_mi` rewrites every chroma cell with ONE @@ -10443,19 +10483,29 @@ fn decode_rect_split( let scan4 = default_scan(4); let offset = (chroma_w > 4 || chroma_h > 4).then_some(3); let (cw_n, ch_n) = (chroma_w / 4, chroma_h / 4); + // lane-av1-llband: one 4x4 chroma unit's extent in LUMA pixels -- 4 + // chroma px scaled by the plane's own subsampling. The hardcoded 8 + // was the 4:2:0 unit's span; at 4:4:4 a unit is 4x4 LUMA px (one mi + // cell), and the 8-px step made every unit past the first column/row + // read its `txb_skip` context at the WRONG mi (two cells over) and + // stamp a 2-cell span with one unit's state -- the polluted above-band + // cell behind a 16x8 leaf's U bc=2 unit of the 444 lossless key frame + // (measured: oracle `EC_DBGCTX` reads 1-cell spans at 1-mi steps; + // ours read `above[28..29]` where the oracle read `above[26]`). + let span_x = 4 << ss_x(fctx); + let span_y = 4 << ss_y(fctx); let mut last = [Grid::Zero(16), Grid::Zero(16)]; for plane_idx in 1..=2 { for cu_row in 0..ch_n { for cu_col in 0..cw_n { - let luma_span = 8; let cu_mi = ( - mi_r + cu_row * (luma_span / MI), - mi_c + cu_col * (luma_span / MI), + mi_r + cu_row * (span_y / MI), + mi_c + cu_col * (span_x / MI), ); - let cu_around = neighbours.around_mi(cu_mi, luma_span); + let cu_around = neighbours.around_mi_rect(cu_mi, span_x, span_y); let cu_reach = tu_reach( bw, bh, - cu_col * luma_span, cu_row * luma_span, luma_span, + cu_col * span_x, cu_row * span_y, span_x, block_reach, px, py, y.width, y.height, fctx, ); let (cu_x, cu_y) = (cpx + cu_col * 4, cpy + cu_row * 4); @@ -10477,8 +10527,11 @@ fn decode_rect_split( }), None, offset, m.smooth_neighbor_uv, fctx, )?; - neighbours.record_mi_chroma(cu_mi, luma_span, luma_span, plane_idx, &grid); - ll_chroma_units.push((cu_mi, plane_idx, grid.clone())); + if span_x == 4 && span_y == 4 { + hit!(RECT_SPLIT_LOSSLESS_CHROMA444_HITS); + } + neighbours.record_mi_chroma(cu_mi, span_x, span_y, plane_idx, &grid); + ll_chroma_units.push((cu_mi, plane_idx, grid.clone(), span_x, span_y)); last[plane_idx - 1] = grid; } } @@ -10650,8 +10703,8 @@ fn decode_rect_split( m.uv_predict_mode, [&u_grid, &v_grid], ); - for (cu_mi, plane, unit) in &ll_chroma_units { - neighbours.record_mi_chroma(*cu_mi, 8, 8, *plane, unit); + for (cu_mi, plane, unit, span_w, span_h) in &ll_chroma_units { + neighbours.record_mi_chroma(*cu_mi, *span_w, *span_h, *plane, unit); } for (cu_mi, plane, unit, span_w, span_h) in &tiled_chroma_units { neighbours.record_mi_chroma(*cu_mi, *span_w, *span_h, *plane, unit); @@ -14595,9 +14648,16 @@ fn decode_rect4_16_strip( angle_delta_uv, cu_reach, &ZERO_RESIDUAL[..16], None, None, smooth_neighbor_uv, fctx, ); - let cu_mi = (pair_mi.0 + oy / 2, pair_mi.1 + ox / 2); + let cu_mi = ( + pair_mi.0 + (oy << ss_y(fctx)) / MI, + pair_mi.1 + (ox << ss_x(fctx)) / MI, + ); neighbours.record_mi_chroma( - cu_mi, 8, 8, plane, &ZERO_RESIDUAL[..16], + cu_mi, + 4 << ss_x(fctx), + 4 << ss_y(fctx), + plane, + &ZERO_RESIDUAL[..16], ); } } @@ -14617,7 +14677,25 @@ fn decode_rect4_16_strip( if cpx + ox >= u.true_width || cpy + oy >= u.true_height { continue; } - let cu_mi = (pair_mi.0 + oy / 2, pair_mi.1 + ox / 2); + // The unit's stamp is its own span: aom + // `av1_set_entropy_contexts` (blockd.c:29) + // memsets exactly `tx_size_wide_unit` x + // `tx_size_high_unit` cells at the unit's own + // `(aoff, loff)` -- for TX_4X4 ONE above cell + // and ONE left cell. `(oy / 2, ox / 2)` + + // `(8, 8)` is the 4:2:0 subsampled form (one + // chroma cell = 8 luma px = 2 mi cells); at + // 4:4:4 a unit is ONE mi cell, and the 2x2 + // smear let a 4-wide strip's later units + // overwrite the NEXT COLUMN's above cell with + // their own state -- a column aom never sees + // this block write -- so the following block's + // `all_zero` read the wrong `txb_skip` row + // (frame-0 read #452, the llkf named gap). + let cu_mi = ( + pair_mi.0 + (oy << ss_y(fctx)) / MI, + pair_mi.1 + (ox << ss_x(fctx)) / MI, + ); // One luma-mi cell: the chroma entropy arrays // are subsampled, and our bands replicate that // one entry over the unit's two cells @@ -14639,7 +14717,13 @@ fn decode_rect4_16_strip( cu_reach, buf, cpx + ox, cpy + oy, 4, 4, base_q_idx, None, None, offset, smooth_neighbor_uv, fctx, )?; - neighbours.record_mi_chroma(cu_mi, 8, 8, plane, &cu_grid); + neighbours.record_mi_chroma( + cu_mi, + 4 << ss_x(fctx), + 4 << ss_y(fctx), + plane, + &cu_grid, + ); hit!(CHROMA_SPLIT_TX_HITS); let dst = if plane == 1 { &mut uo } else { &mut vo }; for row in 0..4 { @@ -17279,9 +17363,17 @@ fn decode_block( (2 * y.true_width.div_ceil(8)) as i32 - mi_c as i32 - span_mi as i32; let over_h_mi = (2 * y.true_height.div_ceil(8)) as i32 - mi_r as i32 - span_mi as i32; - let plane_px = ((span_mi * 2).max(4)) as i32; - let max_units_w = ((plane_px + 2 * over_w_mi.min(0)) >> 2).max(0) as usize; - let max_units_h = ((plane_px + 2 * over_h_mi.min(0)) >> 2).max(0) as usize; + // `max_block_wide/high` in chroma pixels: the plane block's + // own span (`side` at 4:4:4, `side / 2` at 4:2:0 -- the old + // hardcoded `span_mi * 2` clipped three quarters of a 4:4:4 + // block's coded units and desynced the tile) plus the + // negative overhang (`mb_to_*_edge >> (3 + ss)`), whose + // chroma-px scale is `MI >> ss` per mi. + let plane_px = (((span_mi * MI) >> ss_x(fctx)).max(4)) as i32; + let over_w_px = over_w_mi.min(0) * (MI >> ss_x(fctx)) as i32; + let over_h_px = over_h_mi.min(0) * (MI >> ss_y(fctx)) as i32; + let max_units_w = ((plane_px + over_w_px) >> 2).max(0) as usize; + let max_units_h = ((plane_px + over_h_px) >> 2).max(0) as usize; let unit = chroma_tx / 4; // TU side in 4x4 chroma units if cu_col * unit >= max_units_w || cu_row * unit >= max_units_h { hit!(CHROMA_EDGE_TU_CLIP_HITS); @@ -17627,8 +17719,16 @@ fn decode_block_128rect( let mi_rows = 2 * y.true_height.div_ceil(8); let max_w_mi = (bw / MI).min(mi_cols.saturating_sub(mi_c)); let max_h_mi = (bh / MI).min(mi_rows.saturating_sub(mi_r)); - // Non-lossless: one 32x32 chroma unit per mu chunk, per plane. - debug_assert!(lossless_frame || (chroma_w / chroma_tx, chroma_h / chroma_tx) == (nch_x, nch_y)); + // Non-lossless: per mu chunk, `(64 >> ss) / chroma_tx` chroma units per + // axis (one 32x32 at 4:2:0, four 32x32 at 4:4:4 — lane-av1-444sb). + debug_assert!( + lossless_frame + || (chroma_w / chroma_tx, chroma_h / chroma_tx) + == ( + nch_x * ((64 >> ss_x(fctx)) / chroma_tx), + nch_y * ((64 >> ss_y(fctx)) / chroma_tx) + ) + ); let tpc = 64 / logical_tx; let zero_tu = vec![0i32; logical_tx * logical_tx]; let zero_cu = vec![0i32; chroma_tx * chroma_tx]; @@ -17706,9 +17806,13 @@ fn decode_block_128rect( neighbours.record_mi_luma(tu_mi, logical_tx, &tu_grid); } } - // Transform units per axis inside this mu chunk's 32x32 chroma - // span: one 32x32 unit normally, 8x8 TX_4X4 units when lossless. - let cn = (32 / chroma_tx).max(1); + // Transform units per axis inside this mu chunk's chroma span: + // a 64x64 luma chunk covers `64 >> ss` chroma pixels per axis, so + // it holds `(64 >> ss) / chroma_tx` units — one 32x32 at 4:2:0, + // four at 4:4:4 (lane-av1-444sb: the hardcoded 4:2:0 span read + // one unit per chunk there, left six of a 128x64 block's eight + // 32x32 units unread and desynced the tile from that block on). + let cn = ((64 >> ss_x(fctx)) / chroma_tx).max(1); // libaom's per-chunk `unit_width/height` (plane-mi units of the // luma mi grid): `min(mu_blocks + col, max_blocks) >> ss`. let unit_w = ((ch_col + 1) * 16).min(max_w_mi) >> ss_x(fctx); @@ -17722,13 +17826,13 @@ fn decode_block_128rect( for plane_pass in 1..=2usize { for ci_row in 0..cn { for ci_col in 0..cn { - if ch_col * 8 + ci_col * stepc >= unit_w - || ch_row * 8 + ci_row * stepc >= unit_h + if ch_col * (16 >> ss_x(fctx)) + ci_col * stepc >= unit_w + || ch_row * (16 >> ss_y(fctx)) + ci_row * stepc >= unit_h { continue; } - let cu_x = cpx + ch_col * 32 + ci_col * chroma_tx; - let cu_y = cpy + ch_row * 32 + ci_row * chroma_tx; + let cu_x = cpx + ch_col * (64 >> ss_x(fctx)) + ci_col * chroma_tx; + let cu_y = cpy + ch_row * (64 >> ss_y(fctx)) + ci_row * chroma_tx; let cu_mi = ( mi_r + ch_row * 16 + ci_row * ((chroma_tx << ss_y(fctx)) / 4), mi_c + ch_col * 16 + ci_col * ((chroma_tx << ss_x(fctx)) / 4), @@ -18169,12 +18273,45 @@ fn decode_leaf8( ); } let ac = alpha.map(|_| cfl_src(px, py, 8)); + // 4:4:4 lossless: the leaf's chroma plane block is a 2x2 raster of + // TX_4X4 units (`av1_get_tx_size`: lossless forces TX_4X4 on EVERY + // plane), so a skipped leaf predicts per unit -- each from its own + // edges -- like the luma `SKIP_SPLIT_TX` loop above. CfL never fires + // here (`is_cfl_allowed` at lossless needs plane_bsize == 4x4; this + // chroma plane block is 8x8), and intrabc/palette keep the + // whole-plane-block prediction they already run. + let chroma_units_444 = chroma_444 + && lossless(fctx) + && intrabc_bufs.is_none() + && palette_uv_bufs.is_none(); if let Some((_, ub, _)) = &intrabc_bufs { set_palette_pred(ub.clone(), fctx); } else if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } - push_intra(1, + if chroma_units_444 { + for cu_row in 0..2 { + for cu_col in 0..2 { + let cu_reach = tu_reach( + 8, 8, cu_col * 4, cu_row * 4, 4, + reach, px, py, y.width, y.height, fctx, + ); + push_intra(1, + cpx + cu_col * 4, + cpy + cu_row * 4, + 4, + uv_predict_mode, + angle_delta_uv, + cu_reach, + &ZERO_RESIDUAL[..16], + None, + None, + smooth_neighbor_uv, fctx, + ); + } + } + } else { + push_intra(1, cpx, cpy, csz, @@ -18186,12 +18323,35 @@ fn decode_leaf8( None, smooth_neighbor_uv, fctx, ); + } if let Some((_, _, vb)) = &intrabc_bufs { set_palette_pred(vb.clone(), fctx); } else if let Some((_, vb)) = &palette_uv_bufs { set_palette_pred(vb.clone(), fctx); } - push_intra(2, + if chroma_units_444 { + for cu_row in 0..2 { + for cu_col in 0..2 { + let cu_reach = tu_reach( + 8, 8, cu_col * 4, cu_row * 4, 4, + reach, px, py, y.width, y.height, fctx, + ); + push_intra(2, + cpx + cu_col * 4, + cpy + cu_row * 4, + 4, + uv_predict_mode, + angle_delta_uv, + cu_reach, + &ZERO_RESIDUAL[..16], + None, + None, + smooth_neighbor_uv, fctx, + ); + } + } + } else { + push_intra(2, cpx, cpy, csz, @@ -18203,6 +18363,7 @@ fn decode_leaf8( None, smooth_neighbor_uv, fctx, ); + } luma_grid = Grid::Zero(64); u_grid = Grid::Zero(csz * csz); v_grid = Grid::Zero(csz * csz); @@ -18416,6 +18577,28 @@ fn decode_leaf8( if fctx.intrabc_chroma_tx.with(std::cell::Cell::get).is_some() { hit!(INTRABC_TX4_CHROMA_COPY_HITS); } + if chroma_444 && lossless(fctx) { + // 4:4:4 lossless: the leaf's chroma plane block is a 2x2 raster + // of TX_4X4 units per plane, PLANE-MAJOR (`av1_get_tx_size`: + // lossless forces TX_4X4 on EVERY plane) -- the same walk + // `read_intra_chroma_lossless` runs for whole blocks. Reading one + // TX_8X8 unit here panicked before: the lossless inverse is the + // 4x4-only WHT (`TxParams::run`'s own `(w, h) == (4, 4)` + // invariant), and the unit count desyncs the tile either way. + // Per-unit `record_mi_chroma` calls stamp the neighbour bands + // inside, which is why the tail's whole-leaf chroma stamp below + // is skipped for this shape. + let (mut uo, mut vo) = (Vec::new(), Vec::new()); + read_intra_chroma_lossless( + dec, cdfs, neighbours, u, v, leaf_mi, (px, py), (cpx, cpy), + 8, (8, 8), (0, 0), (8, 8), 8, reach, (y.width, y.height), mode, + uv_predict_mode, angle_delta_uv, + palette_uv_bufs.as_ref().map(|(a, b)| (&a[..], &b[..])), + smooth_neighbor_uv, base_q_idx, &mut uo, &mut vo, fctx, + )?; + u_grid = if uo.is_empty() { Grid::Zero(64) } else { Grid::Own(uo) }; + v_grid = if vo.is_empty() { Grid::Zero(64) } else { Grid::Own(vo) }; + } else { if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } @@ -18466,6 +18649,7 @@ fn decode_leaf8( None, smooth_neighbor_uv, fctx, )?; + } // The two chroma reads above are the only consulters of this leaf's // armed [`INTRABC_CHROMA_TX`]; leaving it set would make the NEXT // leaf's chroma inherit this leaf's luma type instead of its own @@ -18493,14 +18677,21 @@ fn decode_leaf8( let bound_w = round_up_even(neighbours.mi_cols); let u_state = neighbour_state(&u_grid); let v_state = neighbour_state(&v_grid); - for cell in 0..side_mi { - if cell < side_mi.min(bound_h.saturating_sub(leaf_mi.0)) { - neighbours.left[leaf_mi.0 + cell][1] = u_state; - neighbours.left[leaf_mi.0 + cell][2] = v_state; - } - if cell < side_mi.min(bound_w.saturating_sub(leaf_mi.1)) { - neighbours.above[leaf_mi.1 + cell][1] = u_state; - neighbours.above[leaf_mi.1 + cell][2] = v_state; + // The 4:4:4 lossless walk above already stamped these bands PER UNIT + // (its raster-order last writer per cell is exactly libaom's + // per-entry last update); this whole-leaf aggregate would clobber + // four distinct unit states with one, so it runs only for the shapes + // whose chroma really is one unit. + if !(chroma_444 && lossless(fctx)) { + for cell in 0..side_mi { + if cell < side_mi.min(bound_h.saturating_sub(leaf_mi.0)) { + neighbours.left[leaf_mi.0 + cell][1] = u_state; + neighbours.left[leaf_mi.0 + cell][2] = v_state; + } + if cell < side_mi.min(bound_w.saturating_sub(leaf_mi.1)) { + neighbours.above[leaf_mi.1 + cell][1] = u_state; + neighbours.above[leaf_mi.1 + cell][2] = v_state; + } } } // This leaf's own palette state into the mi-granular above/left bands @@ -18668,7 +18859,21 @@ fn read_intra_mode_sub8( // desynced the tile at the very next element. let angle_delta_y = 0; let chroma = if has_chroma { - let uv_mode = dec.symbol(&mut cdfs.uv_mode_cfl[mode]); + // `is_cfl_allowed` (blockd.h): at lossless CfL needs the CHROMA plane + // block to be a single TX_4X4 (`cfl_allowed_px`). True for this leaf + // at 4:2:0 (the group's plane block is 4x4) and for a 4:4:4 + // `BLOCK_4X4` split leaf, but FALSE for a 4:4:4 `BLOCK_8X4`/`BLOCK_4X8` + // rect leaf, whose plane block is the rect itself -- that shape reads + // the 13-symbol `uv_mode_no_cfl` CDF, and reading the CFL alphabet + // there desynced the tile at the rect leaf's own uv_mode symbol (measured: + // ours consumed the 14-symbol interval where the oracle read 13, first + // divergence at the rect leaf mi (8,16) of `ll444.obu`; class + // `wrong-alphabet-same-value`, lane-av1-llsub8). + let uv_mode = if cfl_allowed_px(seg_w_mi * MI, seg_h_mi * MI, fctx) { + dec.symbol(&mut cdfs.uv_mode_cfl[mode]) + } else { + dec.symbol(&mut cdfs.uv_mode_no_cfl[mode]) + }; if trace { eprintln!("TRACE sub8 uv_mode value={uv_mode} rng={}", dec.debug_state().0); } @@ -18736,7 +18941,7 @@ fn sub8_leaf_chroma444( base_q_idx: u8, smooth_neighbor_uv: bool, fctx: &crate::decode::FrameCtx, -) -> Result<(Grid, Grid)> { +) -> Result<(Grid, Grid, usize, usize)> { let uv_predict_mode = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; let (w_mi, h_mi) = (bw / MI, bh / MI); neighbours.record_uv_mode_mi(lmi.0, lmi.1, w_mi, h_mi, uv_predict_mode); @@ -18764,7 +18969,7 @@ fn sub8_leaf_chroma444( hit!(SKIPPED_INTRABC_CHROMA_ARM_HITS); fctx.intrabc_chroma_tx.with(|c| c.set(None)); } - (Grid::Zero(bw * bh), Grid::Zero(bw * bh)) + (Grid::Zero(bw * bh), Grid::Zero(bw * bh), 4, 4) } else if let Some(dv) = intrabc_dv { // Frame copy at the DV; the residual still reads the ordinary chroma // tables with the inherited luma `tx_type` (see the 4:2:0 tails). @@ -18794,12 +18999,12 @@ fn sub8_leaf_chroma444( 0, reach, v, px, py, 4, TX4, base_q_idx, None, None, None, smooth_neighbor_uv, fctx, )?; - (ug, vg) + (ug, vg, 4, 4) } else { let scan: &[u16] = if bw > bh { &SCAN_8X4 } else { &SCAN_4X8 }; let default_tx = fctx.intrabc_chroma_tx.with(std::cell::Cell::get).unwrap_or(TxType::DctDct); - let mut out = (Grid::Zero(bw * bh), Grid::Zero(bw * bh)); + let mut out = (Grid::Zero(bw * bh), Grid::Zero(bw * bh), bw, bh); for (plane_idx, buf) in [(1usize, ub), (2usize, vb)] { let skip_ctx = usize::from(around[plane_idx].0) + usize::from(around[plane_idx].1); @@ -18839,14 +19044,62 @@ fn sub8_leaf_chroma444( 0, reach, v, px, py, 4, TX4, base_q_idx, alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, None, smooth_neighbor_uv, fctx, )?; - (ug, vg) + (ug, vg, 4, 4) + } else if lossless(fctx) { + // lane-av1-llsub8: `read_tx_size` answers TX_4X4 for EVERY plane of + // a lossless block, so this rect leaf's chroma is (bw/4)*(bh/4) + // TX_4X4 units at their own 4x4 origins -- not the single + // TX_8X4/TX_4X8 rect unit the non-lossless arm below reads (that + // one is `av1_get_max_uv_txsize(BLOCK_8X4)`'s rect transform, which + // lossless never reaches). Measured on `ll444.obu`'s HORZ leaf at + // mi (8,16): the oracle codes U units at bc 0,1 with + // `get_txb_ctx`'s +10 rows (`txb_skip_cdf[0][10..12]`, + // plane pels 32 > tx pels 16) where the rect-unit read consumed + // `txb_skip_cdf[1][0]` -- the tile desynced at that U unit's + // all_zero symbol. Walk is plane-major like libaom + // `decode_token_recon_block`'s plane/row/col loop; each unit adds + // 3 to the chroma context (Chroma4's `big` rows, the same fold + // [`read_plane`]'s 128x128 caller uses); CFL is never allowed at + // lossless, so no alpha rides along. + let mut out_u = Grid::Own(vec![0i32; bw * bh]); + let mut out_v = Grid::Own(vec![0i32; bw * bh]); + for (plane_idx, buf) in [(1usize, u), (2usize, v)] { + for ur in 0..bh / 4usize { + for uc in 0..bw / 4usize { + let (umi_r, umi_c) = (lmi.0 + ur, lmi.1 + uc); + let (upx, upy) = (px + uc * 4, py + ur * 4); + let unit_around = neighbours.around_mi_rect((umi_r, umi_c), 4, 4); + let unit_reach = Reach::of(4, upx, upy, y.width, y.height, fctx); + let grid = read_plane( + dec, cdfs, TxbSet::Chroma4, scan4, plane_idx, unit_around[plane_idx], + uv_mode, uv_predict_mode, 0, unit_reach, buf, upx, upy, 4, + TX4, base_q_idx, None, None, Some(3), smooth_neighbor_uv, fctx, + )?; + let cell = grid_unit_state(&grid, 4, 0, 0, 4, 4); + if umi_r < neighbours.mi_rows { + neighbours.left[umi_r][plane_idx] = cell; + } + if umi_c < neighbours.mi_cols { + neighbours.above[umi_c][plane_idx] = cell; + } + let out = if plane_idx == 1 { &mut out_u } else { &mut out_v }; + if let Grid::Own(v) = out { + for r in 0..4usize { + v[(ur * 4 + r) * bw + uc * 4..][..4] + .copy_from_slice(&grid[r * 4..][..4]); + } + } + } + } + } + (out_u, out_v, 4, 4) } else { // `av1_get_max_uv_txsize(BLOCK_4X8/8X4)` at ss 0/0 is the rect // transform itself; its `tx_type` is mode-derived with the // <32 set (`decode_rect_split`'s own rule for this shape). let scan: &[u16] = if bw > bh { &SCAN_8X4 } else { &SCAN_4X8 }; let default_tx = default_intra_tx_type(uv_predict_mode as u8); - let mut out = (Grid::Zero(bw * bh), Grid::Zero(bw * bh)); + let mut out = (Grid::Zero(bw * bh), Grid::Zero(bw * bh), bw, bh); for plane_idx in 1..=2usize { let skip_ctx = usize::from(around[plane_idx].0) + usize::from(around[plane_idx].1); @@ -18874,23 +19127,54 @@ fn sub8_leaf_chroma444( } }; // libaom `av1_set_entropy_contexts` stamps above/left PER TRANSFORM UNIT: - // the leaf's own chroma span, not the 8x8 group's. - let (u_grid, v_grid) = grids; - let u_state = neighbour_state(&u_grid); - let v_state = neighbour_state(&v_grid); - for cell in 0..h_mi { - if lmi.0 + cell < neighbours.mi_rows { - neighbours.left[lmi.0 + cell][1] = u_state; - neighbours.left[lmi.0 + cell][2] = v_state; + // the leaf's own chroma span, not the 8x8 group's. A rect leaf's lossless + // units (4x4) each carry their own state -- a 4:2:0-style whole-leaf smear + // gave one unit's state to its neighbour's cells (lane-av1-llsub8). + let (u_grid, v_grid, unit_w, unit_h) = grids; + // One unit covers `unit_w/MI` mi columns and `unit_h/MI` mi rows (a 4x4 + // unit: one cell each; the non-lossless rect unit: the whole leaf). + let (uw_cells, uh_cells) = ((unit_w / MI).max(1), (unit_h / MI).max(1)); + for ur in 0..h_mi / uh_cells { + for uc in 0..w_mi / uw_cells { + let (x0, y0) = (uc * unit_w, ur * unit_h); + let us = grid_unit_state(&u_grid, bw, x0, y0, unit_w, unit_h); + let vs = grid_unit_state(&v_grid, bw, x0, y0, unit_w, unit_h); + for cell in 0..uh_cells { + if lmi.0 + ur * uh_cells + cell < neighbours.mi_rows { + neighbours.left[lmi.0 + ur * uh_cells + cell][1] = us; + neighbours.left[lmi.0 + ur * uh_cells + cell][2] = vs; + } + } + for cell in 0..uw_cells { + if lmi.1 + uc * uw_cells + cell < neighbours.mi_cols { + neighbours.above[lmi.1 + uc * uw_cells + cell][1] = us; + neighbours.above[lmi.1 + uc * uw_cells + cell][2] = vs; + } + } } } - for cell in 0..w_mi { - if lmi.1 + cell < neighbours.mi_cols { - neighbours.above[lmi.1 + cell][1] = u_state; - neighbours.above[lmi.1 + cell][2] = v_state; + Ok((u_grid, v_grid, unit_w, unit_h)) +} + +/// [`neighbour_state`] over one `(unit_w x unit_h)` transform unit at offset +/// `(x0, y0)` inside a `bw`-wide assembled chroma grid -- the per-unit stamp +/// the rect arms need when a leaf carries more than one unit. +fn grid_unit_state(grid: &Grid, bw: usize, x0: usize, y0: usize, unit_w: usize, unit_h: usize) -> Neighbour { + let mut cul = 0u32; + let mut dc = None; + for r in 0..unit_h { + for c in 0..unit_w { + let v = grid[(y0 + r) * bw + x0 + c]; + cul += v.unsigned_abs(); + if r == 0 && c == 0 && v != 0 { + dc = Some(v < 0); + } } } - Ok((u_grid, v_grid)) + if cul == 0 { + return Neighbour::default(); + } + Neighbour { level: cul.min(7) as u8, dc } } @@ -20000,6 +20284,15 @@ const CDEF_DIRECTIONS: [[(i32, i32); 2]; 8] = [ const CDEF_VERY_LARGE: i32 = 0x4000; const CDEF_PRI_TAPS: [[i32; 2]; 2] = [[4, 2], [3, 3]]; const CDEF_SEC_TAPS: [i32; 2] = [2, 1]; +/// lane-av1422filter: libaom `av1_cdef_filter_fb` (cdef_block.c) remaps the +/// luma direction before filtering CHROMA whenever `xdec != ydec` — the +/// direction grid lives on the subsampled chroma grid, so a direction found +/// on the 8x8 luma block means a different line there. `conv422` applies +/// under 4:2:2 (`xdec` set), `conv440` under its mirror (not expressible in +/// the profiles this decoder accepts, kept for fidelity). 4:2:0 and 4:4:4 +/// (`xdec == ydec`) take no remap, exactly as before this lane. +const CDEF_DIR_CONV422: [usize; 8] = [7, 0, 2, 4, 5, 6, 6, 6]; +const CDEF_DIR_CONV440: [usize; 8] = [1, 2, 2, 2, 3, 4, 6, 0]; fn cdef_msb(x: i32) -> i32 { 31 - x.leading_zeros() as i32 @@ -24525,7 +24818,19 @@ fn cdef_band( let t_uv = i32::from(cdef.uv_pri_strength[sidx]) << coeff_shift; let uv_sec_strength = i32::from(cdef.uv_sec_strength[sidx]) << coeff_shift; - let uv_dir = if t_uv != 0 { dir } else { 0 }; + // lane-av1422filter: the chroma direction is the luma one + // remapped through `conv422`/`conv440` under asymmetric + // subsampling (see [`CDEF_DIR_CONV422`]); identical to the + // raw luma direction for 4:2:0 and 4:4:4. + let uv_dir = if t_uv != 0 { + match (ss_x(fctx), ss_y(fctx)) { + (1, 0) => CDEF_DIR_CONV422[dir], + (0, 1) => CDEF_DIR_CONV440[dir], + _ => dir, + } + } else { + 0 + }; let enable_primary_uv = t_uv != 0; let enable_secondary_uv = uv_sec_strength != 0; if let Some(w) = wrote.as_deref_mut() { @@ -24728,8 +25033,11 @@ fn pipe_run( let j = k - 2; if let Some((sy2, su2, sv2)) = snap.as_mut() { snap_band(sy2.data.to_mut(), y, 0, j * 64, (j + 1) * 64, cfg.cdef_on); - snap_band(su2.data.to_mut(), u, 1, j * 32, (j + 1) * 32, cfg.cdef_on); - snap_band(sv2.data.to_mut(), v, 1, j * 32, (j + 1) * 32, cfg.cdef_on); + // lane-av1422filter: chroma band rows follow the frame's ss_y + // (4:2:2 chroma bands the luma 64-row grid, not 32). + let (c_lo, c_hi) = ((j * 64) >> ss_y(fctx), ((j + 1) * 64) >> ss_y(fctx)); + snap_band(su2.data.to_mut(), u, ss_y(fctx) as u32, c_lo, c_hi, cfg.cdef_on); + snap_band(sv2.data.to_mut(), v, ss_y(fctx) as u32, c_lo, c_hi, cfg.cdef_on); } } if cfg.cdef_on && k >= 3 && k - 3 < nb { @@ -24784,8 +25092,23 @@ fn pipe_run_lr( let (fw, fh) = (cfg.frame_w, cfg.frame_h); let dims = [ (fw, fh, 0u32, y.width, y.data.len()), - (fw.div_ceil(2), fh.div_ceil(2), 1, u.width, u.data.len()), - (fw.div_ceil(2), fh.div_ceil(2), 1, v.width, v.data.len()), + // lane-av1422filter: chroma plane extents and stripe geometry follow + // the frame's own subsampling -- 4:2:2 chroma is full-height with + // luma-grid stripes (only 4:2:0 halves both). + ( + round_ss(fw, ss_x(fctx)), + round_ss(fh, ss_y(fctx)), + ss_y(fctx) as u32, + u.width, + u.data.len(), + ), + ( + round_ss(fw, ss_x(fctx)), + round_ss(fh, ss_y(fctx)), + ss_y(fctx) as u32, + v.width, + v.data.len(), + ), ]; let mut planes: Vec = Vec::new(); for (p, &(pw, ph, ss, stride, len)) in dims.iter().enumerate() { @@ -25561,6 +25884,21 @@ pub(crate) fn chroma_split_tx_hits() -> usize { CHROMA_SPLIT_TX_HITS.with(std::cell::Cell::get) } +thread_local! { + /// How many INTRA leaves of an inter frame's 8x8 block ran the lossless + /// 4:4:4 chroma walk ([`read_intra_chroma_lossless`], lane-av1-llintra8) + /// -- one bump per leaf, four units per plane inside it. A gate proving + /// the arm must see this nonzero; CHROMA_SPLIT_TX_HITS alone cannot + /// attribute its bumps to THIS leaf. + pub(crate) static LLINTRA8_CHROMA_WALK_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// [`LLINTRA8_CHROMA_WALK_HITS`]: lossless 4:4:4 chroma walks through an +/// inter frame's 8x8 INTRA leaf. +pub fn llintra8_chroma_walk_hits() -> usize { + LLINTRA8_CHROMA_WALK_HITS.with(|c| c.get()) +} + fn read_sb128_root( dec: &mut SymbolDecoder, cdfs: &mut Cdfs, @@ -27751,8 +28089,20 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( lr.frame_restoration_type[p] != ec_av1_syntax::RestorationType::None && lr.loop_restoration_size[p] != 0 }); - let deblocked = - lr_active.then(|| (plane_snapshot(&y, 0), plane_snapshot(&u, 1), plane_snapshot(&v, 1))); + let deblocked = lr_active.then(|| { + ( + plane_snapshot(&y, 0), + // lane-av1422filter: the bands are the LR stripe-boundary context + // (`RESTORATION_UNIT_OFFSET >> ss_y` above/below each 64-luma-row + // stripe). Chroma stripes are half-height ONLY under 4:2:0; a + // 4:2:2 frame's chroma (ss_y = 0) stripes on the luma grid, so + // the hardcoded `1` saved bands at rows 26/60/92/124 where LR + // reads rows 54..57/118..121 -- every 4:2:2 boundary + // substitution read uninitialised zeros (frame-0 V (48,0)). + plane_snapshot(&u, ss_y(fctx) as u32), + plane_snapshot(&v, ss_y(fctx) as u32), + ) + }); // lane-tiny r4: post-deblock / post-CDEF dumps mirroring aomdec's own // EC_AV1_POSTDEBLOCK_DUMP (decodeframe.c ~5404) -- with the pre-filter // dump above these bisect WHICH filter stage introduced a mismatch. @@ -28390,7 +28740,13 @@ fn read_intra_chroma_lossless( if cpx + ox >= u.true_width || cpy + oy >= u.true_height { continue; } - let cu_mi = (at_mi.0 + oy / 2, at_mi.1 + ox / 2); + // Chroma pixels per mi cell: 2 at 4:2:0, 4 at 4:4:4. At + // 4:2:0 a TX_4X4 chroma unit spans two mi cells and anchors + // at the even one; at 4:4:4 it IS one mi cell. + let cu_mi = ( + at_mi.0 + oy / (MI >> ss_y(fctx)), + at_mi.1 + ox / (MI >> ss_x(fctx)), + ); // libaom's chroma entropy-context arrays are SUBSAMPLED: // `get_txb_ctx` reads exactly one entry per plane for a // TX_4X4 chroma unit (`a[0]`/`l[0]`). Our bands are luma-mi @@ -28399,8 +28755,12 @@ fn read_intra_chroma_lossless( // cell is past the band on a unit whose block hangs off the // frame edge, which libaom still codes. let cu_around = neighbours.around_mi(cu_mi, MI); + // The unit's origin and extent in LUMA pixels: `<< ss` at + // 4:2:0 (8x8 luma for a 4x4 chroma unit), identity at 4:4:4. let cu_reach = tu_reach( - side, side, ox * 2, oy * 2, 8, reach, px, py, frame_w, frame_h, fctx, + side, side, + ox << ss_x(fctx), oy << ss_y(fctx), 4 << ss_x(fctx), + reach, px, py, frame_w, frame_h, fctx, ); if let Some((ub, vb)) = palette_uv_bufs { let buf = if plane_idx == 1 { ub } else { vb }; @@ -28431,7 +28791,11 @@ fn read_intra_chroma_lossless( smooth_neighbor_uv, fctx, )?; - neighbours.record_mi_chroma(cu_mi, 8, 8, plane_idx, &cu_grid); + // The unit's own footprint on the LUMA mi grid: 8 luma px + // (two cells) at 4:2:0, 4 (one cell) at 4:4:4. + neighbours.record_mi_chroma( + cu_mi, 4 << ss_x(fctx), 4 << ss_y(fctx), plane_idx, &cu_grid, + ); hit!(CHROMA_SPLIT_TX_HITS); let dst = mu_units( if plane_idx == 1 { &mut *u_out } else { &mut *v_out }, @@ -28498,9 +28862,13 @@ fn read_inter_chroma_lossless( if cpx + ox >= u.true_width || cpy + oy >= u.true_height { continue; } - // The chroma neighbour bands are indexed in LUMA mi: 4 chroma - // pixels span 8 luma ones, i.e. 2 mi. - let cu_mi = (at_mi.0 + oy / 2, at_mi.1 + ox / 2); + // The chroma neighbour bands are indexed in LUMA mi: a 4-wide + // chroma unit spans `4 << ss` luma pixels, i.e. `4 >> ss` -- + // 2 mi cells at 4:2:0, one at 4:4:4. + let cu_mi = ( + at_mi.0 + oy / (4 >> ss_y(fctx)), + at_mi.1 + ox / (4 >> ss_x(fctx)), + ); // libaom's chroma entropy-context arrays are SUBSAMPLED: // `get_txb_ctx` reads exactly one entry per plane for a // TX_4X4 chroma unit (`a[0]`/`l[0]`). Our bands are luma-mi @@ -28537,7 +28905,13 @@ fn read_inter_chroma_lossless( )? .0; // Immediately, so the NEXT unit reads this one's context. - neighbours.record_mi_chroma(cu_mi, 8, 8, plane_idx, &cu_grid); + neighbours.record_mi_chroma( + cu_mi, + 4 << ss_x(fctx), + 4 << ss_y(fctx), + plane_idx, + &cu_grid, + ); hit!(CHROMA_SPLIT_TX_HITS); let dst = mu_units( if plane_idx == 1 { &mut *u_out } else { &mut *v_out }, @@ -28553,6 +28927,39 @@ fn read_inter_chroma_lossless( Ok(()) } +/// The 8x8 inter leaf's lossless 4:4:4 chroma arm (lane-av1-llinter), shared +/// by the single-ref and compound paths: the plane block is a 2x2 raster of +/// TX_4X4 units (`av1_get_tx_size`: lossless returns TX_4X4 for EVERY plane, +/// not just luma), read by the same per-unit walk the bigger inter blocks +/// run. Returns the two block grids composed at stride 8 (`Grid::Zero` when +/// every unit hung off the frame edge) and leaves each unit's own coefficient +/// context stamped in the neighbour bands -- the caller's tail must not let +/// its whole-block `record_mi` overwrite them. +#[allow(clippy::too_many_arguments)] +fn leaf8_inter_chroma_lossless( + dec: &mut SymbolDecoder, + cdfs: &mut Cdfs, + neighbours: &mut Neighbours, + u: &mut PlaneBuf<'static>, + v: &mut PlaneBuf<'static>, + su: Pred<'_>, + sv: Pred<'_>, + at_mi: (usize, usize), + (cpx, cpy): (usize, usize), + base_q_idx: u8, fctx: &crate::decode::FrameCtx, +) -> Result<(Grid, Grid)> { + let (mut uo, mut vo) = (Vec::new(), Vec::new()); + read_inter_chroma_lossless( + dec, cdfs, neighbours, u, v, su, sv, + at_mi, (cpx, cpy), (0, 0), (8, 8), (8, 8), 8, 0, + base_q_idx, &mut uo, &mut vo, fctx, + )?; + Ok(( + if uo.is_empty() { Grid::Zero(64) } else { Grid::Own(uo) }, + if vo.is_empty() { Grid::Zero(64) } else { Grid::Own(vo) }, + )) +} + /// Spec 5.11.25's `single_ref_p1`..`p6` tree (reachable only once `comp_mode` /// is known `SINGLE_REFERENCE` -- `decode_stream` refuses any frame with /// `reference_select` set before this is ever called, so that read is never @@ -29547,6 +29954,13 @@ pub(crate) fn obmc_plan( side: usize, write_w: usize, write_h: usize, + // lane-av1-llpred2: the FRAME's own subsampling pair -- the same pair the + // chroma window half in [`obmc_run`] shifts by. A rect strip's ss cannot + // be derived from a rect size over the square `chroma_side`: that ratio + // gave a 16x8 strip at 4:2:0 ss=(1,0) (losing its above-chroma skip) and + // divides by zero at 4:4:4 (`trailing_zeros(0)` = 64, a debug shift panic). + ss_x: usize, + ss_y: usize, chroma_side: usize, px: usize, py: usize, @@ -29591,10 +30005,19 @@ pub(crate) fn obmc_plan( let overlap_above = write_h.min(64) / 2; let overlap_left = write_w.min(64) / 2; // lane-inter8 r1 / lane-scaledref r1: `av1_skip_u4x4_pred_in_obmc` - // (`reconinter.c` 820) returns `dir == 0` when the chroma plane's own - // block is BLOCK_4X4/8X4/4X8 (an 8x8, 16x8 or 8x16 luma block at 4:2:0): - // the ABOVE pass skips chroma entirely, the LEFT pass still blends it. - let skip_chroma_above = matches!((write_w, write_h), (8, 8) | (16, 8) | (8, 16)); + // (`reconinter.c` 829) switches on the PLANE block + // (`get_plane_block_size`, ss-shifted): only 4x4/8x4/4x8 skip the ABOVE + // pass's chroma (`return dir == 0`), the LEFT pass still blends them. + // lane-av1-llpred: the old luma-shape list `(8,8)|(16,8)|(8,16)` + // hardcoded the 4:2:0 plane sizes; at 4:4:4 the plane block is the luma + // block itself (never 4-wide), so every one of those blocks was silently + // missing its above-pass chroma OBMC blend. + // lane-av1-llpred2: ss is the FRAME's own pair (`ss_x`/`ss_y(fctx)`, the + // same values [`obmc_run`]'s chroma windows shift by), never a ratio of + // the rect write size over the square `chroma_side` -- that ratio gave a + // 4:2:0 16x8 strip ss=(1,0) and dropped its above-chroma skip, and at + // 4:4:4 divided to zero (`trailing_zeros(0)` = 64, a debug shift panic). + let skip_chroma_above = obmc_skip_chroma_above(write_w, write_h, ss_x, ss_y); let mut above = Vec::new(); for (off4, span4, nb, src4) in overlappable_above(grid, mi_row, mi_col, bw4, mi_cols, max_nb(bw4)) { @@ -29666,6 +30089,56 @@ pub(crate) fn obmc_plan( }) } +/// `av1_skip_u4x4_pred_in_obmc`'s above-pass decision (libaom +/// `reconinter.c` 829): the PLANE block (`write_w >> ss_x`, `write_h >> +/// ss_y`) is 4x4, 8x4 or 4x8. `ss_x`/`ss_y` are the FRAME's own pair -- the +/// same values [`obmc_run`]'s chroma windows shift by -- never a ratio over +/// the square `chroma_side` (lane-av1-llpred2: that ratio dropped the +/// 4:2:0 16x8/8x16 skip and shifted by 64 at 4:4:4). Pure so the check +/// below pins the rect-strip decision without decoding a stream. +pub(crate) fn obmc_skip_chroma_above( + write_w: usize, + write_h: usize, + ss_x: usize, + ss_y: usize, +) -> bool { + matches!( + (write_w >> ss_x, write_h >> ss_y), + (4, 4) | (8, 4) | (4, 8) + ) +} + +#[cfg(test)] +mod obmc_skip_chroma_tests { + use super::obmc_skip_chroma_above; + + /// lane-av1-llpred2: the above-chroma skip keys off the PLANE block + /// under the frame's own ss pair. At 4:2:0 a 16x8/8x16 rect strip's + /// plane block is 8x4/4x8 and MUST still skip (the old `chroma_side` + /// ratio read ss=(1,0) off a 16x8 strip and made it blend); at 4:4:4 + /// the plane block is the luma block, so only true 4-wide/high shapes + /// skip and the shift never leaves `usize` range (the old ratio's + /// `trailing_zeros(0)` = 64 panicked a debug build). + #[test] + fn rect_strips_skip_above_chroma_at_420_and_shift_never_overflows() { + // 4:2:0 (ss 1,1): 8x8 -> 4x4, 16x8 -> 8x4, 8x16 -> 4x8 all skip. + assert!(obmc_skip_chroma_above(8, 8, 1, 1)); + assert!(obmc_skip_chroma_above(16, 8, 1, 1)); + assert!(obmc_skip_chroma_above(8, 16, 1, 1)); + // ... larger plane blocks blend, exactly libaom's own list. + assert!(!obmc_skip_chroma_above(16, 16, 1, 1)); + assert!(!obmc_skip_chroma_above(32, 16, 1, 1)); + assert!(!obmc_skip_chroma_above(16, 32, 1, 1)); + // 4:4:4 (ss 0,0): the plane block is the luma block itself. + assert!(obmc_skip_chroma_above(4, 4, 0, 0)); + assert!(obmc_skip_chroma_above(8, 4, 0, 0)); + assert!(obmc_skip_chroma_above(4, 8, 0, 0)); + assert!(!obmc_skip_chroma_above(8, 8, 0, 0)); + assert!(!obmc_skip_chroma_above(16, 8, 0, 0)); + assert!(!obmc_skip_chroma_above(8, 16, 0, 0)); + } +} + /// One OBMC neighbour as the PARSE thread resolved it (lane-defer8): every /// value [`obmc_run`] needs that lives in the mode-info grid or the /// neighbour bands, which the parse keeps overwriting as it walks on. @@ -29774,9 +30247,13 @@ pub(crate) fn obmc_run( if !skip_chroma_above { // lane-t900 r13 (measured, NOT a defect): libaom's min-4 clamp // sizes only the OBMC PREDICTION buffer; the blend length is the - // plain half (`build_obmc_inter_pred_above`: `overlap >> ss_y`). - let (cbw, cbh, cox) = (bw / 2, overlap_above / 2, ox / 2); - let cw = cbw.min(write_w / 2 - cox); + // plain overlap (`build_obmc_inter_pred_above`: + // `overlap >> ss_y`) -- the PLANE's own subsampling shift, 0 at + // 4:4:4 (lane-av1-llpred: the old `/2` hardcoded the 4:2:0 half + // and half-blended every 4:4:4 OBMC block's chroma). + let (cbw, cbh, cox) = + (bw >> ss_x(fctx), overlap_above >> ss_y(fctx), ox >> ss_x(fctx)); + let cw = cbw.min((write_w >> ss_x(fctx)) - cox); obmc_neighbour_pred(nu, cpx + cox, cpy, nb.mv, cbw, cbh, false, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_u, fctx); obmc_blend_v(pred_u, chroma_side, cox, 0, cw, cbh, cbw, &tmp_u); obmc_neighbour_pred(nv, cpx + cox, cpy, nb.mv, cbw, cbh, false, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_v, fctx); @@ -29791,7 +30268,8 @@ pub(crate) fn obmc_run( let (bw, bh, oy) = (overlap_left, nb.span4 * 4, nb.off4 * 4); obmc_neighbour_pred(ny, px, py + oy, nb.mv, bw, bh, true, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_y, fctx); obmc_blend_h(pred_y, side, 0, oy, bw, bh.min(write_h - oy), &tmp_y); - let (cbw, cbh, coy) = (overlap_left / 2, bh / 2, oy / 2); + let (cbw, cbh, coy) = + (overlap_left >> ss_x(fctx), bh >> ss_y(fctx), oy >> ss_y(fctx)); obmc_neighbour_pred(nu, cpx, cpy + coy, nb.mv, cbw, cbh, false, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_u, fctx); if let Some((_, _, idx)) = ec_mcb { eprintln!( @@ -29803,7 +30281,7 @@ pub(crate) fn obmc_run( eprintln!("OUR_MCB lrow{r}: {row:?}"); } } - let ch = cbh.min(write_h / 2 - coy); + let ch = cbh.min((write_h >> ss_y(fctx)) - coy); obmc_blend_h(pred_u, chroma_side, 0, coy, cbw, ch, &tmp_u); obmc_neighbour_pred(nv, cpx, cpy + coy, nb.mv, cbw, cbh, false, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_v, fctx); obmc_blend_h(pred_v, chroma_side, 0, coy, cbw, ch, &tmp_v); @@ -32618,6 +33096,8 @@ fn decode_inter_block( side, write_w, write_h, + ss_x(fctx), + ss_y(fctx), chroma_side, px, py, @@ -34146,6 +34626,89 @@ fn decode_inter_block( u_grid = if uo.is_empty() { Grid::Zero(zero) } else { Grid::Own(uo) }; v_grid = if vo.is_empty() { Grid::Zero(zero) } else { Grid::Own(vo) }; mu_chroma = true; + } else if ss_x(fctx) == 0 && ss_y(fctx) == 0 && chroma_side > chroma_tx { + // lane-av1-rect128recon: at ss 0/0 the uv plane block of a + // 64x64 intra block inside an inter frame is 64x64 while + // `av1_get_max_uv_txsize` caps the unit at TX_32X32 -- FOUR + // plane-major TX_32X32 units (libaom + // `decode_token_recon_block`'s plane loop), each with its own + // neighbour context and `get_txb_ctx`'s offset-10 rows (+3 on + // the `txb_skip_chroma_32` table, lane-sb128b r3), each + // stamped immediately so the next unit reads it. The old arm + // read ONE whole-plane unit with the block-level context and + // no offset: three quarters of the plane's residual was never + // read, the unit's `txb_skip` came off the offset-7 row (444 + // witness f2, right-half intra 64x64: U unit (0,0) ctx 0 + // where aom reads 10), and the coded corner was even + // dequantized at the TX_64X64 dqDenom. + let mu_units_n = chroma_side / chroma_tx; + let mut u_acc = vec![0i32; chroma_side * chroma_side]; + let mut v_acc = vec![0i32; chroma_side * chroma_side]; + for plane_idx in 1..=2 { + let buf: &mut PlaneBuf<'static> = + if plane_idx == 1 { &mut *u } else { &mut *v }; + for cu_row in 0..mu_units_n { + for cu_col in 0..mu_units_n { + let cu_mi = ( + at_mi.0 + cu_row * (chroma_tx / MI), + at_mi.1 + cu_col * (chroma_tx / MI), + ); + let cu_around = neighbours.around_mi(cu_mi, chroma_tx); + let cu_reach = crate::decode::tu_reach( + side, + side, + cu_col * chroma_tx, + cu_row * chroma_tx, + chroma_tx, + reach, + px, + py, + y.width, + y.height, fctx, + ); + let cu_grid = read_plane( + dec, + cdfs, + chroma_set, + scan_chroma, + plane_idx, + cu_around[plane_idx], + mode, + uv_predict_mode, + angle_delta_uv, + cu_reach, + buf, + cpx + cu_col * chroma_tx, + cpy + cu_row * chroma_tx, + chroma_tx, + chroma_tx, + base_q_idx, + // CfL is capped at 32x32 (`is_cfl_allowed`), + // so a block this size never carries alpha. + None, + None, + Some(3), + smooth_neighbor_uv, fctx, + )?; + // Immediately, so the NEXT unit reads this one's + // coefficient context. + neighbours.record_mi_chroma( + cu_mi, chroma_tx, chroma_tx, plane_idx, &cu_grid, + ); + hit!(CHROMA_SPLIT_TX_HITS); + let acc = if plane_idx == 1 { &mut u_acc } else { &mut v_acc }; + for rr in 0..chroma_tx { + let start = + (cu_row * chroma_tx + rr) * chroma_side + cu_col * chroma_tx; + acc[start..start + chroma_tx] + .copy_from_slice(&cu_grid[rr * chroma_tx..][..chroma_tx]); + } + } + } + } + mu_chroma = true; + u_grid = Grid::Own(u_acc); + v_grid = Grid::Own(v_acc); } else { if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); @@ -34217,8 +34780,21 @@ fn decode_inter_block( // strip's own record wrote empty chroma state over those cells -- this // rewrite is what libaom's single `av1_set_contexts` call for the 8x4 // (4x8) chroma unit leaves behind. + // lane-av1-444interband: 4:2:0 ONLY. At ss 0/0 every strip IS its own + // chroma reference (`is_chroma_reference`, no mi parity test), its own + // `record_rect_mi` above already stamps exactly the strip's 16x4 (4x16) + // chroma span -- libaom `av1_set_entropy_contexts`, or + // `av1_reset_entropy_context` for a skipped strip (decodeframe.c:1180) + // -- and the pair-form 16x8 (8x16) span anchored at `pair_mi` (== the + // strip's own mi at ss 0/0) smeared the strip's state over one extra + // row/col of cells: a skipped strip wrote zero over `left[r+1][1..2]`, + // erasing the 16x16-intra block to its left's U/V stamps, and the strip + // below read its chroma `txb_skip` off the wrong CDF row (t6 frame 1, + // U unit (2,8): our base 0 vs aom's base 1, `left[2][1]` 0 vs 23 -- + // `INTER16_CHROMA_PAIR_HITS` fired 31x on a stream that has no pairs). let pair_chroma = strip_chroma .filter(|s| s.has_chroma) + .filter(|_| ss_x(fctx) == 1 && ss_y(fctx) == 1) .map(|s| (s, neighbour_state(&u_grid), neighbour_state(&v_grid))); // lane-vert46 r1: libaom stamps the chroma entropy context PER TRANSFORM // UNIT (`av1_set_entropy_contexts` inside `decode_reconstruct_tx`'s mu-chunk @@ -34236,17 +34812,37 @@ fn decode_inter_block( let cu = if lossless(fctx) { 4usize } else { 32usize }; let mut units = Vec::new(); if lossless(fctx) { - let (rows, cols) = ((write_h / 2).div_ceil(cu), (write_w / 2).div_ceil(cu)); + // lane-av1-llinter: a TX_4X4 chroma unit covers `4 << ss` LUMA + // pixels (8, x2-per-unit, at 4:2:0; 4, x1, at 4:4:4) -- the + // composed plane grid then holds a full cu-row per chroma row and + // each unit's own origin sits `(cu << ss) / MI` mi cells out. + // The hardcoded 4:2:0 /2-and-x2 math stamped half the plane with + // double spans at 4:4:4 and corrupted the next block's + // `txb_skip_ctx` (dodge2 frame 1, U unit mi (4,16) read row 11 + // where the oracle reads row 10). + let (rows, cols) = ( + (write_h >> ss_y(fctx)).div_ceil(cu), + (write_w >> ss_x(fctx)).div_ceil(cu), + ); for cr in 0..rows { for cc in 0..cols { - let cu_mi = (at.0 + cr * (cu * 2 / MI), at.1 + cc * (cu * 2 / MI)); + let cu_mi = ( + at.0 + cr * ((cu << ss_y(fctx)) / MI), + at.1 + cc * ((cu << ss_x(fctx)) / MI), + ); for (plane, grid) in [(1usize, &u_grid), (2usize, &v_grid)] { let mut unit = Vec::with_capacity(cu * cu); for rr in 0..cu { let start = (cr * cu + rr) * chroma_side + cc * cu; unit.extend_from_slice(&grid[start..start + cu]); } - units.push((cu_mi, plane, Grid::Own(unit), cu * 2, cu * 2)); + units.push(( + cu_mi, + plane, + Grid::Own(unit), + cu << ss_x(fctx), + cu << ss_y(fctx), + )); } } } @@ -36313,6 +36909,23 @@ fn decode_inter_sub8_rect2( push_mc_rect(2, px, py, SIDE, bw, bh, sv, &ZERO_RESIDUAL[..SIDE * SIDE], fctx); neighbours.record_mi_chroma(lmi, bw, bh, 1, &ZERO_RESIDUAL[..bw * bh]); neighbours.record_mi_chroma(lmi, bw, bh, 2, &ZERO_RESIDUAL[..bw * bh]); + } else if lossless(fctx) && !mono(fctx) { + // lane-av1-llsub8b: lossless codes TX_4X4 on EVERY plane + // (`av1_get_tx_size`, blockd.h:1383), so this 4:4:4 piece's + // (8,4)/(4,8) chroma plane block is a 2x1/1x2 raster of + // TX_4X4 units, not the ONE TX_8X4 rect unit the lossy arm + // below reads -- that single rect is what tripped + // `TxParams::run`'s WHT assert ((8,4) != (4,4), + // decode.rs:2566). The walk stamps each unit's own + // coefficient context, so -- unlike the lossy arm -- no + // whole-block `record_mi_chroma` runs after it: the walk's + // per-unit stamps ARE the block's chroma contexts (the same + // rule `leaf8_inter_chroma_lossless`'s caller obeys). + read_inter_chroma_lossless( + dec, cdfs, neighbours, u, v, su, sv, + (rmi, cmi), (px, py), (0, 0), (bw, bh), (bw, bh), SIDE, 0, + base_q_idx, &mut Vec::new(), &mut Vec::new(), fctx, + )?; } else { let ca = neighbours.around_mi_rect(lmi, bw, bh); let (ug, _) = read_inter_plane_rect( @@ -36751,6 +37364,12 @@ fn decode_inter_block8( // stores `UV_DC_PRED`, exactly as [`decode_inter_block`] one level up. let mut uv_predict_mode = DC_PRED; let (luma_grid, u_grid, v_grid); + // lane-av1-llinter: set when a lossless 4:4:4 leaf's chroma went through + // the per-unit walk (`read_inter_chroma_lossless`) -- the walk stamps each + // TX_4X4 unit's own coefficient context, so the tail's whole-block + // `record_mi` gets its chroma half saved/restored around, exactly like + // `saved_luma_ctx` does for a `split8` luma. + let mut chroma_stamped_per_unit = false; let mut compound_ctx8: Option<(i8, i8, u8, u8)> = None; // lane-inter8 r1: this leaf's own resolved references, handed back so the // NEXT leaf of the same 16x16 can use them as its real above/left @@ -37360,42 +37979,52 @@ fn decode_inter_block8( split8, fctx, )?; luma_grid = grid8; - u_grid = read_inter_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 1, - around[1], - mode_for_tx, - u, - cpx, - cpy, - chroma_side, - base_q_idx, - su, - Some(luma_tx_type), - None, fctx, - )? - .0; - v_grid = read_inter_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 2, - around[2], - mode_for_tx, - v, - cpx, - cpy, - chroma_side, - base_q_idx, - sv, - Some(luma_tx_type), - None, fctx, - )? - .0; + if chroma_side == 8 && lossless(fctx) && !mono(fctx) { + let (ug, vg) = leaf8_inter_chroma_lossless( + dec, cdfs, neighbours, u, v, su, sv, + leaf_mi, (cpx, cpy), base_q_idx, fctx, + )?; + u_grid = ug; + v_grid = vg; + chroma_stamped_per_unit = true; + } else { + u_grid = read_inter_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 1, + around[1], + mode_for_tx, + u, + cpx, + cpy, + chroma_side, + base_q_idx, + su, + Some(luma_tx_type), + None, fctx, + )? + .0; + v_grid = read_inter_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 2, + around[2], + mode_for_tx, + v, + cpx, + cpy, + chroma_side, + base_q_idx, + sv, + Some(luma_tx_type), + None, fctx, + )? + .0; + } } // lane-inter8 r2: the COMPOUND leaf used to return here // WITHOUT the end-of-function `record_mi`/`fill_lf_grid` the @@ -37451,7 +38080,32 @@ fn decode_inter_block8( palette_record8.2, palette_record8.3, ); + let saved_chroma_ctx = chroma_stamped_per_unit.then(|| { + ( + [ + [neighbours.left[leaf_mi.0][1], neighbours.left[leaf_mi.0][2]], + [neighbours.left[leaf_mi.0 + 1][1], neighbours.left[leaf_mi.0 + 1][2]], + ], + [ + [neighbours.above[leaf_mi.1][1], neighbours.above[leaf_mi.1][2]], + [neighbours.above[leaf_mi.1 + 1][1], neighbours.above[leaf_mi.1 + 1][2]], + ], + ) + }); neighbours.record_mi(leaf_mi, 8, &[&luma_grid[..], &u_grid[..], &v_grid[..]]); + if let Some((left, above)) = saved_chroma_ctx { + // The walk's per-unit stamps are the block's real chroma + // coefficient contexts (`av1_set_contexts` per TX_4X4 + // unit); put them back over `record_mi`'s composed state. + for (cell, uv) in left.into_iter().enumerate() { + neighbours.left[leaf_mi.0 + cell][1] = uv[0]; + neighbours.left[leaf_mi.0 + cell][2] = uv[1]; + } + for (cell, uv) in above.into_iter().enumerate() { + neighbours.above[leaf_mi.1 + cell][1] = uv[0]; + neighbours.above[leaf_mi.1 + cell][2] = uv[1]; + } + } if let Some((left, above)) = saved_luma_ctx { for (cell, state) in left.into_iter().enumerate() { neighbours.left[leaf_mi.0 + cell][0] = state; @@ -37881,6 +38535,8 @@ fn decode_inter_block8( SIDE, SIDE, SIDE, + ss_x(fctx), + ss_y(fctx), chroma_side, px, py, @@ -38073,42 +38729,52 @@ fn decode_inter_block8( split8, fctx, )?; luma_grid = grid8; - u_grid = read_inter_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 1, - around[1], - mode_for_tx, - u, - cpx, - cpy, - chroma_side, - base_q_idx, - su, - Some(luma_tx_type), - None, fctx, - )? - .0; - v_grid = read_inter_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 2, - around[2], - mode_for_tx, - v, - cpx, - cpy, - chroma_side, - base_q_idx, - sv, - Some(luma_tx_type), - None, fctx, - )? - .0; + if chroma_side == 8 && lossless(fctx) && !mono(fctx) { + let (ug, vg) = leaf8_inter_chroma_lossless( + dec, cdfs, neighbours, u, v, su, sv, + leaf_mi, (cpx, cpy), base_q_idx, fctx, + )?; + u_grid = ug; + v_grid = vg; + chroma_stamped_per_unit = true; + } else { + u_grid = read_inter_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 1, + around[1], + mode_for_tx, + u, + cpx, + cpy, + chroma_side, + base_q_idx, + su, + Some(luma_tx_type), + None, fctx, + )? + .0; + v_grid = read_inter_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 2, + around[2], + mode_for_tx, + v, + cpx, + cpy, + chroma_side, + base_q_idx, + sv, + Some(luma_tx_type), + None, fctx, + )? + .0; + } } } else { let mode = dec.symbol(&mut cdfs.y_mode[SIZE_GROUP_8]); @@ -38159,10 +38825,22 @@ fn decode_inter_block8( // but `DC_PRED` was refused here, which is what blocked the low-cq // CDEF arms and the 10-bit gates. let has_chroma = !mono(fctx); + // lane-av1-llintra8: `read_intra_mode_uv` (decodemv.c:145) picks the + // uv CDF row by `is_cfl_allowed` (cfl.h:23) -- at LOSSLESS that is + // "the chroma plane block is BLOCK_4X4" (cfl.h:29), for this + // BLOCK_8X8 leaf only at 4:2:0. The 4:4:4 lossless leaf reads the + // 13-symbol `uv_mode_no_cfl` alphabet; the unconditional CFL row + // consumed a different partition than aomdec at the leaf's own + // uv_mode symbol (class wrong-alphabet-same-value) and desynced + // every stream that reached the leaf's lossless chroma walk below. + // 4:2:0 and every non-lossless partition keep the CFL row + // (`cfl_allowed_px` answers true exactly as before). let uv_mode = if !has_chroma { DC_PRED - } else { + } else if cfl_allowed_px(SIDE, SIDE, fctx) { dec.symbol(&mut cdfs.uv_mode_cfl[mode]) + } else { + dec.symbol(&mut cdfs.uv_mode_no_cfl[mode]) }; if crate::envflags::env_flag!("EC_TRACE_MODE_STEP") { eprintln!( @@ -38572,6 +39250,33 @@ fn decode_inter_block8( )? }; let ac = alpha.map(|_| cfl_src(px, py, SIDE)); + if chroma_side == 8 && lossless(fctx) && !mono(fctx) { + // lane-av1-llintra8: lossless codes TX_4X4 on EVERY plane + // (`av1_get_tx_size`, blockd.h:1383), so this intra leaf's 8x8 + // chroma plane block is a 2x2 raster of TX_4X4 units per + // plane, plane-major -- the same per-unit walk the >=16x16 + // intra-in-inter block runs, not one TX_8X8 unit (whose WHT + // hits `TxParams::run`'s `(8, 8) != (4, 4)` lossless assert). + // The walk stamps each unit's own coefficient context + // (`record_mi_chroma` inside it), so the tail's whole-block + // `record_mi` gets its chroma half saved/restored around -- + // the same rule the INTER arms' + // `leaf8_inter_chroma_lossless` obeys. 4:2:0 keeps its single + // TX_4X4 unit in the `else` below. + let (mut uo, mut vo) = (Vec::new(), Vec::new()); + read_intra_chroma_lossless( + dec, cdfs, neighbours, u, v, leaf_mi, (px, py), (cpx, cpy), + SIDE, (chroma_side, chroma_side), (0, 0), + (chroma_side, chroma_side), chroma_side, reach, + (y.width, y.height), mode, uv_predict_mode, angle_delta_uv, + palette_uv_bufs.as_ref().map(|(a, b)| (&a[..], &b[..])), + smooth_neighbor_uv, base_q_idx, &mut uo, &mut vo, fctx, + )?; + u_grid = if uo.is_empty() { Grid::Zero(64) } else { Grid::Own(uo) }; + v_grid = if vo.is_empty() { Grid::Zero(64) } else { Grid::Own(vo) }; + chroma_stamped_per_unit = true; + hit!(LLINTRA8_CHROMA_WALK_HITS); + } else { if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } @@ -38622,6 +39327,7 @@ fn decode_inter_block8( None, smooth_neighbor_uv, fctx, )?; + } } } // lane-txselect: a split leaf's plane-0 neighbour context is per 4x4 @@ -38665,7 +39371,32 @@ fn decode_inter_block8( palette_record8.2, palette_record8.3, ); + let saved_chroma_ctx = chroma_stamped_per_unit.then(|| { + ( + [ + [neighbours.left[leaf_mi.0][1], neighbours.left[leaf_mi.0][2]], + [neighbours.left[leaf_mi.0 + 1][1], neighbours.left[leaf_mi.0 + 1][2]], + ], + [ + [neighbours.above[leaf_mi.1][1], neighbours.above[leaf_mi.1][2]], + [neighbours.above[leaf_mi.1 + 1][1], neighbours.above[leaf_mi.1 + 1][2]], + ], + ) + }); neighbours.record_mi(leaf_mi, 8, &[&luma_grid[..], &u_grid[..], &v_grid[..]]); + if let Some((left, above)) = saved_chroma_ctx { + // The walk's per-unit stamps are the block's real chroma coefficient + // contexts (`av1_set_contexts` per TX_4X4 unit); put them back over + // `record_mi`'s one composed state. + for (cell, uv) in left.into_iter().enumerate() { + neighbours.left[leaf_mi.0 + cell][1] = uv[0]; + neighbours.left[leaf_mi.0 + cell][2] = uv[1]; + } + for (cell, uv) in above.into_iter().enumerate() { + neighbours.above[leaf_mi.1 + cell][1] = uv[0]; + neighbours.above[leaf_mi.1 + cell][2] = uv[1]; + } + } // lane-uv8 r1: this leaf never stamped a mode band at all, so the block // below/right of it read whatever block last wrote the coarse [`SUB`] // slot -- now that an intra leaf here can code a smooth/directional @@ -41810,7 +42541,15 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( (false, None) => None, } } else { - lr_active.then(|| (plane_snapshot(&y, 0), plane_snapshot(&u, 1), plane_snapshot(&v, 1))) + // lane-av1422filter: chroma band geometry follows the frame's own + // ss_y (see the keyframe path's note) -- 4:2:2 stripes full-height. + lr_active.then(|| { + ( + plane_snapshot(&y, 0), + plane_snapshot(&u, ss_y(fctx) as u32), + plane_snapshot(&v, ss_y(fctx) as u32), + ) + }) }; // lane-tiny r4: post-deblock / post-CDEF dumps mirroring aomdec's own // EC_AV1_POSTDEBLOCK_DUMP (decodeframe.c ~5404) -- with the pre-filter diff --git a/crates/ec-av1/src/encode.rs b/crates/ec-av1/src/encode.rs index eb48b255..7a07443d 100644 --- a/crates/ec-av1/src/encode.rs +++ b/crates/ec-av1/src/encode.rs @@ -6801,6 +6801,8 @@ fn obmc_prediction( side, side, side, + crate::decode::ss_x(fctx), + crate::decode::ss_y(fctx), side / 2, x, y, diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index fc5f3f9f..35eb9a7f 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -5399,6 +5399,497 @@ pub(crate) mod tests { } } + /// lane-av1-llband: the pinned 4:4:4 LOSSLESS key frame + /// (`fixtures/ll444-lossless-key.obu`, the `ll444` recipe's frame 0 -- + /// `testsrc2 128x96` yuv444p cut to its key frame) decodes sample-exact, + /// and its HORZ/VERT strips really walked their chroma as 4x4 units at + /// subsampling 0/0 (one unit per mi cell). That unit walk used the 4:2:0 + /// span (8 luma px per 4x4 chroma unit) unconditionally, so every unit + /// past the first column/row read its `txb_skip` context two mi cells + /// over and stamped a 2-cell smear -- the 178-byte key-frame miss, first + /// divergence at the 16x8 leaf mi (16,24)'s U bc=2 unit (oracle + /// `txb_skip` base 0 off `above[26]`, ours base 1 off the polluted + /// `above[29]`). The counter assertion is the non-vacuity half (class + /// `gate-blind-to-feature`): a stream that never reaches the 4:4:4 unit + /// walk must not pass. + #[test] + fn a_real_aomenc_lossless_444_key_frame_decodes_sample_exact() { + const NAME: &str = "a_real_aomenc_lossless_444_key_frame_decodes_sample_exact"; + if !have_ffmpeg() { + eprintln!("SKIP {NAME}: no ffmpeg"); + return; + } + let Ok(stream) = std::fs::read(pin_dir().join("ll444-lossless-key.obu")) else { + eprintln!( + "SKIP {NAME}: no pinned bytes at {} -- regenerate with \ + `testsrc2 128x96` yuv444p 6 frames, aomenc --profile=1 --lossless=1 \ + --enable-palette=0 --enable-intrabc=0, cut to the key frame's OBUs", + pin_dir().join("ll444-lossless-key.obu").display() + ); + return; + }; + // Blindness guard: the pinned fixture must really be a lossless frame. + let mut parser = Av1Parser::new(); + let mut pos = 0usize; + let mut lossless = false; + while pos < stream.len() { + let obu = parser.parse_obu(&stream[pos..]).expect("aomenc OBU parses"); + pos += obu.total_size.max(1); + if let ObuKind::FrameHeader(h) | ObuKind::Frame(h, _) = obu.kind { + lossless = h.lossless.iter().all(|&l| l); + } + } + assert!(lossless, "{NAME} went blind: the pinned frame is not lossless"); + let before = crate::decode::rect_split_lossless_chroma444_hits(); + let ours = decode_stream(&stream).expect("a 444 lossless key-frame stream decodes"); + assert_eq!(ours.len(), 1, "{NAME}: frame count"); + assert!( + crate::decode::rect_split_lossless_chroma444_hits() > before, + "{NAME} went blind: no lossless HORZ/VERT strip walked its chroma \ + as 4x4 units at subsampling 0/0" + ); + let refs = Command::new("ffmpeg") + .args(["-v", "error", "-f", "obu", "-i", "-", "-f", "rawvideo", "-pix_fmt", "yuv444p", "-"]) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .and_then(|mut child| { + use std::io::Write as _; + child.stdin.as_mut().expect("stdin").write_all(&stream)?; + child.wait_with_output() + }) + .expect("ffmpeg 444 decode failed"); + assert!(refs.status.success(), "{}", String::from_utf8_lossy(&refs.stderr)); + let frame = &ours[0]; + let planes = [ + (&frame.y, frame.width * frame.height), + (&frame.u, frame.width * frame.height), + (&frame.v, frame.width * frame.height), + ]; + let mut off = 0usize; + for (plane, (g, len)) in planes.iter().enumerate() { + let raw = &refs.stdout[off..off + len]; + let bad = g.iter().zip(raw.iter()).filter(|&(&a, &b)| a != u16::from(b)).count(); + assert_eq!(bad, 0, "{NAME}: plane {plane}: {bad} samples differ"); + off += len; + } + } + + /// As [`ffmpeg_decode_sequence`], for a 4:4:4 stream: chroma planes are + /// FULL resolution (`yuv444p` rawvideo), the shape lane-av1-llinter's + /// lossless profile-1 fixture codes. + fn ffmpeg_decode_sequence_444( + stream: &[u8], + width: usize, + height: usize, + frames: usize, + ) -> Vec { + let out = run_with_stdin( + Command::new("ffmpeg").args([ + "-v", "error", "-f", "obu", "-i", "-", "-f", "rawvideo", "-pix_fmt", "yuv444p", "-", + ]), + stream, + ); + assert!( + out.status.success(), + "ffmpeg refused the 4:4:4 stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let plane = width * height; + let frame_bytes = 3 * plane; + assert_eq!( + out.stdout.len(), + frame_bytes * frames, + "expected {frames} 4:4:4 frames, ffmpeg said: {}", + String::from_utf8_lossy(&out.stderr) + ); + (0..frames) + .map(|i| { + let base = i * frame_bytes; + Pic { + width, + height, + y: out.stdout[base..base + plane].iter().map(|&v| u16::from(v)).collect(), + u: out.stdout[base + plane..base + 2 * plane].iter().map(|&v| u16::from(v)).collect(), + v: out.stdout[base + 2 * plane..base + 3 * plane].iter().map(|&v| u16::from(v)).collect(), + } + }) + .collect() + } + + /// lane-av1-llinter: the firing gate for the lossless 4:4:4 INTER chroma + /// fix. The fixture is the report's dodge2 stream pinned into `fixtures/`: + /// aomenc profile 1 over testsrc2 128x96 yuv444p, `--lossless=1`, + /// `--sb-size=64 --min-partition-size=64 --max-partition-size=64`, 6 + /// frames; 37658 bytes, sha256 + /// `5a070fa351a3f2109de855234f2b3d0a872970f3e7f658db21f65c12eeb135b4`. + /// The firing counter is the EXISTING `decode::chroma_split_tx_hits` (one + /// bump per lossless chroma TX unit read): with min=max partition 64 the + /// roots stay whole 64x64 inter blocks -- no 8x8 leaf exists in this + /// stream -- so every chroma unit goes through the big-block ss-aware + /// lossless route this lane fixed (fixes 2-5). A 4:2:0 lossless stream + /// fires the same counter, but the fixture bytes are pinned, so the gate + /// cannot run on anything else; the pre-fix 4:2:0-hardcoded math corrupts + /// at 4:4:4, so the pixel-exact compares are what prove the ss-aware path + /// (class `gate-blind-to-feature`). Every frame must come out pixel-exact + /// through BOTH the oracle `aomdec --rawvideo` and ffmpeg. The + /// default-partition ll444 stream is deliberately NOT claimed here: its + /// key frame is still the intra lane's named sub8-chroma stop + /// (lanes/av1llintra.report.md). + #[test] + fn a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact() { + const NAME: &str = "a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact"; + const FIXTURE_LEN: usize = 37658; + const FIXTURE_FNV: u64 = 0xf68d_c26f_a14d_283c; + const W: usize = 128; + const H: usize = 96; + const FRAMES: usize = 6; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/ll444_minp64_inter.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + let before = crate::decode::chroma_split_tx_hits(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the pinned stream no longer decodes cleanly: {e}") + }); + let hits = crate::decode::chroma_split_tx_hits(); + assert!( + hits > before, + "{NAME}: gate is vacuous -- no lossless chroma TX unit was read \ + (delta {before} -> {hits})" + ); + assert_eq!(frames.len(), FRAMES, "{NAME}: frame count"); + for f in &frames { + assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions"); + } + + // The oracle aomdec, rawvideo out: FRAMES concatenated yuv444p frames. + if aomdec_path().is_file() { + let dir = std::env::temp_dir().join(format!("ec-av1-ll444-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + for (i, f) in frames.iter().enumerate() { + let base = i * W * H * 3; + for ((plane, off), p) in [(&f.y, 0usize), (&f.u, W * H), (&f.v, 2 * W * H)] + .into_iter() + .zip(["y", "u", "v"]) + { + let want = &ref_raw[base + off..base + off + W * H]; + let bad = plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!(bad, 0, "{NAME}: aomdec frame {i} plane {p}: {bad} samples differ"); + } + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + + // ffmpeg's decoder: same frames, full-resolution chroma. + if have_ffmpeg() { + let refs = ffmpeg_decode_sequence_444(&stream, W, H, FRAMES); + for (i, (got, want)) in frames.iter().zip(refs.iter()).enumerate() { + for (p, (g, r)) in [(&got.y, &want.y), (&got.u, &want.u), (&got.v, &want.v)] + .iter() + .enumerate() + { + let bad = g.iter().zip(r.iter()).filter(|(a, b)| a != b).count(); + assert_eq!(bad, 0, "{NAME}: ffmpeg frame {i} plane {p}: {bad} samples differ"); + } + } + } else { + eprintln!("SKIP {NAME} ffmpeg arm: no ffmpeg"); + } + } + + /// lane-av1llpredgate2: the debug-exact pin for the ss-aware + /// `obmc_skip_chroma_above` decision (lane-av1-llpred2). Fixture is the + /// llpred/llpred2 reports' stream pinned into `fixtures/`: testsrc2 + /// 128x96 yuv444p, aomenc `--profile=1 --lossless=1 --enable-palette=0 + /// --enable-intrabc=0 --min-partition-size=8 --max-partition-size=64`, + /// 6 frames; 34037 bytes, sha256 + /// `04fb6d38de5382e647bfb70b6a17802f1fccc5502e6698c0394167891f2b27dc`. + /// + /// This is a DEBUG-build path by construction: the old ratio-based ss + /// derivation read `write_h >> trailing_zeros(0)` = `>> 64` on this + /// stream's 4:4:4 OBMC rect strips, a panic ONLY under + /// debug_assertions (release wraps and was already byte-exact), so + /// `cargo test`'s default dev profile is the profile where the defect + /// class reproduces and where the parent's byte-exact proof was + /// measured. + /// + /// No skip-arm counter gate is possible on this stream, measured: + /// OBMC runs 77 times with 20 rect leaves, but + /// `obmc_skip_chroma_above` returns true 0 times -- at 4:4:4 the skip + /// needs a 4x4/8x4/4x8 PLANE block and min-partition-8 never codes one. + /// So per the lane ticket the proof splits in two: the decision TABLE + /// (4:2:0 rect strips still skip, 4:4:4 shifts never leave `usize`) + /// stays pinned by `decode::obmc_skip_chroma_tests:: + /// rect_strips_skip_above_chroma_at_420_and_shift_never_overflows`, + /// and THIS stream gate pins the end-to-end behaviour -- every sample + /// of every frame must match the oracle aomdec exactly, so a returning + /// chroma diff (the lane-av1-llpred ss-blind re-blend class + /// `obmc-ss-blind-chroma-above`) or the debug shift panic goes red + /// here by name. + #[test] + fn a_lossless_444_min_partition8_inter_stream_decodes_sample_exact() { + const NAME: &str = "a_lossless_444_min_partition8_inter_stream_decodes_sample_exact"; + const FIXTURE_LEN: usize = 34037; + const FIXTURE_FNV: u64 = 0x2c8f_4a2c_c025_52da; + const W: usize = 128; + const H: usize = 96; + const FRAMES: usize = 6; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/ll444_minp8_inter.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the pinned stream no longer decodes cleanly: {e}") + }); + assert_eq!(frames.len(), FRAMES, "{NAME}: frame count"); + for f in &frames { + assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions"); + } + + // The oracle aomdec, rawvideo out: FRAMES concatenated yuv444p frames. + if aomdec_path().is_file() { + let dir = std::env::temp_dir().join(format!("ec-av1-llminp8-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + for (i, f) in frames.iter().enumerate() { + let base = i * W * H * 3; + for ((plane, off), p) in [(&f.y, 0usize), (&f.u, W * H), (&f.v, 2 * W * H)] + .into_iter() + .zip(["y", "u", "v"]) + { + let want = &ref_raw[base + off..base + off + W * H]; + let bad = plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!( + bad, 0, + "{NAME}: aomdec frame {i} plane {p}: {bad} samples differ \ + (class obmc-ss-blind-chroma-above)" + ); + } + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + + // ffmpeg's decoder: same frames, full-resolution chroma. + if have_ffmpeg() { + let refs = ffmpeg_decode_sequence_444(&stream, W, H, FRAMES); + for (i, (got, want)) in frames.iter().zip(refs.iter()).enumerate() { + for (p, (g, r)) in [(&got.y, &want.y), (&got.u, &want.u), (&got.v, &want.v)] + .iter() + .enumerate() + { + let bad = g.iter().zip(r.iter()).filter(|(a, b)| a != b).count(); + assert_eq!(bad, 0, "{NAME}: ffmpeg frame {i} plane {p}: {bad} samples differ"); + } + } + } else { + eprintln!("SKIP {NAME} ffmpeg arm: no ffmpeg"); + } + } + + /// lane-av1-444sb: the byte-exact pin for the ss-aware 128-rect chroma + /// unit walk (`decode_block_128rect`). The parent walk hardcoded the + /// 4:2:0 mu-chunk span -- one 32x32 chroma unit per 64x64 chunk, chunk + /// offsets `*32`, clip step `*8` -- so at 4:4:4 a 128-root HORZ/VERT + /// intra block coded HALF its chroma units, left the remaining units' + /// coefficients unread and desynced the tile from the first such block + /// on; every superblock after SB(0,0) carried damage and the chroma + /// first-diffs sat on the 64/128 grid. + /// + /// `crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu`, 794 bytes, + /// sha256 + /// `27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80`: + /// `ffmpeg -i bands444.y4m -frames:v 3 -vf scale=192:160 -pix_fmt + /// yuv444p -f yuv4mpegpipe` piped to `aomenc --codec=av1 --profile=1 + /// --passes=1 --end-usage=q --cq-level=32 --cpu-used=0 --threads=1 + /// --row-mt=0 --sb-size=128 --lag-in-frames=0 --auto-alt-ref=0 + /// --kf-max-dist=1000 --i444 --enable-restoration=1 --obu --limit=3`. + /// Real content is required: the synthetic lavfi sources this lane swept + /// (testsrc2/testsrc/smptebars/mandelbrot/gradients) all decode frame 0 + /// exact because they never force a 128-root rect; bands does (kf + /// PARTITION_VERT 64x128 at mi(0,32) plus an intra-in-inter 64x128). + /// + /// Non-vacuity via the `decode::intra_sb128_hits` delta: a stream that + /// stopped coding 128-axis intra blocks reads 0 and the gate fails + /// instead of passing over a decode that never reached the fixed body + /// (class `gate-blind-to-feature`). The oracle arms pin every sample of + /// every frame against both aomdec and ffmpeg, so a returning chroma + /// span regression goes red here by name. + #[test] + fn a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact() { + const NAME: &str = "a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact"; + const FIXTURE_LEN: usize = 794; + const FIXTURE_FNV: u64 = 0xf5a7_27f4_3fa7_abc3; + const W: usize = 192; + const H: usize = 160; + const FRAMES: usize = 3; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/444_sb128rect_lr_witness.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + let before = crate::decode::intra_sb128_hits(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the pinned stream no longer decodes cleanly: {e}") + }); + let (horz, vert, _) = crate::decode::intra_sb128_hits(); + assert!( + horz - before.0 + (vert - before.1) > 0, + "{NAME}: this stream coded NO 128-axis intra block -- the fixed body \ + never ran (class gate-blind-to-feature)" + ); + assert_eq!(frames.len(), FRAMES, "{NAME}: frame count"); + for f in &frames { + assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions"); + } + // All three frames are pinned byte-exact against both oracles (the + // aomdec/ffmpeg arms below run over `.take(3)`): frame 0's keyframe + // PARTITION_VERT 64x128, frame 1's inter pieces, and frame 2 -- whose + // right superblock column (the 128-root VERT piece at the frame edge) + // is three intra blocks (64x64, 64x32, 64x32) whose chroma units ride + // the inter-frame intra tail. That tail read ONE whole-plane chroma + // unit with the block-level context where 4:4:4 codes four + // plane-major TX_32X32 units with per-unit contexts and the + // offset-10 `get_txb_ctx` rows, which left three quarters of the + // planes' residual unread and misaligned the symbol stream from the + // first chroma unit on (f2 PREFILT Y 6952 / U 9568 / V 13496, first + // diffs entering at column 128). Fixed on lane-av1-rect128recon; + // the earlier "LR never restores RU row 0" attribution on this frame + // was a stage-ladder mixup, refuted in lane-av1lrflush r3. + + // The oracle aomdec, rawvideo out: FRAMES concatenated yuv444p frames. + if aomdec_path().is_file() { + let dir = + std::env::temp_dir().join(format!("ec-av1-444sb-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + for (i, f) in frames.iter().enumerate().take(3) { + let base = i * W * H * 3; + for ((plane, off), p) in + [(&f.y, 0usize), (&f.u, W * H), (&f.v, 2 * W * H)] + .into_iter() + .zip(["y", "u", "v"]) + { + let want = &ref_raw[base + off..base + off + W * H]; + let bad = + plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!( + bad, 0, + "{NAME}: aomdec frame {i} plane {p}: {bad} samples differ \ + (class 444-128rect-chroma-span)" + ); + } + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + + // ffmpeg's decoder: same frames, full-resolution chroma. Same + // three-frame scope as the aomdec arm above. + if have_ffmpeg() { + let refs = ffmpeg_decode_sequence_444(&stream, W, H, FRAMES); + for (i, (got, want)) in frames.iter().zip(refs.iter()).enumerate().take(3) { + for (p, (g, r)) in + [(&got.y, &want.y), (&got.u, &want.u), (&got.v, &want.v)] + .iter() + .enumerate() + { + let bad = g.iter().zip(r.iter()).filter(|(a, b)| a != b).count(); + assert_eq!( + bad, 0, + "{NAME}: ffmpeg frame {i} plane {p}: {bad} samples differ" + ); + } + } + } else { + eprintln!("SKIP {NAME} ffmpeg arm: no ffmpeg"); + } + } + /// lane-lossless128: a LOSSLESS key frame that codes a 128-axis /// (`BLOCK_64X128`) intra block -- the shape libaom's `read_tx_size` forces /// to `TX_4X4` on its very first line (`decodeframe.c:1183`), so every plane diff --git a/lanes/av1422filter.report.md b/lanes/av1422filter.report.md new file mode 100644 index 00000000..5886e4f0 --- /dev/null +++ b/lanes/av1422filter.report.md @@ -0,0 +1,109 @@ +# lane-av1-422filter — the 4:2:2 loop-filter chroma class: NAMED and FIXED + +## Outcome + +1. REMEASURED first (pinned fixture `/tmp/t422.obu` sha256 + `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`, + single-frame cut `/tmp/t422f0.obu` sha256 + `3dd3f768ef553c02316848c2d3184c3765030c0a6fcb95887e4719add9ded3af`, + 256x144 / chroma 128x144, local `EC_AV1_ALLOW_422_PROBE` bypass applied + and reverted byte-identical after): with `EC_AV1_PREFILT_DUMP` / + `EC_AV1_POSTDEBLOCK_DUMP` / `EC_AV1_POSTCDEF_DUMP` / `EC_AV1_FINAL_DUMP` + on both sides, the frame-0 pre-filter AND post-deblock planes are + byte-exact (deblock did identical work both sides: 797/637/727 samples + changed, same set) — the 1236/1263 final chroma diffs are introduced + AFTER deblock. Attribution ladder, ours vs the instrumented aomdec: + + | stage | Y | U | V | + |----------------------|------------|-----------------|-----------------| + | pre-filter | 0 | 0 | 0 | + | post-deblock | 0 | 0 | 0 | + | post-CDEF | 0 | **251** (50,0) | **259** (48,0) | + | final | 0 | **1236→253** | **1263→266** | + + (the pre-fix row shows the parent's numbers; the ticket's first final + sample V (48,0) is literally the first post-CDEF defect sample.) +2. The oracle had NO 8-bit post-CDEF rung (its `EC_AV1_POSTCDEF_DUMP` was + 16-bit only; the earlier `aom/pcd.f0` measurement was actually its + post-deblock output — the rung had to be re-derived to isolate CDEF from + LR). Added an 8-bit `EC_AV1_POSTCDEF_DUMP` twin to the oracle's + `decodeframe.c` (right after the `do_cdef` block, full aligned buffer, + same shape as the POSTDEBLOCK rung) and rebuilt + `$HOME/.cache/aom-oracle/build` aomdec with ninja. The CDEF verdict was + then direct: 251/259 samples, first exactly U (50,0) / V (48,0). +3. DEFECT 1 (the big one) — **the 4:2:2 LR boundary-band snapshot is taken + on a 4:2:0 stripe grid**. `plane_snapshot` copies only the 4-row bands + LR's stripe substitution reads (`stripe_h - offset` per 64 rows); the + chroma calls hardcoded `ss_y = 1`, so for 4:2:2 (chroma stripes on the + luma 64-row grid, offset 8) the bands landed at rows 26/60/92/124 while + LR read rows 54..57/118..121 — every boundary substitution read + uninitialised scratch (zeros): 999 U / 963 V samples filtered where aom + filters nothing, |delta| up to 24 at the top rows. Fixed at all three + sites of the class: the keyframe and inter non-pipelined + `plane_snapshot(&u/&v, ss_y(fctx))`, the pipeline's `snap_band` band rows + `(j*64) >> ss_y`, and `pipe_run_lr`'s chroma `dims` (plane extents + `round_ss`, ss carried, not `div_ceil(2)`+1). 4:2:0 is bit-identical + (ss_y=1 reproduces the old bands/rows/dims exactly). +4. DEFECT 2 — **the CDEF chroma direction remap was missing**. libaom + `av1_cdef_filter_fb` (cdef_block.c) remaps the luma direction through + `conv422 = [7,0,2,4,5,6,6,6]` (in place; V then inherits U's remapped + grid) whenever `xdec != ydec` — the direction grid lives on the + subsampled chroma grid. The port filtered chroma with the raw luma + direction: after the LR fix the residual was exactly the CDEF stage, + 251/259 samples all ±1/±2 (168 we-filtered-aom-doesn't, 71 + aom-filters-we-don't, 12 value diffs on shared samples; scalar and AVX2 + kernels byte-identical, so shared logic, not the SIMD path). Fixed with + `CDEF_DIR_CONV422`/`CDEF_DIR_CONV440` applied for `(ss_x, ss_y)` = + (1,0)/(0,1); 4:2:0 and 4:4:4 take `_ => dir` unchanged. +5. MEASURED after both fixes: **frame 0 of the pinned 4:2:2 fixture is + byte-exact vs the oracle at PREFILT, POSTDEBLOCK, POSTCDEF and FINAL on + Y, U and V** (0 diffs everywhere). Non-vacuity on this frame: + `chroma422_square` = 24, `chroma422_rect` = 96, `chroma422_sub8` = 26 — + the touched 422 arms provably ran. Instrument for the LR half: a python + re-computation of the stripe walk + `lr_src_row` substitution + the + port's own wiener rounding reproduced the oracle's post-LR chroma plane + EXACTLY from the oracle's post-CDEF input (0 mismatches), which pinned + the residual defect to the snapshot input, not the filter math. +6. REMAINING: none for this class. The `read_coeffs_rect` frame-9 scratch + panic (inter frames of the 22-frame stream) is untouched, as chartered. + +## Decision + +- The header refusal STAYS unconditional in `stream.rs` — the probe bypass + was local-only, applied and reverted byte-identical before the commit + (`git diff` after the revert carries only the decode.rs fix); the + refusal-by-name gate re-verified firing. +- `read_coeffs_rect` untouched. The 4:2:0 group-tail SKIP arm untouched. + `sub8_leaf_chroma422` (parent lane's three fixes) untouched. +- The 8-bit `EC_AV1_POSTCDEF_DUMP` rung was added to the ORACLE's source + tree (`$HOME/.cache/aom-oracle/src/av1/decoder/decodeframe.c`, rebuilt + with ninja), not to this repo's `scripts/instrument-aom-oracle.sh` — the + script's generator should grow the same patch if the oracle is ever + rebuilt from scratch. + +## Verification + +- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422filter`): + 0 warnings, 0 errors. +- Frame-0 stage dumps, ours vs the instrumented aomdec (cropped + comparisons; our stage dumps are 256x160/128x160 padded, the oracle's + cropped 256x144/128x144 — the comparator crops): all four stages, all + three planes, 0 diffs. +- 420 gates green (all with the fix in place): + `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact` under `EC_AV1_REQUIRE_AOMENC=1` + (1 passed), `stream::tests::a_real_aomenc_stream_with_restoration_reads_ + lr_symbols_correctly` (1 passed — the LR-snapshot regression gate), + `a_superres_key_frame_with_cdef_and_loop_restoration_decodes_pixel_exact` + (1 passed), `a_non_420_subsampled_sequence_header_is_refused_by_name` + (1 passed). +- Scalar-vs-AVX2 CDEF chroma A/B on this frame: 0 diffs between kernels + (the 4x8 chroma shape was already SIMD-faithful; the defect was the + direction input). + +## State + +- Commit on lane-av1-422filter (no push): the LR snapshot ss_y fix (three + sites) + the CDEF conv422 direction remap + this report. +- The instrumented oracle build at `$HOME/.cache/aom-oracle/build` now + carries the 8-bit `EC_AV1_POSTCDEF_DUMP` rung for future lanes. diff --git a/lanes/av1444sb.report.md b/lanes/av1444sb.report.md new file mode 100644 index 00000000..05cedb88 --- /dev/null +++ b/lanes/av1444sb.report.md @@ -0,0 +1,115 @@ +# lane-av1-444sb — the 128-rect 4:4:4 chroma-span desync: NAMED and FIXED (r2) + +## Outcome + +1. REMEASURED first (pinned fixture + `crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu`, sha256 + `27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80`, + generated per the report recipe: `ffmpeg -i bands444.y4m -frames:v 3 -vf + scale=192:160 -pix_fmt yuv444p -f yuv4mpegpipe` piped to + `aomenc --codec=av1 --profile=1 --passes=1 --end-usage=q --cq-level=32 + --cpu-used=0 --threads=1 --row-mt=0 --sb-size=128 --lag-in-frames=0 + --auto-alt-ref=0 --kf-max-dist=1000 --i444 --enable-restoration=1 --obu + --limit=3`): at 76f8c3fe frame 0 diverges at EC_AV1_PREFILT_DUMP with + Y 9700 @ (128,64), U 12272 @ (160,0), V 13175 @ (128,0) — the ticket's + class (first diffs on the 64/128 grid, chroma columns 160/128 matching + the finding). The synthetic-content variants tried first (testsrc2, + testsrc, smptebars, mandelbrot, gradients × cpu-used × cq) all decode + frame 0 exact — the damage needs an edge-forced 128-root rect, which + real content provides. +2. DEFECT 1 (this lane's, FIXED) — **`decode_block_128rect`'s chroma unit + walk is hardcoded to the 4:2:0 mu-chunk span**. One 32x32 chroma unit per + 64x64 mu chunk per plane (`cn = 32 / chroma_tx` = 1), chunk offsets + `ch_col * 32` / `ch_row * 32`, and a per-chunk clip step of `ch_col * 8`: + all three are the 4:2:0 numbers. At 4:4:4 a 64x64 luma chunk covers 64 + chroma pixels and needs TWO 32x32 units per axis. The units never pushed + (measured by env-gated per-unit exec tracing): (160,0),(160,32) of the + 64x128 PART_VERT block at (128,0), all four units of its second chunk, + (64,128),(96,128) of the bottom-row 128x64 — exactly the PREFILT damage + cells. Because the missing units' coefficients are still in the + bitstream, the entropy decoder desyncs from the first 128-rect intra + block on: SB(0,0) decodes byte-exact and every later superblock of + frames 0/1 carries damage. +3. FIX (one site, decode.rs `decode_block_128rect`): per-chunk unit count + `(64 >> ss) / chroma_tx`, chunk chroma offsets `64 >> ss`, clip step + `16 >> ss` — every expression reduces to the old constant at ss=1, so + 4:2:0 is bit-identical by construction; the stale `debug_assert!` (which + stated the 4:2:0 invariant and would fire on 444 in debug builds) now + states the ss-aware one. +4. DEFECT 2 (fixed by CHERRY-PICK, not this lane's code) — after DEFECT 1's + fix the review still failed frames 1-2: frame 1 U/V full rows 54 and 118 + +-1 — the LR boundary-band signature. `lane-av1-422filter`'s e3798a34 + (LR boundary-band snapshot ss_y + CDEF conv422 remap) was NOT in this + branch's ancestry; cherry-picked as 168442bd. Frame 1 went byte-exact. + An r1 experiment had concluded the cherry-pick "changed nothing on 444" — + that conclusion was an artifact of a broken comparison (see 6) and is + retracted. +5. DEFECT 3 (NAMED, NOT FIXED — stop-with-site) — frame 2 still diverges at + FINAL: Y 7308 / U 9685 / V 14012 vs aomdec, deterministic. Stage ladder: + PREFILT, POSTDEBLOCK and POSTCDEF are byte-exact vs the oracle; the + damage is introduced by the LOOP RESTORATION stage, and its shape is + **LR stripe 0 (RU row 0, rows 0..63, full width, all three planes) is + never restored** — our final equals the post-CDEF plane above row 63 + (our LR-changed rows start at 63; the oracle's start at 0), while stripes + 1-2 are restored (imperfectly vs the oracle only through the reference + shift this induces in rows above? no: rows 64..159 also still differ — + the stripe-0 skip is the dominant, first-introduced defect; stripe + delta details in the r2 measurement notes). Site: the pipelined LR band + accounting — `pipe_run_lr`'s `rrows: Some` branch (restoration.rs) + refills only the RU rows its caller passes, and the band release + (`ls.note(k - 2)` / `ls.close(nb, false)`, decode.rs filter pipeline + ~25000-25032) never flushes RU row 0 on this frame — the frame whose top + superblock row carries a 128-root rect block (f2's inter 64x128 at + (128,0); f0's 128-rects sit on the keyframe path and f1 codes no + 128-root rect, which is why only f2 shows it). Fixing the flush is its + own scoped change; asserting f2's current samples in a gate would pin + the bug. +6. MEASUREMENT-METHOD CORRECTION (r1's false "all frames exact"): the r1 + final comparisons sliced the raw YUV with a plane-stride instead of a + frame-stride, so every "fN vs aomdec" row actually compared row 0 of + plane N — frame 2 was never truly compared and the 0-diff results were + an illusion. All r2 numbers above come from per-frame strided slices + (92160 bytes/frame), cross-checked against BOTH aomdec and ffmpeg, with + the binary's provenance pinned by a fresh-target-dir sha256 match + (incremental `Finished` in <2s does NOT imply a rebuild; `cargo clean + -p` without error checking can silently no-op — twice caught this wave). + +## Verification + +- `cargo check -p ec-av1`: 0 warnings, 0 errors + (target `$HOME/.cache/cargo-target-av1444sb`). +- New pinned gate (this commit): + `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` — + pins the fixture by length + FNV1a64, proves non-vacuity via the + `decode::intra_sb128_hits` delta, and asserts frames 0/1 byte-exact + against BOTH the oracle aomdec and ffmpeg (frame 2 = DEFECT 3, named in + the test body; pinning its current samples would freeze the bug). +- Gates green with fix + cherry-pick (EC_AV1_REQUIRE_AOMENC=1): + `a_real_aomenc_stream_with_restoration_reads_lr_symbols_correctly`, + `a_superres_key_frame_with_cdef_and_loop_restoration_decodes_pixel_exact`, + `a_non_420_subsampled_sequence_header_is_refused_by_name`, + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_ + decodes_pixel_exact` — 4 passed. + +## Decision + +- DEFECT 1: one site, fixed. `decode_block_128rect` serves the kf PART128 + HORZ/VERT and AB arms plus the intra-in-inter 128 path (`in_inter` flag) + — one walk, all callers covered. +- DEFECT 2: fixed upstream-of-merge by cherry-pick (168442bd), kept. +- DEFECT 3: STOP-WITH-SITE per charter — the LR stripe-0 flush on inter + frames whose top SB row carries a 128-root rect. Named function/lines + above; the stage-dump evidence (PC exact, FINAL wrong, delta rows 63+) + is in the r2 notes. +- NOT touched: `sub8_leaf_chroma444`'s rect arm (sibling lane, distinct + open defect), `decode_leaf8` OOB (leaf8oob's), the 4:2:0 group-tail + chroma SKIP arm (reserved), `read_coeffs_rect`. +- Temp EC_TRACE_444SB / EREAD_RECT / TEMP-444SB instrumentation removed + before commit; the commits carry only the fix, the assert, the gate and + the reports. + +## State + +- Commits on lane-av1-444sb (no push): 349b3918 (DEFECT 1 fix + fixture + + r1 report), 168442bd (cherry-pick of e3798a34), this commit (DEFECT 3 + named, gate added/scoped, r2 report). diff --git a/lanes/av1444sbf2.report.md b/lanes/av1444sbf2.report.md new file mode 100644 index 00000000..0aa13754 --- /dev/null +++ b/lanes/av1444sbf2.report.md @@ -0,0 +1,74 @@ +# lane-av1-444sbf2 — the 444sb witness f2 after d5325172: NOT exact; residual re-measured sample-identical to DEFECT A; gate NOT extended (r1) + +## Outcome + +1. Gate-extension precondition FAILED — frame 2 is not byte-exact, so + `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` stays at + `take(2)`. Measured at HEAD 85ce04de (48411287 + the d5325172 cherry-pick) + with the pinned fixture (`crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu`, + sha256 re-verified `27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80`), + a FRESH target dir (`cargo-target-av1444sbf2` did not exist before this lane; + probe binary sha256 + `9f50af10a11fb77a3461e35427e75e616e29c3ff0403978db4a503e4ccecde3f`), and + per-frame strided slices (92160 bytes/frame, W*H*3, planes Y/U/V at + 0/30720/61440). Frame 2 vs BOTH oracles: **Y 7308 / U 9685 / V 13854**, and + the two oracles agree with each other sample-for-sample on all three frames + (ours is the diverging side; no measurement-method ambiguity this time). + Frames 0/1: byte-exact vs both. +2. Stage ladder (instrumented oracle + ours, decode-order `.fN` dumps, 92160-byte + crop-shaped files on both sides, default serial filter path): f0/f1 EXACT at + PREFILT, POSTDEBLOCK, POSTCDEF and FINAL. f2 diverges already at **PREFILT** — + Y 6952 / U 9568 / V 13496, first diffs Y (col 128, row 98), U (col 128, + row 64), V (col 128, row 0) — i.e. in reconstruction, BEFORE any loop filter. + The filters only carry the damage downstream: POSTDEBLOCK 6956/9568/13614, + POSTCDEF 7307/9685/13722, FINAL 7308/9685/13854. +3. The residual is UNCHANGED by d5325172. av1lrflush r3 measured the identical + ladder at base 48411287 (without the cherry-pick): PREFILT 6952/9568/13496 + with the same three first-diff samples, POSTCDEF 7307/9685/13722 — every rung + I can cross-check matches my with-fix numbers exactly. The inter 1:4 strip + chroma pair-rewrite fix (its t6 class) is inert on this fixture: f2's damage + is a different (or wider) instance of the same inter rect-strip class, not + the one d5325172 fixed. (The old r2 "FINAL V 14012" was r3's identified + one-rung-off comparison artifact, not a fix effect.) +4. Site (STOP-WITH-SITE, unchanged from av1lrflush r3's DEFECT A): the inter + rect-strip entropy/recon path on f2's inter 64x128 block at (128,0) — all + three planes' first diffs enter at column 128 inside that block and + everything downstream carries it. There is no entropy desync: both decoders + consume the full stream and complete the frame with bounded diffs, so the + symbol reads are identical and the divergence is in the strip's + reconstruction / band-stamping reads — Agent044's `decode_rect4_16_strip` + territory (their t6-adjacent class). r2's LR-stripe-0 attribution stays + refuted (av1lrflush r3); the gate's scoping comment naming it is now stale + but is deliberately left untouched here: per av1lrflush r3 §6 the comment + fix and the `take(3)` extension land together in the SAME deferred edit + once the entropy fix actually clears f2 — a comment-only commit on another + lane's gate would split that pairing. +5. No decoder edit on this lane: 4:2:0 identity untouched by construction; no + cargo check owed. + +## Verification + +- `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` + (unmodified): PASS at this HEAD — f0/f1 pins intact, non-vacuity + `intra_sb128_hits` delta fires (target `cargo-target-av1444sbf2`). +- Ladder + slice numbers above produced from that same fresh target dir; the + throwaway decode example and all `/tmp` dumps were deleted before commit. +- Both oracle references regenerated this session (aomdec + `~/.cache/aom-oracle/build` binary, 2026-09-25 17:46; ffmpeg 8.1.2) and + cross-agreed before any diff was trusted. + +## Decision + +- Gate NOT extended (assignment branch 2: "do not extend … do not pin wrong + samples"). Asserting f2's current samples would freeze DEFECT A into the + gate. +- Next owner: the entropy lane (inter rect-strip band stamping, + `decode_rect4_16_strip`). Re-run THIS measurement (stage ladder + per-frame + strided slices + fresh target dir, both oracles) after that fix lands; extend + `take(2)`→`take(3)` and fix the stale scoping comment in the same edit only + when f2 goes byte-exact. + +## State + +- Commit on lane-av1-444sbf2 (no push): this report only; production tree + untouched since 85ce04de. diff --git a/lanes/av1ll64.report.md b/lanes/av1ll64.report.md new file mode 100644 index 00000000..fdc920ca --- /dev/null +++ b/lanes/av1ll64.report.md @@ -0,0 +1,108 @@ +# lane-av1-ll64: the rect64-route 64x32 chroma row — named, not invented (r1) + +## Ticket + +Default-partition lossless 4:4:4 stops at a missing 64x32 chroma lossless +coefficient row on the rect64 route (the `EC_RECTCHROMA_GAP luma=64x32 +tx=4x4 chroma=64x32` diagnostic `lane-av1-llinter2` deferred here). Name +the row; add it only if libaom has that transform; do not invent one. +`decode_rect4_16_strip` is off-limits (owned by the lossless-444 strip +lane). + +## The named row + +The `chroma` match in `decode_rect_split` (decode.rs:10086) has no +`(64, 32)`/`(32, 64)` arm: a 4:4:4 64-axis strip's chroma plane block +cannot be coded as ONE rect unit here. That missing arm is the row the +gap print names. + +## libaom verdict (oracle source, measured): no such transform — row NOT added + +- Lossless: `av1_get_tx_size` returns TX_4X4 for EVERY plane + (`av1/common/blockd.h:1383`), so a 64x32 chroma plane block codes as a + plane-major raster of TX_4X4 units (16x8 = 128 per plane at 4:4:4). + There is no 64x32 lossless transform at all. +- Non-lossless: `av1_get_max_uv_txsize` routes chroma through + `av1_get_adjusted_tx_size` (`blockd.h:1361-1367`), which collapses + TX_64X32 and TX_32X64 to TX_32X32. A chroma transform wider/taller + than 32 is never one coded unit. + +Per ticket step 3: libaom marks the single-unit 64x32 chroma transform +not-codeable ⇒ STOP; no row invented. + +## The route truth: nothing stops at HEAD — the print was a false gap + +`decode_rect_split`'s arms already cover every shape that reaches it: + +- LOSSLESS: the 4x4 walk (decode.rs `else if lossless(fctx)`) is + shape-agnostic — for a (64,32) chroma block it walks 128 plane-major + `TxbSet::Chroma4` units with `4 << ss` spans, which IS the libaom + behavior above. The same code the key-frame gate proves on 16x8 + strips. +- Non-lossless: `chroma_tiled` tiles those four shapes as 32x32 / + 32x16 units (the 10-bit film gates' verified path). + +The old diagnostic fired whenever `chroma` was None and `!m.skip` — +INCLUDING on those two working routes, printing a "GAP" for shapes the +function decodes correctly. That false print is what `lane-av1-llinter2`'s +report cited as a "named non-panic stop" of default-partition `ll444.obu`. + +## Change (one diagnostic, no decode-path edit) + +decode.rs only: the `EC_RECTCHROMA_GAP` print's condition is now the +refusal's exact precondition (`chroma.is_none() && !chroma_tiled` inside +the existing `!m.skip`, so print↔refusal can never diverge), and its +message states the libaom verdict (`libaom_lossless_tx=none`). The +inventory-pinned refusal wording is byte-identical; every coefficient +read, CDF, span and neighbour stamp untouched. `chroma_tiled`'s `let` +moved above its new first use; its explanatory comments stay with it. +4:2:0: zero-change (a 64x32 luma strip is 32x16 chroma there — a row +that always existed; the print never fired at 4:2:0). + +## Verification (measured, this tree @ HEAD + this change) + +- Encoder sweep (aomenc `--lossless=1 --profile=1`, palette/intrabc off, + contents from testsrc2 to forced HORZ-biased noise, `--cpu-used` 0..8, + partition caps, bottom-edge smooth bands): NO lossless fixture presents + a 64x32 intra strip — at lossless RD the encoder picks NONE/SPLIT, so + the print never fired on any stream, old or new. +- Probes post-change (decode_probe): `ll444.obu` (default partition, 6 + frames) OK 6/6; `force_kf.obu`, `h2.obu` OK; committed + `lossless_sb128_rect_kf.obu` OK 4/4; pinned `ll444_minp64_inter.obu` + OK 6/6; `EC_RECTCHROMA` count 0 on every stream. +- Gates (7 passed, 0 failed): `a_lossless_444_min_partition64_inter_ + stream_decodes_pixel_exact` (6-frame inter gate: pixel-exact through + BOTH oracle aomdec --rawvideo and ffmpeg, counter non-vacuity), + `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact` (run for + real, not SKIP: pinned bytes `fixtures/ll444-lossless-key.obu` copied + from the av1llband2 worktree, sha256 `9fc9ce1f5f6475a1d483f404b44acb9 + 0f72a80be2e5c51dedf0aeb1da9a3f5dc`; fixtures/ is gitignored, nothing + committed from it), both 4:2:0 lossless gates + (`a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact`), both + `a_lossless_sb128_*` gates, `a_lossless_16x4_chroma_pair_*`. +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1ll64`): 0 warnings, 0 errors. + +## Same-class suspects, measured on scratch streams, deferred (spoken) + +Repro recipe (scratch, regenerable): `testsrc2 128x96 yuv444p`, aomenc +`--profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0`, +`--max-partition-size=64`, 6 frames. Both defects verified PRE-EXISTING +at 2ac149e3 via `git stash` probe, so neither is caused by this change; +both are the inter sub8 lossless class (a lossless inter route coding a +rect TX unit where `av1_get_tx_size` forces TX_4X4 per plane — the +`decode_inter_block8`/84acbd09 defect class one route over): + +- `decode_inter_sub8_rect2` → `read_inter_plane_rect` → + `push_mc_rect_tx` → `TxParams::run` lossless WHT assert + `(8, 4) != (4, 4)` at decode.rs:2566. deferred(fix-now in the lane + owning the inter sub8 lossless rect route; the fix shape is the + established per-plane TX_4X4 unit walk). +- The 12-frame sibling stream refuses mid-tile: `REFUSED: unsupported: + AV1 tile (a Golomb tail longer than this decoder reads)` — same + route class, downstream desync form. deferred(with the same lane; + likely disappears when the (8,4) read is fixed). + +`decode_rect4_16_strip`'s 4:2:0-hardcoded lossless chroma walk remains +with its owning lane (untouched here, per lane ownership). diff --git a/lanes/av1llband2.report.md b/lanes/av1llband2.report.md new file mode 100644 index 00000000..e0c2a8bc --- /dev/null +++ b/lanes/av1llband2.report.md @@ -0,0 +1,90 @@ +# lane-av1-llband2: 4:4:4 lossless above-band cell — sibling fix ported (r1) + +## Charter + +Resolve the `av1llsub8` stop (aligned step 19228: 16x8 leaf, U unit bc=2 +br=0, `txb_skip` base 1 vs oracle base 0 — an above-band cell). Port the +already-reviewed sibling fix if it is the same writer; never author a +second fix for the same defect. 4:2:0 lossless stays exact. Work in +`edith_codecs-av1llband2` @ 6cf92769. + +## Writer identification (done before any edit) + +Read `edith_codecs-av1llband` r1 (`lanes/av1llband.report.md`) and commit +`01a34bc8` before writing anything. That sibling took the exact same stop +(178-byte key-frame miss, first divergence at the 16x8 leaf mi (16,24)'s +U bc=2 unit) to **0 differing bytes**, and was reviewed. + +Same-writer proof: + +- This branch HEAD is the sibling's parent commit `6cf92769` byte-for-byte + (both continue `av1llsub8`). +- The defect site in THIS tree is the identical code the sibling named: + `decode_rect_split`'s lossless chroma arm hardcoding the 4:2:0 unit span + — `let luma_span = 8;` at `decode.rs:10458` here, feeding the `cu_mi` + step, `around_mi`, `tu_reach` and both `record_mi_chroma` stamps. +- The stop signature matches the sibling's reproduced defect exactly + (step 19228, 16x8 leaf, U bc=2 br=0, base 1 / row `[0][11]` vs oracle + base 0 / row `[0][10]`). + +⇒ `01a34bc8` IS that writer's fix. Ported it; no second fix invented. + +## Port (faithful, byte-identical) + +`git cherry-pick -n 01a34bc8`, dropping the sibling's lane report file +(`lanes/av1llband.report.md` — this lane writes its own). Post-images of +all three source files `cmp`-verified IDENTICAL against the sibling +worktree at `01a34bc8`: + +- `crates/ec-av1/src/decode.rs` (+45/−10): `span_x = 4 << ss_x(fctx)`, + `span_y = 4 << ss_y(fctx)` replaces the hardcoded 8 for the `cu_mi` + step, `around_mi_rect`, `tu_reach`, the immediate and replayed + `record_mi_chroma` stamps (`ll_chroma_units` carries per-unit spans); + non-vacuity counter `RECT_SPLIT_LOSSLESS_CHROMA444_HITS` + + `rect_split_lossless_chroma444_hits()`. +- `crates/ec-av1/src/stream.rs` (+77): gate + `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact` over the + pinned fixture, with the lossless-frame blindness guard and the + counter-moved non-vacuity assert. +- `crates/ec-av1/examples/decode_probe.rs` (+4): `llband:` counter line. + +Off-limits files untouched: `decode_rect4_16_strip`, +`read_inter_rect_chroma`, `restoration.rs`, intra write-back. No 422 +model, no luma path, no `sub8_leaf_chroma444` (innocent: the 16x8 leaf +never reaches it). 4:2:0 arithmetic is unchanged (`4 << 1 = 8`). + +Fixture provenance: `fixtures/ll444-lossless-key.obu` (untracked, as in +the sibling), copied from the sibling worktree, sha256 +`9fc9ce1f5f6475a1d483f404b44acb90f72a80be2e5c51dedf0aeb1da9a3f5dc` +(4927 B; cut of the `ll444` recipe's key-frame OBUs: `testsrc2 128x96` +yuv444p, `aomenc --profile=1 --lossless=1 --enable-palette=0 +--enable-intrabc=0`, oracle build `~/.cache/aom-oracle`). + +## Verification (measured, this tree) + +- New gate `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact`: + **green** — key frame decodes **0 differing bytes** (sample-exact, + all 3 planes vs ffmpeg `yuv444p` rawvideo, 36864 samples compared) and + the counter moved (non-vacuity). +- `decode_probe` on the pinned fixture: `llband: + rect_split_lossless_chroma444=160` (matches the sibling's 160 units), + no panic. +- 4:2:0 lossless stays green: + `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact` — both ok + (3 passed, 0 failed in the gate run). +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. + +## Deferred (spoken, not hidden) + +- **1:4 strips at lossless 4:4:4** (`decode_rect4_16_strip`): same span + defect class (per the sibling's r1), but the file is owned by a live + lane and off-limits to this branch — the fix is the same span + derivation measured here. deferred(fix-now in the owning lane). +- Lossless INTER frames panic at `reconstruct_mc_rect` (decode.rs:2589): + `read_inter_rect_chroma`'s branch, untouched, as chartered. + deferred(fix-now in the owning lane). +- Intrabc rect leaves at lossless 444 still route the rect arm's + `read_coeffs_rect` path: unreachable with `--enable-intrabc=0` + fixtures. deferred(fix-now after the inter side is green, with an + intrabc 4:4:4 fixture), matching `av1llsub8`/`av1llband`. diff --git a/lanes/av1llinter2.report.md b/lanes/av1llinter2.report.md new file mode 100644 index 00000000..6776f2b1 --- /dev/null +++ b/lanes/av1llinter2.report.md @@ -0,0 +1,101 @@ +# lane-av1-llinter2: 4:4:4 lossless inter side — sibling panic ported (r1) + +## Charter + +The lossless INTER panic named by `av1llband2` (`reconstruct_mc_rect`, +decode.rs:2589, `read_inter_rect_chroma`'s branch) is the same panic +sibling lane `av1llinter` fixed in 84acbd09 + 13a262a6. Port that fix; +never author a second fix for the same defect. 4:2:0 lossless stays +identical; the key-frame gate stays green. Work in +`edith_codecs-av1llinter2` @ 6da581a8. + +## Same-panic proof (measured, before any edit) + +Repro on the sibling's pinned bytes `dodge2.obu` (37658 B, sha256 +`5a070fa351a3f2109de855234f2b3d0a872970f3e7f658db21f65c12eeb135b4` — +byte-identical to the sibling's committed +`crates/ec-av1/fixtures/ll444_minp64_inter.obu`): + +- RELEASE build: `panicked at crates/ec-av1/src/decode.rs:28454:32: + range end index 24 out of range for slice of length 16` in `exec_mc` — + line 28454 is `reconstruct_mc_rect`'s coded-arm `dst..dst + w` index + (fn at 28413), inlined into `exec_mc`. The sibling's parent-tree panic + was the identical message and numbers at their decode.rs:28336, same + fn, same inline frame. +- DEBUG build: the underlying unit defect surfaces first — the lossless + WHT assert `(8, 8) != (4, 4)` at `TxParams::run` (decode.rs:2566), via + `decode_inter_block8 -> read_inter_plane -> push_mc_rect_tx` — the + sibling report's exact chain. The band2 report's "decode.rs:2589" + citation is this same worker (`strided[row * self.stride..][..self.w]`, + the release-form panic of the same 8-wide lossless unit); the + "reconstruct_mc_rect" name is the release-build site proven above. + +⇒ same defect, same root cause the sibling named: the 8x8 inter leaf's +chroma plane block read as ONE TX_8X8 unit where lossless codes TX_4X4 +on every plane (`av1_get_tx_size`). 84acbd09 IS the writer's fix. +Ported it; no second fix invented. + +## Port (faithful cherry-pick of 84acbd09, three deliberate deltas) + +`git cherry-pick -n 84acbd09`: + +1. `decode_rect_split` conflicts (fix 4) resolved to THIS tree's version: + lane-av1-llband2 already ported that exact fix (01a34bc8) with the + `RECT_SPLIT_LOSSLESS_CHROMA444_HITS` non-vacuity counter; semantics + identical (`4 << ss` spans, span-carrying `ll_chroma_units`). +2. **fix 5 EXCLUDED**: its three hunks are inside + `decode_rect4_16_strip` (the `cu_mi` divisor and both + `record_mi_chroma` spans), a function owned by a live lane — reverted + to HEAD byte-for-byte. The strip fn still carries the 4:2:0-hardcoded + walk at 4:4:4 lossless: deferred(fix-now in the owning lane, same + span derivation as fixes 2-4). +3. The sibling's lane report file dropped; this lane writes its own. + +Applied verbatim: fix 1 (`decode_inter_block8`'s single-ref AND compound +chroma arms route `chroma_side == 8 && lossless && !mono` through the +new `leaf8_inter_chroma_lossless` helper wrapping the per-unit +`read_inter_chroma_lossless` walk, with the tail `record_mi`'s chroma +half saved/restored — `saved_chroma_ctx`, the `saved_luma_ctx` pattern; +both `record_mi` tails patched), fix 2 (`read_inter_chroma_lossless`: +`cu_mi` divisor `4 >> ss`, record spans `4 << ss`), fix 3 +(`decode_inter_block`'s `mu_chroma_units` lossless replay: extents +`>> ss`, mi-steps and spans `cu << ss`). All byte-identical at 4:2:0 +(`4 << 1 = 8`). Off-limits files untouched: `decode_rect4_16_strip`, +`restoration.rs`, intra write-back. Net diff vs HEAD: 9 hunks, earliest +at decode.rs:28734 — nothing before `read_inter_chroma_lossless`. + +Gate port: `git cherry-pick -n 13a262a6` (fixture +`fixtures/ll444_minp64_inter.obu` 37658 B, the `ffmpeg_decode_sequence_444` +helper, gate `a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact` +with the `chroma_split_tx_hits` non-vacuity assert and FNV/len pins). +stream.rs conflict = both lanes appended tests at the same spot; resolved +by keeping BOTH (band2's key-frame gate first, then the helper + inter +gate). + +## Verification (measured, this tree @ HEAD+2) + +- `a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact`: + **PASS** — all 6 dodge2 frames pixel-exact through BOTH the oracle + `aomdec --rawvideo` (oracle at `~/.cache/aom-oracle/build`, arm + executed, not skipped) and ffmpeg `yuv444p`; counter moved (non-vacuity). +- Key-frame gate stays green: `a_real_aomenc_lossless_444_key_frame_ + decodes_sample_exact` PASS. +- 4:2:0 unchanged: `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact` — both PASS + (4 passed, 0 failed in the battery run). +- `decode_probe dodge2.obu`: `OK: 6 frames decoded`, no panic, debug AND + release. +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. + +## Same-class suspects, deferred (spoken, not hidden) + +- `decode_rect4_16_strip`'s lossless chroma walk still hardcodes the + 4:2:0 span (`oy / 2`, `record_mi_chroma(.., 8, 8, ..)` at decode.rs + ~14631/14653/14675): excluded per lane ownership. + deferred(fix-now in the owning lane; shape = fixes 2-4's `4 << ss`). +- Default-partition `ll444.obu` no longer panics but stops at a NAMED + non-panic gap: `EC_RECTCHROMA_GAP luma=64x32 tx=4x4 chroma=64x32` + (decode.rs:10126 — the `(64, 32)` chroma plane block has no TxbSet row + at the rect64 lossless route). The sibling's gate deliberately does not + claim this stream either. deferred(fix-now in a lane chartering the + rect64 chroma lossless route; distinct defect, not this panic). diff --git a/lanes/av1llintra.report.md b/lanes/av1llintra.report.md new file mode 100644 index 00000000..c2b73837 --- /dev/null +++ b/lanes/av1llintra.report.md @@ -0,0 +1,93 @@ +# lane-av1-llintra: 4:4:4 lossless intra side (class 444-lossless-intra-side) + +## Charter + +Fix the 4:4:4 lossless intra-side panic (decode.rs:3766, `index 16 len 16`, via +`decode_leaf8 -> read_plane -> exec_intra`) and the same-class 64x64 lossless +intra luma mis-decode, or stop at the first site that cannot be finished. + +## Repro (fail-before) + +`aomenc profile 1 --lossless=1`, testsrc2 128x96 yuv444p, 6 frames, palette and +intrabc off, cdef/restoration off (`ll444.obu` = default partitions, +`dodge2.obu` = `--sb-size=64 --max/min-partition-size=64`): + +- `ll444.obu`: PANIC decode.rs:3766 (`reconstruct`, index 16 len 16) on the KEY + frame, `decode_leaf8 -> read_plane -> exec_intra` (measured, RUST_BACKTRACE). +- `dodge2.obu`: key frame decoded but luma pixel-diffed the oracle from byte 65 + (31729 of 36864). + +## Root causes and fixes (all in decode.rs) + +1. **Leaf8 chroma is one TX_8X8 unit at 4:4:4 lossless** (the panic). Oracle + `av1_get_tx_size`: `if (xd->lossless[..]) return TX_4X4;` for EVERY plane, so + the leaf's 8x8 chroma plane block is a plane-major 2x2 raster of TX_4X4 + units. Our `TxbSet::Chroma8` single unit hit `TxParams::run`'s lossless WHT, + which is 4x4-only (`debug_assert_eq!((w, h), (4, 4))`), silently producing a + 16-coeff residual for a side-8 reconstruct. Fixed: in `decode_leaf8`'s TX4 + arm, `chroma_444 && lossless` routes through `read_intra_chroma_lossless` + (per-unit reads + per-unit `record_mi_chroma`); the tail's whole-leaf chroma + band stamp is skipped for that shape (raster-order last writer per band cell + is exactly libaom's per-entry last update). In the skip arm, the 4:4:4 + lossless leaf predicts four TX_4X4 chroma units (per-unit edges), like the + luma `SKIP_SPLIT_TX` loop; intrabc/palette keep the whole-plane-block + prediction. +2. **`read_intra_chroma_lossless` carried 4:2:0 math**: `cu_mi = at_mi + oy/2`, + `tu_reach(.., ox * 2, oy * 2, 8, ..)`, `record_mi_chroma(.., 8, 8, ..)`. + Made subsampling-aware (`MI >> ss` divisors, `<< ss` scaling, `4 << ss` + spans) -- byte-identical at 4:2:0, correct at 4:4:4 (one mi cell per unit). +3. **Whole-block chroma unit clip was a 4:2:0-sized raster** (`plane_px = + span_mi * 2`, overhang `2 * over_mi`): at 4:4:4 it clipped three quarters of + each 64x64 block's coded units and desynced the tile -- this was the dodge2 + key frame's luma diff from byte 65 (the desynced chroma garbage-fed the + following superblocks' luma). Fixed to `span_mi * MI >> ss` and `over_mi * + (MI >> ss)`, libaom `max_block_wide/high`. +4. **Lossless CFL alphabet gate**: oracle `is_cfl_allowed` at lossless requires + `plane_bsize == BLOCK_4X4` (TRUE for an 8x8 partition at 4:2:0, FALSE at + 4:4:4). Our `cfl_allowed_px` lossless arm accepted any <=8x8, so a 4:4:4 + lossless leaf read the 14-symbol `uv_mode_cfl` CDF where the stream carries + the 13-symbol one (class `wrong-alphabet-same-value`). Fixed to + `(bw >> ss_x).max(4) == 4 && (bh >> ss_y).max(4) == 4`; 4:2:0 identities + unchanged. + +## Verification (measured) + +- `ll444.obu` no longer panics on the key frame; the key frame decodes. +- `dodge2.obu` KEY FRAME: byte-exact vs `aomdec --rawvideo` (first diff at byte + 37493, i.e. inside inter frame 1). +- 4:2:0 regression gate `a_lossless_libaom_inter_frame_decodes_sample_exact`: + green. +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. + +## STOP -- named, with the measured site + +`ll444.obu`'s key frame is NOT yet pixel-exact: 36254 of 36864 bytes differ +from byte 19. Localized with the trace pair (ours `EC_AV1_TRACE`, oracle +`EC_TRACE_MODE_STEP` + `EC_DQCOEFF`): the structural read order matches the +oracle exactly (per-4x4-leaf plane-interleaved luma,U,V; luma unit 0 of the +first sub8 group is byte-exact), but the FIRST chroma unit (`plane 1 @(0,0)`, +`TxbSet::Chroma4`, TX_4X4) decodes near-miss coefficients from scan position 4 +(e.g. ours `2:-8` vs oracle `2:-4`, ours `6:4` vs oracle `9:4`) with every +classical context input equal (bands all zero at frame start, `txb_skip_ctx` +base 7 both sides, DCT_DCT forced, same scan). Site: `sub8_leaf_chroma444`'s +square branch (decode.rs read_plane calls around 18935) -- the divergence is a +symbol-level CDF-row input unique to lossless chroma at 4x4 that the current +ctx arguments do not capture. Next step: oracle-paired token trace +(`EC_TRACE_MODE_STEP`'s `EC_COEFF` rng stream vs an rng/tell dump inside +`read_coeffs`) to name the first divergent symbol, then diff its CDF row +selection. + +Per charter, stopped there. Frames 1+ of BOTH streams panic in +`reconstruct_mc_rect` (decode.rs:28328 post-insert, was 28233) via the +`decode_inter_block8` inter path -- a different function from anything this +lane changed; that is the charter's named stop for the inter side, and +`read_inter_chroma_lossless` remains untouched (another report owns its /2 +design). + +## Deferred (spoken, not hidden) + +- `decode_leaf8`'s intrabc chroma prediction buffers are hardcoded 4x4 + (18074-18085), so an intrabc 8x8 leaf at 4:4:4 predicts 16 samples for a + 64-sample reconstruct. Unreachable with `--enable-intrabc=0` fixtures; + deferred(fix-now after the inter side is green, with an intrabc 4:4:4 + fixture). diff --git a/lanes/av1llintra8.report.md b/lanes/av1llintra8.report.md new file mode 100644 index 00000000..a5dc3e47 --- /dev/null +++ b/lanes/av1llintra8.report.md @@ -0,0 +1,105 @@ +# lane-av1-llintra8: the inter frame's 8x8 INTRA leaf lossless 4:4:4 chroma walk + +## Ticket + +`decode_inter_block8`'s intra leaf read 4:4:4 lossless chroma as ONE TX_8X8 +unit (`u_grid`/`v_grid = read_plane(..)` at `chroma_side == 8`, +decode.rs:38958/:38985 pre-change) and hit `TxParams::run`'s lossless WHT +assert `(8, 8) != (4, 4)` at decode.rs:2566 — the one arm sibling +`84acbd09`/fb4e4b0e did not cover (it routed the INTER arms only, named in +llsub8b's report item 1). `decode_inter_sub8_rect2` and +`sub8_leaf_chroma444` untouched (owned elsewhere). + +## Change (decode.rs, one branch + one alphabet gate + counter) + +1. `chroma_side == 8 && lossless(fctx) && !mono(fctx)` routes the leaf's + chroma through `read_intra_chroma_lossless` — the intra twin the >=16x16 + intra-in-inter block already runs (plane-major 2x2 raster of TX_4X4 + units per plane, `av1_get_tx_size` blockd.h:1383) — with region and + block `(8, 8)` at stride 8, the leaf's own `reach`, and the leaf's + `palette_uv_bufs` windowed per unit by the helper. The walk stamps each + unit's own coefficient context, so `chroma_stamped_per_unit = true` and + the tail's whole-block `record_mi` gets its chroma half saved/restored + around — the same rule the INTER arms' `leaf8_inter_chroma_lossless` + obeys (the mechanism was already in place). `Grid::Zero(64)` when every + unit hung off the frame edge, matching the inter helper. 4:2:0: zero + change — the branch lives inside `chroma_side == 8`, and the reserved + 4:2:0 group-tail chroma arm was not touched. +2. SAME LEAF, one read earlier, second defect of the same class: the leaf + read `uv_mode` off `uv_mode_cfl[mode]` unconditionally, but libaom picks + the uv CDF row by `is_cfl_allowed` (decodemv.c:145, cfl.h:23) and at + LOSSLESS that is "the chroma plane block is BLOCK_4X4" (cfl.h:29) — + for this BLOCK_8X8 leaf only at 4:2:0. A 4:4:4 lossless leaf must read + the 13-symbol `uv_mode_no_cfl` alphabet; the tables differ (cdf.rs + `UV_MODE_CFL` vs `UV_MODE_NO_CFL`, row 0: 10407.. vs 22631..), so the + unconditional CFL row consumed a different partition at the leaf's own + uv_mode symbol and desynced every stream that reached the leaf. + Now gated on `cfl_allowed_px(SIDE, SIDE, fctx)` — the same gate five + other readers use; 4:2:0 lossless and every non-lossless partition + still take the CFL row (value-identical reads). +3. Non-vacuity counter `LLINTRA8_CHROMA_WALK_HITS` + + `llintra8_chroma_walk_hits()` + a `decode_probe` line, per the lane + convention: CHROMA_SPLIT_TX_HITS cannot attribute its bumps to this + leaf. + +## Verification (measured, this tree @ HEAD + this change) + +- Fail-before (assert): `testsrc2 128x96 yuv444p`, aomenc + `--profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0 + --max-partition-size=64`, 6 frames (`/tmp/llintra8/t6.obu`) → panic + `(8, 8) != (4, 4)` at decode.rs:2566, debug backtrace + `read_plane (decode.rs:38958) → push_intra_tx → TxParams::run`. The + release build's assert folds into an index panic at `exec_intra`; the + debug line numbers are the evidence. +- Fail-before (alphabet): with only the uv hunk reverted, the regenerated + `--min-partition-size=8` stream's EC_COEFF trace diverges from aomdec's + at all_zero #2400 — `plane=0 mi(4,0)`, the reads right after that leaf's + uv_mode symbol. With the fix: divergence gone (below). +- Entropy witness: `testsrc2 128x96 yuv444p` with + `--min-partition-size=8 --max-partition-size=64` (min 8 excludes the + sub-8 shapes so the leaf actually fires; key frame becomes exact too): + our EC_COEFF `all_zero` rng sequence matches fresh + `aomdec --rawvideo` **11292/11292 reads across all 6 frames** with the + walk firing 34 times; frame 0 is byte-exact and ALL luma planes are + byte-exact stream-wide. The pre-fix stream panicked at the leaf; this + stream decodes all 6 frames. +- Non-regression: sibling's own witness bytes + `/tmp/ll444/dodge2.obu` decode byte-exact vs fresh `aomdec`, 6 frames, + in this tree with this change. +- Gates: `cargo test -p ec-av1 --lib a_lossless` → 6 passed, 0 failed + (both 4:2:0 lossless libaom gates, the 444 min-partition-64 inter gate, + the sb128 pair, the 16x4 pair). +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors (target dir + `$HOME/.cache/cargo-target-av1llintra8`). Release decode_probe output + identical to debug on both streams. +- Fixtures are scratch in /tmp/llintra8 (regenerable recipes above); + fixtures/ is gitignored, nothing committed from it. + +## Named, not chased (spoken) + +1. Chroma PREDICTION pixel diffs, entropy-exact: on the min-8 stream, + 2772 bytes differ from aomdec — all chroma, luma exact, and the EC_COEFF + trace is bit-aligned everywhere (so symbols, uv modes and angle deltas + all match; only reconstructed pixels differ). Frame 1's diffs cover + three readers at once with clean upstream edges: the inter 8x16 strip's + chroma at mi(0,16) (2x4 units, MC-side), an INTRA 8x8 leaf at mi(2,24) + (uv V_PRED, via this lane's new walk), and the >=16x16 intra block's + chroma at mi(8,28) (the pre-existing `read_intra_chroma_lossless` + caller, untouched by this change). One shared per-unit chroma + prediction-input class across readers, present before this change + (the >=16 arm predates it) — larger than this arm. + deferred(the lane owning per-unit 4:4:4 chroma prediction: + `read_plane`/`PlaneBuf::reconstruct` intra chroma edges + the inter + strip chroma MC), with the min-8 stream as a ready-made fixture. +2. The default-partition (min 4) testsrc2 key frame still entropy-diverges + at frame-0 coefficient read #452 (pre-existing, key-frame intra lane; + llsub8b's item 3). The min-8 key frame is exact, so this lane's witness + does not depend on it. + +## Note on the shared oracle + +aomenc/aomdec are the shared `$HOME/.cache/aom-oracle/build`; the +EC_COEFF/EC_COEFF_STEP rungs of that patched tree are what the entropy +pairing above used. Today's aomenc produces different RD picks than this +morning's (llsub8b's note), so every comparison is against fresh aomdec +output of THE SAME bytes. diff --git a/lanes/av1llkf.report.md b/lanes/av1llkf.report.md new file mode 100644 index 00000000..5159a98f --- /dev/null +++ b/lanes/av1llkf.report.md @@ -0,0 +1,97 @@ +# lane-av1-llkf: the default-partition lossless 4:4:4 key frame's read #452 + +## Ticket + +Default-partition lossless 4:4:4 key frames entropy-diverge at frame-0 +coefficient read #452 (mandelbrot/testsrc2, `llsub8b` item 3 / `llintra8` +item 2). Min-partition-64 and min-8 keys stay exact, so the defect lives in +the shapes only a min-4 stream produces: 4x4 leaves and their 4x16/16x4 +neighbours. + +## Named symbol and reader (measured, t1 = testsrc2 128x96, 1 key frame, +`--profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0`, default +partition) + +- Reads 1..452 of the frame's `all_zero` (TXB_SKIP) rng sequence match the + oracle exactly; read #452 (0-indexed) diverges: + - aom: `EC_COEFF plane=2 row=0 col=0 mi=(8,5)` — the V plane's FIRST + TX_4X4 unit of the 4x16 intra block at mi=(8,5), read off + `txb_skip_cdf[0][12]` (`ctx=12` = base 2 + offset 10; above=`23`, + left=`21`, both nonzero). + - ours: `side=4 ctx=4` — our offset-10 row for base 1 (one band cell + reads zero), a different CDF row, so the rng diverges on the same + symbol. Reader: `read_plane`'s `all_zero` symbol read + (decode.rs:6819, `dec.symbol(&mut coding.txb_skip[skip_ctx])`), fed by + `decode_rect4_16_strip`'s lossless chroma walk. +- Whose band cell: block (8,4) (the 4x16 strip to the LEFT) recorded each + of its TX_4X4 units with `record_mi_chroma(cu_mi, 8, 8, plane, ...)` + anchored at `oy / 2, ox / 2` — the 4:2:0 subsampled form. At 4:4:4 a unit + is ONE mi cell, so the `(8, 8)` span smeared every unit's state over a + 2x2 mi block: the strip's later V units overwrote `above[5]` — a column + a 4-px-wide block never touches in aom — with their own (zero) state, + where aom keeps the 4x4 leaf (7,5)'s nonzero write + (`av1_set_entropy_contexts`, blockd.c:29, stamps exactly + `tx_size_wide_unit` x `tx_size_high_unit` cells = one above + one left + for TX_4X4). The skipped-unit twin arm has the same defect (aom's skip + path zeroes the plane block's own cells, `av1_reset_entropy_context`, + blockd.c:58 — the 8x8 smear also stamped past the block). + +## Change (decode.rs, two record sites, one branch) + +`decode_rect4_16_strip`'s `lossless_pair` chroma walk (skip and non-skip +arms): the per-unit record is now ss-aware — + +- anchor `cu_mi = (pair_mi.0 + (oy << ss_y) / MI, pair_mi.1 + (ox << ss_x) / MI)` +- span `record_mi_chroma(cu_mi, 4 << ss_x, 4 << ss_y, plane, ...)` + +4:2:0 is arithmetically identical (`(oy << 1) / 4 == oy / 2` for the +multiple-of-4 unit origins, `4 << 1 == 8`); non-lossless arms untouched; +the intrabc arms untouched. `RECT4_16_LOSSLESS_CHROMA_HITS` remains the +route's non-vacuity counter. + +## Verification (measured, this tree @ HEAD + this change) + +- Entropy: the `all_zero` rng ladders now match the oracle on ALL reads of + the whole frame — t1 (testsrc2) 2304/2304, m1 (mandelbrot) 2304/2304. + Fail-before on the same bytes: t1 diverges at read #452, m1 at read #208 + (base-tree control, `$HOME/.cache/cargo-target-av1llkf-base`). +- Pixel witness: t1 decodes byte-exact vs fresh `aomdec --rawvideo` + (36864 bytes). The 6-frame default-partition testsrc2 stream (`t6.obu`) + reads frame 0 fully in sync (reads 1..2304 of 12582 consumed before the + next, DIFFERENT divergence — see deferred (1)) and completes all 6 + frames with no refusal. +- Sibling non-regression: `/tmp/ll444/dodge2.obu` (llsub8b/llintra8's + witness bytes) decodes byte-exact vs fresh aomdec in this tree. +- Gates: `cargo test -p ec-av1 --lib a_lossless` → 7 passed, 0 failed + (both 4:2:0 lossless libaom gates, the 444 min-partition-64 inter gate, + the sb128 pair, the 16x4 pair). +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1llkf`): 0 warnings, 0 errors. +- Fixtures are scratch in /tmp/llkf (regenerable recipes above); + fixtures/ is gitignored, nothing committed from it. + +## Named, not chased (spoken) + +1. t6's NEXT divergence is a different site: frame 1 (INTER), luma + `all_zero` at our read #2317 — same ctx row (1) and same decoded value + as the oracle but different CDF contents (ours `cdf0=5892` vs aom + `27244`), i.e. an adaptation-history/row-selection desync on the inter + frame, not a band smear. deferred(the inter-frame lossless-444 lane), + with t6.obu's recipe as a ready-made fixture. +2. m1 (mandelbrot) pixels: entropy exact frame-wide, chroma-only pixel + diffs (U 4436 / V 9070 samples, luma 0) — the pre-existing per-unit + 4:4:4 chroma PREDICTION class `llintra8` named. One concrete suspect + site of that class observed while here: + `decode_rect4_16_strip`'s lossless walk calls + `tu_reach(pw, ph, ox * 2, oy * 2, 8, ...)` — the 4:2:0 luma-space + offsets — where `read_intra_chroma_lossless` uses `ox << ss_x, oy << + ss_y` with unit size `4 << ss_x`; at 4:4:4 the doubled origin moves the + unit's prediction edge window. Prediction-domain, entropy unaffected + (proven by the exact coefficient reads above); owned by the same + chroma-prediction lane. deferred(that lane). + +## Note on the shared oracle + +aomenc/aomdec are the shared `$HOME/.cache/aom-oracle/build`; the +EC_TRACE_COEFF / EC_ECDUMP rungs of the patched tree carried the pairing. +Every comparison is against fresh aomdec output of THE SAME bytes. diff --git a/lanes/av1llpred.report.md b/lanes/av1llpred.report.md new file mode 100644 index 00000000..644d468d --- /dev/null +++ b/lanes/av1llpred.report.md @@ -0,0 +1,80 @@ +# lane-av1-llpred: the min-partition-8 lossless 4:4:4 chroma OBMC blend is ss-blind + +## Ticket + +Remeasure the 2772 chroma pixel diffs the llintra8 lane named (entropy-exact, +luma-exact), name the FIRST differing sample, and fix it only if one index +explains it. `decode_leaf8`'s palette set untouched (another branch), the +reserved 4:2:0 group-tail chroma arm untouched. + +## Remeasure (this tree @ b3f815c8, BEFORE the change) + +Same pinned fixture `/tmp/llintra8/testsrc2_min8.obu` (testsrc2 128x96 +yuv444p, aomenc `--profile=1 --lossless=1 --enable-palette=0 +--enable-intrabc=0 --min-partition-size=8 --max-partition-size=64`, 6 +frames), fresh `aomdec --rawvideo` of the same bytes: **2772 chroma diffs +reproduced exactly** (frame 0 and all luma planes clean). But the parent's +three named sites did NOT hold: the first differing sample is + +> frame 1, plane 1 (U), x=88 y=4 (mi row 1, col 22), ours=149 ref=150 + +— an inter 8x8 leaf at mi(0,22) with mv=(0,11), not any of mi(0,16), +mi(2,24) or mi(8,28) as named. Error maps (residuals are equal by +entropy-exactness, so final diff = prediction diff) showed narrow +column/row fragments inside blend regions — OBMC shape, not whole-block MC +or intra-edge shape. + +## Root cause: one class, two sites, both "the 4:2:0 half hardcoded" + +1. `obmc_run` (decode.rs ~30085/30101/30113) sized the CHROMA neighbour + prediction and blend windows with literal `/ 2` (cbw/cbh/cox/cw and + cbh/coy/ch). libaom sizes them per plane with the PLANE's own + subsampling shift (`dec_build_prediction_by_above_pred`: + `(op_mi_size * MI_SIZE) >> pd->subsampling_x`, blend bounds likewise), + which is `>> 0` at 4:4:4 — the chroma blend covered half the columns at + half the offsets. Luma was never affected (luma exact everywhere). +2. `obmc_plan`'s `skip_chroma_above` hardcoded the luma shape list + `(8,8)|(16,8)|(8,16)`. libaom's `av1_skip_u4x4_pred_in_obmc` + (reconinter.c:829) switches on the PLANE block + (`get_plane_block_size`): only 4x4/8x4/4x8 skip the ABOVE pass's chroma + (`return dir == 0`). At 4:4:4 the plane block is the luma block itself, + so every 8x8/16x8/8x16 OBMC block was silently missing its above-pass + chroma blend — the (96..101, y8..10) family on leaf mi(2,24). + +Both fixed to derive ss (from `chroma_side` in `obmc_plan`, `ss_x/ss_y(fctx)` +in `obmc_run`); value-identical at 4:2:0 (`/2 == >>ss`). `obmc_run` is shared +by the 16x16+ square path and the 8x8 leaf path, so one fix covers both. +The `obmc_mask` table was already complete (M1..M32). + +## Verification (this tree @ HEAD + the change) + +- Fail-before → fix-after measured in steps: 2772 chroma diffs → 1126 + (geometry fix alone) → **0** (skip fix): decode output is byte-exact + against fresh `aomdec --rawvideo` for ALL 6 frames, all planes + (`cmp`-equal 221184 bytes). The stream-exactness claim is now TOTAL for + this fixture. +- 4:2:0 non-regression: `cargo test -p ec-av1 --lib a_lossless` → 6 passed, + 0 failed (both 4:2:0 lossless libaom gates, the 444 min-partition-64 + inter gate, the sb128 pair, the 16x4 pair). +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors (target dir + `$HOME/.cache/cargo-target-av1llpred`). + +## Named, not chased (spoken) + +1. `EC_MCB` rung (decode.rs obmc_run) still windows its own dump with + `write_w / 2` — a lane-t900 4:2:0-era INSTRUMENTATION assumption only; + output-inert, decode unaffected. fix-now(deferred to whoever next + touches that rung). +2. The llintra8 report's three named sites (mi(0,16)/mi(2,24)/mi(8,28)) + did not match a fresh run of the same bytes; mi(2,24) and mi(8,28) do + appear in the diff set but the FIRST miss was mi(0,22). Lesson recorded: + reremeasure before owning. + +## Note on the shared oracle + +All comparisons against fresh `$HOME/.cache/aom-oracle/build/aomdec +--rawvideo` output of THE SAME pinned bytes. The oracle tree has no +`EC_OBMC` rung (the decoder-side comment claiming a byte-matching oracle +format is aspirational); EC_PREDND covers intra only. Fixtures stay in +/tmp/llpred + /tmp/llintra8 (regenerable recipes above); nothing committed +from fixtures/. diff --git a/lanes/av1llpred2.report.md b/lanes/av1llpred2.report.md new file mode 100644 index 00000000..8aa2e48e --- /dev/null +++ b/lanes/av1llpred2.report.md @@ -0,0 +1,62 @@ +# lane-av1-llpred2: `skip_chroma_above` must read the frame's own ss pair, not a rect-over-square ratio + +## Ticket + +Reviewer FAIL on 71f07edd's `obmc_plan`: both ss axes were derived from ONE +square chroma side, `ss = trailing_zeros(write_w|write_h / chroma_side)`. +Two defects, one root: + +1. 4:2:0, a 16x8 strip: `write_h/chroma_side = 8/8 = 1`, `trailing_zeros(1)` + = 0, so ss=(1,0) and the plane block read (8,8) — `skip_chroma_above` + went FALSE. The old pre-llpred code skipped, and libaom's + `av1_skip_u4x4_pred_in_obmc` (reconinter.c 829) skips on the PLANE block + `(8,4)` (frame ss (1,1)). Every 4:2:0 16x8/8x16 OBMC strip blended a + chroma above pass the reference never blends (and would desync a + stream that carries one). +2. 4:4:4, a 16x8 strip: `write_h/chroma_side = 8/16 = 0`, + `trailing_zeros(0)` = 64, `write_h >> 64` panics in a debug build. + The parent lane's byte-exact claim was measured in a release build, + where the out-of-range shift wraps instead of panicking. + +## Change (this tree @ 71f07edd + the fix) + +`obmc_plan` takes `ss_x`/`ss_y` — the FRAME's own pair, exactly what the +chroma window half in `obmc_run` shifts by (`ss_x(fctx)`/`ss_y(fctx)`) — +and the decision moved to a pure helper: + +```rust +pub(crate) fn obmc_skip_chroma_above(write_w, write_h, ss_x, ss_y) -> bool { + matches!((write_w >> ss_x, write_h >> ss_y), (4, 4) | (8, 4) | (4, 8)) +} +``` + +All three callsites pass the frame pair: `decode_inter_block`, +`decode_inter_block8` (`ss_x(fctx), ss_y(fctx)`), and the encoder's +`obmc_prediction` (`crate::decode::ss_x(fctx)`, 4:2:0-only encoder). No +ratio over `chroma_side` survives; `trailing_zeros` of anything is gone. +The window-size half that reduces to `/2` at 4:2:0 is untouched, and the +reserved 4:2:0 group-tail chroma arm is untouched. + +## Proof (debug build, `dev` profile throughout) + +- Decision check (new `obmc_skip_chroma_tests`): + `rect_strips_skip_above_chroma_at_420_and_shift_never_overflows` pins + 4:2:0 (16,8,1,1) and (8,16,1,1) → SKIP (with (8,8,1,1), and + (16,16)/(32,16)/(16,32) → blend), and 4:4:4 → only true 4-wide/high + shapes skip, (16,8,0,0)/(8,16,0,0)/(8,8,0,0) → blend with no shift + out of `usize` range. No hit-counter gate was added: the skip + decision itself is what is proven. +- 6-frame 4:4:4 stream, DEBUG decode probe: fixture + `/tmp/llintra8/testsrc2_min8.obu` + sha256 `04fb6d38de5382e647bfb70b6a17802f1fccc5502e6698c0394167891f2b27dc`, + `$HOME/.cache/cargo-target-av1llpred2/debug/examples/decode_probe` + → 6 frames, 221184 bytes, `cmp`-equal to fresh + `$HOME/.cache/aom-oracle/build/aomdec --rawvideo`. Byte-exact, now in + a build that would have panicked on the old code. +- 4:2:0 non-regression: `cargo test -p ec-av1 --lib -- obmc_skip_chroma + a_lossless` → 7 passed, 0 failed (the new check + the 4:2:0 lossless + libaom gates, the 444 min-partition-64 inter gate, the sb128 pair, the + 16x4 pair). +- `cargo check -p ec-av1 --all-targets` + (`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1llpred2`): 0 warnings, + 0 errors. diff --git a/lanes/av1llpredgate2.report.md b/lanes/av1llpredgate2.report.md new file mode 100644 index 00000000..3148ec5d --- /dev/null +++ b/lanes/av1llpredgate2.report.md @@ -0,0 +1,87 @@ +# lane-av1llpredgate2: pin the debug-exact 6-frame stream for the ss-aware `obmc_skip_chroma_above` fix + +Tree: lane-av1-llpredgate2 @ 041e3eae (the lane-av1-llpred2 fix, under +review — no code change landed here). This lane adds ONLY the regression +gate. + +## Regression gate + +`stream::tests::a_lossless_444_min_partition8_inter_stream_decodes_sample_exact` +(crates/ec-av1/src/stream.rs), modelled on +`a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact`. + +### Fixture provenance + +- Origin: lanes/av1llpred.report.md / lanes/av1llpred2.report.md stream — + `testsrc2=size=128x96:rate=?` ffmpeg source, yuv444p, encoded by the + shared aomenc (`$HOME/.cache/aom-oracle/build`, pre-2026 build) with + `--profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0 + --min-partition-size=8 --max-partition-size=64`, 6 frames. +- Committed at `crates/ec-av1/fixtures/ll444_minp8_inter.obu` + (gitignored pattern `fixtures`, force-added like every sibling fixture; + on-disk == `git ls-tree` blob verified at commit time). +- 34037 bytes, sha256 + `04fb6d38de5382e647bfb70b6a17802f1fccc5502e6698c0394167891f2b27dc` + (= the /tmp/llintra8 original, byte-identical copy), + FNV-1a64 `0x2c8f4a2cc02552da`. Both pinned as test consts; missing + file panics — no skip path. + +### Debug build path, not release-only + +The defect this gate pins is a DEBUG-only panic: the pre-llpred2 ratio +(`(write_h / chroma_side).trailing_zeros()` = 64 at 4:4:4) shifted by 64, +which panics under debug_assertions and silently wraps in release +(release was already byte-exact). The test runs under `cargo test`'s +default dev profile — the profile where the parent measured byte-exact +and where the old code dies — so a red run names the class instead of +silently passing. + +### Counter disposition: cited unit check, not a skip-arm counter + +A skip-arm counter was added and measured, then removed: + +- With the counter bumped at the ONE site the ss-aware decision returns + true (after the `obmc_skip_chroma_above` call in `obmc_plan`), the + pinned stream measured `OBMC_SS_SKIP_CHROMA_ABOVE_HITS 0 -> 0` while + OBMC itself fired (`OBMC_HITS 0 -> 77`, `OBMC_RECT_LEAF_HITS 0 -> 20`). + At 4:4:4 the skip needs a 4x4/8x4/4x8 PLANE block; min-partition-8 + never codes one, so the skip arm cannot fire on this stream and any + `delta > 0` assert would be permanently red — vacuity in reverse. +- Per the ticket's fallback: the decision TABLE is pinned by the existing + unit check + `decode::obmc_skip_chroma_tests::rect_strips_skip_above_chroma_at_420_and_shift_never_overflows` + (4:2:0 16x8/8x16 strips still skip; 4:4:4 shifts never leave `usize`), + and the stream gate pins the END-TO-END behaviour sample-for-sample. + +### Assertions (all before/without any skip path) + +1. Fixture bytes: exact length + FNV-1a64. +2. `decode_stream` of the pinned bytes succeeds (a returning `>> 64` + panic fails here) — 6 frames, 128x96. +3. Oracle aomdec (`--codec=av1 --rawvideo`): raw size 221184, then + per-frame per-plane `assert_eq!(bad, 0)` — 0 differing samples, + message carries class `obmc-ss-blind-chroma-above`. +4. ffmpeg arm (`ffmpeg_decode_sequence_444`): same sample-exact compare. + Neither arm skipped in the green run (aomdec + ffmpeg both present). + +## Red probes (mutation verification) + +1. Old-ratio probe: callsite swapped to the exact 71f07edd derivation + (`(write_w|write_h per chroma_side).trailing_zeros()` pair) → test + RED: `attempt to shift right with overflow` at decode.rs + `obmc_skip_chroma_above` — the debug-panic class reproduced. +2. Chroma-diff probe: `skip_chroma_above = true` forced at the callsite + (re-blend class) → test RED at the named assert: `aomdec frame 1 + plane u: 46 samples differ (class obmc-ss-blind-chroma-above)`. +3. decode.rs restored byte-identical after both probes + (`git diff --stat`: only stream.rs + the fixture). + +## Non-regression / hygiene + +- `cargo test -p ec-av1 --lib + a_lossless_444_min_partition8_inter_stream_decodes_sample_exact` + (CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1llpredgate2, dev + profile): 1 passed, 0 failed, no SKIP lines. +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. +- The skip expression itself is untouched (no diff in decode.rs); the + reserved 4:2:0 group-tail chroma arm untouched; no server, no full suite. diff --git a/lanes/av1llsub8.report.md b/lanes/av1llsub8.report.md new file mode 100644 index 00000000..abf6af9b --- /dev/null +++ b/lanes/av1llsub8.report.md @@ -0,0 +1,84 @@ +# lane-av1-llsub8: 4:4:4 lossless sub8 chroma coefficient miss (r1) + +## Charter + +Localize the 4:4:4 lossless sub8 chroma coefficient miss. Work in +`edith_codecs-av1llsub8` @ 38393554; own `sub8_leaf_chroma444` and the +coefficient read it calls. 4:2:0 lossless stays exact. + +## Repro + +Fixture regenerated per the llintra report's recipe (raw `--i444` input, same +encoder): `testsrc2 128x96` yuv444p, 6 frames, `aomenc --profile=1 +--lossless=1 --enable-palette=0 --enable-intrabc=0` (`~/ll444.obu`, 26511 B; +key-frame cut `~/ll444kf.obu`). Pre-fix key frame: 15001/36864 bytes differ +from `aomdec --rawvideo` (first diff byte 4181). Probe exits 101 at frame 1 +(`reconstruct_mc_rect`, decode.rs:2589 path) — the charter's named inter side, +untouched. + +## Ladder (EC_TRACE_COEFF, symbol-anchored, key frame only) + +12136 aligned `(tag,rng)` steps, then: + +1. **uv_mode alphabet (FIXED).** First divergence is *not* a coefficient: at + the first 8x8 `PARTITION_HORZ` leaf (mi (8,16)) the leaf's own `uv_mode` + symbol desyncs. `read_intra_mode_sub8` read `cdfs.uv_mode_cfl[mode]` + (14-symbol) unconditionally; a 4:4:4 lossless `BLOCK_8X4`/`BLOCK_4X8` + leaf's plane block is the rect itself, so `is_cfl_allowed` is FALSE and the + stream carries the 13-symbol `uv_mode_no_cfl` row (class + `wrong-alphabet-same-value`; oracle post-read rng 33082 vs ours 38358 off + the same entry 56906). Fix: gate on `cfl_allowed_px(seg_w_mi*MI, + seg_h_mi*MI)` — true for the 4:2:0 group tail (plane block 4x4) and 4:4:4 + split leaves, false for 4:4:4 rect leaves; 4:2:0 unchanged. +2. **Rect-leaf lossless chroma unit structure (FIXED).** Next divergence + (step 12138): the rect leaf's chroma. `read_tx_size` answers TX_4X4 for + EVERY plane of a lossless block, so the oracle codes the 8x4 leaf's chroma + as TWO plane-major TX_4X4 units (U bc 0, U bc 1, then V) with + `get_txb_ctx`'s **+10** rows (`plane pels 32 > tx pels 16`, + `txb_skip_cdf[0][10..12]`), while ours read ONE TX_8X4 rect unit off + `ChromaRect8x4` (rows `[1][0..2]`, only reached correctly non-losslessly). + Fix: lossless rect arm reads per-4x4 units via `read_plane(TxbSet::Chroma4, + luma_skip_ctx=Some(3))` (Chroma4's `big` rows = `[0][10..12]`), plane-major + per `decode_token_recon_block`, per-unit ctx from the unit's own + `around_mi_rect`, immediate per-unit `av1_set_entropy_contexts` stamps. + The non-lossless arm (single rect transform, rows `[1][7..9]`) is kept. + Tail now stamps per-unit (`grid_unit_state`) instead of one whole-leaf + smear; 4x4 leaves and the single-unit rect arm are bit-identical to before. + +After both fixes: divergence moves to step 19228, key frame 178/36864 bytes +off (first diff byte 8320). + +## STOP — named, not fixed (budget) + +Step 19228: inside a **16x8 leaf** (`PARTITION_HORZ` of a 16x16; U units +bc 0..3, br 0..1) the U unit at **bc=2, br=0** reads `txb_skip` base **1** +(ours, row `[0][11]` — the same `+3` fold, cdf `[8570,...]`) where the oracle +reads base **0** (row `[0][10]`, cdf0=32705): one of ours' above/left entropy +cells for that unit is stamped nonzero where the oracle's is clean. bc=0/1 of +the same leaf aligned (rng 40879/40628), and ours' `dcctx=2` on the diverging +read (vs 0 on bc=1) says the polluted cell carries a DC-sign vote — i.e. an +above-band cell written by the block above with a state the oracle doesn't +hold. Next step: dump the above-band cell contents (both sides, +`EC_DCDUMP`/oracle equivalent) for the units directly above this leaf's +bc 2/3 columns and diff the writer — suspect the 16x8-path's per-unit stamp +map (which unit owns which above/left cell when a leaf spans >1 mi row) in +`decode_leaf_rect`'s chroma loop, NOT `sub8_leaf_chroma444` (16x8 leaves are +read by `decode_leaf_rect`, which already had per-unit +3 reads before this +lane). + +## Verification (measured) + +- `a_lossless_libaom_key_frame_decodes_sample_exact` + `a_lossless_libaom_ + inter_frame_decodes_sample_exact` (4:2:0): green. +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. +- Key frame: 15001 → 178 differing bytes; first diff byte 4181 → 8320. +- Consumed-count ladder: 12136 → 12138 → 19228 aligned steps. + +## Deferred (spoken, not hidden) + +- 16x8 above-band stamp diff above (fix-now; named cell + writer). +- Intrabc rect leaves at lossless 444 still route the rect arm's + `read_coeffs_rect` path with the wrong unit structure — unreachable with + `--enable-intrabc=0` fixtures; same fix shape as the non-intrabc arm + (deferred(fix-now after the inter side is green, with an intrabc 4:4:4 + fixture), matching the llintra report's deferral). diff --git a/lanes/av1llsub8b.report.md b/lanes/av1llsub8b.report.md new file mode 100644 index 00000000..3afe38e0 --- /dev/null +++ b/lanes/av1llsub8b.report.md @@ -0,0 +1,92 @@ +# lane-av1-llsub8b: the inter sub8 rect route's 4:4:4 lossless chroma raster + +## Ticket + +`decode_inter_sub8_rect2` hit `TxParams::run`'s lossless WHT assert +`(8, 4) != (4, 4)` at decode.rs:2566 (pre-existing at the parent, named by +`lane-av1-ll64`'s same-class sweep). Port sibling `84acbd09` if it covers +this route; else fix only the unit size that trips the assert. +`decode_rect4_16_strip` untouched (sibling-owned). The 12-frame stream's +Golomb-tail refusal was expected to disappear once the (8,4) read was +fixed. + +## Sibling verdict: not covered — own fix, same shape + +`84acbd09` (already ported here as fb4e4b0e) routed `decode_inter_block8`'s +INTER arms' 8x8 chroma through `leaf8_inter_chroma_lossless`. The rect2 +route was one arm over: `decode_inter_sub8_rect2`'s `chroma_444` coded arm +read each piece's (8,4)/(4,8) U/V plane block as ONE `TxbSet::ChromaRect8x4` +rect unit — at lossless that unit hits the WHT assert, exactly the ll64 +report's prediction. + +## Change (decode.rs, one branch) + +New arm in `decode_inter_sub8_rect2`'s `chroma_444` coded path: +`lossless(fctx) && !mono(fctx)` routes the piece's chroma through the +sibling's `read_inter_chroma_lossless` walk with region and block +`(bw, bh)` at stride `SIDE` — lossless codes TX_4X4 on EVERY plane +(`av1_get_tx_size`, blockd.h:1383), so the plane block is a 2x1/1x2 raster +of `TxbSet::Chroma4` units. The walk stamps each unit's own coefficient +context, so — unlike the lossy arm — no whole-block `record_mi_chroma` +runs after it (the leaf8 rule). `piece_tx_type` inheritance stays lossy- +only (lossless is DCT_DCT on every plane). 4:2:0: zero change — the branch +lives inside `chroma_444`, and the reserved 4:2:0 group-tail chroma arm was +not touched. Luma was already correct (`lane-lossless2`'s TX_4X4 leaf walk). + +## Verification (measured, this tree @ HEAD + this change) + +- Fail-before: `testsrc2 128x96 yuv444p`, aomenc `--profile=1 --lossless=1 + --enable-palette=0 --enable-intrabc=0 --max-partition-size=64`, 6 frames + → panic `(8, 4) != (4, 4)` at decode.rs:2566, backtrace + `read_inter_plane_rect → push_mc_rect_tx`. Fail-after: gone; the decoder + reads through the rect2 pieces and arrives coherently at the next + (pre-existing) defect site — see deferred (1). +- Witness with the route actually firing: mandelbrot 128x96 6 frames, same + recipe, `--cpu-used` 0 and 3 both decode ALL 6 frames; + `sub8_inter_rect: horz8x4=22 vert4x8=15` (cpu0) / `10/12` (cpu3) — 37 + and 22 lossless 444 rect2 chroma pieces through the new walk, stream + completes. +- Sibling non-regression: the ORIGINAL `/tmp/ll444/dodge2.obu` (sibling's + own witness bytes) decodes byte-exact vs fresh `aomdec --rawvideo`, all 6 + frames, in this tree with this change. +- Entropy alignment on the repro stream: frames 0-2 of the 6-frame + testsrc2 stream byte-exact vs aomdec; `sub8_inter_rect` counters 0 there + (its first rect2 piece sits behind deferred (1)'s site), and its frame 3 + reads through the new arm up to the (8,8) site without a desync-form + failure. +- Gates: `cargo test -p ec-av1 --lib a_lossless` → 6 passed, 0 failed + (both 4:2:0 lossless libaom gates, the 444 min-partition-64 inter gate, + the sb128 pair). +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1llsub8b`): 0 warnings, 0 errors. +- Fixtures are scratch in /tmp/llsub8b (regenerable recipes above); + fixtures/ is gitignored, nothing committed from it. + +## Named, not chased (spoken) + +1. `decode_inter_block8`'s INTRA-leaf chroma arm (decode.rs:38958/:38985, + `u_grid`/`v_grid = read_plane(..)` at `chroma_side == 8`) reads 4:4:4 + lossless chroma as ONE TX_8X8 unit → the same WHT assert, `(8, 8) != + (4, 4)`. Same class, the one arm the sibling's fix did not cover (it + routed the INTER arms only). decode_inter_block8 is the llinter lane's + function — deferred(fix-now by the lane owning block8's intra arm; the + fix shape is the same per-unit lossless walk with intra-plane read + semantics, not a port of the inter helper). +2. The 12-frame stream's `REFUSED: AV1 tile (a Golomb tail …)` from the + ll64 report: GONE after this fix — that stream now stops at deferred + (1)'s (8,8) site instead, exactly as ll64 predicted. +3. Fresh observation on today's regenerated fixtures: a mandelbrot + default-partition lossless 444 KEY frame pixel-differs from aomdec + (key-frame-only stream, zero sub8 counters, no refusal, first diff at + sample 40). Key frames never enter `decode_inter_sub8_rect2`, so this + is pre-existing and intra-side — the earlier lanes' key-frame proofs + ran min-partition-64 keys, which stay exact. deferred(the intra lane). + +## Note on the shared oracle + +aomenc/aomdec binaries are the shared `$HOME/.cache/aom-oracle/build`. +Today's aomenc produces different RD picks than this morning's (the +regenerated min-partition-64 testsrc2 stream's inter frames differ from +the sibling's original bytes) — streams were therefore compared only +against aomdec output of THE SAME bytes, and the sibling's original +dodge2.obu was used verbatim for the non-regression check. diff --git a/lanes/av1rect128recon.report.md b/lanes/av1rect128recon.report.md new file mode 100644 index 00000000..2f9152d2 --- /dev/null +++ b/lanes/av1rect128recon.report.md @@ -0,0 +1,88 @@ +# lane-av1-rect128recon — the 444_sb128rect witness f2 is byte-exact vs aomdec AND ffmpeg; root cause: the inter-frame intra tail's chroma walk coded ONE whole-plane unit where 4:4:4 codes four TX_32X32 units; gate extended take(2)→take(3) (r1) + +## Outcome + +1. REPRODUCED at HEAD 99232190 (fresh target dir `cargo-target-av1rect128recon`, + fixture sha256 `27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80` + re-verified, oracle aomdec `~/.cache/aom-oracle/build` regenerated this + session): frame 2 diverges at PREFILT Y 6952 / U 9568 / V 13496, first diffs + Y (col 128, row 98), U (col 128, row 64), V (col 128, row 0); f0/f1 exact. + Numbers match av1444sbf2 r1 / av1lrflush r3 sample-for-sample. +2. BLOCK-SHAPE CORRECTION (ladder evidence, not inference): the oracle's f2 + top-right superblock root is a gathered-bit SPLIT, and its right column is + INTRA blocks — 64x64 at (128,0), 64x32 at (128,64), 64x32 at (128,96), + 64x64 at (128,128) — not "the inter 64x128 at (128,0)" the earlier lane + reports name. Evidence: oracle `EC_PART`/`EC_PART_VAL` (ctx 14, values + NONE/HORZ at mi (0,32)/(16,32)), `EC_PREDOUT8` per-unit sums, and + `EC_DQCOEFF`. The earlier reports' pixel numbers are all reproduced here; + only the block-shape naming was wrong. +3. FIRST DIVERGENT SYMBOL, pinned by consecutive-TU rng alignment on both + ladders (`EC_COEFF_STEP`, TU-boundary values 60168/55581/51541 matching + line-for-line): the 64x64 intra block's FIRST chroma TX_32X32 unit at + mi (0,32). Ours decoded `txb_skip` off the offset-7 context row (printed + ctx 0); aom reads the offset-10 row (true ctx 10 — the uv plane block + 64x64 is larger than the TX_32X32 unit). Same decoded value (skip), but + the CDF rows differ, so the arithmetic coders consumed different bits and + the rest of frame 2 decodes off a drifting state — bounded, mostly-skip + garbage that still corrupted the block's own V plane (uniform −1: the + missing V residual) and the bottom superblock row. +4. ROOT CAUSE (one site): `decode_inter_block`'s intra tail read the block's + chroma as ONE whole-plane unit (`read_plane` with `chroma_side`/`chroma_tx`, + block-level `around`, no +10 offset) — a 4:2:0-era remnant. At 4:4:4 a + 64x64 plane block is FOUR plane-major TX_32X32 units, each with its own + `around_mi` context and the offset-10 rows. The keyframe path + (`decode_block`'s `cn > 1` loop, lane-av1-444) and the inter tail's own + ss-0/0 arm already did this correctly; the intra-in-inter tail was the one + remaining copy of the old shape. The misnaming in (2) hid this: the + "inter 64x128" framing pointed at Agent044's strip/inter territory, while + the real site is the intra tail. +5. FIX (decode.rs, intra tail chroma chain): new `ss_x==0 && ss_y==0 && + chroma_side > chroma_tx` arm — four plane-major TX_32X32 units, per-unit + `around_mi(cu_mi, 32)`, `Some(3)` skip-ctx offset (+10 convention on our + chroma-32 table), immediate per-unit `record_mi_chroma`, per-unit + `tu_reach`, assembled 64x64 plane grids, `mu_chroma = true` so the + block-tail unit replay re-stamps after the whole-block record (class + `override-slot-on-one-arm`). 4:2:0 is identical by construction: the arm + is ss-gated and `chroma_side == chroma_tx` there still takes the old + single-read path. Class sweep: the only other intra-in-inter chroma arms + are the side>64 mu-chunk walk (already per-unit, correct) and the + rect-strip readers (separate paths, sibling-owned, untouched). +6. RESULT: f2 PREFILT byte-exact; FINAL (full deblock/CDEF/LR pipeline) + byte-exact on ALL THREE frames against BOTH oracles — ours == + `ffmpeg -f rawvideo -pix_fmt yuv444p` byte-for-byte (276480 bytes), and + frame-equal to aomdec's Y4M output (its 12 interleaved `FRAME` markers + stripped). + +## Verification + +- `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` + (extended to `.take(3)` in both oracle arms + rewritten scoping comment, + same commit): PASS. +- `cargo check -p ec-av1`: 0 warnings (target `$HOME/.cache/cargo-target-av1rect128recon`). +- sb128 family (`cargo test -p ec-av1 --lib sb128`): 10 passed, 1 ignored. +- 444 family (`--lib 444`): 4 passed (includes the lossless 444 + min-partition-64 inter stream). +- Restoration battery (`EC_AV1_REQUIRE_AOMENC=1 --lib restoration`): + 10 passed, 0 failed. +- chroma family (`--lib chroma`): 28 passed, 0 failed. +- Stage evidence from env-gated rungs on both decoders (EC_PART/EC_PART_VAL, + EC_COEFF_STEP, EC_ECDUMP_IN, EC_PREDOUT8, EC_IMODE, AOMMB, EC_DQCOEFF); + throwaway /tmp scratch only, nothing left in the tree. + +## Decision + +- Gate extended and the stale "LR never restores RU row 0" scoping comment + replaced (that attribution was refuted in lane-av1lrflush r3 as a + stage-ladder mixup) — the deferred same-commit pairing is now discharged. +- Sibling ownership respected: `decode_rect4_16_strip`'s 16x4/strip-tail + territory and the sub-8 leaf paths untouched; the fix lands in + `decode_inter_block`'s intra tail only. +- Named for the record: any future block-shape work must sweep BOTH copies + of the chroma unit walk — `decode_block` (keyframe) and + `decode_inter_block`'s intra tail — plus the inter tail; this defect was + the third copy drifting from the first two. + +## State + +- Commit on lane-av1-rect128recon (no push): decode.rs fix + stream.rs gate + extension/comment + this report.