vdec_get_jpegd_output_info

Applicable Products

Product

Supported (√/x)

Ascend 950PR&950DT products

√

Atlas A3 products

√

Atlas A2 products

√

Atlas training products

x

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Obtains the output width, height, width stride, height stride of the source or specified image format, as well as the buffer size and image format after decoding, based on input streams.

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_vdec_get_jpegd_output_info(const hi_vdec_stream *stream, const hi_pixel_format output_format, hi_img_info *img_info)
    
  • Python Function
    1
    img_info, ret = acl.himpi.vdec_get_jpegd_output_info(stream, output_format)
    

Parameters

Parameter

Description

stream

Dict, input stream information dictionary. For details, see hi_vdec_stream.

For the following products, when this API is called on the host, the configured addr must be a buffer address on the host:
  • Ascend 950PR&950DT products
  • Atlas A3 products
  • Atlas A2 products
  • Ascend EP form of Atlas 200I/500 A2 inference products
  • Ascend EP form of Atlas inference products
For the following products, when this API is called on the device, the configured addr must be a buffer address on the device:
  • Ascend RC form of Atlas 200I/500 A2 inference products

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 VDEC Functions and Constraints.

Return Values

Return Value

Description

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.