acl.himpi.vdec_get_jpegd_output_info
C 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) |
|---|---|
Python Function |
img_info, ret = acl.himpi.vdec_get_jpegd_output_info(stream, output_format) |
Function Usage |
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. For an unsupported stream, the API returns the error code HI_ERR_VDEC_NOT_SUPPORT. For details, see Common Return Codes. The Atlas 200/300/500 Inference Product does not support this API. The Atlas Training Series Product does not support this API. |
Input Description |
stream: dict, input stream information dictionary. For details, see hi_vdec_stream. output_format: int, output image format. To obtain related information based on the source image format, set this parameter to HI_PIXEL_FORMAT_UNKNOWN = 0. To obtain related information in a 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. |
Return Value |
img_info: dict, output image information dictionary, including the width, height, width stride, height stride, and buffer size and image format after decoding. The output image format is returned by pixel_format. For details, see hi_img_info. ret: int, error code.
|