- /* Filter rightwards */
- for (x = 1; x < width; x++)
- ptr[x] += nu * ptr[x - 1];
+static void do_vertical_columns(float *buffer, int width, int height,
+ int column_begin, int column_end, int steps,
+ float nu, float boundaryscale, int column_step)
+{
+ const int numpixels = width * height;
+ int i, x, k, step;
+ float *ptr;
+ for (x = column_begin; x < column_end;) {
+ for (step = 0; step < steps; step++) {
+ ptr = buffer + x;
+ for (k = 0; k < column_step; k++) {
+ ptr[k] *= boundaryscale;
+ }
+ /* Filter downwards */
+ for (i = width; i < numpixels; i += width) {
+ for (k = 0; k < column_step; k++) {
+ ptr[i + k] += nu * ptr[i - width + k];
+ }
+ }
+ i = numpixels - width;