VTM3.0代码阅读:HMVP相关的一些类和函数

HMVP是一种merge列表构建过程中merge候选产生的一种方法。HMVP在Slice类中维护一个HMVP列表m_MotionCandLut,其中存储一帧中一行ctu已编码cu的运动信息。struct LutMotionCand{ MotionInfo* motionCand; //存储一帧中一行ctu已编码cu的运动信息,编码新一行ctu时重置 int currCnt; ...
摘要由CSDN通过智能技术生成

HMVP是一种merge列表构建过程中merge候选产生的一种方法。
HMVP在Slice类中维护一个HMVP列表m_MotionCandLut,其中存储一帧中一行ctu已编码cu的运动信息。

struct LutMotionCand
{
   
  MotionInfo*   motionCand;		//存储一帧中一行ctu已编码cu的运动信息,编码新一行ctu时重置
  int  currCnt;		//HMVP列表长度
};
class Slice
{
   	
 public:
//.....
  LutMotionCand*  m_MotionCandLut;		//Slice类中维护一个HMVP列表m_MotionCandLut
  
  int  getAvailableLUTMrgNum() const  {
    return m_MotionCandLut->currCnt; }	//HMVP列表长度
  LutMotionCand*              getMotionLUTs() {
    return m_MotionCandLut; }
}
void Slice::initMotionLUTs()		//HMVP列表初始化
{
   
  m_MotionCandLut = new LutMotionCand;
  m_MotionCandLut->currCnt = 0;
  m_MotionCandLut->motionCand = nullptr;
  m_MotionCandLut->motionCand = new MotionInfo[MAX_NUM_HMVP_CANDS];
}
void Slice::destroyMotionLUTs()		//destroy HMVP列表
{
   
  delete[] m_MotionCandLut->motionCand;
  m_MotionCandLut->motionCand = nullptr;
  delete m_MotionCandLut;
  m_MotionCandLut = NULL;
}
void Slice::resetMotionLUTs()		//重置HMVP列表
{
   
  m_MotionCandLut->currCnt = 0;
}

//从HMVP列表中get MVP信息
MotionInfo Slice::getMotionInfoFromLUTs(int MotCandIdx) 
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值