Changeset 1128 in SHVCSoftware


Ignore:
Timestamp:
7 Jul 2015, 02:58:30 (9 years ago)
Author:
seregin
Message:

macro cleanup: HIGHER_LAYER_IRAP_SKIP_FLAG, HIGHER_LAYER_IRAP_SKIP_FLAG (keep it for encoder only)

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

Legend:

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

    r1126 r1128  
    11691169  ("CrossLayerPictureTypeAlignFlag",                 m_crossLayerPictureTypeAlignFlag,                   true, "align picture type across layers" ) 
    11701170  ("CrossLayerIrapAlignFlag",                        m_crossLayerIrapAlignFlag,                          true, "align IRAP across layers" ) 
    1171 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    11721171  ("CrossLayerAlignedIdrOnlyFlag",                   m_crossLayerAlignedIdrOnlyFlag,                     true, "only idr for IRAP across layers" ) 
    1173 #endif
    11741172#if O0194_WEIGHTED_PREDICTION_CGS
    11751173  ("InterLayerWeightedPred",                          m_useInterLayerWeightedPred,                       false, "enable IL WP parameters estimation at encoder" ) 
     
    16941692  ("LayerSwitchOffEnd%d", cfg_layerSwitchOffEnd, 0, MAX_LAYERS, "Switch layer %d on at given poc")
    16951693#endif
    1696 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    16971694  ("SkipPictureAtArcSwitch",     m_skipPictureAtArcSwitch, false, "Code the higher layer picture in ARC up-switching as a skip picture. (0: disable)")
    1698 #endif
    16991695#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    17001696  ("SEIInterLayerConstrainedTileSets", m_interLayerConstrainedTileSetsSEIEnabled, false, "Control generation of inter layer constrained tile sets SEI message")
     
    43604356  }
    43614357#endif
    4362 #if HIGHER_LAYER_IRAP_SKIP_FLAG
     4358
    43634359  if (m_adaptiveResolutionChange > 0)
    43644360  {
     
    43694365    xConfirmPara(m_adaptiveResolutionChange <= 0, "Skip picture at ARC switching only works when Adaptive Resolution Change is active (AdaptiveResolutionChange > 0)");
    43704366  }
    4371 #endif
     4367
    43724368  if( layerIdx < MAX_LAYERS-1 )
    43734369  {
     
    45044500  printf("Adaptive Resolution Change        : %d\n", m_adaptiveResolutionChange );
    45054501#endif
    4506 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    45074502  printf("Skip picture at ARC switch        : %d\n", m_skipPictureAtArcSwitch );
    4508 #endif
    45094503  printf("Align picture type                : %d\n", m_crossLayerPictureTypeAlignFlag );
    45104504  printf("Cross layer IRAP alignment        : %d\n", m_crossLayerIrapAlignFlag );
    4511 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    45124505  printf("IDR only for IRAP                 : %d\n", m_crossLayerAlignedIdrOnlyFlag );
    4513 #endif
    45144506#if O0194_WEIGHTED_PREDICTION_CGS
    45154507  printf("InterLayerWeightedPred            : %d\n", m_useInterLayerWeightedPred );
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1126 r1128  
    476476  Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
    477477#endif
    478 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    479478  Bool      m_skipPictureAtArcSwitch;                         ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture
    480 #endif
    481479#if REPN_FORMAT_IN_VPS
    482480  RepFormatCfg m_repFormatCfg[16];                            ///< Rep_format structures
     
    515513  Bool                                m_overlayInfoPersistenceFlag;
    516514#endif
    517 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    518515  Bool      m_crossLayerAlignedIdrOnlyFlag;
    519 #endif
    520516#if O0149_CROSS_LAYER_BLA_FLAG
    521517  Bool      m_crossLayerBLAFlag;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1126 r1128  
    188188                                                                            m_acLayerCfg[mapIdxToLayer[idx]].m_confWinBottom );
    189189
    190 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    191190    m_acTEncTop[mapIdxToLayer[idx]].setSkipPictureAtArcSwitch             ( m_skipPictureAtArcSwitch );
    192 #endif
    193191  }
    194192  delete [] mapIdxToLayer;
     
    17551753#endif
    17561754    vps->setCrossLayerPictureTypeAlignFlag( m_crossLayerPictureTypeAlignFlag );
    1757 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    17581755    vps->setCrossLayerAlignedIdrOnlyFlag( m_crossLayerAlignedIdrOnlyFlag );
    1759 #endif
    17601756    vps->setCrossLayerIrapAlignFlag( m_crossLayerIrapAlignFlag );
    17611757    for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
     
    17761772  vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false);
    17771773#endif
    1778 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    17791774  vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch);
    1780 #endif
    17811775
    17821776  for (Int k = 0; k < MAX_VPS_LAYER_SETS_PLUS1; k++)
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1126 r1128  
    20522052  m_crossLayerPictureTypeAlignFlag = true;
    20532053  m_crossLayerIrapAlignFlag = true;
    2054 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    20552054  m_crossLayerAlignedIdrOnlyFlag = false;
    2056 #endif
    20572055  m_maxTidRefPresentFlag = true;
    20582056  for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1 - 1; i++)
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1126 r1128  
    699699  Bool       m_crossLayerPictureTypeAlignFlag;
    700700  Bool       m_crossLayerIrapAlignFlag;
    701 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    702701  Bool       m_crossLayerAlignedIdrOnlyFlag;
    703 #endif
    704702  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_IDX_PLUS1 - 1][MAX_VPS_LAYER_IDX_PLUS1];
    705703  Bool       m_maxTidRefPresentFlag;
     
    711709  Bool       m_singleLayerForNonIrapFlag;
    712710#endif
    713 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    714711  Bool       m_higherLayerIrapSkipFlag;
    715 #endif
    716712#if VPS_VUI_TILES_NOT_IN_USE__FLAG
    717713  Bool       m_tilesNotInUseFlag;
     
    11061102  Void   setProfileLevelTierIdx(Int i, Int x)                 { m_profileLevelTierIdx[i] = x   ; }
    11071103#endif
    1108   Bool   getMaxOneActiveRefLayerFlag()                                          { return m_maxOneActiveRefLayerFlag;                      }
    1109   Void   setMaxOneActiveRefLayerFlag(Bool x)                                    { m_maxOneActiveRefLayerFlag = x;                         }
     1104  Bool   getMaxOneActiveRefLayerFlag()                                          { return m_maxOneActiveRefLayerFlag;             }
     1105  Void   setMaxOneActiveRefLayerFlag(Bool x)                                    { m_maxOneActiveRefLayerFlag = x;                }
    11101106#if O0062_POC_LSB_NOT_PRESENT_FLAG
    1111   UInt   getPocLsbNotPresentFlag(Int i)                                         { return m_pocLsbNotPresentFlag[i]; }
    1112   Void   setPocLsbNotPresentFlag(Int i, Bool x)                                 { m_pocLsbNotPresentFlag[i] = x;    }
     1107  UInt   getPocLsbNotPresentFlag(Int i)                                         { return m_pocLsbNotPresentFlag[i];              }
     1108  Void   setPocLsbNotPresentFlag(Int i, Bool x)                                 { m_pocLsbNotPresentFlag[i] = x;                 }
    11131109#endif
    11141110#if P0297_VPS_POC_LSB_ALIGNED_FLAG
    1115   Bool   getVpsPocLsbAlignedFlag()                                              { return m_vpsPocLsbAlignedFlag; }
    1116   Void   setVpsPocLsbAlignedFlag(Bool x)                                        { m_vpsPocLsbAlignedFlag = x; }
    1117 #endif
    1118   Bool   getCrossLayerPictureTypeAlignFlag()                                    { return m_crossLayerPictureTypeAlignFlag;                      }
    1119   Void   setCrossLayerPictureTypeAlignFlag(Bool x)                              { m_crossLayerPictureTypeAlignFlag = x;                         }
    1120 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    1121   Bool   getCrossLayerAlignedIdrOnlyFlag()                                    { return m_crossLayerAlignedIdrOnlyFlag;                      }
    1122   Void   setCrossLayerAlignedIdrOnlyFlag(Bool x)                              { m_crossLayerAlignedIdrOnlyFlag = x;                         }
    1123 #endif
    1124   Bool   getCrossLayerIrapAlignFlag()                                           { return m_crossLayerIrapAlignFlag;                      }
    1125   Void   setCrossLayerIrapAlignFlag(Bool x)                                     { m_crossLayerIrapAlignFlag = x;                         }
     1111  Bool   getVpsPocLsbAlignedFlag()                                              { return m_vpsPocLsbAlignedFlag;                 }
     1112  Void   setVpsPocLsbAlignedFlag(Bool x)                                        { m_vpsPocLsbAlignedFlag = x;                    }
     1113#endif
     1114  Bool   getCrossLayerPictureTypeAlignFlag()                                    { return m_crossLayerPictureTypeAlignFlag;       }
     1115  Void   setCrossLayerPictureTypeAlignFlag(Bool x)                              { m_crossLayerPictureTypeAlignFlag = x;          }
     1116  Bool   getCrossLayerAlignedIdrOnlyFlag()                                      { return m_crossLayerAlignedIdrOnlyFlag;         }
     1117  Void   setCrossLayerAlignedIdrOnlyFlag(Bool x)                                { m_crossLayerAlignedIdrOnlyFlag = x;            }
     1118  Bool   getCrossLayerIrapAlignFlag()                                           { return m_crossLayerIrapAlignFlag;              }
     1119  Void   setCrossLayerIrapAlignFlag(Bool x)                                     { m_crossLayerIrapAlignFlag = x;                 }
    11261120  UInt   getMaxTidIlRefPicsPlus1(Int refLayerIdx, Int layerIdx)                     { return m_maxTidIlRefPicsPlus1[refLayerIdx][layerIdx];           }
    11271121  Void   setMaxTidIlRefPicsPlus1(Int refLayerIdx, Int layerIdx, UInt maxSublayer)   { m_maxTidIlRefPicsPlus1[refLayerIdx][layerIdx] = maxSublayer;    }
     
    11381132  Void   setSingleLayerForNonIrapFlag(Bool x)                       { m_singleLayerForNonIrapFlag = x;    }
    11391133#endif
    1140 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    11411134  Bool   getHigherLayerIrapSkipFlag()                             { return m_higherLayerIrapSkipFlag; }
    11421135  Void   setHigherLayerIrapSkipFlag(Bool x)                       { m_higherLayerIrapSkipFlag = x;    }
    1143 #endif
    11441136#if VPS_VUI_TILES_NOT_IN_USE__FLAG 
    11451137  Bool   getTilesNotInUseFlag()         { return m_tilesNotInUseFlag; }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1126 r1128  
    144144#define VPS_VUI_WPP_NOT_IN_USE__FLAG     1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
    145145#define N0160_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
    146 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
    147 #define HIGHER_LAYER_IRAP_SKIP_FLAG      1      ///< JCTVC-O0199: Indication that higher layer IRAP picture uses skip blocks only
    148 #endif
     146
    149147#define VPS_VUI_VIDEO_SIGNAL             1      ///< JCTVC-O0118 video signal information
    150148#if VPS_VUI_VIDEO_SIGNAL
     
    168166#define P0079_DERIVE_NUMACTIVE_REF_PICS  1      ///< JCTVC-P0079 Modification of derivation of variable NumActiveRefLayerPics
    169167#define Q0060_MAX_TID_REF_EQUAL_TO_ZERO  1      ///< JCTVC-Q0060 handling the case max_tid_il_ref_pics_plus1 is equal to 0.
    170 
    171 #define P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG   1  ///< a flag to indicatate whether picture types for IRAP are IDR across layers.
    172168
    173169#define VIEW_ID_RELATED_SIGNALING        1      ///< Introduce syntax elements view_id and view_id_val
     
    248244#define JCTVC_M0259_LAMBDAREFINEMENT     1      ///< JCTVC-M0259: lambda refinement (encoder only optimization)
    249245#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
     247#define HIGHER_LAYER_IRAP_SKIP_FLAG      1      ///< JCTVC-O0199: Indication that higher layer IRAP picture uses skip blocks only
     248#endif
    250249#define LAYER_CTB                        0      ///< enable layer-specific CTB structure
    251250
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1126 r1128  
    34683468#endif
    34693469
    3470 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    34713470  // When higher_layer_irap_skip_flag is not present it is inferred to be equal to 0
    34723471  vps->setHigherLayerIrapSkipFlag( false );
    3473 #endif
    34743472}
    34753473
     
    36623660  READ_FLAG(uiCode, "cross_layer_pic_type_aligned_flag" );
    36633661  vps->setCrossLayerPictureTypeAlignFlag(uiCode);
    3664   if (!uiCode)
     3662
     3663  if( !uiCode )
    36653664  {
    36663665    READ_FLAG(uiCode, "cross_layer_irap_aligned_flag" );
     
    36723671  }
    36733672
    3674 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    3675   if( uiCode )
     3673  if( vps->getCrossLayerIrapAlignFlag() )
    36763674  {
    36773675    READ_FLAG( uiCode, "all_layers_idr_aligned_flag" );
    36783676    vps->setCrossLayerAlignedIdrOnlyFlag(uiCode);
    36793677  }
    3680 #endif
    36813678
    36823679  READ_FLAG( uiCode,        "bit_rate_present_vps_flag" );  vps->setBitRatePresentVpsFlag( uiCode ? true : false );
     
    38403837  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
    38413838#endif
    3842 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    38433839  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
    38443840
     
    38483844    assert( !vps->getHigherLayerIrapSkipFlag() );
    38493845  }
    3850 #endif
    38513846#if N0160_VUI_EXT_ILP_REF
    38523847  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); vps->setIlpRestrictedRefLayersFlag( uiCode == 1 );
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp

    r1029 r1128  
    302302  }
    303303 
    304 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    305   if (pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->getLayerId() > 0)
     304#if SVC_EXTENSION
     305  // Check CU skip for higher layer IRAP skip flag
     306  if( pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->getLayerId() > 0 )
    306307  {
    307308    Bool lowerLayerExist = false;
     
    313314      }
    314315    }
    315     if(lowerLayerExist)
    316     {
    317       assert(pcCU->isSkipped(uiAbsPartIdx));
     316
     317    if( lowerLayerExist && !pcCU->isSkipped(uiAbsPartIdx) )
     318    {
     319      printf( "Warning: CU is not skipped with enabled higher layer IRAP skip flag\n" );
    318320    }
    319321  }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1126 r1128  
    25182518  else
    25192519  {
    2520     vps->setCrossLayerIrapAlignFlag(vps->getVpsVuiPresentFlag()); // When not present, the value of cross_layer_irap_aligned_flag is inferred to be equal to vps_vui_present_flag
    2521   }
    2522 
    2523 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    2524   if(vps->getCrossLayerIrapAlignFlag())
     2520    // When not present, the value of cross_layer_irap_aligned_flag is inferred to be equal to vps_vui_present_flag,
     2521    // i.e. it is true in this function
     2522    vps->setCrossLayerIrapAlignFlag( true );
     2523  }
     2524
     2525  if( vps->getCrossLayerIrapAlignFlag() )
    25252526  {
    25262527    WRITE_FLAG(vps->getCrossLayerAlignedIdrOnlyFlag(), "all_layers_idr_aligned_flag");
    25272528  }
    2528 #endif
    25292529
    25302530  WRITE_FLAG( vps->getBitRatePresentVpsFlag(),        "bit_rate_present_vps_flag" );
     
    26452645  WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
    26462646#endif
    2647 #if HIGHER_LAYER_IRAP_SKIP_FLAG
     2647
    26482648  // When single_layer_for_non_irap_flag is equal to 0, higher_layer_irap_skip_flag shall be equal to 0
    26492649  if( !vps->getSingleLayerForNonIrapFlag() )
     
    26532653
    26542654  WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" );
    2655 #endif
     2655
    26562656#if N0160_VUI_EXT_ILP_REF
    26572657  WRITE_FLAG( vps->getIlpRestrictedRefLayersFlag() ? 1 : 0 , "ilp_restricted_ref_layers_flag" );   
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1124 r1128  
    378378#endif
    379379  Bool      m_altOutputLayerFlag;
    380 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    381380  Int       m_skipPictureAtArcSwitch;
    382 #endif
    383381#if O0149_CROSS_LAYER_BLA_FLAG
    384382  Bool      m_crossLayerBLAFlag;
     
    10261024  Int       getLayerSwitchOffEnd()           { return m_layerSwitchOffEnd;   }
    10271025#endif
    1028 #if HIGHER_LAYER_IRAP_SKIP_FLAG
    10291026  Void      setSkipPictureAtArcSwitch(Int x) { m_skipPictureAtArcSwitch = x;    }
    10301027  Int       getSkipPictureAtArcSwitch()      { return m_skipPictureAtArcSwitch; }
    1031 #endif
    10321028#if AUXILIARY_PICTURES
    10331029  Void         setChromaFormatIDC(ChromaFormat x) { m_chromaFormatIDC = x;    }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r1065 r1128  
    550550  rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
    551551  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
     552
    552553#if HIGHER_LAYER_IRAP_SKIP_FLAG
    553   if (m_pcCfg->getSkipPictureAtArcSwitch() && m_pcCfg->getAdaptiveResolutionChange() > 0 && rpcSlice->getLayerId() == 1 && rpcSlice->getPOC() == m_pcCfg->getAdaptiveResolutionChange())
     554  if( m_pcCfg->getSkipPictureAtArcSwitch() && m_pcCfg->getAdaptiveResolutionChange() > 0 && rpcSlice->getLayerId() == 1 && rpcSlice->getPOC() == m_pcCfg->getAdaptiveResolutionChange() )
    554555  {
    555556    rpcSlice->setMaxNumMergeCand        ( 1 );
    556557  }
    557558#endif
     559
    558560  xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() );
    559561
Note: See TracChangeset for help on using the changeset viewer.