28 #if !defined(_SPANDSP_T85_H_)
29 #define _SPANDSP_T85_H_
62 #if defined(__cplusplus)
67 SPAN_DECLARE(
bool) t85_analyse_header(uint32_t *width, uint32_t *length,
const uint8_t data[],
size_t len);
156 uint32_t image_width,
157 uint32_t image_length);
167 uint32_t image_width,
168 uint32_t image_length,
281 #if defined(__cplusplus)
Definition: private/logging.h:34
Definition: private/t85.h:117
uint8_t * comment
Definition: private/t85.h:174
uint32_t max_yd
Definition: private/t85.h:134
t81_t82_arith_decode_state_t s
Definition: private/t85.h:202
uint32_t max_comment_len
Definition: private/t85.h:127
uint32_t max_xd
Definition: private/t85.h:132
int options
Definition: private/t85.h:149
int mx
Definition: private/t85.h:147
uint32_t l0
Definition: private/t85.h:145
Definition: private/t85.h:52
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
t85_encode_state_t * t85_encode_init(t85_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.85 format.
Definition: t85_encode.c:739
int t85_decode_release(t85_decode_state_t *s)
Release a T.85 decode context.
Definition: t85_decode.c:970
int t85_decode_free(t85_decode_state_t *s)
Free a T.85 decode context.
Definition: t85_decode.c:988
int t85_decode_set_comment_handler(t85_decode_state_t *s, uint32_t max_comment_len, t4_row_write_handler_t handler, void *user_data)
Set the comment handler routine.
Definition: t85_decode.c:810
uint32_t t85_encode_get_image_length(t85_encode_state_t *s)
Get the length of the image.
Definition: t85_encode.c:674
int t85_encode_set_image_width(t85_encode_state_t *s, uint32_t image_width)
Set the image width.
Definition: t85_encode.c:549
int t85_encode_free(t85_encode_state_t *s)
Free a T.85 encode context.
Definition: t85_encode.c:797
void t85_decode_rx_status(t85_decode_state_t *s, int status)
Inform the T.85 decode engine of a status change in the signal source (end of tx, rx signal change,...
Definition: t85_decode.c:406
int t85_encode_image_complete(t85_encode_state_t *s)
Check if we are at the end of the current document page.
Definition: t85_encode.c:633
logging_state_t * t85_decode_get_logging_state(t85_decode_state_t *s)
Get the logging context associated with a T.85 decode context.
Definition: t85_decode.c:898
int t85_encode_set_row_read_handler(t85_encode_state_t *s, t4_row_read_handler_t handler, void *user_data)
Set the row read handler for a T.85 encode context.
Definition: t85_encode.c:686
int t85_decode_put(t85_decode_state_t *s, const uint8_t data[], size_t len)
Decode a chunk of T.85 data.
Definition: t85_decode.c:429
int t85_encode_get(t85_encode_state_t *s, uint8_t buf[], size_t max_len)
Get the next chunk of the current document page. The document will be padded for the current minimum ...
Definition: t85_encode.c:642
void t85_encode_abort(t85_encode_state_t *s)
Stop image encoding prematurely.
Definition: t85_encode.c:617
uint32_t t85_decode_get_image_length(t85_decode_state_t *s)
Get the length of the image.
Definition: t85_decode.c:838
int t85_decode_set_row_write_handler(t85_decode_state_t *s, t4_row_write_handler_t handler, void *user_data)
Set the row handler routine.
Definition: t85_decode.c:800
t85_decode_state_t * t85_decode_init(t85_decode_state_t *s, t4_row_write_handler_t handler, void *user_data)
Prepare to decode an image in T.85 format.
Definition: t85_decode.c:940
int t85_encode_get_compressed_image_size(t85_encode_state_t *s)
Get the size of the compressed image, in bits.
Definition: t85_encode.c:680
@ T85_TPBON
Definition: t85.h:49
@ T85_LRLTWO
Definition: t85.h:53
@ T85_VLENGTH
Definition: t85.h:51
int t85_decode_get_compressed_image_size(t85_decode_state_t *s)
Get the size of the compressed image, in bits.
Definition: t85_decode.c:844
uint32_t t85_encode_get_image_width(t85_encode_state_t *s)
Get the width of the image.
Definition: t85_encode.c:668
logging_state_t * t85_encode_get_logging_state(t85_encode_state_t *s)
Get the logging context associated with a T.85 encode context.
Definition: t85_encode.c:696
void t85_encode_comment(t85_encode_state_t *s, const uint8_t comment[], size_t len)
Insert a comment in the encoded file.
Definition: t85_encode.c:626
int t85_encode_restart(t85_encode_state_t *s, uint32_t image_width, uint32_t image_length)
Restart a T.85 encode context.
Definition: t85_encode.c:702
int t85_encode_release(t85_encode_state_t *s)
Release a T.85 encode context.
Definition: t85_encode.c:778
void t85_encode_set_options(t85_encode_state_t *s, uint32_t l0, int mx, int options)
Set the T.85 options.
Definition: t85_encode.c:211
uint32_t t85_decode_get_image_width(t85_decode_state_t *s)
Get the width of the image.
Definition: t85_decode.c:832
int t85_encode_set_image_length(t85_encode_state_t *s, uint32_t image_length)
Alter the length of a T.85 encoded image. The new length cannot be greater than the originally specif...
Definition: t85_encode.c:575
int t85_decode_set_image_size_constraints(t85_decode_state_t *s, uint32_t max_xd, uint32_t max_yd)
Set constraints on the received image size.
Definition: t85_decode.c:822