blur: usage of width_sub_radius

This commit is contained in:
Simon Gardling 2025-03-31 15:32:24 -04:00
parent b6fbc99dac
commit 9199791f51
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -67,7 +67,7 @@ impl Blur {
.for_each(|(src_row, dst_row)| {
// First we build a value for the beginning of each row. We assume periodic boundary conditions, so we need to push the left index to the opposite side of the row.
let width_sub_radius = width - radius;
let mut value = src_row[width - radius - 1];
let mut value = src_row[width_sub_radius - 1];
for j in 0..radius {
value += src_row[width_sub_radius + j] + src_row[j];
}