hi_venc_h264_fixqp

Description

(Reserved) Defines the FIXQP attributes of an H.264 encoding channel.

Prototype

hi_venc_h264_fixqp = {"gop": gop,
                      "src_frame_rate": src_frame_rate,
                      "dst_frame_rate": dst_frame_rate,
                      "i_qp": i_qp,
                      "p_qp": p_qp,
                      "b_qp": b_qp}

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, in FPS, that is, the number of frames that enter the encoder per second. The default value is 30. 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. The default value is 30. 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.