Lines Matching defs:entropy
8 * This file contains Huffman entropy decoding routines.
26 * Expanded entropy decoder object for Huffman decoding.
89 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
108 & entropy->dc_derived_tbls[dctbl]);
110 & entropy->ac_derived_tbls[actbl]);
112 entropy->saved.last_dc_val[ci] = 0;
120 entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no];
121 entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no];
124 entropy->dc_needed[blkn] = TRUE;
126 entropy->ac_needed[blkn] = (compptr->DCT_scaled_size > 1);
128 entropy->dc_needed[blkn] = entropy->ac_needed[blkn] = FALSE;
133 entropy->bitstate.bits_left = 0;
134 entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
135 entropy->pub.insufficient_data = FALSE;
138 entropy->restarts_to_go = cinfo->restart_interval;
373 if (! cinfo->entropy->insufficient_data) {
375 cinfo->entropy->insufficient_data = TRUE;
471 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
476 cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
477 entropy->bitstate.bits_left = 0;
485 entropy->saved.last_dc_val[ci] = 0;
488 entropy->restarts_to_go = cinfo->restart_interval;
496 entropy->pub.insufficient_data = FALSE;
509 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
514 dc_info[i] = entropy->saved.last_dc_val[i];
526 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
530 if (entropy->restarts_to_go == 0)
536 offset->restarts_to_go = (unsigned short) entropy->restarts_to_go;
541 + entropy->bitstate.bits_left;
543 offset->get_buffer = entropy->bitstate.get_buffer;
553 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
558 entropy->saved.last_dc_val[i] = dc_info[i];
569 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
573 entropy->restarts_to_go = offset.restarts_to_go;
605 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
612 if (entropy->restarts_to_go == 0)
620 if (! entropy->pub.insufficient_data) {
622 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
623 ASSIGN_STATE(state, entropy->saved);
629 d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn];
630 d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn];
643 if (entropy->dc_needed[blkn]) {
652 if (entropy->ac_needed[blkn]) {
704 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
705 ASSIGN_STATE(entropy->saved, state);
709 entropy->restarts_to_go--;
724 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
731 if (entropy->restarts_to_go == 0)
736 if (! entropy->pub.insufficient_data) {
739 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
740 ASSIGN_STATE(state, entropy->saved);
745 d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn];
746 d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn];
760 if (entropy->dc_needed[blkn]) {
785 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
786 ASSIGN_STATE(entropy->saved, state);
790 entropy->restarts_to_go--;
797 * Module initialization routine for Huffman entropy decoding.
803 huff_entropy_ptr entropy;
806 entropy = (huff_entropy_ptr)
809 cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
810 entropy->pub.start_pass = start_pass_huff_decoder;
811 entropy->pub.decode_mcu = decode_mcu;
812 entropy->pub.decode_mcu_discard_coef = decode_mcu_discard_coef;
813 entropy->pub.configure_huffman_decoder = configure_huffman_decoder;
814 entropy->pub.get_huffman_decoder_configuration =
816 entropy->pub.index = NULL;
820 entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
879 huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
881 entropy->bitstate.bits_left = bit_left;
882 entropy->bitstate.get_buffer = buf;