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 file contains utility functions for the JPEG codec(s).
15 #define JPEG_INTERNALS
23 * Initialize the compression codec.
24 * This is called only once, during master selection.
28 jinit_c_codec (j_compress_ptr cinfo
)
30 if (cinfo
->process
== JPROC_LOSSLESS
) {
31 #ifdef C_LOSSLESS_SUPPORTED
32 jinit_lossless_c_codec(cinfo
);
34 ERREXIT(cinfo
, JERR_NOT_COMPILED
);
37 jinit_lossy_c_codec(cinfo
);
42 * Initialize the decompression codec.
43 * This is called only once, during master selection.
47 jinit_d_codec (j_decompress_ptr cinfo
)
49 if (cinfo
->process
== JPROC_LOSSLESS
) {
50 #ifdef D_LOSSLESS_SUPPORTED
51 jinit_lossless_d_codec(cinfo
);
53 ERREXIT(cinfo
, JERR_NOT_COMPILED
);
56 jinit_lossy_d_codec(cinfo
);