vdec_release_frame

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

Releases resources after decoding is complete.

Prototype

  • C Prototype
    1
    hi_s32 hi_mpi_vdec_release_frame(hi_vdec_chn chn, const hi_video_frame_info *frame_info)
    
  • Python Function
    1
    ret = acl.himpi.vdec_release_frame(chn, frame_info)
    

Parameters

Parameter

Description

chn

Int, decoding channel ID.

frame_info

Dict, dictionary of decoded image information, which is obtained by the vdec_get_frame call. For details, see hi_video_frame_info.

Return Value

Return Value

Description

ret

Int, error code.

  • 0 indicates success.
  • Other values indicate failure. For details, see VDEC/JPEGD Return Codes.
    • If no channel is created during image decoding, the error code HI_ERR_VDEC_UNEXIST is returned.
    • If the channel is destroyed when decoded images are being obtained, the error code HI_ERR_VDEC_UNEXIST is returned.
    • If the channel is reset when decoded images are being obtained, the error code HI_ERR_VDEC_UNEXIST is returned.
    • When decoded images are obtained in non-blocking mode, HI_ERR_VDEC_BUF_EMPTY is returned if there are no images in the buffer.
    • In timeout mode, if no hardware decoding result is fetched within the specified timeout interval, the error code HI_ERR_VDEC_BUF_EMPTY is returned. In this case, increase the timeout period or call this API repeatedly to obtain the decoding result.

Restrictions

  • Use this API in pair with acl.himpi.vdec_get_frame. Free the obtained data in a timely manner; otherwise, the decoding process will be blocked to wait for resources.
  • The data to be freed is that obtained by the acl.himpi.vdec_get_frame call without any change.

Reference

For details about the API call sequence, see JPEGE and VENC.