|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Encoder state – buffer cursor, bit accumulator, scaled quant tables, Huffman LUTs and DC predictors. More...
#include <ra8_jpeg_sw_encode_internal.h>
Data Fields | |
| uint8_t * | dst |
| Destination JPEG byte buffer. | |
| uint32_t | cap |
| Capacity of dst in bytes. | |
| uint32_t | pos |
| Write cursor into dst. | |
| uint32_t | bit_buf |
| MSB-first entropy bit accumulator. | |
| uint8_t | bit_cnt |
| Bits currently valid in bit_buf. | |
| uint8_t | qy [k_ra8_jpeg_block_size] |
| Scaled luma quant table. | |
| uint8_t | qc [k_ra8_jpeg_block_size] |
| Scaled chroma quant table. | |
| int32_t | dc_pred [k_ra8_jpeg_max_comps] |
| Per-component DC predictors. | |
| uint16_t | code_dc_l [k_ra8_jpeg_huff_max] |
| Luma DC Huffman codes. | |
| uint8_t | size_dc_l [k_ra8_jpeg_huff_max] |
| Luma DC code lengths. | |
| uint16_t | code_ac_l [k_ra8_jpeg_huff_max] |
| Luma AC Huffman codes. | |
| uint8_t | size_ac_l [k_ra8_jpeg_huff_max] |
| Luma AC code lengths. | |
| uint16_t | code_dc_c [k_ra8_jpeg_huff_max] |
| Chroma DC Huffman codes. | |
| uint8_t | size_dc_c [k_ra8_jpeg_huff_max] |
| Chroma DC code lengths. | |
| uint16_t | code_ac_c [k_ra8_jpeg_huff_max] |
| Chroma AC Huffman codes. | |
| uint8_t | size_ac_c [k_ra8_jpeg_huff_max] |
| Chroma AC code lengths. | |
| bool | overflow |
| Set on capacity exhaustion. | |
Encoder state – buffer cursor, bit accumulator, scaled quant tables, Huffman LUTs and DC predictors.
One instance drives a whole ra8_jpeg_sw_encode() call: the destination byte cursor and MSB-first bit accumulator feed the entropy emitters in ra8_jpeg_sw_encode_emit.c, while the scaled quantization tables, canonical Huffman code/size look-up tables and per-component DC predictors are consumed by the block encoder in ra8_jpeg_sw_encode.c.
Definition at line 64 of file ra8_jpeg_sw_encode_internal.h.
| uint32_t ra8_jpeg_enc_ctx_t::bit_buf |
MSB-first entropy bit accumulator.
Definition at line 69 of file ra8_jpeg_sw_encode_internal.h.
Referenced by priv_jpeg_sw_enc_flush_bits(), and priv_jpeg_sw_enc_put_bits().
| uint8_t ra8_jpeg_enc_ctx_t::bit_cnt |
Bits currently valid in bit_buf.
Definition at line 70 of file ra8_jpeg_sw_encode_internal.h.
Referenced by priv_jpeg_sw_enc_flush_bits(), and priv_jpeg_sw_enc_put_bits().
| uint32_t ra8_jpeg_enc_ctx_t::cap |
Capacity of dst in bytes.
Definition at line 66 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_emit_u8(), and ra8_jpeg_sw_encode().
| uint16_t ra8_jpeg_enc_ctx_t::code_ac_c[k_ra8_jpeg_huff_max] |
Chroma AC Huffman codes.
Definition at line 83 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_encode_mcu_row(), and priv_jpeg_sw_enc_build_huff().
| uint16_t ra8_jpeg_enc_ctx_t::code_ac_l[k_ra8_jpeg_huff_max] |
Luma AC Huffman codes.
Definition at line 79 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_encode_mcu_row(), and priv_jpeg_sw_enc_build_huff().
| uint16_t ra8_jpeg_enc_ctx_t::code_dc_c[k_ra8_jpeg_huff_max] |
Chroma DC Huffman codes.
Definition at line 81 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_encode_mcu_row(), and priv_jpeg_sw_enc_build_huff().
| uint16_t ra8_jpeg_enc_ctx_t::code_dc_l[k_ra8_jpeg_huff_max] |
Luma DC Huffman codes.
Definition at line 77 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_encode_mcu_row(), and priv_jpeg_sw_enc_build_huff().
| int32_t ra8_jpeg_enc_ctx_t::dc_pred[k_ra8_jpeg_max_comps] |
Per-component DC predictors.
Definition at line 75 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_block().
| uint8_t* ra8_jpeg_enc_ctx_t::dst |
Destination JPEG byte buffer.
Definition at line 65 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_emit_u8(), and ra8_jpeg_sw_encode().
| bool ra8_jpeg_enc_ctx_t::overflow |
Set on capacity exhaustion.
Definition at line 85 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_emit_u8(), and internal_enc_run().
| uint32_t ra8_jpeg_enc_ctx_t::pos |
Write cursor into dst.
Definition at line 67 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_emit_u8(), and ra8_jpeg_sw_encode().
| uint8_t ra8_jpeg_enc_ctx_t::qc[k_ra8_jpeg_block_size] |
Scaled chroma quant table.
Definition at line 73 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_emit_dqt(), internal_enc_encode_mcu_row(), and internal_enc_run().
| uint8_t ra8_jpeg_enc_ctx_t::qy[k_ra8_jpeg_block_size] |
Scaled luma quant table.
Definition at line 72 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_emit_dqt(), internal_enc_encode_mcu_row(), and internal_enc_run().
| uint8_t ra8_jpeg_enc_ctx_t::size_ac_c[k_ra8_jpeg_huff_max] |
Chroma AC code lengths.
Definition at line 84 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_encode_mcu_row(), and priv_jpeg_sw_enc_build_huff().
| uint8_t ra8_jpeg_enc_ctx_t::size_ac_l[k_ra8_jpeg_huff_max] |
Luma AC code lengths.
Definition at line 80 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_encode_mcu_row(), and priv_jpeg_sw_enc_build_huff().
| uint8_t ra8_jpeg_enc_ctx_t::size_dc_c[k_ra8_jpeg_huff_max] |
Chroma DC code lengths.
Definition at line 82 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_encode_mcu_row(), and priv_jpeg_sw_enc_build_huff().
| uint8_t ra8_jpeg_enc_ctx_t::size_dc_l[k_ra8_jpeg_huff_max] |
Luma DC code lengths.
Definition at line 78 of file ra8_jpeg_sw_encode_internal.h.
Referenced by internal_enc_encode_mcu_row(), and priv_jpeg_sw_enc_build_huff().