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 file contains utility functions for the JPEG codec(s).
11 #define JPEG_INTERNALS
19 * Initialize the compression codec.
20 * This is called only once, during master selection.
24 jinit_c_codec (j_compress_ptr cinfo)
26 if (cinfo->process == JPROC_LOSSLESS) {
27 #ifdef C_LOSSLESS_SUPPORTED
28 jinit_lossless_c_codec(cinfo);
30 ERREXIT(cinfo, JERR_NOT_COMPILED);
33 jinit_lossy_c_codec(cinfo);
38 * Initialize the decompression codec.
39 * This is called only once, during master selection.
43 jinit_d_codec (j_decompress_ptr cinfo)
45 if (cinfo->process == JPROC_LOSSLESS) {
46 #ifdef D_LOSSLESS_SUPPORTED
47 jinit_lossless_d_codec(cinfo);
49 ERREXIT(cinfo, JERR_NOT_COMPILED);
52 jinit_lossy_d_codec(cinfo);