aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jcinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jcinit.c')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jcinit.c130
1 files changed, 65 insertions, 65 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jcinit.c b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jcinit.c
index f7aa89f..0ba310f 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jcinit.c
+++ b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jcinit.c
@@ -1,65 +1,65 @@
1/* 1/*
2 * jcinit.c 2 * jcinit.c
3 * 3 *
4 * Copyright (C) 1991-1997, Thomas G. Lane. 4 * Copyright (C) 1991-1997, Thomas G. Lane.
5 * This file is part of the Independent JPEG Group's software. 5 * This file is part of the Independent JPEG Group's software.
6 * For conditions of distribution and use, see the accompanying README file. 6 * For conditions of distribution and use, see the accompanying README file.
7 * 7 *
8 * This file contains initialization logic for the JPEG compressor. 8 * This file contains initialization logic for the JPEG compressor.
9 * This routine is in charge of selecting the modules to be executed and 9 * This routine is in charge of selecting the modules to be executed and
10 * making an initialization call to each one. 10 * making an initialization call to each one.
11 * 11 *
12 * Logically, this code belongs in jcmaster.c. It's split out because 12 * Logically, this code belongs in jcmaster.c. It's split out because
13 * linking this routine implies linking the entire compression library. 13 * linking this routine implies linking the entire compression library.
14 * For a transcoding-only application, we want to be able to use jcmaster.c 14 * For a transcoding-only application, we want to be able to use jcmaster.c
15 * without linking in the whole library. 15 * without linking in the whole library.
16 */ 16 */
17 17
18#define JPEG_INTERNALS 18#define JPEG_INTERNALS
19#include "jinclude.h" 19#include "jinclude.h"
20#include "jpeglib.h" 20#include "jpeglib.h"
21 21
22 22
23/* 23/*
24 * Master selection of compression modules. 24 * Master selection of compression modules.
25 * This is done once at the start of processing an image. We determine 25 * This is done once at the start of processing an image. We determine
26 * which modules will be used and give them appropriate initialization calls. 26 * which modules will be used and give them appropriate initialization calls.
27 */ 27 */
28 28
29GLOBAL(void) 29GLOBAL(void)
30jinit_compress_master (j_compress_ptr cinfo) 30jinit_compress_master (j_compress_ptr cinfo)
31{ 31{
32 /* Initialize master control (includes parameter checking/processing) */ 32 /* Initialize master control (includes parameter checking/processing) */
33 jinit_c_master_control(cinfo, FALSE /* full compression */); 33 jinit_c_master_control(cinfo, FALSE /* full compression */);
34 34
35 /* Preprocessing */ 35 /* Preprocessing */
36 if (! cinfo->raw_data_in) { 36 if (! cinfo->raw_data_in) {
37 jinit_color_converter(cinfo); 37 jinit_color_converter(cinfo);
38 jinit_downsampler(cinfo); 38 jinit_downsampler(cinfo);
39 jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); 39 jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */);
40 } 40 }
41 /* Forward DCT */ 41 /* Forward DCT */
42 jinit_forward_dct(cinfo); 42 jinit_forward_dct(cinfo);
43 /* Entropy encoding: either Huffman or arithmetic coding. */ 43 /* Entropy encoding: either Huffman or arithmetic coding. */
44 if (cinfo->arith_code) 44 if (cinfo->arith_code)
45 jinit_arith_encoder(cinfo); 45 jinit_arith_encoder(cinfo);
46 else { 46 else {
47 jinit_huff_encoder(cinfo); 47 jinit_huff_encoder(cinfo);
48 } 48 }
49 49
50 /* Need a full-image coefficient buffer in any multi-pass mode. */ 50 /* Need a full-image coefficient buffer in any multi-pass mode. */
51 jinit_c_coef_controller(cinfo, 51 jinit_c_coef_controller(cinfo,
52 (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); 52 (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
53 jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); 53 jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);
54 54
55 jinit_marker_writer(cinfo); 55 jinit_marker_writer(cinfo);
56 56
57 /* We can now tell the memory manager to allocate virtual arrays. */ 57 /* We can now tell the memory manager to allocate virtual arrays. */
58 (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); 58 (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
59 59
60 /* Write the datastream header (SOI) immediately. 60 /* Write the datastream header (SOI) immediately.
61 * Frame and scan headers are postponed till later. 61 * Frame and scan headers are postponed till later.
62 * This lets application insert special markers after the SOI. 62 * This lets application insert special markers after the SOI.
63 */ 63 */
64 (*cinfo->marker->write_file_header) (cinfo); 64 (*cinfo->marker->write_file_header) (cinfo);
65} 65}