Changeset 524 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib


Ignore:
Timestamp:
19 Dec 2013, 17:46:32 (11 years ago)
Author:
ericsson
Message:

JCTVC-O0199: Skip picture at ARC switch (MACRO: HIGHER_LAYER_IRAP_SKIP_FLAG)

Support for coding higher layer picture as skip at ARC switching by setting SkipPictureAtArcSwitch to 1.

From: Jonatan Samuelsson <jonatan.samuelsson@…>

Location:
branches/SHM-4.1-dev/source/Lib
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h

    r520 r524  
    601601  Bool       m_singleLayerForNonIrapFlag;
    602602#endif
     603#if HIGHER_LAYER_IRAP_SKIP_FLAG
     604  Bool       m_higherLayerIrapSkipFlag;
     605#endif
    603606#if TILE_BOUNDARY_ALIGNED_FLAG
    604607  Bool       m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     
    863866  Bool   getSingleLayerForNonIrapFlag()                             { return m_singleLayerForNonIrapFlag; }
    864867  Void   setSingleLayerForNonIrapFlag(Bool x)                       { m_singleLayerForNonIrapFlag = x;    }
     868#endif
     869#if HIGHER_LAYER_IRAP_SKIP_FLAG
     870  Bool   getHigherLayerIrapSkipFlag()                             { return m_higherLayerIrapSkipFlag; }
     871  Void   setHigherLayerIrapSkipFlag(Bool x)                       { m_higherLayerIrapSkipFlag = x;    }
    865872#endif
    866873#if TILE_BOUNDARY_ALIGNED_FLAG 
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h

    r521 r524  
    9999#define N0160_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
    100100#define VPS_VUI_BITRATE_PICRATE          1      ///< JCTVC-N0085: Signal bit rate and picture in VPS VUI
     101#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     102#define HIGHER_LAYER_IRAP_SKIP_FLAG      1      ///< JCTVC-O0199: Indication that higher layer IRAP picture uses skip blocks only
     103#endif
    101104#endif //VPS_VUI
    102105
  • branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r516 r524  
    14711471  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
    14721472#endif
     1473#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1474  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
     1475#endif
    14731476
    14741477  READ_FLAG( uiCode,  "vps_vui_present_flag" );
  • branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCu.cpp

    r494 r524  
    317317  }
    318318 
     319#if HIGHER_LAYER_IRAP_SKIP_FLAG
     320  if (pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->getLayerId() > 0)
     321  {
     322    Bool lowerLayerExist = false;
     323    for(int i=0;i<pcCU->getLayerId();i++)
     324    {
     325      if(pcCU->getSlice()->getBaseColPic(pcCU->getSlice()->getInterLayerPredLayerIdc(i)))
     326      {
     327        lowerLayerExist = true;
     328      }
     329    }
     330    if(lowerLayerExist)
     331    {
     332      assert(pcCU->isSkipped(uiAbsPartIdx));
     333    }
     334  }
     335#endif
     336 
    319337  if( pcCU->isSkipped(uiAbsPartIdx) )
    320338  {
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r516 r524  
    11491149  WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
    11501150#endif
     1151#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1152  WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" );
     1153#endif
    11511154
    11521155#if !VPS_VUI
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCfg.h

    r512 r524  
    395395#if O0153_ALT_OUTPUT_LAYER_FLAG
    396396  Bool      m_altOutputLayerFlag;
     397#endif
     398#if HIGHER_LAYER_IRAP_SKIP_FLAG
     399  Int       m_skipPictureAtArcSwitch;
    397400#endif
    398401#endif
     
    937940  Int       getAdaptiveResolutionChange()      { return m_adaptiveResolutionChange; }
    938941#endif
     942#if HIGHER_LAYER_IRAP_SKIP_FLAG
     943  Void      setSkipPictureAtArcSwitch(Int x) { m_skipPictureAtArcSwitch = x;    }
     944  Int       getSkipPictureAtArcSwitch()      { return m_skipPictureAtArcSwitch; }
     945#endif
    939946#if AUXILIARY_PICTURES
    940947  Void         setChromaFormatIDC(ChromaFormat x) { m_chromaFormatIDC = x;    }
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r494 r524  
    460460  if(!bSliceEnd && !bSliceStart && bInsidePicture )
    461461  {
     462#if HIGHER_LAYER_IRAP_SKIP_FLAG
     463    if (m_pcEncCfg->getSkipPictureAtArcSwitch() && m_pcEncCfg->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncCfg->getAdaptiveResolutionChange())
     464    {
     465      rpcTempCU->initEstData( uiDepth, iBaseQP );
     466     
     467      xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode, true );
     468    }
     469    else
     470    {
     471#endif
    462472#if (ENCODER_FAST_MODE)
    463473    Bool testInter = true;
     
    779789      bSubBranch = true;
    780790    }
     791#if HIGHER_LAYER_IRAP_SKIP_FLAG
     792    }
     793#endif
    781794  }
    782795  else if(!(bSliceEnd && bInsidePicture))
     
    11431156 
    11441157  TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
     1158#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1159  if (m_pcEncCfg->getSkipPictureAtArcSwitch() && m_pcEncCfg->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncCfg->getAdaptiveResolutionChange())
     1160  {
     1161    pcCU->setSkipFlagSubParts(true, uiAbsPartIdx, uiDepth);
     1162  }
     1163#endif
    11451164  // If slice start is within this cu...
    11461165  Bool bSliceStart = pcSlice->getSliceSegmentCurStartCUAddr() > pcPic->getPicSym()->getInverseCUOrderMap(pcCU->getAddr())*pcCU->getPic()->getNumPartInCU()+uiAbsPartIdx &&
     
    13531372 * \returns Void
    13541373 */
     1374#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1375Void TEncCu::xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode, Bool bUseSkip )
     1376#else
    13551377Void TEncCu::xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode )
     1378#endif
    13561379{
    13571380  assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE );
     
    13871410  }
    13881411
     1412#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1413  for( UInt uiNoResidual = bUseSkip?1:0; uiNoResidual < iteration; ++uiNoResidual )
     1414#else
    13891415  for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual )
     1416#endif
    13901417  {
    13911418    for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.h

    r494 r524  
    146146  Int   xComputeQP          ( TComDataCU* pcCU, UInt uiDepth );
    147147  Void  xCheckBestMode      ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt uiDepth        );
    148  
     148#if HIGHER_LAYER_IRAP_SKIP_FLAG
     149  Void  xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode, Bool bUseSkip=false);
     150#else 
    149151  Void  xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode);
     152#endif
    150153
    151154#if AMP_MRG
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r514 r524  
    22802280            // set entropy coder for RD
    22812281            m_pcEntropyCoder->setEntropyCoder ( m_pcSbacCoder, pcSlice );
     2282#if HIGHER_LAYER_IRAP_SKIP_FLAG
     2283            if ( pcSlice->getSPS()->getUseSAO() && !( m_pcEncTop->getSkipPictureAtArcSwitch() && m_pcEncTop->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncTop->getAdaptiveResolutionChange()) )
     2284#else
    22822285            if ( pcSlice->getSPS()->getUseSAO() )
     2286#endif
    22832287            {
    22842288              m_pcEntropyCoder->resetEntropy();
     
    23032307#endif
    23042308            processingState = ENCODE_SLICE;
    2305 
     2309#if HIGHER_LAYER_IRAP_SKIP_FLAG
     2310            if ( ( m_pcEncTop->getSkipPictureAtArcSwitch() && m_pcEncTop->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncTop->getAdaptiveResolutionChange()) )
     2311            {
     2312              pcSlice->getPic()->getPicSym()->getSaoParam()->bSaoFlag[0]=0;
     2313              pcSlice->getPic()->getPicSym()->getSaoParam()->bSaoFlag[1]=0;
     2314            }
     2315#endif
    23062316            for(Int s=0; s< uiNumSlices; s++)
    23072317            {
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r508 r524  
    517517  rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
    518518  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
     519#if HIGHER_LAYER_IRAP_SKIP_FLAG
     520  if (m_pcCfg->getSkipPictureAtArcSwitch() && m_pcCfg->getAdaptiveResolutionChange() > 0 && rpcSlice->getLayerId() == 1 && rpcSlice->getPOC() == m_pcCfg->getAdaptiveResolutionChange())
     521  {
     522    rpcSlice->setMaxNumMergeCand        ( 1 );
     523  }
     524#endif
    519525  xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() );
    520526
Note: See TracChangeset for help on using the changeset viewer.