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


C++ TComPic类代码示例

本文整理汇总了C++中TComPic的典型用法代码示例。如果您正苦于以下问题:C++ TComPic类的具体用法?C++ TComPic怎么用?C++ TComPic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Int

Void TDecTop::deletePicBuffer ( )
{
  TComList<TComPic*>::iterator  iterPic   = m_cListPic.begin();
  Int iSize = Int( m_cListPic.size() );
  
  for (Int i = 0; i < iSize; i++ )
  {
    TComPic* pcPic = *(iterPic++);
    pcPic->destroy();
    
    delete pcPic;
    pcPic = NULL;
  }
  
  // destroy ALF temporary buffers
  m_cAdaptiveLoopFilter.destroy();

#if MTK_SAO
  m_cSAO.destroy();
#endif
  
  m_cLoopFilter.        destroy();
  
  // destroy ROM
  destroyROM();
}
开发者ID:Rodeo314,项目名称:GitlHEVCAnalyzer,代码行数:26,代码来源:TDecTop.cpp

示例2: computeRPS

void DPB::computeRPS(int curPoc, bool isRAP, TComReferencePictureSet * rps, unsigned int maxDecPicBuffer)
{
    unsigned int poci = 0, numNeg = 0, numPos = 0;

    TComPic* iterPic = m_picList.first();

    while (iterPic && (poci < maxDecPicBuffer - 1))
    {
        if ((iterPic->getPOC() != curPoc) && (iterPic->getSlice()->isReferenced()))
        {
            rps->m_POC[poci] = iterPic->getPOC();
            rps->m_deltaPOC[poci] = rps->m_POC[poci] - curPoc;
            (rps->m_deltaPOC[poci] < 0) ? numNeg++ : numPos++;
            rps->m_used[poci] = !isRAP;
            poci++;
        }
        iterPic = iterPic->m_next;
    }

    rps->m_numberOfPictures = poci;
    rps->m_numberOfPositivePictures = numPos;
    rps->m_numberOfNegativePictures = numNeg;
    rps->m_numberOfLongtermPictures = 0;
    rps->m_interRPSPrediction = false;          // To be changed later when needed

    rps->sortDeltaPOC();
}
开发者ID:zj2089,项目名称:highh265encoder,代码行数:27,代码来源:dpb.cpp

示例3: while

DPB::~DPB()
{
    while (!m_picList.empty())
    {
        TComPic* pic = m_picList.popFront();
        pic->destroy();
        delete pic;
    }
}
开发者ID:zj2089,项目名称:highh265encoder,代码行数:9,代码来源:dpb.cpp

示例4: while

DPB::~DPB()
{
    while (!m_picList.empty())
    {
        TComPic* pic = m_picList.popFront();
        pic->destroy(m_cfg->param.bframes);
        delete pic;
    }
}
开发者ID:roman5566,项目名称:x265,代码行数:9,代码来源:dpb.cpp

示例5: Int

Void TEncTop::deletePicBuffer()
{
  TComList<TComPic*>::iterator iterPic = m_cListPic.begin();
  Int iSize = Int( m_cListPic.size() );

  for ( Int i = 0; i < iSize; i++ )
  {
    TComPic* pcPic = *(iterPic++);

    pcPic->destroy();
    delete pcPic;
    pcPic = NULL;
  }
}
开发者ID:tujidanerhao,项目名称:H265,代码行数:14,代码来源:TEncTop.cpp

示例6: updatePixel

Void updatePixel(TComDataCU* pCtu, Pixel** ppPixel)
{
	UInt uiMaxCUWidth = pCtu->getSlice()->getSPS()->getMaxCUWidth();		// max cu width
	UInt uiMaxCUHeight = pCtu->getSlice()->getSPS()->getMaxCUHeight();		// max cu height

	// pic
	TComPic *pcPic = pCtu->getPic();
	//TComPicYuv* pcPredYuv = pcPic->getPicYuvPred();
	//TComPicYuv* pcResiYuv = pcPic->getPicYuvResi();
	TComPicYuv* pcRecoYuv = pcPic->getPicYuvRec();
	UInt uiNumValidCopmonent = pcPic->getNumberValidComponents();

	for (UInt ch = 0; ch < uiNumValidCopmonent; ch++)
	{
		ComponentID cId = ComponentID(ch);
		// picture description
		UInt uiStride = pcRecoYuv->getStride(cId);									// stride for a certain component
		UInt uiPicWidth = pcRecoYuv->getWidth(cId);									// picture width for a certain component
		UInt uiPicHeight = pcRecoYuv->getHeight(cId);								// picture height for a certain component

		UInt uiCUPelX = pCtu->getCUPelX() >> (pcRecoYuv->getComponentScaleX(cId));			// x of upper left corner of the cu
		UInt uiCUPelY = pCtu->getCUPelY() >> (pcRecoYuv->getComponentScaleY(cId));;			// y of upper left corner of the
		UInt uiCBWidth = uiMaxCUWidth >> (pcRecoYuv->getComponentScaleX(cId));		// code block width for a certain component
		UInt uiCBHeight = uiMaxCUHeight >> (pcRecoYuv->getComponentScaleY(cId));	// code block height for a certain component

		// rectangle of the code block
		UInt uiTopX = Clip3((UInt)0, uiPicWidth, uiCUPelX);
		UInt uiTopY = Clip3((UInt)0, uiPicHeight, uiCUPelY);
		UInt uiBottomX = Clip3((UInt)0, uiPicWidth, uiCUPelX + uiCBWidth);
		UInt uiBottomY = Clip3((UInt)0, uiPicHeight, uiCUPelY + uiCBHeight);

		Pel* pBuffer = pcRecoYuv->getAddr(cId);
		for (UInt uiY = uiTopY; uiY < uiBottomY; uiY++)
		{
			for (UInt uiX = uiTopX; uiX < uiBottomX; uiX++)
			{
				UInt uiOrgX, uiOrgY;
				uiOrgX = g_auiRsmpldToOrg[cId][0][uiX];
				uiOrgY = g_auiRsmpldToOrg[cId][1][uiY];
				Pixel* pPixel = ppPixel[cId] + getSerialIndex(uiOrgX, uiOrgY, uiPicWidth);

				pPixel->m_bIsRec = true;
				pPixel->m_uiReco = pBuffer[uiY*uiStride + uiX];
			}
		}
	}
}
开发者ID:githevc,项目名称:hm16.4-pgr,代码行数:47,代码来源:PixelPrediction.cpp

示例7: while

Int TComSlice::getActualRefNumber( TComList<TComPic*>& rcListPic )
{
  Int iActualNumOfReference = 0;

  TComList<TComPic*>::iterator iterPic = rcListPic.begin();
  while ( iterPic != rcListPic.end() )
  {
    TComPic* rpcPic = *(iterPic);
    if ( rpcPic->getSlice( 0 )->isReferenced() && rpcPic->getReconMark() ) 
    {
      iActualNumOfReference++;
    }
    iterPic++;
  }

  return iActualNumOfReference;
}
开发者ID:tariq78,项目名称:Hello-Git,代码行数:17,代码来源:TComSlice.cpp

示例8: xGetRefPic

TComPic* TComSlice::xGetRefPic(PicList& picList, int poc)
{
    TComPic *iterPic = picList.first();
    TComPic* pic = NULL;

    while (iterPic)
    {
        pic = iterPic;
        if (pic->getPOC() == poc)
        {
            break;
        }
        iterPic = iterPic->m_next;
    }

    return pic;
}
开发者ID:YouXiaoquan,项目名称:x265,代码行数:17,代码来源:TComSlice.cpp

示例9: decodingTLayerSwitchingMarking

/** Function for marking reference pictures with higher temporal layer IDs as not used if the current picture is a temporal layer switching point.
 * \param rcListPic List of picture buffers
 * Both the encoder and decoder call this function to mark reference pictures with temporal layer ID higher than current picture's temporal layer ID as not used.
 */
Void TComSlice::decodingTLayerSwitchingMarking( TComList<TComPic*>& rcListPic )
{
  TComPic* rpcPic;
  if ( m_bTLayerSwitchingFlag ) 
  {
    // mark all pictures of temporal layer > m_uiTLyr as not used for reference
    TComList<TComPic*>::iterator iterPic = rcListPic.begin();
    while ( iterPic != rcListPic.end() )
    {
      rpcPic = *(iterPic);
      if ( rpcPic->getTLayer() > m_uiTLayer ) 
      {
        rpcPic->getSlice( 0 )->setReferenced( false );
      }
      iterPic++;
    }
  }
}
开发者ID:felsamps,项目名称:hm-pu-decision,代码行数:22,代码来源:TComSlice.cpp

示例10: while

Void TDecTop::checkNoOutputPriorPics (TComList<TComPic*>* pcListPic)
{
    if (!pcListPic || !m_isNoOutputPriorPics)
    {
        return;
    }

    TComList<TComPic*>::iterator  iterPic   = pcListPic->begin();

    while (iterPic != pcListPic->end())
    {
        TComPic* pcPicTmp = *(iterPic++);
        if (m_lastPOCNoOutputPriorPics != pcPicTmp->getPOC())
        {
            pcPicTmp->setOutputMark(false);
        }
    }
}
开发者ID:brunnoabreu,项目名称:HM-16.3-SBCCI,代码行数:18,代码来源:TDecTop.cpp

示例11: xGetLongTermRefPic

TComPic* TComSlice::xGetLongTermRefPic(PicList& picList, int poc, bool pocHasMsb)
{
    TComPic* iterPic = picList.first();
    TComPic* pic = iterPic;
    TComPic* stPic = pic;

    int pocCycle = 1 << getSPS()->getBitsForPOC();

    if (!pocHasMsb)
    {
        poc = poc % pocCycle;
    }

    while (iterPic)
    {
        pic = iterPic;
        if (pic && pic->getPOC() != this->getPOC() && pic->getSlice()->isReferenced())
        {
            int picPoc = pic->getPOC();
            if (!pocHasMsb)
            {
                picPoc = picPoc % pocCycle;
            }

            if (poc == picPoc)
            {
                if (pic->getIsLongTerm())
                {
                    return pic;
                }
                else
                {
                    stPic = pic;
                }
                break;
            }
        }

        iterPic = iterPic->m_next;
    }

    return stPic;
}
开发者ID:YouXiaoquan,项目名称:x265,代码行数:43,代码来源:TComSlice.cpp

示例12: encode

/**
 - Application has picture buffer list with size of GOP + 1
 - Picture buffer list acts like as ring buffer
 - End of the list has the latest picture
 .
 \param   flush               cause encoder to encode a partial GOP
 \param   pcPicYuvOrg         original YUV picture
 \param   pcPicYuvTrueOrg     
 \param   snrCSC
 \retval  rcListPicYuvRecOut  list of reconstruction YUV pictures
 \retval  accessUnitsOut      list of output access units
 \retval  iNumEncoded         number of encoded pictures
 */
Void TEncTop::encode( Bool flush, TComPicYuv* pcPicYuvOrg, TComPicYuv* pcPicYuvTrueOrg, const InputColourSpaceConversion snrCSC, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded )
{
  if (pcPicYuvOrg != NULL)
  {
    // get original YUV
    TComPic* pcPicCurr = NULL;

    xGetNewPicBuffer( pcPicCurr );
    pcPicYuvOrg->copyToPic( pcPicCurr->getPicYuvOrg() );
    pcPicYuvTrueOrg->copyToPic( pcPicCurr->getPicYuvTrueOrg() );

    // compute image characteristics
    if ( getUseAdaptiveQP() )
    {
      m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcPicCurr ) );
    }
  }

  if ((m_iNumPicRcvd == 0) || (!flush && (m_iPOCLast != 0) && (m_iNumPicRcvd != m_iGOPSize) && (m_iGOPSize != 0)))
  {
    iNumEncoded = 0;
    return;
  }

  if ( m_RCEnableRateControl )
  {
    m_cRateCtrl.initRCGOP( m_iNumPicRcvd );
  }

  
  // compress GOP
  m_cGOPEncoder.compressGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut, false, false, snrCSC, m_printFrameMSE,&m_cSearch);

  if ( m_RCEnableRateControl )
  {
    m_cRateCtrl.destroyRCGOP();
  }

  iNumEncoded         = m_iNumPicRcvd;
  m_iNumPicRcvd       = 0;
  m_uiNumAllPicCoded += iNumEncoded;
}
开发者ID:tujidanerhao,项目名称:H265,代码行数:55,代码来源:TEncTop.cpp

示例13: Int

Void TDecTop::deletePicBuffer ( )
{
    TComList<TComPic*>::iterator  iterPic   = m_cListPic.begin();
    Int iSize = Int( m_cListPic.size() );

    for (Int i = 0; i < iSize; i++ )
    {
        TComPic* pcPic = *(iterPic++);
        pcPic->destroy();

        delete pcPic;
        pcPic = NULL;
    }

    m_cSAO.destroy();

    m_cLoopFilter.        destroy();

    // destroy ROM
    destroyROM();
}
开发者ID:brunnoabreu,项目名称:HM-16.3-SBCCI,代码行数:21,代码来源:TDecTop.cpp

示例14: executeLoopFilters

Void TDecTop::executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic)
{
    if (!m_pcPic)
    {
        /* nothing to deblock */
        return;
    }

    TComPic*   pcPic         = m_pcPic;

    // Execute Deblock + Cleanup

    m_cGopDecoder.filterPicture(pcPic);

    TComSlice::sortPicList( m_cListPic ); // sorting for application output
    poc                 = pcPic->getSlice(m_uiSliceIdx-1)->getPOC();
    rpcListPic          = &m_cListPic;
    m_cCuDecoder.destroy();
    m_bFirstSliceInPicture  = true;

    return;
}
开发者ID:brunnoabreu,项目名称:HM-16.3-SBCCI,代码行数:22,代码来源:TDecTop.cpp

示例15: while

/** Function for mimicking decoder's reference picture buffer management.
 * \param rcListPic List of picture buffers
 * \param iGOPSIze Current GOP size
 * \param iMaxRefPicNum Maximum number of reference pictures allowed
 * The encoder calls this function to mimic the picture buffer management of the decoder in the function xGetNewPicBuffer.
 * This will ensure in the encoder that the pictures that does not exist in the decoder will not be used as reference.
 * TODO: This assumes that the new pics are added at the end of the list.
 *       This needs to be changed for the general case including for the long-term ref pics.
 *       In the future, we should create a single common function for both the encoder and decoder.
 */
Void TComSlice::decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum )
{
  Int iActualNumOfReference = 0;

  TComList<TComPic*>::iterator iterPic = rcListPic.begin();
  while ( iterPic != rcListPic.end() )
  {
    TComPic* rpcPic = *(iterPic);
    if ( rpcPic->getSlice( 0 )->isReferenced() ) 
    {
      if ( rpcPic != getPic() )
      {
        iActualNumOfReference++;
      }
    }
    iterPic++;
  }

  // TODO: This assumes that the new pics are added at the end of the list
  // This needs to be changed for the general case including for the long-term ref pics
  iMaxRefPicNum = max(iMaxRefPicNum, max(max(2, getNumRefIdx(REF_PIC_LIST_0)+1), iGOPSIze/2 + 2 + getNumRefIdx(REF_PIC_LIST_0)));
  if ( iActualNumOfReference >= iMaxRefPicNum )
  {
    Int iNumToBeReset = iActualNumOfReference - iMaxRefPicNum + 1;

    iterPic = rcListPic.begin();
    while ( iterPic != rcListPic.end() && iNumToBeReset > 0 )
    {
      TComPic* rpcPic = *(iterPic);
      if ( rpcPic->getSlice( 0 )->isReferenced() ) 
      {
        rpcPic->getSlice( 0 )->setReferenced( false );
        iNumToBeReset--;
      }
      iterPic++;
    }
  }
}
开发者ID:felsamps,项目名称:hm-pu-decision,代码行数:48,代码来源:TComSlice.cpp


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