diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index cf2c093e..d4d5ac9b 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -8287,8 +8287,11 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( switchable_motion_mode, allow_warped_motion, true, + // lane-rect r2: the top strip's TRUE 32x16 + // footprint (was BLOCK,BLOCK -- the same square + // corner-cut rect-flake-1 exposed on HORZ). BLOCK, - BLOCK, + SUB, )?; if (r32 * 2 + 1) as u32 * SUB_MI < mi_rows { decode_inter_block( diff --git a/crates/ec-av1/src/mvstack.rs b/crates/ec-av1/src/mvstack.rs index d0870381..81c51cc5 100644 --- a/crates/ec-av1/src/mvstack.rs +++ b/crates/ec-av1/src/mvstack.rs @@ -412,7 +412,7 @@ fn scan_row( } let mut weight = ROW_COL_WEIGHT_FLOOR; if bw4 <= n4 { - let inc = ((-max_row_offset + row_offset + 1) as usize).min(n4); + let inc = ((-max_row_offset + row_offset + 1) as usize).min(info.size_h); weight = weight.max(inc as u32); *processed_rows = (inc as isize - row_offset - 1).max(0) as usize; } @@ -485,7 +485,7 @@ fn scan_col( } let mut weight = ROW_COL_WEIGHT_FLOOR; if bh4 <= n4 { - let inc = ((-max_col_offset + col_offset + 1) as usize).min(n4); + let inc = ((-max_col_offset + col_offset + 1) as usize).min(info.size); weight = weight.max(inc as u32); *processed_cols = (inc as isize - col_offset - 1).max(0) as usize; } @@ -1127,7 +1127,7 @@ fn scan_row_compound( } let mut weight = ROW_COL_WEIGHT_FLOOR; if bw4 <= n4 { - let inc = ((-max_row_offset + row_offset + 1) as usize).min(n4); + let inc = ((-max_row_offset + row_offset + 1) as usize).min(info.size_h); weight = weight.max(inc as u32); *processed_rows = (inc as isize - row_offset - 1).max(0) as usize; } @@ -1183,7 +1183,7 @@ fn scan_col_compound( } let mut weight = ROW_COL_WEIGHT_FLOOR; if bh4 <= n4 { - let inc = ((-max_col_offset + col_offset + 1) as usize).min(n4); + let inc = ((-max_col_offset + col_offset + 1) as usize).min(info.size); weight = weight.max(inc as u32); *processed_cols = (inc as isize - col_offset - 1).max(0) as usize; } diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 4c5d3fec..fa9e4699 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -3741,11 +3741,11 @@ mod tests { "--enable-onesided-comp=0", "--enable-interintra-wedge=0", "--enable-smooth-interintra=0", - // lane-partitions r1: the free (rect=1, min=16) recipe found - // and PINNED rect-flake-1.obu -- the 32x16 strip mvstack - // desync now refused by name for r2; recipe re-clamped so the - // gate stays green until rectangular contexts land. - "--enable-rect-partitions=0", + // lane-rect r2: HORZ/VERT decode for real (rect-flake-1 + // byte-exact: size_h + warp dims + OBMC overlap + tx height) + // -- free recipe restored; remaining partition kinds refuse + // by name and skip their seeds. + "--enable-rect-partitions=1", "--enable-ab-partitions=1", "--enable-1to4-partitions=0", "--enable-filter-intra=0", @@ -3757,7 +3757,7 @@ mod tests { "--enable-cdef=0", "--enable-restoration=0", "--max-partition-size=32", - "--min-partition-size=32", + "--min-partition-size=16", "--enable-palette=0", "--enable-intrabc=0", "--enable-cfl-intra=0", @@ -4081,6 +4081,14 @@ mod tests { // saturation slowed the adaptation rate) -- unrelated to // interintra, caught by the same gate. "ii-flake-9", + // lane-rect r2: HORZ strip rect defects (mvstack size_h, + // warp sample/projection dims, OBMC overlap, deblock tx-h). + "rect-flake-1", + // scan_row/scan_col weight `inc` min'd by the wrong candidate + // axis (width vs height) -- ties reordered DRL entry 1 for a + // block under a 32x16 strip, and suppressed the -5 extended + // row scan. + "rect-flake-2", ] .iter() .map(|n| format!("{fixtures}/{n}.obu"))