73typedef enum : uint8_t {
220 uint32_t scratch_cap);
477 uint16_t* out_warmed);
514 const uint8_t** out_bytes,
EPUB (.epub) reader and chapter iterator for ra8-firmware.
@ k_epub_max_path_len
Max href length (incl.
ra8_err_t epub_tile_binder_add(epub_tile_binder_t *binder, epub_book_t *book, const char *path, uint32_t image_id)
Register a stored in-archive JOF atlas entry under image_id (#231).
ra8_err_t epub_tile_binder_info(const epub_tile_binder_t *binder, uint32_t image_id, jof_info_t *out_info)
Report a registered image's parsed geometry (#231).
ra8_err_t epub_tile_binder_add_ext(epub_tile_binder_t *binder, jof_pread_fn pread, void *pread_ctx, uint64_t total_size, uint32_t image_id)
Register an externally-backed JOF atlas under image_id (#231).
ra8_err_t epub_tile_binder_prefetch_pan(epub_tile_binder_t *binder, uint32_t image_id, const ra8_tile_rect_t *view, ra8_tile_pan_dir_t dir, uint16_t max_tiles, uint16_t *out_warmed)
Predictively warm the tiles one step ahead of a panning image (#341).
ra8_err_t epub_tile_binder_import(epub_tile_binder_t *binder, epub_book_t *book, const char *href, uint32_t image_id, const epub_atlas_import_cfg_t *cfg)
Import a manifest image through the transcode producer and register it for tile paging (#231 – the op...
epub_tile_limits_t
Binder capacity limits.
@ k_epub_tile_max_sources
Distinct images per binder.
ra8_err_t epub_reflow_img_load(void *ctx, const char *href, uint32_t href_len, const uint8_t **out_bytes, size_t *out_len)
Real reflow <img> byte loader off an EPUB book (#231).
ra8_err_t epub_tile_binder_init(epub_tile_binder_t *binder, const ra8_tile_cache_cfg_t *storage, uint8_t *scratch, uint32_t scratch_cap)
Initialise a tile binder over caller-supplied tile-cache storage (#231).
ra8_err_t epub_tile_binder_put(epub_tile_binder_t *binder, const uint8_t *pixels)
Release one pin taken by epub_tile_binder_get() (#231).
ra8_err_t epub_tile_binder_get(epub_tile_binder_t *binder, uint32_t image_id, uint16_t tile_x, uint16_t tile_y, ra8_tile_t *out_tile)
Get (and pin) one decoded tile of a registered image (#231).
JOF band-tile atlas: the display-native normalized image format (#231, shared with the longstrip scro...
ra8_err_t(* jof_pread_fn)(void *ctx, uint64_t offset, uint8_t *buf, size_t len, size_t *got)
Positioned-read seam over an atlas backing store (DIP).
Import-time transcode producer: JPEG/PNG/WebP -> JOF band-tile atlas in bounded RAM (#231,...
ra8_err_t(* jof_sink_fn)(void *ctx, const uint8_t *buf, size_t len)
Append-only byte sink for the produced atlas (DIP seam).
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Fixed-RAM-budget image-tile cache with LRU eviction (Layer 3b, #147).
ra8_tile_pan_dir_t
Direction of viewport travel, for predictive pan prefetch.
Import-time transcode knobs: tile geometry, budget caps, work arena and the destination store.
size_t webp_work_cap
WebP arena size (jof_webp_work_bytes()).
uint16_t tile_h
Tile height, pixels (>= 1).
uint16_t max_height
Height budget cap (0 = format cap).
epub_atlas_store_t store
Destination atlas store.
size_t work_cap
Arena size (jof_work_bytes()).
uint16_t max_width
Width budget cap (0 = format cap).
uint16_t tile_w
Tile width, pixels (>= 1).
uint8_t codec
jof_codec_t member.
uint8_t * webp_work
WebP whole-frame arena, or NULL to reject WebP.
Where an on-device-produced atlas lives: sink to write, pread to read back (DIP – an SDRAM memstore a...
void * pread_ctx
Context for pread.
jof_pread_fn pread
Read-back seam for the same bytes.
void * sink_ctx
Context for sink.
jof_sink_fn sink
Append-only atlas writer.
Context for the real reflow <img> loader (epub_reflow_img_load).
uint8_t * scratch
Caller-owned encoded-bytes scratch.
size_t scratch_cap
Scratch capacity (bounded RAM ceiling).
epub_book_t * book
Book to resolve <img src> hrefs against.
Binds up to k_epub_tile_max_sources images to one tile cache.
epub_tile_source_t sources[k_epub_tile_max_sources]
Registered images.
uint8_t * scratch
Stored-tile staging for deflate atlases.
ra8_tile_cache_t cache
Owned tile cache (decode wired to the binder).
uint32_t scratch_cap
Capacity of scratch.
uint8_t source_count
Registered image count.
One registered atlas image (private to the binder; treat as opaque).
jof_pread_fn pread
External atlas read seam, or NULL.
uint32_t image_id
Tile-cache key namespace for this image.
uint64_t total_size
Atlas byte length (backing size).
void * pread_ctx
Context for pread.
char path[k_epub_max_path_len]
Entry path (book-backed only).
epub_book_t * book
Owning book, or NULL for external atlas.
jof_info_t info
Parsed + validated atlas geometry.
Parsed + validated geometry of one JOF atlas.
Caller-supplied storage + decoder for ra8_tile_cache_init.
Tile-cache state (caller-owned; treat as private).
An inclusive rectangle of tile grid coordinates (the visible tiles).
A pinned view of a cached tile returned by ra8_tile_cache_get.