C# Class BitMiracle.LibJpeg.Classic.Internal.my_c_coef_controller

Inheritance: jpeg_c_coef_controller
Show file Open project: prepare/HTML-Renderer

Public Methods

Method Description
compress_data ( byte input_buf ) : bool
my_c_coef_controller ( jpeg_compress_struct cinfo, bool need_full_buffer ) : System
start_pass ( J_BUF_MODE pass_mode ) : void

Private Methods

Method Description
compressDataImpl ( byte input_buf ) : bool

Process some data in the single-pass case. We process the equivalent of one fully interleaved MCU row ("iMCU" row) per call, ie, v_samp_factor block rows for each component in the image. Returns true if the iMCU row is completed, false if suspended. NB: input_buf contains a plane for each component in image, which we index according to the component's SOF position.

compressFirstPass ( byte input_buf ) : bool

Process some data in the first pass of a multi-pass case. We process the equivalent of one fully interleaved MCU row ("iMCU" row) per call, ie, v_samp_factor block rows for each component in the image. This amount of data is read from the source buffer, DCT'd and quantized, and saved into the virtual arrays. We also generate suitable dummy blocks as needed at the right and lower edges. (The dummy blocks are constructed in the virtual arrays, which have been padded appropriately.) This makes it possible for subsequent passes not to worry about real vs. dummy blocks. We must also emit the data to the entropy encoder. This is conveniently done by calling compress_output() after we've loaded the current strip of the virtual arrays. NB: input_buf contains a plane for each component in image. All components are DCT'd and loaded into the virtual arrays in this pass. However, it may be that only a subset of the components are emitted to the entropy encoder during this first pass; be careful about looking at the scan-dependent variables (MCU dimensions, etc).

compressOutput ( ) : bool

Process some data in subsequent passes of a multi-pass case. We process the equivalent of one fully interleaved MCU row ("iMCU" row) per call, ie, v_samp_factor block rows for each component in the scan. The data is obtained from the virtual arrays and fed to the entropy coder. Returns true if the iMCU row is completed, false if suspended.

start_iMCU_row ( ) : void

Method Details

compress_data() public method

public compress_data ( byte input_buf ) : bool
input_buf byte
return bool

my_c_coef_controller() public method

public my_c_coef_controller ( jpeg_compress_struct cinfo, bool need_full_buffer ) : System
cinfo jpeg_compress_struct
need_full_buffer bool
return System

start_pass() public method

public start_pass ( J_BUF_MODE pass_mode ) : void
pass_mode J_BUF_MODE
return void