aboutsummaryrefslogtreecommitdiff
path: root/src/ioJpegGH.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ioJpegGH.h')
-rw-r--r--src/ioJpegGH.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/ioJpegGH.h b/src/ioJpegGH.h
new file mode 100644
index 0000000..d9ee66f
--- /dev/null
+++ b/src/ioJpegGH.h
@@ -0,0 +1,65 @@
+ /*@@
+ @header ioJpegGH.h
+ @date Thu 18 April 2002
+ @author Thomas Radke
+ @desc
+ The extensions to the GH structure from IOJpeg.
+ @version $Header$
+ @@*/
+
+#ifndef IOJPEG_IOJPEGGH_H_
+#define IOJPEG_IOJPEGGH_H_ 1
+
+#include "StoreNamedData.h"
+
+#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 */
+ 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 *outdir;
+
+ /* 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);
+int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias);
+
+/* other function prototypes */
+int IOJpeg_Write (const cGH *GH, 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_ */