ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
zoom_tile_src_t Struct Reference

A tiled gray8 image, its grid, and the cache that pages it. More...

#include <zoom_tiles.h>

Collaboration diagram for zoom_tile_src_t:

Data Fields

ra8_tile_cache_tcache
 Borrowed, initialised tile cache.
uint32_t image_id
 Tile-cache key image id for this image.
uint32_t width
 Full-resolution image width, pixels.
uint32_t height
 Full-resolution image height, pixels.
uint16_t tile_w
 Tile width, pixels.
uint16_t tile_h
 Tile height, pixels.
uint16_t tile_cols
 Derived tile columns.
uint16_t tile_rows
 Derived tile rows.

Detailed Description

A tiled gray8 image, its grid, and the cache that pages it.

Everything the adapter needs to map a pixel rectangle onto tiles, held as plain integers rather than a parsed-format handle so the same binding serves a JOF atlas, a comic page reader, or a procedurally decoded fixture. The cache's decode-on-miss callback is what actually knows the container.

Invariant
cache is non-NULL and initialised.
tile_cols == ceil(width / tile_w) and likewise for rows.
Decoded tiles are gray8, one byte per pixel, tightly packed.
Example:
zoom_source_t src = {};
(void)zoom_tile_src_init(&ts, &cache, k_image_id, 4096U, 3072U, 256U, 256U);
(void)zoom_tile_src_bind(&ts, &src);
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
ra8_tile_cache_t * cache
Borrowed, initialised tile cache.
Definition zoom_tiles.h:73
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.
See also
zoom_tile_src_init
Since
0.1.0

Definition at line 72 of file zoom_tiles.h.

Field Documentation

◆ cache

ra8_tile_cache_t* zoom_tile_src_t::cache

Borrowed, initialised tile cache.

Definition at line 73 of file zoom_tiles.h.

Referenced by ez_scene_prefetch().

◆ height

uint32_t zoom_tile_src_t::height

Full-resolution image height, pixels.

Definition at line 76 of file zoom_tiles.h.

◆ image_id

uint32_t zoom_tile_src_t::image_id

Tile-cache key image id for this image.

Definition at line 74 of file zoom_tiles.h.

◆ tile_cols

uint16_t zoom_tile_src_t::tile_cols

Derived tile columns.

Definition at line 79 of file zoom_tiles.h.

◆ tile_h

uint16_t zoom_tile_src_t::tile_h

Tile height, pixels.

Definition at line 78 of file zoom_tiles.h.

◆ tile_rows

uint16_t zoom_tile_src_t::tile_rows

Derived tile rows.

Definition at line 80 of file zoom_tiles.h.

◆ tile_w

uint16_t zoom_tile_src_t::tile_w

Tile width, pixels.

Definition at line 77 of file zoom_tiles.h.

◆ width

uint32_t zoom_tile_src_t::width

Full-resolution image width, pixels.

Definition at line 75 of file zoom_tiles.h.


The documentation for this struct was generated from the following file: