---
title: hi_venc_h264_avbr_param
description: "定义H264协议编码通道AVBR码率控制模式的高级参数。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_1515.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_1515.html
indexId: 629f5b77e0de9482a65f1cfdd832baac45a695bb4dc3d40b961335c96d01884f105
---
# hi_venc_h264_avbr_param

#### 说明

定义H264协议编码通道AVBR码率控制模式的高级参数。


#### 定义

```
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_s32
min_still_percent;
hi_u32
max_still_qp;
hi_u32
min_still_psnr;
hi_u32
max_qp;
hi_u32
min_qp;
hi_u32
max_i_qp;
hi_u32
min_i_qp;
hi_u32
min_qp_delta;
hi_u32
motion_sensitivity;
hi_bool
save_bitrate_en;
}hi_venc_h264_avbr_param;
```


#### 成员

max_bit_rate表示运动场景下的最大码率，max_bit_rate*chg_pos*min_still_percent 表示静止情况下的最小码率。

根据运动程度的不同，目标码率会在最大码率和最小码率间调整。max_qp，min_qp用于控制图像的质量范围，码率控制以QP钳位为最高优先级，超出min_qp，max_qp范围内码率控制将失效。

max_bit_rate参数在创建VENC通道时设置，是hi_venc_chn_attr.rc_attr结构体内的成员变量。


| 成员名称 | 描述 |
| --- | --- |
| chg\_pos | AVBR开始调整Qp时的码率相对于最大码率的比例。 取值范围：[50, 100]。 默认值：65。 |
| min\_i\_proportion | 预留参数，暂不支持。 |
| max\_i\_proportion | 最大IP帧码率的比值。 取值范围：[1,100]。 默认值：100。 |
| max\_reencode\_times | 每帧重编码次数。0 表示不进行重编码。 取值范围：[0, 3]。 默认值：2。 |
| qpmap\_en | 预留参数，暂不支持。 |
| min\_still\_percent | 静止状态下目标码率的最小百分比。此变量设置为100，AVBR将不会在判别为静止时主动调低目标码率。 取值范围：[5, 100]。 默认值：25。 |
| max\_still\_qp | 静止场景I帧QP的最大值。 取值范围：[min\_i\_qp, max\_i\_qp]。 默认值：35。 |
| min\_still\_psnr | 预留参数，暂不支持。 |
| max\_qp | P、B帧的最大QP。 取值范围：[0, 51]。 默认值：51。 |
| min\_qp | P、B帧的最小QP。 取值范围：[0, max\_qp]。 默认值：24。 |
| max\_i\_qp | I帧的最大QP。 取值范围：[0, 51]。 默认值：51。 |
| min\_i\_qp | I帧的最小QP。 取值范围：[0, max\_i\_qp]。 默认值：24。 |
| min\_qp\_delta | 帧级QP最小值和CU级QP最小值的差值。 I帧，帧级QP最小值= min\_qp\_delta + min\_i\_qp P、B帧，帧级QP最小值= min\_qp\_delta+min\_qp 取值范围：[0, 4]； 默认值：0。 |
| motion\_sensitivity | 运动敏感度。 取值范围：[0, 100]。 默认值：100。 |
| save\_bitrate\_en | 预留参数，暂不支持。 |
