truncate zero coefficients

This commit is contained in:
homm 2016-07-02 18:24:08 +03:00
parent 36362c0723
commit 39a46ca4f3

View File

@ -159,6 +159,16 @@ ImagingPrecompute(int inSize, int outSize, struct filter *filterp,
k = &kk[xx * kmax];
for (x = 0; x < xmax; x++) {
double w = filterp->filter((x + xmin - center + 0.5) * ss);
if (w == 0) {
if (x == 0) {
x -= 1;
xmin += 1;
xmax -= 1;
} else if (x == xmax - 1) {
xmax -= 1;
}
continue;
}
k[x] = w;
ww += w;
}