Synergy Software Package User's Manual

#include <sf_jpeg_decode_api.h>

Data Fields

ssp_err_t(* open )(sf_jpeg_decode_ctrl_t *const p_ctrl, sf_jpeg_decode_cfg_t const *const p_cfg)
 
ssp_err_t(* inputBufferSet )(sf_jpeg_decode_ctrl_t *const p_ctrl, void *const p_buffer, uint32_t const buffer_size)
 
ssp_err_t(* outputBufferSet )(sf_jpeg_decode_ctrl_t *const p_ctrl, void *p_buffer, uint32_t buffer_size)
 
ssp_err_t(* linesDecodedGet )(sf_jpeg_decode_ctrl_t *const p_ctrl, uint32_t *const p_lines)
 
ssp_err_t(* horizontalStrideSet )(sf_jpeg_decode_ctrl_t *const p_ctrl, uint32_t horizontal_stride)
 
ssp_err_t(* imageSubsampleSet )(sf_jpeg_decode_ctrl_t *const p_ctrl, jpeg_decode_subsample_t horizontal_subsample, jpeg_decode_subsample_t vertical_subsample)
 
ssp_err_t(* wait )(sf_jpeg_decode_ctrl_t *const p_ctrl, jpeg_decode_status_t *const p_status, uint32_t timeout)
 
ssp_err_t(* statusGet )(sf_jpeg_decode_ctrl_t *const p_ctrl, jpeg_decode_status_t *const p_status)
 
ssp_err_t(* imageSizeGet )(sf_jpeg_decode_ctrl_t *const p_ctrl, uint16_t *p_horizontal_size, uint16_t *p_vertical_size)
 
ssp_err_t(* pixelFormatGet )(sf_jpeg_decode_ctrl_t *const p_ctrl, jpeg_decode_color_space_t *const p_color_space)
 
ssp_err_t(* close )(sf_jpeg_decode_ctrl_t *const p_ctrl)
 
ssp_err_t(* versionGet )(ssp_version_t *const p_version)
 

Detailed Description

JPEG Decode API structure. Implementations will use the following API.

Field Documentation

◆ close

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.

Parameters
[in]p_ctrlPointer to the control block set in SF_JPEG_Decode_Open().

◆ horizontalStrideSet

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.

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[out]horizontal_strideSet the horizontal stride value, in pixels

◆ imageSizeGet

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.

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[out]p_horizontal_sizeWidth of the image, in pixels
[out]p_vertical_sizeHeight of the image, in pixels

◆ imageSubsampleSet

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.

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[in]horizontal_subsampleSet the horizontal subsample value
[in]vertical_subsampleSet the vertical subsample value

◆ inputBufferSet

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.

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[in]p_bufferBuffer contains data to be processed by the JPEG codec module. The buffer starting address must be 8-byte aligned
[in]buffer_sizeSize of the data buffer, must be multiple of 8 bytes

◆ linesDecodedGet

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.

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[out]p_linesNumber of lines decoded into the output buffer.

◆ open

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.

Parameters
[in,out]p_ctrlPointer to a structure allocated by user. Elements initialized here.
[in]p_cfgPointer to configuration structure. All elements of the structure must be set by user.

◆ outputBufferSet

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.

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[in]p_bufferUser-supplied buffer space to hold output from JPEG codec module. The buffer starting address must be 8-byte aligned
[in]buffer_sizeSize of the output data buffer

◆ pixelFormatGet

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.

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[out]p_color_spaceColor space of the image

◆ statusGet

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

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[out]p_statusStatus of current JPEG codec module

◆ versionGet

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.

Parameters
[out]p_versionCode and API version used.

◆ wait

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

Parameters
[in]p_ctrlPointer to the control block initialized in SF_JPEG_Decode_Open().
[out]p_statusStatus of current JPEG codec module
[out]timeoutAmount of time (in ThreadX ticks) to wait

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