int cnvY(int k, int off, int d, function* pGetf, int x, int y, int z)
The integer result obtained by summing the products of the n kernel coefficients with n image pixels in the Y direction, and dividing the sum by 'd'.
Applies a 1-D convolution to the image in the vertical / y direction. That is, cnvY convolves pixels at co-these ordinates:
(x,y-k), (x,y-k+1), ... (x,y-1), (x,y), (x,y+1), ... (x,y+k-1), (x,y+k)
%fml // 3-pixel radius blur in the y-direction ForEveryTile: { // Convolution coefficients // in first 7 cells put(1, 0); put(2, 1); put(3, 2); put(4, 3); put(3, 4); put(2, 5); put(1, 6); int val; for (z = 0; z < 3; z++) { for (y = y_start; y < y_end; y++) { for (x = x_start; x < x_end; x++) { val = cnvY(3, 0, 16, src, x, y, z); pset(x, y, z, val); } } } return true; }