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


C++ SliceHeader::getSPS方法代码示例

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


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

示例1:

// ----------------------------------------------------------------------
//
// FUNCTION:	AddMultiviewRefsToList
//
// INPUTS:	recPicBufUnitList:  A list of refernce pictures potentially
//				    containing multiview references.
//		rcList:  A RefFrameList object to add multiview references to.
//		refDirection:  Direction of references to add to rcList. 
//
// PURPOSE:	This function goes through each reference in recPicBufUnitList,
//		finds all multiview references with the given refDirection,
//		and adds them to rcList.  
//
// MODIFIED:	Tue Mar 14, 2006
//
// ----------------------------------------------------------------------
// modified to be a member of RecPicBuffer 26 Dec, 2006
// and the format has also been adjusted (AddMultiviewRef)
// Simplified again for JVT-V043 7 Feb. 2007
// and some cleanup
ErrVal 
RecPicBuffer::AddMultiviewRef( RecPicBufUnitList& recPicBufUnitList,
			                          RefFrameList& rcList, const int maxListSize,
			                          const MultiviewReferenceDirection refDirection, SliceHeader&   rcSliceheader,
									  QuarterPelFilter* pcQuarterPelFilter) {


  RefFrameList tempList;
  RecPicBufUnitList::iterator iter;

  for (iter  = recPicBufUnitList.begin();iter != recPicBufUnitList.end(); iter++) {
    if ( refDirection == (*iter)->GetMultiviewReferenceDirection() ) {
			if(m_pcPicEncoder->derivation_Inter_View_Flag((*iter)->getViewId(), rcSliceheader)){                        //JVT-W056  Samsung
				RecPicBufUnit* bufUnitToAdd = (*iter);   
				if( 1)
				{
					RNOK( bufUnitToAdd->getRecFrame()->initHalfPel() );
				}
				if( ! bufUnitToAdd->getRecFrame()->isExtended() )
				{
					RNOK( bufUnitToAdd->getRecFrame()->extendFrame( pcQuarterPelFilter, FRAME, rcSliceheader.getSPS().getFrameMbsOnlyFlag() ));
				}
				rcList.add( bufUnitToAdd->getRecFrame()->getPic(rcSliceheader.getPicType()) );
			}
    }
  }
  return Err::m_nOK;
}
开发者ID:edwardtoday,项目名称:BE-thesis-code,代码行数:48,代码来源:RecPicBuffer.cpp

示例2: RNOK

ErrVal
RecPicBuffer::ProcessRef(SliceHeader&   rcSliceHeader, RefFrameList&  rcList ,RefFrameList&  rcListTemp, QuarterPelFilter* pcQuarterPelFilter)
{
  UInt uiPos; 
  PicType ePicType=rcSliceHeader.getPicType();
  bool bFieldPic=(ePicType!=FRAME);

  for( uiPos = 0; uiPos < rcListTemp.getSize() ; uiPos++ )
  {
    IntFrame* pcRefFrame = rcListTemp.getEntry( uiPos );
	if( 1)//! ( pcRefFrame->isHalfPel() && pcRefFrame->isPicReady(FRAME) ) )
    {
      RNOK( pcRefFrame->initHalfPel() );
    }
    if( ! pcRefFrame->isExtended() )
    {
		RNOK( pcRefFrame->extendFrame( pcQuarterPelFilter, FRAME, rcSliceHeader.getSPS().getFrameMbsOnlyFlag() ));
    }
  }

  if(bFieldPic)//lufeng
	xFieldList(rcSliceHeader,rcList,rcListTemp);
  else
  {
	   for( uiPos = 0; uiPos < rcListTemp.getSize() ; uiPos++ )
	   {
		   rcListTemp[uiPos+1]->getFullPelYuvBuffer()->fillMargin();//lufeng: for frame ref
		 rcList.add(rcListTemp[uiPos+1]);
	   }
  }

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

示例3: RNOK

ErrVal ControlMngH264AVCEncoder::initSlice( SliceHeader& rcSH, ProcessingState eProcessingState )
{
  m_uiCurrLayer   = rcSH.getSPS().getLayerId();
  m_pcMbDataCtrl = rcSH.getFrameUnit()->getMbDataCtrl();

  RNOK( m_pcMbDataCtrl          ->initSlice( rcSH, eProcessingState, false, NULL ) );
  RNOK( m_pcMotionEstimation    ->initSlice( rcSH ) );
  RNOK( m_pcSampleWeighting     ->initSlice( rcSH ) );
  RNOK( m_pcMbEncoder           ->initSlice( rcSH ) );

  if( ENCODE_PROCESS == eProcessingState )
  {
    Bool bCabac = rcSH.getPPS().getEntropyCodingModeFlag();
    if( bCabac )
    {
      m_pcMbSymbolWriteIf = m_pcCabacWriter;
    }
    else
    {
      m_pcMbSymbolWriteIf = m_pcUvlcWriter;
    }

    RNOK( m_pcMbSymbolWriteIf->startSlice( rcSH ) );
    RNOK( m_pcMbCoder->initSlice( rcSH, m_pcMbSymbolWriteIf, m_pcRateDistortion ) );
  }

  return Err::m_nOK;
}
开发者ID:Moutarde,项目名称:3DWebcam,代码行数:28,代码来源:ControlMngH264AVCEncoder.cpp

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

示例5: initSlice

ErrVal MbDataCtrl::initSlice( SliceHeader& rcSH, ProcessingState eProcessingState, Bool bDecoder, MbDataCtrl* pcMbDataCtrl )
{
  AOF_DBG( m_bInitDone );

  m_eProcessingState  = eProcessingState;
  m_pcMbDataCtrl0L1   = NULL;

  m_iColocatedOffset  = 0;
  m_bUseTopField      = false;
  m_bPicCodedField    = rcSH.getFieldPicFlag();

  if( rcSH.isInterB() )
  {
    if( ((rcSH.getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_SCALABLE &&
          rcSH.getNalUnitType() != NAL_UNIT_CODED_SLICE_SCALABLE) || (!rcSH.getSvcMvcFlag()) ) && bDecoder
          && rcSH.getRefListSize( LIST_1 )
		  )
    {
      const RefPic& rcRefPic0L1 = rcSH.getRefPic( 1, rcSH.getPicType(), LIST_1 );
      AOF_DBG( rcRefPic0L1.isAvailable() );
      const FrameUnit* pcFU = rcRefPic0L1.getPic().getFrameUnit();
      Int iCurrPoc    = rcSH.getPoc();
      Int iTopDiffPOC = iCurrPoc - pcFU->getTopField().getPOC();
      Int iBotDiffPOC = iCurrPoc - pcFU->getBotField().getPOC();

      m_bUseTopField    = (abs( iTopDiffPOC ) < abs( iBotDiffPOC ) );

      m_pcMbDataCtrl0L1 = pcFU->getMbDataCtrl();

      if( FRAME != rcSH.getPicType() )
      {
          if( rcRefPic0L1.getFrame()->getPicType() != rcSH.getPicType() && m_pcMbDataCtrl0L1->isPicCodedField() )
          {
              m_iColocatedOffset = m_iMbPerLine;
          }
      }
	 

    }

    if( pcMbDataCtrl )
    {
      m_pcMbDataCtrl0L1 = pcMbDataCtrl;
    }

    if(!bDecoder)
    { // Fix by [email protected] & Dong
      if (eProcessingState == ENCODE_PROCESS)
      {
        if( (rcSH.getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_SCALABLE &&
          rcSH.getNalUnitType() != NAL_UNIT_CODED_SLICE_SCALABLE) || (!rcSH.getSvcMvcFlag()) )
        {
          PicType picType = rcSH.getPicType();
          RefFrameList* pRefFrameList1 = rcSH.getRefFrameList(picType, LIST_1);

          Int iCurrPoc    = rcSH.getPoc();
          Int iTopDiffPOC = iCurrPoc - pRefFrameList1->getEntry( 0 )->getTopFieldPoc();
          Int iBotDiffPOC = iCurrPoc - pRefFrameList1->getEntry( 0 )->getBotFieldPoc();

          m_bUseTopField    = (abs( iTopDiffPOC ) < abs( iBotDiffPOC ) );

          if( FRAME != rcSH.getPicType() )
          {
            if( pRefFrameList1->getEntry( 0 )->getPicType() != rcSH.getPicType() && m_pcMbDataCtrl0L1->isPicCodedField() )
            {
              m_iColocatedOffset = m_iMbPerLine;
            }
          }
        }
      }
      else
      {
        m_bUseTopField = true;//lufeng: default
      }
    }
  }

  if( PARSE_PROCESS == m_eProcessingState || ENCODE_PROCESS == m_eProcessingState )
  {
    m_uiSliceId++;

    //[email protected] : memory leak fix
    if( m_cpDFPBuffer.get( m_uiSliceId ) )
    {
      delete m_cpDFPBuffer.get( m_uiSliceId );
      m_cpDFPBuffer.set( m_uiSliceId, NULL );
    }
    //--

    m_cpDFPBuffer.set( m_uiSliceId, rcSH.getDeblockingFilterParameter().getCopy() );
    m_bDirect8x8InferenceFlag = rcSH.getSPS().getDirect8x8InferenceFlag();
  }
  m_pcSliceHeader = &rcSH;


  Int iMbPerColumn  = rcSH.getSPS().getFrameHeightInMbs ();
  m_iMbPerLine      = rcSH.getSPS().getFrameWidthInMbs  ();

  m_uiMbOffset      = rcSH.getBottomFieldFlag() ? 1 * m_iMbPerLine : 0;
  m_uiMbStride      = rcSH.getFieldPicFlag()    ? 2 * m_iMbPerLine : m_iMbPerLine;
//.........这里部分代码省略.........
开发者ID:Moutarde,项目名称:3DWebcam,代码行数:101,代码来源:MbDataCtrl.cpp

示例6: isFrameDone

Bool MbDataCtrl::isFrameDone( const SliceHeader& rcSH )
{
  return ( m_uiMbProcessed == rcSH.getSPS().getMbInFrame());
}
开发者ID:Moutarde,项目名称:3DWebcam,代码行数:4,代码来源:MbDataCtrl.cpp

示例7:

ErrVal ControlMngH264AVCEncoder::initSliceForFiltering( const SliceHeader& rcSH )
{
  m_uiCurrLayer   = rcSH.getSPS().getLayerId();

  return Err::m_nOK;
}
开发者ID:Moutarde,项目名称:3DWebcam,代码行数:6,代码来源:ControlMngH264AVCEncoder.cpp


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