43typedef enum : uint8_t {
175typedef enum : uint32_t {
ra8_err_t priv_jof_on_geom(void *ctx, uint16_t width, uint16_t height, uint8_t channels)
Bind the source geometry: validate caps, carve buffers, emit header.
void * priv_jof_bump_take(jof_bump_t *bump, size_t len)
Carve len 8-byte-aligned bytes from the bump arena.
jof_bump_const_t
Bump-allocator alignment constants.
@ k_jof_bump_align
Every carve is 8-byte aligned.
jof_carve_const_t
Carve-sizing constant shared by both work-arena calculators.
@ k_jof_carve_slack
Alignment slack folded into every arena sizing.
ra8_err_t priv_jof_on_rows(void *ctx, const uint8_t *px, uint16_t width, uint16_t y0, uint16_t nrows, uint8_t channels)
Row sink shared by every decoder arm: accumulate, flush full bands.
ra8_err_t priv_jof_png_rows(jof_pull_fn pull, void *pull_ctx, jof_bump_t *bump, uint16_t max_w, uint16_t max_h, jof_geom_fn on_geom, jof_rows_fn on_rows, void *cb_ctx)
Streaming PNG scanline decode: pull bytes in, emit rows in order.
ra8_err_t(* jof_geom_fn)(void *ctx, uint16_t width, uint16_t height, uint8_t channels)
Producer geometry hook: fires once when the source dimensions and output channel count are known,...
ra8_err_t(* jof_rows_fn)(void *ctx, const uint8_t *px, uint16_t width, uint16_t y0, uint16_t nrows, uint8_t channels)
Producer row sink: receives decoded pixel rows strictly in order.
ra8_err_t priv_jof_webp_transcode(jof_prod_state_t *st, jof_prefix_pull_t *pfx)
Transcode a WebP source into the JOF tile path (whole-frame, #290).
ra8_err_t priv_jof_prefix_pull(void *ctx, uint8_t *buf, size_t cap, size_t *got)
Pull adapter: replay the sniffed head, then delegate to the source.
Import-time transcode producer: JPEG/PNG/WebP -> JOF band-tile atlas in bounded RAM (#231,...
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).
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Linear (bump) allocator over the caller's work arena.
size_t off
First free byte.
uint8_t * base
Arena base (caller's work buffer).
size_t cap
Arena capacity, bytes.
Pull adapter that replays the sniffed head bytes, then delegates.
size_t head_len
Sniffed byte count.
const uint8_t * head
Sniffed bytes to replay.
void * inner_ctx
Context for the source.
jof_pull_fn inner
Real source.
Whole transcode state (module-static instance in the producer TU).
uint32_t tiles_done
Tiles encoded + recorded so far.
uint32_t cmp_cap
Capacity of cmp.
uint32_t written
Atlas bytes sunk so far.
uint8_t * cmp
One encoded tile (deflate codec).
uint8_t geom_done
1 once geometry was bound.
uint32_t band_fill
Rows currently in the band.
jof_bump_t bump_store
Arena allocator state.
const jof_produce_cfg_t * cfg
Caller configuration.
uint8_t * idx
Tile index bytes (8 per tile).
uint8_t * stage
One packed tile payload.
uint8_t bpp
Output bytes per pixel.
uint16_t w
Source width, pixels.
uint16_t cap_h
Effective height cap.
uint16_t tile_cols
Tile grid columns.
uint32_t rows_seen
Decoded rows accumulated so far.
uint32_t dfl_len
Scratch length (0 for raw codec).
uint16_t tile_rows
Tile grid rows.
uint32_t tile_count
Total tiles (cols * rows).
jof_bump_t * bump
Arena allocator (owned).
uint8_t * dfl
Deflate compressor scratch.
uint8_t * band
One tile row of decoded pixels.
uint16_t h
Source height, pixels.
uint16_t cap_w
Effective width cap.
Producer configuration: source, sink, tile geometry and work arena.