hi_mpi_vdec_get_jpegd_output_info
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
☓ |
Function Description
For image decoding, this API is used to obtain the output width, height, width stride, height stride of the source or specified image format, and buffer size and image format after decoding, based on input streams.
This API checks whether the image format supports decoding. If the image format does not support decoding, the API returns the HI_ERR_VDEC_NOT_SUPPORT error code. For details about the error code, see Common Return Codes.
Prototype
hi_s32 hi_mpi_vdec_get_jpegd_output_info(const hi_vdec_stream *stream, const hi_pixel_format output_format, hi_img_info *img_info)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
stream |
Input |
Pointer to the input stream information. For the following products, when this API is called on the host, the configured addr must be a buffer address on the host:
For the following products, when this API is called on the device, the configured addr must be a buffer address on the device:
|
output_format |
Input |
Output formats: To obtain related information based on the source image format, set this parameter to HI_PIXEL_FORMAT_UNKNOWN. To obtain related information based on the specified format, set this parameter to the corresponding image format. For details about the supported image formats, see Restrictions on Image Formats, Width and Height Alignment, and Buffers. |
img_info |
Output |
Information about the output image, including the width, height, width stride, height stride, and buffer size and image format after decoding. The output image format is returned by img_pixel_format. |
Returns
- 0: success
- Other values: failure. For details, see Common Return Codes and VDEC/JPEGD Return Codes.