34typedef enum : uint16_t {
55 const uint8_t* source,
57 uint32_t* out_written);
145 uint16_t max_image_edge,
146 uint8_t pixel_format);
170 const uint8_t* source,
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_rabook_comic_init(ra8_rabook_comic_t *comic, const ra8_rabook_comic_workspace_t *workspace, ra8_rabook_image_read_fn image_read, ra8_rabook_comic_write_at_fn image_write, void *image_ctx, uint16_t max_image_edge, uint8_t pixel_format)
Initialize one bounded streaming comic builder.
ra8_err_t(* ra8_rabook_comic_write_at_fn)(void *ctx, uint32_t offset, const uint8_t *source, uint32_t requested, uint32_t *out_written)
Write normalized image bytes at one logical spool offset.
ra8_err_t ra8_rabook_comic_add_page(ra8_rabook_comic_t *comic, const char *page_id, const uint8_t *source, size_t source_size)
Normalize and append one source image as one comic chapter.
ra8_err_t ra8_rabook_comic_finish(ra8_rabook_comic_t *comic, const ra8_rabook_comic_metadata_t *metadata, ra8_rabook_write_fn write, void *write_ctx, uint32_t *out_len)
Finalize the completed comic as one canonical flat RABOOK1 stream.
ra8_rabook_comic_limit_t
Bounded string dimensions accepted by the comic facade.
@ k_ra8_rabook_comic_string_max
Bytes including the terminating NUL.
Caller-arena raster normalizer for RABOOK image records.
Zero-heap builder that emits a RABOOK1 blob (the #149 compiler back-end).
ra8_err_t(* ra8_rabook_image_read_fn)(void *ctx, uint32_t offset, uint8_t *dst, uint32_t requested, uint32_t *out_read)
Read bytes from an externally stored image pool.
ra8_err_t(* ra8_rabook_write_fn)(void *ctx, const uint8_t *src, uint32_t requested, uint32_t *out_written)
Append bytes to a streaming RABOOK1 destination.
Caller-owned, fixed-capacity arenas the builder appends into (no heap).
Mutable state for one image-sequence-to-RABOOK build.
void * image_ctx
Shared image-spool context.
uint8_t * normalized
One normalized page payload.
uint8_t pixel_format
Gray4 or gray8 output depth.
uint16_t max_image_edge
Optional output edge clamp.
uint32_t page_count
Successfully appended pages.
uint8_t * stream_scratch
Finalizer transfer scratch.
uint32_t stream_scratch_cap
Finalizer scratch capacity.
bool active
Build accepts more operations.
size_t normalized_cap
Normalized output capacity.
ra8_rabook_raster_workspace_t raster
Retained raster workspace.
ra8_rabook_ctx_t builder
Canonical table builder.
ra8_rabook_image_read_fn image_read
Repeatable image-spool reader.
ra8_rabook_comic_write_at_fn image_write
Image-spool random writer.
Caller-owned arenas retained for one streaming comic build.
uint8_t * stream_scratch
Finalizer transfer scratch.
size_t normalized_cap
Writable normalized bytes.
uint8_t * normalized
One normalized page payload.
uint32_t stream_scratch_cap
Finalizer scratch bytes.
ra8_rabook_raster_workspace_t raster
Codec and scaling arenas.
ra8_rabook_buffers_t builder
Resident table/string arenas.
Builder state: the arenas plus running counts and a sticky-fail flag.
Exclusive caller-owned scratch used by one raster conversion.