Assignments Assignments

Classes | Macros | Typedefs | Functions | Variables
jdhuff.h File Reference

Go to the source code of this file.

## Classes
struct | d_derived_tbl
struct | bitread_perm_state
struct | bitread_working_state

## Macros
#define | HUFF_LOOKAHEAD 8 /* # of bits of lookahead */
#define | BIT_BUF_SIZE 32 /* size of buffer in bits */
#define | BITREAD_STATE_VARS
#define | BITREAD_LOAD_STATE(cinfop, permstate)
#define | BITREAD_SAVE_STATE(cinfop, permstate)
#define | CHECK_BIT_BUFFER(state, nbits, action)
#define | GET_BITS(nbits)
#define | PEEK_BITS(nbits)
#define | DROP_BITS(nbits)
#define | HUFF_DECODE(result, state, htbl, failaction, slowlabel)

## Typedefs
typedef INT32 | bit_buf_type

## Functions
| EXTERN (void) jpeg_make_d_derived_tbl JPP((j_decompress_ptr cinfo
| EXTERN (boolean) jpeg_fill_bit_buffer JPP((bitread_working_state *state

## Variables
boolean | isDC
boolean int | tblno
boolean int d_derived_tbl ** | pdtbl
register bit_buf_type | get_buffer
register bit_buf_type register int | bits_left
register bit_buf_type register int int | nbits
register bit_buf_type register int d_derived_tbl * | htbl
register bit_buf_type register int d_derived_tbl int | min_bits

## Macro Definition Documentation

## ◆ BIT_BUF_SIZE

#define BIT_BUF_SIZE 32 /* size of buffer in bits */

## ◆ BITREAD_LOAD_STATE

#define BITREAD_LOAD_STATE | ( |  | cinfop,
|  |  | permstate )

Value:
br_state.cinfo = cinfop; \
br_state.next_input_byte = cinfop->src->next_input_byte; \
br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \
get_buffer = permstate.get_buffer; \
bits_left = permstate.bits_left;
bits_left
register bit_buf_type register int bits_left
Definition jdhuff.h:156
get_buffer
register bit_buf_type get_buffer
Definition jdhuff.h:155

## ◆ BITREAD_SAVE_STATE

#define BITREAD_SAVE_STATE | ( |  | cinfop,
|  |  | permstate )

Value:
cinfop->src->next_input_byte = br_state.next_input_byte; \
cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \
permstate.get_buffer = get_buffer; \
permstate.bits_left = bits_left

## ◆ BITREAD_STATE_VARS

#define BITREAD_STATE_VARS

Value:
register bit_buf_type get_buffer; \
register int bits_left; \
bitread_working_state br_state
bit_buf_type
INT32 bit_buf_type
Definition jdhuff.h:72
bitread_working_state
Definition jdhuff.h:87

## ◆ CHECK_BIT_BUFFER

#define CHECK_BIT_BUFFER | ( |  | state,
|  |  | nbits,
|  |  | action )

Value:
{ if (bits_left < (nbits)) { \
if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \
{ action; } \
get_buffer = (state).get_buffer; bits_left = (state).bits_left; } }
jpeg_fill_bit_buffer
jpeg_fill_bit_buffer(bitread_working_state *state, register bit_buf_type get_buffer, register int bits_left, int nbits)
Definition jdhuff.cpp:292
nbits
register bit_buf_type register int int nbits
Definition jdhuff.h:156

## ◆ DROP_BITS

#define DROP_BITS | ( |  | nbits | ) |

Value:
(bits_left -= (nbits))

## ◆ GET_BITS

#define GET_BITS | ( |  | nbits | ) |

Value:
(((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))

## ◆ HUFF_DECODE

#define HUFF_DECODE | ( |  | result,
|  |  | state,
|  |  | htbl,
|  |  | failaction,
|  |  | slowlabel )

Value:
{ register int nb, look; \
if (bits_left < HUFF_LOOKAHEAD) { \
if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
get_buffer = state.get_buffer; bits_left = state.bits_left; \
if (bits_left < HUFF_LOOKAHEAD) { \
nb = 1; goto slowlabel; \
} \
} \
look = PEEK_BITS(HUFF_LOOKAHEAD); \
if ((nb = htbl->look_nbits[look]) != 0) { \
DROP_BITS(nb); \
result = htbl->look_sym[look]; \
} else { \
nb = HUFF_LOOKAHEAD+1; \
slowlabel: \
if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
{ failaction; } \
get_buffer = state.get_buffer; bits_left = state.bits_left; \
} \
}
htbl
JHUFF_TBL * htbl
Definition jchuff.h:47
jpeg_huff_decode
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
HUFF_LOOKAHEAD
#define HUFF_LOOKAHEAD
Definition jdhuff.h:24
PEEK_BITS
#define PEEK_BITS(nbits)
Definition jdhuff.h:147

## ◆ HUFF_LOOKAHEAD

#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */

## ◆ PEEK_BITS

#define PEEK_BITS | ( |  | nbits | ) |

Value:
(((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1))

## Typedef Documentation

## ◆ bit_buf_type

typedef INT32 bit_buf_type

## Function Documentation

## ◆ EXTERN() [1/2]

EXTERN | ( | boolean |  | ) |

## ◆ EXTERN() [2/2]

EXTERN | ( | void |  | ) |

## Variable Documentation

## ◆ bits_left

register bit_buf_type register int bits_left

## ◆ get_buffer

register bit_buf_type get_buffer

## ◆ htbl

register bit_buf_type register int d_derived_tbl* htbl

## ◆ isDC

boolean isDC

## ◆ min_bits

register bit_buf_type register int d_derived_tbl int min_bits

## ◆ nbits

register bit_buf_type register int int nbits

## ◆ pdtbl

boolean int d_derived_tbl** pdtbl

## ◆ tblno

boolean int tblno