hi_venc_intra_refresh
Description
Defines the parameters for controlling Islice refresh in P-frames.
Prototype
typedef struct {
hi_bool refresh_enable;
hi_venc_intra_refresh_mode intra_refresh_mode;
hi_u32 refresh_num;
hi_u32 req_i_qp;
} hi_venc_intra_refresh;
Members
Member |
Description |
|---|---|
refresh_enable |
Whether to enable the Islice refresh function.
|
intra_refresh_mode |
I-macroblock refresh mode, by row or by column. By default, refresh by row is adopted. |
refresh_num |
Number of rows or columns refreshed for an I-macroblock each time. This variable controls the refresh speed and stream stability. A larger value indicates faster refresh and lower stream stability. A smaller value indicates slower refresh and higher stream stability. Ensure that the configured refresh_num can complete Islice refresh within a GOP. Note that in advanced frame skipping reference mode, Islice refresh is performed only in P-frames at the base layer (which can be referenced by other frames at the base layer). Table 1 lists the formulas for calculating the value of refresh_num. |
req_i_qp |
QP value of the I-frame. When hi_mpi_venc_set_intra_refresh and hi_mpi_venc_request_idr work together, this value is used to control the quality of the inserted IDR frame. A smaller value indicates better quality and a larger IDR frame size. The value range is [0, 51] and the default value is 51. |
References
- |
Calculation Formula |
Remarks |
|---|---|---|
For H.264, the default value of refresh_num is as follows: (pic_height +lcu_size-1)>>6 |
In the formulas, / indicates rounding down. |
|
For H.265, the default value of refresh_num is ((pic_height + lcu_size - 1)/lcu_size) >> 2. |