mirror of
https://github.com/libjpeg-turbo/libjpeg-turbo.git
synced 2026-01-18 21:41:20 +01:00
- Rename jpeg_simple_lossless() to jpeg_enable_lossless() and modify the
function so that it stores the lossless parameters directly in the Ss
and Al fields of jpeg_compress_struct rather than using a scan script.
- Move the cjpeg -lossless switch into "Switches for advanced users".
- Document the libjpeg API and run-time features that are unavailable in
lossless mode, and ensure that all parameters, functions, and switches
related to unavailable features are ignored or generate errors in
lossless mode.
- Defer any action that depends on whether lossless mode is enabled
until jpeg_start_compress()/jpeg_start_decompress() is called.
- Document the purpose of the point transform value.
- "Codec" stands for coder/decoder, so it is a bit awkward to say
"lossless compression codec" and "lossless decompression codec".
Use "lossless compressor" and "lossless decompressor" instead.
- Restore backward API/ABI compatibility with libjpeg v6b:
* Move the new 'lossless' field from the exposed jpeg_compress_struct
and jpeg_decompress_struct structures into the opaque
jpeg_comp_master and jpeg_decomp_master structures, and allocate the
master structures in the body of jpeg_create_compress() and
jpeg_create_decompress().
* Remove the new 'process' field from jpeg_compress_struct and
jpeg_decompress_struct and replace it with the old
'progressive_mode' field and the new 'lossless' field.
* Remove the new 'data_unit' field from jpeg_compress_struct and
jpeg_decompress_struct and replace it with a locally-computed
data unit variable.
* Restore the names of macros and fields that refer to DCT blocks, and
document that they have a different meaning in lossless mode. (Most
of them aren't very meaningful in lossless mode anyhow.)
* Remove the new alloc_darray() method from jpeg_memory_mgr and
replace it with an internal macro that wraps the alloc_sarray()
method.
* Move the JDIFF* data types from jpeglib.h and jmorecfg.h into
jpegint.h.
* Remove the new 'codec' field from jpeg_compress_struct and
jpeg_decompress_struct and instead reuse the existing internal
coefficient control, forward/inverse DCT, and entropy
encoding/decoding structures for lossless compression/decompression.
* Repurpose existing error codes rather than introducing new ones.
(The new JERR_BAD_RESTART and JWRN_MUST_DOWNSCALE codes remain,
although JWRN_MUST_DOWNSCALE will probably be removed in
libjpeg-turbo, since we have a different way of handling multiple
data precisions.)
- Automatically enable lossless mode when a scan script with parameters
that are only valid for lossless mode is detected, and document the
use of scan scripts to generate lossless JPEG images.
- Move the sequential and shared Huffman routines back into jchuff.c and
jdhuff.c, and document that those routines are shared with jclhuff.c
and jdlhuff.c as well as with jcphuff.c and jdphuff.c.
- Move MAX_DIFF_BITS from jchuff.h into jclhuff.c, the only place where
it is used.
- Move the predictor and scaler code into jclossls.c and jdlossls.c.
- Streamline register usage in the [un]differencers (inspired by similar
optimizations in the color [de]converters.)
- Restructure the logic in a few places to reduce duplicated code.
- Ensure that all lossless-specific code is guarded by
C_LOSSLESS_SUPPORTED or D_LOSSLESS_SUPPORTED and that the library can
be built successfully if either or both of those macros is undefined.
- Remove all short forms of external names introduced by the lossless
JPEG patch. (These will not be needed by libjpeg-turbo, so there is
no use cleaning them up.)
- Various wordsmithing, formatting, and punctuation tweaks
- Eliminate various compiler warnings.
452 lines
17 KiB
C
452 lines
17 KiB
C
/*
|
|
* jpegint.h
|
|
*
|
|
* This file was part of the Independent JPEG Group's software:
|
|
* Copyright (C) 1991-1997, Thomas G. Lane.
|
|
* Lossless JPEG Modifications:
|
|
* Copyright (C) 1999, Ken Murchison.
|
|
* Copyright (C) 2022, D. R. Commander.
|
|
* For conditions of distribution and use, see the accompanying README file.
|
|
*
|
|
* This file provides common declarations for the various JPEG modules.
|
|
* These declarations are considered internal to the JPEG library; most
|
|
* applications using the library shouldn't need to include this file.
|
|
*/
|
|
|
|
|
|
/* Representation of a spatial difference value.
|
|
* This should be a signed value of at least 16 bits; int is usually OK.
|
|
*/
|
|
|
|
typedef int JDIFF;
|
|
|
|
typedef JDIFF FAR *JDIFFROW; /* pointer to one row of difference values */
|
|
typedef JDIFFROW *JDIFFARRAY; /* ptr to some rows (a 2-D diff array) */
|
|
typedef JDIFFARRAY *JDIFFIMAGE; /* a 3-D diff array: top index is color */
|
|
|
|
|
|
/* Declarations for both compression & decompression */
|
|
|
|
typedef enum { /* Operating modes for buffer controllers */
|
|
JBUF_PASS_THRU, /* Plain stripwise operation */
|
|
/* Remaining modes require a full-image buffer to have been created */
|
|
JBUF_SAVE_SOURCE, /* Run source subobject only, save output */
|
|
JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */
|
|
JBUF_SAVE_AND_PASS /* Run both subobjects, save output */
|
|
} J_BUF_MODE;
|
|
|
|
/* Values of global_state field (jdapi.c has some dependencies on ordering!) */
|
|
#define CSTATE_START 100 /* after create_compress */
|
|
#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */
|
|
#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */
|
|
#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */
|
|
#define DSTATE_START 200 /* after create_decompress */
|
|
#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */
|
|
#define DSTATE_READY 202 /* found SOS, ready for start_decompress */
|
|
#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/
|
|
#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */
|
|
#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */
|
|
#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */
|
|
#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */
|
|
#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */
|
|
#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */
|
|
#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */
|
|
|
|
|
|
/* Declarations for compression modules */
|
|
|
|
/* Master control module */
|
|
struct jpeg_comp_master {
|
|
JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
|
|
JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
|
|
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
|
|
|
/* State variables made visible to other modules */
|
|
boolean call_pass_startup; /* True if pass_startup must be called */
|
|
boolean is_last_pass; /* True during last pass */
|
|
boolean lossless; /* True if lossless mode is enabled */
|
|
};
|
|
|
|
/* Main buffer control (downsampled-data buffer) */
|
|
struct jpeg_c_main_controller {
|
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
|
JMETHOD(void, process_data, (j_compress_ptr cinfo,
|
|
JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
|
|
JDIMENSION in_rows_avail));
|
|
};
|
|
|
|
/* Compression preprocessing (downsampling input buffer control) */
|
|
struct jpeg_c_prep_controller {
|
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
|
JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
|
|
JSAMPARRAY input_buf,
|
|
JDIMENSION *in_row_ctr,
|
|
JDIMENSION in_rows_avail,
|
|
JSAMPIMAGE output_buf,
|
|
JDIMENSION *out_row_group_ctr,
|
|
JDIMENSION out_row_groups_avail));
|
|
};
|
|
|
|
/* Lossy mode: Coefficient buffer control
|
|
* Lossless mode: Difference buffer control
|
|
*/
|
|
struct jpeg_c_coef_controller {
|
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
|
JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
|
|
JSAMPIMAGE input_buf));
|
|
};
|
|
|
|
/* Colorspace conversion */
|
|
struct jpeg_color_converter {
|
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
|
JMETHOD(void, color_convert, (j_compress_ptr cinfo,
|
|
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
|
|
JDIMENSION output_row, int num_rows));
|
|
};
|
|
|
|
/* Downsampling */
|
|
struct jpeg_downsampler {
|
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
|
JMETHOD(void, downsample, (j_compress_ptr cinfo,
|
|
JSAMPIMAGE input_buf, JDIMENSION in_row_index,
|
|
JSAMPIMAGE output_buf,
|
|
JDIMENSION out_row_group_index));
|
|
|
|
boolean need_context_rows; /* TRUE if need rows above & below */
|
|
};
|
|
|
|
/* Lossy mode: Forward DCT (also controls coefficient quantization)
|
|
* Lossless mode: Prediction, sample differencing, and point transform
|
|
*/
|
|
struct jpeg_forward_dct {
|
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
|
|
|
/* Lossy mode */
|
|
/* perhaps this should be an array??? */
|
|
JMETHOD(void, forward_DCT, (j_compress_ptr cinfo,
|
|
jpeg_component_info * compptr,
|
|
JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
|
|
JDIMENSION start_row, JDIMENSION start_col,
|
|
JDIMENSION num_blocks));
|
|
};
|
|
|
|
/* Entropy encoding */
|
|
struct jpeg_entropy_encoder {
|
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
|
|
|
|
/* Lossy mode */
|
|
JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
|
|
/* Lossless mode */
|
|
JMETHOD(JDIMENSION, encode_mcus, (j_compress_ptr cinfo,
|
|
JDIFFIMAGE diff_buf,
|
|
JDIMENSION MCU_row_num,
|
|
JDIMENSION MCU_col_num, JDIMENSION nMCU));
|
|
|
|
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
|
};
|
|
|
|
/* Marker writing */
|
|
struct jpeg_marker_writer {
|
|
JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
|
|
JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
|
|
JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
|
|
JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
|
|
JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
|
|
/* These routines are exported to allow insertion of extra markers */
|
|
/* Probably only COM and APPn markers should be written this way */
|
|
JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
|
|
unsigned int datalen));
|
|
JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
|
|
};
|
|
|
|
|
|
/* Declarations for decompression modules */
|
|
|
|
/* Master control module */
|
|
struct jpeg_decomp_master {
|
|
JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
|
|
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
|
|
|
|
/* State variables made visible to other modules */
|
|
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
|
|
boolean lossless; /* True if decompressing a lossless image */
|
|
};
|
|
|
|
/* Input control module */
|
|
struct jpeg_input_controller {
|
|
JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
|
|
JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
|
|
JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
|
|
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
|
|
|
|
/* State variables made visible to other modules */
|
|
boolean has_multiple_scans; /* True if file has multiple scans */
|
|
boolean eoi_reached; /* True when EOI has been consumed */
|
|
};
|
|
|
|
/* Main buffer control (downsampled-data buffer) */
|
|
struct jpeg_d_main_controller {
|
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
|
|
JMETHOD(void, process_data, (j_decompress_ptr cinfo,
|
|
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
|
|
JDIMENSION out_rows_avail));
|
|
};
|
|
|
|
/* Lossy mode: Coefficient buffer control
|
|
* Lossless mode: Difference buffer control
|
|
*/
|
|
struct jpeg_d_coef_controller {
|
|
JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
|
|
JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
|
|
JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
|
|
JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
|
|
JSAMPIMAGE output_buf));
|
|
|
|
/* Lossy mode */
|
|
/* Pointer to array of coefficient virtual arrays, or NULL if none */
|
|
jvirt_barray_ptr *coef_arrays;
|
|
};
|
|
|
|
/* Decompression postprocessing (color quantization buffer control) */
|
|
struct jpeg_d_post_controller {
|
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
|
|
JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
|
|
JSAMPIMAGE input_buf,
|
|
JDIMENSION *in_row_group_ctr,
|
|
JDIMENSION in_row_groups_avail,
|
|
JSAMPARRAY output_buf,
|
|
JDIMENSION *out_row_ctr,
|
|
JDIMENSION out_rows_avail));
|
|
};
|
|
|
|
/* Marker reading & parsing */
|
|
struct jpeg_marker_reader {
|
|
JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
|
|
/* Read markers until SOS or EOI.
|
|
* Returns same codes as are defined for jpeg_consume_input:
|
|
* JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
|
|
*/
|
|
JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
|
|
/* Read a restart marker --- exported for use by entropy decoder only */
|
|
jpeg_marker_parser_method read_restart_marker;
|
|
|
|
/* State of marker reader --- nominally internal, but applications
|
|
* supplying COM or APPn handlers might like to know the state.
|
|
*/
|
|
boolean saw_SOI; /* found SOI? */
|
|
boolean saw_SOF; /* found SOF? */
|
|
int next_restart_num; /* next restart number expected (0-7) */
|
|
unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */
|
|
};
|
|
|
|
/* Entropy decoding */
|
|
struct jpeg_entropy_decoder {
|
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
|
|
|
/* Lossy mode */
|
|
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
|
|
JBLOCKROW *MCU_data));
|
|
/* Lossless mode */
|
|
JMETHOD(JDIMENSION, decode_mcus, (j_decompress_ptr cinfo,
|
|
JDIFFIMAGE diff_buf,
|
|
JDIMENSION MCU_row_num,
|
|
JDIMENSION MCU_col_num, JDIMENSION nMCU));
|
|
JMETHOD(boolean, process_restart, (j_decompress_ptr cinfo));
|
|
|
|
/* This is here to share code between baseline and progressive decoders; */
|
|
/* other modules probably should not use it */
|
|
boolean insufficient_data; /* set TRUE after emitting warning */
|
|
};
|
|
|
|
/* Lossy mode: Inverse DCT (also performs dequantization)
|
|
* Lossless mode: Prediction, sample undifferencing, point transform, and
|
|
* sample size scaling
|
|
*/
|
|
typedef JMETHOD(void, inverse_DCT_method_ptr,
|
|
(j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
|
JCOEFPTR coef_block,
|
|
JSAMPARRAY output_buf, JDIMENSION output_col));
|
|
|
|
struct jpeg_inverse_dct {
|
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
|
|
|
/* Lossy mode */
|
|
/* It is useful to allow each component to have a separate IDCT method. */
|
|
inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
|
|
};
|
|
|
|
/* Upsampling (note that upsampler must also call color converter) */
|
|
struct jpeg_upsampler {
|
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
|
JMETHOD(void, upsample, (j_decompress_ptr cinfo,
|
|
JSAMPIMAGE input_buf,
|
|
JDIMENSION *in_row_group_ctr,
|
|
JDIMENSION in_row_groups_avail,
|
|
JSAMPARRAY output_buf,
|
|
JDIMENSION *out_row_ctr,
|
|
JDIMENSION out_rows_avail));
|
|
|
|
boolean need_context_rows; /* TRUE if need rows above & below */
|
|
};
|
|
|
|
/* Colorspace conversion */
|
|
struct jpeg_color_deconverter {
|
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
|
JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
|
|
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
|
JSAMPARRAY output_buf, int num_rows));
|
|
};
|
|
|
|
/* Color quantization or color precision reduction */
|
|
struct jpeg_color_quantizer {
|
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
|
|
JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
|
|
JSAMPARRAY input_buf, JSAMPARRAY output_buf,
|
|
int num_rows));
|
|
JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
|
|
JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
|
|
};
|
|
|
|
|
|
/* Miscellaneous useful macros */
|
|
|
|
#undef MAX
|
|
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
#undef MIN
|
|
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
|
|
|
|
/* We assume that right shift corresponds to signed division by 2 with
|
|
* rounding towards minus infinity. This is correct for typical "arithmetic
|
|
* shift" instructions that shift in copies of the sign bit. But some
|
|
* C compilers implement >> with an unsigned shift. For these machines you
|
|
* must define RIGHT_SHIFT_IS_UNSIGNED.
|
|
* RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
|
|
* It is only applied with constant shift counts. SHIFT_TEMPS must be
|
|
* included in the variables of any routine using RIGHT_SHIFT.
|
|
*/
|
|
|
|
#ifdef RIGHT_SHIFT_IS_UNSIGNED
|
|
#define SHIFT_TEMPS INT32 shift_temp;
|
|
#define RIGHT_SHIFT(x,shft) \
|
|
((shift_temp = (x)) < 0 ? \
|
|
(shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
|
|
(shift_temp >> (shft)))
|
|
#else
|
|
#define SHIFT_TEMPS
|
|
#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
|
|
#endif
|
|
|
|
|
|
/* Short forms of external names for systems with brain-damaged linkers. */
|
|
|
|
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
|
#define jinit_compress_master jICompress
|
|
#define jinit_c_master_control jICMaster
|
|
#define jinit_c_main_controller jICMainC
|
|
#define jinit_c_prep_controller jICPrepC
|
|
#define jinit_c_coef_controller jICCoefC
|
|
#define jinit_color_converter jICColor
|
|
#define jinit_downsampler jIDownsampler
|
|
#define jinit_forward_dct jIFDCT
|
|
#define jinit_huff_encoder jIHEncoder
|
|
#define jinit_phuff_encoder jIPHEncoder
|
|
#define jinit_marker_writer jIMWriter
|
|
#define jinit_master_decompress jIDMaster
|
|
#define jinit_d_main_controller jIDMainC
|
|
#define jinit_d_coef_controller jIDCoefC
|
|
#define jinit_d_post_controller jIDPostC
|
|
#define jinit_input_controller jIInCtlr
|
|
#define jinit_marker_reader jIMReader
|
|
#define jinit_huff_decoder jIHDecoder
|
|
#define jinit_phuff_decoder jIPHDecoder
|
|
#define jinit_inverse_dct jIIDCT
|
|
#define jinit_upsampler jIUpsampler
|
|
#define jinit_color_deconverter jIDColor
|
|
#define jinit_1pass_quantizer jI1Quant
|
|
#define jinit_2pass_quantizer jI2Quant
|
|
#define jinit_merged_upsampler jIMUpsampler
|
|
#define jinit_memory_mgr jIMemMgr
|
|
#define jdiv_round_up jDivRound
|
|
#define jround_up jRound
|
|
#define jcopy_sample_rows jCopySamples
|
|
#define jcopy_block_row jCopyBlocks
|
|
#define jzero_far jZeroFar
|
|
#define jpeg_zigzag_order jZIGTable
|
|
#define jpeg_natural_order jZAGTable
|
|
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
|
|
|
|
|
/* Compression module initialization routines */
|
|
EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
|
|
EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
|
|
boolean transcode_only));
|
|
EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
|
|
boolean need_full_buffer));
|
|
EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
|
|
boolean need_full_buffer));
|
|
EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
|
|
boolean need_full_buffer));
|
|
EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
|
|
EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
|
|
EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
|
|
EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
|
|
EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo));
|
|
EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
|
|
#ifdef C_LOSSLESS_SUPPORTED
|
|
EXTERN(void) jinit_c_diff_controller JPP((j_compress_ptr cinfo,
|
|
boolean need_full_buffer));
|
|
EXTERN(void) jinit_lhuff_encoder JPP((j_compress_ptr cinfo));
|
|
EXTERN(void) jinit_lossless_compressor JPP((j_compress_ptr cinfo));
|
|
#endif
|
|
/* Decompression module initialization routines */
|
|
EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
|
|
boolean need_full_buffer));
|
|
EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
|
|
boolean need_full_buffer));
|
|
EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
|
|
boolean need_full_buffer));
|
|
EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
|
|
#ifdef D_LOSSLESS_SUPPORTED
|
|
EXTERN(void) jinit_d_diff_controller JPP((j_decompress_ptr cinfo,
|
|
boolean need_full_buffer));
|
|
EXTERN(void) jinit_lhuff_decoder JPP((j_decompress_ptr cinfo));
|
|
EXTERN(void) jinit_lossless_decompressor JPP((j_decompress_ptr cinfo));
|
|
#endif
|
|
/* Memory manager initialization */
|
|
EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
|
|
|
|
/* Utility routines in jutils.c */
|
|
EXTERN(long) jdiv_round_up JPP((long a, long b));
|
|
EXTERN(long) jround_up JPP((long a, long b));
|
|
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
|
|
JSAMPARRAY output_array, int dest_row,
|
|
int num_rows, JDIMENSION num_cols));
|
|
EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
|
|
JDIMENSION num_blocks));
|
|
EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
|
|
/* Constant tables in jutils.c */
|
|
#if 0 /* This table is not actually needed in v6a */
|
|
extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
|
|
#endif
|
|
extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
|
|
|
|
/* Suppress undefined-structure complaints if necessary. */
|
|
|
|
#ifdef INCOMPLETE_TYPES_BROKEN
|
|
#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */
|
|
struct jvirt_sarray_control { long dummy; };
|
|
struct jvirt_barray_control { long dummy; };
|
|
#endif
|
|
#endif /* INCOMPLETE_TYPES_BROKEN */
|