venc_release_stream

Applicability

Product

Supported (√/x)

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas training products

x

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

Releases the stream buffer.

Prototype

  • C Prototype
    1
    hi_s32 hi_mpi_venc_release_stream(hi_venc_chn chn, hi_venc_stream *stream);
    
  • Python Function
    1
    ret = acl.himpi.venc_release_stream(chn, stream)
    

Parameter Description

Parameter

Description

chn

Int, decoding channel ID.

  • Atlas inference products : The value range of this parameter is [0, 256). The JPEGD and VDEC functions share the same channels, and the maximum number of channels is 256.
  • Atlas A2 training products / Atlas A2 inference products : The value range of this parameter is [0, 256). The JPEGD and VDEC functions share the same channels, and the maximum number of channels is 256. Among them, a maximum of 256 JPEGD decoding channels and 32 VDEC decoding channels are supported.
  • Atlas 200I/500 A2 inference products : The value range of this parameter is [0, 128). The JPEGD and VDEC functions share the same channels, and the maximum number of channels is 128.
  • Atlas A3 training products / Atlas A3 inference products : The value range of this parameter is [0, 256). The JPEGD and VDEC functions share the same channels, and the maximum number of channels is 256. Among them, a maximum of 256 JPEGD decoding channels and 32 VDEC decoding channels are supported.

stream

Dict, stream dictionary. If stream is left empty, the error code HI_ERR_VENC_NULL_PTR is returned.

Return Value Description

Return Value

Description

ret

Int, error code.

Restrictions

  • Ensure that a channel has been created. Otherwise, the error code HI_ERR_VENC_UNEXIST is returned.
  • Use this API in pair with acl.himpi.venc_get_stream. Free the stream buffer in a timely manner to avoid encoding suspension due to stream buffer insufficiency. In addition, you must comply with the principle of "first obtained, first released".
  • When a VENC channel is reset, all stream packets that are not released are invalid and the stream buffer cannot be used or released anymore.
  • An attempt to free the buffer of an invalid stream returns the HI_ERR_VENC_ILLEGAL_PARAM error.

Reference

For the API call sequence, see JPEGE and VENC.