14 #define JPEG_INTERNALS
46 #ifdef UPSAMPLE_MERGING_SUPPORTED
87 #if 0 // JDC: commented out to remove warning
94 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
96 #ifdef IDCT_SCALING_SUPPORTED
131 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
147 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
178 #if RGB_PIXELSIZE != 3
291 boolean use_c_buffer;
301 jd_samplesperrow = (
JDIMENSION) samplesperrow;
302 if ((
long) jd_samplesperrow != samplesperrow)
303 ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
310 master->quantizer_1pass =
NULL;
311 master->quantizer_2pass =
NULL;
336 #ifdef QUANT_1PASS_SUPPORTED
337 jinit_1pass_quantizer(cinfo);
338 master->quantizer_1pass = cinfo->
cquantize;
340 ERREXIT(cinfo, JERR_NOT_COMPILED);
346 #ifdef QUANT_2PASS_SUPPORTED
347 jinit_2pass_quantizer(cinfo);
348 master->quantizer_2pass = cinfo->
cquantize;
350 ERREXIT(cinfo, JERR_NOT_COMPILED);
360 if (master->using_merged_upsample) {
361 #ifdef UPSAMPLE_MERGING_SUPPORTED
362 jinit_merged_upsampler(cinfo);
364 ERREXIT(cinfo, JERR_NOT_COMPILED);
376 ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
379 #ifdef D_PROGRESSIVE_SUPPORTED
380 jinit_phuff_decoder(cinfo);
382 ERREXIT(cinfo, JERR_NOT_COMPILED);
396 (*cinfo->mem->realize_virt_arrays) ((
j_common_ptr) cinfo);
399 (*cinfo->
inputctl->start_input_pass) (cinfo);
401 #ifdef D_MULTISCAN_FILES_SUPPORTED
417 cinfo->progress->pass_counter = 0
L;
419 cinfo->progress->completed_passes = 0;
442 if (master->
pub.is_dummy_pass) {
443 #ifdef QUANT_2PASS_SUPPORTED
450 ERREXIT(cinfo, JERR_NOT_COMPILED);
456 cinfo->
cquantize = master->quantizer_2pass;
457 master->
pub.is_dummy_pass =
TRUE;
459 cinfo->
cquantize = master->quantizer_1pass;
461 ERREXIT(cinfo, JERR_MODE_CHANGE);
464 (*cinfo->
idct->start_pass) (cinfo);
465 (*cinfo->
coef->start_output_pass) (cinfo);
467 if (! master->using_merged_upsample)
468 (*cinfo->
cconvert->start_pass) (cinfo);
469 (*cinfo->
upsample->start_pass) (cinfo);
471 (*cinfo->
cquantize->start_pass) (cinfo, master->
pub.is_dummy_pass);
472 (*cinfo->
post->start_pass) (cinfo,
474 (*cinfo->
main->start_pass) (cinfo, JBUF_PASS_THRU);
479 if (cinfo->progress !=
NULL) {
480 cinfo->progress->completed_passes = master->
pass_number;
481 cinfo->progress->total_passes = master->
pass_number +
482 (master->
pub.is_dummy_pass ? 2 : 1);
503 (*cinfo->
cquantize->finish_pass) (cinfo);
508 #ifdef D_MULTISCAN_FILES_SUPPORTED
521 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
526 cinfo->
cquantize = master->quantizer_2pass;
528 (*cinfo->
cquantize->new_color_map) (cinfo);
531 ERREXIT(cinfo, JERR_MODE_CHANGE);
JDIMENSION downsampled_width
GLOBAL void jinit_master_decompress(j_decompress_ptr cinfo)
struct jpeg_d_post_controller * post
struct jpeg_input_controller * inputctl
jpeg_component_info * comp_info
struct jpeg_d_main_controller * main
METHODDEF void prepare_for_output_pass(j_decompress_ptr cinfo)
boolean do_fancy_upsampling
boolean enable_2pass_quant
struct jpeg_common_struct * j_common_ptr
struct jpeg_d_coef_controller * coef
GLenum GLsizei GLenum GLenum const GLvoid * table
boolean enable_external_quant
#define ERREXIT(cinfo, code)
struct jpeg_color_quantizer * quantizer_1pass
GLOBAL long jdiv_round_up(long a, long b)
LOCAL void prepare_range_limit_table(j_decompress_ptr cinfo)
GLOBAL void jinit_upsampler(j_decompress_ptr cinfo)
boolean two_pass_quantize
boolean using_merged_upsample
struct jpeg_comp_master pub
J_COLOR_SPACE out_color_space
LOCAL void master_selection(j_decompress_ptr cinfo)
#define MEMCOPY(dest, src, size)
GLOBAL void jinit_inverse_dct(j_decompress_ptr cinfo)
LOCAL boolean use_merged_upsample(j_decompress_ptr cinfo)
JSAMPLE * sample_range_limit
GLOBAL void jinit_d_coef_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
GLOBAL void jinit_d_post_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
struct jpeg_color_quantizer * cquantize
GLOBAL void jinit_d_main_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
struct jpeg_decomp_master * master
boolean enable_1pass_quant
struct jpeg_color_deconverter * cconvert
#define ERREXIT1(cinfo, code, p1)
struct jpeg_color_quantizer * quantizer_2pass
GLOBAL void jinit_huff_decoder(j_decompress_ptr cinfo)
my_decomp_master * my_master_ptr
struct jpeg_upsampler * upsample
METHODDEF void finish_output_pass(j_decompress_ptr cinfo)
GLOBAL void jinit_color_deconverter(j_decompress_ptr cinfo)
if(!ValidDisplayID(prefInfo.prefDisplayID)) prefInfo.prefDisplayID
struct jpeg_inverse_dct * idct
GLOBAL void jpeg_calc_output_dimensions(j_decompress_ptr cinfo)
JDIMENSION total_iMCU_rows
#define MEMZERO(target, size)
J_COLOR_SPACE jpeg_color_space
JDIMENSION downsampled_height