Lines Matching refs:cinfo
84 METHODDEF(boolean) decode_mcu_DC_first(j_decompress_ptr cinfo,
86 METHODDEF(boolean) decode_mcu_AC_first(j_decompress_ptr cinfo,
88 METHODDEF(boolean) decode_mcu_DC_refine(j_decompress_ptr cinfo,
90 METHODDEF(boolean) decode_mcu_AC_refine(j_decompress_ptr cinfo,
99 start_pass_phuff_decoder(j_decompress_ptr cinfo) in start_pass_phuff_decoder() argument
101 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in start_pass_phuff_decoder()
108 is_DC_band = (cinfo->Ss == 0); in start_pass_phuff_decoder()
113 if (cinfo->Se != 0) in start_pass_phuff_decoder()
117 if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2) in start_pass_phuff_decoder()
120 if (cinfo->comps_in_scan != 1) in start_pass_phuff_decoder()
123 if (cinfo->Ah != 0) { in start_pass_phuff_decoder()
125 if (cinfo->Al != cinfo->Ah - 1) in start_pass_phuff_decoder()
128 if (cinfo->Al > 13) /* need not check for < 0 */ in start_pass_phuff_decoder()
137 ERREXIT4(cinfo, JERR_BAD_PROGRESSION, in start_pass_phuff_decoder()
138 cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); in start_pass_phuff_decoder()
143 for (ci = 0; ci < cinfo->comps_in_scan; ci++) { in start_pass_phuff_decoder()
144 int cindex = cinfo->cur_comp_info[ci]->component_index; in start_pass_phuff_decoder()
145 coef_bit_ptr = &cinfo->coef_bits[cindex][0]; in start_pass_phuff_decoder()
147 WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); in start_pass_phuff_decoder()
148 for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { in start_pass_phuff_decoder()
150 if (cinfo->Ah != expected) in start_pass_phuff_decoder()
151 WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); in start_pass_phuff_decoder()
152 coef_bit_ptr[coefi] = cinfo->Al; in start_pass_phuff_decoder()
157 if (cinfo->Ah == 0) { in start_pass_phuff_decoder()
169 for (ci = 0; ci < cinfo->comps_in_scan; ci++) { in start_pass_phuff_decoder()
170 compptr = cinfo->cur_comp_info[ci]; in start_pass_phuff_decoder()
175 if (cinfo->Ah == 0) { /* DC refinement needs no table */ in start_pass_phuff_decoder()
178 jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, pdtbl); in start_pass_phuff_decoder()
183 jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, pdtbl); in start_pass_phuff_decoder()
200 entropy->restarts_to_go = cinfo->restart_interval; in start_pass_phuff_decoder()
242 process_restart(j_decompress_ptr cinfo) in process_restart() argument
244 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in process_restart()
249 cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; in process_restart()
253 if (!(*cinfo->marker->read_restart_marker) (cinfo)) in process_restart()
257 for (ci = 0; ci < cinfo->comps_in_scan; ci++) in process_restart()
263 entropy->restarts_to_go = cinfo->restart_interval; in process_restart()
270 if (cinfo->unread_marker == 0) in process_restart()
300 decode_mcu_DC_first(j_decompress_ptr cinfo, JBLOCKROW *MCU_data) in decode_mcu_DC_first() argument
302 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in decode_mcu_DC_first()
303 int Al = cinfo->Al; in decode_mcu_DC_first()
313 if (cinfo->restart_interval) { in decode_mcu_DC_first()
315 if (!process_restart(cinfo)) in decode_mcu_DC_first()
325 BITREAD_LOAD_STATE(cinfo, entropy->bitstate); in decode_mcu_DC_first()
330 for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { in decode_mcu_DC_first()
332 ci = cinfo->MCU_membership[blkn]; in decode_mcu_DC_first()
333 compptr = cinfo->cur_comp_info[ci]; in decode_mcu_DC_first()
350 ERREXIT(cinfo, JERR_BAD_DCT_COEF); in decode_mcu_DC_first()
358 BITREAD_SAVE_STATE(cinfo, entropy->bitstate); in decode_mcu_DC_first()
375 decode_mcu_AC_first(j_decompress_ptr cinfo, JBLOCKROW *MCU_data) in decode_mcu_AC_first() argument
377 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in decode_mcu_AC_first()
378 int Se = cinfo->Se; in decode_mcu_AC_first()
379 int Al = cinfo->Al; in decode_mcu_AC_first()
387 if (cinfo->restart_interval) { in decode_mcu_AC_first()
389 if (!process_restart(cinfo)) in decode_mcu_AC_first()
408 BITREAD_LOAD_STATE(cinfo, entropy->bitstate); in decode_mcu_AC_first()
412 for (k = cinfo->Ss; k <= Se; k++) { in decode_mcu_AC_first()
439 BITREAD_SAVE_STATE(cinfo, entropy->bitstate); in decode_mcu_AC_first()
460 decode_mcu_DC_refine(j_decompress_ptr cinfo, JBLOCKROW *MCU_data) in decode_mcu_DC_refine() argument
462 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in decode_mcu_DC_refine()
463 int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ in decode_mcu_DC_refine()
469 if (cinfo->restart_interval) { in decode_mcu_DC_refine()
471 if (!process_restart(cinfo)) in decode_mcu_DC_refine()
480 BITREAD_LOAD_STATE(cinfo, entropy->bitstate); in decode_mcu_DC_refine()
484 for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { in decode_mcu_DC_refine()
495 BITREAD_SAVE_STATE(cinfo, entropy->bitstate); in decode_mcu_DC_refine()
509 decode_mcu_AC_refine(j_decompress_ptr cinfo, JBLOCKROW *MCU_data) in decode_mcu_AC_refine() argument
511 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in decode_mcu_AC_refine()
512 int Se = cinfo->Se; in decode_mcu_AC_refine()
513 int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ in decode_mcu_AC_refine()
514 int m1 = (NEG_1) << cinfo->Al; /* -1 in the bit position being coded */ in decode_mcu_AC_refine()
525 if (cinfo->restart_interval) { in decode_mcu_AC_refine()
527 if (!process_restart(cinfo)) in decode_mcu_AC_refine()
536 BITREAD_LOAD_STATE(cinfo, entropy->bitstate); in decode_mcu_AC_refine()
552 k = cinfo->Ss; in decode_mcu_AC_refine()
561 WARNMS(cinfo, JWRN_HUFF_BAD_CODE); in decode_mcu_AC_refine()
636 BITREAD_SAVE_STATE(cinfo, entropy->bitstate); in decode_mcu_AC_refine()
659 jinit_phuff_decoder(j_decompress_ptr cinfo) in jinit_phuff_decoder() argument
666 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in jinit_phuff_decoder()
668 cinfo->entropy = (struct jpeg_entropy_decoder *)entropy; in jinit_phuff_decoder()
677 cinfo->coef_bits = (int (*)[DCTSIZE2]) in jinit_phuff_decoder()
678 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in jinit_phuff_decoder()
679 cinfo->num_components * DCTSIZE2 * in jinit_phuff_decoder()
681 coef_bit_ptr = &cinfo->coef_bits[0][0]; in jinit_phuff_decoder()
682 for (ci = 0; ci < cinfo->num_components; ci++) in jinit_phuff_decoder()