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

Decoder state shared by the whole-buffer and streaming drivers. More...

#include <ra8_jpeg_sw_internal.h>

Collaboration diagram for ra8_jpeg_dec_ctx_t:

Data Fields

const uint8_t * src
 Byte slice the parsers read from.
uint32_t src_len
 Length of src in bytes.
uint32_t cursor
 Parse cursor into src.
uint16_t width
 Image width from SOF0, pixels.
uint16_t height
 Image height from SOF0, pixels.
uint8_t ncomp
 1 grayscale, 3 YCbCr.
uint8_t hmax
 Max horizontal sampling factor.
uint8_t vmax
 Max vertical sampling factor.
uint8_t comp_id [k_ra8_jpeg_max_comps]
 Component identifiers.
uint8_t comp_h [k_ra8_jpeg_max_comps]
 Horizontal sampling.
uint8_t comp_v [k_ra8_jpeg_max_comps]
 Vertical sampling.
uint8_t comp_qid [k_ra8_jpeg_max_comps]
 Quant-table selector.
uint8_t comp_dc_id [k_ra8_jpeg_max_comps]
 DC Huffman selector.
uint8_t comp_ac_id [k_ra8_jpeg_max_comps]
 AC Huffman selector.
int32_t comp_dc_pred [k_ra8_jpeg_max_comps]
 DC predictors (scan state).
uint16_t qtab [k_ra8_jpeg_quant_tabs][k_ra8_jpeg_block_size]
 Dequant tables.
ra8_jpeg_htab_t hdc [k_ra8_jpeg_huff_ids]
 DC Huffman tables.
ra8_jpeg_htab_t hac [k_ra8_jpeg_huff_ids]
 AC Huffman tables.

Detailed Description

Decoder state shared by the whole-buffer and streaming drivers.

src/src_len/cursor describe the byte slice the marker parsers read from. The whole-buffer driver points them at the entire JPEG stream; the streaming driver points them at its sliding window (one fully-materialised marker segment at a time). Tables and per-component layout persist across segments either way.

Invariant
hmax/vmax are non-zero after a successful SOF0 parse.
Since
0.1.0

Definition at line 571 of file ra8_jpeg_sw_internal.h.

Field Documentation

◆ comp_ac_id

uint8_t ra8_jpeg_dec_ctx_t::comp_ac_id[k_ra8_jpeg_max_comps]

AC Huffman selector.

Definition at line 588 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_block_ac(), and priv_jpeg_sw_parse_sos().

◆ comp_dc_id

uint8_t ra8_jpeg_dec_ctx_t::comp_dc_id[k_ra8_jpeg_max_comps]

DC Huffman selector.

Definition at line 587 of file ra8_jpeg_sw_internal.h.

Referenced by priv_jpeg_sw_block(), and priv_jpeg_sw_parse_sos().

◆ comp_dc_pred

int32_t ra8_jpeg_dec_ctx_t::comp_dc_pred[k_ra8_jpeg_max_comps]

DC predictors (scan state).

Definition at line 589 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_scan_begin(), internal_js_scan(), and priv_jpeg_sw_block().

◆ comp_h

uint8_t ra8_jpeg_dec_ctx_t::comp_h[k_ra8_jpeg_max_comps]

Horizontal sampling.

Definition at line 584 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_check_chroma_layout(), and internal_dec_parse_sof0_components().

◆ comp_id

uint8_t ra8_jpeg_dec_ctx_t::comp_id[k_ra8_jpeg_max_comps]

Component identifiers.

Definition at line 583 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_parse_sof0_components(), and priv_jpeg_sw_parse_sos().

◆ comp_qid

uint8_t ra8_jpeg_dec_ctx_t::comp_qid[k_ra8_jpeg_max_comps]

Quant-table selector.

Definition at line 586 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_block_ac(), internal_dec_parse_sof0_components(), and priv_jpeg_sw_block().

◆ comp_v

uint8_t ra8_jpeg_dec_ctx_t::comp_v[k_ra8_jpeg_max_comps]

Vertical sampling.

Definition at line 585 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_check_chroma_layout(), and internal_dec_parse_sof0_components().

◆ cursor

◆ hac

ra8_jpeg_htab_t ra8_jpeg_dec_ctx_t::hac[k_ra8_jpeg_huff_ids]

AC Huffman tables.

Definition at line 593 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_block_ac(), and internal_dec_parse_dht_one().

◆ hdc

ra8_jpeg_htab_t ra8_jpeg_dec_ctx_t::hdc[k_ra8_jpeg_huff_ids]

DC Huffman tables.

Definition at line 592 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_parse_dht_one(), and priv_jpeg_sw_block().

◆ height

uint16_t ra8_jpeg_dec_ctx_t::height

◆ hmax

◆ ncomp

◆ qtab

uint16_t ra8_jpeg_dec_ctx_t::qtab[k_ra8_jpeg_quant_tabs][k_ra8_jpeg_block_size]

Dequant tables.

Definition at line 591 of file ra8_jpeg_sw_internal.h.

Referenced by internal_dec_block_ac(), priv_jpeg_sw_block(), and priv_jpeg_sw_parse_dqt().

◆ src

◆ src_len

◆ vmax

◆ width

uint16_t ra8_jpeg_dec_ctx_t::width

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