doom3-gpl
Doom 3 GPL source release
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
neo
renderer
jpeg-6
jcinit.c
Go to the documentation of this file.
1
/*
2
* jcinit.c
3
*
4
* Copyright (C) 1991-1995, 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.
7
*
8
* This file contains initialization logic for the JPEG compressor.
9
* This routine is in charge of selecting the modules to be executed and
10
* making an initialization call to each one.
11
*
12
* Logically, this code belongs in jcmaster.c. It's split out because
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
15
* without linking in the whole library.
16
*/
17
18
#define JPEG_INTERNALS
19
#include "
jinclude.h
"
20
#include "
jpeglib.h
"
21
22
23
/*
24
* Master selection of compression modules.
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.
27
*/
28
29
GLOBAL
void
30
jinit_compress_master
(
j_compress_ptr
cinfo)
31
{
32
/* Initialize master control (includes parameter checking/processing) */
33
jinit_c_master_control
(cinfo,
FALSE
/* full compression */
);
34
35
/* Preprocessing */
36
if
(! cinfo->
raw_data_in
) {
37
jinit_color_converter
(cinfo);
38
jinit_downsampler
(cinfo);
39
jinit_c_prep_controller
(cinfo,
FALSE
/* never need full buffer here */
);
40
}
41
/* Forward DCT */
42
jinit_forward_dct
(cinfo);
43
/* Entropy encoding: either Huffman or arithmetic coding. */
44
if
(cinfo->
arith_code
) {
45
ERREXIT
(cinfo, JERR_ARITH_NOTIMPL);
46
}
else
{
47
if
(cinfo->
progressive_mode
) {
48
#ifdef C_PROGRESSIVE_SUPPORTED
49
jinit_phuff_encoder
(cinfo);
50
#else
51
ERREXIT
(cinfo, JERR_NOT_COMPILED);
52
#endif
53
}
else
54
jinit_huff_encoder
(cinfo);
55
}
56
57
/* Need a full-image coefficient buffer in any multi-pass mode. */
58
jinit_c_coef_controller
(cinfo,
59
(cinfo->
num_scans
> 1 || cinfo->
optimize_coding
));
60
jinit_c_main_controller
(cinfo,
FALSE
/* never need full buffer here */
);
61
62
jinit_marker_writer
(cinfo);
63
64
/* We can now tell the memory manager to allocate virtual arrays. */
65
(*cinfo->mem->realize_virt_arrays) ((
j_common_ptr
) cinfo);
66
67
/* Write the datastream header (SOI) immediately.
68
* Frame and scan headers are postponed till later.
69
* This lets application insert special markers after the SOI.
70
*/
71
(*cinfo->
marker
->write_file_header) (cinfo);
72
}
ERREXIT
#define ERREXIT(cinfo, code)
Definition:
jerror.h:193
jpeg_common_struct
Definition:
jpeglib.h:252
jinit_compress_master
GLOBAL void jinit_compress_master(j_compress_ptr cinfo)
Definition:
jcinit.c:30
jinit_c_prep_controller
GLOBAL void jinit_c_prep_controller(j_compress_ptr cinfo, boolean need_full_buffer)
Definition:
jcprepct.c:332
jpeg_compress_struct::marker
struct jpeg_marker_writer * marker
Definition:
jpeglib.h:396
jpeg_compress_struct::num_scans
int num_scans
Definition:
jpeglib.h:312
jinit_huff_encoder
GLOBAL void jinit_huff_encoder(j_compress_ptr cinfo)
Definition:
jchuff.c:828
jinit_phuff_encoder
GLOBAL void jinit_phuff_encoder(j_compress_ptr cinfo)
Definition:
jcphuff.c:810
jinclude.h
jinit_downsampler
GLOBAL void jinit_downsampler(j_compress_ptr cinfo)
Definition:
jcsample.c:464
GLOBAL
#define GLOBAL
Definition:
jmorecfg.h:190
jinit_color_converter
GLOBAL void jinit_color_converter(j_compress_ptr cinfo)
Definition:
jccolor.c:352
jpeg_compress_struct
Definition:
jpeglib.h:267
jpeg_compress_struct::arith_code
boolean arith_code
Definition:
jpeglib.h:320
jinit_c_main_controller
GLOBAL void jinit_c_main_controller(j_compress_ptr cinfo, boolean need_full_buffer)
Definition:
jcmainct.c:245
jinit_forward_dct
GLOBAL void jinit_forward_dct(j_compress_ptr cinfo)
Definition:
jcdctmgr.c:346
jinit_marker_writer
GLOBAL void jinit_marker_writer(j_compress_ptr cinfo)
Definition:
jcmarker.c:626
jpeg_compress_struct::progressive_mode
boolean progressive_mode
Definition:
jpeglib.h:360
jpeg_compress_struct::optimize_coding
boolean optimize_coding
Definition:
jpeglib.h:321
FALSE
#define FALSE
Definition:
mprintf.c:70
jinit_c_master_control
GLOBAL void jinit_c_master_control(j_compress_ptr cinfo, boolean transcode_only)
Definition:
jcmaster.c:531
jpeg_compress_struct::raw_data_in
boolean raw_data_in
Definition:
jpeglib.h:319
jpeglib.h
jinit_c_coef_controller
GLOBAL void jinit_c_coef_controller(j_compress_ptr cinfo, boolean need_full_buffer)
Definition:
jccoefct.c:404
This page is maintained by
Wladimir van der Laan
. Generated on Mon Nov 17 2014 12:23:25 for doom3-gpl by
1.8.6
.