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


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

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


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

示例1: ROF

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

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

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

  // Update the macroblock state
  // Must be done after the bit-stream has been constructed
  for( ; uiMbAddress <= uiLastMbAddress; )
  {
    UInt          uiMbY               = 0;
    UInt          uiMbX               = 0;
    MbDataAccess* pcMbDataAccess      = 0;
    MbDataAccess* pcMbDataAccessBase  = 0;

    rcSliceHeader.getMbPositionFromAddress( uiMbY, uiMbX, uiMbAddress );
    RNOK( pcMbDataCtrl      ->initMb          ( pcMbDataAccess,     uiMbY, uiMbX ) );
    if( pcBaseLayerCtrl )
    {
      RNOK( pcBaseLayerCtrl ->initMb          ( pcMbDataAccessBase, uiMbY, uiMbX ) );
      pcMbDataAccess->setMbDataAccessBase( pcMbDataAccessBase );
    }

    // modify QP values (as specified in G.8.1.5.1.2)
    if( pcMbDataAccess->getMbData().getMbCbp() == 0 && ( pcMbDataAccess->getMbData().getMbMode() == INTRA_BL || pcMbDataAccess->getMbData().getResidualPredFlag() ) )
    {
      pcMbDataAccess->getMbData().setQp   ( pcMbDataAccessBase->getMbData().getQp() );
      pcMbDataAccess->getMbData().setQp4LF( pcMbDataAccessBase->getMbData().getQp() );
    }

    // if cbp==0, tranform size is not transmitted, in this case inherit the transform size from base layer
    if( ( pcMbDataAccess->getMbData().getResidualPredFlag() && ! pcMbDataAccess->getMbData().isIntra() && ! pcMbDataAccessBase->getMbData().isIntra() ) || ( pcMbDataAccess->getMbData().getMbMode() == INTRA_BL ) )
    {
      if( ( pcMbDataAccess->getMbData().getMbCbp() & 0x0F ) == 0 )
      {
        pcMbDataAccess->getMbData().setTransformSize8x8( pcMbDataAccessBase->getMbData().isTransformSize8x8() );
      }
    }

    // set I_PCM mode (for deblocking) when CBP is 0, mbMode is I_BL, and base layer mbMode is I_PCM
    if( pcMbDataAccess->getMbData().getMbCbp() == 0 && pcMbDataAccess->getMbData().isIntraBL() && pcMbDataAccessBase->getMbData().isPCM() )
    {
      pcMbDataAccess->getMbData().setMbMode( MODE_PCM );
    }

    uiMbAddress++;
  }

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


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