15 #ifdef NEED_SHORT_EXTERNAL_NAMES 16 #define jpeg_make_d_derived_tbl jMkDDerived 17 #define jpeg_fill_bit_buffer jFilBitBuf 18 #define jpeg_huff_decode jHufDecode 24 #define HUFF_LOOKAHEAD 8 49 EXTERN(
void) jpeg_make_d_derived_tbl
73 #define BIT_BUF_SIZE 32 102 #define BITREAD_STATE_VARS \ 103 register bit_buf_type get_buffer; \ 104 register int bits_left; \ 105 bitread_working_state br_state 107 #define BITREAD_LOAD_STATE(cinfop,permstate) \ 108 br_state.cinfo = cinfop; \ 109 br_state.next_input_byte = cinfop->src->next_input_byte; \ 110 br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \ 111 get_buffer = permstate.get_buffer; \ 112 bits_left = permstate.bits_left; 114 #define BITREAD_SAVE_STATE(cinfop,permstate) \ 115 cinfop->src->next_input_byte = br_state.next_input_byte; \ 116 cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \ 117 permstate.get_buffer = get_buffer; \ 118 permstate.bits_left = bits_left 138 #define CHECK_BIT_BUFFER(state,nbits,action) \ 139 { if (bits_left < (nbits)) { \ 140 if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \ 142 get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } 144 #define GET_BITS(nbits) \ 145 (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1)) 147 #define PEEK_BITS(nbits) \ 148 (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1)) 150 #define DROP_BITS(nbits) \ 151 (bits_left -= (nbits)) 154 EXTERN(
boolean) jpeg_fill_bit_buffer
176 #define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \ 177 { register int nb, look; \ 178 if (bits_left < HUFF_LOOKAHEAD) { \ 179 if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \ 180 get_buffer = state.get_buffer; bits_left = state.bits_left; \ 181 if (bits_left < HUFF_LOOKAHEAD) { \ 182 nb = 1; goto slowlabel; \ 185 look = PEEK_BITS(HUFF_LOOKAHEAD); \ 186 if ((nb = htbl->look_nbits[look]) != 0) { \ 188 result = htbl->look_sym[look]; \ 190 nb = HUFF_LOOKAHEAD+1; \ 192 if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ 194 get_buffer = state.get_buffer; bits_left = state.bits_left; \ 199 EXTERN(
int) jpeg_huff_decode
boolean int d_derived_tbl ** pdtbl
const JOCTET * next_input_byte
register bit_buf_type register int d_derived_tbl * htbl
EXTERN(void) jpeg_make_d_derived_tbl JPP((j_decompress_ptr cinfo
register bit_buf_type register int d_derived_tbl int min_bits
register bit_buf_type register int int nbits
register bit_buf_type get_buffer
register bit_buf_type register int bits_left