jdhuff.h File Reference

Go to the source code of this file.

Data Structures

struct  bitread_perm_state
struct  bitread_working_state
struct  d_derived_tbl

Defines

#define BIT_BUF_SIZE   32
#define BITREAD_LOAD_STATE(cinfop, permstate)
#define BITREAD_SAVE_STATE(cinfop, permstate)
#define BITREAD_STATE_VARS
#define CHECK_BIT_BUFFER(state, nbits, action)
#define DROP_BITS(nbits)   (bits_left -= (nbits))
#define GET_BITS(nbits)   (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))
#define HUFF_DECODE(result, state, htbl, failaction, slowlabel)
#define HUFF_LOOKAHEAD   8
#define PEEK_BITS(nbits)   (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1))

Typedefs

typedef INT32 bit_buf_type

Functions

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

Variables

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


Define Documentation

#define BIT_BUF_SIZE   32

Definition at line 73 of file jdhuff.h.

#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;

Definition at line 107 of file jdhuff.h.

Referenced by decode_mcu(), decode_mcu_AC_first(), decode_mcu_AC_refine(), decode_mcu_DC_first(), and decode_mcu_DC_refine().

#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

Definition at line 114 of file jdhuff.h.

Referenced by decode_mcu(), decode_mcu_AC_first(), decode_mcu_AC_refine(), decode_mcu_DC_first(), and decode_mcu_DC_refine().

#define BITREAD_STATE_VARS

#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; } }

Definition at line 138 of file jdhuff.h.

Referenced by decode_mcu(), decode_mcu_AC_first(), decode_mcu_AC_refine(), decode_mcu_DC_first(), decode_mcu_DC_refine(), and jpeg_huff_decode().

#define DROP_BITS ( nbits   )     (bits_left -= (nbits))

Definition at line 150 of file jdhuff.h.

Referenced by decode_mcu().

#define GET_BITS ( nbits   )     (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))

#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; \
  } \
}

Definition at line 176 of file jdhuff.h.

Referenced by decode_mcu(), decode_mcu_AC_first(), decode_mcu_AC_refine(), and decode_mcu_DC_first().

#define HUFF_LOOKAHEAD   8

Definition at line 24 of file jdhuff.h.

Referenced by jpeg_make_d_derived_tbl().

#define PEEK_BITS ( nbits   )     (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1))

Definition at line 147 of file jdhuff.h.


Typedef Documentation

Definition at line 72 of file jdhuff.h.


Function Documentation

EXTERN ( boolean   ) 

EXTERN ( void   ) 


Variable Documentation

register bit_buf_type register int bits_left

Definition at line 155 of file jdhuff.h.

Definition at line 155 of file jdhuff.h.

register bit_buf_type register int d_derived_tbl* htbl

Definition at line 200 of file jdhuff.h.

Definition at line 50 of file jdhuff.h.

register bit_buf_type register int d_derived_tbl int min_bits

Definition at line 200 of file jdhuff.h.

register bit_buf_type register int int nbits

Definition at line 155 of file jdhuff.h.

Referenced by encode_one_block(), and htest_one_block().

Definition at line 50 of file jdhuff.h.

Definition at line 50 of file jdhuff.h.


Generated on Fri Feb 19 02:31:03 2010 for AVR32 - IJG JPEG Decoder Example by  doxygen 1.5.5