forge
Explore
Log in

Don't you dare go Hollow

Mvstack scan weight inc mins by the candidate's cross axis

Browse files at this commit

d6cb150d4044477d833d83e6a7e58a6caffec9b2Ahmet Kaan GümüşParent: 8e2b541
  • fix
    • mvstack scan weight inc mins by the candidate's cross axis
Show full message
fix(av1): mvstack scan weight inc mins by the candidate's cross axis

libaom's scan_row_mbmi mins inc by mi_size_high (candidate height), scan_col
by width; ours used the scan's own axis at all 4 sites (single + compound).
Square candidates hide it; a 32x16 strip above tied weights, reordering DRL
entry 1 and suppressing the -5 extended row scan. rect-flake-2 byte-exact,
pin added to the default list; lib 220/0.
crates/ec-av1/src/decode.rsmodified+4 -1
@@ -8287,8 +8287,11 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
82878287 switchable_motion_mode,
82888288 allow_warped_motion,
82898289 true,
8290+ // lane-rect r2: the top strip's TRUE 32x16
8291+ // footprint (was BLOCK,BLOCK -- the same square
8292+ // corner-cut rect-flake-1 exposed on HORZ).
82908293 BLOCK,
8291- BLOCK,
8294+ SUB,
82928295 )?;
82938296 if (r32 * 2 + 1) as u32 * SUB_MI < mi_rows {
82948297 decode_inter_block(
crates/ec-av1/src/mvstack.rsmodified+4 -4
@@ -412,7 +412,7 @@ fn scan_row(
412412 }
413413 let mut weight = ROW_COL_WEIGHT_FLOOR;
414414 if bw4 <= n4 {
415- let inc = ((-max_row_offset + row_offset + 1) as usize).min(n4);
415+ let inc = ((-max_row_offset + row_offset + 1) as usize).min(info.size_h);
416416 weight = weight.max(inc as u32);
417417 *processed_rows = (inc as isize - row_offset - 1).max(0) as usize;
418418 }
@@ -485,7 +485,7 @@ fn scan_col(
485485 }
486486 let mut weight = ROW_COL_WEIGHT_FLOOR;
487487 if bh4 <= n4 {
488- let inc = ((-max_col_offset + col_offset + 1) as usize).min(n4);
488+ let inc = ((-max_col_offset + col_offset + 1) as usize).min(info.size);
489489 weight = weight.max(inc as u32);
490490 *processed_cols = (inc as isize - col_offset - 1).max(0) as usize;
491491 }
@@ -1127,7 +1127,7 @@ fn scan_row_compound(
11271127 }
11281128 let mut weight = ROW_COL_WEIGHT_FLOOR;
11291129 if bw4 <= n4 {
1130- let inc = ((-max_row_offset + row_offset + 1) as usize).min(n4);
1130+ let inc = ((-max_row_offset + row_offset + 1) as usize).min(info.size_h);
11311131 weight = weight.max(inc as u32);
11321132 *processed_rows = (inc as isize - row_offset - 1).max(0) as usize;
11331133 }
@@ -1183,7 +1183,7 @@ fn scan_col_compound(
11831183 }
11841184 let mut weight = ROW_COL_WEIGHT_FLOOR;
11851185 if bh4 <= n4 {
1186- let inc = ((-max_col_offset + col_offset + 1) as usize).min(n4);
1186+ let inc = ((-max_col_offset + col_offset + 1) as usize).min(info.size);
11871187 weight = weight.max(inc as u32);
11881188 *processed_cols = (inc as isize - col_offset - 1).max(0) as usize;
11891189 }
crates/ec-av1/src/stream.rsmodified+14 -6
@@ -3741,11 +3741,11 @@ mod tests {
37413741 "--enable-onesided-comp=0",
37423742 "--enable-interintra-wedge=0",
37433743 "--enable-smooth-interintra=0",
3744- // lane-partitions r1: the free (rect=1, min=16) recipe found
3745- // and PINNED rect-flake-1.obu -- the 32x16 strip mvstack
3746- // desync now refused by name for r2; recipe re-clamped so the
3747- // gate stays green until rectangular contexts land.
3748- "--enable-rect-partitions=0",
3744+ // lane-rect r2: HORZ/VERT decode for real (rect-flake-1
3745+ // byte-exact: size_h + warp dims + OBMC overlap + tx height)
3746+ // -- free recipe restored; remaining partition kinds refuse
3747+ // by name and skip their seeds.
3748+ "--enable-rect-partitions=1",
37493749 "--enable-ab-partitions=1",
37503750 "--enable-1to4-partitions=0",
37513751 "--enable-filter-intra=0",
@@ -3757,7 +3757,7 @@ mod tests {
37573757 "--enable-cdef=0",
37583758 "--enable-restoration=0",
37593759 "--max-partition-size=32",
3760- "--min-partition-size=32",
3760+ "--min-partition-size=16",
37613761 "--enable-palette=0",
37623762 "--enable-intrabc=0",
37633763 "--enable-cfl-intra=0",
@@ -4081,6 +4081,14 @@ mod tests {
40814081 // saturation slowed the adaptation rate) -- unrelated to
40824082 // interintra, caught by the same gate.
40834083 "ii-flake-9",
4084+ // lane-rect r2: HORZ strip rect defects (mvstack size_h,
4085+ // warp sample/projection dims, OBMC overlap, deblock tx-h).
4086+ "rect-flake-1",
4087+ // scan_row/scan_col weight `inc` min'd by the wrong candidate
4088+ // axis (width vs height) -- ties reordered DRL entry 1 for a
4089+ // block under a 32x16 strip, and suppressed the -5 extended
4090+ // row scan.
4091+ "rect-flake-2",
40844092 ]
40854093 .iter()
40864094 .map(|n| format!("{fixtures}/{n}.obu"))