Atmel Software Framework

jdhuff.h File Reference

Data Structures

struct  bitread_perm_state
 
struct  bitread_working_state
 
struct  d_derived_tbl
 

Macros

#define BIT_BUF_SIZE   32 /* size of buffer in bits */
 
#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 /* # of bits of lookahead */
 
#define PEEK_BITS(nbits)   (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1))
 

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
 
 EXTERN (int) jpeg_huff_decode JPP((bitread_working_state *state
 

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 BIT_BUF_SIZE   32 /* size of buffer in bits */
#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;
register bit_buf_type get_buffer
Definition: jdhuff.h:155
register bit_buf_type register int bits_left
Definition: jdhuff.h:155

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
register bit_buf_type get_buffer
Definition: jdhuff.h:155
register bit_buf_type register int bits_left
Definition: jdhuff.h:155

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
Value:
register int bits_left; \
bitread_working_state br_state
INT32 bit_buf_type
Definition: jdhuff.h:72
register bit_buf_type get_buffer
Definition: jdhuff.h:155
register bit_buf_type register int bits_left
Definition: jdhuff.h:155

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

#define CHECK_BIT_BUFFER (   state,
  nbits,
  action 
)
Value:
{ if (bits_left < (nbits)) { \
{ action; } \
if(Is_usb_id_transition()&&Is_usb_id_interrupt_enabled())
Definition: applications/uc3-audio-player/usb_task.c:395
uint8_t state
Definition: usb_host_user.c:71
register bit_buf_type register int int nbits
Definition: jdhuff.h:155
jpeg_fill_bit_buffer(bitread_working_state *state, register bit_buf_type get_buffer, register int bits_left, int nbits)
Definition: jdhuff.c:292
register bit_buf_type get_buffer
Definition: jdhuff.h:155
register bit_buf_type register int bits_left
Definition: jdhuff.h:155

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))

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; \
get_buffer = state.get_buffer; bits_left = state.bits_left; \
nb = 1; goto slowlabel; \
} \
} \
if ((nb = htbl->look_nbits[look]) != 0) { \
DROP_BITS(nb); \
result = htbl->look_sym[look]; \
} else { \
nb = HUFF_LOOKAHEAD+1; \
slowlabel: \
{ failaction; } \
get_buffer = state.get_buffer; bits_left = state.bits_left; \
} \
}
UINT8 look_sym[1<< HUFF_LOOKAHEAD]
Definition: jdhuff.h:45
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.c:398
#define DROP_BITS(nbits)
Definition: jdhuff.h:150
int look_nbits[1<< HUFF_LOOKAHEAD]
Definition: jdhuff.h:44
register bit_buf_type register int d_derived_tbl * htbl
Definition: jdhuff.h:200
#define PEEK_BITS(nbits)
Definition: jdhuff.h:147
if(Is_usb_id_transition()&&Is_usb_id_interrupt_enabled())
Definition: applications/uc3-audio-player/usb_task.c:395
uint8_t state
Definition: usb_host_user.c:71
#define HUFF_LOOKAHEAD
Definition: jdhuff.h:24
jpeg_fill_bit_buffer(bitread_working_state *state, register bit_buf_type get_buffer, register int bits_left, int nbits)
Definition: jdhuff.c:292
register bit_buf_type get_buffer
Definition: jdhuff.h:155
register bit_buf_type register int bits_left
Definition: jdhuff.h:155

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

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

Referenced by jpeg_make_d_derived_tbl().

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

EXTERN ( void  )
EXTERN ( boolean  )
EXTERN ( int  )

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

Referenced by jpeg_huff_decode().