hi_vdec_get_pic_buf_size
The
The
Description
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.
Restrictions
This API calculates the requested output buffer allocation.
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 |
Decode type, selected from HI_PT_H264, HI_PT_H265, and HI_PT_JPEG. |
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.