Obtains the buffer size required for image decoding. This API is used in the following scenarios: calculating the size of the internal buffer required for video decoding (configure the related channel parameters during initialization); calculating the output buffer for image decoding.
The Ascend 310 AI Processor does not support this API in the current version.
The Ascend 910 AI Processor does not support this API in the current version.
This API calculates the requested output buffer allocation.
hi_u32 hi_vdec_get_pic_buf_size(hi_payload_type type, hi_pic_buf_attr *buf_attr)
Parameter |
Input/Output |
Description |
|---|---|---|
type |
Input |
Decode type, selected from HI_PT_H264, HI_PT_H265, and HI_PT_JPEG. |
buf_attr |
Input |
Pointer to the image buffer information. |
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.
For the API call sequence, see VDEC.