hi_venc_h264_fixqp
Description
Defines the FIXQP attributes of an H.264 encoding channel.
Prototype
typedef struct {
hi_u32 gop;
hi_u32 src_frame_rate;
hi_u32 dst_frame_rate;
hi_u32 i_qp;
hi_u32 p_qp;
hi_u32 b_qp;
} hi_venc_h264_fixqp;
Members
Member |
Description |
|---|---|
gop |
Group of pictures. A video sequence includes several temporal continuous pictures. When a video is encoded, the video sequence is divided into several small picture groups. This parameter refers to a quantity of frames in a picture group. The GOP structure supports only Normalp (the first frame is an I-frame and other frames are P-frames). Therefore, this parameter also indicates the I-frame interval. The default value is 65535. The encoding of the I-frame does not need to refer to the previous frame, and the encoding quality of the previous frame is not passed on. Therefore, a smaller value means better encoding quality. However, it is recommended that the value be greater than or equal to the frame rate because the I-frame has only intra-frame prediction blocks. In most scenarios, a certain number of P-frames (with inter-frame prediction blocks) are required to ensure encoding quality. Value range: [1, 65536] |
src_frame_rate |
Input frame rate of the encoder, in fps, that is, the number of frames that enter the encoder per second. If the bit rate is fixed, a smaller frame rate indicates better encoding quality. However, a bit rate less than 25 can lead to discontinuous frames during playback. Value range: [1, 240] |
dst_frame_rate |
Output frame rate, in fps, that is, the number of frames that exit the encoder per second. If the bit rate is fixed, a smaller frame rate indicates better encoding quality. However, a bit rate less than 25 can lead to discontinuous frames during playback. Value range: [1, src_frame_rate] A fractional frame rate is not supported currently. |
i_qp |
QP values of all macroblocks of I frames. Value range: [0, 51] |
p_qp |
QP values of all macroblocks of P frames. Value range: [0, 51] |
b_qp |
QP values of all macroblocks of B frames. Currently, this field can only be set to 0. |