Changeset 1130 in SHVCSoftware


Ignore:
Timestamp:
7 Jul 2015, 03:13:38 (9 years ago)
Author:
seregin
Message:

macro cleanup: M0040_ADAPTIVE_RESOLUTION_CHANGE

Location:
branches/SHM-dev/source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1128 r1130  
    16851685  ("SEITemporalMotionVectorPredictionConstraints",             m_TMVPConstraintsSEIEnabled,              0, "Control generation of TMVP constrants SEI message")
    16861686#endif
    1687 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    16881687  ("AdaptiveResolutionChange",     m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)")
    1689 #endif
    16901688#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
    16911689  ("LayerSwitchOffBegin%d", cfg_layerSwitchOffBegin, 0, MAX_LAYERS, "Switch layer %d off after given poc")
     
    43494347  }
    43504348#endif //VPS_EXTN_DIRECT_REF_LAYERS
    4351 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    4352   if (m_adaptiveResolutionChange > 0)
     4349
     4350  if( m_adaptiveResolutionChange > 0 )
    43534351  {
    43544352    xConfirmPara(m_numLayers != 2, "Adaptive resolution change works with 2 layers only");
    43554353    xConfirmPara(m_acLayerCfg[1].m_iIntraPeriod == 0 || (m_adaptiveResolutionChange % m_acLayerCfg[1].m_iIntraPeriod) != 0, "Adaptive resolution change must happen at enhancement layer RAP picture");
    43564354  }
    4357 #endif
    4358 
    4359   if (m_adaptiveResolutionChange > 0)
     4355
     4356  if( m_adaptiveResolutionChange > 0 )
    43604357  {
    43614358    xConfirmPara(m_crossLayerIrapAlignFlag != 0, "Cross layer IRAP alignment must be disabled when using adaptive resolution change.");
    43624359  }
    4363   if (m_skipPictureAtArcSwitch)
     4360
     4361  if( m_skipPictureAtArcSwitch )
    43644362  {
    43654363    xConfirmPara(m_adaptiveResolutionChange <= 0, "Skip picture at ARC switching only works when Adaptive Resolution Change is active (AdaptiveResolutionChange > 0)");
     
    44974495  printf("Auxiliary pictures                : %d\n", m_scalabilityMask[AUX_ID] );
    44984496#endif
    4499 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    45004497  printf("Adaptive Resolution Change        : %d\n", m_adaptiveResolutionChange );
    4501 #endif
    45024498  printf("Skip picture at ARC switch        : %d\n", m_skipPictureAtArcSwitch );
    45034499  printf("Align picture type                : %d\n", m_crossLayerPictureTypeAlignFlag );
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1128 r1130  
    473473  Void  xPrintUsage     ();                                   ///< print usage
    474474#if SVC_EXTENSION
    475 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    476475  Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
    477 #endif
    478476  Bool      m_skipPictureAtArcSwitch;                         ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture
    479477#if REPN_FORMAT_IN_VPS
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1128 r1130  
    787787    }
    788788
    789 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    790789    m_acTEncTop[layer].setAdaptiveResolutionChange               ( m_adaptiveResolutionChange );
    791 #endif
    792790#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
    793791    m_acTEncTop[layer].setLayerSwitchOffBegin                    (m_acLayerCfg[layer].m_layerSwitchOffBegin);
     
    17691767      }
    17701768    }
    1771 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    17721769  vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false);
    1773 #endif
    17741770  vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch);
    17751771
     
    20952091#endif
    20962092
    2097 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    2098     if (m_adaptiveResolutionChange)
     2093    if( m_adaptiveResolutionChange )
    20992094    {
    21002095      for(UInt layer = 0; layer < m_numLayers; layer++)
     
    21082103      }
    21092104    }
    2110 #endif
    21112105
    21122106    // loop through frames in one GOP
     
    25092503      TComPicYuv*  pcPicYuvRecBottom  = *(iterPicYuvRec++);
    25102504
    2511 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    2512       if (!m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed())
    2513 #else
    2514       if (!m_acLayerCfg[layer].getReconFile().empty())
    2515 #endif
     2505      if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed() )
    25162506      {
    25172507#if REPN_FORMAT_IN_VPS
     
    25382528    {
    25392529      TComPicYuv*  pcPicYuvRec  = *(iterPicYuvRec++);
    2540 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    2541       if (!m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed())
    2542 #else
    2543       if (!m_acLayerCfg[layer].getReconFile().empty())
    2544 #endif
     2530      if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed() )
    25452531      {
    25462532#if REPN_FORMAT_IN_VPS
     
    25642550    list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin();
    25652551
    2566 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    2567     for ( i = 0; i < iNumEncoded/2 && iterBitstream != accessUnits.end(); i++ )
    2568 #else
    2569     for ( i = 0; i < iNumEncoded/2; i++ )
    2570 #endif
     2552    for( i = 0; i < iNumEncoded/2 && iterBitstream != accessUnits.end(); i++ )
    25712553    {
    25722554      const AccessUnit& auTop = *(iterBitstream++);
     
    25852567    list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin();
    25862568
    2587 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    2588     for ( i = 0; i < iNumEncoded && iterBitstream != accessUnits.end(); i++ )
    2589 #else
    2590     for ( i = 0; i < iNumEncoded; i++ )
    2591 #endif
     2569    for( i = 0; i < iNumEncoded && iterBitstream != accessUnits.end(); i++ )
    25922570    {
    25932571      const AccessUnit& au = *(iterBitstream++);
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h

    r1117 r1130  
    8585#if SVC_EXTENSION
    8686  Window  m_conformanceWindow;
    87 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    8887  Bool    m_isReconstructed;
    8988#endif
    90 #endif //SVC_EXTENSION
    9189 
    9290public:
     
    106104                                   const UInt uiMaxCUHeight,
    107105                                   const UInt uiMaxCUDepth );
    108 #endif //SVC_EXTENSION
     106#endif
    109107 
    110108  Void          destroy           ();
     
    168166 
    169167#if SVC_EXTENSION
    170   Void          setHeight   ( Int iPicHeight )     { m_iPicHeight = iPicHeight; }
     168  Void          setHeight   ( Int iPicHeight )                   { m_iPicHeight = iPicHeight;              }
    171169  Window&       getConformanceWindow()                           { return  m_conformanceWindow;             }
    172170  Void          setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; }
    173 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    174   Void          setReconstructed(Bool x) { m_isReconstructed = x;    }
    175   Bool          isReconstructed()        { return m_isReconstructed; }
    176 #endif
     171  Void          setReconstructed(Bool x)                         { m_isReconstructed = x;                   }
     172  Bool          isReconstructed()                                { return m_isReconstructed;                }
    177173#if AUXILIARY_PICTURES 
    178174  Void          convertToMonochrome();
    179175#endif
    180 #endif //SVC_EXTENSION
     176#endif
     177
    181178  Void          dump( Char* pFileName, Bool bAdd, Int bitDepth );
    182179
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1128 r1130  
    481481#if SVC_EXTENSION
    482482  Int numInterLayerRPSPics = 0;
    483 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    484483  if( m_layerId > 0 && m_activeNumILRRefIdx > 0 )
    485 #else
    486   if( m_layerId > 0 )
    487 #endif
    488484  {
    489485    for( i=0; i < m_pcVPS->getNumDirectRefLayers( m_layerId ); i++ )
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1128 r1130  
    706706  UInt       m_maxTSLayerMinus1[MAX_LAYERS];
    707707#endif
    708 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    709708  Bool       m_singleLayerForNonIrapFlag;
    710 #endif
    711709  Bool       m_higherLayerIrapSkipFlag;
    712710#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     
    11281126  Void   setMaxTSLayersMinus1(Int layerIdx, UInt maxTSublayer)         { m_maxTSLayerMinus1[layerIdx] = maxTSublayer;}
    11291127#endif
    1130 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    11311128  Bool   getSingleLayerForNonIrapFlag()                             { return m_singleLayerForNonIrapFlag; }
    11321129  Void   setSingleLayerForNonIrapFlag(Bool x)                       { m_singleLayerForNonIrapFlag = x;    }
    1133 #endif
    11341130  Bool   getHigherLayerIrapSkipFlag()                             { return m_higherLayerIrapSkipFlag; }
    11351131  Void   setHigherLayerIrapSkipFlag(Bool x)                       { m_higherLayerIrapSkipFlag = x;    }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1128 r1130  
    138138#define VPS_EXTN_PROFILE_INFO            1      ///< Include profile information for layer sets in VPS extension
    139139#define VPS_EXTN_DIRECT_REF_LAYERS       1      ///< Include indication of direct dependency of layers in VPS extension
    140 #define M0040_ADAPTIVE_RESOLUTION_CHANGE 1
    141140#define R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1
    142141
     
    244243#define JCTVC_M0259_LAMBDAREFINEMENT     1      ///< JCTVC-M0259: lambda refinement (encoder only optimization)
    245244#define ENCODER_FAST_MODE                1      ///< JCTVC-L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1.
    246 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    247245#define HIGHER_LAYER_IRAP_SKIP_FLAG      1      ///< JCTVC-O0199: Indication that higher layer IRAP picture uses skip blocks only
    248 #endif
    249246#define LAYER_CTB                        0      ///< enable layer-specific CTB structure
    250247
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1128 r1130  
    34633463  vps->setCrossLayerIrapAlignFlag( false );
    34643464
    3465 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    34663465  // When single_layer_for_non_irap_flag is not present, it is inferred to be equal to 0.
    34673466  vps->setSingleLayerForNonIrapFlag( false );
    3468 #endif
    34693467
    34703468  // When higher_layer_irap_skip_flag is not present it is inferred to be equal to 0
     
    38343832#endif
    38353833
    3836 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    38373834  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
    3838 #endif
     3835
    38393836  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
    38403837
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1123 r1130  
    17111711    // Create upsampling reference layer pictures for all possible dependent layers and do it only once for the first slice.
    17121712    // Other slices might choose which reference pictures to be used for inter-layer prediction
    1713     if( m_layerId > 0 && m_uiSliceIdx == 0 )
    1714     {     
    1715 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    1716       if( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || ( pcSlice->getVPS()->getSingleLayerForNonIrapFlag() && pcSlice->isIRAP() ) )
    1717 #endif
     1713    if( m_layerId > 0 && m_uiSliceIdx == 0 && ( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || pcSlice->isIRAP() ) )
     1714    {
    17181715      for( Int i = 0; i < pcSlice->getNumILRRefIdx(); i++ )
    17191716      {
     
    18651862      pcSlice->setRefPicList( m_cListPic, false, m_cIlpPic);
    18661863    }
    1867 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    18681864    else if ( m_layerId > 0 )
    18691865    {
    18701866      pcSlice->setRefPicList( m_cListPic, false, NULL);
    18711867    }
    1872 #endif
    18731868#if MFM_ENCCONSTRAINT
    18741869    if( pcSlice->getMFMEnabledFlag() )
     
    18891884#endif
    18901885   
    1891     if( m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag() )
    1892     {
    1893 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    1894       if( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || ( pcSlice->getVPS()->getSingleLayerForNonIrapFlag() && pcSlice->isIRAP() ) )
    1895 #endif
     1886    if( m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag() && ( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || pcSlice->isIRAP() ) )
     1887    {
    18961888      for(Int dependentLayerIdx = 0; dependentLayerIdx < pcSlice->getVPS()->getNumDirectRefLayers(m_layerId); dependentLayerIdx++)
    18971889      {
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1128 r1130  
    26422642#endif
    26432643
    2644 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    26452644  WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
    2646 #endif
    26472645
    26482646  // When single_layer_for_non_irap_flag is equal to 0, higher_layer_irap_skip_flag shall be equal to 0
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1128 r1130  
    370370  UInt      m_numLayer;
    371371  Int       m_elRapSliceBEnabled;
    372 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    373372  Int       m_adaptiveResolutionChange;
    374 #endif
    375373#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
    376374  int       m_layerSwitchOffBegin;
     
    10071005#endif
    10081006#if SVC_EXTENSION
    1009   UInt      getLayerId            () { return m_layerId;              }
    1010   Void      setLayerId            (UInt layer) { m_layerId = layer; }
    1011   UInt      getNumLayer           () { return m_numLayer;             } 
    1012   Void      setNumLayer           (UInt uiNum)   { m_numLayer = uiNum;  }
     1007  UInt      getLayerId()                                     { return m_layerId;    }
     1008  Void      setLayerId( UInt layer )                         { m_layerId = layer;  }
     1009  UInt      getNumLayer()                                    { return m_numLayer;   } 
     1010  Void      setNumLayer( UInt uiNum )                        { m_numLayer = uiNum;  }
    10131011  Void      setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; }
    1014   Void      setElRapSliceTypeB(Int bEnabled) {m_elRapSliceBEnabled = bEnabled;}
    1015   Int       getElRapSliceTypeB()              {return m_elRapSliceBEnabled;}
    1016 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    1017   Void      setAdaptiveResolutionChange(Int x) { m_adaptiveResolutionChange = x;    }
    1018   Int       getAdaptiveResolutionChange()      { return m_adaptiveResolutionChange; }
    1019 #endif
     1012  Void      setElRapSliceTypeB(Int bEnabled)                 { m_elRapSliceBEnabled = bEnabled;   }
     1013  Int       getElRapSliceTypeB()                             { return m_elRapSliceBEnabled;       }
     1014  Void      setAdaptiveResolutionChange(Int x)               { m_adaptiveResolutionChange = x;    }
     1015  Int       getAdaptiveResolutionChange()                    { return m_adaptiveResolutionChange; }
    10201016#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
    10211017  Void      setLayerSwitchOffBegin(Int x)    { m_layerSwitchOffBegin = x;    }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1123 r1130  
    11051105    }
    11061106
    1107 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
     1107#if SVC_EXTENSION
    11081108    if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && ((m_layerId > 0 && pocCurr < m_pcEncTop->getAdaptiveResolutionChange()) ||
    11091109                                                          (m_layerId == 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())) )
     
    12631263    xSetLayerInitializedFlag(pcSlice);
    12641264#endif
    1265 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    12661265    if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId > 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())
    12671266    {
     
    12701269      pcSlice->setMFMEnabledFlag(false);
    12711270    }
    1272 #endif
    12731271#endif //SVC_EXTENSION
    12741272
     
    34823480    pcPic->getPicYuvRec()->copyToPic(pcPicYuvRecOut);
    34833481
    3484 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
     3482#if SVC_EXTENSION
    34853483    pcPicYuvRecOut->setReconstructed(true);
    34863484#endif
Note: See TracChangeset for help on using the changeset viewer.