-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterpolation.h
48 lines (29 loc) · 1.25 KB
/
interpolation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef INTERPOLATION_H
#define INTERPOLATION_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct DoubleComplex {
double real;
double imaginary;
} DoubleComplex;
double calcDistance(double width);
double calcSphrShift(double index, double width);
double calcInterpShift(double index, double width);
double calcSphrSample(double x);
double calcResolutionShift(double index, double width);
int calcRelativeIndex(double x, double width);
void interpolateKernel(DoubleComplex *source, DoubleComplex *destination,
int resolutionSupport, int textureSupport);
void getBicubicNeighbours(double rowShift, double colShift, DoubleComplex *n,
double *rs, double *cs, int sourceSupport, DoubleComplex *source);
DoubleComplex interpolateCubicSample(DoubleComplex z0, DoubleComplex z1,
DoubleComplex z2, DoubleComplex z3, double x0, double x1, double x2,
double x3, double h, double x);
void printMatrix(DoubleComplex *matrix, int support);
DoubleComplex complexScale(DoubleComplex z, double scalar);
DoubleComplex complexAdd(DoubleComplex z0, DoubleComplex z1);
#ifdef __cplusplus
}
#endif
#endif /* INTERPOLATION_H */