Skip to content

Commit

Permalink
fn padding: Reassign p, lpf args rather than mutating them.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkysen committed Jul 25, 2023
1 parent 2be84c6 commit 83ba721
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/looprestoration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ const REST_UNIT_STRIDE: usize = 390;
#[inline(never)]
pub(crate) unsafe fn padding<BD: BitDepth>(
dst: &mut [BD::Pixel; 70 /*(64 + 3 + 3)*/ * REST_UNIT_STRIDE],
mut p: *const BD::Pixel,
p: *const BD::Pixel,
stride: usize,
mut left: *const [BD::Pixel; 4],
mut lpf: *const BD::Pixel,
lpf: *const BD::Pixel,
unit_w: usize,
stripe_h: usize,
edges: LrEdgeFlags,
Expand All @@ -172,8 +172,8 @@ pub(crate) unsafe fn padding<BD: BitDepth>(
// Copy more pixels if we don't have to pad them
let unit_w = unit_w + have_left_3 + have_right_3;
let dst_l = &mut dst[3 - have_left_3..];
p = p.offset(-(have_left_3 as isize));
lpf = lpf.offset(-(have_left_3 as isize));
let p = p.offset(-(have_left_3 as isize));
let lpf = lpf.offset(-(have_left_3 as isize));

if have_top {
// Copy previous loop filtered rows
Expand Down

0 comments on commit 83ba721

Please sign in to comment.