]> git.nihav.org Git - nihav.git/commitdiff
core/scale: fix typos in scaling loop
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 16 Jun 2023 16:08:04 +0000 (18:08 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 16 Jun 2023 16:08:04 +0000 (18:08 +0200)
nihav-core/src/scale/scale/mod.rs

index 0a62e0f442550d38bd13967e89f87da363fb867c..ae39ef33de2f1efb6bfadacb8d92fac0da5f0a13 100644 (file)
@@ -294,11 +294,11 @@ macro_rules! scale_loop {
                         }
                     }
                     let resizer = &mut $scalers[idx].1;
-                    for (dline, sline) in $tbuf.chunks_mut(tstride).zip(src[ioff..].chunks(istride)).take(dh) {
+                    for (dline, sline) in $tbuf.chunks_mut(tstride).zip(src[ioff..].chunks(istride)).take(sh) {
                         resizer.resize_line(sline, sw, 1, dline, dw, 1);
                     }
                 } else {
-                    for (dline, sline) in $tbuf.chunks_mut(tstride).zip(src[ioff..].chunks(istride)).take(dh) {
+                    for (dline, sline) in $tbuf.chunks_mut(tstride).zip(src[ioff..].chunks(istride)).take(sh) {
                         dline[..dw].copy_from_slice(&sline[..sw]);
                     }
                 }