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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*@@
@header ioJpegGH.h
@date Thu 18 April 2002
@author Thomas Radke
@desc
The extensions to the GH structure from IOJpeg.
@enddesc
@version $Header$
@@*/
#ifndef IOJPEG_IOJPEGGH_H_
#define IOJPEG_IOJPEGGH_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
typedef struct IOJpegGH
{
/* default number of times to output */
int out_every_default;
/* number of times to output every variable */
CCTK_INT *out_every;
/* the last iteration output for every variable */
int *out_last;
/* list of variables to output */
char *out_vars;
/* directories in which to output */
char *out_dir;
/* for 2D planes, we define the index where to locate the plane
sp2xyz[maxdim][perpendicular direction] */
int **sp2xyz;
} ioJpegGH;
/* prototypes of functions to be registered as I/O method */
int IOJpeg_OutputGH (const cGH *GH);
int IOJpeg_OutputVarAs (const cGH *GH, const char *fullname, const char *alias);
int IOJpeg_TimeFor (const cGH *GH, int vindex);
int IOJpeg_TriggerOutput (const cGH *GH, int vindex);
/* other function prototypes */
int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias);
/* routines called from JPEG.c */
int WriteJPEGToFileRGB (int nx, int ny, void *data, int Quality, FILE* outfile);
int WriteJPEGToMemoryRGB (int nx, int ny, void *data, int Quality, char *buffer,
int buffersize);
void AutoColorDataSlice (int nx, int ny, const CCTK_REAL *datain,
unsigned char *dataout, CCTK_REAL min, CCTK_REAL max,
CCTK_REAL bias, int rdfac);
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* IOJPEG_IOJPEGGH_H_ */
|