Debian Codegraph @

imagery/i.ortho.photo/i.ortho.rectify/defs.h

raw symbols SCIP
1 /* cache for raster data, code taken from r.proj */
2
3 /* These next defines determine the size of the sub-window that will
4 * be held in memory. Larger values will require
5 * more memory (but less i/o) If you increase these values, keep in
6 * mind that although you think the i/o will decrease, system paging
7 * (which goes on behind the scenes) may actual increase the i/o.
8 */
9
10 #define L2BDIM 6
11 #define BDIM (1 << (L2BDIM))
12 #define L2BSIZE (2 * (L2BDIM))
13 #define BSIZE (1 << (L2BSIZE))
14 #define HI(i) ((i) >> (L2BDIM))
15 #define LO(i) ((i) & ((BDIM) - 1))
16
17 typedef DCELL block[BDIM][BDIM]; /* FCELL sufficient ? */
18
19 struct cache {
20 int fd;
21 int stride;
22 int nblocks;
23 block **grid;
24 block *blocks;
25 int *refs;
26 };
27
28 typedef void (*func)(struct cache *, void *, int, double *, double *,
29 struct Cell_head *);
30
31 #define BKIDX(c, y, x) ((y) * (c)->stride + (x))
32 #define BKPTR(c, y, x) ((c)->grid[BKIDX((c), (y), (x))])
33 #define BLOCK(c, y, x) \
34 (BKPTR((c), (y), (x)) ? BKPTR((c), (y), (x)) \
35 : get_block((c), BKIDX((c), (y), (x))))
36 #define CPTR(c, y, x) (&(*BLOCK((c), HI((y)), HI((x))))[LO((y))][LO((x))])
37
38 struct menu {
39 func method; /* routine to interpolate new value */
40 char *name; /* method name */
41 char *text; /* menu display - full description */
42 };