Changeset 524 in SHVCSoftware


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
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.1-dev/cfg/layers.cfg

    r523 r524  
    55ScalabilityMask3              : 0           # Auxiliary pictures
    66AdaptiveResolutionChange      : 0           # Resolution change frame (0: disable)
     7SkipPictureAtArcSwitch        : 0           # Code higher layer picture as skip at ARC switching (0: disable (default), 1: enable)
    78MaxTidRefPresentFlag          : 1           # max_tid_ref_present_flag (0=not present, 1=present(default))
    89CrossLayerIrapAlignFlag       : 1           # Align IRAP across layers
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r522 r524  
    968968#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    969969  ("AdaptiveResolutionChange",     m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)")
     970#endif
     971#if HIGHER_LAYER_IRAP_SKIP_FLAG
     972  ("SkipPictureAtArcSwitch",     m_skipPictureAtArcSwitch, false, "Code the higher layer picture in ARC up-switching as a skip picture. (0: disable)")
    970973#endif
    971974#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     
    23242327  }
    23252328#endif
     2329#if HIGHER_LAYER_IRAP_SKIP_FLAG
     2330  if (m_adaptiveResolutionChange > 0)
     2331  {
     2332    xConfirmPara(m_crossLayerIrapAlignFlag != 0, "Cross layer IRAP alignment must be disabled when using adaptive resolution change.");
     2333  }
     2334  if (m_skipPictureAtArcSwitch)
     2335  {
     2336    xConfirmPara(m_adaptiveResolutionChange <= 0, "Skip picture at ARC switching only works when Adaptive Resolution Change is active (AdaptiveResolutionChange > 0)");
     2337  }
     2338#endif
    23262339#if N0120_MAX_TID_REF_CFG
    23272340  for (UInt layer=0; layer < MAX_LAYERS-1; layer++)
     
    24262439#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    24272440  printf("Adaptive Resolution Change    : %d\n", m_adaptiveResolutionChange );
     2441#endif
     2442#if HIGHER_LAYER_IRAP_SKIP_FLAG
     2443  printf("Skip picture at ARC switch    : %d\n", m_skipPictureAtArcSwitch );
    24282444#endif
    24292445#if N0147_IRAP_ALIGN_FLAG
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h

    r522 r524  
    377377  Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
    378378#endif
     379#if HIGHER_LAYER_IRAP_SKIP_FLAG
     380  Bool      m_skipPictureAtArcSwitch;                         ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture
     381#endif
    379382#if REPN_FORMAT_IN_VPS
    380383  RepFormatCfg m_repFormatCfg[16];                            ///< Rep_format structures
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r522 r524  
    170170    repFormat->setBitDepthVpsLuma           ( getInternalBitDepthY()                        );  // Need modification to change for each layer
    171171    repFormat->setBitDepthVpsChroma         ( getInternalBitDepthC()                        );  // Need modification to change for each layer
     172#endif
     173#if HIGHER_LAYER_IRAP_SKIP_FLAG
     174    m_acTEncTop[mapIdxToLayer[idx]].setSkipPictureAtArcSwitch( m_skipPictureAtArcSwitch );
    172175#endif
    173176  }
     
    13611364#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    13621365  vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false);
     1366#endif
     1367#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1368  vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch);
    13631369#endif
    13641370#if !VPS_EXTN_OFFSET_CALC
  • 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.