RA Flexible Software Package Documentation
Release v5.6.0
|
|
Interface for JPEG functions.
Data Structures | |
struct | jpeg_encode_image_size_t |
struct | jpeg_callback_args_t |
struct | jpeg_cfg_t |
struct | jpeg_api_t |
struct | jpeg_instance_t |
Typedefs | |
typedef void | jpeg_ctrl_t |
Enumerations | |
enum | jpeg_color_space_t |
enum | jpeg_data_order_t |
enum | jpeg_status_t |
enum | jpeg_decode_pixel_format_t |
enum | jpeg_decode_subsample_t |
struct jpeg_encode_image_size_t |
struct jpeg_callback_args_t |
Callback status structure
Data Fields | ||
---|---|---|
jpeg_status_t | status | JPEG status. |
uint32_t | image_size | JPEG image size. |
void const * | p_context | Pointer to user-provided context. |
struct jpeg_cfg_t |
User configuration structure, used in open function.
Data Fields | |
IRQn_Type | jedi_irq |
Data transfer interrupt IRQ number. | |
IRQn_Type | jdti_irq |
Decompression interrupt IRQ number. | |
uint8_t | jdti_ipl |
Data transfer interrupt priority. | |
uint8_t | jedi_ipl |
Decompression interrupt priority. | |
jpeg_mode_t | default_mode |
Mode to use at startup. | |
jpeg_data_order_t | decode_input_data_order |
Input data stream byte order. | |
jpeg_data_order_t | decode_output_data_order |
Output data stream byte order. | |
jpeg_decode_pixel_format_t | pixel_format |
Pixel format. | |
uint8_t | alpha_value |
Alpha value to be applied to decoded pixel data. Only valid for ARGB8888 format. | |
void(* | p_decode_callback )(jpeg_callback_args_t *p_args) |
User-supplied callback functions. | |
void const * | p_decode_context |
Placeholder for user data. Passed to user callback in jpeg_callback_args_t. | |
jpeg_data_order_t | encode_input_data_order |
Input data stream byte order. | |
jpeg_data_order_t | encode_output_data_order |
Output data stream byte order. | |
uint16_t | dri_marker |
DRI Marker setting (0 = No DRI or RST marker) | |
uint16_t | horizontal_resolution |
Horizontal resolution of input image. | |
uint16_t | vertical_resolution |
Vertical resolution of input image. | |
uint16_t | horizontal_stride_pixels |
Horizontal stride of input image. | |
uint8_t const * | p_quant_luma_table |
Luma quantization table. | |
uint8_t const * | p_quant_chroma_table |
Chroma quantization table. | |
uint8_t const * | p_huffman_luma_ac_table |
Huffman AC table for luma. | |
uint8_t const * | p_huffman_luma_dc_table |
Huffman DC table for luma. | |
uint8_t const * | p_huffman_chroma_ac_table |
Huffman AC table for chroma. | |
uint8_t const * | p_huffman_chroma_dc_table |
Huffman DC table for chroma. | |
void(* | p_encode_callback )(jpeg_callback_args_t *p_args) |
User-supplied callback functions. | |
void const * | p_encode_context |
Placeholder for user data. Passed to user callback in jpeg_callback_args_t. | |
struct jpeg_api_t |
JPEG functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(jpeg_ctrl_t *const p_ctrl, jpeg_cfg_t const *const p_cfg) |
fsp_err_t(* | inputBufferSet )(jpeg_ctrl_t *const p_ctrl, void *p_buffer, uint32_t buffer_size) |
fsp_err_t(* | outputBufferSet )(jpeg_ctrl_t *const p_ctrl, void *p_buffer, uint32_t buffer_size) |
fsp_err_t(* | statusGet )(jpeg_ctrl_t *const p_ctrl, jpeg_status_t *const p_status) |
fsp_err_t(* | close )(jpeg_ctrl_t *const p_ctrl) |
fsp_err_t(* | horizontalStrideSet )(jpeg_ctrl_t *const p_ctrl, uint32_t horizontal_stride) |
fsp_err_t(* | pixelFormatGet )(jpeg_ctrl_t *const p_ctrl, jpeg_color_space_t *const p_color_space) |
fsp_err_t(* | imageSubsampleSet )(jpeg_ctrl_t *const p_ctrl, jpeg_decode_subsample_t horizontal_subsample, jpeg_decode_subsample_t vertical_subsample) |
fsp_err_t(* | linesDecodedGet )(jpeg_ctrl_t *const p_ctrl, uint32_t *const p_lines) |
fsp_err_t(* | imageSizeGet )(jpeg_ctrl_t *const p_ctrl, uint16_t *p_horizontal_size, uint16_t *p_vertical_size) |
fsp_err_t(* | imageSizeSet )(jpeg_ctrl_t *const p_ctrl, jpeg_encode_image_size_t *p_image_size) |
fsp_err_t(* | modeSet )(jpeg_ctrl_t *const p_ctrl, jpeg_mode_t mode) |
fsp_err_t(* jpeg_api_t::open) (jpeg_ctrl_t *const p_ctrl, jpeg_cfg_t const *const p_cfg) |
Initial configuration
[in,out] | p_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
[in] | p_cfg | Pointer to configuration structure. All elements of this structure must be set by user. |
fsp_err_t(* jpeg_api_t::inputBufferSet) (jpeg_ctrl_t *const p_ctrl, void *p_buffer, uint32_t buffer_size) |
Assign input data buffer to JPEG codec.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[in] | p_buffer | Pointer to the input buffer space |
[in] | buffer_size | Size of the input buffer |
fsp_err_t(* jpeg_api_t::outputBufferSet) (jpeg_ctrl_t *const p_ctrl, void *p_buffer, uint32_t buffer_size) |
Assign output buffer to JPEG codec for storing output data.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[in] | p_buffer | Pointer to the output buffer space |
[in] | buffer_size | Size of the output buffer |
fsp_err_t(* jpeg_api_t::statusGet) (jpeg_ctrl_t *const p_ctrl, jpeg_status_t *const p_status) |
Retrieve current status of the JPEG codec module.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[out] | p_status | JPEG module status |
fsp_err_t(* jpeg_api_t::close) (jpeg_ctrl_t *const p_ctrl) |
Cancel an outstanding operation.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
fsp_err_t(* jpeg_api_t::horizontalStrideSet) (jpeg_ctrl_t *const p_ctrl, uint32_t horizontal_stride) |
Configure the horizontal stride value.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[in] | horizontal_stride | Horizontal stride value to be used for the decoded image data. |
[in] | buffer_size | Size of the output buffer |
fsp_err_t(* jpeg_api_t::pixelFormatGet) (jpeg_ctrl_t *const p_ctrl, jpeg_color_space_t *const p_color_space) |
Get the input pixel format.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[out] | p_color_space | JPEG input format. |
fsp_err_t(* jpeg_api_t::imageSubsampleSet) (jpeg_ctrl_t *const p_ctrl, jpeg_decode_subsample_t horizontal_subsample, jpeg_decode_subsample_t vertical_subsample) |
Configure the horizontal and vertical subsample settings.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[in] | horizontal_subsample | Horizontal subsample value |
[in] | vertical_subsample | Vertical subsample value |
fsp_err_t(* jpeg_api_t::linesDecodedGet) (jpeg_ctrl_t *const p_ctrl, uint32_t *const p_lines) |
Return the number of lines decoded into the output buffer.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[out] | p_lines | Number of lines decoded |
fsp_err_t(* jpeg_api_t::imageSizeGet) (jpeg_ctrl_t *const p_ctrl, uint16_t *p_horizontal_size, uint16_t *p_vertical_size) |
Retrieve image size during decoding operation.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[out] | p_horizontal_size | Image horizontal size, in number of pixels. |
[out] | p_vertical_size | Image vertical size, in number of pixels. |
fsp_err_t(* jpeg_api_t::imageSizeSet) (jpeg_ctrl_t *const p_ctrl, jpeg_encode_image_size_t *p_image_size) |
Set image parameters to JPEG Codec
[in,out] | p_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
[in] | p_image_size | Pointer to the RAW image parameters |
fsp_err_t(* jpeg_api_t::modeSet) (jpeg_ctrl_t *const p_ctrl, jpeg_mode_t mode) |
Switch between encode and decode mode or vice-versa.
[in] | p_ctrl | Control block set in jpeg_api_t::open call. |
[in] | mode | Mode to switch to |
struct jpeg_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
jpeg_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
jpeg_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
jpeg_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void jpeg_ctrl_t |
JPEG decode control block. Allocate an instance specific control block to pass into the JPEG decode API calls.
enum jpeg_color_space_t |
enum jpeg_data_order_t |
Multi-byte Data Format
enum jpeg_status_t |
JPEG HLD driver internal status information. The driver can simultaneously be in more than any one status at the same time. Parse the status bit-fields using the definitions in this enum to determine driver status
Data type for horizontal and vertical subsample settings. This setting applies only to the decoding operation.