hi_vdec_get_pic_buf_size

Applicability

Product

Supported

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Obtains the buffer size required for image decoding. This API is used in the following scenarios: calculating the internal buffer size required for video decoding (configure the related channel parameters during initialization); calculating the output buffer size required for image decoding.

Prototype

hi_u32 hi_vdec_get_pic_buf_size (hi_payload_type type, hi_pic_buf_attr *buf_attr)

Parameters

Parameter

Input/Output

Description

type

Input

Decoded video type. Currently, HI_PT_H264, HI_PT_JPEG, and HI_PT_H265 are supported.

buf_attr

Input

Pointer to the image buffer information.

Returns

Image size required for image storage.

For HI_PT_JPEG decoding (using JPEGD), if pixel_format is set to an unsupported format or HI_PIXEL_FORMAT_UNKNOWN, 0 is returned.

See Also

For details about the API call sequence and example, see VDEC.