70 for (n = 0; n <
N; n++)
75 for (n = 0; n <
N; n++)
76 lut[n] = 1.-
fabs((n-(
N-1)/2.)/((
N-1)/2.));
80 for (n = 0; n <
N; n++)
81 lut[n] = .5*(1-cos(2*
M_PI*n/(
N-1)));
85 for (n = 0; n <
N; n++)
86 lut[n] = .54-.46*cos(2*
M_PI*n/(
N-1));
90 for (n = 0; n <
N; n++)
91 lut[n] = .42659-.49656*cos(2*
M_PI*n/(
N-1))+.076849*cos(4*
M_PI*n/(
N-1));
95 for (n = 0; n <
N; n++)
96 lut[n] = 1.-(n-(
N-1)/2.)/((
N-1)/2.)*(n-(
N-1)/2.)/((
N-1)/2.);
100 for (n = 0; n <
N; n++)
101 lut[n] = 1.-1.985844164102*cos( 2*
M_PI*n/(
N-1))+1.791176438506*cos( 4*
M_PI*n/(
N-1))-
102 1.282075284005*cos( 6*
M_PI*n/(
N-1))+0.667777530266*cos( 8*
M_PI*n/(
N-1))-
103 0.240160796576*cos(10*
M_PI*n/(
N-1))+0.056656381764*cos(12*
M_PI*n/(
N-1))-
104 0.008134974479*cos(14*
M_PI*n/(
N-1))+0.000624544650*cos(16*
M_PI*n/(
N-1))-
105 0.000019808998*cos(18*
M_PI*n/(
N-1))+0.000000132974*cos(20*
M_PI*n/(
N-1));
109 for (n = 0; n <
N; n++)
110 lut[n] = 0.35875-0.48829*cos(2*
M_PI*n/(
N-1))+0.14128*cos(4*
M_PI*n/(
N-1))-0.01168*cos(6*
M_PI*n/(
N-1));
114 for (n = 0; n <
N; n++)
115 lut[n] = 0.3635819-0.4891775*cos(2*
M_PI*n/(
N-1))+0.1365995*cos(4*
M_PI*n/(
N-1))-0.0106411*cos(6*
M_PI*n/(
N-1));
119 for (n = 0; n <
N; n++)
120 lut[n] = 0.62-0.48*
fabs(n/(
double)(
N-1)-.5)-0.38*cos(2*
M_PI*n/(
N-1));
124 for (n = 0; n <
N; n++)
125 lut[n] = sin(
M_PI*n/(
N-1));
129 for (n = 0; n <
N; n++)
130 lut[n] = 0.355768-0.487396*cos(2*
M_PI*n/(
N-1))+0.144232*cos(4*
M_PI*n/(
N-1))-0.012604*cos(6*
M_PI*n/(
N-1));
134 #define SINC(x) (!(x)) ? 1 : sin(M_PI * (x))/(M_PI * (x));
135 for (n = 0; n <
N; n++)
136 lut[n] =
SINC((2.*n)/(
N-1)-1);
140 #define SQR(x) ((x)*(x))
141 for (n = 0; n <
N; n++)
142 lut[n] =
exp(-0.5 *
SQR((n-(
N-1)/2)/(0.4*(
N-1)/2.f)));
146 for (n = 0; n <
N; n++) {
150 lut[n] = 0.5 * (1 + cos((
M_PI*(
FFABS(n -
M) - 0.3 *
M))/((1 - 0.3) *
M)));
158 double b = cosh(7.6009022095419887 / (
N-1)), sum, t,
c, norm = 0;
160 for (
c = 1 - 1 / (
b*
b), n = (
N-1) / 2; n >= 0; --n) {
161 for (sum = !n,
b = t = j = 1; j <= n && sum != t;
b *= (n-j) * (1./j), ++j)
162 t = sum, sum += (
b *=
c * (
N - n - j) * (1./j));
163 sum /= (
N - 1 - n), norm = norm ? norm : sum, sum /= norm;
165 lut[
N - 1 - n] = sum;
170 for (n = 0; n <
N; n++) {
171 double x = 2 * ((n / (
double)(
N - 1)) - .5);
173 if (x <= -.5 || x >= .5) {
182 for (n = 0; n <
N; n++) {
183 double x = 2 * ((n / (
double)(
N - 1)) - .5);
185 if (x > 0.25 && x <= 0.5) {
186 lut[n] = -2 *
powf(-1 + 2 * x, 3);
187 }
else if (x >= -.5 && x < -.25) {
188 lut[n] = 2 *
powf(1 + 2 * x, 3);
189 }
else if (x >= -.25 && x < 0) {
190 lut[n] = 1 - 24 * x * x - 48 * x * x * x;
191 }
else if (x >= 0 && x <= .25) {
192 lut[n] = 1 - 24 * x * x + 48 * x * x * x;
200 for (n = 0; n <
N; n++) {
201 double x = 2 * ((n / (
double)(
N - 1)) - .5);
203 if (x >= 0 && x <= .5) {
205 }
else if (x < 0 && x >= -.5) {
214 for (n = 0; n <
N; n++) {
215 double x = 2 * ((n / (
double)(
N - 1))) - 1.;
224 for (n = 0; n <
N; n++) {
225 double x = 2.0 / (
double)(
N - 1);
static void scale(int *out, const int *in, const int w, const int h, const int shift)