Microchip® Advanced Software Framework

jchuff.c File Reference
#include "jinclude.h"
#include "jpeglib.h"
#include "jchuff.h"

Data Structures

struct  huff_entropy_encoder
 
struct  savable_state
 
struct  working_state
 

Macros

#define ASSIGN_STATE(dest, src)   ((dest) = (src))
 
#define emit_byte(state, val, action)
 
#define JPEG_INTERNALS
 
#define MAX_CLEN   32 /* assumed maximum initial code length */
 

Typedefs

typedef huff_entropy_encoderhuff_entropy_ptr
 

Functions

 emit_restart (working_state *state, int restart_num)
 
 encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 
 encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 
 encode_one_block (working_state *state, JCOEFPTR block, int last_dc_val, c_derived_tbl *dctbl, c_derived_tbl *actbl)
 
 ERREXIT (state->cinfo, JERR_HUFF_MISSING_CODE)
 
 finish_pass_gather (j_compress_ptr cinfo)
 
 finish_pass_huff (j_compress_ptr cinfo)
 
 flush_bits (working_state *state)
 
 htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, long dc_counts[], long ac_counts[])
 
 if (!(*dest->empty_output_buffer)(state->cinfo)) return FALSE
 
 jinit_huff_encoder (j_compress_ptr cinfo)
 
 jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL *htbl, long freq[])
 
 jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno, c_derived_tbl **pdtbl)
 
 METHODDEF (boolean)
 
 while (put_bits >=8)
 

Variables

state free_in_buffer = dest->free_in_buffer
 
 INLINE
 
state next_output_byte = dest->next_output_byte
 
register int put_bits = state->cur.put_bits
 
put_buffer<<=24-put_bits;put_buffer|=state->
cur 
put_buffer = put_buffer
 
return TRUE
 

#define ASSIGN_STATE (   dest,
  src 
)    ((dest) = (src))
#define emit_byte (   state,
  val,
  action 
)
Value:
if (! dump_buffer(state)) \
{ action; } }
if(memp!=NULL)
Definition: lwip-1.4.1/src/core/memp.c:407
int val
Definition: jpeglib.h:957
*dest next_output_byte
Definition: jcmarker.c:113
enum rtouch_state_enum state
Current driver state.
Definition: rtouch.c:71
char JOCTET
Definition: jmorecfg.h:115
state free_in_buffer
Definition: jchuff.c:287

Referenced by emit_restart(), if(), and while().

#define JPEG_INTERNALS
#define MAX_CLEN   32 /* assumed maximum initial code length */

Referenced by jpeg_gen_optimal_table().

emit_restart ( working_state state,
int  restart_num 
)

References ci, emit_byte, FALSE, flush_bits(), JPEG_RST0, and TRUE.

Referenced by encode_mcu_huff().

encode_one_block ( working_state state,
JCOEFPTR  block,
int  last_dc_val,
c_derived_tbl dctbl,
c_derived_tbl actbl 
)
ERREXIT ( state->  cinfo,
JERR_HUFF_MISSING_CODE   
)
flush_bits ( working_state state)

References FALSE, and TRUE.

Referenced by emit_restart(), and finish_pass_huff().

htest_one_block ( j_compress_ptr  cinfo,
JCOEFPTR  block,
int  last_dc_val,
long  dc_counts[],
long  ac_counts[] 
)
if ( !(*->)(state->cinfo empty_output_buffer)
jpeg_gen_optimal_table ( j_compress_ptr  cinfo,
JHUFF_TBL htbl,
long  freq[] 
)

References bits, c1, c2, ERREXIT, FALSE, i, j, MAX_CLEN, MEMCOPY(), MEMZERO, and SIZEOF.

Referenced by finish_pass_gather().

jpeg_make_c_derived_tbl ( j_compress_ptr  cinfo,
boolean  isDC,
int  tblno,
c_derived_tbl **  pdtbl 
)

state free_in_buffer = dest->free_in_buffer
INLINE
Initial value:
{
register INT32 put_buffer = (INT32) code
long INT32
Definition: jmorecfg.h:161
put_buffer<<=24-put_bits;put_buffer|=state-> cur put_buffer
Definition: jchuff.c:319
state next_output_byte = dest->next_output_byte
state cur put_bits = state->cur.put_bits
state cur put_buffer = put_buffer
return TRUE