From 782097800d9dbd506a6575449a2095f35d21185f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 1 Sep 2026 23:48:12 +0300 Subject: [PATCH] fix(av1): SB-level 1:4 gate is GREEN on current main -- plus two main-red pins (nz_map test read the abandoned transposition, 1:4 coverage hole closed) r1's red 16x64 gate was a STALE BASE, not a defect: rebasing lane-tx64x16 from dc5553f onto main (5811ec5 -> 6d86d3a) turns `a_real_aomenc_stream_with_a_superblock_level_1to4_partition_decodes_pixel_exact` green with no change to the 1:4 wiring, and the r1 suite's "17 failures" drop to 2, neither of them this lane's: - `decode::tests::nz_map_ctx_offset_tables_match_the_rect_rule` (RED on main, not on this branch's diff): the test read `NZ_MAP_CTX_OFFSET_32X64/_64X32` as `[col][row]` (lane-rectsplit r2's column-major premise, later disproved and reverted) while the tables and their only real consumer -- `base_ctx`'s `TxClass::TwoD` arm, decode.rs:1829 -- are display-major `[row][col]`. Read in the consumer's order; table content untouched, so every merged rect gate keeps the reading it is green under. - `gate_coverage::tests::never_exercised_8bit_matches_the_gate_recipes`: this lane's gate passes `--enable-1to4-partitions=1` at 8 bit, so the 8-bit hole is retired; the 10-bit entry stays and now says so. Rebase conflicts resolved keeping BOTH SB partition arms (main's AB arms from part32 r4 and this lane's HORZ_4/VERT_4), with `reduced_tx_set` threaded into the 1:4 `decode_block_rect64` calls; the unreachable `_` arm now refuses an out-of-range partition value instead of the (now coded) 1:4 pair. --- crates/ec-av1/src/decode.rs | 16 ++++++++++------ crates/ec-av1/src/gate_coverage.rs | 6 +----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index c943001a..fde98265 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -16440,11 +16440,15 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( mod tests { use super::*; - /// lane-rectsplit r2: `av1_nz_map_ctx_offset` is packed COLUMN-major, so - /// the two rect transcriptions in [`cdf`] must be read `[col][row]`. - /// [`base_ctx_rect`] states libaom's generating rule - /// (`txb_common.h:199-209`) in display coordinates; this pins the tables - /// against it, which is what a transposed read would break. + /// libaom's generating rule (`txb_common.h:199-209`) in DISPLAY + /// coordinates, pinned against the two rect transcriptions in [`cdf`]. + /// lane-tx64x16 r2: this test read the tables `[col][row]` (lane-rectsplit + /// r2's column-major premise) while r3 reverted the tables themselves to + /// display-major `[row][col]` -- the order [`base_ctx`] itself reads them + /// at `decode.rs`'s `TxClass::TwoD` arm, and the order every merged rect + /// gate is green under. The test was left pinning the abandoned half, so + /// it failed on `main` (32x64 display (row 0, col 2): table says 6 read + /// transposed, the rule says 11). Read in the consumer's order. #[test] fn nz_map_ctx_offset_tables_match_the_rect_rule() { for (w, h, table) in [ @@ -16463,7 +16467,7 @@ mod tests { cdf::NZ_MAP_CTX_OFFSET_32[row][col] }; assert_eq!( - table[col][row], + table[row][col], want, "{w}x{h} nz_map offset at display (row {row}, col {col})" ); diff --git a/crates/ec-av1/src/gate_coverage.rs b/crates/ec-av1/src/gate_coverage.rs index ea8de846..c21a24b3 100644 --- a/crates/ec-av1/src/gate_coverage.rs +++ b/crates/ec-av1/src/gate_coverage.rs @@ -93,10 +93,6 @@ const TOOL_UNIVERSE: &[&str] = &[ /// depth retires the entry, and this test fails until it is deleted. #[cfg(test)] const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[ - ( - "enable-1to4-partitions", - "off in 42 gates, on in none: PARTITION_HORZ_4/VERT_4 at 64x64 needs TX_64X16 luma plus 32x8 chroma scans (lane-part32 r5)", - ), ( "enable-angle-delta", "off in 36 gates, on in none: the directional-intra gates pin it off to isolate the base modes", @@ -161,7 +157,7 @@ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ // gate passes `=1` for both. ( "enable-1to4-partitions", - "hole at both depths, see the 8-bit list", + "10-bit hole only: lane-tx64x16's 8-bit SB-level 1:4 gate passes `=1` and asserts both arms, but no 10-bit gate does", ), ( "enable-angle-delta",