xCheckRDCostInter函数在xCompressCU中被调用,用来测试普通帧间模式,也就是inter_ME模式。
inter_ME模式通过AMVP得到相邻块中的最优的两个运动信息,以此作为运动估计的起始点,然后经过ME,获得MVP和MVD等inter运动信息。
在通过ME得到运动信息之后,即MVP之后,通过MC得到pred像素。这些都在predInterSearch函数中实现。(predInterSearch函数中是通过选择最小pred像素失真来选择最优inter运动信息的)
最后计算最优inter运动信息下的resi和reco像素信息,得到cost,通过xCheckBestMode将最优模式存入bestCS。这些在xEncodeInterResidual函数中实现。
void EncCu::xCheckRDCostInter( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &partitioner, const EncTestMode& encTestMode )
{
tempCS->