怎么获得当前LCU的above和left LCU的分割深度信息?

原文地址:http://blog.csdn.net/yangxiao_xiang/article/details/8478283

现在已经可以在下面这个函数下获得当前LCU的所有4X4块的深度信息,但是怎么获得当前LCU的上面一个LCU的信息,乃至左上角的信息呢??这个是很麻烦的问题,还待持续解决中。。。  

// analysis of CU

  xCompressCU( m_ppcBestCU[0], m_ppcTempCU[0], 0 );


在Void TEncSlice::compressSlice( TComPic*& rpcPic )函数中有关于TR的信息,也许这是一个突破口。

UInt TComDataCU::getCtxSplitFlag( UInt uiAbsPartIdx, UInt uiDepth )
{
  TComDataCU* pcTempCU;
  UInt        uiTempPartIdx;
  UInt        uiCtx;
  // Get left split flag
#if DEPENDENT_SLICES
  Bool bDepSliceRestriction = ( !m_pcSlice->getPPS()->getDependentSliceEnabledFlag());
  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );
#else
  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
#endif
  uiCtx  = ( pcTempCU ) ? ( ( pcTempCU->getDepth( uiTempPartIdx ) > uiDepth ) ? 1 : 0 ) : 0;
  
  // Get above split flag
#if DEPENDENT_SLICES
  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );
#else
  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
#endif
  uiCtx += ( pcTempCU ) ? ( ( pcTempCU->getDepth( uiTempPartIdx ) > uiDepth ) ? 1 : 0 ) : 0;
  
  return uiCtx;
}


现在已经找到解决办法:

左边:
			  PredModeL= pcCU->getCULeft()->getDepth(i);
上边:
			  PredModeT=pcCU->getCUAbove()->getDepth(i);
左上:
			  PredModeLT=pcCU->getCUAboveLeft()->getDepth(i);
前一帧:                      
                        PredModeCo1=pcCU->getCUColocated((RefPicList)0)->getDepth(i);


注意:其中i表示某个LCU中第i个4x4块,即该方式获得是4x4块的深度值,由于同一个CU内所有的4x4块的深度值相等,因此某个CU的左上角4x4块即可以表示整个CU的深度。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值