1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
28
29
30
31
32
33
34
35
36
41
42
43
44
45
46
49
50
51
52
53
54
55
56
57
58
59
60
64
65
/* ... */
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
/* ... */
GLOBAL(void)
jinit_compress_master (j_compress_ptr cinfo)
{
jinit_c_master_control(cinfo, FALSE );
if (! cinfo->raw_data_in) {
jinit_color_converter(cinfo);
jinit_downsampler(cinfo);
jinit_c_prep_controller(cinfo, FALSE );
}if (! cinfo->raw_data_in) { ... }
jinit_forward_dct(cinfo);
if (cinfo->arith_code)
jinit_arith_encoder(cinfo);
else {
jinit_huff_encoder(cinfo);
}else { ... }
jinit_c_coef_controller(cinfo,
(boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
jinit_c_main_controller(cinfo, FALSE );
jinit_marker_writer(cinfo);
(*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
/* ... */
(*cinfo->marker->write_file_header) (cinfo);
}{ ... }