jcphuff.c File Reference

#include "jinclude.h"
#include "jpeglib.h"
#include "jchuff.h"

Go to the source code of this file.

Classes

struct  phuff_entropy_encoder

Defines

#define JPEG_INTERNALS
#define MAX_CORR_BITS   1000
#define ISHIFT_TEMPS
#define IRIGHT_SHIFT(x, shft)   ((x) >> (shft))
#define emit_byte(entropy, val)

Typedefs

typedef phuff_entropy_encoderphuff_entropy_ptr

Functions

 METHODDEF (boolean)
 dump_buffer (phuff_entropy_ptr entropy)
INLINE emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size)
 flush_bits (phuff_entropy_ptr entropy)
INLINE emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol)
 emit_buffered_bits (phuff_entropy_ptr entropy, char *bufstart, unsigned int nbits)
 emit_eobrun (phuff_entropy_ptr entropy)
 emit_restart (phuff_entropy_ptr entropy, int restart_num)
 encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 finish_pass_phuff (j_compress_ptr cinfo)
 finish_pass_gather_phuff (j_compress_ptr cinfo)
 jinit_phuff_encoder (j_compress_ptr cinfo)


Define Documentation

#define emit_byte ( entropy,
val   ) 

Value:

{ *(entropy)->next_output_byte++ = (JOCTET) (val);  \
          if (--(entropy)->free_in_buffer == 0)  \
            dump_buffer(entropy); }

Definition at line 198 of file jcphuff.c.

Referenced by arith_encode(), emit_2bytes(), emit_adobe_app14(), emit_bits(), emit_dac(), emit_dht(), emit_dqt(), emit_jfif_app0(), emit_marker(), emit_pseudo_sos(), emit_restart(), emit_sof(), emit_sos(), finish_pass(), and write_marker_byte().

#define IRIGHT_SHIFT ( x,
shft   )     ((x) >> (shft))

Definition at line 85 of file jcphuff.c.

#define ISHIFT_TEMPS

Definition at line 84 of file jcphuff.c.

#define JPEG_INTERNALS

Definition at line 15 of file jcphuff.c.

#define MAX_CORR_BITS   1000

Definition at line 70 of file jcphuff.c.


Typedef Documentation

typedef phuff_entropy_encoder* phuff_entropy_ptr

Definition at line 62 of file jcphuff.c.


Function Documentation

dump_buffer ( phuff_entropy_ptr  entropy  ) 

Definition at line 205 of file jcphuff.c.

References ERREXIT, jpeg_destination_mgr::free_in_buffer, and jpeg_destination_mgr::next_output_byte.

INLINE emit_bits ( phuff_entropy_ptr  entropy,
unsigned int  code,
int  size 
)

Definition at line 228 of file jcphuff.c.

References c, emit_byte, ERREXIT, and int.

Referenced by emit_buffered_bits(), emit_eobrun(), emit_symbol(), encode_mcu_AC_first(), encode_mcu_AC_refine(), encode_mcu_DC_first(), encode_mcu_DC_refine(), and flush_bits().

emit_buffered_bits ( phuff_entropy_ptr  entropy,
char *  bufstart,
unsigned int  nbits 
)

Definition at line 297 of file jcphuff.c.

References emit_bits().

emit_eobrun ( phuff_entropy_ptr  entropy  ) 

Definition at line 316 of file jcphuff.c.

References emit_bits(), emit_buffered_bits(), emit_symbol(), ERREXIT, and nbits.

emit_restart ( phuff_entropy_ptr  entropy,
int  restart_num 
)

Definition at line 347 of file jcphuff.c.

References emit_byte, emit_eobrun(), flush_bits(), and JPEG_RST0.

INLINE emit_symbol ( phuff_entropy_ptr  entropy,
int  tbl_no,
int  symbol 
)

Definition at line 281 of file jcphuff.c.

References c_derived_tbl::ehufco, c_derived_tbl::ehufsi, and emit_bits().

Referenced by emit_eobrun(), encode_mcu_AC_first(), encode_mcu_AC_refine(), and encode_mcu_DC_first().

encode_mcu_AC_first ( j_compress_ptr  cinfo,
JBLOCKROW MCU_data 
)

Definition at line 464 of file jcphuff.c.

References phuff_entropy_encoder::ac_tbl_no, Al, emit_bits(), emit_eobrun(), emit_restart(), emit_symbol(), phuff_entropy_encoder::EOBRUN, ERREXIT, phuff_entropy_encoder::free_in_buffer, if(), jpeg_natural_order, k, MAX_COEF_BITS, nbits, phuff_entropy_encoder::next_output_byte, phuff_entropy_encoder::next_restart_num, phuff_entropy_encoder::restarts_to_go, and TRUE.

encode_mcu_AC_refine ( j_compress_ptr  cinfo,
JBLOCKROW MCU_data 
)

Definition at line 618 of file jcphuff.c.

References phuff_entropy_encoder::ac_tbl_no, Al, phuff_entropy_encoder::BE, phuff_entropy_encoder::bit_buffer, DCTSIZE2, emit_bits(), emit_buffered_bits(), emit_eobrun(), emit_restart(), emit_symbol(), phuff_entropy_encoder::EOBRUN, phuff_entropy_encoder::free_in_buffer, if(), jpeg_natural_order, k, MAX_CORR_BITS, phuff_entropy_encoder::next_output_byte, phuff_entropy_encoder::next_restart_num, phuff_entropy_encoder::restarts_to_go, and TRUE.

encode_mcu_DC_first ( j_compress_ptr  cinfo,
JBLOCKROW MCU_data 
)

Definition at line 377 of file jcphuff.c.

References Al, compptr, jpeg_component_info::dc_tbl_no, emit_bits(), emit_restart(), emit_symbol(), ERREXIT, phuff_entropy_encoder::free_in_buffer, if(), IRIGHT_SHIFT, ISHIFT_TEMPS, phuff_entropy_encoder::last_dc_val, MAX_COEF_BITS, nbits, phuff_entropy_encoder::next_output_byte, phuff_entropy_encoder::next_restart_num, phuff_entropy_encoder::restarts_to_go, and TRUE.

encode_mcu_DC_refine ( j_compress_ptr  cinfo,
JBLOCKROW MCU_data 
)

Definition at line 571 of file jcphuff.c.

References Al, emit_bits(), emit_restart(), phuff_entropy_encoder::free_in_buffer, if(), phuff_entropy_encoder::next_output_byte, phuff_entropy_encoder::next_restart_num, phuff_entropy_encoder::restarts_to_go, and TRUE.

finish_pass_gather_phuff ( j_compress_ptr  cinfo  ) 

Definition at line 767 of file jcphuff.c.

References jpeg_component_info::ac_tbl_no, compptr, jpeg_component_info::dc_tbl_no, emit_eobrun(), if(), jpeg_alloc_huff_table(), jpeg_gen_optimal_table(), MEMZERO, NULL, NUM_HUFF_TBLS, SIZEOF, and TRUE.

Referenced by METHODDEF().

finish_pass_phuff ( j_compress_ptr  cinfo  ) 

Definition at line 746 of file jcphuff.c.

References emit_eobrun(), flush_bits(), phuff_entropy_encoder::free_in_buffer, and phuff_entropy_encoder::next_output_byte.

Referenced by METHODDEF().

flush_bits ( phuff_entropy_ptr  entropy  ) 

Definition at line 267 of file jcphuff.c.

References emit_bits().

Referenced by emit_restart(), and finish_pass_phuff().

jinit_phuff_encoder ( j_compress_ptr  cinfo  ) 

Definition at line 814 of file jcphuff.c.

References phuff_entropy_encoder::bit_buffer, phuff_entropy_encoder::count_ptrs, phuff_entropy_encoder::derived_tbls, i, JPOOL_IMAGE, NULL, NUM_HUFF_TBLS, phuff_entropy_encoder::pub, and SIZEOF.

METHODDEF ( boolean   ) 

Definition at line 89 of file jcphuff.c.

References jpeg_component_info::ac_tbl_no, phuff_entropy_encoder::ac_tbl_no, phuff_entropy_encoder::BE, phuff_entropy_encoder::bit_buffer, phuff_entropy_encoder::cinfo, compptr, phuff_entropy_encoder::count_ptrs, jpeg_component_info::dc_tbl_no, phuff_entropy_encoder::derived_tbls, encode_mcu_AC_first(), encode_mcu_AC_refine(), encode_mcu_DC_first(), encode_mcu_DC_refine(), phuff_entropy_encoder::EOBRUN, ERREXIT1, finish_pass_gather_phuff(), finish_pass_phuff(), phuff_entropy_encoder::gather_statistics, if(), jpeg_make_c_derived_tbl(), JPOOL_IMAGE, phuff_entropy_encoder::last_dc_val, MAX_CORR_BITS, MEMZERO, phuff_entropy_encoder::next_restart_num, NULL, NUM_HUFF_TBLS, phuff_entropy_encoder::pub, phuff_entropy_encoder::put_bits, phuff_entropy_encoder::put_buffer, phuff_entropy_encoder::restarts_to_go, and SIZEOF.


Generated on Tue Jul 5 15:57:56 2011 for ROOT_528-00b_version by  doxygen 1.5.1