Ignore:
Timestamp:
18 Jun 2013, 14:06:13 (11 years ago)
Author:
nokia
Message:

JCTVC-M0457: Co-located picture signaling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r288 r291  
    487487    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
    488488#endif
     489#if M0457_COL_PICTURE_SIGNALING
     490    pcSlice->setMFMEnabledFlag(m_pcEncTop->getMFMEnabledFlag());
     491    pcSlice->setAltColIndicationFlag(m_pcEncTop->getNumMotionPredRefLayers() > 0 ? true : false);
     492    pcSlice->setColRefLayerIdx(0);
     493#endif
    489494    pcSlice->setLastIDR(m_iLastIDR);
    490495    pcSlice->setSliceIdx(0);
     
    760765
    761766#if REF_IDX_FRAMEWORK
     767#if M0457_COL_PICTURE_SIGNALING
     768    if ( pcSlice->getSliceType() == B_SLICE && !pcSlice->getAltColIndicationFlag() )
     769#else
    762770    if( pcSlice->getSliceType() == B_SLICE )
     771#endif
    763772    {
    764773      pcSlice->setColFromL0Flag(1-uiColDir);
     
    789798
    790799#if REF_IDX_MFM
     800#if M0457_COL_PICTURE_SIGNALING
     801      if( pcSlice->getMFMEnabledFlag() )
     802#else
    791803      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     804#endif
    792805      {
    793806        pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic());
     807#if M0457_COL_PICTURE_SIGNALING
     808        pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));
     809#endif
    794810      }
    795811#endif
     
    798814
    799815#if REF_IDX_MFM
     816#if M0457_COL_PICTURE_SIGNALING
     817      if( pcSlice->getMFMEnabledFlag() && !pcSlice->getAltColIndicationFlag() )
     818#else
    800819      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     820#endif
    801821      {
    802822        Bool found         = false;
     
    16081628            startCUAddrSliceSegmentIdx++;
    16091629          }
    1610 
     1630#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1631          pcSlice->setNumMotionPredRefLayers(m_pcEncTop->getNumMotionPredRefLayers());
     1632#endif
    16111633          pcSlice->setRPS(pcPic->getSlice(0)->getRPS());
    16121634          pcSlice->setRPSidx(pcPic->getSlice(0)->getRPSidx());
     
    30013023}
    30023024#endif
     3025
     3026#if M0457_COL_PICTURE_SIGNALING
     3027TComPic* TEncGOP::getMotionPredIlp(TComSlice* pcSlice)
     3028{
     3029  TComPic* ilpPic = NULL;
     3030  Int activeMotionPredReflayerIdx = 0;
     3031
     3032  for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
     3033  {
     3034    UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);
     3035    if (m_pcEncTop->getMotionPredEnabledFlag(refLayerIdc))
     3036    {
     3037      if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx())
     3038      {
     3039        ilpPic = m_pcEncTop->getIlpList()[i];
     3040        break;
     3041      }
     3042      else
     3043      {
     3044        activeMotionPredReflayerIdx++;
     3045      }
     3046    }
     3047  }
     3048
     3049  assert(ilpPic != NULL);
     3050
     3051  return ilpPic;
     3052}
     3053#endif
     3054
    30033055//! \}
Note: See TracChangeset for help on using the changeset viewer.