diff options
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cdjpeg.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cdjpeg.h | 374 |
1 files changed, 187 insertions, 187 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cdjpeg.h b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cdjpeg.h index c0d064c..ed024ac 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cdjpeg.h +++ b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cdjpeg.h | |||
@@ -1,187 +1,187 @@ | |||
1 | /* | 1 | /* |
2 | * cdjpeg.h | 2 | * cdjpeg.h |
3 | * | 3 | * |
4 | * Copyright (C) 1994-1997, Thomas G. Lane. | 4 | * Copyright (C) 1994-1997, Thomas G. Lane. |
5 | * This file is part of the Independent JPEG Group's software. | 5 | * This file is part of the Independent JPEG Group's software. |
6 | * For conditions of distribution and use, see the accompanying README file. | 6 | * For conditions of distribution and use, see the accompanying README file. |
7 | * | 7 | * |
8 | * This file contains common declarations for the sample applications | 8 | * This file contains common declarations for the sample applications |
9 | * cjpeg and djpeg. It is NOT used by the core JPEG library. | 9 | * cjpeg and djpeg. It is NOT used by the core JPEG library. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ | 12 | #define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ |
13 | #define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ | 13 | #define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ |
14 | #include "jinclude.h" | 14 | #include "jinclude.h" |
15 | #include "jpeglib.h" | 15 | #include "jpeglib.h" |
16 | #include "jerror.h" /* get library error codes too */ | 16 | #include "jerror.h" /* get library error codes too */ |
17 | #include "cderror.h" /* get application-specific error codes */ | 17 | #include "cderror.h" /* get application-specific error codes */ |
18 | 18 | ||
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Object interface for cjpeg's source file decoding modules | 21 | * Object interface for cjpeg's source file decoding modules |
22 | */ | 22 | */ |
23 | 23 | ||
24 | typedef struct cjpeg_source_struct * cjpeg_source_ptr; | 24 | typedef struct cjpeg_source_struct * cjpeg_source_ptr; |
25 | 25 | ||
26 | struct cjpeg_source_struct { | 26 | struct cjpeg_source_struct { |
27 | JMETHOD(void, start_input, (j_compress_ptr cinfo, | 27 | JMETHOD(void, start_input, (j_compress_ptr cinfo, |
28 | cjpeg_source_ptr sinfo)); | 28 | cjpeg_source_ptr sinfo)); |
29 | JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, | 29 | JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, |
30 | cjpeg_source_ptr sinfo)); | 30 | cjpeg_source_ptr sinfo)); |
31 | JMETHOD(void, finish_input, (j_compress_ptr cinfo, | 31 | JMETHOD(void, finish_input, (j_compress_ptr cinfo, |
32 | cjpeg_source_ptr sinfo)); | 32 | cjpeg_source_ptr sinfo)); |
33 | 33 | ||
34 | FILE *input_file; | 34 | FILE *input_file; |
35 | 35 | ||
36 | JSAMPARRAY buffer; | 36 | JSAMPARRAY buffer; |
37 | JDIMENSION buffer_height; | 37 | JDIMENSION buffer_height; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | 40 | ||
41 | /* | 41 | /* |
42 | * Object interface for djpeg's output file encoding modules | 42 | * Object interface for djpeg's output file encoding modules |
43 | */ | 43 | */ |
44 | 44 | ||
45 | typedef struct djpeg_dest_struct * djpeg_dest_ptr; | 45 | typedef struct djpeg_dest_struct * djpeg_dest_ptr; |
46 | 46 | ||
47 | struct djpeg_dest_struct { | 47 | struct djpeg_dest_struct { |
48 | /* start_output is called after jpeg_start_decompress finishes. | 48 | /* start_output is called after jpeg_start_decompress finishes. |
49 | * The color map will be ready at this time, if one is needed. | 49 | * The color map will be ready at this time, if one is needed. |
50 | */ | 50 | */ |
51 | JMETHOD(void, start_output, (j_decompress_ptr cinfo, | 51 | JMETHOD(void, start_output, (j_decompress_ptr cinfo, |
52 | djpeg_dest_ptr dinfo)); | 52 | djpeg_dest_ptr dinfo)); |
53 | /* Emit the specified number of pixel rows from the buffer. */ | 53 | /* Emit the specified number of pixel rows from the buffer. */ |
54 | JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, | 54 | JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, |
55 | djpeg_dest_ptr dinfo, | 55 | djpeg_dest_ptr dinfo, |
56 | JDIMENSION rows_supplied)); | 56 | JDIMENSION rows_supplied)); |
57 | /* Finish up at the end of the image. */ | 57 | /* Finish up at the end of the image. */ |
58 | JMETHOD(void, finish_output, (j_decompress_ptr cinfo, | 58 | JMETHOD(void, finish_output, (j_decompress_ptr cinfo, |
59 | djpeg_dest_ptr dinfo)); | 59 | djpeg_dest_ptr dinfo)); |
60 | 60 | ||
61 | /* Target file spec; filled in by djpeg.c after object is created. */ | 61 | /* Target file spec; filled in by djpeg.c after object is created. */ |
62 | FILE * output_file; | 62 | FILE * output_file; |
63 | 63 | ||
64 | /* Output pixel-row buffer. Created by module init or start_output. | 64 | /* Output pixel-row buffer. Created by module init or start_output. |
65 | * Width is cinfo->output_width * cinfo->output_components; | 65 | * Width is cinfo->output_width * cinfo->output_components; |
66 | * height is buffer_height. | 66 | * height is buffer_height. |
67 | */ | 67 | */ |
68 | JSAMPARRAY buffer; | 68 | JSAMPARRAY buffer; |
69 | JDIMENSION buffer_height; | 69 | JDIMENSION buffer_height; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | 72 | ||
73 | /* | 73 | /* |
74 | * cjpeg/djpeg may need to perform extra passes to convert to or from | 74 | * cjpeg/djpeg may need to perform extra passes to convert to or from |
75 | * the source/destination file format. The JPEG library does not know | 75 | * the source/destination file format. The JPEG library does not know |
76 | * about these passes, but we'd like them to be counted by the progress | 76 | * about these passes, but we'd like them to be counted by the progress |
77 | * monitor. We use an expanded progress monitor object to hold the | 77 | * monitor. We use an expanded progress monitor object to hold the |
78 | * additional pass count. | 78 | * additional pass count. |
79 | */ | 79 | */ |
80 | 80 | ||
81 | struct cdjpeg_progress_mgr { | 81 | struct cdjpeg_progress_mgr { |
82 | struct jpeg_progress_mgr pub; /* fields known to JPEG library */ | 82 | struct jpeg_progress_mgr pub; /* fields known to JPEG library */ |
83 | int completed_extra_passes; /* extra passes completed */ | 83 | int completed_extra_passes; /* extra passes completed */ |
84 | int total_extra_passes; /* total extra */ | 84 | int total_extra_passes; /* total extra */ |
85 | /* last printed percentage stored here to avoid multiple printouts */ | 85 | /* last printed percentage stored here to avoid multiple printouts */ |
86 | int percent_done; | 86 | int percent_done; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | typedef struct cdjpeg_progress_mgr * cd_progress_ptr; | 89 | typedef struct cdjpeg_progress_mgr * cd_progress_ptr; |
90 | 90 | ||
91 | 91 | ||
92 | /* Short forms of external names for systems with brain-damaged linkers. */ | 92 | /* Short forms of external names for systems with brain-damaged linkers. */ |
93 | 93 | ||
94 | #ifdef NEED_SHORT_EXTERNAL_NAMES | 94 | #ifdef NEED_SHORT_EXTERNAL_NAMES |
95 | #define jinit_read_bmp jIRdBMP | 95 | #define jinit_read_bmp jIRdBMP |
96 | #define jinit_write_bmp jIWrBMP | 96 | #define jinit_write_bmp jIWrBMP |
97 | #define jinit_read_gif jIRdGIF | 97 | #define jinit_read_gif jIRdGIF |
98 | #define jinit_write_gif jIWrGIF | 98 | #define jinit_write_gif jIWrGIF |
99 | #define jinit_read_ppm jIRdPPM | 99 | #define jinit_read_ppm jIRdPPM |
100 | #define jinit_write_ppm jIWrPPM | 100 | #define jinit_write_ppm jIWrPPM |
101 | #define jinit_read_rle jIRdRLE | 101 | #define jinit_read_rle jIRdRLE |
102 | #define jinit_write_rle jIWrRLE | 102 | #define jinit_write_rle jIWrRLE |
103 | #define jinit_read_targa jIRdTarga | 103 | #define jinit_read_targa jIRdTarga |
104 | #define jinit_write_targa jIWrTarga | 104 | #define jinit_write_targa jIWrTarga |
105 | #define read_quant_tables RdQTables | 105 | #define read_quant_tables RdQTables |
106 | #define read_scan_script RdScnScript | 106 | #define read_scan_script RdScnScript |
107 | #define set_quality_ratings SetQRates | 107 | #define set_quality_ratings SetQRates |
108 | #define set_quant_slots SetQSlots | 108 | #define set_quant_slots SetQSlots |
109 | #define set_sample_factors SetSFacts | 109 | #define set_sample_factors SetSFacts |
110 | #define read_color_map RdCMap | 110 | #define read_color_map RdCMap |
111 | #define enable_signal_catcher EnSigCatcher | 111 | #define enable_signal_catcher EnSigCatcher |
112 | #define start_progress_monitor StProgMon | 112 | #define start_progress_monitor StProgMon |
113 | #define end_progress_monitor EnProgMon | 113 | #define end_progress_monitor EnProgMon |
114 | #define read_stdin RdStdin | 114 | #define read_stdin RdStdin |
115 | #define write_stdout WrStdout | 115 | #define write_stdout WrStdout |
116 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ | 116 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ |
117 | 117 | ||
118 | /* Module selection routines for I/O modules. */ | 118 | /* Module selection routines for I/O modules. */ |
119 | 119 | ||
120 | EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); | 120 | EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); |
121 | EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, | 121 | EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, |
122 | boolean is_os2)); | 122 | boolean is_os2)); |
123 | EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); | 123 | EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); |
124 | EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo)); | 124 | EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo)); |
125 | EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); | 125 | EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); |
126 | EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); | 126 | EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); |
127 | EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); | 127 | EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); |
128 | EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); | 128 | EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); |
129 | EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); | 129 | EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); |
130 | EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); | 130 | EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); |
131 | 131 | ||
132 | /* cjpeg support routines (in rdswitch.c) */ | 132 | /* cjpeg support routines (in rdswitch.c) */ |
133 | 133 | ||
134 | EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, | 134 | EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, |
135 | boolean force_baseline)); | 135 | boolean force_baseline)); |
136 | EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); | 136 | EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); |
137 | EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg, | 137 | EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg, |
138 | boolean force_baseline)); | 138 | boolean force_baseline)); |
139 | EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); | 139 | EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); |
140 | EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); | 140 | EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); |
141 | 141 | ||
142 | /* djpeg support routines (in rdcolmap.c) */ | 142 | /* djpeg support routines (in rdcolmap.c) */ |
143 | 143 | ||
144 | EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); | 144 | EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); |
145 | 145 | ||
146 | /* common support routines (in cdjpeg.c) */ | 146 | /* common support routines (in cdjpeg.c) */ |
147 | 147 | ||
148 | EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); | 148 | EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); |
149 | EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, | 149 | EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, |
150 | cd_progress_ptr progress)); | 150 | cd_progress_ptr progress)); |
151 | EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); | 151 | EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); |
152 | EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); | 152 | EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); |
153 | EXTERN(FILE *) read_stdin JPP((void)); | 153 | EXTERN(FILE *) read_stdin JPP((void)); |
154 | EXTERN(FILE *) write_stdout JPP((void)); | 154 | EXTERN(FILE *) write_stdout JPP((void)); |
155 | 155 | ||
156 | /* miscellaneous useful macros */ | 156 | /* miscellaneous useful macros */ |
157 | 157 | ||
158 | #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ | 158 | #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ |
159 | #define READ_BINARY "r" | 159 | #define READ_BINARY "r" |
160 | #define WRITE_BINARY "w" | 160 | #define WRITE_BINARY "w" |
161 | #else | 161 | #else |
162 | #ifdef VMS /* VMS is very nonstandard */ | 162 | #ifdef VMS /* VMS is very nonstandard */ |
163 | #define READ_BINARY "rb", "ctx=stm" | 163 | #define READ_BINARY "rb", "ctx=stm" |
164 | #define WRITE_BINARY "wb", "ctx=stm" | 164 | #define WRITE_BINARY "wb", "ctx=stm" |
165 | #else /* standard ANSI-compliant case */ | 165 | #else /* standard ANSI-compliant case */ |
166 | #define READ_BINARY "rb" | 166 | #define READ_BINARY "rb" |
167 | #define WRITE_BINARY "wb" | 167 | #define WRITE_BINARY "wb" |
168 | #endif | 168 | #endif |
169 | #endif | 169 | #endif |
170 | 170 | ||
171 | #ifndef EXIT_FAILURE /* define exit() codes if not provided */ | 171 | #ifndef EXIT_FAILURE /* define exit() codes if not provided */ |
172 | #define EXIT_FAILURE 1 | 172 | #define EXIT_FAILURE 1 |
173 | #endif | 173 | #endif |
174 | #ifndef EXIT_SUCCESS | 174 | #ifndef EXIT_SUCCESS |
175 | #ifdef VMS | 175 | #ifdef VMS |
176 | #define EXIT_SUCCESS 1 /* VMS is very nonstandard */ | 176 | #define EXIT_SUCCESS 1 /* VMS is very nonstandard */ |
177 | #else | 177 | #else |
178 | #define EXIT_SUCCESS 0 | 178 | #define EXIT_SUCCESS 0 |
179 | #endif | 179 | #endif |
180 | #endif | 180 | #endif |
181 | #ifndef EXIT_WARNING | 181 | #ifndef EXIT_WARNING |
182 | #ifdef VMS | 182 | #ifdef VMS |
183 | #define EXIT_WARNING 1 /* VMS is very nonstandard */ | 183 | #define EXIT_WARNING 1 /* VMS is very nonstandard */ |
184 | #else | 184 | #else |
185 | #define EXIT_WARNING 2 | 185 | #define EXIT_WARNING 2 |
186 | #endif | 186 | #endif |
187 | #endif | 187 | #endif |