From a34d785001b17a2123e3cc68c7d3ad65f2dc9ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 26 Sep 2026 04:28:12 +0300 Subject: [PATCH] ec-av1: lane-av1422ctxgather -- review P2: the around_c comment and the report sentence claimed every VERT shape keeps the plain per-mi gather; false for 4:2:2 VERT -- the ss-gated reroute catches it (pair span (8,16), above side one chroma column per two luma mi, same double-count) and is oracle-correct there. Comment and report corrected; only 4:2:0/4:4:4 VERT keep the plain gather. No code change. --- crates/ec-av1/src/decode.rs | 9 ++++++--- lanes/av1422ctxgather.report.md | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 81432d1d..89b7f85d 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -34585,9 +34585,12 @@ fn decode_inter_block( // `!(subsampling_y)` row clause) -- pair_mi is the strip // itself and the context reads the strip's own 8x4, ONE // luma-mi row tall, with the 4:2:2 above sampling - // ([`Neighbours::around_mi_422_chroma`]). The 4:2:0 pair - // merge keeps the (16, 8) span and the plain per-mi gather - // (as do 4:4:4 and every VERT shape). + // ([`Neighbours::around_mi_422_chroma`]) -- and the same + // reroute catches 4:2:2 VERT: its (8, 16) pair span's + // above side covers one chroma column per two luma mi + // columns, the identical double-count. The plain per-mi + // gather survives only where the ss gate excludes it: + // the 4:2:0 pair merge (16, 8) and every 4:4:4 shape. let around_c = match strip_chroma { Some(s) if s.has_chroma => { let (pw, ph) = if s.horz { diff --git a/lanes/av1422ctxgather.report.md b/lanes/av1422ctxgather.report.md index bae9f22f..773a30e1 100644 --- a/lanes/av1422ctxgather.report.md +++ b/lanes/av1422ctxgather.report.md @@ -23,7 +23,12 @@ columns at ss_x 1, so every column's whole-unit dc sign is counted twice). At ss (1,0) it now reads `(16, 4)` through [`Neighbours::around_mi_422_chroma`]; the 4:2:0 pair merge keeps the - (16, 8) span and the per-mi gather, as do 4:4:4 and every VERT shape. + (16, 8) span and the per-mi gather, as does 4:4:4. The same reroute + catches 4:2:2 VERT (pair span (8, 16)): its above side covers one + chroma column per two luma mi columns — the identical double-count — + so it reads through [`around_mi_422_chroma`] too, and is + oracle-correct there. Only the ss gate's excluded shapes (4:2:0 + VERT/4:4:4 VERT) keep the plain gather. 3. **The intra strip's chroma gather** (the charter's named site, `decode_rect4_16_strip` ~15331): the else arm's `around_mi_rect(pair_mi, pw, ph)` is routed through