Changeset 291 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibEncoder


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

JCTVC-M0457: Co-located picture signaling

Location:
branches/SHM-2.1-dev/source/Lib/TLibEncoder
Files:
4 edited

Legend:

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

    r290 r291  
    548548  WRITE_FLAG( pcSPS->getTMVPFlagsPresent()  ? 1 : 0,           "sps_temporal_mvp_enable_flag" );
    549549#if REF_IDX_MFM
     550#if !M0457_COL_PICTURE_SIGNALING
    550551  if( pcSPS->getLayerId() > 0 )
    551552  {
    552553    WRITE_FLAG( pcSPS->getMFMEnabledFlag() ? 1 : 0,          "sps_enh_mfm_enable_flag" );
    553554  }
     555#endif
    554556#endif
    555557  WRITE_FLAG( pcSPS->getUseStrongIntraSmoothing(),             "sps_strong_intra_smoothing_enable_flag" );
     
    12191221    if ( pcSlice->getEnableTMVPFlag() )
    12201222    {
     1223#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1224      if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 )
     1225      {
     1226        WRITE_FLAG( 1, "alt_collocated_indication_flag" );
     1227        if (pcSlice->getNumMotionPredRefLayers() > 1)
     1228        {
     1229          WRITE_UVLC(0, "collocated_ref_layer_idx");
     1230        }
     1231      }
     1232      else
     1233      {
     1234#endif
    12211235      if ( pcSlice->getSliceType() == B_SLICE )
    12221236      {
     
    12301244        WRITE_UVLC( pcSlice->getColRefIdx(), "collocated_ref_idx" );
    12311245      }
     1246#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1247      }
     1248#endif
    12321249    }
    12331250    if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) )
  • 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//! \}
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.h

    r191 r291  
    207207  Void dblMetric( TComPic* pcPic, UInt uiNumSlices );
    208208#endif
     209#if M0457_COL_PICTURE_SIGNALING
     210  TComPic* getMotionPredIlp(TComSlice* pcSlice);
     211#endif
    209212};// END CLASS DEFINITION TEncGOP
    210213
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r288 r291  
    599599#endif
    600600#if REF_IDX_MFM
     601#if !M0457_COL_PICTURE_SIGNALING
    601602  m_cSPS.setMFMEnabledFlag(m_bMFMEnabledFlag);
     603#endif
    602604#endif
    603605#if SCALED_REF_LAYER_OFFSETS
Note: See TracChangeset for help on using the changeset viewer.