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 training product

x

Atlas inference product

Atlas 200I/500 A2 inference product

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. For an unsupported stream, the API returns the error code HI_ERR_VDEC_NOT_SUPPORT. For details, see Common Return Codes.

Prototype

  • C Prototype
    1
    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
    1
    img_info, ret = acl.himpi.dvpp_get_image_info(img_type, stream)
    

Parameters

Parameter

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

Dict, pointer address of the input stream information. For details, see hi_vdec_stream.

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.

Return Value

Return Value

Description

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.