Skip to content

Commit

Permalink
fn inv_txfm_add_{,wht_wht_4x4_}rust: Remove 2nd c var.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkysen committed May 7, 2024
1 parent 1f4bdcd commit 1887a26
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/itx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,9 @@ pub unsafe fn inv_txfm_add_rust<
);
}

let mut c = &tmp[..];
for _ in 0..H {
for y in 0..H {
for x in 0..W {
*dst.add(x) = bd.iclip_pixel((*dst.add(x)).as_::<c_int>() + (c[0] + 8 >> 4));
c = &c[1..];
*dst.add(x) = bd.iclip_pixel((*dst.add(x)).as_::<c_int>() + (tmp[y * W + x] + 8 >> 4));
}
dst = dst.offset(BD::pxstride(stride));
}
Expand Down Expand Up @@ -486,11 +484,9 @@ unsafe fn inv_txfm_add_wht_wht_4x4_rust<BD: BitDepth>(
dav1d_inv_wht4_1d_c(tmp[x..].as_mut_ptr(), H as isize);
}

let mut c = &tmp[..];
for _ in 0..H {
for y in 0..H {
for x in 0..W {
*dst.add(x) = bd.iclip_pixel((*dst.add(x)).as_::<c_int>() + c[0]);
c = &c[1..];
*dst.add(x) = bd.iclip_pixel((*dst.add(x)).as_::<c_int>() + tmp[y * W + x]);
}
dst = dst.offset(BD::pxstride(stride));
}
Expand Down

0 comments on commit 1887a26

Please sign in to comment.