27 #define M_PI 3.14159265358979323846264338327950288
44 const double sigma0 = 100.0 /
M_PI;
48 {85, 61, 44, 30, 16}};
50 {{0.1618f, 0.5502f, 0.9495f, 0, 0},
51 {0.0976f, 0.3376f, 0.6700f, 0.9649f, 0},
52 {0.0739f, 0.2534f, 0.5031f, 0.7596f, 0.9738f}};
61 for (k = 0, sum = 0; k < K; ++k)
63 c->
radii[k] = (long)(radii0[i][k] * (sigma / sigma0) + 0.5);
64 sum += weights0[i][k] * (2 * c->
radii[k] + 1);
67 for (k = 0; k < K; ++k)
86 long pad = c.
radii[0] + 1;
109 const num *src,
long N,
long stride)
115 assert(dest && buffer && src && dest != buffer && src != buffer
116 && N > 0 && stride != 0);
118 pad = c.
radii[0] + 1;
122 for (n = -pad, accum = 0; n < N + pad; ++n)
129 for (n = 0; n < N; ++n, dest += stride)
132 - buffer[n - c.
radii[0] - 1]);
134 for (k = 1; k < c.
K; ++k)
136 - buffer[n - c.
radii[k] - 1]);
163 const num *src,
int width,
int height,
int num_channels)
165 long num_pixels = ((long)width) * ((long)height);
168 assert(dest && buffer && src && num_pixels > 0);
171 for (channel = 0; channel < num_channels; ++channel)
174 const num *src_y = src;
177 for (y = 0; y < height; ++y)
180 dest_y, buffer, src_y, width, 1);
186 for (x = 0; x < width; ++x)
188 dest + x, buffer, dest + x, height, width);