Changeset 942 in SHVCSoftware


Ignore:
Timestamp:
30 Dec 2014, 20:36:14 (10 years ago)
Author:
seregin
Message:

code clean up

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

Legend:

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

    r941 r942  
    840840 
    841841  // Profile and level
    842 #if !MULTIPLE_PTL_SUPPORT
    843   ("Profile", m_profile,   Profile::NONE, "Profile to be used when encoding (Incomplete)")
    844   ("Level",   m_level,     Level::NONE,   "Level limit to be used, eg 5.1 (Incomplete)")
    845   ("Tier",    m_levelTier, Level::MAIN,   "Tier to use for interpretation of --Level")
    846 
    847   ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive")
    848   ("InterlacedSource",  m_interlacedSourceFlag,  false, "Indicate that source is interlaced")
    849   ("NonPackedSource",   m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing")
    850   ("FrameOnly",         m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames")
    851 #else
     842#if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT
    852843  ("NumProfileTierLevel", m_numPTLInfo, 2, "Number of Profile, Tier and Level information")
    853844  ("Profile%d", m_profileList,   Profile::NONE, NUM_POSSIBLE_LEVEL, "Profile to be used when encoding (Incomplete)")
     
    862853  ("LayerPTLIndex%d", m_layerPTLIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer")
    863854  ("ListOfProfileTierLevelOls%d", cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_LAYER_ID_PLUS1, "PTL Index for each layer in each OLS except the first OLS. The PTL index for layer in the first OLS is set to 1")
     855#else
     856  ("Profile", m_profile,   Profile::NONE, "Profile to be used when encoding (Incomplete)")
     857  ("Level",   m_level,     Level::NONE,   "Level limit to be used, eg 5.1 (Incomplete)")
     858  ("Tier",    m_levelTier, Level::MAIN,   "Tier to use for interpretation of --Level")
     859
     860  ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive")
     861  ("InterlacedSource",  m_interlacedSourceFlag,  false, "Indicate that source is interlaced")
     862  ("NonPackedSource",   m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing")
     863  ("FrameOnly",         m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames")
    864864#endif
    865865
     
    25412541  }
    25422542 
    2543 #if !MULTIPLE_PTL_SUPPORT
     2543#if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT
     2544  Int ii = 0;
     2545  while ( ii < m_numPTLInfo )
     2546  {
     2547    if( m_profileList[ii] == Profile::NONE )
     2548    {
     2549      fprintf(stderr, "***************************************************************************\n");
     2550      fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n");
     2551      fprintf(stderr, "***************************************************************************\n");
     2552    }
     2553    if( m_levelList[ii] == Level::NONE )
     2554    {
     2555      fprintf(stderr, "***************************************************************************\n");
     2556      fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set!   **\n");
     2557      fprintf(stderr, "***************************************************************************\n");
     2558    }
     2559    ii++;
     2560  }
     2561#else
    25442562  if( m_profile==Profile::NONE )
    25452563  {
     
    25532571    fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set!   **\n");
    25542572    fprintf(stderr, "***************************************************************************\n");
    2555   }
    2556 #else
    2557   int ii = 0;
    2558   while ( ii < m_numPTLInfo )
    2559   {
    2560     if( m_profileList[ii] == Profile::NONE )
    2561     {
    2562       fprintf(stderr, "***************************************************************************\n");
    2563       fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n");
    2564       fprintf(stderr, "***************************************************************************\n");
    2565     }
    2566     if( m_levelList[ii] == Level::NONE )
    2567     {
    2568       fprintf(stderr, "***************************************************************************\n");
    2569       fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set!   **\n");
    2570       fprintf(stderr, "***************************************************************************\n");
    2571     }
    2572     ii++;
    25732573  }
    25742574#endif
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r941 r942  
    120120
    121121  // profile/level
    122 #if !MULTIPLE_PTL_SUPPORT
    123   Profile::Name m_profile;
    124   Level::Tier   m_levelTier;
    125   Level::Name   m_level;
    126   Bool m_progressiveSourceFlag;
    127   Bool m_interlacedSourceFlag;
    128   Bool m_nonPackedConstraintFlag;
    129   Bool m_frameOnlyConstraintFlag;
    130 #else
     122#if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT
    131123  Int           m_numPTLInfo;
    132124  Int           m_layerPTLIdx[MAX_VPS_LAYER_ID_PLUS1]; ///< scalability_mask
     
    140132
    141133  std::vector< std::vector<Int> > m_listOfLayerPTLofOlss;
    142 #endif
     134#else
     135  Profile::Name m_profile;
     136  Level::Tier   m_levelTier;
     137  Level::Name   m_level;
     138  Bool m_progressiveSourceFlag;
     139  Bool m_interlacedSourceFlag;
     140  Bool m_nonPackedConstraintFlag;
     141  Bool m_frameOnlyConstraintFlag;
     142#endif
     143
    143144  // coding structure
    144145#if !SVC_EXTENSION
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r941 r942  
    262262    m_acTEncTop[layer].setFramesToBeEncoded            ( m_framesToBeEncoded );
    263263
    264 #if !MULTIPLE_PTL_SUPPORT
     264#if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT
     265    m_acTEncTop[layer].setProfile(m_profileList[m_layerPTLIdx[layer]]);
     266    m_acTEncTop[layer].setLevel(m_levelTierList[m_layerPTLIdx[layer]], m_levelList[m_layerPTLIdx[layer]]);
     267    m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlagList[m_layerPTLIdx[layer]]);
     268    m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlagList[m_layerPTLIdx[layer]]);
     269    m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[m_layerPTLIdx[layer]]);
     270    m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[m_layerPTLIdx[layer]]);
     271#else
    265272    m_acTEncTop[layer].setProfile(m_profile);
    266273    m_acTEncTop[layer].setLevel(m_levelTier, m_level);
     
    269276    m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlag);
    270277    m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag);
    271 #else
    272     m_acTEncTop[layer].setProfile(m_profileList[m_layerPTLIdx[layer]]);
    273     m_acTEncTop[layer].setLevel(m_levelTierList[m_layerPTLIdx[layer]], m_levelList[m_layerPTLIdx[layer]]);
    274     m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlagList[m_layerPTLIdx[layer]]);
    275     m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlagList[m_layerPTLIdx[layer]]);
    276     m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[m_layerPTLIdx[layer]]);
    277     m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[m_layerPTLIdx[layer]]);
    278278#endif
    279279
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r941 r942  
    584584#if !MULTIPLE_PTL_SUPPORT
    585585  TComPTL     m_pcPTL;
    586 #else
     586#endif
     587  TimingInfo  m_timingInfo;
     588
     589#if SVC_EXTENSION
     590#if MULTIPLE_PTL_SUPPORT
    587591  TComPTL     m_pcPTLList[NUM_POSSIBLE_LEVEL];
    588592#endif
    589   TimingInfo  m_timingInfo;
    590 
    591 #if SVC_EXTENSION
    592593#if DERIVE_LAYER_ID_LIST_VARIABLES
    593594#if Q0078_ADD_LAYER_SETS
     
    972973#if !MULTIPLE_PTL_SUPPORT
    973974  TComPTL* getPTL() { return &m_pcPTL; }
    974 #else
     975#endif
     976
     977  TimingInfo* getTimingInfo() { return &m_timingInfo; }
     978
     979#if SVC_EXTENSION
     980#if MULTIPLE_PTL_SUPPORT
    975981  TComPTL* getPTL() { return &m_pcPTLList[0]; }
    976982  TComPTL* getPTL(UInt idx) { return &m_pcPTLList[idx]; }
    977983#endif
    978   TimingInfo* getTimingInfo() { return &m_timingInfo; }
    979 
    980 #if SVC_EXTENSION
    981984#if DERIVE_LAYER_ID_LIST_VARIABLES
    982985  Int     getLayerSetLayerIdList(Int set, Int layerId)          { return m_layerSetLayerIdList[set][layerId]; }
     
    11481151  Void   addProfileLevelTierIdx(Int const olsIdx, Int const ptlIdx)     { m_profileLevelTierIdx[olsIdx].push_back(ptlIdx); }
    11491152#endif
    1150   Int calculateLenOfSyntaxElement( Int const numVal );
     1153  Int    calculateLenOfSyntaxElement( Int const numVal );
    11511154#else
    11521155  Int    getProfileLevelTierIdx(Int i)                        { return m_profileLevelTierIdx[i]; }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r941 r942  
    13751375  {
    13761376    vps->setProfilePresentFlag(1, false);
    1377 #if !MULTIPLE_PTL_SUPPORT
     1377#if MULTIPLE_PTL_SUPPORT
     1378    parsePTL( vps->getPTL(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 );
     1379#else
    13781380    vps->getPTLForExtnPtr()->empty();
    13791381    vps->getPTLForExtnPtr()->resize(2);
    13801382    vps->getPTLForExtn(1)->copyProfileInfo( vps->getPTL() );
    13811383    parsePTL( vps->getPTLForExtn(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 );
    1382 #else
    1383     parsePTL( vps->getPTL(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 );
    13841384#endif
    13851385  }
     
    16041604  READ_CODE(  6, uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 );
    16051605#else
    1606   READ_UVLC(  uiCode, "vps_num_profile_tier_level_minus1");
    1607   vps->setNumProfileTierLevel( uiCode + 1 );
    1608   //vps->setNumProfileTierLevel( 3 );
    1609   int aa = vps->getNumProfileTierLevel();
     1606  READ_UVLC(  uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 );
    16101607#endif
    16111608#if PER_LAYER_PTL
     
    16271624#if P0048_REMOVE_PROFILE_REF
    16281625      // Copy profile information from previous one
    1629 #if !MULTIPLE_PTL_SUPPORT
     1626#if MULTIPLE_PTL_SUPPORT
     1627      vps->getPTL(idx)->copyProfileInfo( vps->getPTL( idx - 1 ) );
     1628#else
    16301629      vps->getPTLForExtn(idx)->copyProfileInfo( (idx==1) ? vps->getPTL() : vps->getPTLForExtn( idx - 1 ) );
    1631 #else
    1632       vps->getPTL(idx)->copyProfileInfo( vps->getPTL( idx - 1 ) );
    16331630#endif
    16341631#else
     
    16431640#endif
    16441641    }
    1645 #if !MULTIPLE_PTL_SUPPORT
     1642#if MULTIPLE_PTL_SUPPORT
     1643    parsePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
     1644#else
    16461645    parsePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
    1647 #else
    1648     parsePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
    16491646#endif
    16501647  }
     
    16911688  if( vps->getNumLayerSets() > 1 )
    16921689  {
    1693     READ_UVLC( uiCode, "num_add_olss" );           
    1694     vps->setNumAddOutputLayerSets( uiCode );
     1690    READ_UVLC( uiCode, "num_add_olss" );                  vps->setNumAddOutputLayerSets( uiCode );
    16951691    READ_CODE( 2, uiCode, "default_output_layer_idc" );   vps->setDefaultTargetOutputLayerIdc( uiCode );
    16961692  }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r941 r942  
    10881088  if( vps->getMaxLayers() > 1 && vps->getBaseLayerInternalFlag() )
    10891089  {
    1090 #if !MULTIPLE_PTL_SUPPORT
     1090#if MULTIPLE_PTL_SUPPORT
     1091    codePTL( vps->getPTL(1), false, vps->getMaxTLayers() - 1 );
     1092#else
    10911093    codePTL( vps->getPTLForExtn(1), false, vps->getMaxTLayers() - 1 );
    1092 #else
    1093     codePTL( vps->getPTL(1), false, vps->getMaxTLayers() - 1 );
    10941094#endif
    10951095  }
     
    12581258#endif
    12591259#if LIST_OF_PTL
    1260 #if !MULTIPLE_PTL_SUPPORT
     1260#if MULTIPLE_PTL_SUPPORT
     1261  //Do something here to make sure the loop is correct to consider base layer internal stuff
     1262#else
    12611263  assert( vps->getNumProfileTierLevel() == vps->getPTLForExtnPtr()->size());
    1262 #else
    1263   //Do something here to make sure the loop is correct to consider base layer internal stuff
    12641264#endif
    12651265  for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
     
    12781278    }
    12791279#endif
    1280 #if !MULTIPLE_PTL_SUPPORT
     1280#if MULTIPLE_PTL_SUPPORT
     1281    codePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
     1282#else
    12811283    codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
    1282 #else
    1283     codePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
    12841284#endif
    12851285  }
Note: See TracChangeset for help on using the changeset viewer.