ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
zoom_tiles.h
Go to the documentation of this file.
1
38
39#pragma once
40
41#include <stdint.h>
42
43#include "ra8_err.h"
44#include "ra8_tile_cache.h"
45#include "zoom.h"
46
72typedef struct {
74 uint32_t image_id;
75 uint32_t width;
76 uint32_t height;
77 uint16_t tile_w;
78 uint16_t tile_h;
79 uint16_t tile_cols;
80 uint16_t tile_rows;
82
116 ra8_tile_cache_t* cache,
117 uint32_t image_id,
118 uint32_t width,
119 uint32_t height,
120 uint16_t tile_w,
121 uint16_t tile_h);
122
144
179[[nodiscard]] ra8_err_t zoom_tile_read(void* ctx,
180 uint32_t x,
181 uint32_t y,
182 uint32_t w,
183 uint32_t h,
184 uint8_t* out,
185 uint32_t out_stride);
186
226 const zoom_view_t* v,
227 zoom_pan_t dir,
228 uint16_t max_tiles,
229 uint16_t* out_warmed);
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Fixed-RAM-budget image-tile cache with LRU eviction (Layer 3b, #147).
Tile-cache state (caller-owned; treat as private).
A magnifiable full-resolution image behind the gray8 sub-rect seam.
Definition zoom.h:296
A tiled gray8 image, its grid, and the cache that pages it.
Definition zoom_tiles.h:72
uint16_t tile_cols
Derived tile columns.
Definition zoom_tiles.h:79
ra8_tile_cache_t * cache
Borrowed, initialised tile cache.
Definition zoom_tiles.h:73
uint16_t tile_w
Tile width, pixels.
Definition zoom_tiles.h:77
uint16_t tile_rows
Derived tile rows.
Definition zoom_tiles.h:80
uint16_t tile_h
Tile height, pixels.
Definition zoom_tiles.h:78
uint32_t width
Full-resolution image width, pixels.
Definition zoom_tiles.h:75
uint32_t image_id
Tile-cache key image id for this image.
Definition zoom_tiles.h:74
uint32_t height
Full-resolution image height, pixels.
Definition zoom_tiles.h:76
Live viewport: where it is looking, how magnified, and what it owes the panel.
Definition zoom.h:472
Tap-to-zoom image viewer: viewport state machine + tiled magnifying render (#478).
zoom_pan_t
Discrete pan direction for tap-band navigation.
Definition zoom.h:222
ra8_err_t zoom_tiles_prefetch(zoom_tile_src_t *ts, const zoom_view_t *v, zoom_pan_t dir, uint16_t max_tiles, uint16_t *out_warmed)
Warm the tiles one pan step beyond what a view currently shows.
ra8_err_t zoom_tile_read(void *ctx, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint8_t *out, uint32_t out_stride)
zoom_read_fn over a tiled atlas paged by an ra8_tile_cache.
ra8_err_t zoom_tile_src_bind(zoom_tile_src_t *ts, zoom_source_t *out)
Present a bound tiled image to the zoom engine as a zoom_source_t.
ra8_err_t zoom_tile_src_init(zoom_tile_src_t *ts, ra8_tile_cache_t *cache, uint32_t image_id, uint32_t width, uint32_t height, uint16_t tile_w, uint16_t tile_h)
Bind a tiled image and its cache, deriving the tile grid.