Lines Matching refs:entropy

8  * This file contains Huffman entropy decoding routines for progressive JPEG.
26 * Expanded entropy decoder object for progressive Huffman decoding.
97 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
154 entropy->pub.decode_mcu = decode_mcu_DC_first;
156 entropy->pub.decode_mcu = decode_mcu_AC_first;
159 entropy->pub.decode_mcu = decode_mcu_DC_refine;
161 entropy->pub.decode_mcu = decode_mcu_AC_refine;
173 & entropy->derived_tbls[tbl]);
178 & entropy->derived_tbls[tbl]);
180 entropy->ac_derived_tbl = entropy->derived_tbls[tbl];
183 entropy->saved.last_dc_val[ci] = 0;
187 entropy->bitstate.bits_left = 0;
188 entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
189 entropy->pub.insufficient_data = FALSE;
192 entropy->saved.EOBRUN = 0;
195 entropy->restarts_to_go = cinfo->restart_interval;
233 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
238 cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
239 entropy->bitstate.bits_left = 0;
247 entropy->saved.last_dc_val[ci] = 0;
249 entropy->saved.EOBRUN = 0;
252 entropy->restarts_to_go = cinfo->restart_interval;
260 entropy->pub.insufficient_data = FALSE;
291 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
303 if (entropy->restarts_to_go == 0)
311 if (! entropy->pub.insufficient_data) {
314 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
315 ASSIGN_STATE(state, entropy->saved);
323 tbl = entropy->derived_tbls[compptr->dc_tbl_no];
343 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
344 ASSIGN_STATE(entropy->saved, state);
348 entropy->restarts_to_go--;
362 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
373 if (entropy->restarts_to_go == 0)
381 if (! entropy->pub.insufficient_data) {
386 EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
393 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
395 tbl = entropy->ac_derived_tbl;
424 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
428 entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
432 entropy->restarts_to_go--;
447 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
455 if (entropy->restarts_to_go == 0)
465 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
480 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
483 entropy->restarts_to_go--;
496 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
511 if (entropy->restarts_to_go == 0)
518 if (! entropy->pub.insufficient_data) {
521 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
522 EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
526 tbl = entropy->ac_derived_tbl;
621 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
622 entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
626 entropy->restarts_to_go--;
647 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
649 offset->EOBRUN = entropy->saved.EOBRUN;
651 offset->prev_dc[i] = entropy->saved.last_dc_val[i];
663 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
667 if (entropy->restarts_to_go == 0)
673 offset->restarts_to_go = (unsigned short) entropy->restarts_to_go;
678 + entropy->bitstate.bits_left;
680 offset->get_buffer = entropy->bitstate.get_buffer;
692 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
694 entropy->saved.EOBRUN = offset.EOBRUN;
696 entropy->saved.last_dc_val[i] = offset.prev_dc[i];
706 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
710 entropy->restarts_to_go = offset.restarts_to_go;
728 phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
743 * Module initialization routine for progressive Huffman entropy decoding.
748 phuff_entropy_ptr entropy;
752 entropy = (phuff_entropy_ptr)
755 cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
756 entropy->pub.start_pass = start_pass_phuff_decoder;
757 entropy->pub.configure_huffman_decoder = configure_huffman_decoder;
758 entropy->pub.get_huffman_decoder_configuration =
763 entropy->derived_tbls[i] = NULL;