Main Page | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

t4.h File Reference

Go to the source code of this file.

Classes

struct  t4_stats_t

Typedefs

typedef int(* t4_row_read_handler_t )(void *user_data, uint8_t buf[], size_t len)
typedef int(* t4_row_write_handler_t )(void *user_data, const uint8_t buf[], size_t len)
typedef t4_state_s t4_state_t

Enumerations

enum  t4_image_compression_t { T4_COMPRESSION_ITU_T4_1D = 1, T4_COMPRESSION_ITU_T4_2D = 2, T4_COMPRESSION_ITU_T6 = 3 }
enum  t4_image_x_resolution_t {
  T4_X_RESOLUTION_R4 = 4016, T4_X_RESOLUTION_R8 = 8031, T4_X_RESOLUTION_300 = 11811, T4_X_RESOLUTION_R16 = 16063,
  T4_X_RESOLUTION_600 = 23622, T4_X_RESOLUTION_800 = 31496, T4_X_RESOLUTION_1200 = 47244
}
enum  t4_image_y_resolution_t {
  T4_Y_RESOLUTION_STANDARD = 3850, T4_Y_RESOLUTION_FINE = 7700, T4_Y_RESOLUTION_300 = 11811, T4_Y_RESOLUTION_SUPERFINE = 15400,
  T4_Y_RESOLUTION_600 = 23622, T4_Y_RESOLUTION_800 = 31496, T4_Y_RESOLUTION_1200 = 47244
}
enum  t4_image_width_t {
  T4_WIDTH_R4_A4 = 864, T4_WIDTH_R4_B4 = 1024, T4_WIDTH_R4_A3 = 1216, T4_WIDTH_R8_A4 = 1728,
  T4_WIDTH_R8_B4 = 2048, T4_WIDTH_R8_A3 = 2432, T4_WIDTH_300_A4 = 2592, T4_WIDTH_300_B4 = 3072,
  T4_WIDTH_300_A3 = 3648, T4_WIDTH_R16_A4 = 3456, T4_WIDTH_R16_B4 = 4096, T4_WIDTH_R16_A3 = 4864,
  T4_WIDTH_600_A4 = 5184, T4_WIDTH_600_B4 = 6144, T4_WIDTH_600_A3 = 7296, T4_WIDTH_1200_A4 = 10368,
  T4_WIDTH_1200_B4 = 12288, T4_WIDTH_1200_A3 = 14592
}
enum  t4_image_length_t {
  T4_LENGTH_STANDARD_A4 = 1143, T4_LENGTH_FINE_A4 = 2286, T4_LENGTH_300_A4 = 4665, T4_LENGTH_SUPERFINE_A4 = 4573,
  T4_LENGTH_600_A4 = 6998, T4_LENGTH_800_A4 = 9330, T4_LENGTH_1200_A4 = 13996, T4_LENGTH_STANDARD_B4 = 1401,
  T4_LENGTH_FINE_B4 = 2802, T4_LENGTH_300_B4 = 0, T4_LENGTH_SUPERFINE_B4 = 5605, T4_LENGTH_600_B4 = 0,
  T4_LENGTH_800_B4 = 0, T4_LENGTH_1200_B4 = 0, T4_LENGTH_STANDARD_US_LETTER = 1075, T4_LENGTH_FINE_US_LETTER = 2151,
  T4_LENGTH_300_US_LETTER = 0, T4_LENGTH_SUPERFINE_US_LETTER = 4302, T4_LENGTH_600_US_LETTER = 0, T4_LENGTH_800_US_LETTER = 0,
  T4_LENGTH_1200_US_LETTER = 0, T4_LENGTH_STANDARD_US_LEGAL = 1369, T4_LENGTH_FINE_US_LEGAL = 2738, T4_LENGTH_300_US_LEGAL = 0,
  T4_LENGTH_SUPERFINE_US_LEGAL = 5476, T4_LENGTH_600_US_LEGAL = 0, T4_LENGTH_800_US_LEGAL = 0, T4_LENGTH_1200_US_LEGAL = 0
}

Functions

 SPAN_DECLARE (t4_state_t *) t4_rx_init(t4_state_t *s
 Prepare for reception of a document.
 SPAN_DECLARE (int) t4_rx_start_page(t4_state_t *s)
 Prepare to receive the next page of the current document.
 SPAN_DECLARE (void) t4_rx_set_rx_encoding(t4_state_t *s
 Cleanup a T.30 context if the call terminates.
 SPAN_DECLARE (const char *) t4_encoding_to_str(int encoding)
 Get the short text name of an encoding format.

Variables

const char * file
const char int output_encoding
int bit
uint8_t byte
const uint8_t buf []
const uint8_t int len
t4_row_write_handler_t handler
t4_row_write_handler_t void * user_data
int encoding
int width
int resolution
const char * dcs
const char * sub_address
const char * ident
const char * vendor
const char * model
const char int start_page
const char int int stop_page
uint8_t int max_len
int bits
const char * info
t4_stats_tt


Detailed Description


Typedef Documentation

typedef struct t4_state_s t4_state_t
 

T.4 FAX compression/decompression descriptor. This defines the working state for a single instance of a T.4 FAX compression or decompression channel.


Enumeration Type Documentation

enum t4_image_compression_t
 

Supported compression modes.

enum t4_image_length_t
 

Length of the various supported paper sizes, in pixels at the various Y resolutions. Paper sizes are A4 (215mm x 297mm) B4 (255mm x 364mm) A3 (303mm x 418.56mm) North American Letter (215.9mm x 279.4mm) North American Legal (215.9mm x 355.6mm) Unlimited

T.4 does not accurately define the maximum number of scan lines in a page. A wide variety of maximum row counts are used in the real world. It is important not to set our sending limit too high, or a receiving machine might split pages. It is important not to set it too low, or we might clip pages.

Values seen for standard resolution A4 pages include 1037, 1045, 1109, 1126 and 1143. 1109 seems the most-popular. At fine res 2150, 2196, 2200, 2237, 2252-2262, 2264, 2286, and 2394 are used. 2255 seems the most popular. We try to use balanced choices here.

enum t4_image_width_t
 

Exact widths in PELs for the difference resolutions, and page widths. Note: The A4 widths also apply to North American letter and legal. The R4 resolution widths are not supported in recent versions of T.30 Only images of exactly these widths are acceptable for FAX transmisson.

R4 864 pels/215mm for ISO A4, North American Letter and Legal R4 1024 pels/255mm for ISO B4 R4 1216 pels/303mm for ISO A3 R8 1728 pels/215mm for ISO A4, North American Letter and Legal R8 2048 pels/255mm for ISO B4 R8 2432 pels/303mm for ISO A3 R16 3456 pels/215mm for ISO A4, North American Letter and Legal R16 4096 pels/255mm for ISO B4 R16 4864 pels/303mm for ISO A3

enum t4_image_x_resolution_t
 

Supported X resolutions, in pixels per metre.

enum t4_image_y_resolution_t
 

Supported Y resolutions, in pixels per metre.


Function Documentation

SPAN_DECLARE const char *   ) 
 

Get the short text name of an encoding format.

Get the transmitted identifier associated with a T.30 context.

Parameters:
s The T.30 context.
id A pointer to the identifier.
Returns:
0 for OK, else -1.

SPAN_DECLARE void   ) 
 

Cleanup a T.30 context if the call terminates.

Parameters:
s The T.4 context.
encoding The encoding.

SPAN_DECLARE int32_t   ) 
 

Prepare to receive the next page of the current document.

Compress a block of octets.

Parameters:
s The V.42bis context.
buf The data to be compressed.
len The length of the data buffer.
Returns:
0

SPAN_DECLARE t4_state_t  ) 
 

Prepare for reception of a document.

Parameters:
s The T.4 context.
file The name of the file to be received.
output_encoding The output encoding.
Returns:
A pointer to the context, or NULL if there was a problem.


Generated on Fri Aug 28 20:12:28 2009 for spandsp by  doxygen 1.3.9.1