fix[h265e]: disable tmvp by default

When setting drop-gap to 0, continuous dropping frame at p-skip mode
will make the following encodeing result go wrong, if temporal motion
vector prediction is enabled. So tmvp should be turn off at this case.
Since TMVP doesn't contribute much bit rate, turn it off as a default.
Also SAO should be disabled.

Change-Id: I0cefca33981966dfeae260e450d731e059748911
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
This commit is contained in:
Johnson Ding
2024-01-25 15:53:24 +08:00
committed by Herman Chen
parent 59126dc3f6
commit c43b99b671
2 changed files with 9 additions and 2 deletions

View File

@@ -90,13 +90,12 @@ static MPP_RET h265e_init(void *ctx, EncImplCfg *ctrlCfg)
if (mpp_get_soc_type() == ROCKCHIP_SOC_RK3528) {
h265->ctu_size = 32;
h265->max_cu_size = 32;
h265->tmvp_enable = 0;
} else {
h265->ctu_size = 64;
h265->max_cu_size = 64;
h265->tmvp_enable = 1;
}
h265->tmvp_enable = 0;
h265->amp_enable = 0;
h265->sao_enable = 1;

View File

@@ -321,6 +321,14 @@ MPP_RET h265e_set_sps(H265eCtx *ctx, H265eSps *sps, H265eVps *vps)
} else if (cpb_info->max_st_tid) {
sps->m_TMVPFlagsPresent = 0;
}
if (rc->drop_mode == MPP_ENC_RC_DROP_FRM_PSKIP) {
codec->tmvp_enable = 0;
sps->m_TMVPFlagsPresent = 0;
codec->sao_enable = 0;
sps->m_bUseSAO = 0;
}
sps->m_ptl = &vps->m_ptl;
sps->m_vuiParametersPresentFlag = 1;
if (sps->m_vuiParametersPresentFlag) {