]> git.nihav.org Git - nihav.git/commitdiff
h264: increase margin in wait_for_mb for the luma interpolation filter
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 5 Mar 2026 17:07:24 +0000 (18:07 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 5 Mar 2026 17:07:24 +0000 (18:07 +0100)
nihav-itu/src/codecs/h264/mb_recon.rs

index 4cafcbb8b3c439e6d82fa211231f18ba9945ae26..dc7302dd10eb265a64a69869089d6c674cbcdb17 100644 (file)
@@ -663,8 +663,8 @@ pub fn recon_mb(frm: &mut NASimpleVideoFrame<u8>, slice_hdr: &SliceHeader, mb_in
 }
 
 pub fn wait_for_mb(disp: &Shareable<ThreadDispatcher>, sstate: &SliceState, xpos: usize, ypos: usize, mv: MV, ref_id: u32) -> DecoderResult<()> {
-    let xpos = xpos as isize + ((mv.x >> 2) as isize) + 4;
-    let ypos = ypos as isize + ((mv.y >> 2) as isize) + 4;
+    let xpos = xpos as isize + ((mv.x >> 2) as isize) + 6;
+    let ypos = ypos as isize + ((mv.y >> 2) as isize) + 6;
     let dst_mb_x = ((xpos.max(0) as usize) / 16).min(sstate.mb_w - 1);
     let dst_mb_y = ((ypos.max(0) as usize) / 16).min(sstate.mb_h - 1);
     let expected_mb = dst_mb_x + dst_mb_y * sstate.mb_w;