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

One axis of the viewport resolved against the image: coverage + source span. More...

#include <zoom_internal.h>

Data Fields

int32_t d0
 First covered destination offset inside the viewport.
int32_t d1
 One past the last covered destination offset.
uint32_t s0
 First source index feeding the covered span.
uint32_t count
 Source indices feeding the covered span (0 if none).

Detailed Description

One axis of the viewport resolved against the image: coverage + source span.

All four members describe the same axis at once, because they are derived together and are only consistent together. d0 / d1 are offsets within the viewport (not framebuffer coordinates), half-open, and the region outside them is letterbox. s0 / count name the source indices that feed [d0, d1), which is exactly the residency footprint of one frame on this axis.

Invariant
0 <= d0 <= d1 <= extent.
count == 0 exactly when d0 == d1 (the image misses the viewport).
When count > 0, s0 + count <= src_dim.
Example:
zoom_axis_t ax = {};
priv_zoom_axis(v->anchor_x, v->dst.w, (int32_t)v->scale, (int32_t)v->src.width, &ax);
One axis of the viewport resolved against the image: coverage + source span.
void priv_zoom_axis(int32_t anchor, int32_t extent, int32_t scale, int32_t src_dim, zoom_axis_t *out)
Resolve one viewport axis against the image at the current magnification.
Definition zoom.c:60
See also
priv_zoom_axis
Since
0.1.0

Definition at line 51 of file zoom_internal.h.

Field Documentation

◆ count

uint32_t zoom_axis_t::count

Source indices feeding the covered span (0 if none).

Definition at line 55 of file zoom_internal.h.

Referenced by internal_fill_row(), internal_fill_strip(), priv_zoom_axis(), and zoom_view_window().

◆ d0

int32_t zoom_axis_t::d0

First covered destination offset inside the viewport.

Definition at line 52 of file zoom_internal.h.

Referenced by internal_expand_row(), and priv_zoom_axis().

◆ d1

int32_t zoom_axis_t::d1

One past the last covered destination offset.

Definition at line 53 of file zoom_internal.h.

Referenced by priv_zoom_axis().

◆ s0

uint32_t zoom_axis_t::s0

First source index feeding the covered span.

Definition at line 54 of file zoom_internal.h.

Referenced by internal_expand_row(), internal_fill_row(), priv_zoom_axis(), and zoom_view_window().


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