本文整理汇总了C++中MbDataAccess类的典型用法代码示例。如果您正苦于以下问题:C++ MbDataAccess类的具体用法?C++ MbDataAccess怎么用?C++ MbDataAccess使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MbDataAccess类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RNOK
ErrVal MbDecoder::xDecodeMbIntra16x16( MbDataAccess& rcMbDataAccess,
IntYuvMbBuffer& cYuvMbBuffer,
IntYuvMbBuffer& rcPredBuffer )
{
Int iStride = cYuvMbBuffer.getLStride();
RNOK( m_pcIntraPrediction->predictLumaMb( cYuvMbBuffer.getMbLumAddr(), iStride, rcMbDataAccess.getMbData().intraPredMode() ) );
rcPredBuffer.loadLuma( cYuvMbBuffer );
MbTransformCoeffs& rcCoeffs = m_cTCoeffs;
Quantizer cQuantizer; cQuantizer.setQp ( rcMbDataAccess, false );
const QpParameter rcLQp = cQuantizer.getLumaQp();
Int iScaleY = g_aaiDequantCoef[rcLQp.rem()][0] << rcLQp.per();
const UChar* pucScaleY = rcMbDataAccess.getSH().getScalingMatrix( 0 );
if( pucScaleY )
{
iScaleY *= pucScaleY[0];
iScaleY >>= 4;
}
RNOK( m_pcTransform->invTransformDcCoeff( rcCoeffs.get( B4x4Idx(0) ), iScaleY ) );
for( B4x4Idx cIdx; cIdx.isLegal(); cIdx++ )
{
RNOK( m_pcTransform->invTransform4x4Blk( cYuvMbBuffer.getYBlk( cIdx ), iStride, rcCoeffs.get( cIdx ) ) );
}
UInt uiChromaCbp = rcMbDataAccess.getMbData().getCbpChroma16x16();
RNOK( xDecodeChroma( rcMbDataAccess, cYuvMbBuffer, rcPredBuffer, uiChromaCbp, true ) );
return Err::m_nOK;
}
示例2: 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;
}
示例3: isTransformSize8x8
Void IntMbTempData::copyResidualDataTo( MbDataAccess& rcMbDataAccess )
{
rcMbDataAccess.getMbData ().setBCBP ( getBCBP () );
rcMbDataAccess.getMbData ().setMbExtCbp ( getMbExtCbp () );
rcMbDataAccess.getMbData ().setQp ( getQp () );
rcMbDataAccess.getMbTCoeffs ().copyFrom ( *this );
rcMbDataAccess.getMbData ().setTransformSize8x8 ( isTransformSize8x8 () );
rcMbDataAccess.getMbData ().setResidualPredFlags ( getResidualPredFlags() );
}
示例4: xDecodeMbPCM
ErrVal MbDecoder::xDecodeMbPCM( MbDataAccess& rcMbDataAccess, YuvMbBuffer& rcRecYuvBuffer )
{
Pel* pucSrc = rcMbDataAccess.getMbTCoeffs().getPelBuffer();
Pel* pucDest = rcRecYuvBuffer.getMbLumAddr();
Int iStride = rcRecYuvBuffer.getLStride();
Int n;
for( n = 0; n < 16; n++ )
{
::memcpy( pucDest, pucSrc, 16 );
pucSrc += 16;
pucDest += iStride;
}
pucDest = rcRecYuvBuffer.getMbCbAddr();
iStride = rcRecYuvBuffer.getCStride();
for( n = 0; n < 8; n++ )
{
::memcpy( pucDest, pucSrc, 8 );
pucSrc += 8;
pucDest += iStride;
}
pucDest = rcRecYuvBuffer.getMbCrAddr();
for( n = 0; n < 8; n++ )
{
::memcpy( pucDest, pucSrc, 8 );
pucSrc += 8;
pucDest += iStride;
}
return Err::m_nOK;
}
示例5: RNOK
ErrVal
MbParser::xSkipMb( MbDataAccess& rcMbDataAccess )
{
if( rcMbDataAccess.getSH().isBSlice() )
{
RNOK( rcMbDataAccess.setConvertMbType( 0 ) );
}
else
{
rcMbDataAccess.getMbMotionData( LIST_0 ).setRefIdx( 1 );
RNOK( rcMbDataAccess.setConvertMbType( MSYS_UINT_MAX ) );
}
rcMbDataAccess.getMbData().setMbCbp( 0 );
return Err::m_nOK;
}
示例6: ROTRS
ErrVal MbDecoder::compensatePrediction( MbDataAccess& rcMbDataAccess )
{
ROTRS( rcMbDataAccess.getMbData().isIntra(), Err::m_nOK );
IntYuvMbBuffer cIntYuvMbBuffer;
YuvMbBuffer cYuvMbBuffer;
RNOK( m_pcMotionCompensation->compensateMb( rcMbDataAccess, &cYuvMbBuffer, false, false ) );
cIntYuvMbBuffer.loadBuffer( &cYuvMbBuffer );
RNOK( m_pcFrameMng->getPredictionIntFrame()->getFullPelYuvBuffer()->loadBuffer( &cIntYuvMbBuffer ) );
return Err::m_nOK;
}
示例7: ROF
ErrVal ControlMngH264AVCEncoder::initMbForCoding( MbDataAccess& rcMbDataAccess, UInt uiMbY, UInt uiMbX, Bool bMbAff, Bool bFieldFlag )
{
ROF( m_uiCurrLayer < MAX_LAYERS );
if( bMbAff )
{
rcMbDataAccess.setFieldMode( bFieldFlag );
}
else
{
//rpcMbDataAccess->getMbData().setFieldFlag( false ); // now: done above
rcMbDataAccess.getMbMotionData( LIST_0 ).setFieldMode( false );
rcMbDataAccess.getMbMotionData( LIST_1 ).setFieldMode( false );
}
RNOK( m_apcYuvFullPelBufferCtrl[m_uiCurrLayer]->initMb( uiMbY, uiMbX, bMbAff ) );
RNOK( m_apcYuvHalfPelBufferCtrl[m_uiCurrLayer]->initMb( uiMbY, uiMbX, bMbAff ) );
RNOK( m_pcMotionEstimation->initMb( uiMbY, uiMbX, rcMbDataAccess ) );
return Err::m_nOK;
}
示例8: ROFRS
ErrVal MbCoder::xWriteIntraPredModes( MbDataAccess& rcMbDataAccess )
{
ROFRS( rcMbDataAccess.getMbData().isIntra(), Err::m_nOK );
if( rcMbDataAccess.getMbData().isIntra4x4() )
{
if( rcMbDataAccess.getSH().getPPS().getTransform8x8ModeFlag() )
{
RNOK( m_pcMbSymbolWriteIf->transformSize8x8Flag( rcMbDataAccess ) );
}
if( rcMbDataAccess.getMbData().isTransformSize8x8() )
{
for( B8x8Idx cIdx; cIdx.isLegal(); cIdx++ )
{
RNOK( m_pcMbSymbolWriteIf->intraPredModeLuma( rcMbDataAccess, cIdx ) );
}
}
else
{
for( S4x4Idx cIdx; cIdx.isLegal(); cIdx++ )
{
RNOK( m_pcMbSymbolWriteIf->intraPredModeLuma( rcMbDataAccess, cIdx ) );
}
}
}
if( rcMbDataAccess.getMbData().isIntra4x4() || rcMbDataAccess.getMbData().isIntra16x16() )
{
RNOK( m_pcMbSymbolWriteIf->intraPredModeChroma( rcMbDataAccess ) );
}
return Err::m_nOK;
}
示例9: ROT
ErrVal MbCoder::encodeMotion( MbDataAccess& rcMbDataAccess,
MbDataAccess* pcMbDataAccessBase )
{
ROT( rcMbDataAccess.getMbData().isIntra() );
//===== base mode flag =====
RNOK( m_pcMbSymbolWriteIf->BLSkipFlag( rcMbDataAccess ) );
ROTRS( rcMbDataAccess.getMbData().getBLSkipFlag(), Err::m_nOK );
//===== macroblock mode =====
RNOK( m_pcMbSymbolWriteIf->mbMode( rcMbDataAccess ) );
//===== BLOCK MODES =====
if( rcMbDataAccess.getMbData().isInter8x8() )
{
RNOK( m_pcMbSymbolWriteIf->blockModes( rcMbDataAccess ) );
}
//===== MOTION INFORMATION =====
MbMode eMbMode = rcMbDataAccess.getMbData().getMbMode();
if( rcMbDataAccess.getSH().isInterB() )
{
RNOK( xWriteMotionPredFlags_FGS ( rcMbDataAccess, pcMbDataAccessBase, eMbMode, LIST_0 ) );
RNOK( xWriteMotionPredFlags_FGS ( rcMbDataAccess, pcMbDataAccessBase, eMbMode, LIST_1 ) );
RNOK( xWriteReferenceFrames ( rcMbDataAccess, eMbMode, LIST_0 ) );
RNOK( xWriteReferenceFrames ( rcMbDataAccess, eMbMode, LIST_1 ) );
RNOK( xWriteMotionVectors ( rcMbDataAccess, eMbMode, LIST_0 ) );
RNOK( xWriteMotionVectors ( rcMbDataAccess, eMbMode, LIST_1 ) );
}
else
{
RNOK( xWriteMotionPredFlags_FGS ( rcMbDataAccess, pcMbDataAccessBase, eMbMode, LIST_0 ) );
RNOK( xWriteReferenceFrames ( rcMbDataAccess, eMbMode, LIST_0 ) );
RNOK( xWriteMotionVectors ( rcMbDataAccess, eMbMode, LIST_0 ) );
}
//===== residual prediction flag =====
Bool bBaseCoeff = ( pcMbDataAccessBase->getMbData().getMbCbp() != 0 );
RNOK( m_pcMbSymbolWriteIf->resPredFlag_FGS( rcMbDataAccess, bBaseCoeff ) );
return Err::m_nOK;
}
示例10: copyTo
Void IntMbTempData::copyTo( MbDataAccess& rcMbDataAccess )
{
rcMbDataAccess.getMbData() .copyFrom( *this );
rcMbDataAccess.getMbTCoeffs() .copyFrom( *this );
rcMbDataAccess.getMbMvdData(LIST_0) .copyFrom( m_acMbMvdData[LIST_0] );
rcMbDataAccess.getMbMotionData(LIST_0).copyFrom( m_acMbMotionData[LIST_0] );
if( rcMbDataAccess.getSH().isBSlice() )
{
rcMbDataAccess.getMbMvdData(LIST_1) .copyFrom( m_acMbMvdData[LIST_1] );
rcMbDataAccess.getMbMotionData(LIST_1).copyFrom( m_acMbMotionData[LIST_1] );
}
}
示例11: ROFRS
ErrVal
MbParser::xReadIntraPredModes( MbDataAccess& rcMbDataAccess )
{
ROFRS( rcMbDataAccess.getMbData().isIntra(), Err::m_nOK );
if( rcMbDataAccess.getMbData().isIntra4x4() )
{
if( rcMbDataAccess.getSH().getPPS().getTransform8x8ModeFlag() )
{
DECRNOK( m_pcMbSymbolReadIf->transformSize8x8Flag( rcMbDataAccess ) );
}
if( rcMbDataAccess.getMbData().isTransformSize8x8() )
{
for( B8x8Idx cIdx; cIdx.isLegal(); cIdx++ )
{
DECRNOK( m_pcMbSymbolReadIf->intraPredModeLuma8x8( rcMbDataAccess, cIdx ) );
}
}
else
{
for( S4x4Idx cIdx; cIdx.isLegal(); cIdx++ )
{
DECRNOK( m_pcMbSymbolReadIf->intraPredModeLuma( rcMbDataAccess, cIdx ) );
}
}
}
if( rcMbDataAccess.getMbData().isIntra4x4() || rcMbDataAccess.getMbData().isIntra16x16() )
{
if( rcMbDataAccess.getSH().getSPS().getChromaFormatIdc() )
{
DECRNOK( m_pcMbSymbolReadIf->intraPredModeChroma( rcMbDataAccess ) );
}
else
{
rcMbDataAccess.getMbData().setChromaPredMode( 0 ); // DC prediction
}
}
return Err::m_nOK;
}
示例12: switch
ErrVal
MbParser::xGet8x8BlockMv( MbDataAccess& rcMbDataAccess, B8x8Idx c8x8Idx, ListIdx eLstIdx )
{
ParIdx8x8 eParIdx = c8x8Idx.b8x8();
switch( rcMbDataAccess.getMbData().getBlkMode( c8x8Idx.b8x8Index() ) )
{
case BLK_8x8:
{
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx ) );
break;
}
case BLK_8x4:
{
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_8x4_0 ) );
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_8x4_1 ) );
break;
}
case BLK_4x8:
{
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x8_0 ) );
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x8_1 ) );
break;
}
case BLK_4x4:
{
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x4_0 ) );
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x4_1 ) );
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x4_2 ) );
DECRNOK( m_pcMbSymbolReadIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x4_3 ) );
break;
}
case BLK_SKIP:
{
break;
}
default:
{
return Err::m_nERR;
}
}
return Err::m_nOK;
}
示例13: switch
ErrVal MbCoder::xWriteBlockMv( MbDataAccess& rcMbDataAccess, B8x8Idx c8x8Idx, ListIdx eLstIdx )
{
BlkMode eBlkMode = rcMbDataAccess.getMbData().getBlkMode( c8x8Idx.b8x8Index() );
ParIdx8x8 eParIdx = c8x8Idx.b8x8();
switch( eBlkMode )
{
case BLK_8x8:
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx ) );
break;
}
case BLK_8x4:
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_8x4_0 ) );
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_8x4_1 ) );
break;
}
case BLK_4x8:
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x8_0 ) );
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x8_1 ) );
break;
}
case BLK_4x4:
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x4_0 ) );
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x4_1 ) );
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x4_2 ) );
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, eParIdx, SPART_4x4_3 ) );
break;
}
case BLK_SKIP:
{
break;
}
default:
{
AF();
return Err::m_nERR;
}
}
return Err::m_nOK;
}
示例14: RNOK
ErrVal MbCoder::xWriteTextureInfo( MbDataAccess& rcMbDataAccess,
MbDataAccess* pcMbDataAccessBase, // JVT-R091
const MbTransformCoeffs& rcMbTCoeff,
Bool bTrafo8x8Flag
)
{
Bool bWriteDQp = true;
UInt uiCbp = rcMbDataAccess.getMbData().getMbCbp();
if( ! rcMbDataAccess.getMbData().isIntra16x16() )
{
RNOK( m_pcMbSymbolWriteIf->cbp( rcMbDataAccess ) );
bWriteDQp = ( 0 != uiCbp );
}
if( bTrafo8x8Flag && ( rcMbDataAccess.getMbData().getMbCbp() & 0x0F ) )
{
ROT( rcMbDataAccess.getMbData().isIntra16x16() );
ROT( rcMbDataAccess.getMbData().isIntra4x4 () );
RNOK( m_pcMbSymbolWriteIf->transformSize8x8Flag( rcMbDataAccess ) );
}
if( bWriteDQp )
{
RNOK( m_pcMbSymbolWriteIf->deltaQp( rcMbDataAccess ) );
}
if( rcMbDataAccess.getMbData().getBLSkipFlag() ||
!rcMbDataAccess.getMbData().isIntra() )
{
if( rcMbDataAccess.getSH().getAdaptivePredictionFlag() )
{
if( ! rcMbDataAccess.getSH().isIntra() )
{
RNOK( m_pcMbSymbolWriteIf->resPredFlag( rcMbDataAccess ) );
if ( rcMbDataAccess.getMbData().getResidualPredFlag( PART_16x16 ) &&
rcMbDataAccess.getMbData().getBLSkipFlag() )
{
RNOK( m_pcMbSymbolWriteIf->smoothedRefFlag( rcMbDataAccess ) );
}
}
}
}
if( rcMbDataAccess.getMbData().isIntra16x16() )
{
RNOK( xScanLumaIntra16x16( rcMbDataAccess, rcMbTCoeff, rcMbDataAccess.getMbData().isAcCoded() ) );
RNOK( xScanChromaBlocks ( rcMbDataAccess, rcMbTCoeff, rcMbDataAccess.getMbData().getCbpChroma16x16() ) );
return Err::m_nOK;
}
if( rcMbDataAccess.getMbData().isTransformSize8x8() )
{
for( B8x8Idx c8x8Idx; c8x8Idx.isLegal(); c8x8Idx++ )
{
if( (uiCbp >> c8x8Idx.b8x8Index()) & 1 )
{
RNOK( m_pcMbSymbolWriteIf->residualBlock8x8( rcMbDataAccess, c8x8Idx, LUMA_SCAN ) );
}
}
}
else
{
for( B8x8Idx c8x8Idx; c8x8Idx.isLegal(); c8x8Idx++ )
示例15: AOT_DBG
ErrVal
MbCoder::xWriteMotionVectors( MbDataAccess& rcMbDataAccess,
MbMode eMbMode,
ListIdx eLstIdx )
{
AOT_DBG( rcMbDataAccess.getMbData().isIntra() );
switch( eMbMode )
{
case MODE_SKIP:
{
return Err::m_nOK;
}
case MODE_16x16:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx) )
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx ) );
}
return Err::m_nOK;
}
case MODE_16x8:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx) )
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, PART_16x8_0 ) );
}
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_2, eLstIdx) )
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, PART_16x8_1 ) );
}
return Err::m_nOK;
}
case MODE_8x16:
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_0, eLstIdx) )
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, PART_8x16_0 ) );
}
if( rcMbDataAccess.getMbData().isBlockFwdBwd( B_8x8_1, eLstIdx) )
{
RNOK( m_pcMbSymbolWriteIf->mvd( rcMbDataAccess, eLstIdx, PART_8x16_1 ) );
}
return Err::m_nOK;
}
case MODE_8x8:
case MODE_8x8ref0:
{
for( B8x8Idx c8x8Idx; c8x8Idx.isLegal(); c8x8Idx++ )
{
if( rcMbDataAccess.getMbData().isBlockFwdBwd( c8x8Idx.b8x8Index(), eLstIdx ) )
{
RNOK( xWriteBlockMv( rcMbDataAccess, c8x8Idx, eLstIdx ) );
}
}
return Err::m_nOK;
}
default:
{
AF();
return Err::m_nERR;
}
}
return Err::m_nERR;
}