88typedef enum : uint16_t {
115 const uint8_t* pixels,
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).
ra8_err_t longstrip_prefetch(longstrip_t *wt, uint16_t depth)
Warm the cache with bands just beyond the viewport, in scroll order.
ra8_err_t longstrip_tile_decode(void *ctx, const ra8_tile_key_t *key, uint8_t *cell, uint32_t cell_bytes, uint16_t *out_w, uint16_t *out_h)
JOF-backed ra8_tile_decode_fn: page one band in on a cache miss.
longstrip_limits_t
Fixed engine bounds (NASA P10 Rule 2: every loop provably bounded).
@ k_longstrip_max_visible_bands
Visible + render loop bound.
@ k_longstrip_max_prefetch
Max prefetch depth per call.
ra8_err_t longstrip_scroll_by(longstrip_t *wt, int32_t delta)
Scroll by a signed pixel delta (a finger drag), clamping at the ends.
ra8_err_t longstrip_visible_bands(const longstrip_t *wt, int32_t scroll_y, uint16_t *out_first, uint16_t *out_last)
Compute the inclusive visible band range for a scroll position.
int32_t longstrip_clamp_scroll(const longstrip_t *wt, int32_t y)
Clamp a candidate scroll position to the strip's legal range.
ra8_err_t longstrip_render(longstrip_t *wt, longstrip_render_stats_t *stats)
Composite every visible band at the current scroll position.
ra8_err_t longstrip_set_viewport(longstrip_t *wt, uint16_t viewport_w, uint16_t viewport_h)
Resize the viewport of an open strip and re-derive the scroll clamp.
ra8_err_t longstrip_open(longstrip_t *wt, const longstrip_cfg_t *cfg)
Open a longstrip strip over a parsed + validated JOF atlas.
ra8_err_t longstrip_fling(longstrip_t *wt, int32_t v0)
Start a momentum fling with initial velocity v0.
bool longstrip_tick(longstrip_t *wt)
Advance the fling one physics step (integer velocity + friction).
ra8_err_t longstrip_band_at_y(const longstrip_t *wt, uint32_t y, uint16_t *out_band)
Report the band index containing canvas row y.
ra8_err_t(* longstrip_blit_fn)(void *ctx, const uint8_t *pixels, uint16_t src_w, uint16_t src_h, uint8_t bpp, int32_t dst_x, int32_t dst_y)
Composite one decoded band sub-window onto the display (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).
Parsed + validated geometry of one JOF atlas.
One-shot configuration handed to longstrip_open.
void * pread_ctx
Context for pread.
ra8_tile_cache_t * cache
Band cache (decode-on-miss = JOF).
uint16_t viewport_h
On-screen viewport height, pixels.
uint32_t image_id
Tile-cache key namespace for strip.
uint16_t viewport_w
On-screen viewport width, pixels.
jof_pread_fn pread
Atlas backing read seam.
uint64_t atlas_size
Atlas byte length (for parse).
longstrip_blit_fn blit
Band composite sink.
void * blit_ctx
Context for blit.
Context binding a JOF atlas to a ra8_tile_cache decode-on-miss.
uint8_t * scratch
Deflate staging (codec 1 only).
void * pread_ctx
Context for pread.
jof_pread_fn pread
Atlas backing read seam.
jof_info_t info
Parsed atlas geometry.
uint32_t scratch_cap
Capacity of scratch.
Per-frame render accounting returned by longstrip_render.
uint16_t skipped
Visible bands that failed to composite.
uint32_t covered_rows
Viewport rows covered by the drawn bands.
uint16_t bands_drawn
Visible bands composited this frame.
Opened longstrip-strip scroll state (caller-owned; treat as private).
int32_t max_scroll
Clamp ceiling (>= 0).
ra8_tile_cache_t * cache
Band cache.
uint32_t canvas_w
Strip width, pixels (== info.width).
jof_info_t info
Parsed atlas geometry.
uint32_t canvas_h
Strip height, pixels (== info.height).
uint32_t image_id
Tile-cache key namespace.
uint16_t band_count
Bands (== info.tile_rows).
uint16_t viewport_h
Viewport height, pixels.
uint16_t viewport_w
Viewport width, pixels.
uint16_t band_h
Band height, pixels (== info.tile_h).
int32_t scroll_y
Viewport top on the canvas, clamped.
longstrip_blit_fn blit
Band composite sink.
int32_t velocity
Fling velocity, px/tick (signed).
void * blit_ctx
Context for blit.
Tile-cache state (caller-owned; treat as private).
Identifies one decoded image tile.