hi_venc_h264_vbr_param
Description
Defines the advanced VBR parameters of an H.264 encoding channel.
Prototype
hi_venc_h264_vbr_param = {"chg_pos": chg_pos,
"max_i_proportion": max_i_proportion,
"min_i_proportion": min_i_proportion,
"max_reencode_times": max_reencode_times,
"qpmap_en": qpmap_en,
"max_qp": max_qp,
"min_qp": min_qp,
"max_i_qp": max_i_qp,
"min_i_qp": min_i_qp}
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 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 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.
max_bit_rate is a member variable in hi_venc_chn_attr["rc_attr"] and is set during VENC channel creation.
Member |
Description |
|---|---|
chg_pos |
Int, proportion of the bit rate when the QP value starts to be adjusted in VBR mode to the maximum bit rate. Value range: [50, 100] Default value: 90 |
min_i_proportion |
Int, 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 |
Int, 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 |
Int, reserved. |
max_qp |
Int, maximum QP value of P and B-frames. Value range: [0, 51] Default value: 51 |
min_qp |
Int, minimum QP value of P- and B-frames. Value range: [0, max_qp] Default value: 24 |
max_i_qp |
Int, maximum QP value of an I-frame. Value range: [0, 51] Default value: 51 |
min_i_qp |
Int, minimum QP value of an I-frame. Value range: [0, max_i_qp] Default value: 24 |