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


Ignore:
Timestamp:
20 Jun 2013, 17:44:29 (12 years ago)
Author:
nokia
Message:

Implementation of JCTVC-M0040 "Adaptive Resolution Change"

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

    r291 r296  
    879879  }
    880880#endif
     881#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     882  WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
     883#endif
    881884}
    882885#endif
     
    12221225    {
    12231226#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)
     1227      if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 )
     1228      {
     1229        WRITE_FLAG( pcSlice->getAltColIndicationFlag() ? 1 : 0, "alt_collocated_indication_flag" );
     1230        if (pcSlice->getAltColIndicationFlag() && pcSlice->getNumMotionPredRefLayers() > 1)
    12281231        {
    12291232          WRITE_UVLC(0, "collocated_ref_layer_idx");
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCfg.h

    r292 r296  
    367367#if REF_IDX_FRAMEWORK
    368368  Int      m_elRapSliceBEnabled;
     369#endif
     370#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     371  Int      m_adaptiveResolutionChange;
    369372#endif
    370373
     
    888891  Int       getElRapSliceTypeB()              {return m_elRapSliceBEnabled;}
    889892#endif
     893#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     894  Void      setAdaptiveResolutionChange(Int x) { m_adaptiveResolutionChange = x;    }
     895  Int       getAdaptiveResolutionChange()      { return m_adaptiveResolutionChange; }
     896#endif
    890897};
    891898
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r295 r296  
    498498    }
    499499
     500#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     501    if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && ((m_layerId == 1 && pocCurr < m_pcEncTop->getAdaptiveResolutionChange()) ||
     502                                                          (m_layerId == 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())) )
     503    {
     504      continue;
     505    }
     506#endif
     507
    500508    if( getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_N_LP )
    501509    {
     
    518526    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
    519527#endif
     528
     529#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     530    if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId == 1 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())
     531    {
     532      pcSlice->setActiveNumILRRefIdx(0);
     533      pcSlice->setInterLayerPredEnabledFlag(false);
    520534#if M0457_COL_PICTURE_SIGNALING
    521     pcSlice->setMFMEnabledFlag(m_pcEncTop->getMFMEnabledFlag());
    522     pcSlice->setAltColIndicationFlag(m_pcEncTop->getNumMotionPredRefLayers() > 0 ? true : false);
    523     pcSlice->setColRefLayerIdx(0);
    524 #endif
     535      pcSlice->setMFMEnabledFlag(false);
     536      pcSlice->setAltColIndicationFlag(false);
     537#endif
     538    }
     539#endif
     540
    525541    pcSlice->setLastIDR(m_iLastIDR);
    526542    pcSlice->setSliceIdx(0);
     
    797813#if REF_IDX_FRAMEWORK
    798814#if M0457_COL_PICTURE_SIGNALING
    799     if ( pcSlice->getSliceType() == B_SLICE && !pcSlice->getAltColIndicationFlag() )
     815    if ( pcSlice->getSliceType() == B_SLICE && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )
    800816#else
    801817    if( pcSlice->getSliceType() == B_SLICE )
     
    846862#if REF_IDX_MFM
    847863#if M0457_COL_PICTURE_SIGNALING
    848       if( pcSlice->getMFMEnabledFlag() && !pcSlice->getAltColIndicationFlag() )
     864      if( pcSlice->getMFMEnabledFlag() && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )
    849865#else
    850866      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     
    22602276      pcPic->getPicYuvRec()->copyToPic(pcPicYuvRecOut);
    22612277
     2278#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     2279      pcPicYuvRecOut->setReconstructed(true);
     2280#endif
     2281
    22622282      pcPic->setReconMark   ( true );
    22632283      m_bFirst = false;
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r282 r296  
    502502#else
    503503    rpcSlice->setNumILRRefIdx( rpcSlice->getVPS()->getNumDirectRefLayers( layerId ) );
    504 #endif
     504#endif
     505#if M0457_COL_PICTURE_SIGNALING
     506    rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag());
     507    rpcSlice->setAltColIndicationFlag(rpcSlice->getMFMEnabledFlag());
     508#endif
    505509  }
    506510
Note: See TracChangeset for help on using the changeset viewer.