本文整理汇总了C++中SliceHeader::getLastMbInSlice方法的典型用法代码示例。如果您正苦于以下问题:C++ SliceHeader::getLastMbInSlice方法的具体用法?C++ SliceHeader::getLastMbInSlice怎么用?C++ SliceHeader::getLastMbInSlice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SliceHeader
的用法示例。
在下文中一共展示了SliceHeader::getLastMbInSlice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ROF
ErrVal
SliceEncoder::encodeSlice( SliceHeader& rcSliceHeader,
Frame* pcFrame,
MbDataCtrl* pcMbDataCtrl,
RefListStruct& rcRefListStruct,
Bool bMCBlks8x8Disable,
UInt uiMbInRow,
Double dlambda )
{
ROF( pcFrame );
ROF( pcMbDataCtrl );
UInt uiMaxMvPerMb = rcSliceHeader.getSPS().getMaxMVsPer2Mb () >> 1; // hard limit (don't take into account last macroblock)
//===== get co-located picture =====
MbDataCtrl* pcMbDataCtrlL1 = NULL;
RefFrameList& rcList1 = rcRefListStruct.acRefFrameListME[1];
if( rcList1.getActive() && rcList1.getEntry( 0 )->getRecPicBufUnit() )
{
pcMbDataCtrlL1 = rcList1.getEntry( 0 )->getRecPicBufUnit()->getMbDataCtrl();
}
ROT( rcSliceHeader.isBSlice() && ! pcMbDataCtrlL1 );
//===== initialization =====
RNOK( pcMbDataCtrl ->initSlice ( rcSliceHeader, ENCODE_PROCESS, false, pcMbDataCtrlL1 ) );
RNOK( m_pcControlMng->initSliceForCoding( rcSliceHeader ) );
//===== loop over macroblocks =====
for( UInt uiMbAddress = rcSliceHeader.getFirstMbInSlice(); uiMbAddress <= rcSliceHeader.getLastMbInSlice(); uiMbAddress = rcSliceHeader.getFMO()->getNextMBNr( uiMbAddress ) )
{
UInt uiMbY = uiMbAddress / uiMbInRow;
UInt uiMbX = uiMbAddress % uiMbInRow;
MbDataAccess* pcMbDataAccess = 0;
RNOK( pcMbDataCtrl ->initMb ( pcMbDataAccess, uiMbY, uiMbX ) );
RNOK( m_pcControlMng->initMbForCoding ( *pcMbDataAccess, uiMbY, uiMbX, false, false ) );
pcMbDataAccess->setMbDataAccessBase ( NULL );
RNOK( m_pcMbEncoder ->encodeMacroblock( *pcMbDataAccess,
pcFrame,
rcRefListStruct,
uiMaxMvPerMb,
bMCBlks8x8Disable,
m_pcCodingParameter->getBiPred8x8Disable() > 0,
m_pcCodingParameter->getMotionVectorSearchParams().getNumMaxIter(),
m_pcCodingParameter->getMotionVectorSearchParams().getIterSearchRange(),
dlambda ) );
RNOK( m_pcMbCoder ->encode ( *pcMbDataAccess,
NULL,
( uiMbAddress == rcSliceHeader.getLastMbInSlice() )
,true ) );
}
return Err::m_nOK;
}