当前位置: 首页>>代码示例>>C++>>正文


C++ MbDataAccess::getMbData方法代码示例

本文整理汇总了C++中MbDataAccess::getMbData方法的典型用法代码示例。如果您正苦于以下问题:C++ MbDataAccess::getMbData方法的具体用法?C++ MbDataAccess::getMbData怎么用?C++ MbDataAccess::getMbData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MbDataAccess的用法示例。


在下文中一共展示了MbDataAccess::getMbData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: calcMv

ErrVal MbDecoder::calcMv( MbDataAccess& rcMbDataAccess,
                          MbDataAccess* pcMbDataAccessBaseMotion )
{
  if( rcMbDataAccess.getMbData().getBLSkipFlag() )
  {
    return Err::m_nOK;
  }

  if( rcMbDataAccess.getMbData().getMbMode() == INTRA_4X4 )
  {
    //----- intra prediction -----
    rcMbDataAccess.getMbMotionData( LIST_0 ).setRefIdx( BLOCK_NOT_PREDICTED );
    rcMbDataAccess.getMbMotionData( LIST_0 ).setAllMv ( Mv::ZeroMv() );
    rcMbDataAccess.getMbMotionData( LIST_1 ).setRefIdx( BLOCK_NOT_PREDICTED );
    rcMbDataAccess.getMbMotionData( LIST_1 ).setAllMv ( Mv::ZeroMv() );
  }
  else
  {
    if( rcMbDataAccess.getMbData().getMbMode() == MODE_8x8 || rcMbDataAccess.getMbData().getMbMode() == MODE_8x8ref0 )
    {
      for( B8x8Idx c8x8Idx; c8x8Idx.isLegal(); c8x8Idx++ )
      {
        //----- motion compensated prediction -----
        RNOK( m_pcMotionCompensation->calcMvSubMb( c8x8Idx, rcMbDataAccess, pcMbDataAccessBaseMotion ) );
      }
    }
    else
    {
      //----- motion compensated prediction -----
      RNOK( m_pcMotionCompensation->calcMvMb( rcMbDataAccess, pcMbDataAccessBaseMotion ) );
    }
  }

  return Err::m_nOK;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:35,代码来源:MbDecoder.cpp

示例2: xWriteIntraPredModes

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;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:34,代码来源:MbCoder.cpp

示例3: 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;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:35,代码来源:MbDecoder.cpp

示例4: xDecodeChroma

ErrVal MbDecoder::xDecodeChroma( MbDataAccess& rcMbDataAccess, YuvMbBuffer& rcRecYuvBuffer, UInt uiChromaCbp, Bool bPredChroma )
{
  MbTransformCoeffs& rcCoeffs = m_cTCoeffs;

  Pel*  pucCb   = rcRecYuvBuffer.getMbCbAddr();
  Pel*  pucCr   = rcRecYuvBuffer.getMbCrAddr();
  Int   iStride = rcRecYuvBuffer.getCStride();

  if( bPredChroma )
  {
    RNOK( m_pcIntraPrediction->predictChromaBlock( pucCb, pucCr, iStride, rcMbDataAccess.getMbData().getChromaPredMode() ) );
  }

  ROTRS( 0 == uiChromaCbp, Err::m_nOK );

  Int                 iScale;
  Bool                bIntra    = rcMbDataAccess.getMbData().isIntra();
  UInt                uiUScalId = ( bIntra ? 1 : 4 );
  UInt                uiVScalId = ( bIntra ? 2 : 5 );
  const UChar*        pucScaleU = rcMbDataAccess.getSH().getScalingMatrix( uiUScalId );
  const UChar*        pucScaleV = rcMbDataAccess.getSH().getScalingMatrix( uiVScalId );

  // scaling has already been performed on DC coefficients
  iScale = ( pucScaleU ? pucScaleU[0] : 16 );
  m_pcTransform->invTransformChromaDc( rcCoeffs.get( CIdx(0) ), iScale );     
  iScale = ( pucScaleV ? pucScaleV[0] : 16 );
  m_pcTransform->invTransformChromaDc( rcCoeffs.get( CIdx(4) ), iScale );

  RNOK( m_pcTransform->invTransformChromaBlocks( pucCb, iStride, rcCoeffs.get( CIdx(0) ) ) );
  RNOK( m_pcTransform->invTransformChromaBlocks( pucCr, iStride, rcCoeffs.get( CIdx(4) ) ) );

  return Err::m_nOK;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:33,代码来源:MbDecoder.cpp

示例5: copyResidualDataTo

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() );
}
开发者ID:Moutarde,项目名称:3DWebcam,代码行数:10,代码来源:MbTempData.cpp

示例6: ROF

ErrVal
SliceEncoder::updateBaseLayerResidual( ControlData&     rcControlData,
                                         UInt          uiMbInRow )
{
  ROF( m_bInitDone );

  SliceHeader&  rcSliceHeader         = *rcControlData.getSliceHeader           ();
  MbDataCtrl*   pcMbDataCtrl          =  rcControlData.getMbDataCtrl            ();
  MbDataCtrl*   pcBaseLayerCtrl       =  rcControlData.getBaseLayerCtrl         ();
  Frame*     pcBaseLayerSbb        =  rcControlData.getBaseLayerSbb         ();
  UInt          uiMbAddress           =  0;
  UInt          uiLastMbAddress       =  rcSliceHeader.getMbInPic() - 1;

  //====== initialization ======
  RNOK( pcMbDataCtrl->initSlice( rcSliceHeader, DECODE_PROCESS, false, NULL ) );

  for( ; uiMbAddress <= uiLastMbAddress; )
  {
    UInt          uiMbY               = uiMbAddress / uiMbInRow;
    UInt          uiMbX               = uiMbAddress % uiMbInRow;
    MbDataAccess* pcMbDataAccess      = 0;
    MbDataAccess* pcMbDataAccessBase  = 0;

    RNOK( pcMbDataCtrl      ->initMb          ( pcMbDataAccess,     uiMbY, uiMbX ) );
    if( pcBaseLayerCtrl )
    {
      RNOK( pcBaseLayerCtrl ->initMb          ( pcMbDataAccessBase, uiMbY, uiMbX ) );
      //pcMbDataAccess->setMbDataAccessBase( pcMbDataAccessBase );
    }

    // Update the state of the baselayer residual data -- it may be reused in subsequent layers - [email protected]
    if( !pcMbDataAccess->getMbData().getResidualPredFlag() )
    {
      if( pcBaseLayerSbb && ( pcMbDataAccess->getMbData().isIntra() || ! pcMbDataAccess->getMbData().getResidualPredFlag() ) )
      {
        YuvPicBuffer* pcBaseResidual = pcBaseLayerSbb->getFullPelYuvBuffer();

        pcBaseResidual->getBufferCtrl().initMb( uiMbY, uiMbX, false);
        pcBaseResidual->clearCurrMb();
      }
    }

    uiMbAddress++;
  }

  return Err::m_nOK;
}
开发者ID:hwyhit,项目名称:JSVM,代码行数:47,代码来源:SliceEncoder.cpp

示例7: xDecodeMbIntraBL

ErrVal MbDecoder::xDecodeMbIntraBL( MbDataAccess&     rcMbDataAccess,
                                    IntYuvPicBuffer*  pcRecYuvBuffer,
                                    IntYuvMbBuffer&   rcPredBuffer,
                                    IntYuvPicBuffer*  pcBaseYuvBuffer )
{
  IntYuvMbBuffer      cYuvMbBuffer;
  MbTransformCoeffs&  rcCoeffs = m_cTCoeffs;

  cYuvMbBuffer.loadBuffer ( pcBaseYuvBuffer );
  rcPredBuffer.loadLuma   ( cYuvMbBuffer );
  rcPredBuffer.loadChroma ( cYuvMbBuffer );

  if( rcMbDataAccess.getMbData().isTransformSize8x8() )
  {
    for( B8x8Idx cIdx; cIdx.isLegal(); cIdx++ )
    {
      if( rcMbDataAccess.getMbData().is4x4BlkCoded( cIdx ) )
      {
        RNOK( m_pcTransform->invTransform8x8Blk( cYuvMbBuffer.getYBlk( cIdx ),
                                                 cYuvMbBuffer.getLStride(),
                                                 rcCoeffs.get8x8(cIdx) ) );
      }
    }
  }
  else
  {
    for( B4x4Idx cIdx; cIdx.isLegal(); cIdx++ )
    {
      if( rcMbDataAccess.getMbData().is4x4BlkCoded( cIdx ) )
      {
        RNOK( m_pcTransform->invTransform4x4Blk( cYuvMbBuffer.getYBlk( cIdx ),
                                                 cYuvMbBuffer.getLStride(),
                                                 rcCoeffs.get(cIdx) ) );
      }
    }
  }

  UInt uiChromaCbp = rcMbDataAccess.getMbData().getCbpChroma4x4();
  RNOK( xDecodeChroma( rcMbDataAccess, cYuvMbBuffer, rcPredBuffer, uiChromaCbp, false ) );

  pcRecYuvBuffer->loadBuffer( &cYuvMbBuffer );

  return Err::m_nOK;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:44,代码来源:MbDecoder.cpp

示例8: compensatePrediction

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;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:11,代码来源:MbDecoder.cpp

示例9: encodeMotion

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;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:38,代码来源:MbCoder.cpp

示例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] );
  }
}
开发者ID:hwyhit,项目名称:JSVM,代码行数:14,代码来源:MbTempData.cpp

示例11: 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;
}
开发者ID:dewn49,项目名称:thialgou,代码行数:16,代码来源:MbParser.cpp

示例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;
}
开发者ID:dewn49,项目名称:thialgou,代码行数:44,代码来源:MbParser.cpp

示例13: xWriteBlockMv

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;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:44,代码来源:MbCoder.cpp

示例14: ROFRS

Bool
MbParser::xCheckSkipSliceMb( MbDataAccess& rcMbDataAccess, UInt uiNumMbRead, Bool& rbEndOfSlice )
{
  ROFRS( rcMbDataAccess.getSH().getSliceSkipFlag(), false );

  MbData& rcMbData = rcMbDataAccess.getMbData();
  rcMbData.setSkipFlag          ( false );
  rcMbData.setBLSkipFlag        ( true );
  rcMbData.setResidualPredFlag  ( true );
  rcMbData.setMbExtCbp          ( 0 );
  rcMbData.setFwdBwd            ( 0 );
  rcMbDataAccess.resetQp        ();
  rcMbDataAccess.getMbMotionData( LIST_0 ).clear( BLOCK_NOT_PREDICTED );
  rcMbDataAccess.getMbMotionData( LIST_1 ).clear( BLOCK_NOT_PREDICTED );
  rcMbDataAccess.getMbMvdData   ( LIST_0 ).clear();
  rcMbDataAccess.getMbMvdData   ( LIST_1 ).clear();

  rbEndOfSlice = ( uiNumMbRead >= rcMbDataAccess.getSH().getNumMbsInSliceMinus1() );
  return true;
}
开发者ID:dewn49,项目名称:thialgou,代码行数:20,代码来源:MbParser.cpp

示例15: 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;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:82,代码来源:MbCoder.cpp


注:本文中的MbDataAccess::getMbData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。