Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenjdmaster.c
Go to the documentation of this file.
00001 /* 00002 * jdmaster.c 00003 * 00004 * Copyright (C) 1991-1997, Thomas G. Lane. 00005 * Modified 2002-2009 by Guido Vollbeding. 00006 * This file is part of the Independent JPEG Group's software. 00007 * For conditions of distribution and use, see the accompanying README file. 00008 * 00009 * This file contains master control logic for the JPEG decompressor. 00010 * These routines are concerned with selecting the modules to be executed 00011 * and with determining the number of passes and the work to be done in each 00012 * pass. 00013 */ 00014 00015 #define JPEG_INTERNALS 00016 #include "jinclude.h" 00017 #include "jpeglib.h" 00018 00019 00020 /* Private state */ 00021 00022 typedef struct { 00023 struct jpeg_decomp_master pub; /* public fields */ 00024 00025 int pass_number; /* # of passes completed */ 00026 00027 boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */ 00028 00029 /* Saved references to initialized quantizer modules, 00030 * in case we need to switch modes. 00031 */ 00032 struct jpeg_color_quantizer * quantizer_1pass; 00033 struct jpeg_color_quantizer * quantizer_2pass; 00034 } my_decomp_master; 00035 00036 typedef my_decomp_master * my_master_ptr; 00037 00038 00039 /* 00040 * Determine whether merged upsample/color conversion should be used. 00041 * CRUCIAL: this must match the actual capabilities of jdmerge.c! 00042 */ 00043 00044 LOCAL(boolean) 00045 use_merged_upsample (j_decompress_ptr cinfo) 00046 { 00047 #ifdef UPSAMPLE_MERGING_SUPPORTED 00048 /* Merging is the equivalent of plain box-filter upsampling */ 00049 if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling) 00050 return FALSE; 00051 /* jdmerge.c only supports YCC=>RGB color conversion */ 00052 if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 || 00053 cinfo->out_color_space != JCS_RGB || 00054 cinfo->out_color_components != RGB_PIXELSIZE) 00055 return FALSE; 00056 /* and it only handles 2h1v or 2h2v sampling ratios */ 00057 if (cinfo->comp_info[0].h_samp_factor != 2 || 00058 cinfo->comp_info[1].h_samp_factor != 1 || 00059 cinfo->comp_info[2].h_samp_factor != 1 || 00060 cinfo->comp_info[0].v_samp_factor > 2 || 00061 cinfo->comp_info[1].v_samp_factor != 1 || 00062 cinfo->comp_info[2].v_samp_factor != 1) 00063 return FALSE; 00064 /* furthermore, it doesn't work if we've scaled the IDCTs differently */ 00065 if (cinfo->comp_info[0].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || 00066 cinfo->comp_info[1].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || 00067 cinfo->comp_info[2].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || 00068 cinfo->comp_info[0].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size || 00069 cinfo->comp_info[1].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size || 00070 cinfo->comp_info[2].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size) 00071 return FALSE; 00072 /* ??? also need to test for upsample-time rescaling, when & if supported */ 00073 return TRUE; /* by golly, it'll work... */ 00074 #else 00075 return FALSE; 00076 #endif 00077 } 00078 00079 00080 /* 00081 * Compute output image dimensions and related values. 00082 * NOTE: this is exported for possible use by application. 00083 * Hence it mustn't do anything that can't be done twice. 00084 * Also note that it may be called before the master module is initialized! 00085 */ 00086 00087 GLOBAL(void) 00088 jpeg_calc_output_dimensions (j_decompress_ptr cinfo) 00089 /* Do computations that are needed before master selection phase. 00090 * This function is used for full decompression. 00091 */ 00092 { 00093 #ifdef IDCT_SCALING_SUPPORTED 00094 int ci; 00095 jpeg_component_info *compptr; 00096 #endif 00097 00098 /* Prevent application from calling me at wrong times */ 00099 if (cinfo->global_state != DSTATE_READY) 00100 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); 00101 00102 /* Compute core output image dimensions and DCT scaling choices. */ 00103 jpeg_core_output_dimensions(cinfo); 00104 00105 #ifdef IDCT_SCALING_SUPPORTED 00106 00107 /* In selecting the actual DCT scaling for each component, we try to 00108 * scale up the chroma components via IDCT scaling rather than upsampling. 00109 * This saves time if the upsampler gets to use 1:1 scaling. 00110 * Note this code adapts subsampling ratios which are powers of 2. 00111 */ 00112 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; 00113 ci++, compptr++) { 00114 int ssize = 1; 00115 while (cinfo->min_DCT_h_scaled_size * ssize <= 00116 (cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) && 00117 (cinfo->max_h_samp_factor % (compptr->h_samp_factor * ssize * 2)) == 0) { 00118 ssize = ssize * 2; 00119 } 00120 compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size * ssize; 00121 ssize = 1; 00122 while (cinfo->min_DCT_v_scaled_size * ssize <= 00123 (cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) && 00124 (cinfo->max_v_samp_factor % (compptr->v_samp_factor * ssize * 2)) == 0) { 00125 ssize = ssize * 2; 00126 } 00127 compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size * ssize; 00128 00129 /* We don't support IDCT ratios larger than 2. */ 00130 if (compptr->DCT_h_scaled_size > compptr->DCT_v_scaled_size * 2) 00131 compptr->DCT_h_scaled_size = compptr->DCT_v_scaled_size * 2; 00132 else if (compptr->DCT_v_scaled_size > compptr->DCT_h_scaled_size * 2) 00133 compptr->DCT_v_scaled_size = compptr->DCT_h_scaled_size * 2; 00134 } 00135 00136 /* Recompute downsampled dimensions of components; 00137 * application needs to know these if using raw downsampled data. 00138 */ 00139 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; 00140 ci++, compptr++) { 00141 /* Size in samples, after IDCT scaling */ 00142 compptr->downsampled_width = (JDIMENSION) 00143 jdiv_round_up((long) cinfo->image_width * 00144 (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size), 00145 (long) (cinfo->max_h_samp_factor * cinfo->block_size)); 00146 compptr->downsampled_height = (JDIMENSION) 00147 jdiv_round_up((long) cinfo->image_height * 00148 (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size), 00149 (long) (cinfo->max_v_samp_factor * cinfo->block_size)); 00150 } 00151 00152 #endif /* IDCT_SCALING_SUPPORTED */ 00153 00154 /* Report number of components in selected colorspace. */ 00155 /* Probably this should be in the color conversion module... */ 00156 switch (cinfo->out_color_space) { 00157 case JCS_GRAYSCALE: 00158 cinfo->out_color_components = 1; 00159 break; 00160 case JCS_RGB: 00161 #if RGB_PIXELSIZE != 3 00162 cinfo->out_color_components = RGB_PIXELSIZE; 00163 break; 00164 #endif /* else share code with YCbCr */ 00165 case JCS_YCbCr: 00166 cinfo->out_color_components = 3; 00167 break; 00168 case JCS_CMYK: 00169 case JCS_YCCK: 00170 cinfo->out_color_components = 4; 00171 break; 00172 default: /* else must be same colorspace as in file */ 00173 cinfo->out_color_components = cinfo->num_components; 00174 break; 00175 } 00176 cinfo->output_components = (cinfo->quantize_colors ? 1 : 00177 cinfo->out_color_components); 00178 00179 /* See if upsampler will want to emit more than one row at a time */ 00180 if (use_merged_upsample(cinfo)) 00181 cinfo->rec_outbuf_height = cinfo->max_v_samp_factor; 00182 else 00183 cinfo->rec_outbuf_height = 1; 00184 } 00185 00186 00187 /* 00188 * Several decompression processes need to range-limit values to the range 00189 * 0..MAXJSAMPLE; the input value may fall somewhat outside this range 00190 * due to noise introduced by quantization, roundoff error, etc. These 00191 * processes are inner loops and need to be as fast as possible. On most 00192 * machines, particularly CPUs with pipelines or instruction prefetch, 00193 * a (subscript-check-less) C table lookup 00194 * x = sample_range_limit[x]; 00195 * is faster than explicit tests 00196 * if (x < 0) x = 0; 00197 * else if (x > MAXJSAMPLE) x = MAXJSAMPLE; 00198 * These processes all use a common table prepared by the routine below. 00199 * 00200 * For most steps we can mathematically guarantee that the initial value 00201 * of x is within MAXJSAMPLE+1 of the legal range, so a table running from 00202 * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient. But for the initial 00203 * limiting step (just after the IDCT), a wildly out-of-range value is 00204 * possible if the input data is corrupt. To avoid any chance of indexing 00205 * off the end of memory and getting a bad-pointer trap, we perform the 00206 * post-IDCT limiting thus: 00207 * x = range_limit[x & MASK]; 00208 * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit 00209 * samples. Under normal circumstances this is more than enough range and 00210 * a correct output will be generated; with bogus input data the mask will 00211 * cause wraparound, and we will safely generate a bogus-but-in-range output. 00212 * For the post-IDCT step, we want to convert the data from signed to unsigned 00213 * representation by adding CENTERJSAMPLE at the same time that we limit it. 00214 * So the post-IDCT limiting table ends up looking like this: 00215 * CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE, 00216 * MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), 00217 * 0 (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), 00218 * 0,1,...,CENTERJSAMPLE-1 00219 * Negative inputs select values from the upper half of the table after 00220 * masking. 00221 * 00222 * We can save some space by overlapping the start of the post-IDCT table 00223 * with the simpler range limiting table. The post-IDCT table begins at 00224 * sample_range_limit + CENTERJSAMPLE. 00225 * 00226 * Note that the table is allocated in near data space on PCs; it's small 00227 * enough and used often enough to justify this. 00228 */ 00229 00230 LOCAL(void) 00231 prepare_range_limit_table (j_decompress_ptr cinfo) 00232 /* Allocate and fill in the sample_range_limit table */ 00233 { 00234 JSAMPLE * table; 00235 int i; 00236 00237 table = (JSAMPLE *) 00238 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, 00239 (5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE)); 00240 table += (MAXJSAMPLE+1); /* allow negative subscripts of simple table */ 00241 cinfo->sample_range_limit = table; 00242 /* First segment of "simple" table: limit[x] = 0 for x < 0 */ 00243 MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE)); 00244 /* Main part of "simple" table: limit[x] = x */ 00245 for (i = 0; i <= MAXJSAMPLE; i++) 00246 table[i] = (JSAMPLE) i; 00247 table += CENTERJSAMPLE; /* Point to where post-IDCT table starts */ 00248 /* End of simple table, rest of first half of post-IDCT table */ 00249 for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++) 00250 table[i] = MAXJSAMPLE; 00251 /* Second half of post-IDCT table */ 00252 MEMZERO(table + (2 * (MAXJSAMPLE+1)), 00253 (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE)); 00254 MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE), 00255 cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE)); 00256 } 00257 00258 00259 /* 00260 * Master selection of decompression modules. 00261 * This is done once at jpeg_start_decompress time. We determine 00262 * which modules will be used and give them appropriate initialization calls. 00263 * We also initialize the decompressor input side to begin consuming data. 00264 * 00265 * Since jpeg_read_header has finished, we know what is in the SOF 00266 * and (first) SOS markers. We also have all the application parameter 00267 * settings. 00268 */ 00269 00270 LOCAL(void) 00271 master_selection (j_decompress_ptr cinfo) 00272 { 00273 my_master_ptr master = (my_master_ptr) cinfo->master; 00274 boolean use_c_buffer; 00275 long samplesperrow; 00276 JDIMENSION jd_samplesperrow; 00277 00278 /* Initialize dimensions and other stuff */ 00279 jpeg_calc_output_dimensions(cinfo); 00280 prepare_range_limit_table(cinfo); 00281 00282 /* Width of an output scanline must be representable as JDIMENSION. */ 00283 samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components; 00284 jd_samplesperrow = (JDIMENSION) samplesperrow; 00285 if ((long) jd_samplesperrow != samplesperrow) 00286 ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); 00287 00288 /* Initialize my private state */ 00289 master->pass_number = 0; 00290 master->using_merged_upsample = use_merged_upsample(cinfo); 00291 00292 /* Color quantizer selection */ 00293 master->quantizer_1pass = NULL; 00294 master->quantizer_2pass = NULL; 00295 /* No mode changes if not using buffered-image mode. */ 00296 if (! cinfo->quantize_colors || ! cinfo->buffered_image) { 00297 cinfo->enable_1pass_quant = FALSE; 00298 cinfo->enable_external_quant = FALSE; 00299 cinfo->enable_2pass_quant = FALSE; 00300 } 00301 if (cinfo->quantize_colors) { 00302 if (cinfo->raw_data_out) 00303 ERREXIT(cinfo, JERR_NOTIMPL); 00304 /* 2-pass quantizer only works in 3-component color space. */ 00305 if (cinfo->out_color_components != 3) { 00306 cinfo->enable_1pass_quant = TRUE; 00307 cinfo->enable_external_quant = FALSE; 00308 cinfo->enable_2pass_quant = FALSE; 00309 cinfo->colormap = NULL; 00310 } else if (cinfo->colormap != NULL) { 00311 cinfo->enable_external_quant = TRUE; 00312 } else if (cinfo->two_pass_quantize) { 00313 cinfo->enable_2pass_quant = TRUE; 00314 } else { 00315 cinfo->enable_1pass_quant = TRUE; 00316 } 00317 00318 if (cinfo->enable_1pass_quant) { 00319 #ifdef QUANT_1PASS_SUPPORTED 00320 jinit_1pass_quantizer(cinfo); 00321 master->quantizer_1pass = cinfo->cquantize; 00322 #else 00323 ERREXIT(cinfo, JERR_NOT_COMPILED); 00324 #endif 00325 } 00326 00327 /* We use the 2-pass code to map to external colormaps. */ 00328 if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) { 00329 #ifdef QUANT_2PASS_SUPPORTED 00330 jinit_2pass_quantizer(cinfo); 00331 master->quantizer_2pass = cinfo->cquantize; 00332 #else 00333 ERREXIT(cinfo, JERR_NOT_COMPILED); 00334 #endif 00335 } 00336 /* If both quantizers are initialized, the 2-pass one is left active; 00337 * this is necessary for starting with quantization to an external map. 00338 */ 00339 } 00340 00341 /* Post-processing: in particular, color conversion first */ 00342 if (! cinfo->raw_data_out) { 00343 if (master->using_merged_upsample) { 00344 #ifdef UPSAMPLE_MERGING_SUPPORTED 00345 jinit_merged_upsampler(cinfo); /* does color conversion too */ 00346 #else 00347 ERREXIT(cinfo, JERR_NOT_COMPILED); 00348 #endif 00349 } else { 00350 jinit_color_deconverter(cinfo); 00351 jinit_upsampler(cinfo); 00352 } 00353 jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant); 00354 } 00355 /* Inverse DCT */ 00356 jinit_inverse_dct(cinfo); 00357 /* Entropy decoding: either Huffman or arithmetic coding. */ 00358 if (cinfo->arith_code) 00359 jinit_arith_decoder(cinfo); 00360 else { 00361 jinit_huff_decoder(cinfo); 00362 } 00363 00364 /* Initialize principal buffer controllers. */ 00365 use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image; 00366 jinit_d_coef_controller(cinfo, use_c_buffer); 00367 00368 if (! cinfo->raw_data_out) 00369 jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */); 00370 00371 /* We can now tell the memory manager to allocate virtual arrays. */ 00372 (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); 00373 00374 /* Initialize input side of decompressor to consume first scan. */ 00375 (*cinfo->inputctl->start_input_pass) (cinfo); 00376 00377 #ifdef D_MULTISCAN_FILES_SUPPORTED 00378 /* If jpeg_start_decompress will read the whole file, initialize 00379 * progress monitoring appropriately. The input step is counted 00380 * as one pass. 00381 */ 00382 if (cinfo->progress != NULL && ! cinfo->buffered_image && 00383 cinfo->inputctl->has_multiple_scans) { 00384 int nscans; 00385 /* Estimate number of scans to set pass_limit. */ 00386 if (cinfo->progressive_mode) { 00387 /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ 00388 nscans = 2 + 3 * cinfo->num_components; 00389 } else { 00390 /* For a nonprogressive multiscan file, estimate 1 scan per component. */ 00391 nscans = cinfo->num_components; 00392 } 00393 cinfo->progress->pass_counter = 0L; 00394 cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; 00395 cinfo->progress->completed_passes = 0; 00396 cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2); 00397 /* Count the input pass as done */ 00398 master->pass_number++; 00399 } 00400 #endif /* D_MULTISCAN_FILES_SUPPORTED */ 00401 } 00402 00403 00404 /* 00405 * Per-pass setup. 00406 * This is called at the beginning of each output pass. We determine which 00407 * modules will be active during this pass and give them appropriate 00408 * start_pass calls. We also set is_dummy_pass to indicate whether this 00409 * is a "real" output pass or a dummy pass for color quantization. 00410 * (In the latter case, jdapistd.c will crank the pass to completion.) 00411 */ 00412 00413 METHODDEF(void) 00414 prepare_for_output_pass (j_decompress_ptr cinfo) 00415 { 00416 my_master_ptr master = (my_master_ptr) cinfo->master; 00417 00418 if (master->pub.is_dummy_pass) { 00419 #ifdef QUANT_2PASS_SUPPORTED 00420 /* Final pass of 2-pass quantization */ 00421 master->pub.is_dummy_pass = FALSE; 00422 (*cinfo->cquantize->start_pass) (cinfo, FALSE); 00423 (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST); 00424 (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST); 00425 #else 00426 ERREXIT(cinfo, JERR_NOT_COMPILED); 00427 #endif /* QUANT_2PASS_SUPPORTED */ 00428 } else { 00429 if (cinfo->quantize_colors && cinfo->colormap == NULL) { 00430 /* Select new quantization method */ 00431 if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) { 00432 cinfo->cquantize = master->quantizer_2pass; 00433 master->pub.is_dummy_pass = TRUE; 00434 } else if (cinfo->enable_1pass_quant) { 00435 cinfo->cquantize = master->quantizer_1pass; 00436 } else { 00437 ERREXIT(cinfo, JERR_MODE_CHANGE); 00438 } 00439 } 00440 (*cinfo->idct->start_pass) (cinfo); 00441 (*cinfo->coef->start_output_pass) (cinfo); 00442 if (! cinfo->raw_data_out) { 00443 if (! master->using_merged_upsample) 00444 (*cinfo->cconvert->start_pass) (cinfo); 00445 (*cinfo->upsample->start_pass) (cinfo); 00446 if (cinfo->quantize_colors) 00447 (*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass); 00448 (*cinfo->post->start_pass) (cinfo, 00449 (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); 00450 (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); 00451 } 00452 } 00453 00454 /* Set up progress monitor's pass info if present */ 00455 if (cinfo->progress != NULL) { 00456 cinfo->progress->completed_passes = master->pass_number; 00457 cinfo->progress->total_passes = master->pass_number + 00458 (master->pub.is_dummy_pass ? 2 : 1); 00459 /* In buffered-image mode, we assume one more output pass if EOI not 00460 * yet reached, but no more passes if EOI has been reached. 00461 */ 00462 if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) { 00463 cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1); 00464 } 00465 } 00466 } 00467 00468 00469 /* 00470 * Finish up at end of an output pass. 00471 */ 00472 00473 METHODDEF(void) 00474 finish_output_pass (j_decompress_ptr cinfo) 00475 { 00476 my_master_ptr master = (my_master_ptr) cinfo->master; 00477 00478 if (cinfo->quantize_colors) 00479 (*cinfo->cquantize->finish_pass) (cinfo); 00480 master->pass_number++; 00481 } 00482 00483 00484 #ifdef D_MULTISCAN_FILES_SUPPORTED 00485 00486 /* 00487 * Switch to a new external colormap between output passes. 00488 */ 00489 00490 GLOBAL(void) 00491 jpeg_new_colormap (j_decompress_ptr cinfo) 00492 { 00493 my_master_ptr master = (my_master_ptr) cinfo->master; 00494 00495 /* Prevent application from calling me at wrong times */ 00496 if (cinfo->global_state != DSTATE_BUFIMAGE) 00497 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); 00498 00499 if (cinfo->quantize_colors && cinfo->enable_external_quant && 00500 cinfo->colormap != NULL) { 00501 /* Select 2-pass quantizer for external colormap use */ 00502 cinfo->cquantize = master->quantizer_2pass; 00503 /* Notify quantizer of colormap change */ 00504 (*cinfo->cquantize->new_color_map) (cinfo); 00505 master->pub.is_dummy_pass = FALSE; /* just in case */ 00506 } else 00507 ERREXIT(cinfo, JERR_MODE_CHANGE); 00508 } 00509 00510 #endif /* D_MULTISCAN_FILES_SUPPORTED */ 00511 00512 00513 /* 00514 * Initialize master decompression control and select active modules. 00515 * This is performed at the start of jpeg_start_decompress. 00516 */ 00517 00518 GLOBAL(void) 00519 jinit_master_decompress (j_decompress_ptr cinfo) 00520 { 00521 my_master_ptr master; 00522 00523 master = (my_master_ptr) 00524 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, 00525 SIZEOF(my_decomp_master)); 00526 cinfo->master = (struct jpeg_decomp_master *) master; 00527 master->pub.prepare_for_output_pass = prepare_for_output_pass; 00528 master->pub.finish_output_pass = finish_output_pass; 00529 00530 master->pub.is_dummy_pass = FALSE; 00531 00532 master_selection(cinfo); 00533 } Generated on Sat May 26 2012 04:18:12 for ReactOS by
1.7.6.1
|