Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | * jpegint.h |
michael@0 | 3 | * |
michael@0 | 4 | * Copyright (C) 1991-1997, Thomas G. Lane. |
michael@0 | 5 | * Modified 1997-2009 by Guido Vollbeding. |
michael@0 | 6 | * This file is part of the Independent JPEG Group's software. |
michael@0 | 7 | * For conditions of distribution and use, see the accompanying README file. |
michael@0 | 8 | * |
michael@0 | 9 | * This file provides common declarations for the various JPEG modules. |
michael@0 | 10 | * These declarations are considered internal to the JPEG library; most |
michael@0 | 11 | * applications using the library shouldn't need to include this file. |
michael@0 | 12 | */ |
michael@0 | 13 | |
michael@0 | 14 | |
michael@0 | 15 | /* Declarations for both compression & decompression */ |
michael@0 | 16 | |
michael@0 | 17 | typedef enum { /* Operating modes for buffer controllers */ |
michael@0 | 18 | JBUF_PASS_THRU, /* Plain stripwise operation */ |
michael@0 | 19 | /* Remaining modes require a full-image buffer to have been created */ |
michael@0 | 20 | JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ |
michael@0 | 21 | JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ |
michael@0 | 22 | JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ |
michael@0 | 23 | } J_BUF_MODE; |
michael@0 | 24 | |
michael@0 | 25 | /* Values of global_state field (jdapi.c has some dependencies on ordering!) */ |
michael@0 | 26 | #define CSTATE_START 100 /* after create_compress */ |
michael@0 | 27 | #define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ |
michael@0 | 28 | #define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ |
michael@0 | 29 | #define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ |
michael@0 | 30 | #define DSTATE_START 200 /* after create_decompress */ |
michael@0 | 31 | #define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ |
michael@0 | 32 | #define DSTATE_READY 202 /* found SOS, ready for start_decompress */ |
michael@0 | 33 | #define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ |
michael@0 | 34 | #define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ |
michael@0 | 35 | #define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ |
michael@0 | 36 | #define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ |
michael@0 | 37 | #define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ |
michael@0 | 38 | #define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ |
michael@0 | 39 | #define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ |
michael@0 | 40 | #define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ |
michael@0 | 41 | |
michael@0 | 42 | |
michael@0 | 43 | /* Declarations for compression modules */ |
michael@0 | 44 | |
michael@0 | 45 | /* Master control module */ |
michael@0 | 46 | struct jpeg_comp_master { |
michael@0 | 47 | JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); |
michael@0 | 48 | JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); |
michael@0 | 49 | JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); |
michael@0 | 50 | |
michael@0 | 51 | /* State variables made visible to other modules */ |
michael@0 | 52 | boolean call_pass_startup; /* True if pass_startup must be called */ |
michael@0 | 53 | boolean is_last_pass; /* True during last pass */ |
michael@0 | 54 | }; |
michael@0 | 55 | |
michael@0 | 56 | /* Main buffer control (downsampled-data buffer) */ |
michael@0 | 57 | struct jpeg_c_main_controller { |
michael@0 | 58 | JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); |
michael@0 | 59 | JMETHOD(void, process_data, (j_compress_ptr cinfo, |
michael@0 | 60 | JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, |
michael@0 | 61 | JDIMENSION in_rows_avail)); |
michael@0 | 62 | }; |
michael@0 | 63 | |
michael@0 | 64 | /* Compression preprocessing (downsampling input buffer control) */ |
michael@0 | 65 | struct jpeg_c_prep_controller { |
michael@0 | 66 | JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); |
michael@0 | 67 | JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, |
michael@0 | 68 | JSAMPARRAY input_buf, |
michael@0 | 69 | JDIMENSION *in_row_ctr, |
michael@0 | 70 | JDIMENSION in_rows_avail, |
michael@0 | 71 | JSAMPIMAGE output_buf, |
michael@0 | 72 | JDIMENSION *out_row_group_ctr, |
michael@0 | 73 | JDIMENSION out_row_groups_avail)); |
michael@0 | 74 | }; |
michael@0 | 75 | |
michael@0 | 76 | /* Coefficient buffer control */ |
michael@0 | 77 | struct jpeg_c_coef_controller { |
michael@0 | 78 | JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); |
michael@0 | 79 | JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, |
michael@0 | 80 | JSAMPIMAGE input_buf)); |
michael@0 | 81 | }; |
michael@0 | 82 | |
michael@0 | 83 | /* Colorspace conversion */ |
michael@0 | 84 | struct jpeg_color_converter { |
michael@0 | 85 | JMETHOD(void, start_pass, (j_compress_ptr cinfo)); |
michael@0 | 86 | JMETHOD(void, color_convert, (j_compress_ptr cinfo, |
michael@0 | 87 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
michael@0 | 88 | JDIMENSION output_row, int num_rows)); |
michael@0 | 89 | }; |
michael@0 | 90 | |
michael@0 | 91 | /* Downsampling */ |
michael@0 | 92 | struct jpeg_downsampler { |
michael@0 | 93 | JMETHOD(void, start_pass, (j_compress_ptr cinfo)); |
michael@0 | 94 | JMETHOD(void, downsample, (j_compress_ptr cinfo, |
michael@0 | 95 | JSAMPIMAGE input_buf, JDIMENSION in_row_index, |
michael@0 | 96 | JSAMPIMAGE output_buf, |
michael@0 | 97 | JDIMENSION out_row_group_index)); |
michael@0 | 98 | |
michael@0 | 99 | boolean need_context_rows; /* TRUE if need rows above & below */ |
michael@0 | 100 | }; |
michael@0 | 101 | |
michael@0 | 102 | /* Forward DCT (also controls coefficient quantization) */ |
michael@0 | 103 | struct jpeg_forward_dct { |
michael@0 | 104 | JMETHOD(void, start_pass, (j_compress_ptr cinfo)); |
michael@0 | 105 | /* perhaps this should be an array??? */ |
michael@0 | 106 | JMETHOD(void, forward_DCT, (j_compress_ptr cinfo, |
michael@0 | 107 | jpeg_component_info * compptr, |
michael@0 | 108 | JSAMPARRAY sample_data, JBLOCKROW coef_blocks, |
michael@0 | 109 | JDIMENSION start_row, JDIMENSION start_col, |
michael@0 | 110 | JDIMENSION num_blocks)); |
michael@0 | 111 | }; |
michael@0 | 112 | |
michael@0 | 113 | /* Entropy encoding */ |
michael@0 | 114 | struct jpeg_entropy_encoder { |
michael@0 | 115 | JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); |
michael@0 | 116 | JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); |
michael@0 | 117 | JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); |
michael@0 | 118 | }; |
michael@0 | 119 | |
michael@0 | 120 | /* Marker writing */ |
michael@0 | 121 | struct jpeg_marker_writer { |
michael@0 | 122 | JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); |
michael@0 | 123 | JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); |
michael@0 | 124 | JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); |
michael@0 | 125 | JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); |
michael@0 | 126 | JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); |
michael@0 | 127 | /* These routines are exported to allow insertion of extra markers */ |
michael@0 | 128 | /* Probably only COM and APPn markers should be written this way */ |
michael@0 | 129 | JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, |
michael@0 | 130 | unsigned int datalen)); |
michael@0 | 131 | JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); |
michael@0 | 132 | }; |
michael@0 | 133 | |
michael@0 | 134 | |
michael@0 | 135 | /* Declarations for decompression modules */ |
michael@0 | 136 | |
michael@0 | 137 | /* Master control module */ |
michael@0 | 138 | struct jpeg_decomp_master { |
michael@0 | 139 | JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); |
michael@0 | 140 | JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); |
michael@0 | 141 | |
michael@0 | 142 | /* State variables made visible to other modules */ |
michael@0 | 143 | boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ |
michael@0 | 144 | }; |
michael@0 | 145 | |
michael@0 | 146 | /* Input control module */ |
michael@0 | 147 | struct jpeg_input_controller { |
michael@0 | 148 | JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); |
michael@0 | 149 | JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); |
michael@0 | 150 | JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); |
michael@0 | 151 | JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); |
michael@0 | 152 | |
michael@0 | 153 | /* State variables made visible to other modules */ |
michael@0 | 154 | boolean has_multiple_scans; /* True if file has multiple scans */ |
michael@0 | 155 | boolean eoi_reached; /* True when EOI has been consumed */ |
michael@0 | 156 | }; |
michael@0 | 157 | |
michael@0 | 158 | /* Main buffer control (downsampled-data buffer) */ |
michael@0 | 159 | struct jpeg_d_main_controller { |
michael@0 | 160 | JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); |
michael@0 | 161 | JMETHOD(void, process_data, (j_decompress_ptr cinfo, |
michael@0 | 162 | JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, |
michael@0 | 163 | JDIMENSION out_rows_avail)); |
michael@0 | 164 | }; |
michael@0 | 165 | |
michael@0 | 166 | /* Coefficient buffer control */ |
michael@0 | 167 | struct jpeg_d_coef_controller { |
michael@0 | 168 | JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); |
michael@0 | 169 | JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); |
michael@0 | 170 | JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); |
michael@0 | 171 | JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, |
michael@0 | 172 | JSAMPIMAGE output_buf)); |
michael@0 | 173 | /* Pointer to array of coefficient virtual arrays, or NULL if none */ |
michael@0 | 174 | jvirt_barray_ptr *coef_arrays; |
michael@0 | 175 | }; |
michael@0 | 176 | |
michael@0 | 177 | /* Decompression postprocessing (color quantization buffer control) */ |
michael@0 | 178 | struct jpeg_d_post_controller { |
michael@0 | 179 | JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); |
michael@0 | 180 | JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, |
michael@0 | 181 | JSAMPIMAGE input_buf, |
michael@0 | 182 | JDIMENSION *in_row_group_ctr, |
michael@0 | 183 | JDIMENSION in_row_groups_avail, |
michael@0 | 184 | JSAMPARRAY output_buf, |
michael@0 | 185 | JDIMENSION *out_row_ctr, |
michael@0 | 186 | JDIMENSION out_rows_avail)); |
michael@0 | 187 | }; |
michael@0 | 188 | |
michael@0 | 189 | /* Marker reading & parsing */ |
michael@0 | 190 | struct jpeg_marker_reader { |
michael@0 | 191 | JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); |
michael@0 | 192 | /* Read markers until SOS or EOI. |
michael@0 | 193 | * Returns same codes as are defined for jpeg_consume_input: |
michael@0 | 194 | * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. |
michael@0 | 195 | */ |
michael@0 | 196 | JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); |
michael@0 | 197 | /* Read a restart marker --- exported for use by entropy decoder only */ |
michael@0 | 198 | jpeg_marker_parser_method read_restart_marker; |
michael@0 | 199 | |
michael@0 | 200 | /* State of marker reader --- nominally internal, but applications |
michael@0 | 201 | * supplying COM or APPn handlers might like to know the state. |
michael@0 | 202 | */ |
michael@0 | 203 | boolean saw_SOI; /* found SOI? */ |
michael@0 | 204 | boolean saw_SOF; /* found SOF? */ |
michael@0 | 205 | int next_restart_num; /* next restart number expected (0-7) */ |
michael@0 | 206 | unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ |
michael@0 | 207 | }; |
michael@0 | 208 | |
michael@0 | 209 | /* Entropy decoding */ |
michael@0 | 210 | struct jpeg_entropy_decoder { |
michael@0 | 211 | JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); |
michael@0 | 212 | JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, |
michael@0 | 213 | JBLOCKROW *MCU_data)); |
michael@0 | 214 | |
michael@0 | 215 | /* This is here to share code between baseline and progressive decoders; */ |
michael@0 | 216 | /* other modules probably should not use it */ |
michael@0 | 217 | boolean insufficient_data; /* set TRUE after emitting warning */ |
michael@0 | 218 | }; |
michael@0 | 219 | |
michael@0 | 220 | /* Inverse DCT (also performs dequantization) */ |
michael@0 | 221 | typedef JMETHOD(void, inverse_DCT_method_ptr, |
michael@0 | 222 | (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
michael@0 | 223 | JCOEFPTR coef_block, |
michael@0 | 224 | JSAMPARRAY output_buf, JDIMENSION output_col)); |
michael@0 | 225 | |
michael@0 | 226 | struct jpeg_inverse_dct { |
michael@0 | 227 | JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); |
michael@0 | 228 | /* It is useful to allow each component to have a separate IDCT method. */ |
michael@0 | 229 | inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; |
michael@0 | 230 | }; |
michael@0 | 231 | |
michael@0 | 232 | /* Upsampling (note that upsampler must also call color converter) */ |
michael@0 | 233 | struct jpeg_upsampler { |
michael@0 | 234 | JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); |
michael@0 | 235 | JMETHOD(void, upsample, (j_decompress_ptr cinfo, |
michael@0 | 236 | JSAMPIMAGE input_buf, |
michael@0 | 237 | JDIMENSION *in_row_group_ctr, |
michael@0 | 238 | JDIMENSION in_row_groups_avail, |
michael@0 | 239 | JSAMPARRAY output_buf, |
michael@0 | 240 | JDIMENSION *out_row_ctr, |
michael@0 | 241 | JDIMENSION out_rows_avail)); |
michael@0 | 242 | |
michael@0 | 243 | boolean need_context_rows; /* TRUE if need rows above & below */ |
michael@0 | 244 | }; |
michael@0 | 245 | |
michael@0 | 246 | /* Colorspace conversion */ |
michael@0 | 247 | struct jpeg_color_deconverter { |
michael@0 | 248 | JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); |
michael@0 | 249 | JMETHOD(void, color_convert, (j_decompress_ptr cinfo, |
michael@0 | 250 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
michael@0 | 251 | JSAMPARRAY output_buf, int num_rows)); |
michael@0 | 252 | }; |
michael@0 | 253 | |
michael@0 | 254 | /* Color quantization or color precision reduction */ |
michael@0 | 255 | struct jpeg_color_quantizer { |
michael@0 | 256 | JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); |
michael@0 | 257 | JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, |
michael@0 | 258 | JSAMPARRAY input_buf, JSAMPARRAY output_buf, |
michael@0 | 259 | int num_rows)); |
michael@0 | 260 | JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); |
michael@0 | 261 | JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); |
michael@0 | 262 | }; |
michael@0 | 263 | |
michael@0 | 264 | |
michael@0 | 265 | /* Miscellaneous useful macros */ |
michael@0 | 266 | |
michael@0 | 267 | #undef MAX |
michael@0 | 268 | #define MAX(a,b) ((a) > (b) ? (a) : (b)) |
michael@0 | 269 | #undef MIN |
michael@0 | 270 | #define MIN(a,b) ((a) < (b) ? (a) : (b)) |
michael@0 | 271 | |
michael@0 | 272 | |
michael@0 | 273 | /* We assume that right shift corresponds to signed division by 2 with |
michael@0 | 274 | * rounding towards minus infinity. This is correct for typical "arithmetic |
michael@0 | 275 | * shift" instructions that shift in copies of the sign bit. But some |
michael@0 | 276 | * C compilers implement >> with an unsigned shift. For these machines you |
michael@0 | 277 | * must define RIGHT_SHIFT_IS_UNSIGNED. |
michael@0 | 278 | * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. |
michael@0 | 279 | * It is only applied with constant shift counts. SHIFT_TEMPS must be |
michael@0 | 280 | * included in the variables of any routine using RIGHT_SHIFT. |
michael@0 | 281 | */ |
michael@0 | 282 | |
michael@0 | 283 | #ifdef RIGHT_SHIFT_IS_UNSIGNED |
michael@0 | 284 | #define SHIFT_TEMPS INT32 shift_temp; |
michael@0 | 285 | #define RIGHT_SHIFT(x,shft) \ |
michael@0 | 286 | ((shift_temp = (x)) < 0 ? \ |
michael@0 | 287 | (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ |
michael@0 | 288 | (shift_temp >> (shft))) |
michael@0 | 289 | #else |
michael@0 | 290 | #define SHIFT_TEMPS |
michael@0 | 291 | #define RIGHT_SHIFT(x,shft) ((x) >> (shft)) |
michael@0 | 292 | #endif |
michael@0 | 293 | |
michael@0 | 294 | |
michael@0 | 295 | /* Short forms of external names for systems with brain-damaged linkers. */ |
michael@0 | 296 | |
michael@0 | 297 | #ifdef NEED_SHORT_EXTERNAL_NAMES |
michael@0 | 298 | #define jinit_compress_master jICompress |
michael@0 | 299 | #define jinit_c_master_control jICMaster |
michael@0 | 300 | #define jinit_c_main_controller jICMainC |
michael@0 | 301 | #define jinit_c_prep_controller jICPrepC |
michael@0 | 302 | #define jinit_c_coef_controller jICCoefC |
michael@0 | 303 | #define jinit_color_converter jICColor |
michael@0 | 304 | #define jinit_downsampler jIDownsampler |
michael@0 | 305 | #define jinit_forward_dct jIFDCT |
michael@0 | 306 | #define jinit_huff_encoder jIHEncoder |
michael@0 | 307 | #define jinit_phuff_encoder jIPHEncoder |
michael@0 | 308 | #define jinit_arith_encoder jIAEncoder |
michael@0 | 309 | #define jinit_marker_writer jIMWriter |
michael@0 | 310 | #define jinit_master_decompress jIDMaster |
michael@0 | 311 | #define jinit_d_main_controller jIDMainC |
michael@0 | 312 | #define jinit_d_coef_controller jIDCoefC |
michael@0 | 313 | #define jinit_d_post_controller jIDPostC |
michael@0 | 314 | #define jinit_input_controller jIInCtlr |
michael@0 | 315 | #define jinit_marker_reader jIMReader |
michael@0 | 316 | #define jinit_huff_decoder jIHDecoder |
michael@0 | 317 | #define jinit_phuff_decoder jIPHDecoder |
michael@0 | 318 | #define jinit_arith_decoder jIADecoder |
michael@0 | 319 | #define jinit_inverse_dct jIIDCT |
michael@0 | 320 | #define jinit_upsampler jIUpsampler |
michael@0 | 321 | #define jinit_color_deconverter jIDColor |
michael@0 | 322 | #define jinit_1pass_quantizer jI1Quant |
michael@0 | 323 | #define jinit_2pass_quantizer jI2Quant |
michael@0 | 324 | #define jinit_merged_upsampler jIMUpsampler |
michael@0 | 325 | #define jinit_memory_mgr jIMemMgr |
michael@0 | 326 | #define jdiv_round_up jDivRound |
michael@0 | 327 | #define jround_up jRound |
michael@0 | 328 | #define jcopy_sample_rows jCopySamples |
michael@0 | 329 | #define jcopy_block_row jCopyBlocks |
michael@0 | 330 | #define jzero_far jZeroFar |
michael@0 | 331 | #define jpeg_zigzag_order jZIGTable |
michael@0 | 332 | #define jpeg_natural_order jZAGTable |
michael@0 | 333 | #define jpeg_aritab jAriTab |
michael@0 | 334 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ |
michael@0 | 335 | |
michael@0 | 336 | |
michael@0 | 337 | /* Compression module initialization routines */ |
michael@0 | 338 | EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); |
michael@0 | 339 | EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, |
michael@0 | 340 | boolean transcode_only)); |
michael@0 | 341 | EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, |
michael@0 | 342 | boolean need_full_buffer)); |
michael@0 | 343 | EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, |
michael@0 | 344 | boolean need_full_buffer)); |
michael@0 | 345 | EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, |
michael@0 | 346 | boolean need_full_buffer)); |
michael@0 | 347 | EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); |
michael@0 | 348 | EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); |
michael@0 | 349 | EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); |
michael@0 | 350 | EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); |
michael@0 | 351 | EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo)); |
michael@0 | 352 | EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo)); |
michael@0 | 353 | EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); |
michael@0 | 354 | /* Decompression module initialization routines */ |
michael@0 | 355 | EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); |
michael@0 | 356 | EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, |
michael@0 | 357 | boolean need_full_buffer)); |
michael@0 | 358 | EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, |
michael@0 | 359 | boolean need_full_buffer)); |
michael@0 | 360 | EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, |
michael@0 | 361 | boolean need_full_buffer)); |
michael@0 | 362 | EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); |
michael@0 | 363 | EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); |
michael@0 | 364 | EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); |
michael@0 | 365 | EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo)); |
michael@0 | 366 | EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo)); |
michael@0 | 367 | EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); |
michael@0 | 368 | EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); |
michael@0 | 369 | EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); |
michael@0 | 370 | EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); |
michael@0 | 371 | EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); |
michael@0 | 372 | EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); |
michael@0 | 373 | /* Memory manager initialization */ |
michael@0 | 374 | EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); |
michael@0 | 375 | |
michael@0 | 376 | /* Utility routines in jutils.c */ |
michael@0 | 377 | EXTERN(long) jdiv_round_up JPP((long a, long b)); |
michael@0 | 378 | EXTERN(long) jround_up JPP((long a, long b)); |
michael@0 | 379 | EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, |
michael@0 | 380 | JSAMPARRAY output_array, int dest_row, |
michael@0 | 381 | int num_rows, JDIMENSION num_cols)); |
michael@0 | 382 | EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, |
michael@0 | 383 | JDIMENSION num_blocks)); |
michael@0 | 384 | EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); |
michael@0 | 385 | /* Constant tables in jutils.c */ |
michael@0 | 386 | #if 0 /* This table is not actually needed in v6a */ |
michael@0 | 387 | extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ |
michael@0 | 388 | #endif |
michael@0 | 389 | extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ |
michael@0 | 390 | |
michael@0 | 391 | /* Arithmetic coding probability estimation tables in jaricom.c */ |
michael@0 | 392 | extern const INT32 jpeg_aritab[]; |
michael@0 | 393 | |
michael@0 | 394 | /* Suppress undefined-structure complaints if necessary. */ |
michael@0 | 395 | |
michael@0 | 396 | #ifdef INCOMPLETE_TYPES_BROKEN |
michael@0 | 397 | #ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ |
michael@0 | 398 | struct jvirt_sarray_control { long dummy; }; |
michael@0 | 399 | struct jvirt_barray_control { long dummy; }; |
michael@0 | 400 | #endif |
michael@0 | 401 | #endif /* INCOMPLETE_TYPES_BROKEN */ |