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


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

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


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

示例1: xDecodeMbInter


//.........这里部分代码省略.........
  //===== reconstruct residual signal by using transform coefficients ======
  m_pcTransform->setClipMode( false );
  if( rcMbDataAccess.getMbData().isTransformSize8x8() )
  {
    for( B8x8Idx cIdx; cIdx.isLegal(); cIdx++ )
    {
      if( rcMbDataAccess.getMbData().is4x4BlkCoded( cIdx ) )
      {
        RNOK( m_pcTransform->invTransform8x8Blk( cYuvMbBufferResidual.getYBlk( cIdx ),
                                                 cYuvMbBufferResidual.getLStride(),
                                                 rcCoeffs.get8x8(cIdx) ) );
      }
    }
  }
  else
  {
    for( B4x4Idx cIdx; cIdx.isLegal(); cIdx++ )
    {
      if( rcMbDataAccess.getMbData().is4x4BlkCoded( cIdx ) )
      {
        RNOK( m_pcTransform->invTransform4x4Blk( cYuvMbBufferResidual.getYBlk( cIdx ),
                                                 cYuvMbBufferResidual.getLStride(),
                                                 rcCoeffs.get(cIdx) ) );
      }
    }
  }

  UInt uiChromaCbp = rcMbDataAccess.getMbData().getCbpChroma4x4();
  RNOK( xDecodeChroma( rcMbDataAccess, cYuvMbBufferResidual, rcPredBuffer, uiChromaCbp, false ) );
  m_pcTransform->setClipMode( true );


  //===== add base layer residual =====
  if( rcMbDataAccess.getMbData().getResidualPredFlag( PART_16x16 ) )
  {
    IntYuvMbBuffer cBaseLayerBuffer;
    cBaseLayerBuffer.loadBuffer( pcBaseResidual->getFullPelYuvBuffer() );

		//-- JVT-R091
		if ( bReconstruct && rcMbDataAccess.getMbData().getSmoothedRefFlag() )
		{
			IntYuvMbBuffer cMbBuffer;

			// obtain P
			cMbBuffer.loadLuma	( cYuvMbBuffer );
			cMbBuffer.loadChroma( cYuvMbBuffer );
			
			// P+Rb
			cMbBuffer.add( cBaseLayerBuffer );

			// S(P+Rb)
			pcRecYuvBuffer->loadBuffer( &cMbBuffer );
			pcRecYuvBuffer->smoothMbInside();
			if ( rcMbDataAccess.isAboveMbExisting() )
			{
				pcRecYuvBuffer->smoothMbTop();
			}
			if ( rcMbDataAccess.isLeftMbExisting() )
			{
				pcRecYuvBuffer->smoothMbLeft();
			}

			// store new prediction
			cYuvMbBuffer.loadBuffer	( pcRecYuvBuffer		);
			cYuvMbBuffer.subtract		( cBaseLayerBuffer	);

			// update rcPredBuffer
			rcPredBuffer.loadLuma   ( cYuvMbBuffer			);
			rcPredBuffer.loadChroma ( cYuvMbBuffer			);
		}
		//--

    cYuvMbBufferResidual.add( cBaseLayerBuffer );
    //--- set CBP ---
    rcMbDataAccess.getMbData().setMbExtCbp( rcMbDataAccess.getMbData().getMbExtCbp() | pcMbDataAccessBase->getMbData().getMbExtCbp() );
  }


  //===== reconstruct signal =====
  if( bReconstruct )
  {
    cYuvMbBuffer.add( cYuvMbBufferResidual );
    cYuvMbBuffer.clip();
  }


  //===== store reconstructed residual =====
  if( pcResidual )
  {
    RNOK( pcResidual->getFullPelYuvBuffer()->loadBuffer( &cYuvMbBufferResidual ) );
  }

  //===== store reconstructed signal =====
  if( pcRecYuvBuffer )
  {
    RNOK( pcRecYuvBuffer->loadBuffer( &cYuvMbBuffer ) );
  }

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


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