OLD | NEW |
1 /* | 1 /* |
2 * jdmainct.c | 2 * jdmainct.c |
3 * | 3 * |
4 * Copyright (C) 1994-1996, Thomas G. Lane. | 4 * Copyright (C) 1994-1996, Thomas G. Lane. |
| 5 * Copyright (C) 2010, D. R. Commander. |
5 * This file is part of the Independent JPEG Group's software. | 6 * This file is part of the Independent JPEG Group's software. |
6 * For conditions of distribution and use, see the accompanying README file. | 7 * For conditions of distribution and use, see the accompanying README file. |
7 * | 8 * |
8 * This file contains the main buffer controller for decompression. | 9 * This file contains the main buffer controller for decompression. |
9 * The main buffer lies between the JPEG decompressor proper and the | 10 * The main buffer lies between the JPEG decompressor proper and the |
10 * post-processor; it holds downsampled data in the JPEG colorspace. | 11 * post-processor; it holds downsampled data in the JPEG colorspace. |
11 * | 12 * |
12 * Note that this code is bypassed in raw-data mode, since the application | 13 * Note that this code is bypassed in raw-data mode, since the application |
13 * supplies the equivalent of the main buffer in that case. | 14 * supplies the equivalent of the main buffer in that case. |
14 */ | 15 */ |
15 | 16 |
16 #define JPEG_INTERNALS | 17 #define JPEG_INTERNALS |
17 #include "jinclude.h" | 18 #include "jinclude.h" |
18 #include "jpeglib.h" | 19 #include "jpeglib.h" |
| 20 #include "jpegcomp.h" |
19 | 21 |
20 | 22 |
21 /* | 23 /* |
22 * In the current system design, the main buffer need never be a full-image | 24 * In the current system design, the main buffer need never be a full-image |
23 * buffer; any full-height buffers will be found inside the coefficient or | 25 * buffer; any full-height buffers will be found inside the coefficient or |
24 * postprocessing controllers. Nonetheless, the main controller is not | 26 * postprocessing controllers. Nonetheless, the main controller is not |
25 * trivial. Its responsibility is to provide context rows for upsampling/ | 27 * trivial. Its responsibility is to provide context rows for upsampling/ |
26 * rescaling, and doing this in an efficient fashion is a bit tricky. | 28 * rescaling, and doing this in an efficient fashion is a bit tricky. |
27 * | 29 * |
28 * Postprocessor input data is counted in "row groups". A row group | 30 * Postprocessor input data is counted in "row groups". A row group |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 156 |
155 | 157 |
156 LOCAL(void) | 158 LOCAL(void) |
157 alloc_funny_pointers (j_decompress_ptr cinfo) | 159 alloc_funny_pointers (j_decompress_ptr cinfo) |
158 /* Allocate space for the funny pointer lists. | 160 /* Allocate space for the funny pointer lists. |
159 * This is done only once, not once per pass. | 161 * This is done only once, not once per pass. |
160 */ | 162 */ |
161 { | 163 { |
162 my_main_ptr main = (my_main_ptr) cinfo->main; | 164 my_main_ptr main = (my_main_ptr) cinfo->main; |
163 int ci, rgroup; | 165 int ci, rgroup; |
164 int M = cinfo->min_DCT_scaled_size; | 166 int M = cinfo->_min_DCT_scaled_size; |
165 jpeg_component_info *compptr; | 167 jpeg_component_info *compptr; |
166 JSAMPARRAY xbuf; | 168 JSAMPARRAY xbuf; |
167 | 169 |
168 /* Get top-level space for component array pointers. | 170 /* Get top-level space for component array pointers. |
169 * We alloc both arrays with one call to save a few cycles. | 171 * We alloc both arrays with one call to save a few cycles. |
170 */ | 172 */ |
171 main->xbuffer[0] = (JSAMPIMAGE) | 173 main->xbuffer[0] = (JSAMPIMAGE) |
172 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, | 174 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, |
173 cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); | 175 cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); |
174 main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components; | 176 main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components; |
175 | 177 |
176 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; | 178 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; |
177 ci++, compptr++) { | 179 ci++, compptr++) { |
178 rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / | 180 rgroup = (compptr->v_samp_factor * compptr->_DCT_scaled_size) / |
179 cinfo->min_DCT_scaled_size; /* height of a row group of component */ | 181 cinfo->_min_DCT_scaled_size; /* height of a row group of component */ |
180 /* Get space for pointer lists --- M+4 row groups in each list. | 182 /* Get space for pointer lists --- M+4 row groups in each list. |
181 * We alloc both pointer lists with one call to save a few cycles. | 183 * We alloc both pointer lists with one call to save a few cycles. |
182 */ | 184 */ |
183 xbuf = (JSAMPARRAY) | 185 xbuf = (JSAMPARRAY) |
184 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, | 186 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, |
185 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); | 187 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); |
186 xbuf += rgroup; /* want one row group at negative offsets */ | 188 xbuf += rgroup; /* want one row group at negative offsets */ |
187 main->xbuffer[0][ci] = xbuf; | 189 main->xbuffer[0][ci] = xbuf; |
188 xbuf += rgroup * (M + 4); | 190 xbuf += rgroup * (M + 4); |
189 main->xbuffer[1][ci] = xbuf; | 191 main->xbuffer[1][ci] = xbuf; |
190 } | 192 } |
191 } | 193 } |
192 | 194 |
193 | 195 |
194 LOCAL(void) | 196 LOCAL(void) |
195 make_funny_pointers (j_decompress_ptr cinfo) | 197 make_funny_pointers (j_decompress_ptr cinfo) |
196 /* Create the funny pointer lists discussed in the comments above. | 198 /* Create the funny pointer lists discussed in the comments above. |
197 * The actual workspace is already allocated (in main->buffer), | 199 * The actual workspace is already allocated (in main->buffer), |
198 * and the space for the pointer lists is allocated too. | 200 * and the space for the pointer lists is allocated too. |
199 * This routine just fills in the curiously ordered lists. | 201 * This routine just fills in the curiously ordered lists. |
200 * This will be repeated at the beginning of each pass. | 202 * This will be repeated at the beginning of each pass. |
201 */ | 203 */ |
202 { | 204 { |
203 my_main_ptr main = (my_main_ptr) cinfo->main; | 205 my_main_ptr main = (my_main_ptr) cinfo->main; |
204 int ci, i, rgroup; | 206 int ci, i, rgroup; |
205 int M = cinfo->min_DCT_scaled_size; | 207 int M = cinfo->_min_DCT_scaled_size; |
206 jpeg_component_info *compptr; | 208 jpeg_component_info *compptr; |
207 JSAMPARRAY buf, xbuf0, xbuf1; | 209 JSAMPARRAY buf, xbuf0, xbuf1; |
208 | 210 |
209 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; | 211 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; |
210 ci++, compptr++) { | 212 ci++, compptr++) { |
211 rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / | 213 rgroup = (compptr->v_samp_factor * compptr->_DCT_scaled_size) / |
212 cinfo->min_DCT_scaled_size; /* height of a row group of component */ | 214 cinfo->_min_DCT_scaled_size; /* height of a row group of component */ |
213 xbuf0 = main->xbuffer[0][ci]; | 215 xbuf0 = main->xbuffer[0][ci]; |
214 xbuf1 = main->xbuffer[1][ci]; | 216 xbuf1 = main->xbuffer[1][ci]; |
215 /* First copy the workspace pointers as-is */ | 217 /* First copy the workspace pointers as-is */ |
216 buf = main->buffer[ci]; | 218 buf = main->buffer[ci]; |
217 for (i = 0; i < rgroup * (M + 2); i++) { | 219 for (i = 0; i < rgroup * (M + 2); i++) { |
218 xbuf0[i] = xbuf1[i] = buf[i]; | 220 xbuf0[i] = xbuf1[i] = buf[i]; |
219 } | 221 } |
220 /* In the second list, put the last four row groups in swapped order */ | 222 /* In the second list, put the last four row groups in swapped order */ |
221 for (i = 0; i < rgroup * 2; i++) { | 223 for (i = 0; i < rgroup * 2; i++) { |
222 xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i]; | 224 xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i]; |
(...skipping 12 matching lines...) Expand all Loading... |
235 | 237 |
236 | 238 |
237 LOCAL(void) | 239 LOCAL(void) |
238 set_wraparound_pointers (j_decompress_ptr cinfo) | 240 set_wraparound_pointers (j_decompress_ptr cinfo) |
239 /* Set up the "wraparound" pointers at top and bottom of the pointer lists. | 241 /* Set up the "wraparound" pointers at top and bottom of the pointer lists. |
240 * This changes the pointer list state from top-of-image to the normal state. | 242 * This changes the pointer list state from top-of-image to the normal state. |
241 */ | 243 */ |
242 { | 244 { |
243 my_main_ptr main = (my_main_ptr) cinfo->main; | 245 my_main_ptr main = (my_main_ptr) cinfo->main; |
244 int ci, i, rgroup; | 246 int ci, i, rgroup; |
245 int M = cinfo->min_DCT_scaled_size; | 247 int M = cinfo->_min_DCT_scaled_size; |
246 jpeg_component_info *compptr; | 248 jpeg_component_info *compptr; |
247 JSAMPARRAY xbuf0, xbuf1; | 249 JSAMPARRAY xbuf0, xbuf1; |
248 | 250 |
249 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; | 251 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; |
250 ci++, compptr++) { | 252 ci++, compptr++) { |
251 rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / | 253 rgroup = (compptr->v_samp_factor * compptr->_DCT_scaled_size) / |
252 cinfo->min_DCT_scaled_size; /* height of a row group of component */ | 254 cinfo->_min_DCT_scaled_size; /* height of a row group of component */ |
253 xbuf0 = main->xbuffer[0][ci]; | 255 xbuf0 = main->xbuffer[0][ci]; |
254 xbuf1 = main->xbuffer[1][ci]; | 256 xbuf1 = main->xbuffer[1][ci]; |
255 for (i = 0; i < rgroup; i++) { | 257 for (i = 0; i < rgroup; i++) { |
256 xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; | 258 xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; |
257 xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; | 259 xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; |
258 xbuf0[rgroup*(M+2) + i] = xbuf0[i]; | 260 xbuf0[rgroup*(M+2) + i] = xbuf0[i]; |
259 xbuf1[rgroup*(M+2) + i] = xbuf1[i]; | 261 xbuf1[rgroup*(M+2) + i] = xbuf1[i]; |
260 } | 262 } |
261 } | 263 } |
262 } | 264 } |
263 | 265 |
264 | 266 |
265 LOCAL(void) | 267 LOCAL(void) |
266 set_bottom_pointers (j_decompress_ptr cinfo) | 268 set_bottom_pointers (j_decompress_ptr cinfo) |
267 /* Change the pointer lists to duplicate the last sample row at the bottom | 269 /* Change the pointer lists to duplicate the last sample row at the bottom |
268 * of the image. whichptr indicates which xbuffer holds the final iMCU row. | 270 * of the image. whichptr indicates which xbuffer holds the final iMCU row. |
269 * Also sets rowgroups_avail to indicate number of nondummy row groups in row. | 271 * Also sets rowgroups_avail to indicate number of nondummy row groups in row. |
270 */ | 272 */ |
271 { | 273 { |
272 my_main_ptr main = (my_main_ptr) cinfo->main; | 274 my_main_ptr main = (my_main_ptr) cinfo->main; |
273 int ci, i, rgroup, iMCUheight, rows_left; | 275 int ci, i, rgroup, iMCUheight, rows_left; |
274 jpeg_component_info *compptr; | 276 jpeg_component_info *compptr; |
275 JSAMPARRAY xbuf; | 277 JSAMPARRAY xbuf; |
276 | 278 |
277 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; | 279 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; |
278 ci++, compptr++) { | 280 ci++, compptr++) { |
279 /* Count sample rows in one iMCU row and in one row group */ | 281 /* Count sample rows in one iMCU row and in one row group */ |
280 iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size; | 282 iMCUheight = compptr->v_samp_factor * compptr->_DCT_scaled_size; |
281 rgroup = iMCUheight / cinfo->min_DCT_scaled_size; | 283 rgroup = iMCUheight / cinfo->_min_DCT_scaled_size; |
282 /* Count nondummy sample rows remaining for this component */ | 284 /* Count nondummy sample rows remaining for this component */ |
283 rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight); | 285 rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight); |
284 if (rows_left == 0) rows_left = iMCUheight; | 286 if (rows_left == 0) rows_left = iMCUheight; |
285 /* Count nondummy row groups. Should get same answer for each component, | 287 /* Count nondummy row groups. Should get same answer for each component, |
286 * so we need only do it once. | 288 * so we need only do it once. |
287 */ | 289 */ |
288 if (ci == 0) { | 290 if (ci == 0) { |
289 main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); | 291 main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); |
290 } | 292 } |
291 /* Duplicate the last real sample row rgroup*2 times; this pads out the | 293 /* Duplicate the last real sample row rgroup*2 times; this pads out the |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 JDIMENSION rowgroups_avail; | 352 JDIMENSION rowgroups_avail; |
351 | 353 |
352 /* Read input data if we haven't filled the main buffer yet */ | 354 /* Read input data if we haven't filled the main buffer yet */ |
353 if (! main->buffer_full) { | 355 if (! main->buffer_full) { |
354 if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer)) | 356 if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer)) |
355 return; /* suspension forced, can do nothing more */ | 357 return; /* suspension forced, can do nothing more */ |
356 main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ | 358 main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ |
357 } | 359 } |
358 | 360 |
359 /* There are always min_DCT_scaled_size row groups in an iMCU row. */ | 361 /* There are always min_DCT_scaled_size row groups in an iMCU row. */ |
360 rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size; | 362 rowgroups_avail = (JDIMENSION) cinfo->_min_DCT_scaled_size; |
361 /* Note: at the bottom of the image, we may pass extra garbage row groups | 363 /* Note: at the bottom of the image, we may pass extra garbage row groups |
362 * to the postprocessor. The postprocessor has to check for bottom | 364 * to the postprocessor. The postprocessor has to check for bottom |
363 * of image anyway (at row resolution), so no point in us doing it too. | 365 * of image anyway (at row resolution), so no point in us doing it too. |
364 */ | 366 */ |
365 | 367 |
366 /* Feed the postprocessor */ | 368 /* Feed the postprocessor */ |
367 (*cinfo->post->post_process_data) (cinfo, main->buffer, | 369 (*cinfo->post->post_process_data) (cinfo, main->buffer, |
368 &main->rowgroup_ctr, rowgroups_avail, | 370 &main->rowgroup_ctr, rowgroups_avail, |
369 output_buf, out_row_ctr, out_rows_avail); | 371 output_buf, out_row_ctr, out_rows_avail); |
370 | 372 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 output_buf, out_row_ctr, out_rows_avail); | 412 output_buf, out_row_ctr, out_rows_avail); |
411 if (main->rowgroup_ctr < main->rowgroups_avail) | 413 if (main->rowgroup_ctr < main->rowgroups_avail) |
412 return; /* Need to suspend */ | 414 return; /* Need to suspend */ |
413 main->context_state = CTX_PREPARE_FOR_IMCU; | 415 main->context_state = CTX_PREPARE_FOR_IMCU; |
414 if (*out_row_ctr >= out_rows_avail) | 416 if (*out_row_ctr >= out_rows_avail) |
415 return; /* Postprocessor exactly filled output buf */ | 417 return; /* Postprocessor exactly filled output buf */ |
416 /*FALLTHROUGH*/ | 418 /*FALLTHROUGH*/ |
417 case CTX_PREPARE_FOR_IMCU: | 419 case CTX_PREPARE_FOR_IMCU: |
418 /* Prepare to process first M-1 row groups of this iMCU row */ | 420 /* Prepare to process first M-1 row groups of this iMCU row */ |
419 main->rowgroup_ctr = 0; | 421 main->rowgroup_ctr = 0; |
420 main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1); | 422 main->rowgroups_avail = (JDIMENSION) (cinfo->_min_DCT_scaled_size - 1); |
421 /* Check for bottom of image: if so, tweak pointers to "duplicate" | 423 /* Check for bottom of image: if so, tweak pointers to "duplicate" |
422 * the last sample row, and adjust rowgroups_avail to ignore padding rows. | 424 * the last sample row, and adjust rowgroups_avail to ignore padding rows. |
423 */ | 425 */ |
424 if (main->iMCU_row_ctr == cinfo->total_iMCU_rows) | 426 if (main->iMCU_row_ctr == cinfo->total_iMCU_rows) |
425 set_bottom_pointers(cinfo); | 427 set_bottom_pointers(cinfo); |
426 main->context_state = CTX_PROCESS_IMCU; | 428 main->context_state = CTX_PROCESS_IMCU; |
427 /*FALLTHROUGH*/ | 429 /*FALLTHROUGH*/ |
428 case CTX_PROCESS_IMCU: | 430 case CTX_PROCESS_IMCU: |
429 /* Call postprocessor using previously set pointers */ | 431 /* Call postprocessor using previously set pointers */ |
430 (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], | 432 (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], |
431 &main->rowgroup_ctr, main->rowgroups_avail, | 433 &main->rowgroup_ctr, main->rowgroups_avail, |
432 output_buf, out_row_ctr, out_rows_avail); | 434 output_buf, out_row_ctr, out_rows_avail); |
433 if (main->rowgroup_ctr < main->rowgroups_avail) | 435 if (main->rowgroup_ctr < main->rowgroups_avail) |
434 return; /* Need to suspend */ | 436 return; /* Need to suspend */ |
435 /* After the first iMCU, change wraparound pointers to normal state */ | 437 /* After the first iMCU, change wraparound pointers to normal state */ |
436 if (main->iMCU_row_ctr == 1) | 438 if (main->iMCU_row_ctr == 1) |
437 set_wraparound_pointers(cinfo); | 439 set_wraparound_pointers(cinfo); |
438 /* Prepare to load new iMCU row using other xbuffer list */ | 440 /* Prepare to load new iMCU row using other xbuffer list */ |
439 main->whichptr ^= 1; /* 0=>1 or 1=>0 */ | 441 main->whichptr ^= 1; /* 0=>1 or 1=>0 */ |
440 main->buffer_full = FALSE; | 442 main->buffer_full = FALSE; |
441 /* Still need to process last row group of this iMCU row, */ | 443 /* Still need to process last row group of this iMCU row, */ |
442 /* which is saved at index M+1 of the other xbuffer */ | 444 /* which is saved at index M+1 of the other xbuffer */ |
443 main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1); | 445 main->rowgroup_ctr = (JDIMENSION) (cinfo->_min_DCT_scaled_size + 1); |
444 main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2); | 446 main->rowgroups_avail = (JDIMENSION) (cinfo->_min_DCT_scaled_size + 2); |
445 main->context_state = CTX_POSTPONED_ROW; | 447 main->context_state = CTX_POSTPONED_ROW; |
446 } | 448 } |
447 } | 449 } |
448 | 450 |
449 | 451 |
450 /* | 452 /* |
451 * Process some data. | 453 * Process some data. |
452 * Final pass of two-pass quantization: just call the postprocessor. | 454 * Final pass of two-pass quantization: just call the postprocessor. |
453 * Source data will be the postprocessor controller's internal buffer. | 455 * Source data will be the postprocessor controller's internal buffer. |
454 */ | 456 */ |
(...skipping 30 matching lines...) Expand all Loading... |
485 cinfo->main = (struct jpeg_d_main_controller *) main; | 487 cinfo->main = (struct jpeg_d_main_controller *) main; |
486 main->pub.start_pass = start_pass_main; | 488 main->pub.start_pass = start_pass_main; |
487 | 489 |
488 if (need_full_buffer) /* shouldn't happen */ | 490 if (need_full_buffer) /* shouldn't happen */ |
489 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); | 491 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); |
490 | 492 |
491 /* Allocate the workspace. | 493 /* Allocate the workspace. |
492 * ngroups is the number of row groups we need. | 494 * ngroups is the number of row groups we need. |
493 */ | 495 */ |
494 if (cinfo->upsample->need_context_rows) { | 496 if (cinfo->upsample->need_context_rows) { |
495 if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */ | 497 if (cinfo->_min_DCT_scaled_size < 2) /* unsupported, see comments above */ |
496 ERREXIT(cinfo, JERR_NOTIMPL); | 498 ERREXIT(cinfo, JERR_NOTIMPL); |
497 alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */ | 499 alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */ |
498 ngroups = cinfo->min_DCT_scaled_size + 2; | 500 ngroups = cinfo->_min_DCT_scaled_size + 2; |
499 } else { | 501 } else { |
500 ngroups = cinfo->min_DCT_scaled_size; | 502 ngroups = cinfo->_min_DCT_scaled_size; |
501 } | 503 } |
502 | 504 |
503 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; | 505 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; |
504 ci++, compptr++) { | 506 ci++, compptr++) { |
505 rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / | 507 rgroup = (compptr->v_samp_factor * compptr->_DCT_scaled_size) / |
506 cinfo->min_DCT_scaled_size; /* height of a row group of component */ | 508 cinfo->_min_DCT_scaled_size; /* height of a row group of component */ |
507 main->buffer[ci] = (*cinfo->mem->alloc_sarray) | 509 main->buffer[ci] = (*cinfo->mem->alloc_sarray) |
508 ((j_common_ptr) cinfo, JPOOL_IMAGE, | 510 ((j_common_ptr) cinfo, JPOOL_IMAGE, |
509 » » » compptr->width_in_blocks * compptr->DCT_scaled_size, | 511 » » » compptr->width_in_blocks * compptr->_DCT_scaled_size, |
510 (JDIMENSION) (rgroup * ngroups)); | 512 (JDIMENSION) (rgroup * ngroups)); |
511 } | 513 } |
512 } | 514 } |
OLD | NEW |