28 #if !defined(_SPANDSP_T42_H_) 29 #define _SPANDSP_T42_H_ 46 #if defined(__cplusplus) 71 SPAN_DECLARE(
void) set_lab_illuminant(
lab_params_t *s,
float new_xn,
float new_yn,
float new_zn);
73 SPAN_DECLARE(
void) set_lab_gamut(
lab_params_t *s,
int L_min,
int L_max,
int a_min,
int a_max,
int b_min,
int b_max,
int ab_are_signed);
75 SPAN_DECLARE(
void) set_lab_gamut2(
lab_params_t *s,
int L_P,
int L_Q,
int a_P,
int a_Q,
int b_P,
int b_Q);
77 SPAN_DECLARE(
void) get_lab_gamut2(
lab_params_t *s,
int *L_P,
int *L_Q,
int *a_P,
int *a_Q,
int *b_P,
int *b_Q);
79 SPAN_DECLARE(
bool) t42_analyse_header(uint32_t *width, uint32_t *length,
const uint8_t data[],
size_t len);
81 SPAN_DECLARE(
void) t42_encode_set_options(
t42_encode_state_t *s, uint32_t l0,
int quality,
int options);
83 SPAN_DECLARE(
int) t42_encode_set_image_width(
t42_encode_state_t *s, uint32_t image_width);
91 SPAN_DECLARE(
void) t42_encode_comment(
t42_encode_state_t *s,
const uint8_t comment[],
size_t len);
98 SPAN_DECLARE(
int) t42_encode_get(
t42_encode_state_t *s, uint8_t buf[],
size_t max_len);
132 uint32_t image_width,
133 uint32_t image_length,
172 uint32_t max_comment_len,
232 #if defined(__cplusplus) int t42_encode_restart(t42_encode_state_t *s, uint32_t image_width, uint32_t image_length)
Restart a T.42 encode context.
Definition: t42.c:1000
int t42_decode_set_comment_handler(t42_decode_state_t *s, uint32_t max_comment_len, t4_row_write_handler_t handler, void *user_data)
Set the comment handler routine.
Definition: t42.c:1357
int xyz_to_corrected_color_temp(float *temp, float xyz[3])
Convert an X0, Y0, Z0 coordinate to a colour tempature.
Definition: t42.c:243
logging_state_t * t42_encode_get_logging_state(t42_encode_state_t *s)
Get the logging context associated with a T.42 encode context.
Definition: t42.c:994
int t42_decode_restart(t42_decode_state_t *s)
Restart a T.42 decode context.
Definition: t42.c:1401
void lab_to_srgb(lab_params_t *s, uint8_t srgb[], const uint8_t lab[], int pixels)
Convert a row of 8 bit pixels from sRGB to Lab.
Definition: t42.c:525
Definition: private/t42.h:98
int t42_decode_get_compressed_image_size(t42_decode_state_t *s)
Get the size of the compressed image in bits.
Definition: t42.c:1389
Definition: private/t42.h:32
int t42_decode_release(t42_decode_state_t *s)
Release a T.42 decode context.
Definition: t42.c:1457
t42_decode_state_t * t42_decode_init(t42_decode_state_t *s, t4_row_write_handler_t handler, void *user_data)
Prepare to decode an image in T.42 format.
Definition: t42.c:1430
Definition: private/t42.h:53
int t42_decode_set_image_size_constraints(t42_decode_state_t *s, uint32_t max_xd, uint32_t max_yd)
Set constraints on the received image size.
Definition: t42.c:1369
uint32_t t42_decode_get_image_width(t42_decode_state_t *s)
Get the width of the image.
Definition: t42.c:1377
int t42_decode_free(t42_decode_state_t *s)
Free a T.42 decode context.
Definition: t42.c:1488
int t42_decode_set_row_write_handler(t42_decode_state_t *s, t4_row_write_handler_t handler, void *user_data)
Set the row handler routine.
Definition: t42.c:1347
uint32_t t42_decode_get_image_length(t42_decode_state_t *s)
Get the length of the image.
Definition: t42.c:1383
logging_state_t * t42_decode_get_logging_state(t42_decode_state_t *s)
Get the logging context associated with a T.42 decode context.
Definition: t42.c:1395
Definition: private/logging.h:33
int colour_temp_to_xyz(float xyz[3], float temp)
Convert a colour temperature to an X0, Y0, Z0 coordinate.
Definition: t42.c:283
int t42_encode_image_complete(t42_encode_state_t *s)
Check if we are at the end of the current document page.
Definition: t42.c:752
int t42_encode_free(t42_encode_state_t *s)
Free a T.42 encode context.
Definition: t42.c:1086
int t42_decode_put(t42_decode_state_t *s, const uint8_t data[], size_t len)
Decode a chunk of T.42 data.
Definition: t42.c:1314
t42_encode_state_t * t42_encode_init(t42_encode_state_t *s, uint32_t image_width, uint32_t image_length, t4_row_read_handler_t handler, void *user_data)
Prepare to encode an image in T.42 format.
Definition: t42.c:1051
int t42_encode_get_compressed_image_size(t42_encode_state_t *s)
Get the size of the compressed image in bits.
Definition: t42.c:978
void srgb_to_lab(lab_params_t *s, uint8_t lab[], const uint8_t srgb[], int pixels)
Convert a row of 8 bit pixels from Lab to sRGB.
Definition: t42.c:468
int t42_encode_release(t42_encode_state_t *s)
Release a T.42 encode context.
Definition: t42.c:1080
int(* t4_row_write_handler_t)(void *user_data, const uint8_t buf[], size_t len)
Definition: t4_rx.h:46
int(* t4_row_read_handler_t)(void *user_data, uint8_t buf[], size_t len)
Definition: t4_tx.h:34