4 * Copyright (C) 1998, Thomas G. Lane.
5 * This file is part of the Independent JPEG Group's software.
6 * For conditions of distribution and use, see the accompanying README file.
8 * This include file contains common declarations for the lossy (DCT-based)
16 /* Lossy-specific compression codec (compressor proper) */
18 struct jpeg_c_codec pub; /* public fields */
21 /* Coefficient buffer control */
22 JMETHOD(void, coef_start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
23 /* JMETHOD(boolean, coef_compress_data, (j_compress_ptr cinfo,
24 JSAMPIMAGE input_buf));*/
26 /* Pointer to data which is private to coef module */
30 /* Forward DCT (also controls coefficient quantization) */
31 JMETHOD(void, fdct_start_pass, (j_compress_ptr cinfo));
32 /* perhaps this should be an array??? */
33 JMETHOD(void, fdct_forward_DCT, (j_compress_ptr cinfo,
34 jpeg_component_info * compptr,
35 JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
36 JDIMENSION start_row, JDIMENSION start_col,
37 JDIMENSION num_blocks));
39 /* Pointer to data which is private to fdct module */
43 /* Entropy encoding */
44 JMETHOD(boolean, entropy_encode_mcu, (j_compress_ptr cinfo,
45 JBLOCKROW *MCU_data));
47 /* Pointer to data which is private to entropy module */
48 void *entropy_private;
52 typedef jpeg_lossy_c_codec * j_lossy_c_ptr;
56 typedef JMETHOD(void, inverse_DCT_method_ptr,
57 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
59 JSAMPARRAY output_buf, JDIMENSION output_col));
61 /* Lossy-specific decompression codec (decompressor proper) */
63 struct jpeg_d_codec pub; /* public fields */
66 /* Coefficient buffer control */
67 JMETHOD(void, coef_start_input_pass, (j_decompress_ptr cinfo));
68 JMETHOD(void, coef_start_output_pass, (j_decompress_ptr cinfo));
70 /* Pointer to array of coefficient virtual arrays, or NULL if none */
71 jvirt_barray_ptr *coef_arrays;
73 /* Pointer to data which is private to coef module */
77 /* Entropy decoding */
78 JMETHOD(void, entropy_start_pass, (j_decompress_ptr cinfo));
79 JMETHOD(boolean, entropy_decode_mcu, (j_decompress_ptr cinfo,
80 JBLOCKROW *MCU_data));
82 /* This is here to share code between baseline and progressive decoders; */
83 /* other modules probably should not use it */
84 boolean entropy_insufficient_data; /* set TRUE after emitting warning */
86 /* Pointer to data which is private to entropy module */
87 void *entropy_private;
90 /* Inverse DCT (also performs dequantization) */
91 JMETHOD(void, idct_start_pass, (j_decompress_ptr cinfo));
93 /* It is useful to allow each component to have a separate IDCT method. */
94 inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
96 /* Pointer to data which is private to idct module */
101 typedef jpeg_lossy_d_codec * j_lossy_d_ptr;
104 /* Compression module initialization routines */
105 EXTERN(void) jinit_lossy_c_codec JPP((j_compress_ptr cinfo));
106 EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
107 boolean need_full_buffer));
108 EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
109 EXTERN(void) jinit_shuff_encoder JPP((j_compress_ptr cinfo));
110 EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo));
112 /* Decompression module initialization routines */
113 EXTERN(void) jinit_lossy_d_codec JPP((j_decompress_ptr cinfo));
114 EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
115 boolean need_full_buffer));
116 EXTERN(void) jinit_shuff_decoder JPP((j_decompress_ptr cinfo));
117 EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo));
118 EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
120 #endif /* JLOSSY_H */