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

Producer configuration: source, sink, tile geometry and work arena. More...

#include <jof_produce.h>

Data Fields

jof_pull_fn pull
 Encoded-source byte stream.
void * pull_ctx
 Context for pull.
jof_sink_fn sink
 Atlas byte sink (append-only).
void * sink_ctx
 Context for sink.
uint16_t tile_w
 Tile width, pixels (>= 1).
uint16_t tile_h
 Tile height, pixels (>= 1).
uint8_t codec
 jof_codec_t member.
uint16_t max_width
 Width budget cap (0 = format cap).
uint16_t max_height
 Height budget cap (0 = format cap).
size_t work_cap
 Arena size; see jof_work_bytes().
uint8_t * webp_work
 Whole-frame arena for WebP; NULL disables it.
size_t webp_work_cap
 WebP arena size; see webp_work_bytes().

Detailed Description

Producer configuration: source, sink, tile geometry and work arena.

max_width/max_height are the caller's fail-closed budget caps (0 selects the format cap k_jof_max_dim); a source exceeding them aborts with k_ra8_err_invalid_size before any pixel decodes. The producer carves every internal buffer from work; size it with jof_work_bytes() over the same caps. The arena is the RAM high-water by construction.

webp_work/webp_work_cap are the optional whole-frame arena for WebP sources (jof_webp_work_bytes() sizes it): the streaming JPEG/PNG pixel path always lives in work, while a WebP decode additionally needs the compressed source, the decoded RGBA frame and libwebp scratch, none of which fit the streaming budget. Leave webp_work NULL to fail-closed reject WebP sources (a streaming-only caller then needs no whole-frame RAM).

Invariant
tile_w/tile_h are non-zero and work covers work_cap.
webp_work is NULL, or it covers webp_work_cap bytes.
See also
jof_work_bytes()
jof_webp_work_bytes()
Since
0.1.0

Definition at line 155 of file jof_produce.h.

Field Documentation

◆ codec

◆ max_height

uint16_t jof_produce_cfg_t::max_height

Height budget cap (0 = format cap).

Definition at line 164 of file jof_produce.h.

Referenced by internal_init_state().

◆ max_width

uint16_t jof_produce_cfg_t::max_width

Width budget cap (0 = format cap).

Definition at line 163 of file jof_produce.h.

Referenced by internal_init_state().

◆ pull

jof_pull_fn jof_produce_cfg_t::pull

Encoded-source byte stream.

Definition at line 156 of file jof_produce.h.

Referenced by internal_produce_args_ok(), internal_sniff_head(), and jof_produce().

◆ pull_ctx

void* jof_produce_cfg_t::pull_ctx

Context for pull.

Definition at line 157 of file jof_produce.h.

Referenced by internal_sniff_head(), and jof_produce().

◆ sink

jof_sink_fn jof_produce_cfg_t::sink

Atlas byte sink (append-only).

Definition at line 158 of file jof_produce.h.

Referenced by internal_produce_args_ok(), and internal_sink().

◆ sink_ctx

void* jof_produce_cfg_t::sink_ctx

Context for sink.

Definition at line 159 of file jof_produce.h.

Referenced by internal_sink().

◆ tile_h

uint16_t jof_produce_cfg_t::tile_h

◆ tile_w

uint16_t jof_produce_cfg_t::tile_w

◆ webp_work

uint8_t* jof_produce_cfg_t::webp_work

Whole-frame arena for WebP; NULL disables it.

Definition at line 167 of file jof_produce.h.

Referenced by priv_jof_webp_transcode().

◆ webp_work_cap

size_t jof_produce_cfg_t::webp_work_cap

WebP arena size; see webp_work_bytes().

Definition at line 168 of file jof_produce.h.

Referenced by priv_jof_webp_transcode().

◆ work_cap

size_t jof_produce_cfg_t::work_cap

Arena size; see jof_work_bytes().

Definition at line 166 of file jof_produce.h.

Referenced by internal_init_state().


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