spandsp 3.0.0
t4_t6_decode_state_s Struct Reference

#include <t4_t6_decode.h>

Public Attributes

t4_row_write_handler_t row_write_handler
 Callback function to write a row of pixels to the image destination.
void * row_write_user_data
 Opaque pointer passed to row_write_handler.
int encoding
 The type of compression used between the FAX machines.
int image_width
 Width of the current page, in pixels.
int image_length
 Length of the current page, in pixels.
int bytes_per_row
 The current number of bytes per row of uncompressed image data.
int row_bits
 The current number of bits in the current encoded row.
uint8_t * row_buf
 Pointer to the buffer for the current pixel row.
bool row_is_2d
 True if we are treating the current row as a 2D encoded one.
int row_len
 The current length of the current row.
uint32_t * cur_runs
 Black and white run-lengths for the current row.
uint32_t * ref_runs
 Black and white run-lengths for the reference row.
int consecutive_eols
 This variable is used to count the consecutive EOLS we have seen. If it reaches six, this is the end of the image. It is initially set to -1 for 1D and 2D decoding, as an indicator that we must wait for the first EOL, before decoding any image data.
int a0
 The reference or starting changing element on the coding line. At the start of the coding line, a0 is set on an imaginary white changing element situated just before the first element on the line. During the coding of the coding line, the position of a0 is defined by the previous coding mode. (See T.4/4.2.1.3.2.).
int b1
 The first changing element on the reference line to the right of a0 and of opposite colour to a0.
int run_length
 The length of the in-progress run of black or white.
int black_white
 2D horizontal mode control.
bool in_black
 True if the current run is black.
int a_cursor
 The current step into the current row run-lengths buffer.
int b_cursor
 The current step into the reference row run-lengths buffer.
uint32_t rx_bitstream
 Incoming bit buffer for decompression.
int rx_bits
 The number of bits currently in rx_bitstream.
int rx_skip_bits
 The number of bits to be skipped before trying to match the next code word.
uint32_t pixel_stream
 Decoded pixel stream buffer.
int pixels
 The number of pixels currently in pixel_stream.
int min_row_bits
 The minimum bits in any row of the current page. For monitoring only.
int max_row_bits
 The maximum bits in any row of the current page. For monitoring only.
int compressed_image_size
 The size of the compressed image, in bits.
int curr_bad_row_run
 The current number of consecutive bad rows.
int longest_bad_row_run
 The longest run of consecutive bad rows seen in the current page.
int bad_rows
 The total number of bad rows in the current page.
logging_state_t logging
 Error and flow logging control.

Detailed Description

T.4 1D, T4 2D and T6 decompressor state.

Member Data Documentation

◆ compressed_image_size

int t4_t6_decode_state_s::compressed_image_size

The size of the compressed image, in bits.

Referenced by t4_t6_decode_get_compressed_image_size(), t4_t6_decode_put(), and t4_t6_decode_put_bit().

◆ consecutive_eols

int t4_t6_decode_state_s::consecutive_eols

This variable is used to count the consecutive EOLS we have seen. If it reaches six, this is the end of the image. It is initially set to -1 for 1D and 2D decoding, as an indicator that we must wait for the first EOL, before decoding any image data.

Referenced by t4_t6_decode_put().

◆ curr_bad_row_run

int t4_t6_decode_state_s::curr_bad_row_run

The current number of consecutive bad rows.

Referenced by t4_t6_decode_put().

◆ encoding

int t4_t6_decode_state_s::encoding

The type of compression used between the FAX machines.

Referenced by t4_t6_decode_init(), and t4_t6_decode_set_encoding().

◆ image_length

int t4_t6_decode_state_s::image_length

Length of the current page, in pixels.

Referenced by t4_t6_decode_get_image_length().

◆ image_width

int t4_t6_decode_state_s::image_width

Width of the current page, in pixels.

Referenced by t4_t6_decode_get_image_width().

◆ logging

logging_state_t t4_t6_decode_state_s::logging

Error and flow logging control.

Referenced by t4_t6_decode_get_logging_state(), and t4_t6_decode_init().

◆ longest_bad_row_run

int t4_t6_decode_state_s::longest_bad_row_run

The longest run of consecutive bad rows seen in the current page.

Referenced by t4_t6_decode_put().

◆ row_write_handler

t4_row_write_handler_t t4_t6_decode_state_s::row_write_handler

Callback function to write a row of pixels to the image destination.

Referenced by t4_t6_decode_init(), t4_t6_decode_put(), and t4_t6_decode_set_row_write_handler().

◆ row_write_user_data

void* t4_t6_decode_state_s::row_write_user_data

Opaque pointer passed to row_write_handler.

Referenced by t4_t6_decode_init(), t4_t6_decode_put(), and t4_t6_decode_set_row_write_handler().

◆ rx_bits

int t4_t6_decode_state_s::rx_bits

The number of bits currently in rx_bitstream.

Referenced by t4_t6_decode_put().

◆ rx_bitstream

uint32_t t4_t6_decode_state_s::rx_bitstream

Incoming bit buffer for decompression.

Referenced by t4_t6_decode_put().

◆ rx_skip_bits

int t4_t6_decode_state_s::rx_skip_bits

The number of bits to be skipped before trying to match the next code word.

Referenced by t4_t6_decode_put().


The documentation for this struct was generated from the following file: