ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
reflow_image.h
Go to the documentation of this file.
1
22
23#pragma once
24
25#include <stddef.h>
26#include <stdint.h>
27
28#include "ra8_err.h"
29
41typedef struct {
42 uint8_t* base;
43 size_t cap;
44 size_t offset;
45 size_t live;
47
83 const uint8_t* bytes,
84 size_t len,
85 int32_t dst_x,
86 int32_t dst_y,
87 int32_t box_w,
88 int32_t box_h,
89 int32_t* out_w,
90 int32_t* out_h);
91
115[[nodiscard]] ra8_err_t
116ra8_img_probe_size(const uint8_t* bytes, size_t len, int32_t* out_w, int32_t* out_h);
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
ra8_err_t ra8_img_decode_blit(ra8_img_arena_t *arena, const uint8_t *bytes, size_t len, int32_t dst_x, int32_t dst_y, int32_t box_w, int32_t box_h, int32_t *out_w, int32_t *out_h)
Decode bytes and blit it, scaled to fit, into the bound framebuffer.
ra8_err_t ra8_img_probe_size(const uint8_t *bytes, size_t len, int32_t *out_w, int32_t *out_h)
Probe an image's intrinsic dimensions without a full decode.
Caller-owned bump arena backing a single image decode.
size_t offset
Current bump offset.
uint8_t * base
Caller-owned scratch buffer.
size_t cap
Scratch capacity, bytes.
size_t live
Live (allocated, not freed) blocks.