Changeset 1107 in SHVCSoftware


Ignore:
Timestamp:
6 Jul 2015, 21:01:55 (9 years ago)
Author:
seregin
Message:

macro cleanup: R0235_SMALLEST_LAYER_ID

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

Legend:

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

    r1106 r1107  
    259259      }
    260260      fclose (targetDecLayerIdSetFile);
    261 #if !R0235_SMALLEST_LAYER_ID  // LayerId=0 is not required anymore in some cases
    262       if ( m_targetDecLayerIdSet.size() > 0 && !isLayerIdZeroIncluded )
    263       {
    264         fprintf(stderr, "TargetDecLayerIdSet must contain LayerId=0, aborting" );
    265         return false;
    266       }
    267 #endif
    268261    }
    269262    else
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1106 r1107  
    12841284    return true;
    12851285  }
    1286 #if R0235_SMALLEST_LAYER_ID
     1286#if SVC_EXTENSION
    12871287  if (nalu->m_layerId == 0 && (nalu->m_nalUnitType == NAL_UNIT_VPS || nalu->m_nalUnitType == NAL_UNIT_SPS || nalu->m_nalUnitType == NAL_UNIT_PPS || nalu->m_nalUnitType == NAL_UNIT_EOS))
    12881288  {
     
    12991299  return false;
    13001300}
     1301
    13011302#if ALIGNED_BUMPING
    13021303// Function outputs a picture, and marks it as not needed for output.
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1090 r1107  
    26112611#if MULTIPLE_PTL_SUPPORT
    26122612    Int olsToLsIndex = (olsCtr >= (m_numLayerSets + m_numAddLayerSets)) ? m_outputLayerSetIdx[olsCtr - (m_numLayerSets + m_numAddLayerSets)] : olsCtr;
    2613 #if R0235_SMALLEST_LAYER_ID
     2613
    26142614    // This is a fix to allow setting of PTL for additional layer sets
    26152615    if (olsCtr >= m_numLayerSets && olsCtr < (m_numLayerSets + m_numAddLayerSets))
     
    26212621      scanStringToArray(cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr]);
    26222622    }
    2623 #else
    2624     scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr] );
    2625 #endif
     2623
    26262624    //For conformance checking
    26272625    //Conformance of a layer in an output operation point associated with an OLS in a bitstream to the Scalable Main profile is indicated as follows:
     
    26302628    //If OpTid of the output operation point is equal to vps_max_sub_layer_minus1, the conformance is indicated by general_profile_idc being equal to 7 or general_profile_compatibility_flag[ 7 ] being equal to 1
    26312629    //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
    2632 #if R0235_SMALLEST_LAYER_ID
    26332630    if (m_numAddLayerSets == 0)
    26342631    {
    2635 #endif
    2636     for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++)
    2637     {
    2638       if (m_layerSetLayerIdList[olsToLsIndex][ii - 1] != 0 && m_layerSetLayerIdList[olsToLsIndex][ii] != 0)  //Profile / profile compatibility of enhancement layers must indicate the same profile.
    2639       {
    2640         assert( (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||
    2641                 (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||   
    2642                 (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) );
    2643       }
    2644     }
    2645 #if R0235_SMALLEST_LAYER_ID
    2646     }
    2647 #endif
     2632      for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++)
     2633      {
     2634        if (m_layerSetLayerIdList[olsToLsIndex][ii - 1] != 0 && m_layerSetLayerIdList[olsToLsIndex][ii] != 0)  //Profile / profile compatibility of enhancement layers must indicate the same profile.
     2635        {
     2636          assert( (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||
     2637            (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||   
     2638            (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) );
     2639        }
     2640      }
     2641    }
    26482642#endif
    26492643  }
     
    48544848#endif
    48554849
    4856 #if R0235_SMALLEST_LAYER_ID
    48574850#if OUTPUT_LAYER_SETS_CONFIG
    48584851Void TAppEncCfg::cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString)
     
    49244917}
    49254918#endif
    4926 #endif // R0235
    49274919#endif //SVC_EXTENSION
    49284920//! \}
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1090 r1107  
    576576  Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, std::vector<Int> &  returnVector);
    577577  Void cfgStringToArray(Int **arr, string const cfgString, Int const numEntries, const char* logString);
    578 #if R0235_SMALLEST_LAYER_ID
    579578  Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, Int * const returnArray);
    580579  Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, std::vector<Int> &  returnVector);
    581580  Void cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString);
    582 #endif
    583581#else
    584582  Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1105 r1107  
    869869 */
    870870#if NO_CLRAS_OUTPUT_FLAG
    871 #if R0235_SMALLEST_LAYER_ID
    872871Void TComSlice::decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, UInt smallestLayerId )
    873 #else
    874 Void TComSlice::decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag )
    875 #endif
    876872{
    877873  if( !isIRAP() )
     
    885881  // When the current picture is an IRAP picture with nuh_layer_id equal to 0 and NoClrasOutputFlag is equal to 1,
    886882  // all reference pictures with any value of nuh_layer_id currently in the DPB (if any) are marked as "unused for reference".
    887 #if R0235_SMALLEST_LAYER_ID
    888883  if (m_layerId == smallestLayerId && noClrasOutputFlag)
    889 #else
    890   if( m_layerId == 0 && noClrasOutputFlag )
    891 #endif
    892884  {
    893885    // mark all pictures for all layers as not used for reference
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1105 r1107  
    24052405  Void      checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic);
    24062406#if NO_CLRAS_OUTPUT_FLAG
    2407 #if R0235_SMALLEST_LAYER_ID
    24082407  Void      decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, UInt smallestLayerId = 0 );
    2409 #else
    2410   Void      decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag );
    2411 #endif
    24122408  Void      decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag);
    24132409#else
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1106 r1107  
    7777#define R0227_BR_PR_ADD_LAYER_SET        1      ///< JCTVC-R0227, Signalling of bit-rate and picture rate for additional layer set
    7878#define R0042_PROFILE_INDICATION         1      ///< JCTVC-R0042, Profile indication for additional layer sets
    79 #define R0235_SMALLEST_LAYER_ID          1      ///< JCTVC-R0235, SmallestLayerId semantics
    8079
    8180#define Q0108_TSA_STSA                   1      ///< JCTVC-Q0108, Remove cross-layer alignment constraints of TSA and STSA pictures, enable to have different prediction structures in different layers
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1105 r1107  
    14751475          for(Int kk = 0; kk < pcSlice->getVPS()->getNumLayersInIdList(layerSetIdxForOutputLayerSet); kk++)
    14761476          {
    1477 #if R0235_SMALLEST_LAYER_ID
    14781477            if( pcSlice->getVPS()->getNecessaryLayerFlag(ii, kk) && pcSlice->getLayerId() == pcSlice->getVPS()->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, kk) )
    1479 #else
    1480             if(pcSlice->getLayerId() == pcSlice->getVPS()->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, kk))
    1481 #endif
    14821478            {
    14831479              chkAssert=1;
     
    31023098        //If OpTid of the output operation point is equal to vps_max_sub_layer_minus1, the conformance is indicated by general_profile_idc being equal to 7 or general_profile_compatibility_flag[ 7 ] being equal to 1
    31033099        //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
    3104 #if R0235_SMALLEST_LAYER_ID
     3100
    31053101        // The assertion below is not valid for independent non-base layers
    31063102        if (vps->getNumAddLayerSets() == 0)
    31073103        {
    3108 #endif
    3109         if( j > 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j - 1) != 0 && vps->getNecessaryLayerFlag(i, j-1) )
    3110         {
    3111           assert(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc() == vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc() ||
    3112                  vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc()) || 
    3113                  vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc())  );
    3114         }
    3115 #if R0235_SMALLEST_LAYER_ID
    3116         }
    3117 #endif
     3104          if( j > 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j - 1) != 0 && vps->getNecessaryLayerFlag(i, j-1) )
     3105          {
     3106            assert(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc() == vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc() ||
     3107              vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc()) || 
     3108              vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc())  );
     3109          }
     3110        }
    31183111#endif
    31193112      }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1106 r1107  
    9191#if SVC_EXTENSION
    9292  m_layerId = 0;
    93 #if R0235_SMALLEST_LAYER_ID
    9493  m_smallestLayerId = 0;
    95 #endif
    9694#if AVC_BASE
    9795  m_pBLReconFile = NULL;
     
    736734#if OUTPUT_LAYER_SET_INDEX
    737735  // Following check should go wherever the VPS is activated
    738 #if R0235_SMALLEST_LAYER_ID
    739736  if (!m_apcSlicePilot->getVPS()->getBaseLayerAvailableFlag())
    740737  {
     
    747744    }
    748745  } 
    749 #else
    750   checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS());
    751 #endif
    752746#endif
    753747  m_apcSlicePilot->initSlice( nalu.m_layerId );
     
    876870#if NO_OUTPUT_OF_PRIOR_PICS
    877871#if NO_CLRAS_OUTPUT_FLAG
    878 #if R0235_SMALLEST_LAYER_ID
    879872  if (m_layerId == m_smallestLayerId && m_apcSlicePilot->getRapPicFlag())
    880 #else
    881   if (m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() )
    882 #endif
    883873  {
    884874    if (m_bFirstSliceInSequence)
     
    912902  }
    913903
    914 #if R0235_SMALLEST_LAYER_ID
    915904  m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag, m_smallestLayerId );
    916 #else
    917   m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag );
    918 #endif
    919905#endif
    920906
     
    20672053  m_cEntropyDecoder.decodeVPS( vps );
    20682054  m_parameterSetManagerDecoder.storePrefetchedVPS(vps);
    2069 #if R0235_SMALLEST_LAYER_ID
     2055#if SVC_EXTENSION
    20702056  checkValueOfTargetOutputLayerSetIdx(vps);
    20712057#endif
     
    22432229      TComCodingStatistics::IncrementStatisticEP(STATS__BYTE_ALIGNMENT_BITS,nalu.m_Bitstream->readByteAlignment(),0);
    22442230#endif
     2231#if SVC_EXTENSION
    22452232#if Q0177_EOS_CHECKS
    22462233      m_isLastNALWasEos = false;
     
    22652252      }
    22662253#endif
    2267 #if R0235_SMALLEST_LAYER_ID
    22682254      xDeriveSmallestLayerId(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
    22692255#endif
     
    26962682  {
    26972683    // Check if the target decoded layer is the highest layer in the list
    2698 #if R0235_SMALLEST_LAYER_ID
    26992684    assert( params->getTargetOutputLayerSetIdx() < vps->getNumOutputLayerSets() );
    2700 #endif
    27012685#if !CONFORMANCE_BITSTREAM_MODE
    27022686    assert( params->getTargetOutputLayerSetIdx() < vps->getNumLayerSets() );
     
    27052689#if !CONFORMANCE_BITSTREAM_MODE
    27062690    assert( params->getTargetLayerId() == vps->getNumLayersInIdList( layerSetIdx ) - 1);
    2707 #endif
    2708    
    2709 #if !R0235_SMALLEST_LAYER_ID
    2710     Bool layerSetMatchFlag = true;
    2711     for(Int j = 0; j < vps->getNumLayersInIdList( layerSetIdx ); j++)
    2712     {
    2713       if( vps->getLayerSetLayerIdList( layerSetIdx, j ) != j )
    2714       {
    2715         layerSetMatchFlag = false;
    2716         break;
    2717       }
    2718     }
    2719 
    2720     assert(layerSetMatchFlag);    // Signaled output layer set index does not match targetOutputLayerId.
    27212691#endif
    27222692   
     
    28032773Void TDecTop::xCheckLayerReset()
    28042774{
    2805 #if R0235_SMALLEST_LAYER_ID
    28062775  if (m_apcSlicePilot->isIRAP() && m_layerId > m_smallestLayerId)
    2807 #else
    2808   if (m_apcSlicePilot->isIRAP() && m_layerId > 0)
    2809 #endif
    28102776  {
    28112777    Bool layerResetFlag;
     
    28912857#endif
    28922858
    2893 #if R0235_SMALLEST_LAYER_ID
     2859#if SVC_EXTENSION
    28942860Void TDecTop::xDeriveSmallestLayerId(TComVPS* vps)
    28952861{
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r1103 r1107  
    133133  UInt                    m_numLayer;
    134134  TDecTop**               m_ppcTDecTop;
    135 #if R0235_SMALLEST_LAYER_ID
    136135  UInt                    m_smallestLayerId;
    137 #endif
    138136#if P0297_VPS_POC_LSB_ALIGNED_FLAG
    139137  Bool                    m_pocResettingFlag;
     
    245243  Void      setLayerDec                     (TDecTop **p)                   { m_ppcTDecTop = p;                }
    246244  TDecTop*  getLayerDec                     (UInt layerId)                  { return m_ppcTDecTop[layerId];    }
    247 #if R0235_SMALLEST_LAYER_ID
    248245  Void      xDeriveSmallestLayerId(TComVPS* vps);
    249 #endif
    250246#if VPS_EXTN_DIRECT_REF_LAYERS
    251247  TDecTop*  getRefLayerDec                  (UInt refLayerIdx);
     
    288284#if CONFORMANCE_BITSTREAM_MODE
    289285  std::vector<TComPic>* getConfListPic() {return &m_confListPic; }
    290   // std::string const getDecodedYuvLayerFileName(Int layerId) { return m_decodedYuvLayerFileName[layerId]; }
    291286  Bool const getConfModeFlag() { return m_confModeFlag; }
    292287  Void setConfModeFlag(Bool x) { m_confModeFlag = x; }
Note: See TracChangeset for help on using the changeset viewer.