本文整理汇总了C++中MbDataAccess::getNumActiveRef方法的典型用法代码示例。如果您正苦于以下问题:C++ MbDataAccess::getNumActiveRef方法的具体用法?C++ MbDataAccess::getNumActiveRef怎么用?C++ MbDataAccess::getNumActiveRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MbDataAccess
的用法示例。
在下文中一共展示了MbDataAccess::getNumActiveRef方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
ErrVal
MbCoder::xWriteReferenceFrames( MbDataAccess& rcMbDataAccess,
MbMode eMbMode,
ListIdx eLstIdx )
{
AOT_DBG( rcMbDataAccess.getMbData().isIntra() );
if( 1 == rcMbDataAccess.getNumActiveRef( eLstIdx ) )
{
return Err::m_nOK;
}
Bool bPred = rcMbDataAccess.getSH().getAdaptivePredictionFlag();
MbMotionData& rcMot = rcMbDataAccess.getMbMotionData( eLstIdx );
switch( eMbMode )
{
case MODE_SKIP:
{
break;
}
case MODE_16x16:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx) && ( ! bPred || ! rcMot.getMotPredFlag() ) )
{
RNOK( m_pcMbSymbolWriteIf->refFrame( rcMbDataAccess, eLstIdx ) );
}
break;
}
case MODE_16x8:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx) && ( ! bPred || ! rcMot.getMotPredFlag( PART_16x8_0 ) ) )
{
RNOK( m_pcMbSymbolWriteIf->refFrame( rcMbDataAccess, eLstIdx, PART_16x8_0 ) );
}
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_2, eLstIdx) && ( ! bPred || ! rcMot.getMotPredFlag( PART_16x8_1 ) ) )
{
RNOK( m_pcMbSymbolWriteIf->refFrame( rcMbDataAccess, eLstIdx, PART_16x8_1 ) );
}
break;
}
case MODE_8x16:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx) && ( ! bPred || ! rcMot.getMotPredFlag( PART_8x16_0 ) ) )
{
RNOK( m_pcMbSymbolWriteIf->refFrame( rcMbDataAccess, eLstIdx, PART_8x16_0 ) );
}
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_1, eLstIdx) && ( ! bPred || ! rcMot.getMotPredFlag( PART_8x16_1 ) ) )
{
RNOK( m_pcMbSymbolWriteIf->refFrame( rcMbDataAccess, eLstIdx, PART_8x16_1 ) );
}
break;
}
case MODE_8x8:
case MODE_8x8ref0:
{
for( B8x8Idx c8x8Idx; c8x8Idx.isLegal(); c8x8Idx++ )
{
if( BLK_SKIP != rcMbDataAccess.getMbData().getBlkMode( c8x8Idx.b8x8Index() ) &&
rcMbDataAccess.getMbData().isBlockFwdBwd( c8x8Idx.b8x8Index(), eLstIdx ) && ( ! bPred || ! rcMot.getMotPredFlag( c8x8Idx.b8x8() ) ) )
{
RNOK( m_pcMbSymbolWriteIf->refFrame( rcMbDataAccess, eLstIdx, c8x8Idx.b8x8() ) );
}
}
break;
}
default:
{
AF();
return Err::m_nERR;
}
}
return Err::m_nOK;
}
示例2: switch
ErrVal
MbParser::xReadReferenceIndices( MbDataAccess& rcMbDataAccess, MbMode eMbMode, ListIdx eLstIdx )
{
MbMotionData& rcMbMotionData = rcMbDataAccess.getMbMotionData( eLstIdx );
if( rcMbDataAccess.getMbData().isIntra() )
{
rcMbMotionData.setRefIdx( -1 );
return Err::m_nOK;
}
switch( eMbMode )
{
case MODE_SKIP:
{
break;
}
case MODE_16x16:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx ) )
{
if( !rcMbMotionData.getMotPredFlag() )
{
if( 1 == rcMbDataAccess.getNumActiveRef( eLstIdx ) )
{
rcMbMotionData.setRefIdx( 1 );
}
else
{
DECRNOK( m_pcMbSymbolReadIf->refFrame( rcMbDataAccess, eLstIdx ) );
}
}
}
else
{
rcMbMotionData.setRefIdx( BLOCK_NOT_PREDICTED );
}
break;
}
case MODE_16x8:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx ) )
{
if( !rcMbMotionData.getMotPredFlag(PART_16x8_0) )
{
if( 1 == rcMbDataAccess.getNumActiveRef( eLstIdx ) )
{
rcMbMotionData.setRefIdx( 1, PART_16x8_0 );
}
else
{
DECRNOK( m_pcMbSymbolReadIf->refFrame( rcMbDataAccess, eLstIdx, PART_16x8_0 ) );
}
}
}
else
{
rcMbMotionData.setRefIdx( BLOCK_NOT_PREDICTED, PART_16x8_0 );
}
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_2, eLstIdx ) )
{
if( !rcMbMotionData.getMotPredFlag(PART_16x8_1) )
{
if( 1 == rcMbDataAccess.getNumActiveRef( eLstIdx ) )
{
rcMbMotionData.setRefIdx( 1, PART_16x8_1 );
}
else
{
DECRNOK( m_pcMbSymbolReadIf->refFrame( rcMbDataAccess, eLstIdx, PART_16x8_1 ) );
}
}
}
else
{
rcMbMotionData.setRefIdx( BLOCK_NOT_PREDICTED, PART_16x8_1 );
}
break;
}
case MODE_8x16:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx ) )
{
if( !rcMbMotionData.getMotPredFlag(PART_8x16_0) )
{
if( 1 == rcMbDataAccess.getNumActiveRef( eLstIdx ) )
{
rcMbMotionData.setRefIdx( 1, PART_8x16_0 );
}
else
{
DECRNOK( m_pcMbSymbolReadIf->refFrame( rcMbDataAccess, eLstIdx, PART_8x16_0 ) );
}
}
}
else
{
rcMbMotionData.setRefIdx( BLOCK_NOT_PREDICTED, PART_8x16_0 );
}
//.........这里部分代码省略.........