怎么获得当前LCU的above和left LCU的分割深度信息?(已更新)

现在已经可以在下面这个函数下获得当前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的深度。

发布了28 篇原创文章 · 获赞 6 · 访问量 16万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章