acl.himpi.dvpp_get_image_info

C Prototype

hi_s32 hi_mpi_dvpp_get_image_info(hi_payload_type img_type, const hi_vdec_stream *stream, hi_img_info *img_info);

Python Function

img_info, ret = acl.himpi.dvpp_get_image_info(img_type, stream)

Function Usage

Obtains the output width, height, width stride, height stride, and buffer size as well as the source image format when the source image format is retained after decoding.

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

img_type: int, type of the stream to parse. Currently, only the HI_PT_JPEG stream type is supported. For details, see hi_payload_type.

stream: int, pointer address of the input stream information.

Return Value

img_info: dict, image information dictionary, including the width, height, width stride, height stride, and buffer size and source image format after decoding. The source image format is returned through the pixel_format parameter. For details, see hi_img_info.

ret: int, error code.