VTM1.0代码阅读:xCheckModeSplit函数

xCheckModeSplit函数在xCompressCU中扮演关键角色,负责QT, BT, TT模式的划分处理。它根据划分模式分割当前tempCS,并对每个子CU调用xCompressCU来确定最优解。通过递归处理,最佳子CU的数据最终会更新到tempCS,形成最优模式。最后,xCheckBestMode比较tempCS和bestCS的成本,确定并保存最佳模式。" 113221949,10539279,MySQL主实例故障:由慢SQL引发的连锁阻塞问题,"['数据库故障', 'SQL查询优化', 'MySQL性能']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

xCheckModeSplit函数在xCompressCU中被调用,用于进行QT,BT,TT的划分模式处理,encTestMode可以获取具体需要test的划分模式。
xCheckModeSplit在依据划分模式,将当前tempCS区域划分为相应的多个子cu区域之后,对每个子cu分别调用xCompressCU函数进行处理。
获取各个子cu的最优划分和最优模式,递归返回之后将bestSubCS的最优数据copy给tempCS,然后进行下一个子cu的递归处理,获取最优模式。
再将bestSubCS的最优数据copy给tempCS,直至xCompressCU处理完所有子cu之后,tempCS就包含encTestMode划分模式的最优数据。
最后xCheckBestMode比较tempCS和bestCS的cost,最优模式存入bestCS。

void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &partitioner, const EncTestMode& encTestMode)
{
   
   
  const Int qp                = encTestMode.qp;
  const PPS &pps              = *tempCS->pps;
  const Slice &slice          = *tempCS->slice;
  const Bool bIsLosslessMode  = false; // False at this level. Next level down may set it to true.
  const int oldPrevQp         = tempCS->prevQP[partitioner.chType];
  const UInt currDepth        = partitioner.currDepth;

  const PartSplit split = getPartSplit( encTestMode );		//获取划分模式

  CHECK( split == CU_DONT_SPLIT, "No proper split provided!" );

  tempCS->initStructData( qp, bIsLosslessMode );		//tempCS中的数据进行清空初始化

  partitioner.splitCurrArea( split, *tempCS );			//将tempCS表示区域按照encTestMode划分模式进行划分

  m_CABACEstimator->getCtx() = m_CurrCtx->start;
  m_CurrCtx++;

  tempCS->getRecoBuf().fill( 0 );

  do
  {
   
   
    const auto &subCUArea  = partitioner.currArea();	//获取划分后的子cu区域

    if( tempCS->picture->Y().contains( subCUArea.lumaPos() ) 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值