ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_webp.h
Go to the documentation of this file.
1
34#pragma once
35
36#include <stddef.h>
37#include <stdint.h>
38
39#include "ra8_err.h"
40#include "ra8_webp_arena.h"
41
57typedef enum : uint32_t {
61
99[[nodiscard]] ra8_err_t
100ra8_webp_get_info(const uint8_t* data, size_t size, uint32_t* out_w, uint32_t* out_h);
101
159[[nodiscard]] ra8_err_t ra8_webp_decode_rgba(const uint8_t* data,
160 size_t size,
161 ra8_webp_arena_t* arena,
162 uint8_t* out_rgba,
163 size_t out_stride,
164 size_t out_capacity,
165 uint32_t* out_w,
166 uint32_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_webp_decode_rgba(const uint8_t *data, size_t size, ra8_webp_arena_t *arena, uint8_t *out_rgba, size_t out_stride, size_t out_capacity, uint32_t *out_w, uint32_t *out_h)
Decode a WebP into a caller-owned RGBA8888 buffer, heap-free.
Definition ra8_webp.c:187
ra8_webp_limits_t
WebP decode facade fixed limits (no magic numbers).
Definition ra8_webp.h:57
@ k_ra8_webp_bytes_per_px
Output bytes per pixel (RGBA8888).
Definition ra8_webp.h:59
@ k_ra8_webp_max_dim
Max accepted width/height, pixels/axis.
Definition ra8_webp.h:58
ra8_err_t ra8_webp_get_info(const uint8_t *data, size_t size, uint32_t *out_w, uint32_t *out_h)
Read a WebP header's pixel dimensions without decoding the body.
Definition ra8_webp.c:33
Heap-free scratch allocator hooks for the vendored libwebp decoder.
Caller-owned bump arena backing a single WebP decode.