28#if !defined(_SPANDSP_T85_H_)
29#define _SPANDSP_T85_H_
62#if defined(__cplusplus)
67SPAN_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
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:856
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:648
int t85_decode_release(t85_decode_state_t *s)
Release a T.85 decode context.
Definition t85_decode.c:925
int t85_decode_free(t85_decode_state_t *s)
Free a T.85 decode context.
Definition t85_decode.c:941
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:770
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:690
uint32_t t85_encode_get_image_length(t85_encode_state_t *s)
Get the length of the image.
Definition t85_encode.c:626
int t85_encode_set_image_width(t85_encode_state_t *s, uint32_t image_width)
Set the image width.
Definition t85_encode.c:515
int t85_encode_free(t85_encode_state_t *s)
Free a T.85 encode context.
Definition t85_encode.c:744
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:414
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:590
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:638
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:437
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:598
void t85_encode_abort(t85_encode_state_t *s)
Stop image encoding prematurely.
Definition t85_encode.c:574
@ T85_TPBON
Definition t85.h:49
@ T85_LRLTWO
Definition t85.h:53
@ T85_VLENGTH
Definition t85.h:51
uint32_t t85_decode_get_image_length(t85_decode_state_t *s)
Get the length of the image.
Definition t85_decode.c:798
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:760
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:632
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:804
uint32_t t85_encode_get_image_width(t85_encode_state_t *s)
Get the width of the image.
Definition t85_encode.c:620
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:583
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:654
int t85_encode_release(t85_encode_state_t *s)
Release a T.85 encode context.
Definition t85_encode.c:727
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:216
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:897
uint32_t t85_decode_get_image_width(t85_decode_state_t *s)
Get the width of the image.
Definition t85_decode.c:792
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:538
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:782