200[[nodiscard]] uint32_t
201jof_work_bytes(uint16_t max_width, uint16_t max_height, uint16_t tile_w, uint16_t tile_h);
236[[nodiscard]] uint32_t
291jof_probe_dims(
const uint8_t* data,
size_t len, uint16_t* out_w, uint16_t* out_h);
JOF band-tile atlas: the display-native normalized image format (#231, shared with the longstrip scro...
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).
ra8_err_t jof_probe_dims(const uint8_t *data, size_t len, uint16_t *out_w, uint16_t *out_h)
Read a source image's pixel dimensions without decoding its body.
ra8_err_t(* jof_pull_fn)(void *ctx, uint8_t *buf, size_t cap, size_t *got)
Forward byte source for the producer (DIP seam).
uint32_t jof_webp_work_bytes(uint16_t max_width, uint16_t max_height, uint32_t max_src_bytes)
Compute the whole-frame webp_work arena a WebP source needs (#290).
uint32_t jof_work_bytes(uint16_t max_width, uint16_t max_height, uint16_t tile_w, uint16_t tile_h)
Compute the work-arena size the producer needs for given caps.
ra8_err_t jof_produce(const jof_produce_cfg_t *cfg, jof_info_t *out_info)
Transcode one encoded JPEG/PNG/WebP source into a JOF atlas (#231, #290).
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Parsed + validated geometry of one JOF atlas.
Producer configuration: source, sink, tile geometry and work arena.
uint16_t max_width
Width budget cap (0 = format cap).
size_t webp_work_cap
WebP arena size; see webp_work_bytes().
void * pull_ctx
Context for pull.
uint8_t codec
jof_codec_t member.
uint16_t max_height
Height budget cap (0 = format cap).
jof_sink_fn sink
Atlas byte sink (append-only).
jof_pull_fn pull
Encoded-source byte stream.
void * sink_ctx
Context for sink.
uint8_t * webp_work
Whole-frame arena for WebP; NULL disables it.
uint16_t tile_h
Tile height, pixels (>= 1).
size_t work_cap
Arena size; see jof_work_bytes().
uint16_t tile_w
Tile width, pixels (>= 1).