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 30 int32_t valoffset[17];
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)) 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; \ void jpeg_make_d_derived_tbl(j_decompress_ptr cinfo, boolean isDC, int tblno, d_derived_tbl **pdtbl)
Definition: jdhuff.cpp:149
bit_buf_type get_buffer
Definition: jdhuff.h:95
int jpeg_huff_decode(bitread_working_state *state, register bit_buf_type get_buffer, register int bits_left, d_derived_tbl *htbl, int min_bits)
Definition: jdhuff.cpp:398
boolean int d_derived_tbl ** pdtbl
Definition: jdhuff.h:50
int bits_left
Definition: jdhuff.h:96
const JOCTET * next_input_byte
Definition: jdhuff.h:90
register bit_buf_type register int d_derived_tbl * htbl
Definition: jdhuff.h:200
size_t bytes_in_buffer
Definition: jdhuff.h:91
j_decompress_ptr cinfo
Definition: jdhuff.h:98
EXTERN(void) jpeg_make_d_derived_tbl JPP((j_decompress_ptr cinfo
boolean isDC
Definition: jdhuff.h:50
register bit_buf_type register int d_derived_tbl int min_bits
Definition: jdhuff.h:200
bit_buf_type get_buffer
Definition: jdhuff.h:83
boolean int tblno
Definition: jdhuff.h:50
register bit_buf_type register int int nbits
Definition: jdhuff.h:155
#define JPP(arglist)
Definition: jpeglib.h:823
#define HUFF_LOOKAHEAD
Definition: jdhuff.h:24
Definition: jpeglib.h:416
int32_t bit_buf_type
Definition: jdhuff.h:72
char JOCTET
Definition: jmorecfg.h:115
Definition: jpeglib.h:105
register bit_buf_type get_buffer
Definition: jdhuff.h:155
JHUFF_TBL * pub
Definition: jdhuff.h:37
register bit_buf_type register int bits_left
Definition: jdhuff.h:155
int bits_left
Definition: jdhuff.h:84
boolean jpeg_fill_bit_buffer(bitread_working_state *state, register bit_buf_type get_buffer, register int bits_left, int nbits)
Definition: jdhuff.cpp:292