COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
jcinit.cpp File Reference
#include "jinclude.h"
#include "jpeglib.h"
Include dependency graph for jcinit.cpp:

Macros

#define JPEG_INTERNALS
 

Functions

void jinit_compress_master (j_compress_ptr cinfo)
 

Macro Definition Documentation

#define JPEG_INTERNALS

Function Documentation

void 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) {
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. */
59  (boolean) (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 }
void jinit_marker_writer(j_compress_ptr cinfo)
Definition: jcmarker.cpp:645
void jinit_c_coef_controller(j_compress_ptr cinfo, boolean need_full_buffer)
Definition: jccoefct.cpp:405
#define ERREXIT(cinfo, code)
Definition: jerror.h:205
Definition: jpeglib.h:258
void jinit_downsampler(j_compress_ptr cinfo)
Definition: jcsample.cpp:464
Definition: jerror.h:43
void jinit_huff_encoder(j_compress_ptr cinfo)
Definition: jchuff.cpp:891
void jinit_c_main_controller(j_compress_ptr cinfo, boolean need_full_buffer)
Definition: jcmainct.cpp:245
#define FALSE
Definition: jpleph.cpp:69
Definition: jerror.h:95
void jinit_forward_dct(j_compress_ptr cinfo)
Definition: jcdctmgr.cpp:345
struct jpeg_memory_mgr * mem
Definition: jpeglib.h:274
void jinit_c_prep_controller(j_compress_ptr cinfo, boolean need_full_buffer)
Definition: jcprepct.cpp:315
struct jpeg_marker_writer * marker
Definition: jpeglib.h:404
int num_scans
Definition: jpeglib.h:318
boolean arith_code
Definition: jpeglib.h:326
void(* realize_virt_arrays)()
Definition: jpeglib.h:785
boolean progressive_mode
Definition: jpeglib.h:368
boolean optimize_coding
Definition: jpeglib.h:327
void jinit_color_converter(j_compress_ptr cinfo)
Definition: jccolor.cpp:352
boolean raw_data_in
Definition: jpeglib.h:325
void jinit_phuff_encoder(j_compress_ptr cinfo)
Definition: jcphuff.cpp:814
void jinit_c_master_control(j_compress_ptr cinfo, boolean transcode_only)
Definition: jcmaster.cpp:543