Lines Matching refs:entropy
8 * This file contains Huffman entropy decoding routines for progressive JPEG.
26 * Expanded entropy decoder object for progressive Huffman decoding.
93 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
150 entropy->pub.decode_mcu = decode_mcu_DC_first;
152 entropy->pub.decode_mcu = decode_mcu_AC_first;
155 entropy->pub.decode_mcu = decode_mcu_DC_refine;
157 entropy->pub.decode_mcu = decode_mcu_AC_refine;
169 & entropy->derived_tbls[tbl]);
174 & entropy->derived_tbls[tbl]);
176 entropy->ac_derived_tbl = entropy->derived_tbls[tbl];
179 entropy->saved.last_dc_val[ci] = 0;
183 entropy->bitstate.bits_left = 0;
184 entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
185 entropy->pub.insufficient_data = FALSE;
188 entropy->saved.EOBRUN = 0;
191 entropy->restarts_to_go = cinfo->restart_interval;
229 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
234 cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
235 entropy->bitstate.bits_left = 0;
243 entropy->saved.last_dc_val[ci] = 0;
245 entropy->saved.EOBRUN = 0;
248 entropy->restarts_to_go = cinfo->restart_interval;
256 entropy->pub.insufficient_data = FALSE;
287 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
299 if (entropy->restarts_to_go == 0)
307 if (! entropy->pub.insufficient_data) {
310 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
311 ASSIGN_STATE(state, entropy->saved);
319 tbl = entropy->derived_tbls[compptr->dc_tbl_no];
339 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
340 ASSIGN_STATE(entropy->saved, state);
344 entropy->restarts_to_go--;
358 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
369 if (entropy->restarts_to_go == 0)
377 if (! entropy->pub.insufficient_data) {
382 EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
389 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
391 tbl = entropy->ac_derived_tbl;
420 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
424 entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
428 entropy->restarts_to_go--;
443 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
451 if (entropy->restarts_to_go == 0)
461 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
476 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
479 entropy->restarts_to_go--;
492 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
507 if (entropy->restarts_to_go == 0)
514 if (! entropy->pub.insufficient_data) {
517 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
518 EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
522 tbl = entropy->ac_derived_tbl;
617 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
618 entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
622 entropy->restarts_to_go--;
642 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
646 if (entropy->restarts_to_go == 0)
652 offset->restarts_to_go = (unsigned short) entropy->restarts_to_go;
657 + entropy->bitstate.bits_left;
659 offset->get_buffer = entropy->bitstate.get_buffer;
671 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
673 offset->EOBRUN = entropy->saved.EOBRUN;
675 offset->prev_dc[i] = entropy->saved.last_dc_val[i];
685 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
689 entropy->restarts_to_go = offset.restarts_to_go;
711 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
713 entropy->saved.EOBRUN = offset.EOBRUN;
715 entropy->saved.last_dc_val[i] = offset.prev_dc[i];
722 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
737 * Module initialization routine for progressive Huffman entropy decoding.
742 phuff_entropy_ptr entropy;
746 entropy = (phuff_entropy_ptr)
749 cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
750 entropy->pub.start_pass = start_pass_phuff_decoder;
751 entropy->pub.configure_huffman_decoder = configure_huffman_decoder;
752 entropy->pub.get_huffman_decoder_configuration =
757 entropy->derived_tbls[i] = NULL;