Changeset 959 in SHVCSoftware for branches/SHM-upgrade/source


Ignore:
Timestamp:
6 Jan 2015, 03:12:18 (10 years ago)
Author:
seregin
Message:

update on PTL

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

Legend:

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

    r957 r959  
    6565  MAINREXT = 4,
    6666  HIGHTHROUGHPUTREXT = 5, // Placeholder profile for development
     67#if MULTIPLE_PTL_SUPPORT
     68  MULTIVIEWMAIN = 6,
     69  SCALABLEMAIN = 7,
     70  SCALABLEMAIN10 = 7,
     71#endif
    6772  // The following are RExt profiles, which would map to the MAINREXT profile idc.
    6873  // The enumeration indicates the bit-depth constraint in the bottom 2 digits
     
    338343  {"main-RExt",            Profile::MAINREXT           },
    339344  {"high-throughput-RExt", Profile::HIGHTHROUGHPUTREXT },
     345#if MULTIPLE_PTL_SUPPORT
     346  {"multiview-main",       Profile::MULTIVIEWMAIN      },       //This is not used in this software
     347  {"scalable-main",        Profile::SCALABLEMAIN       },
     348  {"scalable-main10",      Profile::SCALABLEMAIN10     },
     349#endif
    340350};
    341351
     
    372382    {"main_444_12_intra",  MAIN_444_12_INTRA},
    373383    {"main_444_16_intra",  MAIN_444_16_INTRA},
     384#if MULTIPLE_PTL_SUPPORT
     385    {"multiview-main",     MULTIVIEWMAIN    },
     386    {"scalable-main",      SCALABLEMAIN     },
     387    {"scalable-main10",    SCALABLEMAIN10   },
     388#endif
    374389};
    375390
     
    515530  return readStrToEnum(strToScalingListMode, sizeof(strToScalingListMode)/sizeof(*strToScalingListMode), in, mode);
    516531}
     532
     533#if MULTIPLE_PTL_SUPPORT
     534namespace Profile
     535{
     536  static inline istream& operator >> (istream &in, Name &profile)
     537  {
     538    return readStrToEnum(strToProfile, sizeof(strToProfile)/sizeof(*strToProfile), in, profile);
     539  }
     540}
     541#endif
    517542
    518543template <class T>
     
    10141039  string inputColourSpaceConvert;
    10151040#if MULTIPLE_PTL_SUPPORT
    1016   ExtendedProfileName extendedProfile[NUM_POSSIBLE_LEVEL];
     1041  ExtendedProfileName extendedProfile[MAX_NUM_LAYER_IDS + 1];
    10171042#else
    10181043  ExtendedProfileName extendedProfile;
     
    12661291  // Profile and level
    12671292#if MULTIPLE_PTL_SUPPORT
    1268   ("NumProfileTierLevel",                             m_numPTLInfo,                                         2, "Number of Profile, Tier and Level information")
    1269   ("Profile%d",                                       extendedProfile,               NONE, NUM_POSSIBLE_LEVEL,  "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none")
    1270   ("Level%d",                                         m_levelList,            Level::NONE, NUM_POSSIBLE_LEVEL, "Level limit to be used, eg 5.1, or none")
    1271   ("Tier%d",                                          m_levelTierList,        Level::MAIN, NUM_POSSIBLE_LEVEL, "Tier to use for interpretation of --Level (main or high only)")
     1293  ("NumProfileTierLevel",                             m_numPTLInfo,                                         1, "Number of Profile, Tier and Level information")
     1294  ("Profile%d",                                       extendedProfile,          NONE, (MAX_NUM_LAYER_IDS + 1),  "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none")
     1295  ("Level%d",                                         m_levelList,       Level::NONE, (MAX_NUM_LAYER_IDS + 1), "Level limit to be used, eg 5.1, or none")
     1296  ("Tier%d",                                          m_levelTierList,   Level::MAIN, (MAX_NUM_LAYER_IDS + 1), "Tier to use for interpretation of --Level (main or high only)")
    12721297  ("MaxBitDepthConstraint",                           tmpBitDepthConstraint,                               0u, "Bit depth to use for profile-constraint for RExt profiles. 0=automatically choose based upon other parameters")
    12731298  ("MaxChromaFormatConstraint",                       tmpConstraintChromaFormat,                            0, "Chroma-format to use for the profile-constraint for RExt profiles. 0=automatically choose based upon other parameters")
    12741299  ("IntraConstraintFlag",                             tmpIntraConstraintFlag,                           false, "Value of general_intra_constraint_flag to use for RExt profiles (not used if an explicit RExt sub-profile is specified)")
    12751300  ("LowerBitRateConstraintFlag",                      tmpLowerBitRateConstraintFlag,                     true, "Value of general_lower_bit_rate_constraint_flag to use for RExt profiles")
    1276  
    1277   ("ProgressiveSource%d",                             m_progressiveSourceFlagList,   false, NUM_POSSIBLE_LEVEL, "Indicate that source is progressive")
    1278   ("InterlacedSource%d",                              m_interlacedSourceFlagList,    false, NUM_POSSIBLE_LEVEL, "Indicate that source is interlaced")
    1279   ("NonPackedSource%d",                               m_nonPackedConstraintFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that source does not contain frame packing")
    1280   ("FrameOnly%d",                                     m_frameOnlyConstraintFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that the bitstream contains only frames")
     1301
     1302  ("ProfileCompatibility%d",                          m_profileCompatibility, Profile::NONE, (MAX_NUM_LAYER_IDS + 1), "Compatible profile to be used when encoding")
     1303  ("ProgressiveSource%d",                             m_progressiveSourceFlagList,   false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source is progressive")
     1304  ("InterlacedSource%d",                              m_interlacedSourceFlagList,    false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source is interlaced")
     1305  ("NonPackedSource%d",                               m_nonPackedConstraintFlagList, false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source does not contain frame packing")
     1306  ("FrameOnly%d",                                     m_frameOnlyConstraintFlagList, false, (MAX_NUM_LAYER_IDS + 1), "Indicate that the bitstream contains only frames")
    12811307 
    12821308  ("LayerPTLIndex%d",                                 cfg_layerPTLIdx,               0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer")
    1283   ("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")
     1309  ("ListOfProfileTierLevelOls%d",                     cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_OUTPUT_LAYER_SETS_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")
    12841310#else
    12851311  ("Profile",                                         extendedProfile,                                   NONE, "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none")
     
    26222648    }
    26232649#if MULTIPLE_PTL_SUPPORT
    2624     if( olsCtr > startOlsCtr ) // Non-default OLS
    2625     {
    2626       scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[m_outputLayerSetIdx[olsCtr - startOlsCtr - 1]], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] );
    2627     }
    2628     else
    2629     {
    2630       scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsCtr], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] );
    2631     }
     2650    Int olsToLsIndex = (olsCtr > startOlsCtr) ? m_outputLayerSetIdx[olsCtr - m_numLayerSets] : olsCtr;
     2651    scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr] );
     2652    //For conformance checking
     2653    //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:
     2654    //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
     2655    //Conformance of a layer in an output operation point associated with an OLS in a bitstream to the Scalable Main 10 profile is indicated as follows:
     2656    //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
     2657    //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
     2658    for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++)
     2659    {
     2660      if (m_layerSetLayerIdList[olsToLsIndex][ii - 1] != 0 && m_layerSetLayerIdList[olsToLsIndex][ii] != 0)  //Profile / profile compatibility of enhancement layers must indicate the same profile.
     2661      {
     2662        assert( (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||
     2663                (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||   
     2664                (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) );
     2665      }
     2666    }   
    26322667#endif
    26332668  }
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.h

    r956 r959  
    131131#if MULTIPLE_PTL_SUPPORT
    132132  Int           m_numPTLInfo;
    133   Profile::Name m_profileList[NUM_POSSIBLE_LEVEL];
    134   Level::Tier   m_levelTierList[NUM_POSSIBLE_LEVEL];
    135   Level::Name   m_levelList[NUM_POSSIBLE_LEVEL];
    136   Bool          m_progressiveSourceFlagList[NUM_POSSIBLE_LEVEL];
    137   Bool          m_interlacedSourceFlagList[NUM_POSSIBLE_LEVEL];
    138   Bool          m_nonPackedConstraintFlagList[NUM_POSSIBLE_LEVEL];
    139   Bool          m_frameOnlyConstraintFlagList[NUM_POSSIBLE_LEVEL];
     133  Profile::Name m_profileList[MAX_NUM_LAYER_IDS + 1];
     134  Level::Tier   m_levelTierList[MAX_NUM_LAYER_IDS + 1];
     135  Level::Name   m_levelList[MAX_NUM_LAYER_IDS + 1];
     136  Profile::Name m_profileCompatibility[MAX_NUM_LAYER_IDS + 1];
     137  Bool          m_progressiveSourceFlagList[MAX_NUM_LAYER_IDS + 1];
     138  Bool          m_interlacedSourceFlagList[MAX_NUM_LAYER_IDS + 1];
     139  Bool          m_nonPackedConstraintFlagList[MAX_NUM_LAYER_IDS + 1];
     140  Bool          m_frameOnlyConstraintFlagList[MAX_NUM_LAYER_IDS + 1];
    140141
    141142  std::vector< std::vector<Int> > m_listOfLayerPTLofOlss;
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncTop.cpp

    r955 r959  
    213213    profileTierLevel.setTierFlag(m_levelTierList[ii]);
    214214    profileTierLevel.setProfileIdc(m_profileList[ii]);
    215     profileTierLevel.setProfileCompatibilityFlag(m_profileList[ii], 1);
     215    profileTierLevel.setProfileCompatibilityFlag(m_profileCompatibility[ii], 1);
    216216    profileTierLevel.setProgressiveSourceFlag(m_progressiveSourceFlagList[ii]);
    217217    profileTierLevel.setInterlacedSourceFlag(m_interlacedSourceFlagList[ii]);
  • branches/SHM-upgrade/source/Lib/TLibCommon/TComSlice.h

    r945 r959  
    628628#if SVC_EXTENSION
    629629#if MULTIPLE_PTL_SUPPORT
    630   TComPTL     m_pcPTLList[NUM_POSSIBLE_LEVEL];
     630  TComPTL     m_pcPTLList[MAX_NUM_LAYER_IDS + 1];
    631631#endif
    632632#if DERIVE_LAYER_ID_LIST_VARIABLES
  • branches/SHM-upgrade/source/Lib/TLibCommon/TypeDef.h

    r946 r959  
    247247#endif
    248248#define MULTIPLE_PTL_SUPPORT             1      ///< Profile, tier and level signalling
    249 #define NUM_POSSIBLE_LEVEL               13
    250249
    251250#define VPS_DPB_SIZE_TABLE               1      ///< JCTVC-O0217: DPB operations: signaling DPB-related parameters
     
    930929    MAINREXT = 4,
    931930    HIGHTHROUGHPUTREXT = 5,
     931#if MULTIPLE_PTL_SUPPORT
     932    MULTIVIEWMAIN = 6,
     933    SCALABLEMAIN = 7,
     934    SCALABLEMAIN10 = 7,
     935#endif
    932936  };
    933937}
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r945 r959  
    31633163      if( vps->getNecessaryLayerFlag(i, j) )
    31643164      {
    3165         READ_CODE( numBitsForPtlIdx, uiCode, "profile_level_tier_idx[i]" ); 
     3165        READ_CODE( numBitsForPtlIdx, uiCode, "profile_level_tier_idx[i]" );
    31663166        vps->setProfileLevelTierIdx(i, j, uiCode );
     3167
     3168#if MULTIPLE_PTL_SUPPORT
     3169        //For conformance checking
     3170        //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:
     3171        //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
     3172        //Conformance of a layer in an output operation point associated with an OLS in a bitstream to the Scalable Main 10 profile is indicated as follows:
     3173        //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
     3174        //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
     3175        if (j > 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j - 1) != 0)
     3176        {
     3177          assert(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc() == vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc() ||
     3178                 vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc()) || 
     3179                 vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc())  );
     3180        }
     3181#endif
    31673182      }
    31683183    }
Note: See TracChangeset for help on using the changeset viewer.