hi_venc_h265_qvbr_param

Description

Defines the advanced QVBR parameters of an H.265 encoding channel.

Prototype

hi_venc_h265_qvbr_param = {"max_i_proportion": max_i_proportion,
                           "min_i_proportion": min_i_proportion,
                           "max_reencode_times": max_reencode_times,
                           "qpmap_en": qpmap_en,
                           "qpmap_mode": hi_venc_rc_qpmap_mode,
                           "max_qp": max_qp,
                           "min_qp": min_qp,
                           "max_i_qp": max_i_qp,
                           "min_i_qp": min_i_qp,
                           "max_bit_percent": max_bit_percent,
                           "min_bit_percent": min_bit_percent,
                           "max_psnr_fluctuate": max_psnr_fluctuate,
                           "min_psnr_fluctuate": min_psnr_fluctuate}

Members

When the real-time PSNR is less than max_psnr_fluctuate, increase the target bit rate. The maximum bit rate is target_bit_rate * max_bit_percent.

When the real-time PSNR is greater than max_psnr_fluctuate, decrease the target bit rate. The minimum bit rate is target_bit_rate * min_bit_percent.

The target bit rate is adjusted between the maximum bit rate and the minimum bit rate based on the current PSNR. When the PSNR value range exceeds [min_psnr_fluctuate – 4, max_psnr_fluctuate + 4] ∩ [20, 40], the PSNR does not take effect.

max_qp and min_qp are used to control the image quality. The bit rate control takes the QP clamping as the highest priority, and bit rate control becomes invalid if the range of [min_qp, max_qp] is exceeded.

The priority of the upper and lower bit rate limits is higher than the priority of the PSNR. For example, if the bit rate reaches the upper limit but still fails to meet the PSNR requirement, the bit rate stops increasing.

target_bit_rate is a member variable in hi_venc_chn_attr["rc_attr"] and is set during VENC channel creation.

Member

Description

min_i_proportion

Int, reserved.

max_i_proportion

Int, maximum bit rate proportion of I- and P-frames.

Value range: [1, 100]

Default value: 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.

qpmap_en

Int, reserved.

max_qp

Int, maximum QP value of P and B-frames.

Value range: [MinQp, 51]

Default value: 51

min_qp

Int, minimum QP value of P- and B-frames.

Value range: [0, 51]

Default value: 16

max_i_qp

Int, maximum QP value of an I-frame.

Value range: [MinIQp, 51]

Default value: 51

min_i_qp

Int, minimum QP value of an I-frame.

Value range: [0, 51]

Default value: 16

max_bit_percent

Int, upper limit of the bit rate percentage.

Value range: [min_bit_percent, 180]

Default value: 110

min_bit_percent

Int, lower limit of the bit rate percentage.

Value range: [30, 180]

Default value: 45

max_psnr_fluctuate

Int, upper limit of PSNR.

Value range: [min_psnr_fluctuate, 40]

Default value: 40

min_psnr_fluctuate

Int, lower limit of PSNR.

Value range: [18, 40]

Default value: 23