Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Macros | Typedefs | Functions
jchuff.cpp File Reference
#include "jinclude.h"
#include "mrpt_jpeglib.h"
#include "jchuff.h"

Go to the source code of this file.

Classes

struct  savable_state
 
struct  huff_entropy_encoder
 
struct  working_state
 

Macros

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

Typedefs

typedef huff_entropy_encoderhuff_entropy_ptr
 

Functions

encode_mcu_huff JPP ((j_compress_ptr cinfo, JBLOCKROW *MCU_data))
 
 METHODDEF (void) finish_pass_huff JPP((j_compress_ptr cinfo))
 
 start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
 
 jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno, c_derived_tbl **pdtbl)
 
 dump_buffer (working_state *state)
 
INLINE emit_bits (working_state *state, unsigned int code, int size)
 
 flush_bits (working_state *state)
 
 encode_one_block (working_state *state, JCOEFPTR block, int last_dc_val, c_derived_tbl *dctbl, c_derived_tbl *actbl)
 
 emit_restart (working_state *state, int restart_num)
 
 encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 
 finish_pass_huff (j_compress_ptr cinfo)
 
 htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, long dc_counts[], long ac_counts[])
 
 encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 
 jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL *htbl, long freq[])
 
 finish_pass_gather (j_compress_ptr cinfo)
 
 jinit_huff_encoder (j_compress_ptr cinfo)
 

Macro Definition Documentation

◆ ASSIGN_STATE

#define ASSIGN_STATE (   dest,
  src 
)    ((dest) = (src))

Definition at line 34 of file jchuff.cpp.

Referenced by encode_mcu_huff(), and finish_pass_huff().

◆ emit_byte

#define emit_byte (   state,
  val,
  action 
)
Value:
{ \
*(state)->next_output_byte++ = (JOCTET)(val); \
if (--(state)->free_in_buffer == 0) \
if (!dump_buffer(state)) \
{ \
action; \
} \
}
int val
Definition: mrpt_jpeglib.h:955
char JOCTET
Definition: jmorecfg.h:106
dump_buffer(working_state *state)
Definition: jchuff.cpp:281

Definition at line 270 of file jchuff.cpp.

Referenced by emit_bits(), and emit_restart().

◆ JPEG_INTERNALS

#define JPEG_INTERNALS

Definition at line 10 of file jchuff.cpp.

◆ MAX_CLEN

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

Referenced by jpeg_gen_optimal_table().

Typedef Documentation

◆ huff_entropy_ptr

Definition at line 66 of file jchuff.cpp.

Function Documentation

◆ dump_buffer()

dump_buffer ( working_state state)

◆ emit_bits()

INLINE emit_bits ( working_state state,
unsigned int  code,
int  size 
)

Definition at line 303 of file jchuff.cpp.

References emit_byte, ERREXIT, FALSE, and TRUE.

Referenced by encode_one_block(), and flush_bits().

Here is the caller graph for this function:

◆ emit_restart()

emit_restart ( working_state state,
int  restart_num 
)

Definition at line 458 of file jchuff.cpp.

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

Referenced by encode_mcu_huff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_mcu_gather()

encode_mcu_gather ( j_compress_ptr  cinfo,
JBLOCKROW MCU_data 
)

◆ encode_mcu_huff()

encode_mcu_huff ( j_compress_ptr  cinfo,
JBLOCKROW MCU_data 
)

◆ encode_one_block()

encode_one_block ( working_state state,
JCOEFPTR  block,
int  last_dc_val,
c_derived_tbl dctbl,
c_derived_tbl actbl 
)

Definition at line 355 of file jchuff.cpp.

References DCTSIZE2, emit_bits(), ERREXIT, FALSE, jpeg_natural_order, MAX_COEF_BITS, and TRUE.

Referenced by encode_mcu_huff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finish_pass_gather()

finish_pass_gather ( j_compress_ptr  cinfo)

Definition at line 866 of file jchuff.cpp.

References huff_entropy_encoder::ac_count_ptrs, jpeg_component_info::ac_tbl_no, compptr, huff_entropy_encoder::dc_count_ptrs, jpeg_component_info::dc_tbl_no, jpeg_alloc_huff_table(), jpeg_gen_optimal_table(), MEMZERO, NUM_HUFF_TBLS, SIZEOF, and TRUE.

Referenced by start_pass_huff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finish_pass_huff()

finish_pass_huff ( j_compress_ptr  cinfo)

Definition at line 541 of file jchuff.cpp.

References ASSIGN_STATE, ERREXIT, flush_bits(), working_state::next_output_byte, and huff_entropy_encoder::saved.

Referenced by start_pass_huff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flush_bits()

flush_bits ( working_state state)

Definition at line 343 of file jchuff.cpp.

References emit_bits(), FALSE, and TRUE.

Referenced by emit_restart(), and finish_pass_huff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ htest_one_block()

htest_one_block ( j_compress_ptr  cinfo,
JCOEFPTR  block,
int  last_dc_val,
long  dc_counts[],
long  ac_counts[] 
)

Definition at line 577 of file jchuff.cpp.

References DCTSIZE2, ERREXIT, jpeg_natural_order, and MAX_COEF_BITS.

Referenced by encode_mcu_gather().

Here is the caller graph for this function:

◆ jinit_huff_encoder()

jinit_huff_encoder ( j_compress_ptr  cinfo)

◆ jpeg_gen_optimal_table()

jpeg_gen_optimal_table ( j_compress_ptr  cinfo,
JHUFF_TBL htbl,
long  freq[] 
)

Definition at line 716 of file jchuff.cpp.

References ERREXIT, FALSE, MAX_CLEN, MEMCOPY, MEMZERO, and SIZEOF.

Referenced by finish_pass_gather(), and finish_pass_gather_phuff().

Here is the caller graph for this function:

◆ jpeg_make_c_derived_tbl()

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

Definition at line 178 of file jchuff.cpp.

References JHUFF_TBL::bits, c_derived_tbl::ehufco, c_derived_tbl::ehufsi, ERREXIT, ERREXIT1, JHUFF_TBL::huffval, JPOOL_IMAGE, MEMZERO, NUM_HUFF_TBLS, and SIZEOF.

Referenced by start_pass_huff(), and start_pass_phuff().

Here is the caller graph for this function:

◆ JPP()

encode_mcu_AC_refine JPP ( (j_compress_ptr cinfo, JBLOCKROW *MCU_data)  )

◆ METHODDEF()

METHODDEF ( void  )

◆ start_pass_huff()

start_pass_huff ( j_compress_ptr  cinfo,
boolean  gather_statistics 
)



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019