|
@@ -71,18 +71,24 @@ pipi_image_t *pipi_gaussian_blur_ext(pipi_image_t *src, float rx, float ry, |
|
|
{ |
|
|
{ |
|
|
for(i = -krx; i <= krx; i++) |
|
|
for(i = -krx; i <= krx; i++) |
|
|
{ |
|
|
{ |
|
|
|
|
|
/* FIXME: this level of interpolation sucks. We should |
|
|
|
|
|
* interpolate on the full NxN grid for better quality. */ |
|
|
static double const samples[] = |
|
|
static double const samples[] = |
|
|
{ |
|
|
{ |
|
|
-.50, -.50, 0.5, |
|
|
|
|
|
.50, -.50, 0.5, |
|
|
|
|
|
.0, .0, 1, |
|
|
.0, .0, 1, |
|
|
-.50, .50, 0.5, |
|
|
|
|
|
.50, .50, 0.5 |
|
|
|
|
|
|
|
|
-.40, -.40, 0.8, |
|
|
|
|
|
-.30, .0, 0.9, |
|
|
|
|
|
-.40, .40, 0.8, |
|
|
|
|
|
.0, .30, 0.9, |
|
|
|
|
|
.40, .40, 0.8, |
|
|
|
|
|
.30, .0, 0.9, |
|
|
|
|
|
.40, -.40, 0.8, |
|
|
|
|
|
.0, -.30, 0.9, |
|
|
}; |
|
|
}; |
|
|
double u, v, ex, ey, d = 0.; |
|
|
double u, v, ex, ey, d = 0.; |
|
|
int k; |
|
|
|
|
|
|
|
|
unsigned int k; |
|
|
|
|
|
|
|
|
for(k = 0; k < 5; k++) |
|
|
|
|
|
|
|
|
for(k = 0; k < sizeof(samples) / sizeof(*samples) / 3; k++) |
|
|
{ |
|
|
{ |
|
|
u = ((double)i + samples[k * 3]) * cost |
|
|
u = ((double)i + samples[k * 3]) * cost |
|
|
- ((double)j + samples[k * 3 + 1]) * sint + dx; |
|
|
- ((double)j + samples[k * 3 + 1]) * sint + dx; |
|
|