Changeset 1116 in SHVCSoftware


Ignore:
Timestamp:
7 Jul 2015, 01:18:46 (9 years ago)
Author:
seregin
Message:

macro cleanup: VPS_AVC_BL_FLAG_REMOVAL

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1107 r1116  
    14821482
    14831483      // pcPic is statically created for the external (AVC) base layer, no need to delete it
    1484 #if VPS_AVC_BL_FLAG_REMOVAL
    14851484      if( !m_acTDecTop[layerIdx].getParameterSetManager()->getActiveVPS()->getNonHEVCBaseLayerFlag() || layerIdx )
    1486 #else
    1487       if( !m_acTDecTop[layerIdx].getParameterSetManager()->getActiveVPS()->getAvcBaseLayerFlag() || layerIdx )
    1488 #endif
    14891485      {
    14901486        delete pcPic;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1107 r1116  
    108108: m_pBitstreamFile()
    109109#if AVC_BASE
    110 #if VPS_AVC_BL_FLAG_REMOVAL
    111110, m_nonHEVCBaseLayerFlag(0)
    112 #else
    113 , m_avcBaseLayerFlag(0)
    114 #endif
    115111#endif
    116112, m_maxTidRefPresentFlag(1)
     
    11821178#endif
    11831179#if AVC_BASE
    1184 #if VPS_AVC_BL_FLAG_REMOVAL
    11851180  ("NonHEVCBase,-nonhevc",                            m_nonHEVCBaseLayerFlag,                                0, "BL is available but not internal")
    1186 #else
    1187   ("AvcBase,-avc",                                    m_avcBaseLayerFlag,                                    0, "avc_base_layer_flag")
    1188 #endif
    11891181  ("InputBLFile,-ibl",                                cfg_BLInputFile,                              string(""), "Base layer rec YUV input file name")
    11901182#endif
     
    17931785#if SVC_EXTENSION
    17941786#if AVC_BASE
    1795 #if VPS_AVC_BL_FLAG_REMOVAL
    17961787  if( m_nonHEVCBaseLayerFlag )
    1797 #else
    1798   if( m_avcBaseLayerFlag )
    1799 #endif
    18001788  {
    18011789    *cfg_InputFile[0] = cfg_BLInputFile;
     
    34993487 
    35003488  // it can be updated after AVC BL support will be added to the WD
    3501 #if VPS_AVC_BL_FLAG_REMOVAL
    35023489  if( m_nonHEVCBaseLayerFlag )
    3503 #else
    3504   if( m_avcBaseLayerFlag )
    3505 #endif
    35063490  {
    35073491    m_crossLayerIrapAlignFlag = false;
     
    45144498  printf("Scalable                          : %d\n", m_scalabilityMask[SCALABILITY_ID] );
    45154499#if AVC_BASE
    4516 #if VPS_AVC_BL_FLAG_REMOVAL
    45174500  printf("Base layer                        : %s\n", m_nonHEVCBaseLayerFlag ? "Non-HEVC" : "HEVC");
    4518 #else
    4519   printf("Base layer                        : %s\n", m_avcBaseLayerFlag ? "AVC" : "HEVC");
    4520 #endif
    45214501#endif
    45224502#if AUXILIARY_PICTURES
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1107 r1116  
    7070  Int       m_framesToBeEncoded;                              ///< number of encoded frames
    7171#if AVC_BASE
    72 #if VPS_AVC_BL_FLAG_REMOVAL
    7372  Int       m_nonHEVCBaseLayerFlag;                           ///< non HEVC BL
    74 #else
    75   Int       m_avcBaseLayerFlag;                               ///< avc_baselayer_flag
    76 #endif
    7773#endif
    7874  Bool      m_maxTidRefPresentFlag;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1110 r1116  
    291291#if REF_IDX_MFM
    292292#if AVC_BASE
    293 #if VPS_AVC_BL_FLAG_REMOVAL
    294293    m_acTEncTop[layer].setMFMEnabledFlag                                  (layer == 0 ? false : ( m_nonHEVCBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());
    295 #else
    296     m_acTEncTop[layer].setMFMEnabledFlag                                  (layer == 0 ? false : ( m_avcBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());
    297 #endif
    298294#else
    299295    m_acTEncTop[layer].setMFMEnabledFlag                                  (layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) );
     
    13711367#if VPS_EXTN_MASK_AND_DIM_INFO
    13721368#if AVC_BASE
    1373 #if VPS_AVC_BL_FLAG_REMOVAL
    13741369  vps->setNonHEVCBaseLayerFlag( m_nonHEVCBaseLayerFlag );
    13751370  if ( m_nonHEVCBaseLayerFlag )
     
    13771372    vps->setBaseLayerInternalFlag (false);
    13781373  }
    1379 #else
    1380   vps->setAvcBaseLayerFlag(m_avcBaseLayerFlag);
    1381 #endif
    13821374#else
    13831375  vps->setAvcBaseLayerFlag(false);
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1113 r1116  
    20222022
    20232023#if VPS_EXTN_MASK_AND_DIM_INFO
    2024 #if VPS_AVC_BL_FLAG_REMOVAL
    20252024  m_nonHEVCBaseLayerFlag = false;
    2026 #else
    2027   m_avcBaseLayerFlag = false;
    2028 #endif
    20292025  m_splittingFlag = false;
    20302026  ::memset(m_scalabilityMask, 0, sizeof(m_scalabilityMask));
     
    37123708  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
    37133709  {
    3714 #if VPS_AVC_BL_FLAG_REMOVAL
    37153710    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
    3716 #else
    3717     if( layerId == 0 && vps->getAvcBaseLayerFlag() )
    3718 #endif
    37193711#else
    37203712  if ( layerId == 0 )
     
    37553747  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
    37563748  {
    3757 #if VPS_AVC_BL_FLAG_REMOVAL
    37583749    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
    3759 #else
    3760     if( layerId == 0 && vps->getAvcBaseLayerFlag() )
    3761 #endif
    37623750#else
    37633751  if ( layerId == 0 )
     
    38073795  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
    38083796  {
    3809 #if VPS_AVC_BL_FLAG_REMOVAL
    38103797    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
    3811 #else
    3812     if( layerId == 0 && vps->getAvcBaseLayerFlag() )
    3813 #endif
    38143798#else
    38153799  if ( layerId == 0 )
     
    38543838  {
    38553839#endif
    3856 #if VPS_AVC_BL_FLAG_REMOVAL
    38573840    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
    3858 #else
    3859     if( layerId == 0 && vps->getAvcBaseLayerFlag() )
    3860 #endif
    38613841    {
    38623842      retVal = vps->getVpsRepFormat(layerId)->getBitDepthVpsLuma();
     
    38963876  {
    38973877#endif
    3898 #if VPS_AVC_BL_FLAG_REMOVAL
    38993878    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
    3900 #else
    3901     if( layerId == 0 && vps->getAvcBaseLayerFlag() )
    3902 #endif
    39033879    {
    39043880      retVal = vps->getVpsRepFormat(layerId)->getBitDepthVpsChroma();
     
    39443920  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
    39453921  {
    3946 #if VPS_AVC_BL_FLAG_REMOVAL
    39473922    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
    3948 #else
    3949     if( layerId == 0 && vps->getAvcBaseLayerFlag() )
    3950 #endif
    39513923#else
    39523924  if ( layerId == 0 )
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1114 r1116  
    631631  // ------------------------------------------
    632632#if VPS_EXTN_MASK_AND_DIM_INFO
    633 #if VPS_AVC_BL_FLAG_REMOVAL
    634633  Bool       m_nonHEVCBaseLayerFlag;
    635 #else
    636   Bool       m_avcBaseLayerFlag;                                // For now, always set to true.
    637 #endif
    638634  Bool       m_splittingFlag;
    639635  Bool       m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES];
     
    10101006  Void    setNumLayerSets(UInt v)                               { m_numLayerSets = v;    }
    10111007#if VPS_EXTN_MASK_AND_DIM_INFO
    1012 #if VPS_AVC_BL_FLAG_REMOVAL
    10131008  Bool   getNonHEVCBaseLayerFlag()                              { return m_nonHEVCBaseLayerFlag;   }
    10141009  Void   setNonHEVCBaseLayerFlag(Bool x)                        { m_nonHEVCBaseLayerFlag = x;      }
    1015 #else
    1016   Bool   getAvcBaseLayerFlag()                                  { return m_avcBaseLayerFlag;       }
    1017   Void   setAvcBaseLayerFlag(Bool x)                            { m_avcBaseLayerFlag = x;          }
    1018 #endif
    10191010
    10201011  Bool   getSplittingFlag()                                     { return m_splittingFlag;          }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1115 r1116  
    4848#define INFERENCE_POC_MSB_VAL_PRESENT    1      ///< JCTVC-Q0146 -- poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0
    4949#define NON_REF_NAL_TYPE_DISCARDABLE     1      ///< JCTVC-P0041 -- If discardable picture is a non-IRAP, it must be a non-referenced sub-layer picture
    50 #define VPS_AVC_BL_FLAG_REMOVAL          1      ///< remove avc_base_layer_flag and direct the function its offer to vps_base_layer_internal_flag and vps_base_layer_available_flag
    5150#define VPS_RESERVED_FLAGS               1      ///< vps_base_layer_internal_flag and vps_base_layer_available_flag
    5251#define VPS_VUI_VST_PARAMS               1      ///< JCTVC-R0227: Related to signalling of VST parameters of the base layer.
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1115 r1116  
    10031003  READ_FLAG( uiCode, "vps_base_layer_internal_flag");             pcVPS->setBaseLayerInternalFlag( uiCode ? true : false );
    10041004  READ_FLAG( uiCode, "vps_base_layer_available_flag");            pcVPS->setBaseLayerAvailableFlag( uiCode ? true : false );
    1005 #if VPS_AVC_BL_FLAG_REMOVAL
    10061005  pcVPS->setNonHEVCBaseLayerFlag( (pcVPS->getBaseLayerAvailableFlag() && !pcVPS->getBaseLayerInternalFlag()) ? true : false);
    1007 #endif
    10081006#else
    10091007  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     
    27222720  UInt numScalabilityTypes = 0, i = 0, j = 0;
    27232721
    2724 #if !VPS_AVC_BL_FLAG_REMOVAL
    2725   READ_FLAG( uiCode, "avc_base_layer_flag" ); vps->setAvcBaseLayerFlag(uiCode ? true : false);
    2726 #endif
    2727 
    27282722  READ_FLAG( uiCode, "splitting_flag" ); vps->setSplittingFlag(uiCode ? true : false);
    27292723
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1111 r1116  
    498498
    499499    // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0
    500 #if VPS_AVC_BL_FLAG_REMOVAL
    501500    if( activeVPS->getNonHEVCBaseLayerFlag() )
    502 #else
    503     if( activeVPS->getAvcBaseLayerFlag() )
    504 #endif
    505501    {
    506502      assert( refLayerId > 0 );
     
    531527
    532528    // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0
    533 #if VPS_AVC_BL_FLAG_REMOVAL
    534529    if( activeVPS->getNonHEVCBaseLayerFlag() )
    535 #else
    536     if( activeVPS->getAvcBaseLayerFlag() )
    537 #endif
    538530    {
    539531      assert( refLayerId > 0 );
     
    561553
    562554#if AVC_BASE
    563 #if VPS_AVC_BL_FLAG_REMOVAL
    564555  if( activeVPS->getNonHEVCBaseLayerFlag() )
    565 #else
    566   if( activeVPS->getAvcBaseLayerFlag() )
    567 #endif
    568556  {
    569557    TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
     
    13891377  {
    13901378#if AVC_BASE
    1391 #if VPS_AVC_BL_FLAG_REMOVAL
    13921379    if( m_layerId > 0 && m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getNonHEVCBaseLayerFlag() )
    1393 #else
    1394     if( m_layerId > 0 && m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
    1395 #endif
    13961380    {
    13971381      TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
     
    17481732        UInt refLayerId = pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc);
    17491733#if AVC_BASE
    1750 #if VPS_AVC_BL_FLAG_REMOVAL
    17511734        if( refLayerId == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getNonHEVCBaseLayerFlag() )
    1752 #else
    1753         if( refLayerId == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getAvcBaseLayerFlag() )
    1754 #endif
    17551735        {         
    17561736          TComPic* pic = *m_ppcTDecTop[0]->getListPic()->begin();
     
    18641844        UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);
    18651845#if AVC_BASE
    1866 #if VPS_AVC_BL_FLAG_REMOVAL
    18671846        if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getNonHEVCBaseLayerFlag() )
    1868 #else
    1869         if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getAvcBaseLayerFlag() )
    1870 #endif
    18711847        {
    18721848          pcSlice->setBaseColPic ( refLayerIdc, *m_ppcTDecTop[0]->getListPic()->begin() );
     
    22332209#endif
    22342210#if AVC_BASE
    2235 #if VPS_AVC_BL_FLAG_REMOVAL
    22362211      if( m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getNonHEVCBaseLayerFlag() )
    2237 #else
    2238       if( m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
    2239 #endif
    22402212      {
    22412213        if( !m_ppcTDecTop[0]->getBLReconFile()->good() )
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1115 r1116  
    20052005#if VPS_EXTN_MASK_AND_DIM_INFO
    20062006  UInt i = 0, j = 0;
    2007 #if !VPS_AVC_BL_FLAG_REMOVAL
    2008   WRITE_FLAG( vps->getAvcBaseLayerFlag(),              "avc_base_layer_flag" );
    2009 #endif
    20102007
    20112008  WRITE_FLAG( vps->getSplittingFlag(),                 "splitting_flag" );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1094 r1116  
    12901290      // inferring of the scaling list can be moved to the config file
    12911291      UInt refLayerId = 0;
    1292 #if VPS_AVC_BL_FLAG_REMOVAL
    12931292      if( m_layerId > 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
    1294 #else
    1295       if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
    1296 #endif
    12971293      {
    12981294        m_pcEncTop->getSPS()->setInferScalingListFlag( true );
     
    13241320      // inferring of the scaling list can be moved to the config file
    13251321      UInt refLayerId = 0;
    1326 #if VPS_AVC_BL_FLAG_REMOVAL
    13271322      if( m_layerId > 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
    1328 #else
    1329       if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
    1330 #endif
    13311323      {
    13321324        m_pcEncTop->getSPS()->setInferScalingListFlag( true );
     
    22922284
    22932285#if AVC_BASE
    2294 #if VPS_AVC_BL_FLAG_REMOVAL
    22952286    if( m_layerId == 0 && m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() )
    2296 #else
    2297     if( m_layerId == 0 && m_pcEncTop->getVPS()->getAvcBaseLayerFlag() )
    2298 #endif
    22992287    {
    23002288      pcPic->getPicYuvOrg()->copyToPic( pcPic->getPicYuvRec() );
     
    23882376      OutputNALUnit nalu( NAL_UNIT_VPS, 0, 0 ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0.
    23892377#if AVC_BASE
    2390 #if VPS_AVC_BL_FLAG_REMOVAL
    23912378      if( ( m_layerId > 0 && m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) )
    2392 #else
    2393       if( ( m_layerId > 0 && m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) )
    2394 #endif
    23952379#else
    23962380      if( m_layerId == 0 )
Note: See TracChangeset for help on using the changeset viewer.