Correct shrink calc, regression introduced in e398b47 #831

This commit is contained in:
Lovell Fuller
2017-05-30 17:16:41 +01:00
parent c879df3b31
commit 9e39a7fa95
3 changed files with 18 additions and 1 deletions

View File

@@ -288,7 +288,7 @@ class PipelineWorker : public Nan::AsyncWorker {
}
}
// Help ensure a final kernel-based reduction to prevent shrink aliasing
if ((xshrink > 1 || yshrink > 1) && (xresidual == 1.0 || yresidual == 1.0)) {
if (xshrink > 1 && yshrink > 1 && (xresidual == 1.0 || yresidual == 1.0)) {
xshrink = xshrink / 2;
yshrink = yshrink / 2;
xresidual = xresidual / 2.0;