hi_mpi_venc_set_intra_refresh

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

Sets I-slice refreshing parameters in P-frames.

Prototype

hi_s32 hi_mpi_venc_set_intra_refresh(hi_venc_chn chn, const hi_venc_intra_refresh *intra_refresh);

Parameters

Parameter

Input/Output

Description

chn

Input

Encoding channel ID.

Atlas 200I/500 A2 inference product: The value range of this parameter is [0, 128). The JPEGE, and VENC functions share the same channels, and the maximum number of channels is 128.

For the Atlas inference product, the value range of the encoding channel ID is [0, 256). The JPEGE and VENC functions share channels. The maximum number of channels is 256.

intra_refresh

Input

I-slice refreshing parameters.

Returns

Restrictions

  • Only H.265/H.264 encoding channels in HI_VENC_GOP_MODE_NORMAL_P mode are supported.
  • After the advanced frame skipping reference is set by calling hi_mpi_venc_set_ref_param, the advanced frame skipping reference needs to be set again. pred_en cannot be set to 0.
  • After a channel is created and before encoding is started, you are advised to call the hi_mpi_venc_get_intra_refresh API to obtain the parameters for refreshing the I-slice for the P-frame, and then call this API to set the parameters for refreshing the I-slice for the P-frame.
  • When this API is called to enable I-slice refreshing for P-frames, an I-frame is generated and takes effect only after the IDR frame of the next GOP is generated. Disabling I-slice refreshing for P-frames takes effect immediately. .