hi_mpi_dvpp_get_image_info

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

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. 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 VDEC/JPEGD Return Codes.

Prototype

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

Parameters

Parameter

Input/Output

Description

img_type

Input

The type of stream to parse.

Currently, the stream type can only be HI_PT_JPEG.

stream

Input

Pointer to the input stream information.

In Ascend EP form, when this API is called on the host, the address configured by the addr parameter in the structure must be the memory address on the host.

In Ascend RC form, when this API is called on the device, the address configured by the addr parameter in the structure must be the memory address on the device.

In Ctrl CPU open form form, when this API is called on the device, the address configured by the addr parameter in the structure must be the memory address on the device.

img_info

Output

Pointer to the image information, including the image width, height, width stride, height stride, buffer size occupied after decoding, and source image format.

The source image format is returned through the pixel_format parameter.

Returns