hi_venc_h265_vbr_param
Description
Defines the advanced VBR parameters of an H.265 encoding channel.
Prototype
typedef struct {
hi_s32 chg_pos;
hi_u32 max_i_proportion;
hi_u32 min_i_proportion;
hi_s32 max_reencode_times;
hi_u32 max_qp;
hi_u32 min_qp;
hi_u32 max_i_qp;
hi_u32 min_i_qp;
hi_bool qpmap_en;
hi_venc_rc_qpmap_mode qpmap_mode;
}hi_venc_h265_vbr_param;
Members
max_qp and min_qp are used to control the image quality range, max_bit_rate is used to limit the maximum encoding bit rate within the bit rate statistical period, and chg_pos is used to control the bit rate baseline for starting QP adjustment. max_bit_rate is a member variable in hi_venc_chn_attr.rc_attr and is set during VENC channel creation.
When the encoding bit rate is greater than the product of max_bit_rate x chg_pos, the QP value of the image is adjusted towards max_qp. If the QP value reaches max_qp, the QP value is clamped at the maximum value and max_bit_rate does not take effect. In this case, the encoding bit rate may exceed max_bit_rate.
When the encoding bit rate is less than the product of max_bit_rate x chg_pos, the QP value of the image is adjusted towards min_qp. If the QP value reaches min_qp, the encoding bit rate reaches the maximum value and the image quality is the best.
Member |
Description |
|---|---|
chg_pos |
Ratio of the bit rate when the QP starts to be adjusted relative to the maximum bit rate. Value range: [50, 100] Default value: 90 |
max_i_proportion |
Maximum ratio of bits allocated to I-frames and P-frames. Value range: [1, 100] Default value: 100 |
min_i_proportion |
Reserved. |
max_reencode_times |
Number of times that each frame is re-encoded. If it is set to 0, re-encoding is disabled. Value range: [0, 3] Default value: 2 |
max_qp |
Maximum QP value of P-frames. Value range: [0, 51] Default value: 51 |
min_qp |
Minimum QP value of P-frames. Value range: [0, max_qp] Default value: 24 |
max_i_qp |
Maximum QP value of I-frames. Value range: [0, 51] Default value: 51 |
min_i_qp |
Minimum QP value of I-frames. Value range: [0, max_i_qp] Default value: 24 |
qpmap_en |
Reserved. |
qpmap_mode |
Reserved. |