![]() |
Synergy Software Package User's Manual
|
#include <sf_jpeg_decode_api.h>
JPEG Decode API structure. Implementations will use the following API.
| ssp_err_t(* sf_jpeg_decode_api_t::close) (sf_jpeg_decode_ctrl_t *const p_ctrl) |
Closes JPEG codec device. Un-finished codec operation is interrupted, and output data are discarded.
| [in] | p_ctrl | Pointer to the control block set in SF_JPEG_Decode_Open(). |
| ssp_err_t(* sf_jpeg_decode_api_t::horizontalStrideSet) (sf_jpeg_decode_ctrl_t *const p_ctrl, uint32_t horizontal_stride) |
Configure the horizontal stride value.
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [out] | horizontal_stride | Set the horizontal stride value, in pixels |
| ssp_err_t(* sf_jpeg_decode_api_t::imageSizeGet) (sf_jpeg_decode_ctrl_t *const p_ctrl, uint16_t *p_horizontal_size, uint16_t *p_vertical_size) |
Obtain the size of the image. This function is only useful for decoding a JPEG image.
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [out] | p_horizontal_size | Width of the image, in pixels |
| [out] | p_vertical_size | Height of the image, in pixels |
| ssp_err_t(* sf_jpeg_decode_api_t::imageSubsampleSet) (sf_jpeg_decode_ctrl_t *const p_ctrl, jpeg_decode_subsample_t horizontal_subsample, jpeg_decode_subsample_t vertical_subsample) |
Configure the horizontal and vertical subsample values. This allows an application to reduce the size of the decoded image.
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [in] | horizontal_subsample | Set the horizontal subsample value |
| [in] | vertical_subsample | Set the vertical subsample value |
| ssp_err_t(* sf_jpeg_decode_api_t::inputBufferSet) (sf_jpeg_decode_ctrl_t *const p_ctrl, void *const p_buffer, uint32_t const buffer_size) |
Feed data into JPEG codec module.
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [in] | p_buffer | Buffer contains data to be processed by the JPEG codec module. The buffer starting address must be 8-byte aligned |
| [in] | buffer_size | Size of the data buffer, must be multiple of 8 bytes |
| ssp_err_t(* sf_jpeg_decode_api_t::linesDecodedGet) (sf_jpeg_decode_ctrl_t *const p_ctrl, uint32_t *const p_lines) |
Obtain number of lines JPEG codec decoded.
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [out] | p_lines | Number of lines decoded into the output buffer. |
| ssp_err_t(* sf_jpeg_decode_api_t::open) (sf_jpeg_decode_ctrl_t *const p_ctrl, sf_jpeg_decode_cfg_t const *const p_cfg) |
Acquire mutex, then handle driver initialization at the HAL layer. This function releases mutex before it returns to the caller.
| [in,out] | p_ctrl | Pointer to a structure allocated by user. Elements initialized here. |
| [in] | p_cfg | Pointer to configuration structure. All elements of the structure must be set by user. |
| ssp_err_t(* sf_jpeg_decode_api_t::outputBufferSet) (sf_jpeg_decode_ctrl_t *const p_ctrl, void *p_buffer, uint32_t buffer_size) |
Read processed data from JPEG codec module.
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [in] | p_buffer | User-supplied buffer space to hold output from JPEG codec module. The buffer starting address must be 8-byte aligned |
| [in] | buffer_size | Size of the output data buffer |
| ssp_err_t(* sf_jpeg_decode_api_t::pixelFormatGet) (sf_jpeg_decode_ctrl_t *const p_ctrl, jpeg_decode_color_space_t *const p_color_space) |
Obtain the pixel format of the image. This function is only useful for decoding a JPEG image.
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [out] | p_color_space | Color space of the image |
| ssp_err_t(* sf_jpeg_decode_api_t::statusGet) (sf_jpeg_decode_ctrl_t *const p_ctrl, jpeg_decode_status_t *const p_status) |
Obtain JPEG codec status
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [out] | p_status | Status of current JPEG codec module |
| ssp_err_t(* sf_jpeg_decode_api_t::versionGet) (ssp_version_t *const p_version) |
Gets version and stores it in provided pointer p_version.
| [out] | p_version | Code and API version used. |
| ssp_err_t(* sf_jpeg_decode_api_t::wait) (sf_jpeg_decode_ctrl_t *const p_ctrl, jpeg_decode_status_t *const p_status, uint32_t timeout) |
Wait for current JPEG codec operation to finish
| [in] | p_ctrl | Pointer to the control block initialized in SF_JPEG_Decode_Open(). |
| [out] | p_status | Status of current JPEG codec module |
| [out] | timeout | Amount of time (in ThreadX ticks) to wait |