13 #define JPEG_INTERNALS
41 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
46 (*cinfo->
dest->init_destination) (cinfo);
89 if (srcinfo->quant_tbl_ptrs[
tblno] != NULL) {
94 srcinfo->quant_tbl_ptrs[
tblno]->quantval,
95 SIZEOF((*qtblptr)->quantval));
96 (*qtblptr)->sent_table =
FALSE;
107 ci < dstinfo->num_components; ci++, incomp++, outcomp++) {
118 srcinfo->quant_tbl_ptrs[
tblno] == NULL)
120 slot_quant = srcinfo->quant_tbl_ptrs[
tblno];
122 if (c_quant != NULL) {
123 for (coefi = 0; coefi <
DCTSIZE2; coefi++) {
140 if (srcinfo->saw_JFIF_marker) {
141 if (srcinfo->JFIF_major_version == 1) {
164 cinfo->input_components = 1;
169 if (cinfo->arith_code) {
170 ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
172 if (cinfo->progressive_mode) {
173 #ifdef C_PROGRESSIVE_SUPPORTED
176 ERREXIT(cinfo, JERR_NOT_COMPILED);
188 (*cinfo->mem->realize_virt_arrays) ((
j_common_ptr) cinfo);
194 (*cinfo->marker->write_file_header) (cinfo);
214 int MCU_rows_per_iMCU_row;
236 if (cinfo->comps_in_scan > 1) {
260 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
282 JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
283 JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
284 int blkn, ci, xindex, yindex, yoffset, blockcnt;
292 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
293 compptr = cinfo->cur_comp_info[ci];
294 buffer[ci] = (*cinfo->mem->access_virt_barray)
301 for (yoffset = coef->
MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
303 for (MCU_col_num = coef->
mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
307 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
308 compptr = cinfo->cur_comp_info[ci];
314 yindex+yoffset < compptr->last_row_height) {
316 buffer_ptr =
buffer[ci][yindex+yoffset] + start_col;
317 for (xindex = 0; xindex < blockcnt; xindex++)
318 MCU_buffer[blkn++] = buffer_ptr++;
331 MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0];
337 if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) {