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

Coefficient buffer control This code applies interblock smoothing as described by section K.8 of the JPEG standard: the first 5 AC coefficients are estimated from the DC values of a DCT block and its 8 neighboring blocks. We apply smoothing only for progressive JPEG decoding, and only if the coefficients it can estimate are not yet known to full precision.
Show file Open project: prepare/HTML-Renderer Class Usage Examples

Public Methods

Method Description
GetCoefArrays ( ) : jvirt_array[]
consume_data ( ) : ReadResult

Consume input data and store it in the full-image coefficient buffer. We read as much as one fully interleaved MCU row ("iMCU" row) per call, ie, v_samp_factor block rows for each component in the scan.

decompress_data ( ComponentBuffer output_buf ) : ReadResult
jpeg_d_coef_controller ( jpeg_decompress_struct cinfo, bool need_full_buffer ) : System
start_input_pass ( ) : void

Initialize for an input processing pass.

start_output_pass ( ) : void

Initialize for an output processing pass.

Private Methods

Method Description
decompress_data_ordinary ( ComponentBuffer output_buf ) : ReadResult

Decompress and return some data in the multi-pass case. Always attempts to emit one fully interleaved MCU row ("iMCU" row). Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. NB: output_buf contains a plane for each component in image.

decompress_onepass ( ComponentBuffer output_buf ) : ReadResult

Decompress and return some data in the single-pass case. Always attempts to emit one fully interleaved MCU row ("iMCU" row). Input and output must run in lockstep since we have only a one-MCU buffer. Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. NB: output_buf contains a plane for each component in image, which we index according to the component's SOF position.

decompress_smooth_data ( ComponentBuffer output_buf ) : ReadResult

Variant of decompress_data for use when doing block smoothing.

smoothing_ok ( ) : bool

Determine whether block smoothing is applicable and safe. We also latch the current states of the coef_bits[] entries for the AC coefficients; otherwise, if the input side of the decompressor advances into a new scan, we might think the coefficients are known more accurately than they really are.

start_iMCU_row ( ) : void

Reset within-iMCU-row counters for a new row (input side)

Method Details

GetCoefArrays() public method

public GetCoefArrays ( ) : jvirt_array[]
return jvirt_array[]

consume_data() public method

Consume input data and store it in the full-image coefficient buffer. We read as much as one fully interleaved MCU row ("iMCU" row) per call, ie, v_samp_factor block rows for each component in the scan.
public consume_data ( ) : ReadResult
return ReadResult

decompress_data() public method

public decompress_data ( ComponentBuffer output_buf ) : ReadResult
output_buf ComponentBuffer
return ReadResult

jpeg_d_coef_controller() public method

public jpeg_d_coef_controller ( jpeg_decompress_struct cinfo, bool need_full_buffer ) : System
cinfo jpeg_decompress_struct
need_full_buffer bool
return System

start_input_pass() public method

Initialize for an input processing pass.
public start_input_pass ( ) : void
return void

start_output_pass() public method

Initialize for an output processing pass.
public start_output_pass ( ) : void
return void