10 #define JPEG_INTERNALS 20 #ifdef ENTROPY_OPT_SUPPORTED 21 #define FULL_COEF_BUFFER_SUPPORTED 23 #ifdef C_MULTISCAN_FILES_SUPPORTED 24 #define FULL_COEF_BUFFER_SUPPORTED 60 #ifdef FULL_COEF_BUFFER_SUPPORTED 78 if (cinfo->comps_in_scan > 1) {
107 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
110 #ifdef FULL_COEF_BUFFER_SUPPORTED 113 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
118 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
123 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
144 JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
145 JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
146 int blkn, bi, ci, yindex,
yoffset, blockcnt;
153 for (MCU_col_num = coef->
mcu_ctr; MCU_col_num <= last_MCU_col;
165 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
166 compptr = cinfo->cur_comp_info[ci];
173 yoffset+yindex < compptr->last_row_height) {
174 (*cinfo->fdct->forward_DCT) (cinfo,
compptr,
178 if (blockcnt < compptr->MCU_width) {
201 if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->
MCU_buffer)) {
218 #ifdef FULL_COEF_BUFFER_SUPPORTED 245 JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
246 JDIMENSION blocks_across, MCUs_across, MCUindex;
247 int bi, ci, h_samp_factor, block_row, block_rows, ndummy;
253 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
256 buffer = (*cinfo->mem->access_virt_barray)
271 ndummy = (int) (blocks_across % h_samp_factor);
273 ndummy = h_samp_factor - ndummy;
277 for (block_row = 0; block_row < block_rows; block_row++) {
278 thisblockrow =
buffer[block_row];
279 (*cinfo->fdct->forward_DCT) (cinfo,
compptr,
285 thisblockrow += blocks_across;
287 lastDC = thisblockrow[-1][0];
288 for (bi = 0; bi < ndummy; bi++) {
289 thisblockrow[bi][0] = lastDC;
299 blocks_across += ndummy;
300 MCUs_across = blocks_across / h_samp_factor;
303 thisblockrow =
buffer[block_row];
304 lastblockrow =
buffer[block_row-1];
307 for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) {
308 lastDC = lastblockrow[h_samp_factor-1][0];
309 for (bi = 0; bi < h_samp_factor; bi++) {
310 thisblockrow[bi][0] = lastDC;
312 thisblockrow += h_samp_factor;
313 lastblockrow += h_samp_factor;
342 int blkn, ci, xindex, yindex,
yoffset;
352 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
353 compptr = cinfo->cur_comp_info[ci];
354 buffer[ci] = (*cinfo->mem->access_virt_barray)
363 for (MCU_col_num = coef->
mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
367 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
368 compptr = cinfo->cur_comp_info[ci];
378 if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->
MCU_buffer)) {
414 #ifdef FULL_COEF_BUFFER_SUPPORTED 420 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
422 coef->
whole_image[ci] = (*cinfo->mem->request_virt_barray)
431 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
METHODDEF(boolean) compress_data JPP((j_compress_ptr cinfo
jzero_far(void FAR *target, size_t bytestozero)
compress_data(j_compress_ptr cinfo, JSAMPIMAGE input_buf)
#define MAX_COMPS_IN_SCAN
jround_up(long a, long b)
struct jpeg_common_struct * j_common_ptr
#define ERREXIT(cinfo, code)
compress_first_pass(j_compress_ptr cinfo, JSAMPIMAGE input_buf)
jpeg_component_info * compptr
JDIMENSION width_in_blocks
struct jpeg_c_coef_controller pub
JDIMENSION height_in_blocks
GLint GLint GLint yoffset
#define C_MAX_BLOCKS_IN_MCU
compress_output(j_compress_ptr cinfo, JSAMPIMAGE)
start_iMCU_row(j_compress_ptr cinfo)
jinit_c_coef_controller(j_compress_ptr cinfo, boolean need_full_buffer)
start_pass_coef(j_compress_ptr cinfo, J_BUF_MODE pass_mode)
JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]
int MCU_rows_per_iMCU_row
jvirt_barray_ptr whole_image[MAX_COMPONENTS]
my_coef_controller * my_coef_ptr