Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / compiler / libjpeg / main / jlossy.h
blob1cb2535849f598ad48c7d59744075a310263443e
1 /*
2 $Id$
3 */
5 /*
6 * jlossy.h
8 * Copyright (C) 1998, Thomas G. Lane.
9 * This file is part of the Independent JPEG Group's software.
10 * For conditions of distribution and use, see the accompanying README file.
12 * This include file contains common declarations for the lossy (DCT-based)
13 * JPEG codec modules.
16 #ifndef JLOSSY_H
17 #define JLOSSY_H
20 /* Lossy-specific compression codec (compressor proper) */
21 typedef struct {
22 struct jpeg_c_codec pub; /* public fields */
25 /* Coefficient buffer control */
26 JMETHOD(void, coef_start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
27 /* JMETHOD(boolean, coef_compress_data, (j_compress_ptr cinfo,
28 JSAMPIMAGE input_buf));*/
30 /* Pointer to data which is private to coef module */
31 void *coef_private;
34 /* Forward DCT (also controls coefficient quantization) */
35 JMETHOD(void, fdct_start_pass, (j_compress_ptr cinfo));
36 /* perhaps this should be an array??? */
37 JMETHOD(void, fdct_forward_DCT, (j_compress_ptr cinfo,
38 jpeg_component_info * compptr,
39 JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
40 JDIMENSION start_row, JDIMENSION start_col,
41 JDIMENSION num_blocks));
43 /* Pointer to data which is private to fdct module */
44 void *fdct_private;
47 /* Entropy encoding */
48 JMETHOD(boolean, entropy_encode_mcu, (j_compress_ptr cinfo,
49 JBLOCKROW *MCU_data));
51 /* Pointer to data which is private to entropy module */
52 void *entropy_private;
54 } jpeg_lossy_c_codec;
56 typedef jpeg_lossy_c_codec * j_lossy_c_ptr;
60 typedef JMETHOD(void, inverse_DCT_method_ptr,
61 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
62 JCOEFPTR coef_block,
63 JSAMPARRAY output_buf, JDIMENSION output_col));
65 /* Lossy-specific decompression codec (decompressor proper) */
66 typedef struct {
67 struct jpeg_d_codec pub; /* public fields */
70 /* Coefficient buffer control */
71 JMETHOD(void, coef_start_input_pass, (j_decompress_ptr cinfo));
72 JMETHOD(void, coef_start_output_pass, (j_decompress_ptr cinfo));
74 /* Pointer to array of coefficient virtual arrays, or NULL if none */
75 jvirt_barray_ptr *coef_arrays;
77 /* Pointer to data which is private to coef module */
78 void *coef_private;
81 /* Entropy decoding */
82 JMETHOD(void, entropy_start_pass, (j_decompress_ptr cinfo));
83 JMETHOD(boolean, entropy_decode_mcu, (j_decompress_ptr cinfo,
84 JBLOCKROW *MCU_data));
86 /* This is here to share code between baseline and progressive decoders; */
87 /* other modules probably should not use it */
88 boolean entropy_insufficient_data; /* set TRUE after emitting warning */
90 /* Pointer to data which is private to entropy module */
91 void *entropy_private;
94 /* Inverse DCT (also performs dequantization) */
95 JMETHOD(void, idct_start_pass, (j_decompress_ptr cinfo));
97 /* It is useful to allow each component to have a separate IDCT method. */
98 inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
100 /* Pointer to data which is private to idct module */
101 void *idct_private;
103 } jpeg_lossy_d_codec;
105 typedef jpeg_lossy_d_codec * j_lossy_d_ptr;
108 /* Compression module initialization routines */
109 JEXTERN(void) jinit_lossy_c_codec JPP((j_compress_ptr cinfo));
110 JEXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
111 boolean need_full_buffer));
112 JEXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
113 JEXTERN(void) jinit_shuff_encoder JPP((j_compress_ptr cinfo));
114 JEXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo));
116 /* Decompression module initialization routines */
117 JEXTERN(void) jinit_lossy_d_codec JPP((j_decompress_ptr cinfo));
118 JEXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
119 boolean need_full_buffer));
120 JEXTERN(void) jinit_shuff_decoder JPP((j_decompress_ptr cinfo));
121 JEXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo));
122 JEXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
124 #endif /* JLOSSY_H */