13 #define JPEG_INTERNALS 23 #ifdef ENTROPY_OPT_SUPPORTED 24 #define FULL_COEF_BUFFER_SUPPORTED 26 #ifdef C_MULTISCAN_FILES_SUPPORTED 27 #define FULL_COEF_BUFFER_SUPPORTED 63 #ifdef FULL_COEF_BUFFER_SUPPORTED 110 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
113 #ifdef FULL_COEF_BUFFER_SUPPORTED 116 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
121 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
126 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
147 JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
148 JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
149 int blkn, bi, ci, yindex, yoffset, blockcnt;
156 for (MCU_col_num = coef->
mcu_ctr; MCU_col_num <= last_MCU_col;
168 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
169 compptr = cinfo->cur_comp_info[ci];
176 yoffset+yindex < compptr->last_row_height) {
177 (*cinfo->fdct->forward_DCT) (cinfo,
compptr,
181 if (blockcnt < compptr->MCU_width) {
204 if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->
MCU_buffer)) {
221 #ifdef FULL_COEF_BUFFER_SUPPORTED 248 JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
249 JDIMENSION blocks_across, MCUs_across, MCUindex;
250 int bi, ci, h_samp_factor, block_row, block_rows, ndummy;
256 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
259 buffer = (*cinfo->mem->access_virt_barray)
274 ndummy = (
int) (blocks_across % h_samp_factor);
276 ndummy = h_samp_factor - ndummy;
280 for (block_row = 0; block_row < block_rows; block_row++) {
281 thisblockrow =
buffer[block_row];
282 (*cinfo->fdct->forward_DCT) (cinfo,
compptr,
283 input_buf[ci], thisblockrow,
288 thisblockrow += blocks_across;
290 lastDC = thisblockrow[-1][0];
291 for (bi = 0; bi < ndummy; bi++) {
292 thisblockrow[bi][0] = lastDC;
302 blocks_across += ndummy;
303 MCUs_across = blocks_across / h_samp_factor;
306 thisblockrow =
buffer[block_row];
307 lastblockrow =
buffer[block_row-1];
310 for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) {
311 lastDC = lastblockrow[h_samp_factor-1][0];
312 for (bi = 0; bi < h_samp_factor; bi++) {
313 thisblockrow[bi][0] = lastDC;
315 thisblockrow += h_samp_factor;
316 lastblockrow += h_samp_factor;
345 int blkn, ci, xindex, yindex, yoffset;
355 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
356 compptr = cinfo->cur_comp_info[ci];
357 buffer[ci] = (*cinfo->mem->access_virt_barray)
364 for (yoffset = coef->
MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
366 for (MCU_col_num = coef->
mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
370 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
371 compptr = cinfo->cur_comp_info[ci];
374 buffer_ptr =
buffer[ci][yindex+yoffset] + start_col;
381 if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->
MCU_buffer)) {
416 if (need_full_buffer) {
417 #ifdef FULL_COEF_BUFFER_SUPPORTED 423 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
425 coef->
whole_image[ci] = (*cinfo->mem->request_virt_barray)
434 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
struct jpeg_common_struct * j_common_ptr
compress_data(j_compress_ptr cinfo, JSAMPIMAGE input_buf)
#define ERREXIT(cinfo, code)
jpeg_component_info * compptr
JDIMENSION width_in_blocks
struct jpeg_c_coef_controller pub
jround_up(long a, long b)
compress_output(j_compress_ptr cinfo, JSAMPIMAGE input_buf)
JDIMENSION height_in_blocks
compress_first_pass(j_compress_ptr cinfo, JSAMPIMAGE input_buf)
struct jpeg_c_coef_controller * coef
my_coef_controller * my_coef_ptr
JDIMENSION total_iMCU_rows
#define C_MAX_BLOCKS_IN_MCU
jzero_far(void FAR *target, size_t bytestozero)
start_pass_coef(j_compress_ptr cinfo, J_BUF_MODE pass_mode)
start_iMCU_row(j_compress_ptr cinfo)
png_infop png_bytep buffer
jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]
jinit_c_coef_controller(j_compress_ptr cinfo, boolean need_full_buffer)
#define MAX_COMPS_IN_SCAN
JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]
int MCU_rows_per_iMCU_row
jvirt_barray_ptr whole_image[MAX_COMPONENTS]