hi_venc_h264_vbr_param
Description
Defines the advanced VBR parameters of an H.264 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_bool qpmap_en;
hi_u32 max_qp;
hi_u32 min_qp;
hi_u32 max_i_qp;
hi_u32 min_i_qp;
} hi_venc_h264_vbr_param;
Members
max_qp and min_qp are used to control the picture 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 base line for starting QP adjustment.
When the encoding bit rate is greater than the product of max_bit_rate*chg_pos, the image QP is gradually adjusted toward max_qp. If the image QP reaches max_qp, the QP value is clamped to the maximum value. The clamping effect of max_bit_rate is invalid, and the encoding bit rate may exceed max_bit_rate.
When the encoding bit rate is less than the product of max_bit_rate*chg_pos, the image QP is gradually adjusted toward min_qp. If the image QP reaches min_qp, the encoding bit rate reaches the maximum value and the image quality is the best.
max_bit_rate is a member variable in the hi_venc_chn_attr.rc_attr struct and is set during VENC channel creation.
Member |
Description |
|---|---|
chg_pos |
Ratio of the bit rate when VBR starts to adjust the QP to the maximum bit rate. Value range: [50, 100] Default value: 90 |
min_i_proportion |
Reserved. |
max_i_proportion |
Maximum ratio of bits allocated to I-frames and P-frames. Value range: [1, 100] The default value is 100. |
max_reencode_times |
Number of times that each frame is re-encoded. If set to 0, disables re-encoding. Value range: [0, 3] Default value: 2 |
qpmap_en |
Reserved. |
max_qp |
Maximum QP of P-frames and B-frames. Value range: [0, 51] Default value: 51 |
min_qp |
Minimum QP of P-frames and B-frames. Value range: [0, max_qp] Default value: 24 |
max_i_qp |
Maximum QP of I-frames. Value range: [0, 51] Default value: 51 |
min_i_qp |
Minimum QP of I-frames. Value range: [0, max_i_qp] Default value: 24 |