acl.himpi.vdec_set_protocol_param

C Prototype

hi_s32 hi_mpi_vdec_set_protocol_param(hi_vdec_chn chn, const hi_vdec_protocol_param* protocol_param);

Python Function

ret = acl.himpi.vdec_set_protocol_param(chn, protocol_param)

Function Usage

Sets protocol-specific memory allocation parameters of a channel, such as slice, pps, and sps.

This API is not supported in the current version.

Input Description

chn: int, decoding channel ID.

protocol_param: dict, dictionary of decoding channel parameters. For details, see hi_vdec_protocol_param.

Return Value

ret: int, error code.

Restrictions

  • Ensure that a channel has been created. Otherwise, the error code HI_ERR_VDEC_UNEXIST is returned.
  • Ensure that the channel has stopped receiving streams. Otherwise, the error code HI_ERR_VDEC_NOT_PERM is returned.
  • When protocol parameters are updated, the decoder automatically resets the decoding channel.
  • The memory required by protocol parameters is dynamically allocated by the decoder using vmalloc based on the actual number of VPSs, SPSs, PPSs, or slices in the current stream. The maximum number of memories must be no greater than the maximum number of VPSs, SPSs, PPSs, or slices configured by this API.