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(
8287 switchable_motion_mode,8287 switchable_motion_mode,
8288 allow_warped_motion,8288 allow_warped_motion,
8289 true,8289 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).
8290 BLOCK,8293 BLOCK,
8291- BLOCK,8294+ SUB,
8292 )?;8295 )?;
8293 if (r32 * 2 + 1) as u32 * SUB_MI < mi_rows {8296 if (r32 * 2 + 1) as u32 * SUB_MI < mi_rows {
8294 decode_inter_block(8297 decode_inter_block(
crates/ec-av1/src/mvstack.rsmodified+4 -4
@@ -412,7 +412,7 @@ fn scan_row(
412 }412 }
413 let mut weight = ROW_COL_WEIGHT_FLOOR;413 let mut weight = ROW_COL_WEIGHT_FLOOR;
414 if bw4 <= n4 {414 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);
416 weight = weight.max(inc as u32);416 weight = weight.max(inc as u32);
417 *processed_rows = (inc as isize - row_offset - 1).max(0) as usize;417 *processed_rows = (inc as isize - row_offset - 1).max(0) as usize;
418 }418 }
@@ -485,7 +485,7 @@ fn scan_col(
485 }485 }
486 let mut weight = ROW_COL_WEIGHT_FLOOR;486 let mut weight = ROW_COL_WEIGHT_FLOOR;
487 if bh4 <= n4 {487 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);
489 weight = weight.max(inc as u32);489 weight = weight.max(inc as u32);
490 *processed_cols = (inc as isize - col_offset - 1).max(0) as usize;490 *processed_cols = (inc as isize - col_offset - 1).max(0) as usize;
491 }491 }
@@ -1127,7 +1127,7 @@ fn scan_row_compound(
1127 }1127 }
1128 let mut weight = ROW_COL_WEIGHT_FLOOR;1128 let mut weight = ROW_COL_WEIGHT_FLOOR;
1129 if bw4 <= n4 {1129 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);
1131 weight = weight.max(inc as u32);1131 weight = weight.max(inc as u32);
1132 *processed_rows = (inc as isize - row_offset - 1).max(0) as usize;1132 *processed_rows = (inc as isize - row_offset - 1).max(0) as usize;
1133 }1133 }
@@ -1183,7 +1183,7 @@ fn scan_col_compound(
1183 }1183 }
1184 let mut weight = ROW_COL_WEIGHT_FLOOR;1184 let mut weight = ROW_COL_WEIGHT_FLOOR;
1185 if bh4 <= n4 {1185 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);
1187 weight = weight.max(inc as u32);1187 weight = weight.max(inc as u32);
1188 *processed_cols = (inc as isize - col_offset - 1).max(0) as usize;1188 *processed_cols = (inc as isize - col_offset - 1).max(0) as usize;
1189 }1189 }
crates/ec-av1/src/stream.rsmodified+14 -6
@@ -3741,11 +3741,11 @@ mod tests {
3741 "--enable-onesided-comp=0",3741 "--enable-onesided-comp=0",
3742 "--enable-interintra-wedge=0",3742 "--enable-interintra-wedge=0",
3743 "--enable-smooth-interintra=0",3743 "--enable-smooth-interintra=0",
3744- // lane-partitions r1: the free (rect=1, min=16) recipe found3744+ // lane-rect r2: HORZ/VERT decode for real (rect-flake-1
3745- // and PINNED rect-flake-1.obu -- the 32x16 strip mvstack3745+ // byte-exact: size_h + warp dims + OBMC overlap + tx height)
3746- // desync now refused by name for r2; recipe re-clamped so the3746+ // -- free recipe restored; remaining partition kinds refuse
3747- // gate stays green until rectangular contexts land.3747+ // by name and skip their seeds.
3748- "--enable-rect-partitions=0",3748+ "--enable-rect-partitions=1",
3749 "--enable-ab-partitions=1",3749 "--enable-ab-partitions=1",
3750 "--enable-1to4-partitions=0",3750 "--enable-1to4-partitions=0",
3751 "--enable-filter-intra=0",3751 "--enable-filter-intra=0",
@@ -3757,7 +3757,7 @@ mod tests {
3757 "--enable-cdef=0",3757 "--enable-cdef=0",
3758 "--enable-restoration=0",3758 "--enable-restoration=0",
3759 "--max-partition-size=32",3759 "--max-partition-size=32",
3760- "--min-partition-size=32",3760+ "--min-partition-size=16",
3761 "--enable-palette=0",3761 "--enable-palette=0",
3762 "--enable-intrabc=0",3762 "--enable-intrabc=0",
3763 "--enable-cfl-intra=0",3763 "--enable-cfl-intra=0",
@@ -4081,6 +4081,14 @@ mod tests {
4081 // saturation slowed the adaptation rate) -- unrelated to4081 // saturation slowed the adaptation rate) -- unrelated to
4082 // interintra, caught by the same gate.4082 // interintra, caught by the same gate.
4083 "ii-flake-9",4083 "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",
4084 ]4092 ]
4085 .iter()4093 .iter()
4086 .map(|n| format!("{fixtures}/{n}.obu"))4094 .map(|n| format!("{fixtures}/{n}.obu"))