16 |
|
* |
17 |
|
* See the ranimove(1) man page for further details. |
18 |
|
*/ |
19 |
+ |
#ifndef _RAD_RANIMOVE_H_ |
20 |
+ |
#define _RAD_RANIMOVE_H_ |
21 |
|
|
22 |
|
#include "ray.h" |
23 |
|
#include "view.h" |
24 |
|
#include "vars.h" |
25 |
+ |
|
26 |
+ |
#ifdef __cplusplus |
27 |
+ |
extern "C" { |
28 |
+ |
#endif |
29 |
+ |
|
30 |
|
/* input variables (alphabetical by name) */ |
31 |
|
#define BASENAME 0 /* output image base name */ |
32 |
|
#define END 1 /* number of animation frames */ |
34 |
|
#define HIGHQ 3 /* high quality setting */ |
35 |
|
#define LOWQ 4 /* low quality setting */ |
36 |
|
#define MBLUR 5 /* motion blur parameter */ |
37 |
< |
#define MOVE 6 /* object movement */ |
38 |
< |
#define OCONV 7 /* oconv options */ |
39 |
< |
#define OCTREEF 8 /* octree file name */ |
40 |
< |
#define RATE 9 /* frame rate (fps) */ |
41 |
< |
#define RESOLUTION 10 /* desired final resolution */ |
42 |
< |
#define RIF 11 /* rad input file */ |
43 |
< |
#define VIEWFILE 12 /* animation frame views */ |
37 |
> |
#define MNAME 6 /* motion vector file */ |
38 |
> |
#define MOVE 7 /* object movement */ |
39 |
> |
#define OCONV 8 /* oconv options */ |
40 |
> |
#define OCTREEF 9 /* octree file name */ |
41 |
> |
#define RATE 10 /* frame rate (fps) */ |
42 |
> |
#define RESOLUTION 11 /* desired final resolution */ |
43 |
> |
#define RIF 12 /* rad input file */ |
44 |
> |
#define VIEWFILE 13 /* animation frame views */ |
45 |
> |
#define ZNAME 14 /* depth file */ |
46 |
|
|
47 |
< |
#define NV_INIT 13 /* number of variables */ |
47 |
> |
#define NV_INIT 15 /* number of variables */ |
48 |
|
|
49 |
|
#define VV_INIT { \ |
50 |
|
{"BASENAME", 3, 0, NULL, onevalue}, \ |
53 |
|
{"highq", 2, 0, NULL, catvalues}, \ |
54 |
|
{"lowq", 2, 0, NULL, catvalues}, \ |
55 |
|
{"MBLUR", 2, 0, NULL, fltvalue}, \ |
56 |
+ |
{"MNAME", 2, 0, NULL, onevalue}, \ |
57 |
|
{"move", 2, 0, NULL, NULL}, \ |
58 |
|
{"oconv", 2, 0, NULL, catvalues}, \ |
59 |
|
{"OCTREE", 3, 0, NULL, onevalue}, \ |
60 |
|
{"RATE", 2, 0, NULL, fltvalue}, \ |
61 |
|
{"RESOLUTION", 3, 0, NULL, onevalue}, \ |
62 |
|
{"RIF", 3, 0, NULL, onevalue}, \ |
63 |
< |
{"VIEWFILE", 2, 0, NULL, onevalue} \ |
63 |
> |
{"VIEWFILE", 2, 0, NULL, onevalue}, \ |
64 |
> |
{"ZNAME", 2, 0, NULL, onevalue} \ |
65 |
|
} |
66 |
|
|
67 |
|
struct ObjMove { |
113 |
|
extern int gargc; /* global argc for printargs */ |
114 |
|
extern char **gargv; /* global argv for printargs */ |
115 |
|
|
105 |
– |
VIEW *getview(); |
106 |
– |
int countviews(); |
107 |
– |
int getmove(); |
108 |
– |
char *getexp(), *getoctspec(), *getobjname(), *getxf(); |
109 |
– |
double expspec_val(), obj_prio(); |
110 |
– |
void setdefaults(), setmove(), animate(), getradfile(), setrendparams(); |
111 |
– |
void init_frame(), filter_frame(), send_frame(), free_frame(); |
112 |
– |
int refine_frame(); |
113 |
– |
double getTime(); |
114 |
– |
|
116 |
|
/************************************************************************* |
117 |
|
* Frame rendering stuff (defined in ranimove1.c and ranimove2.c) |
118 |
|
*/ |
134 |
|
extern OBJECT *obuffer; /* object id at each pixel */ |
135 |
|
extern short *xmbuffer; /* x motion at each pixel */ |
136 |
|
extern short *ymbuffer; /* y motion at each pixel */ |
137 |
< |
extern BYTE *abuffer; /* accuracy at each pixel */ |
138 |
< |
extern BYTE *sbuffer; /* sample count per pixel */ |
137 |
> |
extern uby8 *abuffer; /* accuracy at each pixel */ |
138 |
> |
extern uby8 *sbuffer; /* sample count per pixel */ |
139 |
|
|
140 |
|
extern VIEW vwprev; /* last frame's view */ |
141 |
|
extern COLOR *cprev; /* last frame colors */ |
142 |
|
extern float *zprev; /* last frame depth */ |
143 |
|
extern OBJECT *oprev; /* last frame objects */ |
144 |
< |
extern BYTE *aprev; /* last frame accuracy */ |
144 |
> |
extern uby8 *aprev; /* last frame accuracy */ |
145 |
|
|
146 |
|
extern float *cerrmap; /* conspicuous error map */ |
147 |
|
extern int cerrzero; /* is all of cerrmap zero? */ |
172 |
|
|
173 |
|
#define ATIDIFF 7 /* error difference for time extrapolation */ |
174 |
|
|
175 |
< |
void write_map(), sample_pos(), comp_frame_error(), conspicuity(); |
176 |
< |
int getclosest(), getambcolor(), refine_first(); |
177 |
< |
double sample_wt(), estimaterr(), comperr(); |
175 |
> |
/* ranimove1.c */ |
176 |
> |
extern void init_frame(void); |
177 |
> |
extern void filter_frame(void); |
178 |
> |
extern void send_frame(void); |
179 |
> |
extern void free_frame(void); |
180 |
> |
extern void write_map(float *mp, char *fn); |
181 |
> |
extern void sample_pos(double hv[2], int x, int y, int sn); |
182 |
> |
extern void comp_frame_error(void); |
183 |
> |
extern int getclosest(int *iarr, int nc, int x, int y); |
184 |
> |
extern int getambcolor(COLOR clr, int obj); |
185 |
> |
extern double sample_wt(int xo, int yo); |
186 |
> |
extern double estimaterr(COLOR cs, COLOR cs2, int ns, int ns0); |
187 |
> |
extern double comperr(int *neigh, int nc, int ns0); |
188 |
> |
|
189 |
> |
/* ranimove2.c */ |
190 |
> |
extern int refine_first(); |
191 |
> |
extern void conspicuity(void); |
192 |
> |
extern int refine_frame(int pass); |
193 |
> |
|
194 |
> |
/* ranimove.c */ |
195 |
> |
extern double getTime(void); |
196 |
> |
extern double obj_prio(OBJECT obj); |
197 |
> |
extern int getmove(OBJECT obj); |
198 |
> |
extern char * getoctspec(int n); |
199 |
> |
extern double expspec_val(char *s); |
200 |
> |
extern char *getexp(int n); /* XXX partly duplicated function */ |
201 |
> |
extern VIEW *getview(int n); /* XXX duplicated function */ |
202 |
> |
double getTime(); |
203 |
> |
/* |
204 |
> |
int countviews(); |
205 |
> |
void setdefaults(), |
206 |
> |
void setmove(), |
207 |
> |
setrendparams(); |
208 |
> |
getradfile(), |
209 |
> |
animate(), |
210 |
> |
*/ |
211 |
> |
|
212 |
> |
#ifdef __cplusplus |
213 |
> |
} |
214 |
> |
#endif |
215 |
> |
#endif /* _RAD_RANIMOVE_H_ */ |
216 |
> |
|