[h264e]: Add gaps in frame_num config entry

Some of NVR product may do some thing special when decoding the first
GOP of bitstream encoded by MPP, and report "gaps in frame_num is not
allowed" although frame_num is bitstream is continuous. Setting
gaps_in_frame_num_allowed_flag to true will avoid this problem.

1. Set gaps_in_frame_num_allowed_flag true as default
2. call mpp_enc_cfg_set_u32(cfg, "h264:gaps_not_allowed", 1) if you
want gaps_in_frame_num_allowed_flag to be false.

Change-Id: I8242fb318e051a61772c02a2c8bb59e4b589ff6d
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
This commit is contained in:
Johnson Ding
2021-01-15 15:16:25 +08:00
committed by Herman Chen
parent 6f16b401d7
commit e6d2ab3c60
4 changed files with 10 additions and 1 deletions

View File

@@ -559,6 +559,8 @@ typedef enum MppEncH264CfgChange_e {
MPP_ENC_H264_CFG_CHANGE_MAX_POC_LSB = (1 << 11),
/* change on log2 max frame number minus 4 */
MPP_ENC_H264_CFG_CHANGE_MAX_FRM_NUM = (1 << 12),
/* change on gaps_in_frame_num_value_allowed_flag */
MPP_ENC_H264_CFG_CHANGE_GAPS_IN_FRM_NUM = (1 << 13),
/* change on max_qp / min_qp */
MPP_ENC_H264_CFG_CHANGE_QP_LIMIT = (1 << 16),
@@ -607,6 +609,7 @@ typedef struct MppEncH264Cfg_t {
RK_U8 poc_type;
RK_U8 log2_max_poc_lsb;
RK_U8 log2_max_frame_num;
RK_U32 gaps_not_allowed;
/*
* H.264 profile_idc parameter